Files
mesh-sdk/go/seatlist/bootstrap/mesh-conditions.json
T

648 lines
17 KiB
JSON

{
"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"
]
}
}
}