Builds: design 47 G §560, §557, §627, A-77, A-92 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
1316 lines
40 KiB
TypeScript
1316 lines
40 KiB
TypeScript
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// The contract of the seat "node-engine", defined whole (seats/node-engine/seat.json): 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, or, for an event whose subject names <node>, there (composed.<node>, running.<node>.<module>): the grants part grants a node's account only its own node's subjects (ADR 0363 §2).
|
|
|
|
export declare const seat: "node-engine";
|
|
|
|
export declare const verbs: {
|
|
readonly handOver: "hand-over";
|
|
readonly accessAct: "access-act";
|
|
readonly judgeDirectories: "judge-directories";
|
|
readonly setuidSearch: "setuid-search";
|
|
readonly rootFree: "root-free";
|
|
readonly acts: "acts";
|
|
readonly packages: "packages";
|
|
readonly composition: "composition";
|
|
readonly compose: "compose";
|
|
readonly composeCandidate: "compose-candidate";
|
|
readonly manifestReads: "manifest-reads";
|
|
readonly seatList: "seat-list";
|
|
readonly seatListAgain: "seat-list-again";
|
|
readonly firstViews: "first-views";
|
|
readonly firstViewAgain: "first-view-again";
|
|
readonly entryAgain: "entry-again";
|
|
readonly processBuilds: "process-builds";
|
|
};
|
|
|
|
export declare const events: {
|
|
readonly asked: "asked";
|
|
readonly done: "done";
|
|
readonly refused: "refused";
|
|
readonly manifestReadsChanged: "manifest-reads-changed";
|
|
readonly composed: "composed";
|
|
readonly running: "running";
|
|
readonly waitHeld: "wait-held";
|
|
readonly waitEnded: "wait-ended";
|
|
};
|
|
|
|
export declare const family: { readonly name: "node-engine.events"; readonly maxAgeDays: 7 };
|
|
|
|
export declare function askedSubject(caller: string): string;
|
|
|
|
export declare function doneSubject(caller: string): string;
|
|
|
|
export declare function refusedSubject(caller: string): string;
|
|
|
|
export declare function manifestReadsChangedSubject(caller: string): string;
|
|
|
|
export declare function composedSubject(node: string): string;
|
|
|
|
export declare const composedSubjectAll: "mesh.seat.node-engine.event.composed.*";
|
|
|
|
export declare const runningStream: "SEAT_node-engine_running";
|
|
|
|
export declare function runningSubject(node: string, module: string): string;
|
|
|
|
export declare const runningSubjectAll: "mesh.seat.node-engine.event.running.*.*";
|
|
|
|
export declare const waitHeldStream: "SEAT_node-engine_wait-held";
|
|
|
|
export declare function waitHeldSubject(node: string, module: string): string;
|
|
|
|
export declare const waitHeldSubjectAll: "mesh.seat.node-engine.event.wait-held.*.*";
|
|
|
|
export declare const waitEndedStream: "SEAT_node-engine_wait-ended";
|
|
|
|
export declare function waitEndedSubject(node: string, module: string): string;
|
|
|
|
export declare const waitEndedSubjectAll: "mesh.seat.node-engine.event.wait-ended.*.*";
|
|
|
|
export declare const states: {
|
|
readonly have: "have";
|
|
readonly composed: "composed";
|
|
readonly data: "data";
|
|
readonly packages: "packages";
|
|
readonly health: "health";
|
|
readonly findings: "findings";
|
|
readonly bounds: "bounds";
|
|
};
|
|
|
|
/** The key of one value of the state have under the form "<node>.<module>". */
|
|
export declare function haveByNodeModuleKey(node: string, module: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
|
|
export declare function parseHaveByNodeModuleKey(_key: string): { node: string; module: string } | undefined;
|
|
|
|
/** The key of one value of the state have under the form "<node>.node". */
|
|
export declare function haveByNodeNodeKey(node: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
|
|
export declare function parseHaveByNodeNodeKey(_key: string): { node: string } | undefined;
|
|
|
|
/** The key of one value of the state composed under the form "<node>.<module>.<fingerprint>". */
|
|
export declare function composedByNodeModuleFingerprintKey(node: string, module: string, fingerprint: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.<module>.<fingerprint>", or undefined for a key of another form. */
|
|
export declare function parseComposedByNodeModuleFingerprintKey(_key: string): { node: string; module: string; fingerprint: string } | undefined;
|
|
|
|
/** The key of one value of the state composed under the form "<node>.node". */
|
|
export declare function composedByNodeNodeKey(node: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
|
|
export declare function parseComposedByNodeNodeKey(_key: string): { node: string } | undefined;
|
|
|
|
/** The key of one value of the state data under the form "<node>.<module>". */
|
|
export declare function dataByNodeModuleKey(node: string, module: string): string;
|
|
|
|
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
|
|
export declare function parseDataByNodeModuleKey(_key: string): { node: string; module: string } | undefined;
|
|
|
|
/** The key of one value of the state packages under the form "<node>". */
|
|
export declare function packagesByNodeKey(node: string): string;
|
|
|
|
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
|
|
export declare function parsePackagesByNodeKey(_key: string): { node: string } | undefined;
|
|
|
|
/** The key of one value of the state health under the form "<node>". */
|
|
export declare function healthByNodeKey(node: string): string;
|
|
|
|
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
|
|
export declare function parseHealthByNodeKey(_key: string): { node: string } | undefined;
|
|
|
|
/** The key of one value of the state findings under the form "<key>". */
|
|
export declare function findingsByKeyKey(key: string): string;
|
|
|
|
/** The parts of a key of the form "<key>", or undefined for a key of another form. */
|
|
export declare function parseFindingsByKeyKey(_key: string): { key: string } | undefined;
|
|
|
|
/** The key of one value of the state bounds under the form "<what>.<id>". */
|
|
export declare function boundsByWhatIDKey(what: string, id: string): string;
|
|
|
|
/** The parts of a key of the form "<what>.<id>", or undefined for a key of another form. */
|
|
export declare function parseBoundsByWhatIDKey(_key: string): { what: string; id: string } | undefined;
|
|
|
|
/** the hashes of the users of the list, sealed to the vault */
|
|
export interface AccountsHanded {
|
|
/** when */
|
|
"at": string;
|
|
"box": SealedBox;
|
|
"from": string;
|
|
/** the fingerprint of the vault's key */
|
|
"to": string;
|
|
"users": number;
|
|
}
|
|
|
|
/** one act asked through the seat, as acts reads it (ADR 0563 §9) */
|
|
export interface Act {
|
|
/** the act: hand-over, access-act, judge-directories or setuid-search */
|
|
"act": string;
|
|
/** the operator's ask of a hand-over or an access act */
|
|
"ask"?: string;
|
|
/** when it was asked, RFC 3339 */
|
|
"at": string;
|
|
/** the engine asked it itself, on finding a library's root holding data outside its group (ADR 0563 §4) */
|
|
"auto"?: boolean;
|
|
/** who answered, as the operator's warrant names them */
|
|
"by"?: string;
|
|
/** the caller as the runtime proved it */
|
|
"caller": string;
|
|
/** what the engine read on disk when it judged */
|
|
"disk"?: string;
|
|
/** when it ended, RFC 3339 */
|
|
"ended"?: string;
|
|
/** when the ask ends unanswered, RFC 3339 */
|
|
"expires"?: string;
|
|
/** the act's id */
|
|
"id": string;
|
|
/** the directory the act changes */
|
|
"path"?: string;
|
|
/** the warrant's proofs */
|
|
"proofs"?: string[];
|
|
/** what the engine said of it: its outcome or why it was refused */
|
|
"said"?: string;
|
|
/** the owner, group and mode it sets, in words */
|
|
"sets"?: string;
|
|
/** where it stands */
|
|
"state": "asked" | "done" | "refused" | "answered";
|
|
/** the path of a hand-over, or the access of an access act */
|
|
"subject"?: string;
|
|
/** the channel the warrant came on */
|
|
"via"?: string;
|
|
/** why it was asked, in words */
|
|
"why"?: string;
|
|
}
|
|
|
|
/** 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) */
|
|
export interface ActSaid {
|
|
/** the act */
|
|
"act": string;
|
|
/** the operator's ask */
|
|
"ask"?: string;
|
|
/** the caller as the runtime proved it */
|
|
"caller": string;
|
|
/** the node whose engine says it */
|
|
"node": string;
|
|
/** what the engine said of it */
|
|
"said"?: string;
|
|
/** where the act stands */
|
|
"state": "asked" | "done" | "refused";
|
|
/** the path or the access */
|
|
"subject"?: string;
|
|
}
|
|
|
|
/** the acts kept */
|
|
export interface Acts {
|
|
/** the acts, newest first */
|
|
"acts": Act[];
|
|
/** the node */
|
|
"node": string;
|
|
}
|
|
|
|
/** the node is adopted and which of its modules are taken */
|
|
export interface Adoption {
|
|
/** the modules taken */
|
|
"taken": string[];
|
|
/** by module, the resources left untaken */
|
|
"untaken"?: Record<string, string[]>;
|
|
}
|
|
|
|
/** the answer of an act the operator is asked */
|
|
export interface Asked {
|
|
/** the ask's id: acts shows where it stands */
|
|
"asked": string;
|
|
/** the node */
|
|
"node": string;
|
|
/** what happens next, in words */
|
|
"says": string;
|
|
}
|
|
|
|
/** a network attached to a link */
|
|
export interface AttachedNetwork {
|
|
"link": string;
|
|
"network": string;
|
|
}
|
|
|
|
/** a module the candidate adds */
|
|
export interface CandidateAdded {
|
|
"composed"?: string;
|
|
"module": string;
|
|
"unissued"?: string[];
|
|
}
|
|
|
|
/** the node's answer to one placement candidate naming it */
|
|
export interface CandidateAnswer {
|
|
"added"?: CandidateAdded[];
|
|
"differs"?: CandidateDiffers[];
|
|
"held"?: CandidateRefusal[];
|
|
"note"?: string;
|
|
"proposal": string;
|
|
"refusals"?: CandidateRefusal[];
|
|
/** why the node cannot compose with the candidate at all */
|
|
"refused"?: string;
|
|
/** modules the candidate removes */
|
|
"removed"?: string[];
|
|
"returns"?: string;
|
|
"revision": number;
|
|
/** modules whose composition is the one running */
|
|
"same"?: string[];
|
|
"values_differ"?: number;
|
|
/** same, differs or refused */
|
|
"verdict": "same" | "differs" | "refused";
|
|
}
|
|
|
|
/** the bodies of one resource that differ */
|
|
export interface CandidateBodies {
|
|
"composed"?: string;
|
|
"id": string;
|
|
"paths"?: string[];
|
|
"running"?: string;
|
|
"why": string;
|
|
}
|
|
|
|
/** a module whose composition with the candidate differs from the one running */
|
|
export interface CandidateDiffers {
|
|
"bodies"?: CandidateBodies[];
|
|
"composed"?: string;
|
|
"module": string;
|
|
"resource"?: string;
|
|
"running"?: string;
|
|
"why": string;
|
|
}
|
|
|
|
/** a module refused or held with the candidate */
|
|
export interface CandidateRefusal {
|
|
"module": string;
|
|
"today"?: string;
|
|
"why": string;
|
|
}
|
|
|
|
/** an entry composed on a node (design 47 *What each step says*) */
|
|
export interface Composed {
|
|
/** when, RFC 3339 */
|
|
"at": string;
|
|
/** the digest of the composition (design 47 G 404) */
|
|
"digest": string;
|
|
/** the fingerprint of the want composed */
|
|
"fingerprint": string;
|
|
/** the module */
|
|
"module": string;
|
|
/** the node */
|
|
"node": string;
|
|
/** the layout's version */
|
|
"v": number;
|
|
}
|
|
|
|
/** a group */
|
|
export interface DeclaredGroup {
|
|
"gid": number;
|
|
"name": string;
|
|
}
|
|
|
|
/** the identity of a module assigned to the node */
|
|
export interface DeclaredIdentity {
|
|
"gid": number;
|
|
"groups"?: number[];
|
|
"module": string;
|
|
"name": string;
|
|
"runner"?: string;
|
|
"uid": number;
|
|
}
|
|
|
|
/** a library the node is reached by */
|
|
export interface DeclaredLibrary {
|
|
"gid": number;
|
|
"group": string;
|
|
"home": boolean;
|
|
"library": string;
|
|
"paths"?: string[];
|
|
"root": string;
|
|
"runner"?: string;
|
|
"taken"?: boolean;
|
|
}
|
|
|
|
/** a unit that failed */
|
|
export interface FailedUnit {
|
|
"load"?: string;
|
|
"resource"?: string;
|
|
"result"?: string;
|
|
"scope": string;
|
|
/** since when */
|
|
"since": string;
|
|
"unit": string;
|
|
}
|
|
|
|
/** one answer the operator may give from a notification */
|
|
export interface FindingAction {
|
|
"arguments"?: Record<string, string>;
|
|
"label": string;
|
|
"level"?: "acknowledge" | "approve";
|
|
"machine"?: string;
|
|
/** the seat verb the operator channel calls */
|
|
"verb": string;
|
|
}
|
|
|
|
/** one observation, as it was said */
|
|
export interface FindingEvidence {
|
|
"at": string;
|
|
"said": string;
|
|
}
|
|
|
|
/** what the condition is about */
|
|
export interface FindingSubject {
|
|
/** the other machines it concerns */
|
|
"also"?: string[];
|
|
/** its id within the scope */
|
|
"id": string;
|
|
/** the machine it concerns, when there is one */
|
|
"machine"?: string;
|
|
/** machine, plan, call, build, merge, provider, seat, bus, core, probe, mesh, delivery or module */
|
|
"scope": string;
|
|
}
|
|
|
|
/** a login that fell back to another node */
|
|
export interface LoginFallback {
|
|
/** when */
|
|
"at": string;
|
|
"from": string;
|
|
"node": string;
|
|
"why": string;
|
|
}
|
|
|
|
/** what a node-engine says when what it reads changed or its node returned (ADR 0618 §4) */
|
|
export interface ManifestReadsChanged {
|
|
/** when it says it, RFC 3339 */
|
|
"at": string;
|
|
/** what its engine states it reads now */
|
|
"manifest-reads"?: string[];
|
|
/** the node */
|
|
"node": string;
|
|
/** the layout's version */
|
|
"v": number;
|
|
/** started: the engine started or what it states changed; returned: its node returned after being away */
|
|
"why": "started" | "returned";
|
|
}
|
|
|
|
/** one module's composition with the candidate */
|
|
export interface Module {
|
|
/** the candidate changes it from the one composed without it */
|
|
"changed"?: boolean;
|
|
/** the composition's digest when composed */
|
|
"digest"?: string;
|
|
/** the fingerprint it was composed at */
|
|
"fp"?: string;
|
|
/** the module, node for the node's own composition */
|
|
"module": string;
|
|
/** composed (digest set), refused by the candidate, or held without it too (words set) */
|
|
"state": "composed" | "refused" | "held";
|
|
/** why, for a refused or held one */
|
|
"words"?: string;
|
|
}
|
|
|
|
/** the node's network */
|
|
export interface NetworkHealth {
|
|
"parts": NetworkPart[];
|
|
/** since when */
|
|
"since": string;
|
|
/** running, degraded or unknown */
|
|
"state": string;
|
|
}
|
|
|
|
/** one part of the node's network */
|
|
export interface NetworkPart {
|
|
"owner"?: string;
|
|
"part": string;
|
|
"reason"?: string;
|
|
"said"?: string;
|
|
/** since when */
|
|
"since": string;
|
|
"state": string;
|
|
"streak"?: number;
|
|
"targets"?: string[];
|
|
"toward"?: string[];
|
|
"writer"?: string;
|
|
}
|
|
|
|
/** an account the node needs to log in again */
|
|
export interface NodeAccount {
|
|
"account": string;
|
|
"module"?: string;
|
|
"reason": string;
|
|
"resource"?: string;
|
|
/** since when */
|
|
"since": string;
|
|
}
|
|
|
|
/** a directory found where the node expected none */
|
|
export interface NodeDirectory {
|
|
"module": string;
|
|
"path": string;
|
|
"reason": string;
|
|
"resource": string;
|
|
/** since when */
|
|
"since": string;
|
|
}
|
|
|
|
/** what a node's own composition carries beside its resources */
|
|
export interface NodeOwn {
|
|
"adoption"?: Adoption;
|
|
"groups"?: DeclaredGroup[];
|
|
"identities"?: DeclaredIdentity[];
|
|
"libraries"?: DeclaredLibrary[];
|
|
/** the account the provisioner's client runs as on the node */
|
|
"provisioner_account"?: string;
|
|
}
|
|
|
|
/** what the machine observes of itself, for every node and composing part to read */
|
|
export interface NodeRecord {
|
|
"authority"?: string;
|
|
"capabilities"?: string[];
|
|
"certificate"?: string;
|
|
"contract"?: number;
|
|
"manifest-reads"?: string[];
|
|
"networks"?: AttachedNetwork[];
|
|
"networks-said"?: boolean;
|
|
"node": string;
|
|
"outward-links"?: string[];
|
|
"sealing-key"?: string;
|
|
"serving-key"?: string;
|
|
"trusts"?: string[];
|
|
"tunnel-key"?: string;
|
|
"v": number;
|
|
}
|
|
|
|
/** a tunnel peer and whether it is seen */
|
|
export interface PeerSeen {
|
|
"addresses"?: string[];
|
|
"key": string;
|
|
"seen": boolean;
|
|
}
|
|
|
|
/** one data item a module declares, as placed on a node */
|
|
export interface PlacedDataItem {
|
|
"class": string;
|
|
/** the path whose snapshot keeps it, empty when it is not backed up */
|
|
"covered_by"?: string;
|
|
"item": string;
|
|
/** walk, dataset or shallow */
|
|
"measure"?: string;
|
|
"module": string;
|
|
/** the item's place on the node */
|
|
"path": string;
|
|
/** backup, redundancy, both or none */
|
|
"protection"?: string;
|
|
}
|
|
|
|
/** the build one process of a module was started with */
|
|
export interface ProcessBuild {
|
|
/** the fingerprint handed to it in MESH_FINGERPRINT; empty when it was started without one */
|
|
"fingerprint"?: string;
|
|
/** service or container */
|
|
"kind": "service" | "container";
|
|
/** the module */
|
|
"module": string;
|
|
/** the service's unit or the container's name */
|
|
"process": string;
|
|
/** when it was started, RFC 3339 */
|
|
"started"?: string;
|
|
/** why its build is unknown: started before the node-engine handed MESH_FINGERPRINT, or the value could not be read */
|
|
"unknown"?: string;
|
|
}
|
|
|
|
/** what process-builds answers */
|
|
export interface ProcessBuilds {
|
|
/** why they could not be read */
|
|
"error"?: string;
|
|
/** the node */
|
|
"node": string;
|
|
/** every process the node-engine started, by module */
|
|
"processes": ProcessBuild[];
|
|
}
|
|
|
|
/** the pull from a store a failed apply waits on */
|
|
export interface PullWait {
|
|
/** when the pull began */
|
|
"began": string;
|
|
/** that seat's holder, whose settling the apply waits for */
|
|
"holder": string;
|
|
"image": string;
|
|
/** what triggered the last try again, in words */
|
|
"retried"?: string;
|
|
/** when the apply was last tried again */
|
|
"retried-at"?: string;
|
|
/** the seat the pull came through */
|
|
"seat"?: string;
|
|
}
|
|
|
|
/** one revision of a composition key */
|
|
export interface Revision {
|
|
/** its digest */
|
|
"digest"?: string;
|
|
/** the composition's key */
|
|
"key": string;
|
|
/** the latest revision */
|
|
"latest"?: boolean;
|
|
/** why it cannot be read or trusted */
|
|
"refused"?: string;
|
|
/** how many resources it names */
|
|
"resources"?: number;
|
|
/** its revision */
|
|
"revision"?: number;
|
|
}
|
|
|
|
/** the engine's verdict of whether an account's resource is root-free, as the node's health lists it */
|
|
export interface RootAccountVerdict {
|
|
"account": string;
|
|
"module": string;
|
|
"reason"?: string;
|
|
"resource": string;
|
|
/** since when */
|
|
"since": string;
|
|
"state": string;
|
|
}
|
|
|
|
/** the engine's root-free verdict (ADR 0563 §6) */
|
|
export interface RootVerdict {
|
|
/** the machine is root-free */
|
|
"free": boolean;
|
|
/** when the engine judged it, RFC 3339 */
|
|
"judged": string;
|
|
/** the machine */
|
|
"machine": string;
|
|
/** why, in words */
|
|
"why": string;
|
|
}
|
|
|
|
/** a module's build running on a node, and its health: what the node-engines of other nodes and the grants part decide a seat's pass from (ADR 0660 §2), and the assigner reads a provider's and a canary's health and a put's end from (design 47 G 520); said again on the same subject each time healthy changes and for every module the have holds at the engine's start, kept last per subject with no age limit */
|
|
export interface Running {
|
|
/** when it was said, RFC 3339 */
|
|
"at": string;
|
|
/** the fingerprint of the build it runs; none with stopped */
|
|
"fingerprint"?: string;
|
|
/** the health of the build that runs, as the node-engine's have holds it from the module's declared check (ADR 0240); a running with none, said by a node-engine of before design 47 G, reads as healthy (design 47 G 520). SeatsToPassOn reads none of it: an unhealthy holder still holds its seat */
|
|
"healthy"?: boolean | null;
|
|
/** the digest of that build's manifest, the indexer's manifest of it, read by digest from the catalog half */
|
|
"manifest"?: string;
|
|
/** the module */
|
|
"module": string;
|
|
/** the node */
|
|
"node": string;
|
|
/** true when the have no longer holds the module on the node, never for an unhealthy build: no fingerprint or manifest then (design 47 G 365, 404, 520); mesh-sdk's SeatsToPassOn counts such a module as not running there */
|
|
"stopped"?: boolean;
|
|
/** the layout's version */
|
|
"v": number;
|
|
}
|
|
|
|
/** the answer of a read-only judgement */
|
|
export interface Said {
|
|
/** the node */
|
|
"node": string;
|
|
/** the engine's judgement or search, one line per directory or program */
|
|
"said": string;
|
|
}
|
|
|
|
/** a value sealed to a key */
|
|
export interface SealedBox {
|
|
"ct": string;
|
|
"eph": string;
|
|
"iv": string;
|
|
"tag": string;
|
|
"v": number;
|
|
}
|
|
|
|
export interface SeatListStatus {
|
|
/** the seat mesh-catalog has answered */
|
|
"heard": boolean;
|
|
"held": SeatListHeld[];
|
|
"last-error"?: string;
|
|
/** a trunk definition that does not parse, by seat: the one held stands */
|
|
"refused"?: Record<string, string>;
|
|
"revision"?: number;
|
|
/** the seats held from the bootstrap alone */
|
|
"waiting"?: string[];
|
|
}
|
|
|
|
/** what an engine holds of the seat list (novox/hq ADR 0636 §7) */
|
|
export interface SeatList {
|
|
/** why the read failed, for seat-list-again */
|
|
"error"?: string;
|
|
/** the one line the engine says of it; empty when nothing waits */
|
|
"health": string;
|
|
"status": SeatListStatus;
|
|
}
|
|
|
|
export interface SeatListHeld {
|
|
/** the digest of the definition held; empty for a bootstrapped one */
|
|
"digest"?: string;
|
|
"seat": string;
|
|
"source": "trunk" | "bootstrap";
|
|
}
|
|
|
|
/** the node's units */
|
|
export interface UnitsHealth {
|
|
"away"?: string[];
|
|
"failed": FailedUnit[];
|
|
"state": string;
|
|
"unread"?: string[];
|
|
}
|
|
|
|
/** the bus's user list as the engine of the bus node wrote it to the bus module's file */
|
|
export interface UserListWritten {
|
|
/** when */
|
|
"at": string;
|
|
/** the digest of the file on the machine after the write */
|
|
"digest"?: string;
|
|
/** why a write failed */
|
|
"error"?: string;
|
|
/** which list the node follows now */
|
|
"follows"?: string;
|
|
"handed"?: AccountsHanded;
|
|
/** the bus node's sealing key, its public half */
|
|
"key"?: string;
|
|
"revision": number;
|
|
/** the key the list was taken from */
|
|
"source": string;
|
|
/** why the bus node does not watch the grants part's key now */
|
|
"unwatched"?: string;
|
|
"users": number;
|
|
/** the digest of the list the source holds, sha256:<hex> */
|
|
"wanted": string;
|
|
}
|
|
|
|
/** a hold or wait a node-engine says, the fields of the seat mesh-wants' wait (design 47 G 498, 512, 629); in the have it also carries ask-at and act (design 47 G 560) */
|
|
export interface Wait {
|
|
/** in the have: the act the recovery module answered accepted with (design 47 G 560) */
|
|
"act"?: string;
|
|
/** in the have: the time of the first ask of the recovery module for this wait (design 47 G 560) */
|
|
"ask-at"?: string;
|
|
/** a duration such as 30m */
|
|
"bound"?: string;
|
|
/** the time the bound counts from (design 47 G 266, 269, 498) */
|
|
"clock-from"?: string;
|
|
/** the node waited on: the build node for a kept build; the subject's <node> is the node that says it */
|
|
"node"?: string;
|
|
/** what it waits on */
|
|
"on"?: string;
|
|
/** the seat holding the wait: node-engine */
|
|
"owner"?: string;
|
|
/** why it holds, such as restore point missing, entry-missing, parts-differ, node away or build no longer kept (design 47 G 541, 499) */
|
|
"reason"?: string;
|
|
"since": string;
|
|
/** compose: a hold of the composition (a restore point missing, an entry missing, parts that differ, a recovery that waits); kept-build: waiting for a kept build (design 47 G 499, 541) */
|
|
"step": "compose" | "kept-build";
|
|
/** the wait said in words */
|
|
"words"?: string;
|
|
}
|
|
|
|
/** is what hand-over takes. */
|
|
export interface HandOverInput {
|
|
/** the directory's absolute path, as the engine states it */
|
|
"path": string;
|
|
/** why it is asked, in words the operator reads */
|
|
"why"?: string;
|
|
}
|
|
|
|
/** is what hand-over answers. */
|
|
export type HandOverAnswer = Asked;
|
|
|
|
/** is what access-act takes. */
|
|
export interface AccessActInput {
|
|
/** the access, library:<name> */
|
|
"access": string;
|
|
/** the act: take */
|
|
"act": string;
|
|
/** why it is asked, in words the operator reads */
|
|
"why"?: string;
|
|
}
|
|
|
|
/** is what access-act answers. */
|
|
export type AccessActAnswer = Asked;
|
|
|
|
/** is what judge-directories takes. */
|
|
export interface JudgeDirectoriesInput {
|
|
}
|
|
|
|
/** is what judge-directories answers. */
|
|
export type JudgeDirectoriesAnswer = Said;
|
|
|
|
/** is what setuid-search takes. */
|
|
export interface SetuidSearchInput {
|
|
/** why it is asked, in words */
|
|
"why"?: string;
|
|
}
|
|
|
|
/** is what setuid-search answers. */
|
|
export type SetuidSearchAnswer = Said;
|
|
|
|
/** is what root-free takes. */
|
|
export interface RootFreeInput {
|
|
}
|
|
|
|
/** is what root-free answers. */
|
|
export interface RootFreeAnswer {
|
|
/** this machine's verdict */
|
|
"machines": RootVerdict[];
|
|
}
|
|
|
|
/** is what acts takes. */
|
|
export interface ActsInput {
|
|
/** one act, by its id */
|
|
"id"?: string;
|
|
/** at most this many, newest */
|
|
"limit"?: string;
|
|
}
|
|
|
|
/** is what acts answers. */
|
|
export type ActsAnswer = Acts;
|
|
|
|
/** is what packages takes. */
|
|
export interface PackagesInput {
|
|
/** "true": write this machine's key again from what the engine composed */
|
|
"write"?: "true" | "false";
|
|
}
|
|
|
|
export interface PackagesAnswerKeyPackagesItem {
|
|
/** declared absent */
|
|
"absent": boolean;
|
|
/** the modules that declare it */
|
|
"modules": string[];
|
|
/** the package */
|
|
"package": string;
|
|
}
|
|
|
|
/** the node's key as the bus holds it; absent when the engine wrote none */
|
|
export interface PackagesAnswerKey {
|
|
/** the node */
|
|
"node": string;
|
|
/** its packages sorted by name, absent after present */
|
|
"packages": PackagesAnswerKeyPackagesItem[];
|
|
}
|
|
|
|
/** is what packages answers. */
|
|
export interface PackagesAnswer {
|
|
/** the node's key as the bus holds it; absent when the engine wrote none */
|
|
"key"?: PackagesAnswerKey;
|
|
/** why the key could not be read */
|
|
"key_error"?: string;
|
|
/** the node */
|
|
"node": string;
|
|
/** a note, such as that no key is written yet */
|
|
"note"?: string;
|
|
/** where the key is read: the engine's state packages */
|
|
"source": string;
|
|
/** with write: the key was written again (false: it already held what the engine composed) */
|
|
"wrote"?: boolean;
|
|
}
|
|
|
|
/** is what composition takes. */
|
|
export interface CompositionInput {
|
|
/** "true": list the resources that differ from what runs */
|
|
"diff"?: string;
|
|
/** a composition's digest (sha256:…), to read that revision rather than the latest */
|
|
"digest"?: string;
|
|
/** the module, as placed on this machine; node for the node's own */
|
|
"module": string;
|
|
}
|
|
|
|
/** the module's last apply that did not end running; absent when none */
|
|
export interface CompositionAnswerAttempt {
|
|
/** the want's revision the hold took */
|
|
"answered_revision"?: number;
|
|
/** the digest tried */
|
|
"composed"?: string;
|
|
/** the composition's revision it was tried at */
|
|
"composition_revision": number;
|
|
/** the fingerprint tried */
|
|
"fp": string;
|
|
/** held for a failed backup */
|
|
"held"?: boolean;
|
|
/** it failed because the bus did not answer for a moment */
|
|
"transient"?: boolean;
|
|
/** the want's revision it was tried at */
|
|
"want_revision": number;
|
|
}
|
|
|
|
/** what the module's have key says now; absent when it says nothing */
|
|
export interface CompositionAnswerHave {
|
|
/** digest */
|
|
"composed"?: string;
|
|
/** detail */
|
|
"detail"?: string;
|
|
/** fingerprint */
|
|
"fp"?: string;
|
|
/** judgement */
|
|
"judgement"?: string;
|
|
/** running, failed, held or waiting-yes */
|
|
"phase": string;
|
|
/** the digest that waits for a yes */
|
|
"waits"?: string;
|
|
}
|
|
|
|
/** the move from what runs to the composition read */
|
|
export interface CompositionAnswerJudged {
|
|
/** the judgement */
|
|
"judgement": string;
|
|
/** the agent would wait for a person's yes before applying it */
|
|
"waits_for_yes": boolean;
|
|
/** its words */
|
|
"words": string;
|
|
}
|
|
|
|
/** of the node's own composition, its own fields beside what runs names */
|
|
export interface CompositionAnswerOwn {
|
|
/** the revision's adoption; absent for a converged node */
|
|
"adoption"?: Record<string, unknown>;
|
|
/** groups */
|
|
"groups"?: number;
|
|
/** each module the node's composer held in its last pass, with why */
|
|
"held"?: Record<string, string>;
|
|
/** identities the revision names */
|
|
"identities"?: number;
|
|
/** libraries */
|
|
"libraries"?: number;
|
|
/** the account the provisioner's client runs as, as the revision names it */
|
|
"provisioner_account": string;
|
|
/** as what runs names it */
|
|
"runs_provisioner_account"?: string;
|
|
}
|
|
|
|
/** what runs of the module; absent when nothing runs */
|
|
export interface CompositionAnswerRuns {
|
|
/** digest */
|
|
"composed"?: string;
|
|
/** fingerprint */
|
|
"fp"?: string;
|
|
/** applied, have or kept */
|
|
"from": string;
|
|
/** phase */
|
|
"phase"?: string;
|
|
/** how many resources run */
|
|
"resources": number;
|
|
}
|
|
|
|
/** the module's want as the agent holds it; absent when it holds none */
|
|
export interface CompositionAnswerWant {
|
|
/** the operator's answer to a failed backup, again or skip */
|
|
"backup"?: string;
|
|
/** the composition's digest it names */
|
|
"composed"?: string;
|
|
/** its build's fingerprint */
|
|
"fp": string;
|
|
/** the module is removed */
|
|
"removed"?: boolean;
|
|
/** the revision of the want's key read last */
|
|
"revision": number;
|
|
/** the node composes the module itself (ADR 0547 §2) */
|
|
"self"?: boolean;
|
|
/** its words */
|
|
"words"?: string;
|
|
/** the digest a person said yes to */
|
|
"yes"?: string;
|
|
}
|
|
|
|
/** is what composition answers. */
|
|
export interface CompositionAnswer {
|
|
/** the module's last apply that did not end running; absent when none */
|
|
"attempt"?: CompositionAnswerAttempt;
|
|
"composition": Revision;
|
|
/** every resource that differs from what runs, when asked */
|
|
"diff"?: Record<string, unknown>[];
|
|
/** what the module's have key says now; absent when it says nothing */
|
|
"have"?: CompositionAnswerHave;
|
|
/** the move from what runs to the composition read */
|
|
"judged": CompositionAnswerJudged;
|
|
/** the module */
|
|
"module": string;
|
|
/** the node */
|
|
"node": string;
|
|
/** of the node's own composition, its own fields beside what runs names */
|
|
"own"?: CompositionAnswerOwn;
|
|
/** the revisions of its key the bucket keeps, oldest first */
|
|
"revisions"?: Revision[];
|
|
/** what runs of the module; absent when nothing runs */
|
|
"runs"?: CompositionAnswerRuns;
|
|
/** the agent has looked at the module once since it started */
|
|
"started": boolean;
|
|
/** the module's want as the agent holds it; absent when it holds none */
|
|
"want"?: CompositionAnswerWant;
|
|
}
|
|
|
|
/** is what compose takes. */
|
|
export interface ComposeInput {
|
|
/** a module placed on this machine whose apply is also tried again (optional) */
|
|
"module"?: string;
|
|
}
|
|
|
|
/** how the pass went */
|
|
export interface ComposeAnswerPass {
|
|
/** when the node composes again on its own, RFC 3339 */
|
|
"again"?: string;
|
|
/** when the pass ended, RFC 3339 */
|
|
"at": string;
|
|
/** the answer is the last pass, made moments ago */
|
|
"earlier"?: boolean;
|
|
/** how many compositions the pass handed the agent that differ from before */
|
|
"handed": number;
|
|
/** each module refused alone, with why */
|
|
"held"?: Record<string, string>;
|
|
/** why the node composed none of its modules */
|
|
"refused"?: string;
|
|
}
|
|
|
|
/** is what compose answers. */
|
|
export interface ComposeAnswer {
|
|
/** how the pass went */
|
|
"pass": ComposeAnswerPass;
|
|
/** the module whose apply was tried again */
|
|
"retried"?: string;
|
|
}
|
|
|
|
/** is what compose-candidate takes. */
|
|
export interface ComposeCandidateInput {
|
|
/** the key of the indexer's candidate, <group>.<heads hash> */
|
|
"candidate": string;
|
|
/** also answer the composition input the candidate was composed from, for the sandbox path */
|
|
"input"?: boolean;
|
|
}
|
|
|
|
/** is what compose-candidate answers. */
|
|
export interface ComposeCandidateAnswer {
|
|
/** the candidate's key */
|
|
"candidate": string;
|
|
/** when asked: the composition input it composed from */
|
|
"input"?: Record<string, unknown>;
|
|
/** every module placed on the node, sorted by name */
|
|
"modules": Module[];
|
|
/** the node */
|
|
"node": string;
|
|
"own": Module;
|
|
/** why the node could not compose with the candidate at all */
|
|
"refused"?: string;
|
|
/** how long the engine took, in milliseconds */
|
|
"took": number;
|
|
/** the layout's version */
|
|
"v": number;
|
|
/** the node's verdict (ADR 0593 §7, §9) */
|
|
"verdict": "composed" | "refused" | "unready" | "not-judged";
|
|
}
|
|
|
|
/** is what manifest-reads takes. */
|
|
export interface ManifestReadsInput {
|
|
}
|
|
|
|
/** is what manifest-reads answers. */
|
|
export interface ManifestReadsAnswer {
|
|
/** 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 */
|
|
"manifest-reads"?: string[];
|
|
/** the node */
|
|
"node": string;
|
|
/** when the engine last stated them, RFC 3339 */
|
|
"stated-at": string;
|
|
/** the layout's version */
|
|
"v": number;
|
|
}
|
|
|
|
/** is what seat-list takes. */
|
|
export interface SeatListInput {
|
|
}
|
|
|
|
/** is what seat-list answers. */
|
|
export type SeatListAnswer = SeatList;
|
|
|
|
/** is what seat-list-again takes. */
|
|
export interface SeatListAgainInput {
|
|
}
|
|
|
|
/** is what seat-list-again answers. */
|
|
export type SeatListAgainAnswer = SeatList;
|
|
|
|
/** is what first-views takes. */
|
|
export interface FirstViewsInput {
|
|
}
|
|
|
|
export interface FirstViewsAnswerEntriesItem {
|
|
/** the build's fingerprint */
|
|
"fingerprint": string;
|
|
/** since when it stands in that state, RFC 3339 */
|
|
"since": string;
|
|
/** asked of the indexer, answered, or not found by it */
|
|
"state": "asked" | "answered" | "not-found";
|
|
}
|
|
|
|
export interface FirstViewsAnswerWantsItem {
|
|
/** the fingerprint wanted */
|
|
"fingerprint": string;
|
|
/** since when the want is kept, RFC 3339 */
|
|
"kept-since": string;
|
|
/** the module the want is of */
|
|
"module": string;
|
|
}
|
|
|
|
/** is what first-views answers. */
|
|
export interface FirstViewsAnswer {
|
|
/** one row per entry the node-engine keeps of a module's build by its fingerprint: when it asked the indexer's entry and where that stands (design 47 G 698) */
|
|
"entries": FirstViewsAnswerEntriesItem[];
|
|
/** one status per owner and state followed, as mesh-sdk's views runtime keeps it */
|
|
"first-views": Record<string, unknown>[];
|
|
/** the wants the node-engine keeps (design 47 G 683, 698) */
|
|
"wants": FirstViewsAnswerWantsItem[];
|
|
}
|
|
|
|
/** is what first-view-again takes. */
|
|
export interface FirstViewAgainInput {
|
|
/** the owner module, as first-views names it */
|
|
"owner": string;
|
|
/** the owner's state, as first-views names it */
|
|
"state": string;
|
|
/** why it is asked again, in plain words */
|
|
"why": string;
|
|
}
|
|
|
|
/** the hand ask written */
|
|
export interface FirstViewAgainAnswerAsked {
|
|
/** when it was asked, RFC 3339 */
|
|
"at": string;
|
|
/** the caller the runtime proved */
|
|
"by": string;
|
|
/** the owner module */
|
|
"owner": string;
|
|
/** the owner's state */
|
|
"state": string;
|
|
/** the layout's version */
|
|
"v": number;
|
|
/** why it was asked again */
|
|
"why": string;
|
|
}
|
|
|
|
/** is what first-view-again answers. */
|
|
export interface FirstViewAgainAnswer {
|
|
/** the hand ask written */
|
|
"asked": FirstViewAgainAnswerAsked;
|
|
/** the verb that reads the status, first-views */
|
|
"read": string;
|
|
}
|
|
|
|
/** is what entry-again takes. */
|
|
export interface EntryAgainInput {
|
|
/** the build's fingerprint, as first-views' entries name it */
|
|
"fingerprint": string;
|
|
/** why it is asked again, in plain words */
|
|
"why": string;
|
|
}
|
|
|
|
/** the hand ask written */
|
|
export interface EntryAgainAnswerAsked {
|
|
/** when it was asked, RFC 3339 */
|
|
"at": string;
|
|
/** the caller the runtime proved */
|
|
"by": string;
|
|
/** the build's fingerprint */
|
|
"fingerprint": string;
|
|
/** the layout's version */
|
|
"v": number;
|
|
/** why it was asked again */
|
|
"why": string;
|
|
}
|
|
|
|
/** is what entry-again answers. */
|
|
export interface EntryAgainAnswer {
|
|
/** the hand ask written */
|
|
"asked": EntryAgainAnswerAsked;
|
|
/** the verb that reads the status, first-views */
|
|
"read": string;
|
|
}
|
|
|
|
/** is what process-builds takes. */
|
|
export interface ProcessBuildsInput {
|
|
/** only this module's processes */
|
|
"module"?: string;
|
|
}
|
|
|
|
/** is what process-builds answers. */
|
|
export type ProcessBuildsAnswer = ProcessBuilds;
|
|
|
|
/** is the body of the event asked. */
|
|
export type AskedEvent = ActSaid;
|
|
|
|
/** is the body of the event done. */
|
|
export type DoneEvent = ActSaid;
|
|
|
|
/** is the body of the event refused. */
|
|
export type RefusedEvent = ActSaid;
|
|
|
|
/** is the body of the event manifest-reads-changed. */
|
|
export type ManifestReadsChangedEvent = ManifestReadsChanged;
|
|
|
|
/** is the body of the event composed. */
|
|
export type ComposedEvent = Composed;
|
|
|
|
/** is the body of the event running. */
|
|
export type RunningEvent = Running;
|
|
|
|
/** is the body of the event wait-held. */
|
|
export type WaitHeldEvent = Wait;
|
|
|
|
/** is the body of the event wait-ended. */
|
|
export type WaitEndedEvent = Wait;
|
|
|
|
/** is one value of the state have under the key <node>.<module>. */
|
|
export interface HaveByNodeModuleValue {
|
|
"build"?: string;
|
|
/** the move changes the build alone */
|
|
"build-alone"?: boolean;
|
|
/** the digest of the composition the node runs */
|
|
"composed"?: string;
|
|
"detail"?: string;
|
|
/** the fingerprint held */
|
|
"fp"?: string;
|
|
"handed"?: AccountsHanded;
|
|
/** what the module's own check says */
|
|
"health": "ok" | "failed" | "waits" | "unknown";
|
|
/** in phase waiting-yes, the judgement of the move */
|
|
"judgement"?: "recreates" | "moves-data" | "cannot-judge";
|
|
/** what the node keeps of the module as it runs */
|
|
"kept"?: string[];
|
|
/** how far it has come */
|
|
"phase": "backing-up" | "applying" | "checking" | "running" | "failed" | "removed" | "held" | "waiting-yes";
|
|
"pull-wait"?: PullWait;
|
|
/** each value sealed to the node's key */
|
|
"sealed"?: string[];
|
|
/** the sealed values by slot */
|
|
"sealed-at"?: Record<string, string>;
|
|
"user-list"?: UserListWritten;
|
|
"v": number;
|
|
"wait"?: Wait;
|
|
/** in phase waiting-yes, the digest of the composition that waits */
|
|
"waits"?: string;
|
|
}
|
|
|
|
/** is one value of the state have under the key <node>.node. */
|
|
export interface HaveByNodeNodeValue {
|
|
"busy"?: Record<string, unknown>[];
|
|
/** the node's answer to each placement candidate naming it, by proposal id */
|
|
"candidates"?: Record<string, CandidateAnswer>;
|
|
/** the digest of the node's own composition it runs */
|
|
"composed"?: string;
|
|
/** own, or none (empty) */
|
|
"composes"?: string;
|
|
"composes-why"?: string;
|
|
"filters"?: Record<string, unknown>[];
|
|
"profile"?: Record<string, unknown>;
|
|
"record"?: NodeRecord;
|
|
"sealed"?: string[];
|
|
"sealed-at"?: Record<string, string>;
|
|
"strays"?: Record<string, unknown>[];
|
|
"v": number;
|
|
"windows"?: Record<string, unknown>[];
|
|
}
|
|
|
|
/** is one value of the state composed under the key <node>.<module>.<fingerprint>. */
|
|
export interface ComposedByNodeModuleFingerprintValue {
|
|
/** the module declares data */
|
|
"data"?: boolean;
|
|
/** the files the provisioner fills */
|
|
"filled_files"?: string[];
|
|
"fp": string;
|
|
"module": string;
|
|
"node": string;
|
|
/** the module's whole provisioning plan, catalogue.Plan, kept whole: it is the manifest layer's type */
|
|
"plan"?: Record<string, unknown>;
|
|
/** why the module cannot be composed at this fingerprint */
|
|
"refused"?: string;
|
|
/** the declaration resources, each saying its module */
|
|
"resources": Record<string, unknown>[];
|
|
"v": number;
|
|
}
|
|
|
|
/** is one value of the state composed under the key <node>.node. */
|
|
export interface ComposedByNodeNodeValue {
|
|
/** the module declares data */
|
|
"data"?: boolean;
|
|
/** the files the provisioner fills */
|
|
"filled_files"?: string[];
|
|
"node": string;
|
|
"own"?: NodeOwn;
|
|
/** the declaration resources, each saying its module */
|
|
"resources": Record<string, unknown>[];
|
|
"v": number;
|
|
}
|
|
|
|
/** is one value of the state data under the key <node>.<module>. */
|
|
export interface DataByNodeModuleValue {
|
|
"digest": string;
|
|
"items": PlacedDataItem[];
|
|
"module": string;
|
|
"node": string;
|
|
"v": number;
|
|
}
|
|
|
|
export interface PackagesByNodeValuePackagesItem {
|
|
"absent": boolean;
|
|
"modules": string[];
|
|
"package": string;
|
|
}
|
|
|
|
/** is one value of the state packages under the key <node>. */
|
|
export interface PackagesByNodeValue {
|
|
"node": string;
|
|
"packages": PackagesByNodeValuePackagesItem[];
|
|
}
|
|
|
|
/** is one value of the state health under the key <node>. */
|
|
export interface HealthByNodeValue {
|
|
/** when */
|
|
"at": string;
|
|
"contract"?: number;
|
|
"fallback"?: LoginFallback;
|
|
"found"?: NodeDirectory[];
|
|
"network"?: NetworkHealth;
|
|
"node": string;
|
|
"peers"?: PeerSeen[];
|
|
"relogin"?: NodeAccount[];
|
|
"root"?: RootAccountVerdict[];
|
|
"units"?: UnitsHealth;
|
|
"v": number;
|
|
}
|
|
|
|
/** is one value of the state findings under the key <key>. */
|
|
export interface FindingsByKeyValue {
|
|
"actions"?: FindingAction[];
|
|
"at": string;
|
|
/** newest first, at most 10 */
|
|
"evidence"?: FindingEvidence[];
|
|
"explanation"?: string;
|
|
"headline"?: string;
|
|
/** scope.id.token */
|
|
"key": string;
|
|
"kind": string;
|
|
"needs"?: string;
|
|
/** the module that wrote it */
|
|
"observer": string;
|
|
/** the key's last part when it is not the kind */
|
|
"ref"?: string;
|
|
"resolved"?: string;
|
|
/** self, operator, agent or healer:<name> */
|
|
"resolver"?: string;
|
|
/** what of its own saw it last */
|
|
"run"?: string;
|
|
"severity": "urgent" | "warning";
|
|
/** the row, probe or event that saw it */
|
|
"source": string;
|
|
"subject": FindingSubject;
|
|
/** one line */
|
|
"summary": string;
|
|
/** layout version, 1 */
|
|
"v": number;
|
|
}
|
|
|
|
/** is one value of the state bounds under the key <what>.<id>. */
|
|
export interface BoundsByWhatIDValue {
|
|
"module"?: string;
|
|
/** when the wait began, RFC 3339 */
|
|
"since": string;
|
|
/** layout version, 1 */
|
|
"v": number;
|
|
}
|
|
|