mesh-sdk: refuse every contracts module and domain SDK, module names in the shared packages; the bootstrap equals its contracts' files, one row per seat (ADR 0635 §1, ADR 0636 §8; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
Vendored
+647
@@ -0,0 +1,647 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-conditions",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "What is wrong with the mesh now (ADR 0564): the open conditions raised from the observers' findings and cleared when a finding goes.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "conditions",
|
||||
"description": "What is wrong with the mesh now: every open condition, urgent first, then oldest, raised from the observers' findings (the watchman, the self-check, the healers, the assigner) and cleared when the finding goes, never by hand. Given a key, that one whole with its evidence; with history, every transition lately.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"days": {
|
||||
"description": "with history: how many days back (default 7, at most 90)",
|
||||
"type": "string"
|
||||
},
|
||||
"history": {
|
||||
"description": "\"true\": every raising, change, silence and clearing lately, oldest first",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "a condition's key: that one whole; with history, only its transitions",
|
||||
"type": "string"
|
||||
},
|
||||
"machine": {
|
||||
"description": "only those about this machine",
|
||||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"description": "only this scope: machine, plan, call, build, merge, provider, seat, bus, core, probe, mesh, delivery or module",
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"description": "only urgent, or only warning",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the open conditions, or one whole, or the history"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "silence",
|
||||
"description": "Stop one condition's messages for a while, a hand act with why: it stays open and in status, and the silence is kept as its transition in history.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"cause": {
|
||||
"description": "the cause in a word (the condition's kind when absent)",
|
||||
"type": "string"
|
||||
},
|
||||
"for": {
|
||||
"description": "how long: 30m, 4h, 2d; at most 7d",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "the condition's key",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "why, required and recorded",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"for",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the condition now silenced"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resync",
|
||||
"description": "Read every observer's findings again and raise and clear what differs from the open conditions: the recovery of a keeper that missed a change.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was raised and cleared again"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "condition-raised",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "condition-changed",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "condition-cleared",
|
||||
"body": {
|
||||
"$ref": "#/defs/ConditionEvent"
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-conditions.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "conditions",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one open condition",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"raised": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"last-observed": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"first": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"reopened": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"what": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"silenced": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"epoch": {
|
||||
"type": "integer"
|
||||
},
|
||||
"looks-unread": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"kind",
|
||||
"subject",
|
||||
"severity",
|
||||
"raised",
|
||||
"last-observed"
|
||||
]
|
||||
},
|
||||
"description": "one open condition, without its looks it keeps from its finding"
|
||||
}
|
||||
],
|
||||
"description": "the open conditions the keeper holds, one key each"
|
||||
},
|
||||
{
|
||||
"name": "findings",
|
||||
"template": "state",
|
||||
"writer": "caller",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one thing an observer sees wrong now",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "layout version, 1"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "the key's last part when it is not the kind"
|
||||
},
|
||||
"observer": {
|
||||
"type": "string",
|
||||
"description": "the module that wrote it"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "what of its own saw it last"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"key",
|
||||
"kind",
|
||||
"subject",
|
||||
"severity",
|
||||
"summary",
|
||||
"source",
|
||||
"observer",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"description": "one finding of the observer that wrote it"
|
||||
}
|
||||
],
|
||||
"description": "every observer's findings, one key per finding; a key written raises or changes the condition of the same key, a key deleted clears it"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Subject": {
|
||||
"type": "object",
|
||||
"description": "what the condition is about",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"description": "machine, plan, call, build, merge, provider, seat, bus, core, probe, mesh, delivery or module"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "its id within the scope"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string",
|
||||
"description": "the machine it concerns, when there is one"
|
||||
},
|
||||
"also": {
|
||||
"type": "array",
|
||||
"description": "the other machines it concerns",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"Evidence": {
|
||||
"type": "object",
|
||||
"description": "one observation, as it was said",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"said": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"at",
|
||||
"said"
|
||||
]
|
||||
},
|
||||
"Action": {
|
||||
"type": "object",
|
||||
"description": "one answer the operator may give from a notification",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string",
|
||||
"description": "the seat verb the operator channel calls"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"acknowledge",
|
||||
"approve"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"ConditionEvent": {
|
||||
"type": "object",
|
||||
"description": "a condition and what changed",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "scope.id.token"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "#/defs/Subject"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Action"
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "newest first, at most 10",
|
||||
"items": {
|
||||
"$ref": "#/defs/Evidence"
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "the row, probe or event that saw it"
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"description": "self, operator, agent or healer:<name>"
|
||||
},
|
||||
"raised": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"last-observed": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"first": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"reopened": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"observations": {
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"what": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"silenced": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"until": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"epoch": {
|
||||
"type": "integer"
|
||||
},
|
||||
"looks-unread": {
|
||||
"type": "string"
|
||||
},
|
||||
"event": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"raised",
|
||||
"reopened",
|
||||
"severity",
|
||||
"resolver",
|
||||
"silenced",
|
||||
"silence-ended",
|
||||
"cleared",
|
||||
"words"
|
||||
]
|
||||
},
|
||||
"was": {
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cleared": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"show": {
|
||||
"type": "string",
|
||||
"description": "the tool call that shows it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"event",
|
||||
"at",
|
||||
"change"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+321
@@ -0,0 +1,321 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-hand-acts",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0565, ADR 0634, ADR 0635",
|
||||
"description": "Acts done by hand, recorded with who, why and cause (ADR 0565): the log every module records through.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "hand-act",
|
||||
"description": "Record one act done by hand: what, why, its cause in a word or a condition's kind (the word a second act for the same reason uses) and the condition it addresses. Who did it is the caller the runtime proves, never said by the caller. Said as act-recorded.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"cause": {
|
||||
"description": "the cause in a word, or a condition's kind",
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"description": "the key of the condition it addressed, if any (optional)",
|
||||
"type": "string"
|
||||
},
|
||||
"verb": {
|
||||
"description": "the act's verb in the log: a repair when absent, `hand-act drill` for a drill, or a recorder's own",
|
||||
"type": "string"
|
||||
},
|
||||
"what": {
|
||||
"description": "what was done, in a line",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "why it had to be done by hand",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"what",
|
||||
"why"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the act recorded"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "hand-acts",
|
||||
"description": "What was done by hand lately, over this log and the controller's: who, why and the cause of each, and the causes recorded twice within a fortnight (a healer is wanted).",
|
||||
"input": {
|
||||
"properties": {
|
||||
"cause": {
|
||||
"description": "only this cause",
|
||||
"type": "string"
|
||||
},
|
||||
"days": {
|
||||
"description": "how many days back (default 14)",
|
||||
"type": "string"
|
||||
},
|
||||
"warrants": {
|
||||
"description": "\"true\": every warrant recorded",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"who": {
|
||||
"description": "only acts whose who contains this",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the acts lately"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "warranted",
|
||||
"description": "Record what a module did on the operator's warrant: who chose, through which channel, with which proofs and which answer read from the router's own record of that module's ask, never from the caller; once per ask. Refused for an ask still open, ended without a choice, or not that module's.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"ask": {
|
||||
"description": "its ask's id",
|
||||
"type": "string"
|
||||
},
|
||||
"asker": {
|
||||
"description": "the module that asked",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"asker",
|
||||
"ask"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the warrant recorded"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "act-recorded",
|
||||
"body": {
|
||||
"$ref": "#/defs/Act"
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "mesh-hand-acts.events",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "acts",
|
||||
"template": "log",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<id>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one act done by hand",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "the caller the runtime proved"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "what the act was read to be from what it did"
|
||||
},
|
||||
"carried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"via": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"proofs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requested-by": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"log": {
|
||||
"type": "string",
|
||||
"description": "which log holds it, set when it is read"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"at",
|
||||
"by",
|
||||
"verb",
|
||||
"why",
|
||||
"cause"
|
||||
]
|
||||
},
|
||||
"description": "one act"
|
||||
}
|
||||
],
|
||||
"max-age-days": 400,
|
||||
"description": "every act, kept 400 days"
|
||||
},
|
||||
{
|
||||
"name": "warrants",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<asker>.<ask>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "what a module did on the operator's warrant, made once per ask",
|
||||
"properties": {
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string"
|
||||
},
|
||||
"option": {
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ask",
|
||||
"asker"
|
||||
]
|
||||
},
|
||||
"description": "one warrant"
|
||||
}
|
||||
],
|
||||
"description": "warrants recorded, one key per asker and ask"
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Act": {
|
||||
"type": "object",
|
||||
"description": "one act done by hand",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"by": {
|
||||
"type": "string",
|
||||
"description": "the caller the runtime proved"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"cause": {
|
||||
"type": "string"
|
||||
},
|
||||
"condition": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "what the act was read to be from what it did"
|
||||
},
|
||||
"carried": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"via": {
|
||||
"type": "string"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string"
|
||||
},
|
||||
"proofs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requested-by": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string"
|
||||
},
|
||||
"log": {
|
||||
"type": "string",
|
||||
"description": "which log holds it, set when it is read"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"at",
|
||||
"by",
|
||||
"verb",
|
||||
"why",
|
||||
"cause"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+243
@@ -0,0 +1,243 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-watchdogs",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Health and repair",
|
||||
"decision": "novox/hq ADR 0564, ADR 0634, ADR 0635",
|
||||
"description": "The watchman's seat (ADR 0564, ADR 0433): signals that expire unless renewed, what stopped moving, who is present, the dead letters.",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "signals",
|
||||
"description": "Every watchdog of the signals table the watchman keeps, each a key that expires unless its signal renews it: its row, what renews it, its bound, the age of its newest signal, and the finding its expiry wrote.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"row": {
|
||||
"description": "one row, e.g. S1",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the watchdog table"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stuck",
|
||||
"description": "Every want, build or step the watchman says stopped moving past its bound, with since when and the words of its finding.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"machine": {
|
||||
"description": "only those on this machine",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what stopped moving"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "presence",
|
||||
"description": "Every machine and tool runner the watchman sees connected, with its last word, and those it says silent; a machine that said it sleeps is shown as sleeping, not silent.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"machine": {
|
||||
"description": "one machine",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "who is connected and who is silent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dead-letters",
|
||||
"description": "Every message a consumer on the bus gave up on, kept in DEAD_LETTERS: whose consumer, the subject, how often it was handed over and when it was given up, newest first. With id: that one whole. With deliver or drop, a hand act with why.",
|
||||
"input": {
|
||||
"properties": {
|
||||
"cause": {
|
||||
"description": "with deliver or drop: the cause in a word (dead-letter when absent)",
|
||||
"type": "string"
|
||||
},
|
||||
"consumer": {
|
||||
"description": "a consumer's name, or <stream>.<consumer>: only what that one gave up on",
|
||||
"type": "string"
|
||||
},
|
||||
"deliver": {
|
||||
"description": "a dead letter's id: deliver it again to the consumer that gave it up (needs why)",
|
||||
"type": "string"
|
||||
},
|
||||
"drop": {
|
||||
"description": "a dead letter's id: drop it for good (needs why)",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "a dead letter's id, as the list gives it: that one whole, with its message",
|
||||
"type": "string"
|
||||
},
|
||||
"limit": {
|
||||
"description": "how many to list, newest first (default 50); only when listing",
|
||||
"type": "string"
|
||||
},
|
||||
"why": {
|
||||
"description": "with deliver or drop: why, required and recorded",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the dead letters, one whole, or the act done"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resync",
|
||||
"description": "Rebuild presence from the bus's connections, and the pulses and findings from the keys the watchman watches, and take every dead-letter notice waiting: the recovery of a watchman that missed a change.",
|
||||
"input": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was rebuilt"
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "presence",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "whether a node is online",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"online": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"online"
|
||||
]
|
||||
},
|
||||
"description": "a node"
|
||||
},
|
||||
{
|
||||
"key": "part.<part>.<instance>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "whether a part's instance is online",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"online": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"online"
|
||||
]
|
||||
},
|
||||
"description": "a part's instance"
|
||||
}
|
||||
],
|
||||
"history": 20,
|
||||
"description": "who is connected; the entry's own time says since when"
|
||||
},
|
||||
{
|
||||
"name": "pulse",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<bucket>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "a watched key mirrored, its revision, and who owes the next move",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owes": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bucket",
|
||||
"key",
|
||||
"revision"
|
||||
]
|
||||
},
|
||||
"description": "the move watched at a key of a state"
|
||||
}
|
||||
],
|
||||
"description": "one key per watched move, living for the move's bound minus its age"
|
||||
},
|
||||
{
|
||||
"name": "stuck",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<bucket>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "what stopped moving",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"waited": {
|
||||
"type": "string",
|
||||
"description": "what it waited for, in words"
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"moved": {
|
||||
"type": "boolean",
|
||||
"description": "it has moved again"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bucket",
|
||||
"key",
|
||||
"since"
|
||||
]
|
||||
},
|
||||
"description": "a key whose pulse expired"
|
||||
}
|
||||
],
|
||||
"description": "what stopped moving; no key is removed, one that moves again is written as moved"
|
||||
}
|
||||
]
|
||||
}
|
||||
+861
@@ -0,0 +1,861 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "operator-channel",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Operator and conversation",
|
||||
"decision": "novox/hq ADR 0259",
|
||||
"holder-declares": true,
|
||||
"description": "Asking a person and answering on a channel (ADR 0259): held by the router, the messenger module, whose manifest declares the seat; written from that seat entry (design 26).",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "open",
|
||||
"description": "What is open now: every message the operator was sent about something still wrong, urgent first, oldest first.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"description": "no arguments"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the open messages"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "history",
|
||||
"description": "What was said to the operator lately, newest first, the refusals, and what waits to be sent on each channel.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"description": "at most this many of each (default 50)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the sends, refusals and what waits"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notify",
|
||||
"description": "Tell the operator something, as a module that uses the seat: a key, urgent or warning, one line, and what it is about; clear says it is over.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the message's key"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"urgent",
|
||||
"warning"
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"description": "what it is about"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "plain words"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string",
|
||||
"description": "one or two plain sentences"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string",
|
||||
"description": "the line said when it is over"
|
||||
},
|
||||
"clear": {
|
||||
"type": "boolean",
|
||||
"description": "it is over"
|
||||
}
|
||||
}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was sent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tell",
|
||||
"description": "Tell the operator a plain notice that needs no answer and opens no condition (ADR 0380).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "plain words"
|
||||
},
|
||||
"lines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "one or two plain lines"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"description": "what it is about"
|
||||
}
|
||||
}
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "what was sent"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "asks",
|
||||
"description": "The asks the router holds: open first, then the last month's, each with how it ended.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"description": "no arguments"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the asks"
|
||||
}
|
||||
}
|
||||
],
|
||||
"accepts": [
|
||||
{
|
||||
"name": "ask",
|
||||
"by-caller": true,
|
||||
"body": {
|
||||
"$ref": "#/defs/Ask"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cancel",
|
||||
"by-caller": true,
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the ask's id"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "condition",
|
||||
"by-caller": true,
|
||||
"body": {
|
||||
"$ref": "#/defs/Condition"
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "decided",
|
||||
"by-caller": true,
|
||||
"body": {
|
||||
"$ref": "#/defs/Warrant"
|
||||
}
|
||||
}
|
||||
],
|
||||
"family": {
|
||||
"name": "operator-channel.decided",
|
||||
"max-age-days": 7
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "asks",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<asker>.<id>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "one ask the router holds and how it stands, as the router's tool states it",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "<asker>.<id>"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "its headline"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "how it stands: open, chosen, expired, cancelled, replaced or refused"
|
||||
},
|
||||
"opened": {
|
||||
"type": "string",
|
||||
"description": "when it was opened, RFC 3339"
|
||||
},
|
||||
"expires": {
|
||||
"type": "string",
|
||||
"description": "when it ends unanswered, RFC 3339"
|
||||
},
|
||||
"offered_on": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the channels it was offered on"
|
||||
},
|
||||
"asker_told": {
|
||||
"type": "boolean",
|
||||
"description": "its asker has been told how it ended"
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"description": "how it ended, in words"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"asker",
|
||||
"headline",
|
||||
"state",
|
||||
"opened",
|
||||
"expires"
|
||||
]
|
||||
},
|
||||
"description": "one ask the router holds and how it stands"
|
||||
}
|
||||
],
|
||||
"description": "the asks a module raised and the router holds, one key per asker and ask"
|
||||
}
|
||||
],
|
||||
"holder-events": [
|
||||
{
|
||||
"name": "refused",
|
||||
"subject": "mesh.mod.<holder>.event.refused"
|
||||
},
|
||||
{
|
||||
"name": "offered",
|
||||
"subject": "mesh.stream.<holder>.event.offered",
|
||||
"family": "router.asks",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the ask's id"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "its headline"
|
||||
},
|
||||
"channels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the channels it was offered on"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"asker"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "closed",
|
||||
"subject": "mesh.stream.<holder>.event.closed",
|
||||
"family": "router.asks",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the ask's id"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"how": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"answered",
|
||||
"expired",
|
||||
"cancelled",
|
||||
"replaced",
|
||||
"unlinked"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"asker",
|
||||
"how"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"defs": {
|
||||
"Ask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the asker's own id"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "a few plain words"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string",
|
||||
"description": "what happened and what it means"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Option"
|
||||
},
|
||||
"description": "the answers it offers"
|
||||
},
|
||||
"who": {
|
||||
"type": "string",
|
||||
"description": "who may answer: operator"
|
||||
},
|
||||
"expires": {
|
||||
"type": "string",
|
||||
"description": "when it ends unanswered, RFC 3339"
|
||||
},
|
||||
"on-expiry": {
|
||||
"type": "string",
|
||||
"description": "what the asker then does"
|
||||
},
|
||||
"about": {
|
||||
"type": "string",
|
||||
"description": "what it is about: a newer ask about it replaces the older"
|
||||
},
|
||||
"urgent": {
|
||||
"type": "boolean",
|
||||
"description": "urgent"
|
||||
},
|
||||
"whole": {
|
||||
"type": "string",
|
||||
"description": "the explanation with its values whole"
|
||||
},
|
||||
"details": {
|
||||
"type": "string",
|
||||
"description": "its secondary words"
|
||||
},
|
||||
"whole-details": {
|
||||
"type": "string",
|
||||
"description": "the details whole"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"headline",
|
||||
"explanation",
|
||||
"options",
|
||||
"who",
|
||||
"expires",
|
||||
"on-expiry"
|
||||
]
|
||||
},
|
||||
"Option": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the option's id"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "the button's label"
|
||||
},
|
||||
"does": {
|
||||
"type": "string",
|
||||
"description": "what it does, in plain words"
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"description": "the proof its answer needs"
|
||||
},
|
||||
"binds": {
|
||||
"type": "string",
|
||||
"description": "the digest of exactly what the asker performs when it is chosen"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"label",
|
||||
"does",
|
||||
"level"
|
||||
]
|
||||
},
|
||||
"Warrant": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the ask"
|
||||
},
|
||||
"asker": {
|
||||
"type": "string",
|
||||
"description": "its asker"
|
||||
},
|
||||
"about": {
|
||||
"type": "string",
|
||||
"description": "what it was about"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"chosen",
|
||||
"expired",
|
||||
"cancelled",
|
||||
"replaced",
|
||||
"refused"
|
||||
]
|
||||
},
|
||||
"option": {
|
||||
"type": "string",
|
||||
"description": "the option chosen"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "its label"
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"description": "its level"
|
||||
},
|
||||
"by": {
|
||||
"$ref": "#/defs/Person"
|
||||
},
|
||||
"channel": {
|
||||
"type": "string",
|
||||
"description": "the module it came through"
|
||||
},
|
||||
"proofs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the proofs present"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339"
|
||||
},
|
||||
"ask-digest": {
|
||||
"type": "string",
|
||||
"description": "the digest of the ask as the router took it"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "why it ended without a choice, or what refused it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ask",
|
||||
"asker",
|
||||
"outcome",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"who": {
|
||||
"type": "string",
|
||||
"description": "the role"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "the channel kind"
|
||||
},
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"description": "the account"
|
||||
},
|
||||
"display": {
|
||||
"type": "string",
|
||||
"description": "the name shown"
|
||||
},
|
||||
"verified": {
|
||||
"type": "string",
|
||||
"description": "how the router knew"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"who",
|
||||
"kind",
|
||||
"identity",
|
||||
"verified"
|
||||
]
|
||||
},
|
||||
"Condition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the form's version, 1"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the condition's key"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"description": "urgent or warning"
|
||||
},
|
||||
"subject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"description": "scope"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "id"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string",
|
||||
"description": "machine"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"id"
|
||||
]
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "raised or cleared"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "one line"
|
||||
},
|
||||
"headline": {
|
||||
"type": "string",
|
||||
"description": "plain words"
|
||||
},
|
||||
"needs": {
|
||||
"type": "string",
|
||||
"description": "what it needs"
|
||||
},
|
||||
"explanation": {
|
||||
"type": "string",
|
||||
"description": "plain words"
|
||||
},
|
||||
"resolved": {
|
||||
"type": "string",
|
||||
"description": "the line said when it is over"
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "label"
|
||||
},
|
||||
"verb": {
|
||||
"type": "string",
|
||||
"description": "verb"
|
||||
},
|
||||
"machine": {
|
||||
"type": "string",
|
||||
"description": "machine"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"type": "string",
|
||||
"description": "level"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"description": "the answers it offers"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"key",
|
||||
"subject",
|
||||
"state"
|
||||
]
|
||||
},
|
||||
"Button": {
|
||||
"type": "object",
|
||||
"description": "one answer a channel offers: its label and the router's one-time ticket for it",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "the button's label"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the router's one-time ticket for it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"ticket"
|
||||
]
|
||||
},
|
||||
"Message": {
|
||||
"type": "object",
|
||||
"description": "the work a channel takes on the bench channel: shown with buttons (show), shown again in place (edit) or said (send); the words are the router's, shown as given",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the router's name for it, the same across a show and its edits"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "its title"
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "its body"
|
||||
},
|
||||
"buttons": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Button"
|
||||
},
|
||||
"description": "the answers it offers (none for a send)"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"description": "its secondary words after the body and the buttons: who asked and when, what each answer does, when it expires, the ask's details"
|
||||
},
|
||||
"urgent": {
|
||||
"type": "boolean",
|
||||
"description": "urgent"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description": "shown without notifying"
|
||||
},
|
||||
"reply": {
|
||||
"type": "string",
|
||||
"description": "the choice or link request this answers, by its id: the channel shows it where that was made"
|
||||
},
|
||||
"to": {
|
||||
"type": "string",
|
||||
"description": "the account linked as the operator on this kind, where the channel sends what is not a reply; empty when none is linked"
|
||||
},
|
||||
"secret": {
|
||||
"type": "boolean",
|
||||
"description": "the words carry something shown once (a link's code): the channel keeps no copy"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"Sender": {
|
||||
"type": "object",
|
||||
"description": "who a channel's service says sent something; the router alone judges whether that is the operator",
|
||||
"properties": {
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"description": "the account"
|
||||
},
|
||||
"display": {
|
||||
"type": "string",
|
||||
"description": "the name it shows"
|
||||
},
|
||||
"authenticated": {
|
||||
"type": "boolean",
|
||||
"description": "whether the service authenticated it"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"identity",
|
||||
"authenticated"
|
||||
]
|
||||
},
|
||||
"Choice": {
|
||||
"type": "object",
|
||||
"description": "a button chosen on a channel, said on the bench intake as the event `choice`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival, unique, so the router acts on it once"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "string",
|
||||
"description": "the ticket of the button"
|
||||
},
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"ticket",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"LinkAsked": {
|
||||
"type": "object",
|
||||
"description": "somebody on a channel asking to be linked as the operator, said on the bench intake as the event `link`",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the channel's own for this arrival"
|
||||
},
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"sender",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Failed": {
|
||||
"type": "object",
|
||||
"description": "a message a channel could not deliver, said on the bench intake as the event `failed`",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "the message's handle"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why"
|
||||
},
|
||||
"permanent": {
|
||||
"type": "boolean",
|
||||
"description": "trying again cannot help"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle",
|
||||
"why",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Standing": {
|
||||
"type": "object",
|
||||
"description": "what a channel says of itself at least every five minutes and whenever it changes, on the bench intake as the event `standing`",
|
||||
"properties": {
|
||||
"ready": {
|
||||
"type": "boolean",
|
||||
"description": "it can send now"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why not"
|
||||
},
|
||||
"edits-silently": {
|
||||
"type": "boolean",
|
||||
"description": "its edits notify nobody"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ready",
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"Code": {
|
||||
"type": "object",
|
||||
"description": "a code a person typed on a channel, asked as the proof `code` on the bench intake by request and reply: never in an event, never kept",
|
||||
"properties": {
|
||||
"sender": {
|
||||
"$ref": "#/defs/Sender"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "the code"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string",
|
||||
"description": "what it is for"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sender",
|
||||
"code",
|
||||
"purpose"
|
||||
]
|
||||
},
|
||||
"ProofAnswer": {
|
||||
"type": "object",
|
||||
"description": "the router's answer to a proof",
|
||||
"properties": {
|
||||
"accepted": {
|
||||
"type": "boolean",
|
||||
"description": "whether it was taken"
|
||||
},
|
||||
"words": {
|
||||
"type": "string",
|
||||
"description": "words to say to the person"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accepted",
|
||||
"words"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,570 @@
|
||||
{
|
||||
"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": "any caller whose role grants it",
|
||||
"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": "any caller whose role grants it",
|
||||
"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": "any caller whose role grants it",
|
||||
"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": "any caller whose role grants it",
|
||||
"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": "the bus module's own process only",
|
||||
"input": {
|
||||
"$ref": "#/defs/Entry"
|
||||
},
|
||||
"answer": {
|
||||
"$ref": "#/defs/Held"
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "apply",
|
||||
"description": "Apply a difference that only grows: a larger cap, a longer age.",
|
||||
"callers": "the bus module's own process only",
|
||||
"input": {
|
||||
"$ref": "#/defs/Named"
|
||||
},
|
||||
"answer": {
|
||||
"$ref": "#/defs/Held"
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"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": "the bus module's process, on the operator's warrant",
|
||||
"input": {
|
||||
"$ref": "#/defs/Warranted"
|
||||
},
|
||||
"answer": {
|
||||
"$ref": "#/defs/Held"
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"name": "drop",
|
||||
"description": "Remove one orphan, after a stream snapshot.",
|
||||
"callers": "the bus module's process, on the operator's warrant",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bus-name",
|
||||
"storage-type"
|
||||
],
|
||||
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,346 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "mesh-config",
|
||||
"scope": "mesh",
|
||||
"grain": "whole",
|
||||
"domain": "Config",
|
||||
"decision": "novox/hq ADR 0348, ADR 0565",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "config",
|
||||
"description": "Set, clear, list or read the history of config values: mesh config or node config for a predefined key, or a module's own value on one node, each set with why, validated, and naming each module on each node whose value moves.",
|
||||
"optional": true,
|
||||
"input": {
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "list (when not given), set, clear or history",
|
||||
"type": "string"
|
||||
},
|
||||
"by": {
|
||||
"description": "who gave the value at the controller's terminal",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "the config key",
|
||||
"type": "string"
|
||||
},
|
||||
"limit": {
|
||||
"description": "for history: at most this many, newest",
|
||||
"type": "number"
|
||||
},
|
||||
"module": {
|
||||
"description": "a module: its own value, with node",
|
||||
"type": "string"
|
||||
},
|
||||
"node": {
|
||||
"description": "a node",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "for set: the value, of the key's type: a number, a string, a boolean, or for a trusted key an object or a list"
|
||||
},
|
||||
"why": {
|
||||
"description": "for set and clear: why",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"description": "the values asked, or the one set or cleared, or its history"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "renames",
|
||||
"optional": true,
|
||||
"description": "The open renames of config values (design 32 *A config value renamed*): per rename the module, the old and new name, when it moved, and the nodes still holding the old name open.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "one module (optional)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"callers": "any caller whose role grants it; the checker asks it",
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"renames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"from": {
|
||||
"type": "string",
|
||||
"description": "the old name"
|
||||
},
|
||||
"to": {
|
||||
"type": "string",
|
||||
"description": "the new name"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when it moved, RFC 3339"
|
||||
},
|
||||
"open": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "the nodes still holding the old name open"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"from",
|
||||
"to"
|
||||
]
|
||||
},
|
||||
"description": "every open rename"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"renames"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "The mesh's config values: read and set one, and the renames still open. mesh-config's own events stay under its own subjects (ADR 0620 §2).",
|
||||
"holder-events": [
|
||||
{
|
||||
"name": "config-changed",
|
||||
"subject": "mesh.mod.<holder>.event.config-changed"
|
||||
},
|
||||
{
|
||||
"name": "renamed",
|
||||
"subject": "mesh.stream.<holder>.event.renamed",
|
||||
"family": "config.events",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"from": {
|
||||
"type": "string",
|
||||
"description": "the old name"
|
||||
},
|
||||
"to": {
|
||||
"type": "string",
|
||||
"description": "the new name"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"description": "when, RFC 3339"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"from",
|
||||
"to",
|
||||
"at"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "retiring",
|
||||
"subject": "mesh.stream.<holder>.event.retiring",
|
||||
"family": "config.events",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the value's or secret's name"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"value",
|
||||
"secret"
|
||||
]
|
||||
},
|
||||
"since": {
|
||||
"type": "string",
|
||||
"description": "since when, RFC 3339"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the ask's id"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"key",
|
||||
"kind",
|
||||
"since"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "retired",
|
||||
"subject": "mesh.stream.<holder>.event.retired",
|
||||
"family": "config.events",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "the name"
|
||||
},
|
||||
"node": {
|
||||
"type": "string",
|
||||
"description": "the node"
|
||||
},
|
||||
"ask": {
|
||||
"type": "string",
|
||||
"description": "the ask's id"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"name": "resolved",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<node>.<module>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "the value a module on a node takes for a config key, and where it came from",
|
||||
"properties": {
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"predefined": {
|
||||
"type": "string",
|
||||
"description": "the predefined key the value falls back to"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean",
|
||||
"description": "an unset value is the operator's own to set"
|
||||
},
|
||||
"trusted": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"node",
|
||||
"module",
|
||||
"key",
|
||||
"source"
|
||||
]
|
||||
},
|
||||
"description": "one resolved value"
|
||||
}
|
||||
],
|
||||
"description": "the value each module on each node takes for each config key, built from the sources alone"
|
||||
},
|
||||
{
|
||||
"name": "kept",
|
||||
"template": "state",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<owner>.<repository>.<number>.<node>.<module>.<key>",
|
||||
"value": {
|
||||
"type": "object",
|
||||
"description": "an approved held value, kept apart from the values mesh-config resolves, laid only over the composition of its own pull request at its head (ADR 0565 clause 5)",
|
||||
"properties": {
|
||||
"pull": {
|
||||
"type": "string",
|
||||
"description": "the pull request, owner/repository#number"
|
||||
},
|
||||
"head": {
|
||||
"type": "string",
|
||||
"description": "the head the declaration was read at"
|
||||
},
|
||||
"declaration": {
|
||||
"type": "string",
|
||||
"description": "the digest of what the declaration holds the value to; the value stays only while it is the same"
|
||||
},
|
||||
"node": {
|
||||
"type": "string"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "the config key"
|
||||
},
|
||||
"value": {
|
||||
"description": "the value held, as the operator approved it"
|
||||
},
|
||||
"by": {
|
||||
"type": "string"
|
||||
},
|
||||
"via": {
|
||||
"type": "string",
|
||||
"description": "where the value was proposed from"
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"approved": {
|
||||
"type": "string",
|
||||
"description": "who approved it, as the proposal kept it"
|
||||
},
|
||||
"proposal": {
|
||||
"type": "string",
|
||||
"description": "the proposal's id"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "when it was kept"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"pull",
|
||||
"head",
|
||||
"declaration",
|
||||
"node",
|
||||
"module",
|
||||
"key",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"description": "one held value: the pull request (owner, repository and number, none holding a dot), the node, the module and the config key, which may hold dots"
|
||||
}
|
||||
],
|
||||
"description": "the approved held values of open pull requests, read by the checker and the assigner's composition check"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"format": 1,
|
||||
"seat": "node-backup",
|
||||
"scope": "node",
|
||||
"grain": "seat-list",
|
||||
"domain": "Data",
|
||||
"decision": "novox/hq ADR 0214",
|
||||
"verbs": [
|
||||
{
|
||||
"name": "backed-up",
|
||||
"description": "What this machine backs up: each module, what it declared, its last good night, how many restore points are kept and the repository's size.",
|
||||
"replaces": [
|
||||
"restic snapshots"
|
||||
],
|
||||
"input": {
|
||||
"properties": {
|
||||
"module": {
|
||||
"description": "one module (optional)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "now",
|
||||
"description": "Take a backup now, of one module or of every module on this machine — before a migration, a retirement or anything else that could go wrong.",
|
||||
"replaces": [
|
||||
"restic backup"
|
||||
],
|
||||
"input": {
|
||||
"properties": {
|
||||
"module": {
|
||||
"description": "one module (optional)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "restore",
|
||||
"description": "Restore one module's data from a restore point BESIDE the live data, never over it: each directory as \u003cpath\u003e.restored-\u003cdate\u003e. Swapping it in is a person's act. Lists the restore points when none is named.",
|
||||
"replaces": [
|
||||
"restic restore"
|
||||
],
|
||||
"input": {
|
||||
"properties": {
|
||||
"module": {
|
||||
"description": "the module",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "one of the module's directories (all of them when omitted)",
|
||||
"type": "string"
|
||||
},
|
||||
"snapshot": {
|
||||
"description": "the restore point (from `backed-up`; the newest when omitted)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"receives": [
|
||||
{
|
||||
"kind": "backup",
|
||||
"comment": "#",
|
||||
"dirs": true
|
||||
},
|
||||
{
|
||||
"kind": "data",
|
||||
"comment": "#",
|
||||
"dirs": true
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user