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
@@ -2,85 +2,34 @@
// The contract of the seat "mesh-provisioner", defined whole (seats/mesh-provisioner/seat.json): The provisioner (ADR 0349): which domain answers which kind of placeholder, what each module needs, what is applied where.
export const seat = "mesh-provisioner";
export declare const seat: "mesh-provisioner";
export const verbs = {
provisioning: "provisioning",
} as const;
export declare const verbs: {
readonly provisioning: "provisioning";
};
export const states = {
plans: "plans",
provisions: "provisions",
} as const;
export declare const states: {
readonly plans: "plans";
readonly provisions: "provisions";
};
/** The key of one value of the state plans under the form "<node>.<module>". */
export function plansByNodeModuleKey(node: string, module: string): string {
return node + "." + module;
}
export declare function plansByNodeModuleKey(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 parsePlansByNodeModuleKey(_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 parsePlansByNodeModuleKey(_key: string): { node: string; module: string } | undefined;
/** The key of one value of the state provisions under the form "<node>.<consumer>.<provision>". */
export function provisionsByNodeConsumerProvisionKey(node: string, consumer: string, provision: string): string {
return node + "." + consumer + "." + provision;
}
export declare function provisionsByNodeConsumerProvisionKey(node: string, consumer: string, provision: string): string;
/** The parts of a key of the form "<node>.<consumer>.<provision>", or undefined for a key of another form. */
export function parseProvisionsByNodeConsumerProvisionKey(_key: string): { node: string; consumer: string; provision: 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 consumer = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const provision = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, consumer, provision };
}
export declare function parseProvisionsByNodeConsumerProvisionKey(_key: string): { node: string; consumer: string; provision: string } | undefined;
/** The key of one value of the state provisions under the form "<node>.<consumer>.<provision>.<local>". */
export function provisionsByNodeConsumerProvisionLocalKey(node: string, consumer: string, provision: string, local: string): string {
return node + "." + consumer + "." + provision + "." + local;
}
export declare function provisionsByNodeConsumerProvisionLocalKey(node: string, consumer: string, provision: string, local: string): string;
/** The parts of a key of the form "<node>.<consumer>.<provision>.<local>", or undefined for a key of another form. */
export function parseProvisionsByNodeConsumerProvisionLocalKey(_key: string): { node: string; consumer: string; provision: string; local: 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 consumer = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
const _at4 = _rest.indexOf(".");
if (_at4 <= 0) return undefined;
const provision = _rest.slice(0, _at4);
_rest = _rest.slice(_at4 + 1);
if (_rest === "") return undefined;
const local = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, consumer, provision, local };
}
export declare function parseProvisionsByNodeConsumerProvisionLocalKey(_key: string): { node: string; consumer: string; provision: string; local: string } | undefined;
/** is what provisioning takes. */
export interface ProvisioningInput {
@@ -0,0 +1,84 @@
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "mesh-provisioner", defined whole (seats/mesh-provisioner/seat.json): The provisioner (ADR 0349): which domain answers which kind of placeholder, what each module needs, what is applied where.
export const seat = "mesh-provisioner";
export const verbs = {
provisioning: "provisioning",
};
export const states = {
plans: "plans",
provisions: "provisions",
};
/** The key of one value of the state plans under the form "<node>.<module>". */
export function plansByNodeModuleKey(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 parsePlansByNodeModuleKey(_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 provisions under the form "<node>.<consumer>.<provision>". */
export function provisionsByNodeConsumerProvisionKey(node, consumer, provision) {
return node + "." + consumer + "." + provision;
}
/** The parts of a key of the form "<node>.<consumer>.<provision>", or undefined for a key of another form. */
export function parseProvisionsByNodeConsumerProvisionKey(_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 consumer = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const provision = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, consumer, provision };
}
/** The key of one value of the state provisions under the form "<node>.<consumer>.<provision>.<local>". */
export function provisionsByNodeConsumerProvisionLocalKey(node, consumer, provision, local) {
return node + "." + consumer + "." + provision + "." + local;
}
/** The parts of a key of the form "<node>.<consumer>.<provision>.<local>", or undefined for a key of another form. */
export function parseProvisionsByNodeConsumerProvisionLocalKey(_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 consumer = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
const _at4 = _rest.indexOf(".");
if (_at4 <= 0) return undefined;
const provision = _rest.slice(0, _at4);
_rest = _rest.slice(_at4 + 1);
if (_rest === "") return undefined;
const local = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, consumer, provision, local };
}
+2 -2
View File
@@ -1,9 +1,9 @@
{
"lockfileVersion": 3,
"name": "@novox/mesh-provisioning-contracts-mesh-provisioner",
"name": "@novox/mesh-contracts-provisioning-mesh-provisioner",
"packages": {
"": {
"name": "@novox/mesh-provisioning-contracts-mesh-provisioner",
"name": "@novox/mesh-contracts-provisioning-mesh-provisioner",
"version": "0.1.0"
}
},
@@ -1,13 +1,18 @@
{
"description": "The contract of the seat mesh-provisioner, 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-provisioning-contracts-mesh-provisioner",
"name": "@novox/mesh-contracts-provisioning-mesh-provisioner",
"type": "module",
"types": "./src/index.ts",
"types": "./index.d.ts",
"version": "0.1.0"
}