{ "argumentSchema": { "$defs": { "AddCommentEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "AddLinkEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "kind": { "$ref": "#/$defs/TopicLinkKind" }, "label": { "type": "string" }, "url": { "type": "string" } }, "required": [ "kind", "url", "label" ], "type": "object" }, "MentionEvent": { "properties": { "topic": { "asCell": [ "cell" ], "description": "The piece to reference — the piece itself, not an address. Identity here\nis the cell, so this is what a caller passes and what gets stored.\n\nDeclared with NO required properties, deliberately. This payload's schema\nreaches every topic in `mentionable`, so naming a field here would demand\nit of pieces deployed before this verb existed and refuse their update\n(`deno task pattern-vintage` catches exactly that). Nothing reads through\nthis anyway: it is stored and compared.", "type": "unknown" } }, "required": [ "topic" ], "type": "object" }, "SetBodyEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "TopicAuthor": { "properties": { "avatar": { "type": "string" }, "kind": { "enum": [ "person", "agent" ] }, "name": { "type": "string" } }, "required": [ "kind", "name" ], "type": "object" }, "TopicComment": { "properties": { "author": { "$ref": "#/$defs/TopicAuthor", "description": "Snapshot taken at write time (profile enrichment comes later; never gate\nauthorship on a profile wish — CT-1879). Comments carry no minted id:\narray elements have stable entity identity; future editing addresses\nelements by reference (`equals()`), not by a synthetic key." }, "authorName": { "default": "", "type": "string" }, "body": { "default": "", "type": "string" }, "sentAt": { "default": 0, "type": "number" } }, "required": [ "authorName", "body", "sentAt" ], "type": "object" }, "TopicLink": { "properties": { "addedAt": { "type": "number" }, "addedBy": { "$ref": "#/$defs/TopicAuthor" }, "kind": { "$ref": "#/$defs/TopicLinkKind", "default": "web" }, "label": { "default": "", "type": "string" }, "url": { "default": "", "type": "string" } }, "required": [ "kind", "url", "label" ], "type": "object" }, "TopicLinkKind": { "enum": [ "session", "topic", "pr", "web" ] }, "TopicMentionRef": { "properties": { "destination": { "type": "unknown" }, "modifiedTitle": { "type": "boolean" } }, "required": [ "destination", "modifiedTitle" ], "type": "object" }, "TopicMentionRefMap": { "additionalProperties": { "$ref": "#/$defs/TopicMentionRef" }, "properties": {}, "type": "object" }, "TopicPiece": { "properties": { "$NAME": { "default": "", "description": "The topic's display name. Like the other derived display fields, a cold\nretained topic may not have produced this path yet; its persisted title\nremains authoritative until it does.", "type": [ "string", "undefined" ] }, "addComment": { "$ref": "#/$defs/AddCommentEvent", "asCell": [ "stream" ] }, "addLink": { "$ref": "#/$defs/AddLinkEvent", "asCell": [ "stream" ] }, "body": { "type": "string" }, "bodyUpdatedAt": { "type": [ "number", "undefined" ] }, "bodyUpdatedBy": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/TopicAuthor" } ] }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "comments": { "items": { "$ref": "#/$defs/TopicComment" }, "type": "array" }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "createdByName": { "type": "string" }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "links": { "items": { "$ref": "#/$defs/TopicLink" }, "type": "array" }, "mention": { "$ref": "#/$defs/MentionEvent", "asCell": [ "stream" ], "description": "Reference another piece from this topic, and stop referencing it. The\nbrowser equivalent is picking a completion in the body editor, which writes\nthe same map.\n\nOPTIONAL, unlike the verbs beside them, and for the reason every added path\non this projection is: a topic deployed before these existed carries\nneither, and a required property it cannot produce refuses its update\noutright. The older verbs predate every deployed generation, so they can\nstay required; these cannot." }, "mentioned": { "default": [], "description": "Pieces referenced outside the prose, recorded by `mention`.", "items": { "type": "unknown" }, "type": "array" }, "mentions": { "default": [], "description": "Every piece this topic's prose and links point at, as references.\n\nThe board's pivot is declared over this and nothing else, so what one topic\ncosts a full-board scan is exactly this list of identities. Declared\n`unknown[]` for the same reason the pivot is: these are references, and\ncomparing them never reads what is behind them. Declared as cells, because\nthat is what a consumer has to read them as to compare them at all.\n\nThe default stands alone: a declared default and `| undefined` collide,\nand the default is what a topic deployed before this path existed\nmaterializes against.", "items": { "type": "unknown" }, "type": "array" }, "referencedBy": { "default": [], "description": "The topics that mention this one, read out of the board's pivot.\n\nDeclared through `TopicSummary` rather than `TopicPiece`, and that is\nload-bearing rather than stingy: a topic whose backlinks were topics would\nbe a type that contains itself, and resolving one from a list would walk\nthe graph. The summary carries no reference of its own, so it terminates.\nA reader that wants more follows the link, which resolves whole.", "items": { "$ref": "#/$defs/TopicSummary" }, "type": "array" }, "references": { "$ref": "#/$defs/TopicMentionRefMap", "default": {}, "description": "Where this topic's `[Label][key]` mentions point. Durable content, like\n`links`. Written by the body editor; this pattern only ever reads it." }, "setBody": { "$ref": "#/$defs/SetBodyEvent", "asCell": [ "stream" ] }, "title": { "type": "string" }, "unmention": { "$ref": "#/$defs/UnmentionEvent", "asCell": [ "stream" ] } }, "required": [ "createdByName", "body", "comments", "links", "mentions", "references", "mentioned", "referencedBy", "addComment", "addLink", "setBody", "$NAME", "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "TopicSummary": { "properties": { "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "title": { "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "UnmentionEvent": { "properties": { "topic": { "asCell": [ "cell" ], "type": "unknown" } }, "required": [ "topic" ], "type": "object" } }, "properties": { "myName": { "asCell": [ { "kind": "cell", "scope": "user" } ], "default": "", "type": "string" }, "topics": { "asCell": [ "cell" ], "default": [], "items": { "$ref": "#/$defs/TopicPiece" }, "type": "array" } }, "type": "object" }, "pattern": "topics/main.tsx", "resultSchema": { "$defs": { "AddCommentEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "AddLinkEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "kind": { "$ref": "#/$defs/TopicLinkKind" }, "label": { "type": "string" }, "url": { "type": "string" } }, "required": [ "kind", "url", "label" ], "type": "object" }, "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. Optional only so\ncallers of the previous deployed schema remain valid; new callers must\nprovide a non-blank name.", "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": { "type": "string" } }, "required": [ "title" ], "type": "object" }, "MentionEvent": { "properties": { "topic": { "description": "The piece to reference — the piece itself, not an address. Identity here\nis the cell, so this is what a caller passes and what gets stored.\n\nDeclared with NO required properties, deliberately. This payload's schema\nreaches every topic in `mentionable`, so naming a field here would demand\nit of pieces deployed before this verb existed and refuse their update\n(`deno task pattern-vintage` catches exactly that). Nothing reads through\nthis anyway: it is stored and compared.", "type": "unknown" } }, "required": [ "topic" ], "type": "object" }, "SetBodyEvent": { "properties": { "agentName": { "description": "Explicit content-level signature for an agent using its human user's\nidentity key. Optional only so callers of the previous deployed schema\nremain valid; new callers must provide a non-blank name.", "type": "string" }, "body": { "type": "string" } }, "required": [ "body" ], "type": "object" }, "TopicAuthor": { "properties": { "avatar": { "type": "string" }, "kind": { "enum": [ "person", "agent" ] }, "name": { "type": "string" } }, "required": [ "kind", "name" ], "type": "object" }, "TopicComment": { "properties": { "author": { "$ref": "#/$defs/TopicAuthor", "description": "Snapshot taken at write time (profile enrichment comes later; never gate\nauthorship on a profile wish — CT-1879). Comments carry no minted id:\narray elements have stable entity identity; future editing addresses\nelements by reference (`equals()`), not by a synthetic key." }, "authorName": { "default": "", "type": "string" }, "body": { "default": "", "type": "string" }, "sentAt": { "default": 0, "type": "number" } }, "required": [ "authorName", "body", "sentAt" ], "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" }, "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": "Authorship has no honest zero, so absence stays declared rather than\nbeing coalesced to an empty author." }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "title": { "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "TopicLink": { "properties": { "addedAt": { "type": "number" }, "addedBy": { "$ref": "#/$defs/TopicAuthor" }, "kind": { "$ref": "#/$defs/TopicLinkKind", "default": "web" }, "label": { "default": "", "type": "string" }, "url": { "default": "", "type": "string" } }, "required": [ "kind", "url", "label" ], "type": "object" }, "TopicLinkKind": { "enum": [ "session", "topic", "pr", "web" ] }, "TopicMentionRef": { "properties": { "destination": { "type": "unknown" }, "modifiedTitle": { "type": "boolean" } }, "required": [ "destination", "modifiedTitle" ], "type": "object" }, "TopicMentionRefMap": { "additionalProperties": { "$ref": "#/$defs/TopicMentionRef" }, "properties": {}, "type": "object" }, "TopicPiece": { "properties": { "$NAME": { "default": "", "description": "The topic's display name. Like the other derived display fields, a cold\nretained topic may not have produced this path yet; its persisted title\nremains authoritative until it does.", "type": [ "string", "undefined" ] }, "addComment": { "$ref": "#/$defs/AddCommentEvent", "asCell": [ "stream" ] }, "addLink": { "$ref": "#/$defs/AddLinkEvent", "asCell": [ "stream" ] }, "body": { "type": "string" }, "bodyUpdatedAt": { "type": [ "number", "undefined" ] }, "bodyUpdatedBy": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/TopicAuthor" } ] }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "comments": { "items": { "$ref": "#/$defs/TopicComment" }, "type": "array" }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "createdByName": { "type": "string" }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "links": { "items": { "$ref": "#/$defs/TopicLink" }, "type": "array" }, "mention": { "$ref": "#/$defs/MentionEvent", "asCell": [ "stream" ], "description": "Reference another piece from this topic, and stop referencing it. The\nbrowser equivalent is picking a completion in the body editor, which writes\nthe same map.\n\nOPTIONAL, unlike the verbs beside them, and for the reason every added path\non this projection is: a topic deployed before these existed carries\nneither, and a required property it cannot produce refuses its update\noutright. The older verbs predate every deployed generation, so they can\nstay required; these cannot." }, "mentioned": { "default": [], "description": "Pieces referenced outside the prose, recorded by `mention`.", "items": { "type": "unknown" }, "type": "array" }, "mentions": { "default": [], "description": "Every piece this topic's prose and links point at, as references.\n\nThe board's pivot is declared over this and nothing else, so what one topic\ncosts a full-board scan is exactly this list of identities. Declared\n`unknown[]` for the same reason the pivot is: these are references, and\ncomparing them never reads what is behind them. Declared as cells, because\nthat is what a consumer has to read them as to compare them at all.\n\nThe default stands alone: a declared default and `| undefined` collide,\nand the default is what a topic deployed before this path existed\nmaterializes against.", "items": { "type": "unknown" }, "type": "array" }, "referencedBy": { "default": [], "description": "The topics that mention this one, read out of the board's pivot.\n\nDeclared through `TopicSummary` rather than `TopicPiece`, and that is\nload-bearing rather than stingy: a topic whose backlinks were topics would\nbe a type that contains itself, and resolving one from a list would walk\nthe graph. The summary carries no reference of its own, so it terminates.\nA reader that wants more follows the link, which resolves whole.", "items": { "$ref": "#/$defs/TopicSummary" }, "type": "array" }, "references": { "$ref": "#/$defs/TopicMentionRefMap", "default": {}, "description": "Where this topic's `[Label][key]` mentions point. Durable content, like\n`links`. Written by the body editor; this pattern only ever reads it." }, "setBody": { "$ref": "#/$defs/SetBodyEvent", "asCell": [ "stream" ] }, "title": { "type": "string" }, "unmention": { "$ref": "#/$defs/UnmentionEvent", "asCell": [ "stream" ] } }, "required": [ "createdByName", "body", "comments", "links", "mentions", "references", "mentioned", "referencedBy", "addComment", "addLink", "setBody", "$NAME", "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "TopicSummary": { "properties": { "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "title": { "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "UnmentionEvent": { "properties": { "topic": { "type": "unknown" } }, "required": [ "topic" ], "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.", "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "addTopic": { "$ref": "#/$defs/AddTopicEvent", "asCell": [ "stream" ] }, "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": [], "items": { "$ref": "#/$defs/TopicPiece" }, "type": "array" }, "myName": { "type": "string" }, "newTitle": { "description": "Session-local draft for the footer composer (exposed for embedding and\nheadless driving, like the chat exemplar's drafts).", "type": "string" }, "setMyName": { "asCell": [ "stream" ], "deprecated": true, "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "submitTopic": { "asCell": [ "stream", "opaque" ], "description": "Submit the footer composer as the current viewer's canonical Profile.", "tier": "wrapper" }, "topicCount": { "type": "number" }, "topics": { "items": { "$ref": "#/$defs/TopicPiece" }, "type": "array" } }, "required": [ "topics", "mentionable", "topicCount", "crossrefs", "index", "addTopic", "myName", "setMyName", "submitTopic", "$NAME", "$UI" ], "tags": [ "topic" ], "type": "object" } }