{ "argumentSchema": { "$defs": { "TopicAuthor": { "properties": { "avatar": { "type": "string" }, "kind": { "description": "Open for the same reason `TopicLinkKind` is: this is provided data, so a\nclosed set here could never gain `\"service\"` or whatever acts next.\nWell-known values are `\"person\"` and `\"agent\"`, the latter marking an\nagent acting with its human user's key.", "type": "string" }, "name": { "type": "string" } }, "required": [ "kind", "name" ], "type": "object" }, "TopicDemand": { "properties": { "$NAME": { "default": "", "description": "The display name, which the board publishes onward as each topic's\n`mentionable` entry — and `cf-code-editor` requires it there. Dropping it\ncosts no type error and silently empties every `@`-mention completion.", "type": [ "string", "undefined" ] }, "body": { "default": "", "type": "string" }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "createdAt": { "description": "When the topic was filed (epoch milliseconds), stamped at create.", "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "mentions": { "default": [], "items": { "type": "unknown" }, "type": "array" }, "title": { "default": "", "description": "The topic's title. Defaulted rather than required, like every other\nfield a board card renders: the card list is a mapped sub-pattern, so\nthis type reaches a piece holding topics written before the field\nexisted as the argument schema its update is checked against, and a\nrequired property those topics lack refuses that update outright.\n`deno task pattern-vintage` is what catches it, by replaying a real\ndeployed board.", "type": "string" } }, "required": [ "body", "mentions", "$NAME", "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" } }, "properties": { "topics": { "asCell": [ "cell" ], "default": [], "description": "The board's durable topic list. `addTopic` appends here; direct writes\nare legitimate but unattributed, and a whole-array write forfeits the\nmergeability the verb's append keeps.", "items": { "$ref": "#/$defs/TopicDemand" }, "type": "array" } }, "type": "object" }, "pattern": "topics/main.tsx", "resultSchema": { "$defs": { "AddTopicEvent": { "properties": { "agentName": { "description": "The agent making this mutation. The authenticated principal remains the\nhuman whose identity key invoked the stream; this is the agent's explicit\ncontent-level signature under that shared principal.\n\nRequired, for the reason given on `AgentAuthoredEvent`: acceptance widens\ncompatibly and narrows only through a break, so tolerating an unsigned\ncreate is a tolerance that could never be withdrawn.", "type": "string" }, "body": { "description": "The topic's initial living-document body. A topic born with a body\nappears with it atomically — no reader observes the title-only halfway\nstate, and no follow-up `setBody` call is needed to finish a create\n(verb contract: the atomic-unit rule).", "type": "string" }, "title": { "description": "The topic's title, trimmed before it is stored. Must be non-empty.", "type": "string" } }, "required": [ "title", "agentName" ], "type": "object" }, "TopicAuthor": { "properties": { "avatar": { "type": "string" }, "kind": { "description": "Open for the same reason `TopicLinkKind` is: this is provided data, so a\nclosed set here could never gain `\"service\"` or whatever acts next.\nWell-known values are `\"person\"` and `\"agent\"`, the latter marking an\nagent acting with its human user's key.", "type": "string" }, "name": { "type": "string" } }, "required": [ "kind", "name" ], "type": "object" }, "TopicCrossrefRow": { "properties": { "mentionedBy": { "items": { "type": "unknown" }, "type": "array" }, "topic": { "description": "The topic this row is about. `unknown` because it is written as a\nreference and only ever compared — `equals` takes the raw link. Anything\nwider retrieves the piece instead of pointing at it: declared `object`,\nthis field reads back as the whole expanded topic, `$UI` tree included.", "type": "unknown" } }, "required": [ "topic", "mentionedBy" ], "type": "object" }, "TopicDemand": { "properties": { "$NAME": { "default": "", "description": "The display name, which the board publishes onward as each topic's\n`mentionable` entry — and `cf-code-editor` requires it there. Dropping it\ncosts no type error and silently empties every `@`-mention completion.", "type": [ "string", "undefined" ] }, "body": { "default": "", "type": "string" }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "createdAt": { "description": "When the topic was filed (epoch milliseconds), stamped at create.", "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "mentions": { "default": [], "items": { "type": "unknown" }, "type": "array" }, "title": { "default": "", "description": "The topic's title. Defaulted rather than required, like every other\nfield a board card renders: the card list is a mapped sub-pattern, so\nthis type reaches a piece holding topics written before the field\nexisted as the argument schema its update is checked against, and a\nrequired property those topics lack refuses that update outright.\n`deno task pattern-vintage` is what catches it, by replaying a real\ndeployed board.", "type": "string" } }, "required": [ "body", "mentions", "$NAME", "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "TopicIndexRow": { "properties": { "commentCount": { "default": 0, "description": "Coalesced to 0 for a cold or older topic whose derived path is absent,\nso the row itself never carries the mixed-version undefined.", "type": [ "number", "undefined" ] }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" }, "description": "Who filed the topic. A topic written without structured authorship\nmaterializes the declared default — the inert legacy sentinel\n`{ kind: \"person\", name: \"\" }` — so a blank name here means \"unsigned\",\nand there is nothing further to consult: the display-name mirror this\nonce pointed at is retired, and `topicAuthorLabel` renders the sentinel\nas `someone`." }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "title": { "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" } }, "description": "Topics — a tracker over #topic pieces: durable units of shared attention\n(CT-1878). Deliberately minimal: no statuses, labels, or assignees; topics\nsort by last activity. Replaces Linear / GitHub issues / loose process docs\nfor the team; PR workflows stay in GitHub and arrive here as links.\n\nHeadless use: survey the whole board with one bounded read of `index` — a\nrow IS its topic, so a row's own address (`--select index[].@`) is what\nthat topic's reads and verbs take as the piece. File with `addTopic`,\ntitle and optional initial body in one call, then work on the topic\ndirectly: the body is its living document, the thread its append-only\ndeliberation. Sign every mutation with `agentName` — Fabric records the\nhuman principal behind the key; the name says which agent acted under it.", "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "addTopic": { "$ref": "#/$defs/AddTopicEvent", "asCell": [ "stream" ], "description": "File a topic. The atomic unit takes the initial body with the title, so\nno reader observes a title-only halfway state and no follow-up `setBody`\nfinishes a create. Returns the created topic as its survey row — the\nreference plus the write-time facts the pattern resolved." }, "crossrefs": { "default": [], "description": "The board's mention pivot, one row per topic: the topic, and the topics\nthat mention it. Published so a topic composed outside `addTopic` can be\nwired to the same table the board's own children read — the graph is\nderived once, here, and never per topic.", "items": { "$ref": "#/$defs/TopicCrossrefRow" }, "type": "array" }, "index": { "default": [], "description": "The full-board survey surface: one bounded row per topic, carrying the\nscalars a survey reads. A row IS its topic, so a row's own address is the\ntopic's — `--select index[].@` reads it, and an index into this array is\nnot a stable address.", "items": { "$ref": "#/$defs/TopicIndexRow" }, "type": "array" }, "mentionable": { "default": [], "description": "The same list, under the name the topic pattern's editor autocompletes\nover — what `addTopic` wires into each child as its mention universe.", "items": { "$ref": "#/$defs/TopicDemand" }, "type": "array" }, "newTitle": { "description": "Session-local draft for the footer composer (exposed for embedding and\nheadless driving, like the chat exemplar's drafts).", "type": "string" }, "submitTopic": { "asCell": [ "stream", "opaque" ], "description": "Submit the footer composer as the current viewer's canonical Profile.", "tier": "wrapper" }, "topicCount": { "description": "How many topics the board holds, nulls included.", "type": "number" }, "topics": { "description": "The board's topics, in filing order, through the shape the board demands\nof them: the display scalars and the mention universe, and no verbs. A\ncaller that means to mutate a topic addresses the topic itself, where its\nown schema governs. Survey through `index` instead; read this when you\nalready know which topic you are expanding.", "items": { "$ref": "#/$defs/TopicDemand" }, "type": "array" } }, "required": [ "topics", "mentionable", "topicCount", "crossrefs", "index", "addTopic", "submitTopic", "$NAME", "$UI" ], "tags": [ "topic" ], "type": "object" } }