The catalogue's tests of the retired delivery verbs go with them. Builds: design 47 G §203, §309, §365, §302, §337, §336, §389, §390, §83, §307, §308, §260, §349, §375 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
866 lines
22 KiB
JSON
866 lines
22 KiB
JSON
{
|
|
"format": 1,
|
|
"seat": "mesh-broker",
|
|
"scope": "mesh",
|
|
"grain": "whole",
|
|
"domain": "Core",
|
|
"decision": "novox/hq ADR 0079",
|
|
"delivers": "mesh-bus",
|
|
"description": "The mesh's bus, and the bus state modules ask of it in requires (design 25 § 12). create, apply, recreate and drop are granted to the bus module's own credential alone.",
|
|
"verbs": [
|
|
{
|
|
"name": "list",
|
|
"description": "Every entry the bus module created, its template, its settings and its fill against its cap.",
|
|
"callers": [
|
|
"invokers"
|
|
],
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "one module (optional)"
|
|
}
|
|
}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"description": "every entry"
|
|
}
|
|
},
|
|
"required": [
|
|
"entries"
|
|
]
|
|
},
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "show",
|
|
"description": "One entry, its template, settings and fill.",
|
|
"callers": [
|
|
"invokers"
|
|
],
|
|
"input": {
|
|
"$ref": "#/defs/Named"
|
|
},
|
|
"answer": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "check",
|
|
"description": "Compare what the bus holds with what was asked, entry by entry; a difference that only grows is said as such.",
|
|
"callers": [
|
|
"invokers"
|
|
],
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "one module (optional)"
|
|
}
|
|
}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"differences": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "the entry"
|
|
},
|
|
"asked": {
|
|
"type": "object",
|
|
"description": "asked"
|
|
},
|
|
"held": {
|
|
"type": "object",
|
|
"description": "held"
|
|
},
|
|
"grows": {
|
|
"type": "boolean",
|
|
"description": "the difference only grows: apply may act on it"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name"
|
|
]
|
|
},
|
|
"description": "every difference"
|
|
}
|
|
},
|
|
"required": [
|
|
"differences"
|
|
]
|
|
},
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "orphans",
|
|
"description": "Entries the bus holds that no manifest asks for; never one whose manifest the judge refused or outgrew, nor one of the foundation's old sections.",
|
|
"callers": [
|
|
"invokers"
|
|
],
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"description": "no arguments"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"description": "every orphan"
|
|
}
|
|
},
|
|
"required": [
|
|
"entries"
|
|
]
|
|
},
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "create",
|
|
"description": "Create one entry now.",
|
|
"callers": [
|
|
"module:nats"
|
|
],
|
|
"input": {
|
|
"$ref": "#/defs/Entry"
|
|
},
|
|
"answer": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"optional": true,
|
|
"class": "act"
|
|
},
|
|
{
|
|
"name": "apply",
|
|
"description": "Apply a difference that only grows: a larger cap, a longer age.",
|
|
"callers": [
|
|
"module:nats"
|
|
],
|
|
"input": {
|
|
"$ref": "#/defs/Named"
|
|
},
|
|
"answer": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"optional": true,
|
|
"class": "act"
|
|
},
|
|
{
|
|
"name": "recreate",
|
|
"description": "Rebuild an entry whose settings differ in a way that cannot grow, from its data where the storage type allows, after a stream snapshot.",
|
|
"callers": [
|
|
"module:nats"
|
|
],
|
|
"input": {
|
|
"$ref": "#/defs/Warranted"
|
|
},
|
|
"answer": {
|
|
"$ref": "#/defs/Held"
|
|
},
|
|
"optional": true,
|
|
"class": "warrant"
|
|
},
|
|
{
|
|
"name": "drop",
|
|
"description": "Remove one orphan, after a stream snapshot.",
|
|
"callers": [
|
|
"module:nats"
|
|
],
|
|
"input": {
|
|
"$ref": "#/defs/Warranted"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dropped": {
|
|
"type": "boolean",
|
|
"description": "it is gone"
|
|
},
|
|
"snapshot": {
|
|
"type": "string",
|
|
"description": "the snapshot taken first"
|
|
}
|
|
},
|
|
"required": [
|
|
"dropped"
|
|
]
|
|
},
|
|
"optional": true,
|
|
"class": "warrant"
|
|
},
|
|
{
|
|
"name": "snapshot-kept",
|
|
"description": "Take the restore point of one module's kept data on the bus: the data whole and the position of each durable consumer the module reads with, keyed by the module, the kept data, its form and the fingerprint it is taken before (design 47 *A module's kept data on the bus*).",
|
|
"callers": [
|
|
"holder:node-backup@same-node"
|
|
],
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module",
|
|
"minLength": 1
|
|
},
|
|
"kept": {
|
|
"type": "string",
|
|
"description": "the kept data, its local name in the module's manifest",
|
|
"minLength": 1
|
|
},
|
|
"form": {
|
|
"type": "integer",
|
|
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
|
|
},
|
|
"fingerprint": {
|
|
"type": "string",
|
|
"description": "the fingerprint the restore point is taken before",
|
|
"minLength": 1
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why it is taken"
|
|
},
|
|
"catch-up": {
|
|
"type": "object",
|
|
"description": "the catch-up tool the newer manifest declares beside the kept data and its arguments whole, recorded in the restore point (design 47 G 299, 406)",
|
|
"properties": {
|
|
"tool": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"tool"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"kept",
|
|
"form",
|
|
"fingerprint"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"point": {
|
|
"$ref": "#/defs/KeptPoint"
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"description": "why it failed; set alone"
|
|
}
|
|
},
|
|
"description": "the restore point taken, or the error"
|
|
},
|
|
"class": "act"
|
|
},
|
|
{
|
|
"name": "restore-kept",
|
|
"description": "Restore one module's kept data from its restore point beside the live data, never over it: the live data is set aside under a name of its own and the consumers' positions are set back with it. With aside-only it sets the live data aside and restores nothing; with discard-aside, naming data set aside, it removes that data and restores nothing (design 47 G 405).",
|
|
"callers": [
|
|
"holder:node-backup@same-node"
|
|
],
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module",
|
|
"minLength": 1
|
|
},
|
|
"kept": {
|
|
"type": "string",
|
|
"description": "the kept data, its local name in the module's manifest",
|
|
"minLength": 1
|
|
},
|
|
"form": {
|
|
"type": "integer",
|
|
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
|
|
},
|
|
"fingerprint": {
|
|
"type": "string",
|
|
"description": "the fingerprint the restore point is taken before",
|
|
"minLength": 1
|
|
},
|
|
"snapshot": {
|
|
"type": "string",
|
|
"description": "the restore point's name; not with aside-only or discard-aside",
|
|
"minLength": 1
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why"
|
|
},
|
|
"aside-only": {
|
|
"type": "boolean",
|
|
"description": "set the live data aside and restore nothing"
|
|
},
|
|
"discard-aside": {
|
|
"type": "string",
|
|
"description": "the name of data set aside: remove it and restore nothing"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"kept",
|
|
"form",
|
|
"fingerprint"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"restored": {
|
|
"type": "boolean",
|
|
"description": "the restore point is the live data now"
|
|
},
|
|
"aside": {
|
|
"$ref": "#/defs/Aside"
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"description": "why it failed; set alone"
|
|
}
|
|
},
|
|
"description": "what was restored and what was set aside, or the error"
|
|
},
|
|
"class": "act"
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "created",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "refused",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "drifted",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "drift-cleared",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "full",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "full-cleared",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "orphaned",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "recreated",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
},
|
|
{
|
|
"name": "dropped",
|
|
"body": {
|
|
"$ref": "#/defs/Said"
|
|
}
|
|
}
|
|
],
|
|
"family": {
|
|
"name": "mesh-broker.events",
|
|
"max-age-days": 7
|
|
},
|
|
"provisions": [
|
|
{
|
|
"name": "bus-state",
|
|
"form": {
|
|
"$ref": "#/defs/Binding"
|
|
}
|
|
}
|
|
],
|
|
"defs": {
|
|
"Entry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module asking it"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "its local name in the module's manifest"
|
|
},
|
|
"storage-type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"stream",
|
|
"key-value",
|
|
"object-store",
|
|
"ledger"
|
|
],
|
|
"description": "how the bus keeps it"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"enum": [
|
|
"state",
|
|
"events",
|
|
"work-queue",
|
|
"log",
|
|
"objects",
|
|
"ledger",
|
|
""
|
|
],
|
|
"description": "its template; empty for a configuration of its own"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "the template's options the module set, within their bounds"
|
|
},
|
|
"configuration": {
|
|
"type": "object",
|
|
"description": "its own configuration, where no template fits"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name",
|
|
"storage-type"
|
|
],
|
|
"description": "one piece of bus state as a manifest asks it"
|
|
},
|
|
"Fill": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer",
|
|
"description": "messages, keys or objects held"
|
|
},
|
|
"bytes": {
|
|
"type": "integer",
|
|
"description": "bytes held"
|
|
},
|
|
"cap": {
|
|
"type": "integer",
|
|
"description": "its cap in bytes"
|
|
}
|
|
},
|
|
"required": [
|
|
"count",
|
|
"bytes",
|
|
"cap"
|
|
]
|
|
},
|
|
"Held": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module asking it"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "its local name in the module's manifest"
|
|
},
|
|
"storage-type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"stream",
|
|
"key-value",
|
|
"object-store",
|
|
"ledger"
|
|
],
|
|
"description": "how the bus keeps it"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"enum": [
|
|
"state",
|
|
"events",
|
|
"work-queue",
|
|
"log",
|
|
"objects",
|
|
"ledger",
|
|
""
|
|
],
|
|
"description": "its template; empty for a configuration of its own"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "the template's options the module set, within their bounds"
|
|
},
|
|
"configuration": {
|
|
"type": "object",
|
|
"description": "its own configuration, where no template fits"
|
|
},
|
|
"bus-name": {
|
|
"type": "string",
|
|
"description": "its name on the bus, <module>_<local name>"
|
|
},
|
|
"settings": {
|
|
"type": "object",
|
|
"description": "the settings the bus holds"
|
|
},
|
|
"fill": {
|
|
"$ref": "#/defs/Fill"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"enum": [
|
|
"held",
|
|
"refused",
|
|
"waiting",
|
|
"drifted",
|
|
"full",
|
|
"orphaned"
|
|
],
|
|
"description": "the entry's state: held as asked, refused, waiting to be made, drifted from what is asked, full, or orphaned (no manifest asks it)"
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why it is in its state, in plain words; empty when held as asked"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name",
|
|
"storage-type",
|
|
"bus-name"
|
|
],
|
|
"description": "one entry as the bus holds it"
|
|
},
|
|
"Said": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module asking it"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "its local name in the module's manifest"
|
|
},
|
|
"storage-type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"stream",
|
|
"key-value",
|
|
"object-store",
|
|
"ledger"
|
|
],
|
|
"description": "how the bus keeps it"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"enum": [
|
|
"state",
|
|
"events",
|
|
"work-queue",
|
|
"log",
|
|
"objects",
|
|
"ledger",
|
|
""
|
|
],
|
|
"description": "its template; empty for a configuration of its own"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "the template's options the module set, within their bounds"
|
|
},
|
|
"configuration": {
|
|
"type": "object",
|
|
"description": "its own configuration, where no template fits"
|
|
},
|
|
"bus-name": {
|
|
"type": "string",
|
|
"description": "its name on the bus"
|
|
},
|
|
"asked": {
|
|
"type": "object",
|
|
"description": "the settings asked"
|
|
},
|
|
"held": {
|
|
"type": "object",
|
|
"description": "the settings held"
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why: a refusal's cause, a drift's difference, a drop's or recreate's reason"
|
|
},
|
|
"fill": {
|
|
"$ref": "#/defs/Fill"
|
|
},
|
|
"snapshot": {
|
|
"type": "string",
|
|
"description": "the stream snapshot taken before a recreate or drop"
|
|
},
|
|
"binding": {
|
|
"$ref": "#/defs/Binding"
|
|
},
|
|
"revision": {
|
|
"type": "integer",
|
|
"description": "the indexer's revision of the verdict the bus module acted on (ADR 0622 §2), so a reader orders what it hears"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name",
|
|
"bus-name"
|
|
],
|
|
"description": "the body of every event of the seat"
|
|
},
|
|
"Named": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "the entry's local name"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name"
|
|
]
|
|
},
|
|
"Warranted": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module"
|
|
},
|
|
"local-name": {
|
|
"type": "string",
|
|
"description": "the entry's local name"
|
|
},
|
|
"warrant": {
|
|
"type": "string",
|
|
"description": "the operator's warrant, as the operator channel decided it (ADR 0259 §6)"
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why, kept in the record"
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"local-name",
|
|
"warrant",
|
|
"why"
|
|
]
|
|
},
|
|
"Binding": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bus-name": {
|
|
"type": "string",
|
|
"description": "the entry's name on the bus"
|
|
},
|
|
"storage-type": {
|
|
"type": "string",
|
|
"description": "how the bus keeps it"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"description": "its template"
|
|
},
|
|
"subjects": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "its subjects, for a stream"
|
|
},
|
|
"objects": {
|
|
"type": "string",
|
|
"description": "the bus name of the state's <state>-objects, where its large values go (design 47 G 58, 399)"
|
|
}
|
|
},
|
|
"required": [
|
|
"bus-name",
|
|
"storage-type"
|
|
],
|
|
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7)"
|
|
},
|
|
"KeptPoint": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module",
|
|
"minLength": 1
|
|
},
|
|
"kept": {
|
|
"type": "string",
|
|
"description": "the kept data, its local name in the module's manifest",
|
|
"minLength": 1
|
|
},
|
|
"form": {
|
|
"type": "integer",
|
|
"description": "its form, the number the holder raises when it changes how it writes it (0 when undeclared)"
|
|
},
|
|
"fingerprint": {
|
|
"type": "string",
|
|
"description": "the fingerprint the restore point is taken before",
|
|
"minLength": 1
|
|
},
|
|
"snapshot": {
|
|
"type": "string",
|
|
"description": "the restore point's name"
|
|
},
|
|
"consumers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"stream": {
|
|
"type": "string",
|
|
"description": "the stream"
|
|
},
|
|
"consumer": {
|
|
"type": "string",
|
|
"description": "the durable consumer"
|
|
},
|
|
"sequence": {
|
|
"type": "integer",
|
|
"description": "its acknowledged position"
|
|
}
|
|
},
|
|
"required": [
|
|
"stream",
|
|
"consumer",
|
|
"sequence"
|
|
]
|
|
},
|
|
"description": "each durable consumer the module reads with, and its position"
|
|
},
|
|
"size": {
|
|
"type": "integer",
|
|
"description": "its size in bytes"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when it was taken",
|
|
"format": "date-time"
|
|
},
|
|
"catch-up": {
|
|
"type": "object",
|
|
"description": "the catch-up tool and its arguments the restore point records (design 47 G 406)",
|
|
"properties": {
|
|
"tool": {
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"tool"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"kept",
|
|
"form",
|
|
"fingerprint",
|
|
"snapshot"
|
|
],
|
|
"description": "a restore point of one module's kept data on the bus, whole, with its consumers' positions"
|
|
},
|
|
"Aside": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "its id, for discard-aside"
|
|
},
|
|
"module": {
|
|
"type": "string",
|
|
"description": "the module"
|
|
},
|
|
"kept": {
|
|
"type": "string",
|
|
"description": "the kept data"
|
|
},
|
|
"form": {
|
|
"type": "integer",
|
|
"description": "the form it held"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "the name it is kept under on the bus"
|
|
},
|
|
"size": {
|
|
"type": "integer",
|
|
"description": "its size in bytes"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when it was set aside",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"module",
|
|
"kept",
|
|
"name"
|
|
],
|
|
"description": "live kept data a restore set aside, never removed but by discard-aside"
|
|
}
|
|
}
|
|
}
|