C14: the generated Go and TypeScript of every seat follow the definitions

Written by seatgen at c62650e4 (GEN3) with mesh-sdk b19fc7fa (reader release): the seat mesh-grants new,
every TypeScript contract as index.js with index.d.ts, events with subject and stream. mesh-watchdogs gains
its family, which a definition with events needs. Written with the reader as it is: the field needs-approval
(node-login-shell) and the section bodies (mesh-conditions) are unknown to it, so they were laid aside for
the run; nothing generated carries either.

Builds: design 47 G §339, §341, §261, §389

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 10:45:30 +01:00
parent 44492ce555
commit e529c372d0
68 changed files with 2951 additions and 969 deletions
@@ -1,196 +1,116 @@
// 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.
// 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 const seat = "node-engine";
export declare const seat: "node-engine";
export const verbs = {
handOver: "hand-over",
accessAct: "access-act",
judgeDirectories: "judge-directories",
setuidSearch: "setuid-search",
rootFree: "root-free",
acts: "acts",
packages: "packages",
composition: "composition",
compose: "compose",
composeCandidate: "compose-candidate",
manifestReads: "manifest-reads",
seatList: "seat-list",
seatListAgain: "seat-list-again",
} as const;
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 processBuilds: "process-builds";
};
export const events = {
asked: "asked",
done: "done",
refused: "refused",
manifestReadsChanged: "manifest-reads-changed",
} as const;
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 capabilitiesChanged: "capabilities-changed";
};
export const family = { name: "node-engine.events", maxAgeDays: 7 } as const;
export declare const family: { readonly name: "node-engine.events"; readonly maxAgeDays: 7 };
export function askedSubject(caller: string): string {
return "mesh.seat.node-engine.event.asked." + caller;
}
export declare function askedSubject(caller: string): string;
export function doneSubject(caller: string): string {
return "mesh.seat.node-engine.event.done." + caller;
}
export declare function doneSubject(caller: string): string;
export function refusedSubject(caller: string): string {
return "mesh.seat.node-engine.event.refused." + caller;
}
export declare function refusedSubject(caller: string): string;
export function manifestReadsChangedSubject(caller: string): string {
return "mesh.seat.node-engine.event.manifest-reads-changed." + caller;
}
export declare function manifestReadsChangedSubject(caller: string): string;
export const states = {
have: "have",
composed: "composed",
data: "data",
packages: "packages",
health: "health",
findings: "findings",
} as const;
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 function capabilitiesChangedSubject(node: string): string;
export declare const capabilitiesChangedSubjectAll: "mesh.seat.node-engine.event.capabilities-changed.*";
export declare const states: {
readonly have: "have";
readonly composed: "composed";
readonly data: "data";
readonly packages: "packages";
readonly health: "health";
readonly findings: "findings";
};
/** The key of one value of the state have under the form "<node>.<module>". */
export function haveByNodeModuleKey(node: string, module: string): string {
return 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 function parseHaveByNodeModuleKey(_key: string): { node: string; module: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
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 function haveByNodeNodeKey(node: string): string {
return 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 function parseHaveByNodeNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
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 function composedByNodeModuleFingerprintKey(node: string, module: string, fingerprint: string): string {
return 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 function parseComposedByNodeModuleFingerprintKey(_key: string): { node: string; module: string; fingerprint: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const module = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const fingerprint = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module, fingerprint };
}
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 function composedByNodeNodeKey(node: string): string {
return 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 function parseComposedByNodeNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
export declare function parseComposedByNodeNodeKey(_key: string): { node: string } | undefined;
/** The key of one value of the state data under the form "<node>.<module>". */
export function dataByNodeModuleKey(node: string, module: string): string {
return 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 function parseDataByNodeModuleKey(_key: string): { node: string; module: string } | undefined {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
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 function packagesByNodeKey(node: string): string {
return 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 function parsePackagesByNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
export declare function parsePackagesByNodeKey(_key: string): { node: string } | undefined;
/** The key of one value of the state health under the form "<node>". */
export function healthByNodeKey(node: string): string {
return 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 function parseHealthByNodeKey(_key: string): { node: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
export declare function parseHealthByNodeKey(_key: string): { node: string } | undefined;
/** The key of one value of the state findings under the form "<key>". */
export function findingsByKeyKey(key: string): string {
return 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 function parseFindingsByKeyKey(_key: string): { key: string } | undefined {
let _rest = _key;
if (_rest === "") return undefined;
const key = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { key };
}
export declare function parseFindingsByKeyKey(_key: string): { key: string } | undefined;
/** the hashes of the users of the list, sealed to the vault */
export interface AccountsHanded {
@@ -347,6 +267,34 @@ export interface CandidateRefusal {
"why": string;
}
/** a node's capabilities changed, which the assigner places by */
export interface CapabilitiesChanged {
/** when, RFC 3339 */
"at": string;
/** its capabilities now */
"capabilities": string[];
/** the node */
"node": string;
/** the layout's version */
"v": number;
}
/** 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;
@@ -547,6 +495,32 @@ export interface PlacedDataItem {
"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 */
@@ -601,6 +575,24 @@ export interface RootVerdict {
"why": string;
}
/** a module running healthy on a node at a build: what the node-engines of other nodes and the grants part decide a seat's pass from (ADR 0660 §2), kept last per subject with no age limit */
export interface Running {
/** when it was seen running healthy, RFC 3339 */
"at": string;
/** the fingerprint of the build it runs; none with stopped */
"fingerprint"?: string;
/** 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 module no longer runs on the node: no fingerprint or manifest then (design 47 G 365, 404); 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 */
@@ -999,6 +991,15 @@ export interface SeatListAgainInput {
/** is what seat-list-again answers. */
export type SeatListAgainAnswer = SeatList;
/** 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;
@@ -1011,6 +1012,15 @@ 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 capabilities-changed. */
export type CapabilitiesChangedEvent = CapabilitiesChanged;
/** is one value of the state have under the key <node>.<module>. */
export interface HaveByNodeModuleValue {
"build"?: string;
+218
View File
@@ -0,0 +1,218 @@
// 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 const seat = "node-engine";
export const verbs = {
handOver: "hand-over",
accessAct: "access-act",
judgeDirectories: "judge-directories",
setuidSearch: "setuid-search",
rootFree: "root-free",
acts: "acts",
packages: "packages",
composition: "composition",
compose: "compose",
composeCandidate: "compose-candidate",
manifestReads: "manifest-reads",
seatList: "seat-list",
seatListAgain: "seat-list-again",
processBuilds: "process-builds",
};
export const events = {
asked: "asked",
done: "done",
refused: "refused",
manifestReadsChanged: "manifest-reads-changed",
composed: "composed",
running: "running",
capabilitiesChanged: "capabilities-changed",
};
export const family = { name: "node-engine.events", maxAgeDays: 7 };
export function askedSubject(caller) {
return "mesh.seat.node-engine.event.asked." + caller;
}
export function doneSubject(caller) {
return "mesh.seat.node-engine.event.done." + caller;
}
export function refusedSubject(caller) {
return "mesh.seat.node-engine.event.refused." + caller;
}
export function manifestReadsChangedSubject(caller) {
return "mesh.seat.node-engine.event.manifest-reads-changed." + caller;
}
export function composedSubject(node) {
return "mesh.seat.node-engine.event.composed." + node;
}
export const composedSubjectAll = "mesh.seat.node-engine.event.composed.*";
export const runningStream = "SEAT_node-engine_running";
export function runningSubject(node, module) {
return "mesh.seat.node-engine.event.running." + node + "." + module;
}
export const runningSubjectAll = "mesh.seat.node-engine.event.running.*.*";
export function capabilitiesChangedSubject(node) {
return "mesh.seat.node-engine.event.capabilities-changed." + node;
}
export const capabilitiesChangedSubjectAll = "mesh.seat.node-engine.event.capabilities-changed.*";
export const states = {
have: "have",
composed: "composed",
data: "data",
packages: "packages",
health: "health",
findings: "findings",
};
/** The key of one value of the state have under the form "<node>.<module>". */
export function haveByNodeModuleKey(node, module) {
return node + "." + module;
}
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
export function parseHaveByNodeModuleKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
/** The key of one value of the state have under the form "<node>.node". */
export function haveByNodeNodeKey(node) {
return node + ".node";
}
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
export function parseHaveByNodeNodeKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state composed under the form "<node>.<module>.<fingerprint>". */
export function composedByNodeModuleFingerprintKey(node, module, fingerprint) {
return node + "." + module + "." + fingerprint;
}
/** The parts of a key of the form "<node>.<module>.<fingerprint>", or undefined for a key of another form. */
export function parseComposedByNodeModuleFingerprintKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const module = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const fingerprint = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module, fingerprint };
}
/** The key of one value of the state composed under the form "<node>.node". */
export function composedByNodeNodeKey(node) {
return node + ".node";
}
/** The parts of a key of the form "<node>.node", or undefined for a key of another form. */
export function parseComposedByNodeNodeKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".node");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 5);
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state data under the form "<node>.<module>". */
export function dataByNodeModuleKey(node, module) {
return node + "." + module;
}
/** The parts of a key of the form "<node>.<module>", or undefined for a key of another form. */
export function parseDataByNodeModuleKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const node = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const module = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, module };
}
/** The key of one value of the state packages under the form "<node>". */
export function packagesByNodeKey(node) {
return node;
}
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
export function parsePackagesByNodeKey(_key) {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state health under the form "<node>". */
export function healthByNodeKey(node) {
return node;
}
/** The parts of a key of the form "<node>", or undefined for a key of another form. */
export function parseHealthByNodeKey(_key) {
let _rest = _key;
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state findings under the form "<key>". */
export function findingsByKeyKey(key) {
return key;
}
/** The parts of a key of the form "<key>", or undefined for a key of another form. */
export function parseFindingsByKeyKey(_key) {
let _rest = _key;
if (_rest === "") return undefined;
const key = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { key };
}
+8 -3
View File
@@ -1,13 +1,18 @@
{
"description": "The contract of the seat node-engine, generated from its definition.",
"exports": {
".": "./src/index.ts"
".": {
"default": "./index.js",
"types": "./index.d.ts"
}
},
"files": [
"src"
"index.js",
"index.d.ts",
"parts"
],
"name": "@novox/mesh-contracts-node-engine",
"type": "module",
"types": "./src/index.ts",
"types": "./index.d.ts",
"version": "0.1.0"
}