{ "argumentSchema": { "$defs": { "Attachment": { "properties": { "attachedAt": { "type": "number" }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "title": { "type": "string" }, "workstreamId": { "description": "The workstream the session was attached under, where one applies.", "type": "string" } }, "required": [ "sourceId", "nativeSessionId", "title", "attachedAt" ], "type": "object" }, "CheckoutEntry": { "properties": { "branch": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "commit": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "root": { "type": "string" } }, "required": [ "root" ], "type": "object" }, "SessionEntry": { "properties": { "active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "archived": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "cwd": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "gitBranch": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "gitRepo": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "gitWorktreeRoot": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "syncStatus": { "type": "string" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updatedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "sourceId", "nativeSessionId", "title", "cwd", "gitRepo", "gitBranch", "gitWorktreeRoot", "updatedAt", "active", "archived", "syncStatus" ], "type": "object" }, "SessionIndexView": { "properties": { "checkouts": { "items": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/CheckoutEntry" } ] }, "type": "array" }, "generatedAt": { "type": "string" }, "ownerDid": { "description": "The connector owner's DID; every command a workbench sends names it.", "type": "string" }, "schema": { "type": "string" }, "sessions": { "items": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/SessionEntry" } ] }, "type": "array" }, "sources": { "items": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/SourceEntry" } ] }, "type": "array" } }, "required": [ "schema", "sessions" ], "type": "object" }, "SessionStart": { "properties": { "commandId": { "type": "string" }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "startedAt": { "type": "number" }, "title": { "type": "string" }, "workstreamId": { "description": "The workstream the start was made for, where one applies.", "type": "string" } }, "required": [ "commandId", "sourceId", "nativeSessionId", "title", "startedAt" ], "type": "object" }, "ShownHarness": { "properties": { "driver": { "type": "string" }, "id": { "type": "string" } }, "required": [ "id", "driver" ], "type": "object" }, "SourceEntry": { "properties": { "driver": { "type": "string" }, "id": { "type": "string" } }, "required": [ "id", "driver" ], "type": "object" }, "TopicLinkView": { "properties": { "addedAt": { "type": "number" }, "kind": { "type": "string" }, "label": { "type": "string" }, "removedAt": { "type": "number" }, "url": { "type": "string" } }, "required": [ "kind", "url" ], "type": "object" }, "TopicView": { "properties": { "body": { "default": "", "type": "string" }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "createdBy": { "default": { "kind": "person", "name": "" }, "properties": { "avatar": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" } }, "required": [ "kind", "name" ], "type": "object" }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "links": { "default": [], "items": { "$ref": "#/$defs/TopicLinkView" }, "type": "array" }, "shortName": { "type": "string" }, "title": { "default": "", "type": "string" } }, "required": [ "title", "body", "commentCount", "lastActivityAt", "links" ], "type": "object" } }, "properties": { "attached": { "asCell": [ "cell" ], "default": [], "description": "Sessions attached to the topic by hand, the workbench's own record.", "items": { "$ref": "#/$defs/Attachment" }, "type": "array" }, "commands": { "asCell": [ "cell" ], "default": [], "description": "The command queue the connector's host binds for this piece. Absent until\nthe host has linked it; a start sent before then reaches nothing.", "items": { "type": "string" }, "type": "array" }, "harnessesShown": { "default": [], "description": "Harnesses to list in the picker beside the connector's sources, for a\nmachine that shows a harness it does not run. Picking one starts nothing.", "items": { "$ref": "#/$defs/ShownHarness" }, "type": "array" }, "sessions": { "$ref": "#/$defs/SessionIndexView", "description": "The agents connector's complete session index for this person." }, "startMode": { "default": "", "description": "The permission mode a started session's first turn runs under, one the\ndriver advertises. Empty leaves the driver's default, which cannot pass a\ntool or network approval headlessly.", "type": "string" }, "startSurface": { "default": "", "description": "Where a started session runs: `headless` (the default) runs the first\nturn on this Mac through the connector; `desktop` opens Claude Code on\nthis Mac with the kickoff ready to send, takes no mode, and the session\nthe app makes joins once the person sends it and the connector sees it.", "type": "string" }, "starts": { "asCell": [ "cell" ], "default": [], "description": "Every start this workbench has sent, the workbench's own record. A start\nthe index has confirmed stays here, since the record is what attaches its\nsession; one the index has not confirmed can be withdrawn.", "items": { "$ref": "#/$defs/SessionStart" }, "type": "array" }, "topic": { "$ref": "#/$defs/TopicView", "description": "The topic this workbench is about, linked from the board's topic piece." } }, "type": "object" }, "pattern": "topic-workbench/main.tsx", "resultSchema": { "$defs": { "AttachEvent": { "properties": { "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "title": { "description": "The title as known at attach time; the live title comes from the index.", "type": "string" } }, "required": [ "sourceId", "nativeSessionId" ], "type": "object" }, "Attachment": { "properties": { "attachedAt": { "type": "number" }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "title": { "type": "string" }, "workstreamId": { "description": "The workstream the session was attached under, where one applies.", "type": "string" } }, "required": [ "sourceId", "nativeSessionId", "title", "attachedAt" ], "type": "object" }, "DetachEvent": { "properties": { "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" } }, "required": [ "sourceId", "nativeSessionId" ], "type": "object" }, "SessionRow": { "properties": { "active": { "type": "boolean" }, "attached": { "type": "boolean" }, "cwd": { "type": "string" }, "gitBranch": { "type": "string" }, "gitRepo": { "type": "string" }, "key": { "type": "string" }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "startedAs": { "description": "The id the start that made this session named, or \"\" when the session\nis its own start's or none.", "type": "string" }, "title": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "key", "sourceId", "nativeSessionId", "title", "cwd", "gitBranch", "gitRepo", "updatedAt", "active", "attached", "startedAs" ], "type": "object" }, "SessionStart": { "properties": { "commandId": { "type": "string" }, "nativeSessionId": { "type": "string" }, "sourceId": { "type": "string" }, "startedAt": { "type": "number" }, "title": { "type": "string" }, "workstreamId": { "description": "The workstream the start was made for, where one applies.", "type": "string" } }, "required": [ "commandId", "sourceId", "nativeSessionId", "title", "startedAt" ], "type": "object" } }, "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "attach": { "$ref": "#/$defs/AttachEvent", "asCell": [ "stream" ], "description": "Attach a session by provider identity. Idempotent." }, "attached": { "default": [], "description": "The sessions attached by hand; `attachedSessions` adds the confirmed\nstarts to them.", "items": { "$ref": "#/$defs/Attachment" }, "type": "array" }, "attachedSessions": { "description": "Every attached session, the confirmed starts among them.", "items": { "$ref": "#/$defs/SessionRow" }, "type": "array" }, "commandAuthorization": { "ifc": { "writeAuthorizedBy": { "__ctWriterIdentityOf": { "file": "/packages/patterns/topic-workbench/main.tsx", "moduleIdentity": "BQMz0TITqUXB-NLyK_kvKV_CcoslcQAnVG4AEscNjKE", "path": [ "startSessionCommand" ] } } }, "type": "boolean" }, "detach": { "$ref": "#/$defs/DetachEvent", "asCell": [ "stream" ], "description": "Detach a session by provider identity, a started one included." }, "kickoff": { "description": "The prompt as it will be sent: the person's words, then the topic's\ncontext and links.", "type": "string" }, "recentSessions": { "items": { "$ref": "#/$defs/SessionRow" }, "type": "array" }, "relatedSessions": { "items": { "$ref": "#/$defs/SessionRow" }, "type": "array" }, "spawnCommand": { "type": "string" }, "spawnPrompt": { "type": "string" }, "spawnRoot": { "type": "string" }, "spawnSource": { "type": "string" }, "startBlocker": { "description": "Why Start would send nothing, or \"\" when it would.", "type": "string" }, "startSession": { "asCell": [ "stream", "opaque" ], "description": "Start a session for the topic: sends the connector a `start` command\ncarrying the kickoff prompt, the picked checkout, and the topic's name as\nthe session title, and records the start. Until the index carries the\nsession the start can be withdrawn; once it does, the record is what\nattaches the session.", "tier": "wrapper" }, "startingSessions": { "description": "Starts the index has not confirmed yet.", "items": { "$ref": "#/$defs/SessionStart" }, "type": "array" } }, "required": [ "attached", "attachedSessions", "startingSessions", "relatedSessions", "recentSessions", "spawnCommand", "kickoff", "startBlocker", "spawnPrompt", "spawnRoot", "spawnSource", "attach", "detach", "startSession", "$NAME", "$UI" ], "type": "object" } }