322 lines
8.2 KiB
JSON
322 lines
8.2 KiB
JSON
{
|
|
"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"
|
|
]
|
|
}
|
|
}
|
|
}
|