Desk door: listing gate and account-id grammar at decode (PR B of cut-desk-feed-listing.r8; stacked on #62) (#63)
This commit is contained in:
parent
f09bc56e77
commit
db9605fbf2
55 changed files with 925 additions and 243 deletions
|
|
@ -1,5 +1,11 @@
|
|||
{
|
||||
"$defs": {
|
||||
"AccountId": {
|
||||
"description": "A Bifrost account id: a lowercase D-format UUID (`UserAccount.Id`). A Matrix id, an email or a\nhandle is never one.",
|
||||
"maxLength": 36,
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
|
||||
"type": "string"
|
||||
},
|
||||
"DeskAuthority": {
|
||||
"enum": [
|
||||
"Operator",
|
||||
|
|
@ -136,7 +142,7 @@
|
|||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"answerer": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"authority": {
|
||||
"$ref": "#/$defs/DeskAuthority"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"$defs": {
|
||||
"Line": {
|
||||
"description": "Text of at most 1,000 UTF-8 bytes.",
|
||||
"maxLength": 1000,
|
||||
"type": "string"
|
||||
},
|
||||
"Short": {
|
||||
"description": "Text of at most 200 UTF-8 bytes.",
|
||||
"maxLength": 200,
|
||||
"type": "string"
|
||||
},
|
||||
"Slug": {
|
||||
"description": "A campaign slug or key segment: label parts joined by `.`.",
|
||||
"maxLength": 64,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"$id": "https://gamecult.dev/epiphany/cultnet/epiphany.pipeline.desk_listing.v2.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"description": "A fork the Mind lists: members who are not on a call's decider list may read the question\nwhile this document is in force (unlist = a `Withdrawn` resolution on it; relist = withdraw\nthat). One per question, keyed by the question's label; the receipt says who listed it and\nwhen, `reason` why members may read it. Admitted on the Mind's own door only, never the desk's.",
|
||||
"properties": {
|
||||
"campaign": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"listed": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"reason": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"campaign",
|
||||
"listed",
|
||||
"reason"
|
||||
],
|
||||
"title": "PipelineDeskListing",
|
||||
"type": "object"
|
||||
}
|
||||
|
|
@ -178,7 +178,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -154,7 +154,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "DeskRequest",
|
||||
"description": "Every request the desk door answers. The fields are the wire names: the `mind` addressed\n(the persona and pipeline requests say `instance`; the sets are separate), the verified\n`subject` and `authority` Bifrost vouches for (door context, never body fields), and the\n`deciders` of this call (1 to 64, distinct; the Mind never stores them). Closed: a key outside\nthe set refuses the whole payload.\n\nThe reads, `Forks` and `Fork`, carry NO `authority` (CultLib `list_request` and\n`read_request` are closed and have none; one that names it is refused whole). Their `deciders`\nfeed the showability gate, and `subject` decides the view: a subject in `deciders` is a decider\nand is told the ids; any other is told counts in their place. `Forks` takes the contract's `list_request` fields flat\nbeside them (`status`, `cursor`, `limit`), each key written, `null` where absent. Bifrost\nstrips notes; see `DeskResponse` for the trust boundary. These docs and the doc of `Mind::desk_forks`/`Mind::desk_fork` are the\nreads spec.",
|
||||
"description": "Every request the desk door answers. The fields are the wire names: the `mind` addressed\n(the persona and pipeline requests say `instance`; the sets are separate), the verified\n`subject` and `authority` Bifrost vouches for (door context, never body fields), and the\n`deciders` of this call (1 to 64, distinct; the Mind never stores them). Closed: a key outside\nthe set refuses the whole payload.\n\nThe reads, `Forks` and `Fork`, carry NO `authority` (CultLib `list_request` and\n`read_request` are closed and have none; one that names it is refused whole). Their `deciders`\nfeed the showability gate, and `subject` decides the view: a subject in `deciders` is a decider,\nsees every showable fork and is told the ids; any other reads only the forks the Mind lists\n(a `desk_listing` in force) and is told counts in the ids' place. `Forks` takes the contract's `list_request` fields flat\nbeside them (`status`, `cursor`, `limit`), each key written, `null` where absent. Bifrost\nstrips notes; see `DeskResponse` for the trust boundary. These docs and the doc of `Mind::desk_forks`/`Mind::desk_fork` are the\nreads spec.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"deciders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"maxItems": 64,
|
||||
"minItems": 1,
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
"$ref": "#/$defs/ForkAnswerRequest"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
"deciders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"maxItems": 64,
|
||||
"minItems": 1,
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
]
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
"deciders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"maxItems": 64,
|
||||
"minItems": 1,
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -140,6 +140,12 @@
|
|||
}
|
||||
],
|
||||
"$defs": {
|
||||
"AccountId": {
|
||||
"description": "A Bifrost account id: a lowercase D-format UUID (`UserAccount.Id`). A Matrix id, an email or a\nhandle is never one.",
|
||||
"type": "string",
|
||||
"maxLength": 36,
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"DeskAuthority": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
@ -215,11 +221,6 @@
|
|||
"gamecult.fork.answer_request.v0"
|
||||
]
|
||||
},
|
||||
"Short": {
|
||||
"description": "Text of at most 200 UTF-8 bytes.",
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
},
|
||||
"Slug": {
|
||||
"description": "A campaign slug or key segment: label parts joined by `.`.",
|
||||
"type": "string",
|
||||
|
|
|
|||
|
|
@ -1682,7 +1682,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
]
|
||||
},
|
||||
"PipelineRefusal": {
|
||||
|
|
|
|||
|
|
@ -267,6 +267,12 @@
|
|||
}
|
||||
],
|
||||
"$defs": {
|
||||
"AccountId": {
|
||||
"description": "A Bifrost account id: a lowercase D-format UUID (`UserAccount.Id`). A Matrix id, an email or a\nhandle is never one.",
|
||||
"type": "string",
|
||||
"maxLength": 36,
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"AuthorityMap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1320,7 +1326,7 @@
|
|||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"answerer": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"authority": {
|
||||
"$ref": "#/$defs/DeskAuthority"
|
||||
|
|
@ -1390,6 +1396,26 @@
|
|||
"outcome"
|
||||
]
|
||||
},
|
||||
"PipelineDeskListing": {
|
||||
"description": "A fork the Mind lists: members who are not on a call's decider list may read the question\nwhile this document is in force (unlist = a `Withdrawn` resolution on it; relist = withdraw\nthat). One per question, keyed by the question's label; the receipt says who listed it and\nwhen, `reason` why members may read it. Admitted on the Mind's own door only, never the desk's.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"campaign": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"listed": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"reason": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"campaign",
|
||||
"listed",
|
||||
"reason"
|
||||
]
|
||||
},
|
||||
"PipelineDocument": {
|
||||
"description": "The envelope enum, adjacently tagged on the kind name: a document\non a wire is `{ kind, value }`, and `kind` is exactly what\n`PipelineKind::name()` returns, so a reader dispatches on the kind\nsegment it already knows from the key and needs no second registry\nmapping variant spellings to kinds. Adjacent rather than internal\nbecause a value is a named map of its own and an internal tag would\nhave to be merged into it; the tag stays beside the value instead.\nThis is not a published schema: `schemas/cultnet` publishes the\neighteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"oneOf": [
|
||||
|
|
@ -1728,6 +1754,22 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "desk_listing"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/PipelineDeskListing"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1995,7 +2037,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
]
|
||||
},
|
||||
"PipelineMemory": {
|
||||
|
|
|
|||
|
|
@ -179,6 +179,12 @@
|
|||
}
|
||||
],
|
||||
"$defs": {
|
||||
"AccountId": {
|
||||
"description": "A Bifrost account id: a lowercase D-format UUID (`UserAccount.Id`). A Matrix id, an email or a\nhandle is never one.",
|
||||
"type": "string",
|
||||
"maxLength": 36,
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
},
|
||||
"AdmissionFacts": {
|
||||
"description": "What admission recorded about a document when it landed: the receipt that\nwrote it, the `now` that receipt was taken at, who asked, and the\nreceipt's ordinal, which is the read side's order and its snapshot\nposition.",
|
||||
"type": "object",
|
||||
|
|
@ -430,7 +436,8 @@
|
|||
"reads",
|
||||
"day_through",
|
||||
"fork",
|
||||
"answer"
|
||||
"answer",
|
||||
"listed"
|
||||
]
|
||||
},
|
||||
"ClaimOutcome": {
|
||||
|
|
@ -2870,7 +2877,7 @@
|
|||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"answerer": {
|
||||
"$ref": "#/$defs/Short"
|
||||
"$ref": "#/$defs/AccountId"
|
||||
},
|
||||
"authority": {
|
||||
"$ref": "#/$defs/DeskAuthority"
|
||||
|
|
@ -2940,6 +2947,26 @@
|
|||
"outcome"
|
||||
]
|
||||
},
|
||||
"PipelineDeskListing": {
|
||||
"description": "A fork the Mind lists: members who are not on a call's decider list may read the question\nwhile this document is in force (unlist = a `Withdrawn` resolution on it; relist = withdraw\nthat). One per question, keyed by the question's label; the receipt says who listed it and\nwhen, `reason` why members may read it. Admitted on the Mind's own door only, never the desk's.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"campaign": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"listed": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"reason": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"campaign",
|
||||
"listed",
|
||||
"reason"
|
||||
]
|
||||
},
|
||||
"PipelineDocument": {
|
||||
"description": "The envelope enum, adjacently tagged on the kind name: a document\non a wire is `{ kind, value }`, and `kind` is exactly what\n`PipelineKind::name()` returns, so a reader dispatches on the kind\nsegment it already knows from the key and needs no second registry\nmapping variant spellings to kinds. Adjacent rather than internal\nbecause a value is a named map of its own and an internal tag would\nhave to be merged into it; the tag stays beside the value instead.\nThis is not a published schema: `schemas/cultnet` publishes the\neighteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"oneOf": [
|
||||
|
|
@ -3278,6 +3305,22 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "desk_listing"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/PipelineDeskListing"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -4251,6 +4294,31 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The question this listing lets members read.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "desk_listing"
|
||||
},
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"listed": {
|
||||
"$ref": "#/$defs/Short"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"listed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -4518,7 +4586,8 @@
|
|||
"Idea",
|
||||
"Reply",
|
||||
"Thought",
|
||||
"DeskAnswer"
|
||||
"DeskAnswer",
|
||||
"DeskListing"
|
||||
]
|
||||
},
|
||||
"PipelineMemory": {
|
||||
|
|
|
|||
|
|
@ -243,6 +243,17 @@
|
|||
"title": "Epiphany Pipeline DeskAnswer v2",
|
||||
"path": "epiphany.pipeline.desk_answer.v2.schema.json"
|
||||
},
|
||||
{
|
||||
"schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.pipeline.desk_listing.v2.schema.json",
|
||||
"kind": "document_payload",
|
||||
"wireContracts": [
|
||||
"cultnet.schema.v0"
|
||||
],
|
||||
"schemaVersion": "epiphany.pipeline.desk_listing.v2",
|
||||
"documentType": "epiphany.pipeline.desk_listing.v2",
|
||||
"title": "Epiphany Pipeline DeskListing v2",
|
||||
"path": "epiphany.pipeline.desk_listing.v2.schema.json"
|
||||
},
|
||||
{
|
||||
"schemaId": "huginn.mind_request.v1",
|
||||
"kind": "wire_message",
|
||||
|
|
|
|||
Loading…
Reference in a new issue