{ "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 through the ONE field every topic has rather than `unknown`, and\nthe narrowness is what makes a non-reference CHEAP TO CATCH — not what\ncatches it. An `asCell` payload is wrapped whole without validating what\nis behind it, so naming a property refuses nothing at the boundary: an\naddress sent as text, which an inline CLI call argument produces by being\nparsed as plain JSON, arrives here as readily as a piece does. What the\nnamed property buys is a one-field read that tells the two apart —\n`topic.get()` is `undefined` for a value that is not a reference and an\nobject for any piece — and `mention` spends it before storing anything.\n\n`title` is also the most this can safely name: this schema reaches every\ntopic in `mentionable`, so a property without a default would be demanded\nof topics written before it existed and refuse their update. `title`\ncarries one, and that default does double duty — it is also why the check\nadmits a piece that is not a topic at all, which reads back `{ title: \"\" }`\nrather than `undefined`. `deno task pattern-vintage` proves the update side\nby replaying a real board.\n\nNothing reads THROUGH it beyond that one field — the value is stored and\ncompared.", "properties": { "title": { "default": "", "type": "string" } }, "required": [ "title" ], "type": "object" } }, "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" }, "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": [ "pr", "topic", "session", "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": { "default": "", "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": { "default": "", "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[]` because these are references, and comparing them never reads\nwhat is behind them.\n\nThe cell annotation that makes them comparable belongs to the READER, not\nhere: the pivot declares its own view of this list as\n`TopicMentionSource.mentions: ComparableCell[]`, and that is what\nmakes its graph settle rather than depend on load order. A published\n`unknown[]` is what each reader annotates for itself.\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`. The body editor works on a session copy of this map, which a save\npublishes here whole, beside the prose whose tokens name its entries." }, "setBody": { "$ref": "#/$defs/SetBodyEvent", "asCell": [ "stream" ] }, "title": { "default": "", "description": "Defaulted rather than required, like every other field a board card\nrenders. The card list is a mapped sub-pattern, so this type reaches a\npiece holding topics written before the field existed as the argument\nschema its update is checked against, and a required property those topics\nlack refuses that update outright. `deno task pattern-vintage` is what\ncatches it, by replaying a real deployed board.", "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": { "default": "", "description": "Defaulted rather than required, like every other field a board card\nrenders. The card list is a mapped sub-pattern, so this type reaches a\npiece holding topics written before the field existed as the argument\nschema its update is checked against, and a required property those topics\nlack refuses that update outright. `deno task pattern-vintage` is what\ncatches it, by replaying a real deployed board.", "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "UnmentionEvent": { "properties": { "topic": { "asCell": [ "cell" ], "description": "Declared and checked exactly as `MentionEvent.topic` is, and for the same\nreason: a payload that is not a reference matches no stored entry, so\nwithout the check it would remove nothing and report success.", "properties": { "title": { "default": "", "type": "string" } }, "required": [ "title" ], "type": "object" } }, "required": [ "topic" ], "type": "object" } }, "properties": { "boardCrossrefs": { "asCell": [ "readonly" ], "default": [], "description": "The board's mention pivot, one row per topic. A topic reads its own row\nout of it and nothing else; see `backlinksOf`. Absent, a topic simply shows\nno inbound references.\n\nReadable, not writable: the pivot is the board's derivation, and a topic\nhas no business writing into it. Declaring the narrower cell says so where\na reader can see it, rather than leaving it to convention.", "items": { "$ref": "#/$defs/TopicCrossrefRow" }, "type": "array" }, "body": { "asCell": [ "cell" ], "default": "", "description": "The topic's living document: durable conclusions get folded up into the\nbody; the comment thread below holds the deliberation.", "type": "string" }, "bodyUpdatedAt": { "asCell": [ "cell" ], "default": 0, "type": "number" }, "bodyUpdatedBy": { "$ref": "#/$defs/TopicAuthor", "asCell": [ "cell" ], "default": { "kind": "person", "name": "" } }, "comments": { "asCell": [ "cell" ], "default": [], "items": { "$ref": "#/$defs/TopicComment" }, "type": "array" }, "createdAt": { "default": 0, "type": "number" }, "createdBy": { "$ref": "#/$defs/TopicAuthor" }, "createdByName": { "default": "", "type": "string" }, "links": { "asCell": [ "cell" ], "default": [], "items": { "$ref": "#/$defs/TopicLink" }, "type": "array" }, "mentionable": { "asCell": [ "cell" ], "default": [], "description": "The board's own topics list — the mention universe the body editor\nautocompletes over. A reference to the tracker's array, wired at creation\nlike `myName` (and backfillable as a one-time link-bind on pieces created\nbefore it existed). Absent, the editor simply offers no completions.", "items": { "$ref": "#/$defs/TopicPiece" }, "type": "array" }, "mentioned": { "asCell": [ "cell" ], "default": [], "description": "Pieces this topic references outside its prose — what `mention` records.\n\nIts own list rather than an entry in `references`, because that map belongs\nto the body editor: the editor mints its keys, rewrites its labels, and\ncollects entries whose token has left the document. A verb writing there\nwould be writing into somebody else's bookkeeping. Here there is nothing to\nkey by, because there is nothing to point back at from the prose — a\nreference outside a sentence is just a link in a list.", "items": { "type": "unknown" }, "type": "array" }, "myName": { "asCell": [ { "kind": "cell", "scope": "user" } ], "default": "", "type": "string" }, "references": { "$ref": "#/$defs/TopicMentionRefMap", "asCell": [ "cell" ], "default": {}, "description": "Where this topic's `[Label][key]` mentions point, keyed by the token that\nappears in the body. The editor owns the contents; this pattern owns the\ncell, which is what makes a mention durable and — because each entry holds\nthe destination as a REFERENCE — what makes the reference graph a question\nabout cell identity rather than about text.\n\nThe default has to match the one `TopicOutput` publishes. A map published\nunder a different default than its input carries cannot be materialized." }, "title": { "asCell": [ "cell" ], "default": "", "type": "string" } }, "type": "object" }, "pattern": "topics/topic.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" }, "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 through the ONE field every topic has rather than `unknown`, and\nthe narrowness is what makes a non-reference CHEAP TO CATCH — not what\ncatches it. An `asCell` payload is wrapped whole without validating what\nis behind it, so naming a property refuses nothing at the boundary: an\naddress sent as text, which an inline CLI call argument produces by being\nparsed as plain JSON, arrives here as readily as a piece does. What the\nnamed property buys is a one-field read that tells the two apart —\n`topic.get()` is `undefined` for a value that is not a reference and an\nobject for any piece — and `mention` spends it before storing anything.\n\n`title` is also the most this can safely name: this schema reaches every\ntopic in `mentionable`, so a property without a default would be demanded\nof topics written before it existed and refuse their update. `title`\ncarries one, and that default does double duty — it is also why the check\nadmits a piece that is not a topic at all, which reads back `{ title: \"\" }`\nrather than `undefined`. `deno task pattern-vintage` proves the update side\nby replaying a real board.\n\nNothing reads THROUGH it beyond that one field — the value is stored and\ncompared.", "properties": { "title": { "default": "", "type": "string" } }, "required": [ "title" ], "type": "object" } }, "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": [ "pr", "topic", "session", "web" ] }, "TopicMentionRef": { "properties": { "destination": { "type": "unknown" }, "modifiedTitle": { "type": "boolean" } }, "required": [ "destination", "modifiedTitle" ], "type": "object" }, "TopicMentionRefMap": { "additionalProperties": { "$ref": "#/$defs/TopicMentionRef" }, "properties": {}, "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": { "default": "", "description": "Defaulted rather than required, like every other field a board card\nrenders. The card list is a mapped sub-pattern, so this type reaches a\npiece holding topics written before the field existed as the argument\nschema its update is checked against, and a required property those topics\nlack refuses that update outright. `deno task pattern-vintage` is what\ncatches it, by replaying a real deployed board.", "type": "string" } }, "required": [ "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" }, "UnmentionEvent": { "properties": { "topic": { "description": "Declared and checked exactly as `MentionEvent.topic` is, and for the same\nreason: a payload that is not a reference matches no stored entry, so\nwithout the check it would remove nothing and report success.", "properties": { "title": { "default": "", "type": "string" } }, "required": [ "title" ], "type": "object" } }, "required": [ "topic" ], "type": "object" } }, "description": "The complete result available when a Topic is instantiated directly.", "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" ] }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "addComment": { "$ref": "#/$defs/AddCommentEvent", "asCell": [ "stream" ] }, "addLink": { "$ref": "#/$defs/AddLinkEvent", "asCell": [ "stream" ] }, "body": { "default": "", "type": "string" }, "bodyDraft": { "type": "string" }, "bodyUpdatedAt": { "type": [ "number", "undefined" ] }, "bodyUpdatedBy": { "anyOf": [ { "type": "undefined" }, { "$ref": "#/$defs/TopicAuthor" } ] }, "cancelEditBody": { "asCell": [ "stream", "opaque" ], "tier": "wrapper" }, "commentCount": { "default": 0, "type": [ "number", "undefined" ] }, "commentDraft": { "description": "Session-local composer/edit state. These controls belong to a direct Topic\ninstance, not the shared TopicPiece projection used by the tracker's list.", "type": "string" }, "comments": { "items": { "$ref": "#/$defs/TopicComment" }, "type": "array" }, "createdAt": { "type": "number" }, "createdBy": { "anyOf": [ { "$ref": "#/$defs/TopicAuthor" }, { "type": "undefined" } ], "default": { "kind": "person", "name": "" } }, "createdByName": { "default": "", "type": "string" }, "editingBody": { "scope": "session", "type": "boolean" }, "lastActivityAt": { "default": 0, "type": [ "number", "undefined" ] }, "linkKindDraft": { "$ref": "#/$defs/TopicLinkKind" }, "linkLabelDraft": { "type": "string" }, "linkUrlDraft": { "type": "string" }, "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[]` because these are references, and comparing them never reads\nwhat is behind them.\n\nThe cell annotation that makes them comparable belongs to the READER, not\nhere: the pivot declares its own view of this list as\n`TopicMentionSource.mentions: ComparableCell[]`, and that is what\nmakes its graph settle rather than depend on load order. A published\n`unknown[]` is what each reader annotates for itself.\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`. The body editor works on a session copy of this map, which a save\npublishes here whole, beside the prose whose tokens name its entries." }, "referencesDraft": { "$ref": "#/$defs/TopicMentionRefMap", "description": "The body draft's mention map, staged so Cancel can discard it.\n\n`cf-code-editor` writes an entry the moment a mention is inserted and\ndrops one the moment its token leaves the document, neither of them\nwaiting for Save. Pointed at the durable map while `$value` holds a\nsession draft, those writes would outlive a discarded edit: a canceled\ninsertion would leave an edge no token names, and a canceled deletion\nwould strip the destination from a token the durable body still carries.\nThe editor's own ordering assumes its two bindings share a lifetime, so\nthis gives them one." }, "saveBody": { "asCell": [ "stream", "opaque" ], "tier": "wrapper" }, "setBody": { "$ref": "#/$defs/SetBodyEvent", "asCell": [ "stream" ] }, "startEditBody": { "asCell": [ "stream", "opaque" ], "tier": "wrapper" }, "submitComment": { "asCell": [ "stream", "opaque" ], "description": "UI affordances as streams: composer submit, body edit lifecycle.", "tier": "wrapper" }, "submitLink": { "asCell": [ "stream", "opaque" ], "tier": "wrapper" }, "title": { "default": "", "description": "Defaulted rather than required, like every other field a board card\nrenders. The card list is a mapped sub-pattern, so this type reaches a\npiece holding topics written before the field existed as the argument\nschema its update is checked against, and a required property those topics\nlack refuses that update outright. `deno task pattern-vintage` is what\ncatches it, by replaying a real deployed board.", "type": "string" }, "unmention": { "$ref": "#/$defs/UnmentionEvent", "asCell": [ "stream" ] } }, "required": [ "commentDraft", "bodyDraft", "editingBody", "linkUrlDraft", "linkLabelDraft", "linkKindDraft", "referencesDraft", "submitComment", "startEditBody", "saveBody", "cancelEditBody", "submitLink", "$UI", "createdByName", "body", "comments", "links", "mentions", "references", "mentioned", "referencedBy", "addComment", "addLink", "setBody", "$NAME", "title", "createdAt", "commentCount", "lastActivityAt" ], "type": "object" } }