Built-ins
The whiteboard and test runner, read as worked examples.
Two extensions ship inside conciv, on by default. Both are built on the public contract, nothing private, so they double as reference implementations.
Whiteboard
@conciv/extension-whiteboard
is the shared Excalidraw canvas. It demonstrates the heavyweight end of
the contract:
- Four tool groups (
canvas,comment,anchor,element) composed into onetoolsarray, each defined withdefineTooland a typed shared context. - A long-lived server process: its
.server(...)factory boots a self-hosted CRDT sync server, deploys the schema, and returnsdisposeto shut everything down. - Custom routes:
server.app.get('/config', ...)hands the client its sync endpoint. - Composer UI: its
Componentrenders the whiteboard button withuseSlot() === 'composer'. - Session scoping: tools read
request.sessionIdso every chat session gets its own room.
Test runner
@conciv/extension-test-runner
powers live tests. It shows the middleweight patterns:
configSchema: the plugin'stestRunneroption lands here, validated by zod.- A runner registry: adapters (Vitest, Playwright) behind one interface, picked from config.
- Server-sent events:
server.app.get('/stream', ...)streams live results to the card. - Error mapping: an
onErrorhook converts "runner unavailable" into a structured 422 the card can explain. systemPrompt: teaches the agent to list tests before running vague requests.
Reading order
Start with the test runner's src/server.ts (about fifty lines end to end), then the whiteboard's
tool groups. Everything they import from @conciv/extension is documented in
Tool contract and Widget UI.