memory: a persistent kind for what a Mind keeps (eureka-pipeline, huginn-mind)
epiphany.pipeline.memory.v2, instance-rooted `<instance>:memory:<label>`: PipelineMemory with seven sorts (Asked, Decided, Committed, Learned, Did, Idea, Rapport), her own text, who it is about, where it was learned, whether directly, what it rests on, a salience that only ranks, and the memories a consolidating one replaces. Admission refuses a foreign instance and resolves a memory only Deferred to a follow-up (an ask taken on), Recorded, Withdrawn or Superseded by a memory. Memories have their own lineage so supersession stays within one mind. The read side selects by sort, about (multi-valued) and direct; the index carries the text; `consolidates` is a citation role. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ffb379d18d
commit
152e315e5d
23 changed files with 693 additions and 41 deletions
|
|
@ -12,7 +12,7 @@ compares file to derivation byte for byte.
|
|||
|
||||
## The pipeline catalogue
|
||||
|
||||
`index.json` is the publication manifest for every schema here: the fourteen
|
||||
`index.json` is the publication manifest for every schema here: the sixteen
|
||||
`epiphany.pipeline.*.v2` schemas, `gamecult.persona_state.v0` and the two
|
||||
`huginn.mind_*` wire schemas. The pipeline
|
||||
schemas are derived from the value types in `crates/eureka-pipeline` and checked
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
137
schemas/cultnet/epiphany.pipeline.memory.v2.schema.json
Normal file
137
schemas/cultnet/epiphany.pipeline.memory.v2.schema.json
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
{
|
||||
"$defs": {
|
||||
"Label": {
|
||||
"description": "A key label: `[A-Za-z0-9_-]{1,64}`.",
|
||||
"maxLength": 64,
|
||||
"type": "string"
|
||||
},
|
||||
"Line": {
|
||||
"description": "Text of at most 1,000 UTF-8 bytes.",
|
||||
"maxLength": 1000,
|
||||
"type": "string"
|
||||
},
|
||||
"MemorySort": {
|
||||
"enum": [
|
||||
"Asked",
|
||||
"Decided",
|
||||
"Committed",
|
||||
"Learned",
|
||||
"Did",
|
||||
"Idea",
|
||||
"Rapport"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"PipelineKind": {
|
||||
"enum": [
|
||||
"Campaign",
|
||||
"Target",
|
||||
"Question",
|
||||
"Ruling",
|
||||
"CutSpec",
|
||||
"CutReport",
|
||||
"Verdict",
|
||||
"Finding",
|
||||
"FollowUp",
|
||||
"Resolution",
|
||||
"Instance",
|
||||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"PipelineRef": {
|
||||
"description": "A reference to another document. The id is parsed as a full pipeline id of\nthe declared `kind`, so the kind and the id's kind segment cannot disagree.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/$defs/PipelineKind"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"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.memory.v2.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"description": "One thing a Mind keeps for herself, in her own mind: what she was asked,\ndecided, committed to, learned or did, an idea, or the rapport between\nher and another Mind or person. `text` is her own words. `about` names\nthe Matrix users it concerns (Minds included), `learned_in` where she\nlearned it (a room alias, a DM's room id, or `self run <label>`),\n`direct` whether it came in a direct message, and `sources` the event\nids, commits or documents it rests on; the organ fills the last three,\nnot the model. `salience_permille` ranks it and decides nothing.\n`consolidates` names the memories a consolidating memory replaces.\nInstance-rooted: the key is `<instance>:memory:<label>`.",
|
||||
"properties": {
|
||||
"about": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8,
|
||||
"type": "array"
|
||||
},
|
||||
"consolidates": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/PipelineRef"
|
||||
},
|
||||
"maxItems": 16,
|
||||
"type": "array"
|
||||
},
|
||||
"direct": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"instance": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"label": {
|
||||
"$ref": "#/$defs/Label"
|
||||
},
|
||||
"learned_in": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"salience_permille": {
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"sort": {
|
||||
"$ref": "#/$defs/MemorySort"
|
||||
},
|
||||
"sources": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8,
|
||||
"type": "array"
|
||||
},
|
||||
"text": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instance",
|
||||
"label",
|
||||
"sort",
|
||||
"text",
|
||||
"about",
|
||||
"learned_in",
|
||||
"direct",
|
||||
"sources",
|
||||
"salience_permille",
|
||||
"consolidates"
|
||||
],
|
||||
"title": "PipelineMemory",
|
||||
"type": "object"
|
||||
}
|
||||
|
|
@ -36,7 +36,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -520,6 +520,18 @@
|
|||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"MemorySort": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Asked",
|
||||
"Decided",
|
||||
"Committed",
|
||||
"Learned",
|
||||
"Did",
|
||||
"Idea",
|
||||
"Rapport"
|
||||
]
|
||||
},
|
||||
"MutationRecord": {
|
||||
"description": "One mutation a report ran: a key-safe label a verdict claim can name,\nthe exact edit, and the tree it was applied to.",
|
||||
"type": "object",
|
||||
|
|
@ -863,7 +875,7 @@
|
|||
]
|
||||
},
|
||||
"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\nfifteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"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\nsixteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
|
|
@ -1104,6 +1116,22 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "memory"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/PipelineMemory"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1302,7 +1330,71 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
]
|
||||
},
|
||||
"PipelineMemory": {
|
||||
"description": "One thing a Mind keeps for herself, in her own mind: what she was asked,\ndecided, committed to, learned or did, an idea, or the rapport between\nher and another Mind or person. `text` is her own words. `about` names\nthe Matrix users it concerns (Minds included), `learned_in` where she\nlearned it (a room alias, a DM's room id, or `self run <label>`),\n`direct` whether it came in a direct message, and `sources` the event\nids, commits or documents it rests on; the organ fills the last three,\nnot the model. `salience_permille` ranks it and decides nothing.\n`consolidates` names the memories a consolidating memory replaces.\nInstance-rooted: the key is `<instance>:memory:<label>`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"about": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8
|
||||
},
|
||||
"consolidates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PipelineRef"
|
||||
},
|
||||
"maxItems": 16
|
||||
},
|
||||
"direct": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"instance": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"label": {
|
||||
"$ref": "#/$defs/Label"
|
||||
},
|
||||
"learned_in": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"salience_permille": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"sort": {
|
||||
"$ref": "#/$defs/MemorySort"
|
||||
},
|
||||
"sources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8
|
||||
},
|
||||
"text": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instance",
|
||||
"label",
|
||||
"sort",
|
||||
"text",
|
||||
"about",
|
||||
"learned_in",
|
||||
"direct",
|
||||
"sources",
|
||||
"salience_permille",
|
||||
"consolidates"
|
||||
]
|
||||
},
|
||||
"PipelineProvenance": {
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@
|
|||
"resolved_by",
|
||||
"deferred_to",
|
||||
"documents",
|
||||
"claims"
|
||||
"claims",
|
||||
"consolidates"
|
||||
]
|
||||
},
|
||||
"ClaimOutcome": {
|
||||
|
|
@ -671,6 +672,18 @@
|
|||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"MemorySort": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Asked",
|
||||
"Decided",
|
||||
"Committed",
|
||||
"Learned",
|
||||
"Did",
|
||||
"Idea",
|
||||
"Rapport"
|
||||
]
|
||||
},
|
||||
"MindRefusal": {
|
||||
"description": "Every way a mind refuses. `Document` wraps the leaf's four (bounds,\nformats, key identity, foreign type); the rest are the organ's: store\nidentity, epoch, ownership, batch shape, references, and every cross-field\nand cross-document rule of admission.\n\nThe two sequenced kinds refuse in the same pair of shapes: an\n`OutOfSequence` when the writer's `sequence` is not the previous plus one,\nand `AlreadyResolved`/`AlreadyStewarded` when a record of that scope is\nstill in force.",
|
||||
"oneOf": [
|
||||
|
|
@ -2161,7 +2174,7 @@
|
|||
]
|
||||
},
|
||||
"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\nfifteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"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\nsixteen per-kind value documents, and the envelope is the wire's\nshape, not a document's.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
|
|
@ -2402,6 +2415,22 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "memory"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/$defs/PipelineMemory"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -3119,6 +3148,56 @@
|
|||
"kind",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "memory"
|
||||
},
|
||||
"value": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"about": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
}
|
||||
},
|
||||
"direct": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label": {
|
||||
"$ref": "#/$defs/Label"
|
||||
},
|
||||
"learned_in": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"salience_permille": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"sort": {
|
||||
"$ref": "#/$defs/MemorySort"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"sort",
|
||||
"about",
|
||||
"direct",
|
||||
"learned_in",
|
||||
"salience_permille"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"value"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -3317,7 +3396,71 @@
|
|||
"Stewardship",
|
||||
"HandOff",
|
||||
"Run",
|
||||
"Pulse"
|
||||
"Pulse",
|
||||
"Memory"
|
||||
]
|
||||
},
|
||||
"PipelineMemory": {
|
||||
"description": "One thing a Mind keeps for herself, in her own mind: what she was asked,\ndecided, committed to, learned or did, an idea, or the rapport between\nher and another Mind or person. `text` is her own words. `about` names\nthe Matrix users it concerns (Minds included), `learned_in` where she\nlearned it (a room alias, a DM's room id, or `self run <label>`),\n`direct` whether it came in a direct message, and `sources` the event\nids, commits or documents it rests on; the organ fills the last three,\nnot the model. `salience_permille` ranks it and decides nothing.\n`consolidates` names the memories a consolidating memory replaces.\nInstance-rooted: the key is `<instance>:memory:<label>`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"about": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8
|
||||
},
|
||||
"consolidates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PipelineRef"
|
||||
},
|
||||
"maxItems": 16
|
||||
},
|
||||
"direct": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"instance": {
|
||||
"$ref": "#/$defs/Slug"
|
||||
},
|
||||
"label": {
|
||||
"$ref": "#/$defs/Label"
|
||||
},
|
||||
"learned_in": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"salience_permille": {
|
||||
"type": "integer",
|
||||
"format": "uint16",
|
||||
"maximum": 65535,
|
||||
"minimum": 0
|
||||
},
|
||||
"sort": {
|
||||
"$ref": "#/$defs/MemorySort"
|
||||
},
|
||||
"sources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/Short"
|
||||
},
|
||||
"maxItems": 8
|
||||
},
|
||||
"text": {
|
||||
"$ref": "#/$defs/Line"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instance",
|
||||
"label",
|
||||
"sort",
|
||||
"text",
|
||||
"about",
|
||||
"learned_in",
|
||||
"direct",
|
||||
"sources",
|
||||
"salience_permille",
|
||||
"consolidates"
|
||||
]
|
||||
},
|
||||
"PipelinePageItems": {
|
||||
|
|
|
|||
|
|
@ -177,6 +177,17 @@
|
|||
"title": "Epiphany Pipeline Pulse v2",
|
||||
"path": "epiphany.pipeline.pulse.v2.schema.json"
|
||||
},
|
||||
{
|
||||
"schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.pipeline.memory.v2.schema.json",
|
||||
"kind": "document_payload",
|
||||
"wireContracts": [
|
||||
"cultnet.schema.v0"
|
||||
],
|
||||
"schemaVersion": "epiphany.pipeline.memory.v2",
|
||||
"documentType": "epiphany.pipeline.memory.v2",
|
||||
"title": "Epiphany Pipeline Memory v2",
|
||||
"path": "epiphany.pipeline.memory.v2.schema.json"
|
||||
},
|
||||
{
|
||||
"schemaId": "huginn.mind_request.v1",
|
||||
"kind": "wire_message",
|
||||
|
|
|
|||
Loading…
Reference in a new issue