{ "argumentSchema": { "$defs": { "Box": { "additionalProperties": { "$ref": "#/$defs/BoxEntry" }, "properties": {}, "type": "object" }, "BoxEntry": { "properties": { "instance": { "type": "string" }, "stance": { "$ref": "#/$defs/Stance" }, "terms": { "type": "string" } }, "required": [ "instance", "terms", "stance" ], "type": "object" }, "CustodyTerms": { "properties": { "answers": { "items": { "type": "string" }, "type": "array" }, "question": { "type": "string" }, "seats": { "description": "A cell per seat, whose stored label attests the seat's member.", "items": { "type": "unknown" }, "type": "array" }, "stanceSchema": { "properties": { "additionalProperties": { "type": "boolean" }, "properties": { "properties": { "ratings": { "properties": { "items": { "properties": { "enum": { "items": { "type": "string" }, "type": "array" } }, "required": [ "enum" ], "type": "object" }, "maxItems": { "enum": [ 3 ], "type": "number" }, "minItems": { "enum": [ 3 ], "type": "number" }, "type": { "type": "string" } }, "required": [ "type", "items", "minItems", "maxItems" ], "type": "object" } }, "required": [ "ratings" ], "type": "object" }, "required": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "type", "properties", "required", "additionalProperties" ], "type": "object" } }, "required": [ "question", "answers", "seats", "stanceSchema" ], "type": "object" }, "DeclaredPolicy": { "ifc": { "confidentiality": [ { "moduleIdentity": "IfTg3B3xLEbDEpPg1mPYQPWoJ7JTUAPUnwAcqqjE6iI", "policyDigest": "hvZ85r9HttVyBIsm8etfhLy35-WVnaqId68IMbud0ng", "policyRefKind": "module", "subject": { "__ctOwningSpace": true }, "symbol": "custodyRules", "type": "https://commonfabric.org/cfc/atom/Policy" } ], "writeAuthorizedBy": { "__ctWriterIdentityOf": { "file": "/packages/patterns/cfc-exchange-rules/custody-answer-room.tsx", "moduleIdentity": "IfTg3B3xLEbDEpPg1mPYQPWoJ7JTUAPUnwAcqqjE6iI", "path": [ "propose" ] } } }, "type": "boolean" }, "ProposedTerms": { "$ref": "#/$defs/CustodyTerms", "ifc": { "writeAuthorizedBy": { "__ctWriterIdentityOf": { "file": "/packages/patterns/cfc-exchange-rules/custody-answer-room.tsx", "moduleIdentity": "IfTg3B3xLEbDEpPg1mPYQPWoJ7JTUAPUnwAcqqjE6iI", "path": [ "propose" ] } } } }, "Rating": { "enum": [ "no", "maybe", "yes" ] }, "Stance": { "properties": { "ratings": { "items": { "$ref": "#/$defs/Rating" }, "type": "array" } }, "required": [ "ratings" ], "type": "object" } }, "properties": { "box": { "$ref": "#/$defs/Box", "asCell": [ "cell" ], "default": {}, "description": "Receives a link to the instance's box, which the seal writes in the\ntransaction that writes a member's entry. It declares no label of its\nown: every entry of the box already carries the room's policy, and a\nread through the link carries it.\n\nTODO(custody-box-link): declaring `Record>` here\nis refused. Repro: give `box` that type and seal into the room, as\n`integration/cfc-custody-projector.test.ts` does; the seal's commit\npreparation crashes with `type changed incompatibly at /box: [\"object\"]\n-> [\"array\"]`, as the schema merge sets the input's record schema\nagainst an array schema." }, "policy": { "$ref": "#/$defs/DeclaredPolicy", "asCell": [ "cell" ], "description": "Declared with the room's policy, so that once written its label carries\nthe policy's reference, with this room as its subject, for the host to\nread. It has no default: `propose` writes it." }, "terms": { "$ref": "#/$defs/ProposedTerms", "asCell": [ "cell" ], "description": "Absent until `propose` writes it. It has no default: on\n`CustodyTerms | null`, the writer claim would sit on the object branch\nalone and not refuse a write of `null`, which would let other code clear\nthe terms for `propose` to write again." } }, "required": [ "terms", "policy", "box" ], "type": "object" }, "pattern": "cfc-exchange-rules/custody-answer-room.tsx", "resultSchema": { "$defs": { "Box": { "additionalProperties": { "$ref": "#/$defs/BoxEntry" }, "properties": {}, "type": "object" }, "BoxEntry": { "properties": { "instance": { "type": "string" }, "stance": { "$ref": "#/$defs/Stance" }, "terms": { "type": "string" } }, "required": [ "instance", "terms", "stance" ], "type": "object" }, "CustodyTerms": { "properties": { "answers": { "items": { "type": "string" }, "type": "array" }, "question": { "type": "string" }, "seats": { "description": "A cell per seat, whose stored label attests the seat's member.", "items": { "type": "unknown" }, "type": "array" }, "stanceSchema": { "properties": { "additionalProperties": { "type": "boolean" }, "properties": { "properties": { "ratings": { "properties": { "items": { "properties": { "enum": { "items": { "type": "string" }, "type": "array" } }, "required": [ "enum" ], "type": "object" }, "maxItems": { "enum": [ 3 ], "type": "number" }, "minItems": { "enum": [ 3 ], "type": "number" }, "type": { "type": "string" } }, "required": [ "type", "items", "minItems", "maxItems" ], "type": "object" } }, "required": [ "ratings" ], "type": "object" }, "required": { "items": { "type": "string" }, "type": "array" }, "type": { "type": "string" } }, "required": [ "type", "properties", "required", "additionalProperties" ], "type": "object" } }, "required": [ "question", "answers", "seats", "stanceSchema" ], "type": "object" }, "Rating": { "enum": [ "no", "maybe", "yes" ] }, "Stance": { "properties": { "ratings": { "items": { "$ref": "#/$defs/Rating" }, "type": "array" } }, "required": [ "ratings" ], "type": "object" } }, "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "box": { "$ref": "#/$defs/Box" }, "choice": { "description": "The projected answer, which moves with what the projector reads. It is\nreleased to the seal alone, which publishes it; no member reads it, and\nthe room shows the answer the seal published instead.", "type": "string" }, "policy": { "ifc": { "confidentiality": [ { "moduleIdentity": "IfTg3B3xLEbDEpPg1mPYQPWoJ7JTUAPUnwAcqqjE6iI", "policyDigest": "hvZ85r9HttVyBIsm8etfhLy35-WVnaqId68IMbud0ng", "policyRefKind": "module", "subject": { "__ctOwningSpace": true }, "symbol": "custodyRules", "type": "https://commonfabric.org/cfc/atom/Policy" } ] }, "type": "boolean" }, "propose": { "asCell": [ "stream" ], "properties": { "seats": { "items": { "type": "unknown" }, "type": "array" } }, "required": [ "seats" ], "type": "object" }, "rating": { "description": "One member's sealed rating, which no rule releases.", "type": "string" }, "terms": { "$ref": "#/$defs/CustodyTerms" } }, "required": [ "policy", "box", "choice", "rating", "propose", "$NAME", "$UI" ], "type": "object" } }