223 lines
6.0 KiB
JSON
223 lines
6.0 KiB
JSON
{
|
|
"format": 1,
|
|
"seat": "mesh-config",
|
|
"scope": "mesh",
|
|
"grain": "whole",
|
|
"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"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|