Files
mesh-sdk/go/seatlist/seatlisttest/seats/node-engine.json
T
jschoubben 1aca4991d4 mesh-sdk compiles no seat list and imports no contracts module: catalogue takes its seats from the host, whole seats' names leave it (ADR 0635 §1, §4; issue 1966)
catalogue's working set starts empty and a host gives it the seats it read (UseSeats over SeatsFromDefinitions);
the node-engine's verbs and events take the seat's name from the caller. Tests take their seats from seatlisttest.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-05 12:54:23 +01:00

1056 lines
33 KiB
JSON

{
"format": 1,
"seat": "node-engine",
"scope": "node",
"grain": "whole",
"decision": "novox/hq ADR 0563",
"description": "The node seat every node's engine holds (novox/hq ADR 0563, ADR 0618 §3, §4): its hand acts on the operator's warrant, its read-only judgements, its compositions and what it reads of a manifest. Each verb is answered on this node's subject, mesh.seat.node-engine.tool.<verb>.<node>, and each event is published on mesh.seat.node-engine.event.<event>.<node>, the node's name its last token.",
"held-by-the-engine": true,
"verbs": [
{
"name": "hand-over",
"description": "Hand a directory this machine uses as found to the mesh (novox/hq ADR 0563 §3, §5): the engine judges the path as it does every hand-over (absolute, as it states it, used as found, reached through no link) and refuses in words, or asks the operator on their channel at the level approve, binding the owner, group and mode it will set. Nothing changes on the call: only the operator's yes hands it over. One ask is open per path; acts shows where it stands.",
"input": {
"properties": {
"path": {
"description": "the directory's absolute path, as the engine states it",
"type": "string"
},
"why": {
"description": "why it is asked, in words the operator reads",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
},
"answer": {
"$ref": "#/defs/Asked"
}
},
{
"name": "access-act",
"description": "Ask the operator for the take act on a library whose root holds data outside its group (novox/hq ADR 0328 §7, ADR 0563 §3, §4), on the library's home engine: the access as declared and its root as last declared, judged and refused in words or asked at the level approve. Only the operator's yes sets the library's group, group write and setgid under its root. One ask is open per access.",
"input": {
"properties": {
"access": {
"description": "the access, library:<name>",
"type": "string"
},
"act": {
"description": "the act: take",
"type": "string"
},
"why": {
"description": "why it is asked, in words the operator reads",
"type": "string"
}
},
"required": [
"act",
"access"
],
"type": "object"
},
"answer": {
"$ref": "#/defs/Asked"
}
},
{
"name": "judge-directories",
"description": "Which of this machine's declared directories the engine would refuse to make or keep, one line each (novox/hq ADR 0563 §2). Read-only: changes no owner or mode.",
"input": {
"properties": {},
"type": "object"
},
"answer": {
"$ref": "#/defs/Said"
}
},
{
"name": "setuid-search",
"description": "Throw away the engine's last search for setuid programs and start a full one (novox/hq ADR 0563 §2); until it completes root-free answers that the machine is not judged yet. Refused while one runs, and when one was started within the hour, naming when the next may start.",
"input": {
"properties": {
"why": {
"description": "why it is asked, in words",
"type": "string"
}
},
"type": "object"
},
"answer": {
"$ref": "#/defs/Said"
}
},
{
"name": "root-free",
"description": "Whether this machine is root-free (novox/hq ADR 0259 §8, ADR 0563 §6): free only on the engine's own verdict, at most fifteen minutes old, that the account agents run as cannot become root without a person, and the login shell's execute not served here. Anything else is no pass, and says why. Answered by this machine's engine alone.",
"input": {
"properties": {},
"type": "object"
},
"answer": {
"type": "object",
"properties": {
"machines": {
"type": "array",
"items": {
"$ref": "#/defs/RootVerdict"
},
"description": "this machine's verdict"
}
},
"required": [
"machines"
]
}
},
{
"name": "acts",
"description": "Every act this machine's engine was asked through this seat (novox/hq ADR 0563 §9): each hand-over, access act and setuid search, open, done or refused, with who asked, the ask and the operator's warrant. Read-only.",
"input": {
"properties": {
"id": {
"description": "one act, by its id",
"type": "string"
},
"limit": {
"description": "at most this many, newest",
"type": "string"
}
},
"type": "object"
},
"answer": {
"$ref": "#/defs/Acts"
}
},
{
"name": "packages",
"description": "The packages this machine's compositions declare, present or absent, each with the modules that declare it, as the engine keeps them in its key of `packages`; until the controller hands its lease away, beside the controller's mirror for this machine and their difference. With write, the key written again from what the engine composed.",
"optional": true,
"input": {
"properties": {
"write": {
"description": "\"true\": write this machine's key again from what the engine composed",
"enum": [
"true",
"false"
],
"type": "string"
}
},
"type": "object"
},
"answer": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"source": {
"type": "string",
"description": "where the key is read: the engine's state packages"
},
"key": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"package": {
"type": "string",
"description": "the package"
},
"modules": {
"type": "array",
"items": {
"type": "string"
},
"description": "the modules that declare it"
},
"absent": {
"type": "boolean",
"description": "declared absent"
}
},
"required": [
"package",
"modules",
"absent"
]
},
"description": "its packages sorted by name, absent after present"
}
},
"required": [
"node",
"packages"
],
"description": "the node's key as the bus holds it; absent when the engine wrote none"
},
"key_error": {
"type": "string",
"description": "why the key could not be read"
},
"wrote": {
"type": "boolean",
"description": "with write: the key was written again (false: it already held what the engine composed)"
},
"note": {
"type": "string",
"description": "a note, such as that no key is written yet"
}
},
"required": [
"node",
"source"
]
}
},
{
"name": "composition",
"description": "One module's composition on this machine beside what runs of it, read-only: the composition its want's build has in the bucket composed-<node> (the latest revision, or the one whose digest is given, from the revisions the bucket keeps), the digest of each kept revision, what runs (applied, its have, or the kept declaration), its want and have (phase running, failed, held or waiting-yes, and the digest that waits for a yes), and the move's judgement with its words: why a record module waits for a yes. With diff, every resource added, removed or changed, a provider's received file naming the consumers that join or leave.",
"optional": true,
"input": {
"properties": {
"diff": {
"description": "\"true\": list the resources that differ from what runs",
"type": "string"
},
"digest": {
"description": "a composition's digest (sha256:…), to read that revision rather than the latest",
"type": "string"
},
"module": {
"description": "the module, as placed on this machine; node for the node's own",
"type": "string"
}
},
"required": [
"module"
],
"type": "object"
},
"answer": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"module": {
"type": "string",
"description": "the module"
},
"want": {
"type": "object",
"properties": {
"fp": {
"type": "string",
"description": "its build's fingerprint"
},
"composed": {
"type": "string",
"description": "the composition's digest it names"
},
"yes": {
"type": "string",
"description": "the digest a person said yes to"
},
"removed": {
"type": "boolean",
"description": "the module is removed"
},
"self": {
"type": "boolean",
"description": "the node composes the module itself (ADR 0547 §2)"
},
"backup": {
"type": "string",
"description": "the operator's answer to a failed backup, again or skip"
},
"words": {
"type": "string",
"description": "its words"
},
"revision": {
"type": "integer",
"description": "the revision of the want's key read last"
}
},
"required": [
"fp",
"revision"
],
"description": "the module's want as the agent holds it; absent when it holds none"
},
"attempt": {
"type": "object",
"properties": {
"fp": {
"type": "string",
"description": "the fingerprint tried"
},
"composed": {
"type": "string",
"description": "the digest tried"
},
"want_revision": {
"type": "integer",
"description": "the want's revision it was tried at"
},
"composition_revision": {
"type": "integer",
"description": "the composition's revision it was tried at"
},
"held": {
"type": "boolean",
"description": "held for a failed backup"
},
"answered_revision": {
"type": "integer",
"description": "the want's revision the hold took"
},
"transient": {
"type": "boolean",
"description": "it failed because the bus did not answer for a moment"
}
},
"required": [
"fp",
"want_revision",
"composition_revision"
],
"description": "the module's last apply that did not end running; absent when none"
},
"started": {
"type": "boolean",
"description": "the agent has looked at the module once since it started"
},
"have": {
"type": "object",
"properties": {
"fp": {
"type": "string",
"description": "fingerprint"
},
"composed": {
"type": "string",
"description": "digest"
},
"phase": {
"type": "string",
"description": "running, failed, held or waiting-yes"
},
"detail": {
"type": "string",
"description": "detail"
},
"judgement": {
"type": "string",
"description": "judgement"
},
"waits": {
"type": "string",
"description": "the digest that waits for a yes"
}
},
"required": [
"phase"
],
"description": "what the module's have key says now; absent when it says nothing"
},
"composition": {
"$ref": "#/defs/Revision"
},
"revisions": {
"type": "array",
"items": {
"$ref": "#/defs/Revision"
},
"description": "the revisions of its key the bucket keeps, oldest first"
},
"runs": {
"type": "object",
"properties": {
"fp": {
"type": "string",
"description": "fingerprint"
},
"composed": {
"type": "string",
"description": "digest"
},
"phase": {
"type": "string",
"description": "phase"
},
"from": {
"type": "string",
"description": "applied, have or kept"
},
"resources": {
"type": "integer",
"description": "how many resources run"
}
},
"required": [
"from",
"resources"
],
"description": "what runs of the module; absent when nothing runs"
},
"judged": {
"type": "object",
"properties": {
"judgement": {
"type": "string",
"description": "the judgement"
},
"words": {
"type": "string",
"description": "its words"
},
"waits_for_yes": {
"type": "boolean",
"description": "the agent would wait for a person's yes before applying it"
}
},
"required": [
"judgement",
"words",
"waits_for_yes"
],
"description": "the move from what runs to the composition read"
},
"diff": {
"type": "array",
"items": {
"type": "object",
"description": "one resource added, removed or changed, as the engine's judge says it"
},
"description": "every resource that differs from what runs, when asked"
},
"own": {
"type": "object",
"properties": {
"provisioner_account": {
"type": "string",
"description": "the account the provisioner's client runs as, as the revision names it"
},
"runs_provisioner_account": {
"type": "string",
"description": "as what runs names it"
},
"adoption": {
"type": "object",
"description": "the revision's adoption; absent for a converged node"
},
"identities": {
"type": "integer",
"description": "identities the revision names"
},
"groups": {
"type": "integer",
"description": "groups"
},
"libraries": {
"type": "integer",
"description": "libraries"
},
"held": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "each module the node's composer held in its last pass, with why"
}
},
"required": [
"provisioner_account"
],
"description": "of the node's own composition, its own fields beside what runs names"
}
},
"required": [
"node",
"module",
"started",
"composition",
"judged"
]
}
},
{
"name": "compose",
"description": "Compose this machine's modules now and say how it went, so a composition that failed, or a module held, recovers without a restart: what the pass refused or held, each with why, and when the engine composes again on its own after a seat that did not answer (a deadline, no responders: retried with a growing wait; a refusal never). With module, that module's apply is also tried again. Changes only what a pass the engine makes on its own would change.",
"optional": true,
"input": {
"properties": {
"module": {
"description": "a module placed on this machine whose apply is also tried again (optional)",
"type": "string"
}
},
"type": "object"
},
"answer": {
"type": "object",
"properties": {
"retried": {
"type": "string",
"description": "the module whose apply was tried again"
},
"pass": {
"type": "object",
"properties": {
"at": {
"type": "string",
"description": "when the pass ended, RFC 3339"
},
"refused": {
"type": "string",
"description": "why the node composed none of its modules"
},
"held": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "each module refused alone, with why"
},
"handed": {
"type": "integer",
"description": "how many compositions the pass handed the agent that differ from before"
},
"again": {
"type": "string",
"description": "when the node composes again on its own, RFC 3339"
},
"earlier": {
"type": "boolean",
"description": "the answer is the last pass, made moments ago"
}
},
"required": [
"at",
"handed"
],
"description": "how the pass went"
}
},
"required": [
"pass"
]
}
},
{
"name": "compose-candidate",
"description": "Compose a check's candidate on this machine in shadow, with its own sealed values and the indexer's manifest verdicts, and say per module placed here whether it composes (with its digest and whether the candidate changes it), is refused by the candidate or is held without it, each with why, and the verdict of the machine's own composition (novox/hq ADR 0593 §7). Read-only: applies nothing and writes nothing. Answered by this machine's engine alone, within the asker's bound.",
"optional": true,
"input": {
"properties": {
"candidate": {
"description": "the key of the indexer's candidate, <group>.<heads hash>",
"type": "string"
},
"input": {
"description": "also answer the composition input the candidate was composed from, for the sandbox path",
"type": "boolean"
}
},
"required": [
"candidate"
],
"type": "object"
},
"answer": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"candidate": {
"type": "string",
"description": "the candidate's key"
},
"verdict": {
"type": "string",
"enum": [
"composed",
"refused",
"unready",
"not-judged"
],
"description": "the node's verdict (ADR 0593 §7, §9)"
},
"modules": {
"type": "array",
"items": {
"$ref": "#/defs/Module"
},
"description": "every module placed on the node, sorted by name"
},
"own": {
"$ref": "#/defs/Module"
},
"refused": {
"type": "string",
"description": "why the node could not compose with the candidate at all"
},
"took": {
"type": "integer",
"description": "how long the engine took, in milliseconds"
},
"input": {
"type": "object",
"description": "when asked: the composition input it composed from"
}
},
"required": [
"v",
"node",
"candidate",
"verdict",
"modules",
"own",
"took"
]
}
},
{
"name": "manifest-reads",
"optional": true,
"description": "The reader capabilities this machine's engine states (manifest words, forms and seat names it reads, novox/hq ADR 0618 §3) and when it last stated them. An engine built before it said them states none, which a reader takes as the baseline. Read-only. Answered by this machine's engine alone.",
"input": {
"type": "object",
"properties": {}
},
"answer": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"manifest-reads": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "the reader capabilities its engine states: the manifest words, forms and seat names it reads; empty for an engine built before it said them, read as the baseline"
},
"stated-at": {
"type": "string",
"description": "when the engine last stated them, RFC 3339"
}
},
"required": [
"v",
"node",
"stated-at"
],
"description": "what this machine's engine reads of a manifest (ADR 0618 §3)"
}
}
],
"events": [
{
"name": "asked",
"by-caller": true,
"body": {
"$ref": "#/defs/ActSaid"
}
},
{
"name": "done",
"by-caller": true,
"body": {
"$ref": "#/defs/ActSaid"
}
},
{
"name": "refused",
"by-caller": true,
"body": {
"$ref": "#/defs/ActSaid"
}
},
{
"name": "manifest-reads-changed",
"by-caller": true,
"body": {
"$ref": "#/defs/ManifestReadsChanged"
}
}
],
"family": {
"name": "node-engine.events",
"max-age-days": 7
},
"defs": {
"Act": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "the act's id"
},
"act": {
"type": "string",
"description": "the act: hand-over, access-act, judge-directories or setuid-search"
},
"subject": {
"type": "string",
"description": "the path of a hand-over, or the access of an access act"
},
"caller": {
"type": "string",
"description": "the caller as the runtime proved it"
},
"why": {
"type": "string",
"description": "why it was asked, in words"
},
"at": {
"type": "string",
"description": "when it was asked, RFC 3339"
},
"state": {
"type": "string",
"enum": [
"asked",
"done",
"refused",
"answered"
],
"description": "where it stands"
},
"said": {
"type": "string",
"description": "what the engine said of it: its outcome or why it was refused"
},
"ended": {
"type": "string",
"description": "when it ended, RFC 3339"
},
"ask": {
"type": "string",
"description": "the operator's ask of a hand-over or an access act"
},
"sets": {
"type": "string",
"description": "the owner, group and mode it sets, in words"
},
"disk": {
"type": "string",
"description": "what the engine read on disk when it judged"
},
"path": {
"type": "string",
"description": "the directory the act changes"
},
"expires": {
"type": "string",
"description": "when the ask ends unanswered, RFC 3339"
},
"by": {
"type": "string",
"description": "who answered, as the operator's warrant names them"
},
"via": {
"type": "string",
"description": "the channel the warrant came on"
},
"proofs": {
"type": "array",
"items": {
"type": "string"
},
"description": "the warrant's proofs"
},
"auto": {
"type": "boolean",
"description": "the engine asked it itself, on finding a library's root holding data outside its group (ADR 0563 §4)"
}
},
"required": [
"id",
"act",
"caller",
"at",
"state"
],
"description": "one act asked through the seat, as acts reads it (ADR 0563 §9)"
},
"ActSaid": {
"type": "object",
"properties": {
"act": {
"type": "string",
"description": "the act"
},
"subject": {
"type": "string",
"description": "the path or the access"
},
"caller": {
"type": "string",
"description": "the caller as the runtime proved it"
},
"ask": {
"type": "string",
"description": "the operator's ask"
},
"state": {
"type": "string",
"enum": [
"asked",
"done",
"refused"
],
"description": "where the act stands"
},
"said": {
"type": "string",
"description": "what the engine said of it"
},
"node": {
"type": "string",
"description": "the node whose engine says it"
}
},
"required": [
"act",
"caller",
"state",
"node"
],
"description": "what the seat says of an act: the act, the path or access, the caller as the runtime proved it and the ask (ADR 0563 §1)"
},
"Acts": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"acts": {
"type": "array",
"items": {
"$ref": "#/defs/Act"
},
"description": "the acts, newest first"
}
},
"required": [
"node",
"acts"
],
"description": "the acts kept"
},
"Asked": {
"type": "object",
"properties": {
"asked": {
"type": "string",
"description": "the ask's id: acts shows where it stands"
},
"node": {
"type": "string",
"description": "the node"
},
"says": {
"type": "string",
"description": "what happens next, in words"
}
},
"required": [
"asked",
"node",
"says"
],
"description": "the answer of an act the operator is asked"
},
"ManifestReadsChanged": {
"type": "object",
"properties": {
"v": {
"type": "integer",
"description": "the layout's version"
},
"node": {
"type": "string",
"description": "the node"
},
"manifest-reads": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "what its engine states it reads now"
},
"at": {
"type": "string",
"description": "when it says it, RFC 3339"
},
"why": {
"type": "string",
"enum": [
"started",
"returned"
],
"description": "started: the engine started or what it states changed; returned: its node returned after being away"
}
},
"required": [
"v",
"node",
"at",
"why"
],
"description": "what a node-engine says when what it reads changed or its node returned (ADR 0618 §4)"
},
"Module": {
"type": "object",
"properties": {
"module": {
"type": "string",
"description": "the module, node for the node's own composition"
},
"fp": {
"type": "string",
"description": "the fingerprint it was composed at"
},
"state": {
"type": "string",
"enum": [
"composed",
"refused",
"held"
],
"description": "composed (digest set), refused by the candidate, or held without it too (words set)"
},
"digest": {
"type": "string",
"description": "the composition's digest when composed"
},
"changed": {
"type": "boolean",
"description": "the candidate changes it from the one composed without it"
},
"words": {
"type": "string",
"description": "why, for a refused or held one"
}
},
"required": [
"module",
"state"
],
"description": "one module's composition with the candidate"
},
"Revision": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "the composition's key"
},
"revision": {
"type": "integer",
"description": "its revision"
},
"digest": {
"type": "string",
"description": "its digest"
},
"resources": {
"type": "integer",
"description": "how many resources it names"
},
"latest": {
"type": "boolean",
"description": "the latest revision"
},
"refused": {
"type": "string",
"description": "why it cannot be read or trusted"
}
},
"required": [
"key"
],
"description": "one revision of a composition key"
},
"RootVerdict": {
"type": "object",
"properties": {
"machine": {
"type": "string",
"description": "the machine"
},
"free": {
"type": "boolean",
"description": "the machine is root-free"
},
"why": {
"type": "string",
"description": "why, in words"
},
"judged": {
"type": "string",
"description": "when the engine judged it, RFC 3339"
}
},
"required": [
"machine",
"free",
"why",
"judged"
],
"description": "the engine's root-free verdict (ADR 0563 §6)"
},
"Said": {
"type": "object",
"properties": {
"node": {
"type": "string",
"description": "the node"
},
"said": {
"type": "string",
"description": "the engine's judgement or search, one line per directory or program"
}
},
"required": [
"node",
"said"
],
"description": "the answer of a read-only judgement"
}
}
}