MV1: move contracts and sdk under modules/, importers follow

The delivery repository's contracts and SDK live under modules/ as
mesh-delivery-contracts and mesh-delivery-sdk, their Go module paths
renamed to match the folders (the TypeScript names already did), and
every importer in mesh-delivery, mesh-catalog, mesh-host, mesh-tools
and mesh-sdk follows in the same group: a design as it should be, one
path per module, checked by the group's check building every importer.

Builds: design 47 G §427, §88

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 05:09:56 +01:00
parent 512bb3c75c
commit 71a35a6376
769 changed files with 1277 additions and 1277 deletions
@@ -0,0 +1,213 @@
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "node-build-node", defined whole (seats/node-build-node/seat.json): The Node build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.
import type * as buildStep from "./parts/build-step.js";
export declare const seat: "node-build-node";
export declare const verbs: {
readonly current: "current";
readonly pause: "pause";
readonly resume: "resume";
readonly drop: "drop";
readonly keptArtifact: "kept-artifact";
readonly steps: "steps";
};
export declare const accepts: {
readonly delivery: "delivery";
readonly check: "check";
readonly checkStep: "check.step";
readonly deliveryStep: "delivery.step";
readonly recheck: "recheck";
};
export declare const events: {
readonly stepEnded: "step-ended";
readonly toolchainReported: "toolchain-reported";
readonly stepProgress: "step-progress";
readonly askTaken: "ask-taken";
};
export declare const family: { readonly name: "node-build-node.events"; readonly maxAgeDays: 7 };
export declare const stepEndedStream: "SEAT_node-build-node_step-ended";
export declare function stepEndedSubject(node: string): string;
export declare const stepEndedSubjectAll: "mesh.seat.node-build-node.event.step-ended.*";
export declare const toolchainReportedStream: "SEAT_node-build-node_toolchain-reported";
export declare function toolchainReportedSubject(node: string): string;
export declare const toolchainReportedSubjectAll: "mesh.seat.node-build-node.event.toolchain-reported.*";
export declare function stepProgressSubject(node: string): string;
export declare const stepProgressSubjectAll: "mesh.seat.node-build-node.event.step-progress.*";
export declare function askTakenSubject(node: string): string;
export declare const askTakenSubjectAll: "mesh.seat.node-build-node.event.ask-taken.*";
export declare const deliverySubject: "mesh.seat.node-build-node.accept.delivery";
export declare const checkSubject: "mesh.seat.node-build-node.accept.check";
export declare const checkStepSubject: "mesh.seat.node-build-node.accept.check.step";
export declare const deliveryStepSubject: "mesh.seat.node-build-node.accept.delivery.step";
export declare const recheckSubject: "mesh.seat.node-build-node.accept.recheck";
export declare const states: {
readonly steps: "steps";
readonly pauses: "pauses";
readonly toolchains: "toolchains";
readonly detectedSteps: "detected-steps";
};
/** The key of one value of the state steps under the form "<asker>.<node>.<id>". */
export declare function stepsByAskerNodeIDKey(asker: string, node: string, id: string): string;
/** The parts of a key of the form "<asker>.<node>.<id>", or undefined for a key of another form. */
export declare function parseStepsByAskerNodeIDKey(_key: string): { asker: string; node: string; id: string } | undefined;
/** The key of one value of the state steps under the form "<node>.<id>". */
export declare function stepsByNodeIDKey(node: string, id: string): string;
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
export declare function parseStepsByNodeIDKey(_key: string): { node: string; id: string } | undefined;
/** The key of one value of the state pauses under the form "paused.<node>". */
export declare function pausesByPausedNodeKey(node: string): string;
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
export declare function parsePausesByPausedNodeKey(_key: string): { node: string } | undefined;
/** The key of one value of the state pauses under the form "dropped.<id>". */
export declare function pausesByDroppedIDKey(id: string): string;
/** The parts of a key of the form "dropped.<id>", or undefined for a key of another form. */
export declare function parsePausesByDroppedIDKey(_key: string): { id: string } | undefined;
/** The key of one value of the state pauses under the form "capacity.<node>". */
export declare function pausesByCapacityNodeKey(node: string): string;
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
export declare function parsePausesByCapacityNodeKey(_key: string): { node: string } | undefined;
/** The key of one value of the state toolchains under the form "<node>.<language>". */
export declare function toolchainsByNodeLanguageKey(node: string, language: string): string;
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
export declare function parseToolchainsByNodeLanguageKey(_key: string): { node: string; language: string } | undefined;
/** The key of one value of the state detected-steps under the form "<module>.<artifact>". */
export declare function detectedStepsByModuleArtifactKey(module: string, artifact: string): string;
/** The parts of a key of the form "<module>.<artifact>", or undefined for a key of another form. */
export declare function parseDetectedStepsByModuleArtifactKey(_key: string): { module: string; artifact: string } | undefined;
export type AskArtifact = buildStep.AskArtifact;
export type AskTaken = buildStep.AskTaken;
export type AskTakenEvent = buildStep.AskTakenEvent;
export type BuildAnswer = buildStep.BuildAnswer;
export type BuiltArtifact = buildStep.BuiltArtifact;
export type BuiltArtifactResolvedItem = buildStep.BuiltArtifactResolvedItem;
export type Capacity = buildStep.Capacity;
export type CheckAnswer = buildStep.CheckAnswer;
export type ComposeAnswer = buildStep.ComposeAnswer;
export type CurrentAnswer = buildStep.CurrentAnswer;
export type CurrentInput = buildStep.CurrentInput;
export type DetectedStep = buildStep.DetectedStep;
export type DetectedSteps = buildStep.DetectedSteps;
export type Drop = buildStep.Drop;
export type DropAnswer = buildStep.DropAnswer;
export type DropInput = buildStep.DropInput;
export type Fetch = buildStep.Fetch;
export type FetchAnswer = buildStep.FetchAnswer;
export type FetchBesideItem = buildStep.FetchBesideItem;
export type FetchBuildsItem = buildStep.FetchBuildsItem;
export type FetchPackage = buildStep.FetchPackage;
export type FetchRefusal = buildStep.FetchRefusal;
export type KeptArtifactAnswer = buildStep.KeptArtifactAnswer;
export type KeptArtifactInput = buildStep.KeptArtifactInput;
export type KeptResult = buildStep.KeptResult;
export type LevelAnswer = buildStep.LevelAnswer;
export type LevelAnswerDigest = buildStep.LevelAnswerDigest;
export type LevelAnswerDigestNeedsItem = buildStep.LevelAnswerDigestNeedsItem;
export type LevelAnswerDigestPackagesItem = buildStep.LevelAnswerDigestPackagesItem;
export type LevelAnswerKeptItem = buildStep.LevelAnswerKeptItem;
export type LevelAnswerUnmetItem = buildStep.LevelAnswerUnmetItem;
export type ModuleTree = buildStep.ModuleTree;
export type Pause = buildStep.Pause;
export type PauseAnswer = buildStep.PauseAnswer;
export type PauseInput = buildStep.PauseInput;
export type PlacedBeside = buildStep.PlacedBeside;
export type Program = buildStep.Program;
export type ResumeAnswer = buildStep.ResumeAnswer;
export type ResumeInput = buildStep.ResumeInput;
export type RunAnswer = buildStep.RunAnswer;
export type RunHead = buildStep.RunHead;
export type RunInput = buildStep.RunInput;
export type RunJob = buildStep.RunJob;
export type RunProgram = buildStep.RunProgram;
export type Step = buildStep.Step;
export type StepAsk = buildStep.StepAsk;
export type StepAskBuild = buildStep.StepAskBuild;
export type StepAskCheck = buildStep.StepAskCheck;
export type StepAskCompose = buildStep.StepAskCompose;
export type StepEnded = buildStep.StepEnded;
export type StepEndedEvent = buildStep.StepEndedEvent;
export type StepProgress = buildStep.StepProgress;
export type StepProgressEvent = buildStep.StepProgressEvent;
export type StepResult = buildStep.StepResult;
export type StepRun = buildStep.StepRun;
export type StepsAnswer = buildStep.StepsAnswer;
export type StepsInput = buildStep.StepsInput;
export type TakenVersion = buildStep.TakenVersion;
export type TestCounts = buildStep.TestCounts;
export type Toolchain = buildStep.Toolchain;
export type ToolchainReported = buildStep.ToolchainReported;
export type ToolchainReportedEvent = buildStep.ToolchainReportedEvent;
export type ToolchainUsed = buildStep.ToolchainUsed;
/** is the body of delivery. */
export type DeliveryAccept = StepAsk;
/** is the body of check. */
export type CheckAccept = StepAsk;
/** is the body of check.step. */
export type CheckStepAccept = StepAsk;
/** is the body of delivery.step. */
export type DeliveryStepAccept = StepAsk;
/** is the body of recheck. */
export type RecheckAccept = StepAsk;
/** is one value of the state steps under the key <asker>.<node>.<id>. */
export type StepsByAskerNodeIDValue = Step;
/** is one value of the state steps under the key <node>.<id>. */
export type StepsByNodeIDValue = Step;
/** is one value of the state pauses under the key paused.<node>. */
export type PausesByPausedNodeValue = Pause;
/** is one value of the state pauses under the key dropped.<id>. */
export type PausesByDroppedIDValue = Drop;
/** is one value of the state pauses under the key capacity.<node>. */
export type PausesByCapacityNodeValue = Capacity;
/** is one value of the state toolchains under the key <node>.<language>. */
export type ToolchainsByNodeLanguageValue = Toolchain;
/** is one value of the state detected-steps under the key <module>.<artifact>. */
export type DetectedStepsByModuleArtifactValue = DetectedSteps;
@@ -0,0 +1,208 @@
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "node-build-node", defined whole (seats/node-build-node/seat.json): The Node build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.
export const seat = "node-build-node";
export const verbs = {
current: "current",
pause: "pause",
resume: "resume",
drop: "drop",
keptArtifact: "kept-artifact",
steps: "steps",
};
export const accepts = {
delivery: "delivery",
check: "check",
checkStep: "check.step",
deliveryStep: "delivery.step",
recheck: "recheck",
};
export const events = {
stepEnded: "step-ended",
toolchainReported: "toolchain-reported",
stepProgress: "step-progress",
askTaken: "ask-taken",
};
export const family = { name: "node-build-node.events", maxAgeDays: 7 };
export const stepEndedStream = "SEAT_node-build-node_step-ended";
export function stepEndedSubject(node) {
return "mesh.seat.node-build-node.event.step-ended." + node;
}
export const stepEndedSubjectAll = "mesh.seat.node-build-node.event.step-ended.*";
export const toolchainReportedStream = "SEAT_node-build-node_toolchain-reported";
export function toolchainReportedSubject(node) {
return "mesh.seat.node-build-node.event.toolchain-reported." + node;
}
export const toolchainReportedSubjectAll = "mesh.seat.node-build-node.event.toolchain-reported.*";
export function stepProgressSubject(node) {
return "mesh.seat.node-build-node.event.step-progress." + node;
}
export const stepProgressSubjectAll = "mesh.seat.node-build-node.event.step-progress.*";
export function askTakenSubject(node) {
return "mesh.seat.node-build-node.event.ask-taken." + node;
}
export const askTakenSubjectAll = "mesh.seat.node-build-node.event.ask-taken.*";
export const deliverySubject = "mesh.seat.node-build-node.accept.delivery";
export const checkSubject = "mesh.seat.node-build-node.accept.check";
export const checkStepSubject = "mesh.seat.node-build-node.accept.check.step";
export const deliveryStepSubject = "mesh.seat.node-build-node.accept.delivery.step";
export const recheckSubject = "mesh.seat.node-build-node.accept.recheck";
export const states = {
steps: "steps",
pauses: "pauses",
toolchains: "toolchains",
detectedSteps: "detected-steps",
};
/** The key of one value of the state steps under the form "<asker>.<node>.<id>". */
export function stepsByAskerNodeIDKey(asker, node, id) {
return asker + "." + node + "." + id;
}
/** The parts of a key of the form "<asker>.<node>.<id>", or undefined for a key of another form. */
export function parseStepsByAskerNodeIDKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const asker = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const node = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const id = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { asker, node, id };
}
/** The key of one value of the state steps under the form "<node>.<id>". */
export function stepsByNodeIDKey(node, id) {
return node + "." + id;
}
/** The parts of a key of the form "<node>.<id>", or undefined for a key of another form. */
export function parseStepsByNodeIDKey(_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 id = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, id };
}
/** The key of one value of the state pauses under the form "paused.<node>". */
export function pausesByPausedNodeKey(node) {
return "paused." + node;
}
/** The parts of a key of the form "paused.<node>", or undefined for a key of another form. */
export function parsePausesByPausedNodeKey(_key) {
let _rest = _key;
if (!_rest.startsWith("paused.")) return undefined;
_rest = _rest.slice(7);
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state pauses under the form "dropped.<id>". */
export function pausesByDroppedIDKey(id) {
return "dropped." + id;
}
/** The parts of a key of the form "dropped.<id>", or undefined for a key of another form. */
export function parsePausesByDroppedIDKey(_key) {
let _rest = _key;
if (!_rest.startsWith("dropped.")) return undefined;
_rest = _rest.slice(8);
if (_rest === "") return undefined;
const id = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { id };
}
/** The key of one value of the state pauses under the form "capacity.<node>". */
export function pausesByCapacityNodeKey(node) {
return "capacity." + node;
}
/** The parts of a key of the form "capacity.<node>", or undefined for a key of another form. */
export function parsePausesByCapacityNodeKey(_key) {
let _rest = _key;
if (!_rest.startsWith("capacity.")) return undefined;
_rest = _rest.slice(9);
if (_rest === "") return undefined;
const node = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node };
}
/** The key of one value of the state toolchains under the form "<node>.<language>". */
export function toolchainsByNodeLanguageKey(node, language) {
return node + "." + language;
}
/** The parts of a key of the form "<node>.<language>", or undefined for a key of another form. */
export function parseToolchainsByNodeLanguageKey(_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 language = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { node, language };
}
/** The key of one value of the state detected-steps under the form "<module>.<artifact>". */
export function detectedStepsByModuleArtifactKey(module, artifact) {
return module + "." + artifact;
}
/** The parts of a key of the form "<module>.<artifact>", or undefined for a key of another form. */
export function parseDetectedStepsByModuleArtifactKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const module = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
if (_rest === "") return undefined;
const artifact = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { module, artifact };
}
@@ -0,0 +1,12 @@
{
"lockfileVersion": 3,
"name": "@novox/mesh-delivery-contracts-node-build-node",
"packages": {
"": {
"name": "@novox/mesh-delivery-contracts-node-build-node",
"version": "0.1.0"
}
},
"requires": true,
"version": "0.1.0"
}
@@ -0,0 +1,18 @@
{
"description": "The contract of the seat node-build-node, generated from its definition.",
"exports": {
".": {
"default": "./index.js",
"types": "./index.d.ts"
}
},
"files": [
"index.js",
"index.d.ts",
"parts"
],
"name": "@novox/mesh-delivery-contracts-node-build-node",
"type": "module",
"types": "./index.d.ts",
"version": "0.1.0"
}
@@ -0,0 +1,669 @@
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The part "build-step" several seats include whole: What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).
export declare const verbs: {
readonly current: "current";
readonly pause: "pause";
readonly resume: "resume";
readonly drop: "drop";
readonly keptArtifact: "kept-artifact";
readonly steps: "steps";
};
export declare const events: {
readonly stepEnded: "step-ended";
readonly toolchainReported: "toolchain-reported";
readonly stepProgress: "step-progress";
readonly askTaken: "ask-taken";
};
/** one artifact of a build ask: built from the fetched tree, or copied from an upstream pin */
export interface AskArtifact {
"artifact": string;
"from"?: string;
"seat"?: string;
"version"?: string;
}
/** an ask a build seat's holder took, said when it takes any ask, whatever its asker (design 47 G section 602) */
export interface AskTaken {
/** the ask's id */
"ask": string;
"asker": string;
"at": string;
/** the node that took it, as in the subject */
"node": string;
}
export interface BuildAnswer {
"artifacts": BuiltArtifact[];
"imports"?: string[];
/** the digest of the artifact this node kept for the artifact store's holder instead of storing it through the seat oci-artifact-registry (the verb kept-artifact serves it); the keeping node is the step's own; absent when every artifact was stored */
"kept"?: string;
"out-of-step"?: string[];
"toolchain"?: ToolchainUsed;
}
export interface BuiltArtifactResolvedItem {
/** sha256: of the package's bytes as the build fetched them */
"digest": string;
"package": string;
"version": string;
}
/** one artifact a build made: its digest and the reference it was published under */
export interface BuiltArtifact {
"artifact": string;
"digest": string;
"reference"?: string;
/** one per mesh package the build resolved (the catalog graph entry's packages, the edges of kind 1) */
"resolved"?: BuiltArtifactResolvedItem[];
}
/** how many steps the node runs at once */
export interface Capacity {
/** when (RFC 3339 time) */
"at"?: string;
"build-hours"?: string;
"build-hours-fault"?: string;
"by-cpu"?: number;
"configured": number;
"configured-from"?: string;
"cores-per-step"?: number;
"effective": number;
"ineligible"?: string;
"outside-hours"?: boolean;
"quota-cores"?: number;
"quota-from"?: string;
/** the layout version */
"v"?: number;
"why": string;
}
export interface CheckAnswer {
"fetch": FetchAnswer;
"levels"?: LevelAnswer[];
}
export interface ComposeAnswer {
"built": boolean;
"key"?: string;
/** the compose-candidate verdict */
"verdict"?: unknown;
}
export interface DetectedStep {
/** the packages the step runs, by the language's convention */
"packages"?: string[];
"step": "lint" | "unit" | "integration";
}
/** the steps detected for one artifact at its newest build-input fingerprint, replaced when a newer fingerprint is detected and by steps with again (design 47 G section 326) */
export interface DetectedSteps {
"at"?: string;
"fingerprint": string;
"steps": DetectedStep[];
"v": number;
}
/** an ask a caller no longer waits for */
export interface Drop {
/** when (RFC 3339 time) */
"at"?: string;
"by"?: string;
/** the layout version */
"v"?: number;
"why": string;
}
export interface FetchBesideItem {
"commit": string;
"repository": string;
}
export interface FetchBuildsItem {
"artifact": string;
/** the member's build digest, sha256: */
"digest": string;
"module": string;
/** the name in its ecosystem (the Go module path, the npm name) */
"package": string;
}
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
export interface FetchPackage {
"commit"?: string;
"name"?: string;
"ref"?: string;
"repository"?: string;
"version"?: string;
}
/** what a build module's fetch tool is asked: the repository and the full commit, the pull request's ref when only its head carries the commit, the trunk commit to merge onto for a merge preview, the module's directory and named paths, the mesh packages to build against, and the sibling repositories placed beside */
export interface Fetch {
/** the trunk commit a merge preview merges onto */
"base"?: string;
/** the sibling repositories placed beside the fetched tree */
"beside"?: FetchBesideItem[];
/** a group run's package members, each by its build's digest: the build module reads each from the artifact store at artifact-store://<module>/<artifact>/blobs/<digest>, checks the bytes against the digest and lays them as the group package; a package named here is named in neither packages nor package */
"builds"?: FetchBuildsItem[];
/** the full commit */
"commit": string;
/** the module's directory in the repository ("." for its root), with paths */
"dir"?: string;
/** the TypeScript module's group package: the group's tagged version of the SDK ({name, version}), placed from the registry in each member whatever its lock names, or the group's package member ({repository, commit, ref}), packed by the fetch and served to the members in place of the registry's */
"package"?: FetchPackage;
/** the version (a full commit) of each mesh package to build against, by its module path */
"packages"?: Record<string, string>;
/** the paths the module names, relative to dir */
"paths"?: string[];
/** the pull request's ref, when only its head carries the commit */
"ref"?: string;
/** <owner>/<name> */
"repository": string;
}
/** what a build module's fetch tool answers, whole: the workspace it made, the commit in it, the module directories found; and, when the call gave a base, the merge preview (the trunk commit, the merge commit, the files that conflict, the paths the merge changes, the compiled programs among them, the tree of each module directory). A head that does not merge cleanly is an answer, not an error: merge is empty and conflicts names the files. The Go module adds the sibling repositories placed and the package versions taken; the TypeScript module the directories installed and refused and the group's package */
export interface FetchAnswer {
"base"?: string;
"beside"?: PlacedBeside[];
"changed"?: string[];
"commit": string;
"conflicts"?: string[];
"group"?: string;
"installed"?: string[];
"merge"?: string;
"modules": string[];
"packages"?: TakenVersion[];
"programs"?: Program[];
"refused"?: FetchRefusal[];
"trees"?: Record<string, ModuleTree>;
"workspace": string;
}
/** a TypeScript module whose packages the fetch did not install, with why */
export interface FetchRefusal {
"module": string;
"reason": string;
}
/** a package's passing result the runner keeps, by the digest of what its tests read (ADR 0666 section 8): the step runs no package whose digest and level it names */
export interface KeptResult {
/** sha256:<hex> of what the package's tests read */
"digest": string;
/** unit or integration */
"level": string;
"package": string;
/** the pipeline whose step kept it */
"pipeline"?: string;
"toolchain"?: ToolchainUsed;
}
export interface LevelAnswerDigestNeedsItem {
"needs"?: string[];
"package"?: string;
}
export interface LevelAnswerDigestPackagesItem {
"digest": string;
"package": string;
}
export interface LevelAnswerDigest {
"beside"?: string[];
"judged_by"?: string;
"level"?: string;
"needs"?: LevelAnswerDigestNeedsItem[];
"packages"?: LevelAnswerDigestPackagesItem[];
"without_tests"?: string[];
}
export interface LevelAnswerKeptItem {
"digest"?: string;
"package"?: string;
"tests"?: number;
}
export interface LevelAnswerUnmetItem {
"needs"?: string[];
"package"?: string;
}
/** one level of a check ask: the digest's answer, the kept verdicts taken, one test result per test step run, and the packages the node could not test */
export interface LevelAnswer {
"digest"?: LevelAnswerDigest;
"judged"?: string;
"kept"?: LevelAnswerKeptItem[];
"level": string;
"tests"?: unknown[];
"unmet"?: LevelAnswerUnmetItem[];
}
/** the tree of one module directory in a merge preview: its git tree, the digest of its manifest, the lock files' digests and the digests of the named paths */
export interface ModuleTree {
"locks"?: Record<string, string>;
"manifest": string;
/** no longer filled (ADR 0593 section 2); kept so a preview written before still reads */
"packages"?: string[];
"paths"?: Record<string, string>;
"tree": string;
}
/** whether the node takes no new ask */
export interface Pause {
/** when (RFC 3339 time) */
"at"?: string;
"by"?: string;
"paused": boolean;
/** the layout version */
"v"?: number;
}
/** a sibling repository placed as a plain directory under the workspace's beside directory */
export interface PlacedBeside {
"commit": string;
"dir": string;
"repository": string;
}
/** a changed file that is a compiled program (issue 1577): its path, its executable format, and the commit of the branch that added it when the merge's tree no longer holds it */
export interface Program {
"commit"?: string;
/** ELF, Mach-O or PE */
"kind": string;
"path": string;
}
/** what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error */
export interface RunAnswer {
"built": boolean;
"exit": number;
"key": string;
/** raw when it is JSON, else a JSON string */
"output"?: unknown;
"said"?: string;
}
/** one commit a run's program reads */
export interface RunHead {
"commit": string;
"repository": string;
}
/** a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB */
export interface RunInput {
/** 64 lowercase hex digits */
"digest": string;
/** bytes */
"size": number;
"verb": string;
}
/** a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for */
export interface RunJob {
/** the program's arguments, each a word or a flag */
"args"?: string[];
/** the commits the program reads, a repository at most once */
"heads": RunHead[];
"input": RunInput;
"program": RunProgram;
/** what the run is for, for a reader of the ask */
"reader"?: string;
}
/** where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path */
export interface RunProgram {
"commit": string;
"dir": string;
"package": string;
"repository": string;
}
/** one step a build module runs on a node */
export interface Step {
/** when the bus gives the ask again, for the state again (RFC 3339 time) */
"again-at"?: string;
/** when (RFC 3339 time) */
"ended"?: string;
"id": string;
"node": string;
"owner"?: string;
/** true when the step ended on a fault that passes (a transport fault), so a failed end after the last run says so */
"passing"?: boolean;
"phase"?: string;
/** when (RFC 3339 time) */
"phase-at"?: string;
"reason"?: string;
"result"?: StepResult;
/** which run of the ask this is, counted by the bus's delivery count (1 for the first) */
"run"?: number;
/** when (RFC 3339 time) */
"started": string;
/** running, again (ended on a transport fault, to be given again by the bus after again-at), passed, failed, refused or dropped (ended by the verb drop, its cause the reason) */
"state": string;
"tool": string;
/** the layout version */
"v"?: number;
"what"?: string;
}
export interface StepAskBuild {
"artifacts": AskArtifact[];
"fetch"?: Fetch;
"fp"?: string;
"module": string;
"path"?: string;
"publish"?: boolean;
"toolchain"?: ToolchainUsed;
}
export interface StepAskCheck {
"fetch": Fetch;
"kept"?: boolean;
"levels": string[];
/** the node names the check's tests run against */
"node-names"?: string[];
"packages"?: string[];
"run"?: string;
"runner"?: string;
"runner_when"?: string;
/** the toolchain the checker agreed for the language (ADR 0584 clause 2): a node on another declines the check */
"toolchain"?: ToolchainUsed;
}
export interface StepAskCompose {
"dir": string;
"fetch": Fetch;
"package": string;
"reader"?: string;
/** the compose-candidate request, in one of two forms: the request as a JSON object, or, for one near the bus's message limit, a JSON string "gzip+base64:" followed by the base64 of the request object gzip-compressed; a holder that does not know the packed form refuses it, naming that it holds no request object */
"request": unknown;
}
/** one ask of a build module */
export interface StepAsk {
"asker": string;
/** when (RFC 3339 time) */
"at"?: string;
"build"?: StepAskBuild;
"check"?: StepAskCheck;
"compose"?: StepAskCompose;
"id": string;
/** build, check, compose or step */
"kind": string;
/** go, typescript or image */
"language": string;
"needs"?: string[];
/** package to the tagged version a build pins */
"packages"?: Record<string, string>;
/** a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose */
"run"?: RunJob;
/** a pipeline step: lint, unit tests or integration tests of one artifact at one commit, sent by the runner as the accepted kind step (design 47 *The steps and who serves them*) */
"step"?: StepRun;
/** the layout version */
"v"?: number;
/** the version MAJOR.MINOR.PATCH the builder reserved for the build, passed to it as MESH_VERSION; empty for a build that reserves none, which stamps none (design 47 G section 573) */
"version"?: string;
}
/** an ask's end, said by the build seat's holder on the node that ran it, whatever its asker (design 47 G section 602): a pipeline step's end names the pipeline, the commit and the fingerprint it was asked at, which the runner takes only from that holder's account (ADR 0666 sections 7, 21); the end of any other ask names its asker, the ask, the node, the outcome and when, and neither commit nor fingerprint (design 47 G section 548) */
export interface StepEnded {
"artifact"?: string;
/** the ask's id, by which a reader takes only its own asks */
"ask": string;
/** who asked it */
"asker": string;
/** when it ended (RFC 3339 time) */
"at": string;
/** for a rerun, the caller the runtime proved */
"by"?: string;
/** the packages not run because the ask's kept results held them */
"carried"?: KeptResult[];
"commit"?: string;
"ended"?: string;
"fingerprint"?: string;
/** the ask's id */
"id": string;
/** the packages that passed at their digest, for the runner to keep */
"kept"?: KeptResult[];
"module"?: string;
/** the node that ran it, as in the subject */
"node": string;
/** never passed for a step that ran nothing */
"outcome": "passed" | "failed" | "nothing to run" | "could not run";
/** the step's output when it fits the message */
"output"?: string;
/** the output's object in the sender's sent store, when over the per-message limit (ADR 0666 section 16) */
"output-object"?: string;
"pipeline"?: string;
"rerun"?: boolean;
/** why it failed or could not run, naming the part not heard */
"said"?: string;
"started"?: string;
"step"?: "lint" | "unit" | "integration";
"tests"?: TestCounts;
/** the layout version */
"v"?: number;
}
/** a running ask's progress, said once a minute while the holder runs it (design 47 G section 496) */
export interface StepProgress {
"ask": string;
"asker": string;
"at": string;
"phase": "fetch" | "build" | "run" | "report";
}
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports, out-of-step modules and the artifact it kept; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five */
export interface StepResult {
"artifacts"?: BuiltArtifact[];
"built"?: boolean;
/** the holder declined the ask: its node lacks what the ask needs */
"declined"?: boolean;
/** a run's program's exit status */
"exit"?: number;
"fetch"?: FetchAnswer;
"imports"?: string[];
/** the digest of the artifact this node kept for the artifact store's holder instead of storing it through the seat oci-artifact-registry (the verb kept-artifact serves it); the keeping node is the step's own; absent when every artifact was stored */
"kept"?: string;
"key"?: string;
/** what the holder's node lacks of it */
"lacks"?: string[];
"levels"?: LevelAnswer[];
/** what the declined ask needs */
"needs"?: string[];
"out-of-step"?: string[];
/** a run's program's last line of standard output: raw when it is JSON, else a JSON string */
"output"?: unknown;
/** a run's program's first line of standard error, or why the step could not run it */
"said"?: string;
"toolchain"?: ToolchainUsed;
/** the compose-candidate verdict (the composer's own layout) */
"verdict"?: unknown;
}
/** one pipeline step of one artifact at one commit (ADR 0666 sections 7, 8, 17): the step a build seat runs in its sandbox from the change's own heads, the names the lint step needs and the kept results it may skip */
export interface StepRun {
/** the artifact reference, <module>:<artifact> */
"artifact": string;
/** the watched branch, or the branch of a run on request */
"branch"?: string;
/** for a rerun, the caller the runtime proved */
"by"?: string;
/** the commit the step runs at */
"commit": string;
/** where the step reads the change's heads */
"fetch": Fetch;
/** the artifact's build-input fingerprint at the commit */
"fingerprint": string;
/** the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*) */
"kept"?: KeptResult[];
"module": string;
/** the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
"pipeline": string;
/** the step is asked again by the runner's rerun */
"rerun"?: boolean;
/** the source revision of the watched branch the pipeline runs for; absent for a run on request */
"revision"?: number;
/** the pipeline step */
"step": "lint" | "unit" | "integration";
"toolchain"?: ToolchainUsed;
}
/** of a directory whose go.mod requires an asked mesh package, the version it is built against: the asked one, or go.mod's when it names a newer one, said */
export interface TakenVersion {
"asked": string;
"built": string;
"dir": string;
"named": string;
"package": string;
"said"?: string;
"sum"?: string;
}
/** how many tests a step ran and carried, per level (ADR 0666 section 8: the pipeline's end names any repository or catalog module over the test budget) */
export interface TestCounts {
"integration"?: number;
"unit"?: number;
}
/** the toolchain a node reports */
export interface Toolchain {
/** when (RFC 3339 time) */
"at"?: string;
/** the sha256: digest of the language's toolchain program as the build module runs it: the program of the module that provides that language's toolchain, never the build module's own (design 47 G section 472) */
"digest"?: string;
/** go or typescript */
"language": string;
"recipe": string;
/** the layout version */
"v"?: number;
"version": string;
}
/** a node's toolchain of a language, said at the build module's start and each time its toolchains key of the language changes (design 47 G section 492) */
export interface ToolchainReported {
/** the digest of the program of the provision the build module requires for that language's toolchain, never the build module's own */
"digest": string;
"language": string;
"node": string;
"recipe": string;
"version": string;
}
/** the toolchain a build was made with: the language, the installed version and the build module's recipe */
export interface ToolchainUsed {
/** the building node's digest of its toolchain program (kind 3's entry), never the build module's own program */
"digest"?: string;
"language": string;
"recipe": string;
"version": string;
}
/** is what current takes. */
export interface CurrentInput {
}
/** is what current answers. */
export type CurrentAnswer = Record<string, unknown>;
/** is what pause takes. */
export interface PauseInput {
}
/** is what pause answers. */
export type PauseAnswer = Record<string, unknown>;
/** is what resume takes. */
export interface ResumeInput {
}
/** is what resume answers. */
export type ResumeAnswer = Record<string, unknown>;
/** is what drop takes. */
export interface DropInput {
/** who drops it */
"by"?: string;
/** the ask's id */
"id": string;
/** why the caller no longer waits */
"why": string;
}
/** is what drop answers. */
export type DropAnswer = Record<string, unknown>;
/** is what kept-artifact takes. */
export interface KeptArtifactInput {
/** the artifact's sha256, 64 lowercase hex digits, as the builder's done key names it */
"digest": string;
/** its build's fingerprint */
"fp": string;
/** the module, the holder of oci-artifact-registry */
"module": string;
}
/** is what kept-artifact answers. */
export interface KeptArtifactAnswer {
/** the digest of the bytes kept */
"digest"?: string;
/** why it could not answer */
"error"?: string;
/** the fingerprint asked */
"fp": string;
/** the module asked */
"module": string;
/** the object's name in it: the digest */
"object"?: string;
/** why nothing is answered: the module claims no oci-artifact-registry, this node keeps no build of it at that fingerprint (never kept, or swept), or keeps it under another digest */
"refused"?: "claims no oci-artifact-registry" | "not kept" | "digest differs";
/** bytes */
"size"?: number;
/** the object store the bytes are in, the build module's kept builds, as its manifest's objects names it on the bus */
"store"?: string;
/** the refusal in words, naming the module */
"words"?: string;
}
/** is what steps takes. */
export interface StepsInput {
/** find them anew, not from the kept answer */
"again"?: boolean;
/** the key of detected-steps, <module>.<artifact> */
"artifact": string;
/** delete the artifact's kept key instead of detecting; needs why */
"drop"?: boolean;
"fetch"?: Fetch;
"fingerprint"?: string;
"module": string;
/** with drop, why: a non-empty text, written in the hand-act log with the caller the bus proved */
"why"?: string;
}
/** is what steps answers. */
export interface StepsAnswer {
"artifact"?: string;
/** the artifact whose key a drop deleted */
"dropped"?: string;
/** why a drop deleted nothing, naming the hand-act log when it refused */
"error"?: string;
"fingerprint"?: string;
/** answered from the kept answer */
"kept"?: boolean;
"steps"?: DetectedStep[];
}
/** is the body of the event step-ended. */
export type StepEndedEvent = StepEnded;
/** is the body of the event toolchain-reported. */
export type ToolchainReportedEvent = ToolchainReported;
/** is the body of the event step-progress. */
export type StepProgressEvent = StepProgress;
/** is the body of the event ask-taken. */
export type AskTakenEvent = AskTaken;
@@ -0,0 +1,21 @@
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The part "build-step" several seats include whole: What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).
export const verbs = {
current: "current",
pause: "pause",
resume: "resume",
drop: "drop",
keptArtifact: "kept-artifact",
steps: "steps",
};
export const events = {
stepEnded: "step-ended",
toolchainReported: "toolchain-reported",
stepProgress: "step-progress",
askTaken: "ask-taken",
};
export {};