244 lines
7.1 KiB
JSON
244 lines
7.1 KiB
JSON
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|