ADR 0625 §1: each seat defined whole is an npm package of its own, declared in module.json
One @novox/mesh-contracts would rebuild every TypeScript user at any seat's change, since the indexer counts the npm package a lock resolves. Generated by seatgen c1fdd7c; ts/ keeps the seat list alone. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -1,155 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "container-image-registry", defined whole (seats/container-image-registry/seat.json): The mesh's container images, in the one artifact store: the OCI distribution protocol's read side, an image's tags and mirroring an outside image.
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export const seat = "container-image-registry";
|
||||
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
mirror: "mirror",
|
||||
tags: "tags",
|
||||
hold: "hold",
|
||||
release: "release",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
held: "held",
|
||||
released: "released",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "container-image-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const publishedSubject = "mesh.seat.container-image-registry.event.published";
|
||||
|
||||
export const refusedSubject = "mesh.seat.container-image-registry.event.refused";
|
||||
|
||||
export const removedSubject = "mesh.seat.container-image-registry.event.removed";
|
||||
|
||||
export const heldSubject = "mesh.seat.container-image-registry.event.held";
|
||||
|
||||
export const releasedSubject = "mesh.seat.container-image-registry.event.released";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
export type PublishedEvent = registry.PublishedEvent;
|
||||
export type RefusedEvent = registry.RefusedEvent;
|
||||
export type RemoveAnswer = registry.RemoveAnswer;
|
||||
export type RemoveInput = registry.RemoveInput;
|
||||
export type RemovedEvent = registry.RemovedEvent;
|
||||
export type VersionsAnswer = registry.VersionsAnswer;
|
||||
export type VersionsInput = registry.VersionsInput;
|
||||
|
||||
/** the body of held and released */
|
||||
export interface Hold {
|
||||
/** when, RFC 3339 */
|
||||
"at"?: string;
|
||||
/** the caller the holder proved */
|
||||
"by"?: string;
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the module holding the seat */
|
||||
"holder": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** why */
|
||||
"reason"?: string;
|
||||
}
|
||||
|
||||
/** is what mirror takes. */
|
||||
export interface MirrorInput {
|
||||
/** its pinned digest, sha256:<hex> */
|
||||
"digest": string;
|
||||
/** the name it is kept under */
|
||||
"name": string;
|
||||
/** the outside image's reference */
|
||||
"source": string;
|
||||
}
|
||||
|
||||
/** is what mirror answers. */
|
||||
export interface MirrorAnswer {
|
||||
/** the digest stored */
|
||||
"digest": string;
|
||||
/** the reference the seat answers */
|
||||
"reference": string;
|
||||
}
|
||||
|
||||
/** is what tags takes. */
|
||||
export interface TagsInput {
|
||||
/** the image */
|
||||
"name": string;
|
||||
}
|
||||
|
||||
export interface TagsAnswerTagsItem {
|
||||
/** its digest */
|
||||
"digest": string;
|
||||
/** the tag */
|
||||
"tag": string;
|
||||
}
|
||||
|
||||
/** is what tags answers. */
|
||||
export interface TagsAnswer {
|
||||
/** the image */
|
||||
"name": string;
|
||||
/** every tag */
|
||||
"tags": TagsAnswerTagsItem[];
|
||||
}
|
||||
|
||||
/** is what hold takes. */
|
||||
export interface HoldInput {
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** which of the sweep's rules keeps it */
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** is what hold answers. */
|
||||
export interface HoldAnswer {
|
||||
/** it is held */
|
||||
"held": boolean;
|
||||
/** when the hold began, RFC 3339 */
|
||||
"since"?: string;
|
||||
}
|
||||
|
||||
/** is what release takes. */
|
||||
export interface ReleaseInput {
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** why it is let go */
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** is what release answers. */
|
||||
export interface ReleaseAnswer {
|
||||
/** the hold is gone */
|
||||
"released": boolean;
|
||||
}
|
||||
|
||||
/** is the body of the event held. */
|
||||
export type HeldEvent = Hold;
|
||||
|
||||
/** is the body of the event released. */
|
||||
export type ReleasedEvent = Hold;
|
||||
|
||||
/** is the form of the provision artifact-store. */
|
||||
export interface ArtifactStoreForm {
|
||||
/** the store's address */
|
||||
"url": string;
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "go-package-registry", defined whole (seats/go-package-registry/seat.json): The mesh's Go modules: Go's module proxy protocol's read side, and publishing over the bus.
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export const seat = "go-package-registry";
|
||||
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "go-package-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const publishedSubject = "mesh.seat.go-package-registry.event.published";
|
||||
|
||||
export const refusedSubject = "mesh.seat.go-package-registry.event.refused";
|
||||
|
||||
export const removedSubject = "mesh.seat.go-package-registry.event.removed";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
export type PublishedEvent = registry.PublishedEvent;
|
||||
export type RefusedEvent = registry.RefusedEvent;
|
||||
export type RemoveAnswer = registry.RemoveAnswer;
|
||||
export type RemoveInput = registry.RemoveInput;
|
||||
export type RemovedEvent = registry.RemovedEvent;
|
||||
export type VersionsAnswer = registry.VersionsAnswer;
|
||||
export type VersionsInput = registry.VersionsInput;
|
||||
|
||||
/** is the form of the provision go-package-registry. */
|
||||
export interface GoPackageRegistryForm {
|
||||
/** the read side's address */
|
||||
"url": string;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
export * as seats from "./seats.js";
|
||||
export * as meshBroker from "./mesh-broker.js";
|
||||
export * as meshVault from "./mesh-vault.js";
|
||||
export * as meshConfig from "./mesh-config.js";
|
||||
export * as meshDeliveryChecker from "./mesh-delivery-checker.js";
|
||||
export * as operatorChannel from "./operator-channel.js";
|
||||
export * as npmPackageRegistry from "./npm-package-registry.js";
|
||||
export * as goPackageRegistry from "./go-package-registry.js";
|
||||
export * as containerImageRegistry from "./container-image-registry.js";
|
||||
export * as ociArtifactRegistry from "./oci-artifact-registry.js";
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-broker", defined whole (seats/mesh-broker/seat.json): The mesh's bus, and the bus state modules ask of it in requires (design 25 § 12). create, apply, recreate and drop are granted to the bus module's own credential alone.
|
||||
|
||||
export const seat = "mesh-broker";
|
||||
|
||||
export const verbs = {
|
||||
list: "list",
|
||||
show: "show",
|
||||
check: "check",
|
||||
orphans: "orphans",
|
||||
create: "create",
|
||||
apply: "apply",
|
||||
recreate: "recreate",
|
||||
drop: "drop",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
created: "created",
|
||||
refused: "refused",
|
||||
drifted: "drifted",
|
||||
driftCleared: "drift-cleared",
|
||||
full: "full",
|
||||
fullCleared: "full-cleared",
|
||||
orphaned: "orphaned",
|
||||
recreated: "recreated",
|
||||
dropped: "dropped",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "mesh-broker.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const createdSubject = "mesh.seat.mesh-broker.event.created";
|
||||
|
||||
export const refusedSubject = "mesh.seat.mesh-broker.event.refused";
|
||||
|
||||
export const driftedSubject = "mesh.seat.mesh-broker.event.drifted";
|
||||
|
||||
export const driftClearedSubject = "mesh.seat.mesh-broker.event.drift-cleared";
|
||||
|
||||
export const fullSubject = "mesh.seat.mesh-broker.event.full";
|
||||
|
||||
export const fullClearedSubject = "mesh.seat.mesh-broker.event.full-cleared";
|
||||
|
||||
export const orphanedSubject = "mesh.seat.mesh-broker.event.orphaned";
|
||||
|
||||
export const recreatedSubject = "mesh.seat.mesh-broker.event.recreated";
|
||||
|
||||
export const droppedSubject = "mesh.seat.mesh-broker.event.dropped";
|
||||
|
||||
/** the binding a module receives in its membership for one entry (ADR 0595 §1, §7) */
|
||||
export interface Binding {
|
||||
/** the entry's name on the bus */
|
||||
"bus-name": string;
|
||||
/** how the bus keeps it */
|
||||
"storage-type": string;
|
||||
/** its subjects, for a stream */
|
||||
"subjects"?: string[];
|
||||
/** its template */
|
||||
"template"?: string;
|
||||
}
|
||||
|
||||
/** one piece of bus state as a manifest asks it */
|
||||
export interface Entry {
|
||||
/** its own configuration, where no template fits */
|
||||
"configuration"?: Record<string, unknown>;
|
||||
/** its local name in the module's manifest */
|
||||
"local-name": string;
|
||||
/** the module asking it */
|
||||
"module": string;
|
||||
/** the template's options the module set, within their bounds */
|
||||
"options"?: Record<string, unknown>;
|
||||
/** how the bus keeps it */
|
||||
"storage-type": "stream" | "key-value" | "object-store" | "ledger";
|
||||
/** its template; empty for a configuration of its own */
|
||||
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
|
||||
}
|
||||
|
||||
export interface Fill {
|
||||
/** bytes held */
|
||||
"bytes": number;
|
||||
/** its cap in bytes */
|
||||
"cap": number;
|
||||
/** messages, keys or objects held */
|
||||
"count": number;
|
||||
}
|
||||
|
||||
/** one entry as the bus holds it */
|
||||
export interface Held {
|
||||
/** its name on the bus, <module>_<local name> */
|
||||
"bus-name": string;
|
||||
/** its own configuration, where no template fits */
|
||||
"configuration"?: Record<string, unknown>;
|
||||
"fill"?: Fill;
|
||||
/** its local name in the module's manifest */
|
||||
"local-name": string;
|
||||
/** the module asking it */
|
||||
"module": string;
|
||||
/** the template's options the module set, within their bounds */
|
||||
"options"?: Record<string, unknown>;
|
||||
/** the settings the bus holds */
|
||||
"settings"?: Record<string, unknown>;
|
||||
/** the entry's state: held as asked, refused, waiting to be made, drifted from what is asked, full, or orphaned (no manifest asks it) */
|
||||
"state"?: "held" | "refused" | "waiting" | "drifted" | "full" | "orphaned";
|
||||
/** how the bus keeps it */
|
||||
"storage-type": "stream" | "key-value" | "object-store" | "ledger";
|
||||
/** its template; empty for a configuration of its own */
|
||||
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
|
||||
/** why it is in its state, in plain words; empty when held as asked */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
export interface Named {
|
||||
/** the entry's local name */
|
||||
"local-name": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
}
|
||||
|
||||
/** the body of every event of the seat */
|
||||
export interface Said {
|
||||
/** the settings asked */
|
||||
"asked"?: Record<string, unknown>;
|
||||
"binding"?: Binding;
|
||||
/** its name on the bus */
|
||||
"bus-name": string;
|
||||
/** its own configuration, where no template fits */
|
||||
"configuration"?: Record<string, unknown>;
|
||||
"fill"?: Fill;
|
||||
/** the settings held */
|
||||
"held"?: Record<string, unknown>;
|
||||
/** its local name in the module's manifest */
|
||||
"local-name": string;
|
||||
/** the module asking it */
|
||||
"module": string;
|
||||
/** the template's options the module set, within their bounds */
|
||||
"options"?: Record<string, unknown>;
|
||||
/** the indexer's revision of the verdict the bus module acted on (ADR 0622 §2), so a reader orders what it hears */
|
||||
"revision"?: number;
|
||||
/** the stream snapshot taken before a recreate or drop */
|
||||
"snapshot"?: string;
|
||||
/** how the bus keeps it */
|
||||
"storage-type"?: "stream" | "key-value" | "object-store" | "ledger";
|
||||
/** its template; empty for a configuration of its own */
|
||||
"template"?: "state" | "events" | "work-queue" | "log" | "objects" | "ledger" | "";
|
||||
/** why: a refusal's cause, a drift's difference, a drop's or recreate's reason */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
export interface Warranted {
|
||||
/** the entry's local name */
|
||||
"local-name": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the operator's warrant, as the operator channel decided it (ADR 0259 §6) */
|
||||
"warrant": string;
|
||||
/** why, kept in the record */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what list takes. */
|
||||
export interface ListInput {
|
||||
/** one module (optional) */
|
||||
"module"?: string;
|
||||
}
|
||||
|
||||
/** is what list answers. */
|
||||
export interface ListAnswer {
|
||||
/** every entry */
|
||||
"entries": Held[];
|
||||
}
|
||||
|
||||
/** is what show takes. */
|
||||
export type ShowInput = Named;
|
||||
|
||||
/** is what show answers. */
|
||||
export type ShowAnswer = Held;
|
||||
|
||||
/** is what check takes. */
|
||||
export interface CheckInput {
|
||||
/** one module (optional) */
|
||||
"module"?: string;
|
||||
}
|
||||
|
||||
export interface CheckAnswerDifferencesItem {
|
||||
/** asked */
|
||||
"asked"?: Record<string, unknown>;
|
||||
/** the difference only grows: apply may act on it */
|
||||
"grows"?: boolean;
|
||||
/** held */
|
||||
"held"?: Record<string, unknown>;
|
||||
/** the entry */
|
||||
"local-name": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
}
|
||||
|
||||
/** is what check answers. */
|
||||
export interface CheckAnswer {
|
||||
/** every difference */
|
||||
"differences": CheckAnswerDifferencesItem[];
|
||||
}
|
||||
|
||||
/** is what orphans takes. */
|
||||
export interface OrphansInput {
|
||||
}
|
||||
|
||||
/** is what orphans answers. */
|
||||
export interface OrphansAnswer {
|
||||
/** every orphan */
|
||||
"entries": Held[];
|
||||
}
|
||||
|
||||
/** is what create takes. */
|
||||
export type CreateInput = Entry;
|
||||
|
||||
/** is what create answers. */
|
||||
export type CreateAnswer = Held;
|
||||
|
||||
/** is what apply takes. */
|
||||
export type ApplyInput = Named;
|
||||
|
||||
/** is what apply answers. */
|
||||
export type ApplyAnswer = Held;
|
||||
|
||||
/** is what recreate takes. */
|
||||
export type RecreateInput = Warranted;
|
||||
|
||||
/** is what recreate answers. */
|
||||
export type RecreateAnswer = Held;
|
||||
|
||||
/** is what drop takes. */
|
||||
export type DropInput = Warranted;
|
||||
|
||||
/** is what drop answers. */
|
||||
export interface DropAnswer {
|
||||
/** it is gone */
|
||||
"dropped": boolean;
|
||||
/** the snapshot taken first */
|
||||
"snapshot"?: string;
|
||||
}
|
||||
|
||||
/** is the body of the event created. */
|
||||
export type CreatedEvent = Said;
|
||||
|
||||
/** is the body of the event refused. */
|
||||
export type RefusedEvent = Said;
|
||||
|
||||
/** is the body of the event drifted. */
|
||||
export type DriftedEvent = Said;
|
||||
|
||||
/** is the body of the event drift-cleared. */
|
||||
export type DriftClearedEvent = Said;
|
||||
|
||||
/** is the body of the event full. */
|
||||
export type FullEvent = Said;
|
||||
|
||||
/** is the body of the event full-cleared. */
|
||||
export type FullClearedEvent = Said;
|
||||
|
||||
/** is the body of the event orphaned. */
|
||||
export type OrphanedEvent = Said;
|
||||
|
||||
/** is the body of the event recreated. */
|
||||
export type RecreatedEvent = Said;
|
||||
|
||||
/** is the body of the event dropped. */
|
||||
export type DroppedEvent = Said;
|
||||
|
||||
/** is the form of the provision bus-state. */
|
||||
export type BusStateForm = Binding;
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-config", defined whole (seats/mesh-config/seat.json): The mesh's config values: read and set one, and the renames still open. mesh-config's own events stay under its own subjects (ADR 0620 §2).
|
||||
|
||||
export const seat = "mesh-config";
|
||||
|
||||
export const verbs = {
|
||||
config: "config",
|
||||
renames: "renames",
|
||||
} as const;
|
||||
|
||||
export const holderEvents = {
|
||||
configChanged: "config-changed",
|
||||
renamed: "renamed",
|
||||
retiring: "retiring",
|
||||
retired: "retired",
|
||||
} as const;
|
||||
|
||||
export function configChangedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.config-changed";
|
||||
}
|
||||
|
||||
export function renamedHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.renamed";
|
||||
}
|
||||
|
||||
export function retiringHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.retiring";
|
||||
}
|
||||
|
||||
export function retiredHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.retired";
|
||||
}
|
||||
|
||||
/** is what config takes. */
|
||||
export interface ConfigInput {
|
||||
/** list (when not given), set, clear or history */
|
||||
"action"?: string;
|
||||
/** who gave the value at the controller's terminal */
|
||||
"by"?: string;
|
||||
/** the config key */
|
||||
"key"?: string;
|
||||
/** for history: at most this many, newest */
|
||||
"limit"?: number;
|
||||
/** a module: its own value, with node */
|
||||
"module"?: string;
|
||||
/** a node */
|
||||
"node"?: string;
|
||||
/** for set: the value, of the key's type: a number, a string, a boolean, or for a trusted key an object or a list */
|
||||
"value"?: unknown;
|
||||
/** for set and clear: why */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** is what config answers. */
|
||||
export type ConfigAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what renames takes. */
|
||||
export interface RenamesInput {
|
||||
/** one module (optional) */
|
||||
"module"?: string;
|
||||
}
|
||||
|
||||
export interface RenamesAnswerRenamesItem {
|
||||
/** when it moved, RFC 3339 */
|
||||
"at"?: string;
|
||||
/** the old name */
|
||||
"from": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the nodes still holding the old name open */
|
||||
"open"?: string[];
|
||||
/** the new name */
|
||||
"to": string;
|
||||
}
|
||||
|
||||
/** is what renames answers. */
|
||||
export interface RenamesAnswer {
|
||||
/** every open rename */
|
||||
"renames": RenamesAnswerRenamesItem[];
|
||||
}
|
||||
|
||||
/** is the body of the holder's event renamed. */
|
||||
export interface RenamedHolderEvent {
|
||||
/** when, RFC 3339 */
|
||||
"at": string;
|
||||
/** the old name */
|
||||
"from": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the new name */
|
||||
"to": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event retiring. */
|
||||
export interface RetiringHolderEvent {
|
||||
/** the ask's id */
|
||||
"ask"?: string;
|
||||
/** the value's or secret's name */
|
||||
"key": string;
|
||||
"kind": "value" | "secret";
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** since when, RFC 3339 */
|
||||
"since": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event retired. */
|
||||
export interface RetiredHolderEvent {
|
||||
/** the ask's id */
|
||||
"ask"?: string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** the node */
|
||||
"node"?: string;
|
||||
}
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-delivery-checker", defined whole (seats/mesh-delivery-checker/seat.json): The merge check's tries: start one, read one, end one. The checker's own events stay under its own subjects (ADR 0620 §2).
|
||||
|
||||
export const seat = "mesh-delivery-checker";
|
||||
|
||||
export const verbs = {
|
||||
try: "try",
|
||||
tryRead: "try-read",
|
||||
tryEnd: "try-end",
|
||||
} as const;
|
||||
|
||||
export const holderEvents = {
|
||||
verdict: "verdict",
|
||||
tagWanted: "tag-wanted",
|
||||
previewWritten: "preview.written",
|
||||
} as const;
|
||||
|
||||
export function verdictHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.verdict";
|
||||
}
|
||||
|
||||
export function tagWantedHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.tag-wanted";
|
||||
}
|
||||
|
||||
export function previewWrittenHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.preview.written";
|
||||
}
|
||||
|
||||
/** is what try takes. */
|
||||
export interface TryInput {
|
||||
/** the full commit to try, 40 or 64 hex digits */
|
||||
"head": string;
|
||||
/** unit or integration: only this level; both when absent */
|
||||
"level"?: string;
|
||||
/** <owner>/<name> */
|
||||
"repository": string;
|
||||
/** a go test -run pattern: only those tests run, and nothing is kept */
|
||||
"tests"?: string;
|
||||
/** the trunk commit to merge it onto, or the trunk's branch for its head now; the trunk's head when absent */
|
||||
"trunk"?: string;
|
||||
}
|
||||
|
||||
/** is what try answers. */
|
||||
export interface TryAnswer {
|
||||
/** the try's id */
|
||||
"id": string;
|
||||
/** its state */
|
||||
"state"?: string;
|
||||
}
|
||||
|
||||
/** is what try-read takes. */
|
||||
export interface TryReadInput {
|
||||
/** the try's id, try-<digits> */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is what try-read answers. */
|
||||
export type TryReadAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what try-end takes. */
|
||||
export interface TryEndInput {
|
||||
/** the try's id, try-<digits> */
|
||||
"id": string;
|
||||
/** why it is ended, in words */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what try-end answers. */
|
||||
export interface TryEndAnswer {
|
||||
/** it is ended */
|
||||
"ended": boolean;
|
||||
/** the try */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event verdict. */
|
||||
export interface VerdictHolderEvent {
|
||||
/** the commit checked */
|
||||
"head": string;
|
||||
/** the generated files out of step with their seat definitions, each path (design 26) */
|
||||
"out-of-step"?: string[];
|
||||
/** the pull request's number, for a pull request's check */
|
||||
"pull"?: number;
|
||||
/** owner/repo */
|
||||
"repository": string;
|
||||
/** pass or fail */
|
||||
"verdict": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event tag-wanted. */
|
||||
export interface TagWantedHolderEvent {
|
||||
/** the pull request's branch: its tag is removed when the branch ends */
|
||||
"branch": string;
|
||||
/** its head */
|
||||
"head": string;
|
||||
/** the group member */
|
||||
"module": string;
|
||||
/** the package it declares */
|
||||
"package": string;
|
||||
/** the pull request */
|
||||
"pull"?: number;
|
||||
/** owner/repo */
|
||||
"repository": string;
|
||||
/** the tag wanted */
|
||||
"tag"?: string;
|
||||
}
|
||||
|
||||
@@ -1,400 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "mesh-vault", defined whole (seats/mesh-vault/seat.json): The mesh's secrets. accept and move-asks, which no holder served and nothing called, are left out (ADR 0620 §3). The vault's own events stay under its own subjects (ADR 0620 §2).
|
||||
|
||||
export const seat = "mesh-vault";
|
||||
|
||||
export const verbs = {
|
||||
get: "get",
|
||||
secretAsk: "secret-ask",
|
||||
issued: "issued",
|
||||
rotate: "rotate",
|
||||
moveIn: "move-in",
|
||||
nodeKey: "node-key",
|
||||
own: "own",
|
||||
issueAccount: "issue-account",
|
||||
sign: "sign",
|
||||
enrolmentToken: "enrolment-token",
|
||||
nodeAccount: "node-account",
|
||||
rotateNode: "rotate-node",
|
||||
nodeAccountConfirm: "node-account-confirm",
|
||||
abandon: "abandon",
|
||||
retire: "retire",
|
||||
} as const;
|
||||
|
||||
export const holderEvents = {
|
||||
provisioned: "provisioned",
|
||||
rotated: "rotated",
|
||||
secretChanged: "secret-changed",
|
||||
accountHashed: "account-hashed",
|
||||
ownReplaced: "own-replaced",
|
||||
accountIssued: "account-issued",
|
||||
signed: "signed",
|
||||
rotationBegun: "rotation-begun",
|
||||
nodeAccountReady: "node-account-ready",
|
||||
rotationDone: "rotation-done",
|
||||
ownRetired: "own-retired",
|
||||
} as const;
|
||||
|
||||
export function provisionedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.provisioned";
|
||||
}
|
||||
|
||||
export function rotatedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.rotated";
|
||||
}
|
||||
|
||||
export function secretChangedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.secret-changed";
|
||||
}
|
||||
|
||||
export function accountHashedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.account-hashed";
|
||||
}
|
||||
|
||||
export function ownReplacedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.own-replaced";
|
||||
}
|
||||
|
||||
export function accountIssuedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.account-issued";
|
||||
}
|
||||
|
||||
export function signedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.signed";
|
||||
}
|
||||
|
||||
export function rotationBegunHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.rotation-begun";
|
||||
}
|
||||
|
||||
export function nodeAccountReadyHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.node-account-ready";
|
||||
}
|
||||
|
||||
export function rotationDoneHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.rotation-done";
|
||||
}
|
||||
|
||||
export function ownRetiredHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.own-retired";
|
||||
}
|
||||
|
||||
/** is what get takes. */
|
||||
export interface GetInput {
|
||||
/** the secret's name */
|
||||
"name": string;
|
||||
/** the asker's X25519 public key as SPKI PEM — never a private key */
|
||||
"public_key": string;
|
||||
}
|
||||
|
||||
/** is what get answers. */
|
||||
export type GetAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what secret-ask takes. */
|
||||
export interface SecretAskInput {
|
||||
/** who asked, as the bus named its caller */
|
||||
"asked_by"?: string;
|
||||
/** the second step: the call the first step answered */
|
||||
"call"?: string;
|
||||
/** the machine whose prompt asks */
|
||||
"desk"?: string;
|
||||
/** the module */
|
||||
"module"?: string;
|
||||
/** the secret's name in the module */
|
||||
"name"?: string;
|
||||
/** the machine the secret is for */
|
||||
"node"?: string;
|
||||
/** instead of sealed: how the prompt ended */
|
||||
"outcome"?: string;
|
||||
/** the second step: the value sealed to the call's key — never the value */
|
||||
"sealed"?: string;
|
||||
}
|
||||
|
||||
/** is what secret-ask answers. */
|
||||
export type SecretAskAnswer = Record<string, unknown>;
|
||||
|
||||
export interface IssuedInputHoldersItem {
|
||||
/** the consuming module */
|
||||
"module"?: string;
|
||||
/** the holder's machine */
|
||||
"node"?: string;
|
||||
}
|
||||
|
||||
/** is what issued takes. */
|
||||
export interface IssuedInput {
|
||||
/** the second step: the call the first step answered */
|
||||
"call"?: string;
|
||||
/** the provision's holders from that provider, each {node, module}: its tool may answer a value for each, kept as that holder's own and handed to it alone */
|
||||
"holders"?: IssuedInputHoldersItem[];
|
||||
/** the provider's module */
|
||||
"module"?: string;
|
||||
/** the provider's machine */
|
||||
"provider"?: string;
|
||||
/** the provision */
|
||||
"provision"?: string;
|
||||
/** the second step: the value sealed to the call's key — never the value */
|
||||
"sealed"?: string;
|
||||
}
|
||||
|
||||
/** is what issued answers. */
|
||||
export type IssuedAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what rotate takes. */
|
||||
export interface RotateInput {
|
||||
/** who asked, when the controller carries the act */
|
||||
"by"?: string;
|
||||
/** the module */
|
||||
"module"?: string;
|
||||
/** the secret's name in the module */
|
||||
"name"?: string;
|
||||
/** the machine, for a module's own secret */
|
||||
"node"?: string;
|
||||
/** the provider's machine */
|
||||
"provider"?: string;
|
||||
/** the provision */
|
||||
"provision"?: string;
|
||||
}
|
||||
|
||||
/** is what rotate answers. */
|
||||
export type RotateAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what move-in takes. */
|
||||
export interface MoveInInput {
|
||||
/** the second step: the call the first step answered */
|
||||
"call"?: string;
|
||||
/** the consumer's machine */
|
||||
"consumer"?: string;
|
||||
/** the consuming module */
|
||||
"consumer_module"?: string;
|
||||
/** the controller's generation for the value */
|
||||
"generation"?: string;
|
||||
/** the credential's local name, when it has one */
|
||||
"local"?: string;
|
||||
/** when it was made (RFC 3339) */
|
||||
"made_at"?: string;
|
||||
/** its module */
|
||||
"module"?: string;
|
||||
/** its name in the module */
|
||||
"name"?: string;
|
||||
/** a module's own secret: its machine */
|
||||
"node"?: string;
|
||||
/** made, accepted or issued, as the controller's store says */
|
||||
"origin"?: string;
|
||||
/** a pair credential: the provider's machine */
|
||||
"provider"?: string;
|
||||
/** the provision */
|
||||
"provision"?: string;
|
||||
/** the second step: a raw X25519 public key the read-back is sealed to */
|
||||
"read_back_to"?: string;
|
||||
/** the second step: the value sealed to the call's key — never the value */
|
||||
"sealed"?: string;
|
||||
}
|
||||
|
||||
/** is what move-in answers. */
|
||||
export type MoveInAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what node-key takes. */
|
||||
export interface NodeKeyInput {
|
||||
/** the machine's sealing key, a raw X25519 public key in base64 */
|
||||
"key"?: string;
|
||||
}
|
||||
|
||||
/** is what node-key answers. */
|
||||
export type NodeKeyAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what own takes. */
|
||||
export interface OwnInput {
|
||||
/** the pair credentials the machine's composition reads, each {role: consumer|provider, provision, consumer, consumer_module, provider, local} */
|
||||
"credentials"?: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
/** is what own answers. */
|
||||
export type OwnAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what issue-account takes. */
|
||||
export interface IssueAccountInput {
|
||||
/** the bus user, e.g. ace.mesh-build-go */
|
||||
"user": string;
|
||||
}
|
||||
|
||||
/** is what issue-account answers. */
|
||||
export type IssueAccountAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what sign takes. */
|
||||
export interface SignInput {
|
||||
/** node-certificate or enrolment */
|
||||
"kind": string;
|
||||
/** the machine, for a node certificate: the caller's own, or the node mesh-enrolment enrols */
|
||||
"node"?: string;
|
||||
/** the redeem answer's bytes in base64, for an enrolment */
|
||||
"reply"?: string;
|
||||
/** from mesh-enrolment: the serving key's public half the enrolling node presented */
|
||||
"serving_key"?: string;
|
||||
}
|
||||
|
||||
/** is what sign answers. */
|
||||
export interface SignAnswer {
|
||||
/** the authority's certificate that signed it, as PEM */
|
||||
"authority"?: string;
|
||||
/** the node certificate as PEM, for a node certificate */
|
||||
"certificate"?: string;
|
||||
/** sha256:<hex> of the bytes signed */
|
||||
"digest": string;
|
||||
/** node-certificate or enrolment, as asked */
|
||||
"kind": string;
|
||||
/** the machine, for a node certificate */
|
||||
"node"?: string;
|
||||
/** the signature in base64, for an enrolment */
|
||||
"signature"?: string;
|
||||
/** the signer's fingerprint */
|
||||
"signer": string;
|
||||
}
|
||||
|
||||
/** the node's first tunnel, built by mesh-enrolment at issue and carried in the token: the hub's public key, the hub's endpoint, the node's tunnel address, its own tunnel key and the network's range */
|
||||
export interface EnrolmentTokenInputTunnel {
|
||||
/** the joining node's tunnel address */
|
||||
"address": string;
|
||||
/** the hub's endpoint, host:port */
|
||||
"hub_endpoint": string;
|
||||
/** the hub's tunnel public key */
|
||||
"hub_key": string;
|
||||
/** the joining machine's own tunnel public key, as given at issue */
|
||||
"key": string;
|
||||
/** the private network's range, a prefix */
|
||||
"range": string;
|
||||
}
|
||||
|
||||
/** is what enrolment-token takes. */
|
||||
export interface EnrolmentTokenInput {
|
||||
/** "true": drop the node's token and its hash */
|
||||
"drop"?: "true" | "false";
|
||||
/** when the token expires (RFC 3339), as the enrolment's key says */
|
||||
"expires"?: string;
|
||||
/** the node the token is for */
|
||||
"node": string;
|
||||
/** "true": answer the token sealed to the operator key */
|
||||
"sealed"?: "true" | "false";
|
||||
/** the node's first tunnel, built by mesh-enrolment at issue and carried in the token: the hub's public key, the hub's endpoint, the node's tunnel address, its own tunnel key and the network's range */
|
||||
"tunnel"?: EnrolmentTokenInputTunnel;
|
||||
}
|
||||
|
||||
/** is what enrolment-token answers. */
|
||||
export interface EnrolmentTokenAnswer {
|
||||
/** the bus's address the machine dials */
|
||||
"broker"?: string;
|
||||
/** a drop left neither the token nor its hash */
|
||||
"dropped"?: boolean;
|
||||
/** the fingerprint of the bus's certificate */
|
||||
"fingerprint"?: string;
|
||||
/** the node the token is for */
|
||||
"node": string;
|
||||
/** the token sealed to the operator key, when asked sealed, relayed as it is */
|
||||
"sealed"?: string;
|
||||
/** the vault's public signing key in base64 */
|
||||
"signer"?: string;
|
||||
}
|
||||
|
||||
/** is what node-account takes. */
|
||||
export interface NodeAccountInput {
|
||||
/** the digest of every public key the node presented (delivery.KeysDigest) */
|
||||
"keys_digest"?: string;
|
||||
/** the joining node */
|
||||
"node": string;
|
||||
/** "true": retire the account minted for this node */
|
||||
"retire"?: "true" | "false";
|
||||
/** the sealing key's public half the node presented, which the account is sealed to */
|
||||
"sealing_key"?: string;
|
||||
}
|
||||
|
||||
/** is what node-account answers. */
|
||||
export interface NodeAccountAnswer {
|
||||
/** the account sealed to the node's sealing key, in base64 */
|
||||
"account"?: string;
|
||||
/** the login minted */
|
||||
"login"?: string;
|
||||
/** the joining node */
|
||||
"node": string;
|
||||
/** a retire left no account */
|
||||
"retired"?: boolean;
|
||||
}
|
||||
|
||||
/** is what rotate-node takes. */
|
||||
export interface RotateNodeInput {
|
||||
/** the id of the hand act recorded for it in mesh-hand-acts */
|
||||
"act": string;
|
||||
/** the node whose account rotates */
|
||||
"node": string;
|
||||
/** why, in a sentence */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what rotate-node answers. */
|
||||
export type RotateNodeAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what node-account-confirm takes. */
|
||||
export interface NodeAccountConfirmInput {
|
||||
}
|
||||
|
||||
/** is what node-account-confirm answers. */
|
||||
export type NodeAccountConfirmAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what abandon takes. */
|
||||
export interface AbandonInput {
|
||||
/** the node whose rotation is abandoned */
|
||||
"node": string;
|
||||
}
|
||||
|
||||
/** is what abandon answers. */
|
||||
export type AbandonAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what retire takes. */
|
||||
export interface RetireInput {
|
||||
/** the id of the operator's ask the warrant answers */
|
||||
"ask": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the own secret's name */
|
||||
"name": string;
|
||||
/** the node */
|
||||
"node": string;
|
||||
/** the operator's warrant for this node, module and name: the hand act's id */
|
||||
"warrant": string;
|
||||
}
|
||||
|
||||
/** is what retire answers. */
|
||||
export interface RetireAnswer {
|
||||
/** the secret is gone */
|
||||
"retired": boolean;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event signed. */
|
||||
export interface SignedHolderEvent {
|
||||
/** when it was signed, RFC 3339 */
|
||||
"at": string;
|
||||
/** the caller the vault proved */
|
||||
"caller": string;
|
||||
/** sha256:<hex> of the bytes signed */
|
||||
"digest": string;
|
||||
/** node-certificate or enrolment */
|
||||
"kind": string;
|
||||
/** the machine, for a node certificate */
|
||||
"node"?: string;
|
||||
/** the signer's fingerprint */
|
||||
"signer": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event own-retired. */
|
||||
export interface OwnRetiredHolderEvent {
|
||||
/** the ask's id */
|
||||
"ask"?: string;
|
||||
/** the caller the vault proved */
|
||||
"caller": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the secret's name */
|
||||
"name": string;
|
||||
/** the node */
|
||||
"node": string;
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "npm-package-registry", defined whole (seats/npm-package-registry/seat.json): The mesh's npm packages: the npm registry protocol's read side, and publishing over the bus.
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export const seat = "npm-package-registry";
|
||||
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "npm-package-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const publishedSubject = "mesh.seat.npm-package-registry.event.published";
|
||||
|
||||
export const refusedSubject = "mesh.seat.npm-package-registry.event.refused";
|
||||
|
||||
export const removedSubject = "mesh.seat.npm-package-registry.event.removed";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
export type PublishedEvent = registry.PublishedEvent;
|
||||
export type RefusedEvent = registry.RefusedEvent;
|
||||
export type RemoveAnswer = registry.RemoveAnswer;
|
||||
export type RemoveInput = registry.RemoveInput;
|
||||
export type RemovedEvent = registry.RemovedEvent;
|
||||
export type VersionsAnswer = registry.VersionsAnswer;
|
||||
export type VersionsInput = registry.VersionsInput;
|
||||
|
||||
/** is the form of the provision npm-package-registry. */
|
||||
export interface NpmPackageRegistryForm {
|
||||
/** the read side's address */
|
||||
"url": string;
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "oci-artifact-registry", defined whole (seats/oci-artifact-registry/seat.json): The mesh's bundles and archives, by digest, in the one artifact store: the OCI distribution protocol's read side.
|
||||
|
||||
import type * as registry from "./parts/registry.js";
|
||||
|
||||
export const seat = "oci-artifact-registry";
|
||||
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
hold: "hold",
|
||||
release: "release",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
held: "held",
|
||||
released: "released",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "oci-artifact-registry.events", maxAgeDays: 7 } as const;
|
||||
|
||||
export const publishedSubject = "mesh.seat.oci-artifact-registry.event.published";
|
||||
|
||||
export const refusedSubject = "mesh.seat.oci-artifact-registry.event.refused";
|
||||
|
||||
export const removedSubject = "mesh.seat.oci-artifact-registry.event.removed";
|
||||
|
||||
export const heldSubject = "mesh.seat.oci-artifact-registry.event.held";
|
||||
|
||||
export const releasedSubject = "mesh.seat.oci-artifact-registry.event.released";
|
||||
|
||||
export type Artifact = registry.Artifact;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
export type PublishedEvent = registry.PublishedEvent;
|
||||
export type RefusedEvent = registry.RefusedEvent;
|
||||
export type RemoveAnswer = registry.RemoveAnswer;
|
||||
export type RemoveInput = registry.RemoveInput;
|
||||
export type RemovedEvent = registry.RemovedEvent;
|
||||
export type VersionsAnswer = registry.VersionsAnswer;
|
||||
export type VersionsInput = registry.VersionsInput;
|
||||
|
||||
/** the body of held and released */
|
||||
export interface Hold {
|
||||
/** when, RFC 3339 */
|
||||
"at"?: string;
|
||||
/** the caller the holder proved */
|
||||
"by"?: string;
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the module holding the seat */
|
||||
"holder": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** why */
|
||||
"reason"?: string;
|
||||
}
|
||||
|
||||
/** is what hold takes. */
|
||||
export interface HoldInput {
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** which of the sweep's rules keeps it */
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** is what hold answers. */
|
||||
export interface HoldAnswer {
|
||||
/** it is held */
|
||||
"held": boolean;
|
||||
/** when the hold began, RFC 3339 */
|
||||
"since"?: string;
|
||||
}
|
||||
|
||||
/** is what release takes. */
|
||||
export interface ReleaseInput {
|
||||
/** the digest */
|
||||
"digest": string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** why it is let go */
|
||||
"reason": string;
|
||||
}
|
||||
|
||||
/** is what release answers. */
|
||||
export interface ReleaseAnswer {
|
||||
/** the hold is gone */
|
||||
"released": boolean;
|
||||
}
|
||||
|
||||
/** is the body of the event held. */
|
||||
export type HeldEvent = Hold;
|
||||
|
||||
/** is the body of the event released. */
|
||||
export type ReleasedEvent = Hold;
|
||||
|
||||
/** is the form of the provision artifact-store. */
|
||||
export interface ArtifactStoreForm {
|
||||
/** the store's address */
|
||||
"url": string;
|
||||
}
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The contract of the seat "operator-channel", defined whole (seats/operator-channel/seat.json): Asking a person and answering on a channel (ADR 0259): held by the router, the messenger module, whose manifest declares the seat; written from that seat entry (design 26).
|
||||
|
||||
export const seat = "operator-channel";
|
||||
|
||||
export const verbs = {
|
||||
open: "open",
|
||||
history: "history",
|
||||
notify: "notify",
|
||||
tell: "tell",
|
||||
asks: "asks",
|
||||
} as const;
|
||||
|
||||
export const accepts = {
|
||||
ask: "ask",
|
||||
cancel: "cancel",
|
||||
condition: "condition",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
decided: "decided",
|
||||
} as const;
|
||||
|
||||
export const family = { name: "operator-channel.decided", maxAgeDays: 7 } as const;
|
||||
|
||||
export function decidedSubject(caller: string): string {
|
||||
return "mesh.seat.operator-channel.event.decided." + caller;
|
||||
}
|
||||
|
||||
export function askSubject(caller: string): string {
|
||||
return "mesh.seat.operator-channel.accept.ask." + caller;
|
||||
}
|
||||
|
||||
export function cancelSubject(caller: string): string {
|
||||
return "mesh.seat.operator-channel.accept.cancel." + caller;
|
||||
}
|
||||
|
||||
export function conditionSubject(caller: string): string {
|
||||
return "mesh.seat.operator-channel.accept.condition." + caller;
|
||||
}
|
||||
|
||||
export const holderEvents = {
|
||||
refused: "refused",
|
||||
offered: "offered",
|
||||
closed: "closed",
|
||||
} as const;
|
||||
|
||||
export function refusedHolderSubject(holder: string): string {
|
||||
return "mesh.mod." + holder + ".event.refused";
|
||||
}
|
||||
|
||||
export function offeredHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.offered";
|
||||
}
|
||||
|
||||
export function closedHolderSubject(holder: string): string {
|
||||
return "mesh.stream." + holder + ".event.closed";
|
||||
}
|
||||
|
||||
export interface Ask {
|
||||
/** what it is about: a newer ask about it replaces the older */
|
||||
"about"?: string;
|
||||
/** its secondary words */
|
||||
"details"?: string;
|
||||
/** when it ends unanswered, RFC 3339 */
|
||||
"expires": string;
|
||||
/** what happened and what it means */
|
||||
"explanation": string;
|
||||
/** a few plain words */
|
||||
"headline": string;
|
||||
/** the asker's own id */
|
||||
"id": string;
|
||||
/** what the asker then does */
|
||||
"on-expiry": string;
|
||||
/** the answers it offers */
|
||||
"options": Option[];
|
||||
/** urgent */
|
||||
"urgent"?: boolean;
|
||||
/** who may answer: operator */
|
||||
"who": string;
|
||||
/** the explanation with its values whole */
|
||||
"whole"?: string;
|
||||
/** the details whole */
|
||||
"whole-details"?: string;
|
||||
}
|
||||
|
||||
export interface ConditionActionsItem {
|
||||
"arguments"?: Record<string, string>;
|
||||
/** label */
|
||||
"label": string;
|
||||
/** level */
|
||||
"level"?: string;
|
||||
/** machine */
|
||||
"machine"?: string;
|
||||
/** verb */
|
||||
"verb": string;
|
||||
}
|
||||
|
||||
export interface ConditionSubject {
|
||||
/** id */
|
||||
"id": string;
|
||||
/** machine */
|
||||
"machine"?: string;
|
||||
/** scope */
|
||||
"scope": string;
|
||||
}
|
||||
|
||||
export interface Condition {
|
||||
/** the answers it offers */
|
||||
"actions"?: ConditionActionsItem[];
|
||||
/** plain words */
|
||||
"explanation"?: string;
|
||||
/** plain words */
|
||||
"headline"?: string;
|
||||
/** the condition's key */
|
||||
"key": string;
|
||||
/** what it needs */
|
||||
"needs"?: string;
|
||||
/** the line said when it is over */
|
||||
"resolved"?: string;
|
||||
/** urgent or warning */
|
||||
"severity"?: string;
|
||||
/** raised or cleared */
|
||||
"state": string;
|
||||
"subject": ConditionSubject;
|
||||
/** one line */
|
||||
"summary"?: string;
|
||||
/** the form's version, 1 */
|
||||
"v": number;
|
||||
}
|
||||
|
||||
export interface Option {
|
||||
/** the digest of exactly what the asker performs when it is chosen */
|
||||
"binds"?: string;
|
||||
/** what it does, in plain words */
|
||||
"does": string;
|
||||
/** the option's id */
|
||||
"id": string;
|
||||
/** the button's label */
|
||||
"label": string;
|
||||
/** the proof its answer needs */
|
||||
"level": string;
|
||||
}
|
||||
|
||||
export interface Person {
|
||||
/** the name shown */
|
||||
"display"?: string;
|
||||
/** the account */
|
||||
"identity": string;
|
||||
/** the channel kind */
|
||||
"kind": string;
|
||||
/** how the router knew */
|
||||
"verified": string;
|
||||
/** the role */
|
||||
"who": string;
|
||||
}
|
||||
|
||||
export interface Warrant {
|
||||
/** what it was about */
|
||||
"about"?: string;
|
||||
/** the ask */
|
||||
"ask": string;
|
||||
/** the digest of the ask as the router took it */
|
||||
"ask-digest"?: string;
|
||||
/** its asker */
|
||||
"asker": string;
|
||||
/** when, RFC 3339 */
|
||||
"at": string;
|
||||
"by"?: Person;
|
||||
/** the module it came through */
|
||||
"channel"?: string;
|
||||
/** its label */
|
||||
"label"?: string;
|
||||
/** its level */
|
||||
"level"?: string;
|
||||
/** the option chosen */
|
||||
"option"?: string;
|
||||
"outcome": "chosen" | "expired" | "cancelled" | "replaced" | "refused";
|
||||
/** the proofs present */
|
||||
"proofs"?: string[];
|
||||
/** why it ended without a choice, or what refused it */
|
||||
"words"?: string;
|
||||
}
|
||||
|
||||
/** is what open takes. */
|
||||
export interface OpenInput {
|
||||
}
|
||||
|
||||
/** is what open answers. */
|
||||
export type OpenAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what history takes. */
|
||||
export interface HistoryInput {
|
||||
/** at most this many of each (default 50) */
|
||||
"limit"?: number;
|
||||
}
|
||||
|
||||
/** is what history answers. */
|
||||
export type HistoryAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what notify takes. */
|
||||
export interface NotifyInput {
|
||||
/** it is over */
|
||||
"clear"?: boolean;
|
||||
/** one or two plain sentences */
|
||||
"explanation"?: string;
|
||||
/** plain words */
|
||||
"headline"?: string;
|
||||
/** the message's key */
|
||||
"key"?: string;
|
||||
/** the line said when it is over */
|
||||
"resolved"?: string;
|
||||
"severity"?: "urgent" | "warning";
|
||||
/** what it is about */
|
||||
"subject"?: string;
|
||||
/** one line */
|
||||
"summary"?: string;
|
||||
}
|
||||
|
||||
/** is what notify answers. */
|
||||
export type NotifyAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what tell takes. */
|
||||
export interface TellInput {
|
||||
/** plain words */
|
||||
"headline"?: string;
|
||||
/** one or two plain lines */
|
||||
"lines"?: string[];
|
||||
/** what it is about */
|
||||
"subject"?: string;
|
||||
}
|
||||
|
||||
/** is what tell answers. */
|
||||
export type TellAnswer = Record<string, unknown>;
|
||||
|
||||
/** is what asks takes. */
|
||||
export interface AsksInput {
|
||||
}
|
||||
|
||||
/** is what asks answers. */
|
||||
export type AsksAnswer = Record<string, unknown>;
|
||||
|
||||
/** is the body of ask. */
|
||||
export type AskAccept = Ask;
|
||||
|
||||
/** is the body of cancel. */
|
||||
export interface CancelAccept {
|
||||
/** the ask's id */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is the body of condition. */
|
||||
export type ConditionAccept = Condition;
|
||||
|
||||
/** is the body of the event decided. */
|
||||
export type DecidedEvent = Warrant;
|
||||
|
||||
/** is the body of the holder's event offered. */
|
||||
export interface OfferedHolderEvent {
|
||||
/** its asker */
|
||||
"asker": string;
|
||||
/** the channels it was offered on */
|
||||
"channels"?: string[];
|
||||
/** its headline */
|
||||
"headline"?: string;
|
||||
/** the ask's id */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is the body of the holder's event closed. */
|
||||
export interface ClosedHolderEvent {
|
||||
/** its asker */
|
||||
"asker": string;
|
||||
"how": "answered" | "expired" | "cancelled" | "replaced" | "unlinked";
|
||||
/** the ask's id */
|
||||
"id": string;
|
||||
}
|
||||
|
||||
/** is one value of the record asks. */
|
||||
export type AsksRecord = Record<string, unknown>;
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
||||
|
||||
// The part "registry" several seats include whole: The verbs and events every registry seat shares, written once so the four cannot drift (design 51, design 26). Who may call each verb is the holder's trusted config value listing its callers (ADR 0363's form), checked against the caller the tool runner proved.
|
||||
|
||||
export const verbs = {
|
||||
publish: "publish",
|
||||
publishPart: "publish-part",
|
||||
versions: "versions",
|
||||
remove: "remove",
|
||||
} as const;
|
||||
|
||||
export const events = {
|
||||
published: "published",
|
||||
refused: "refused",
|
||||
removed: "removed",
|
||||
} as const;
|
||||
|
||||
/** one published thing, as every registry event and answer names it */
|
||||
export interface Artifact {
|
||||
/** the source commit it was built from */
|
||||
"commit"?: string;
|
||||
/** its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record) */
|
||||
"digest": string;
|
||||
/** the build's fingerprint */
|
||||
"fingerprint"?: string;
|
||||
/** what it is */
|
||||
"kind": "package" | "image" | "bundle" | "archive" | "upstream";
|
||||
/** the package's, image's, bundle's or archive's name */
|
||||
"name": string;
|
||||
/** the tag it carries, for a tagged version */
|
||||
"tag"?: string;
|
||||
/** the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone */
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** the body of published, refused and removed */
|
||||
export interface Outcome {
|
||||
/** the source commit it was built from */
|
||||
"commit"?: string;
|
||||
/** its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record) */
|
||||
"digest": string;
|
||||
/** the build's fingerprint */
|
||||
"fingerprint"?: string;
|
||||
/** the module holding the seat that said it */
|
||||
"holder": string;
|
||||
/** what it is */
|
||||
"kind": "package" | "image" | "bundle" | "archive" | "upstream";
|
||||
/** the Go module path a Go package is fetched under (go-package-registry's published); empty for every other kind of artifact */
|
||||
"module"?: string;
|
||||
/** the package's, image's, bundle's or archive's name */
|
||||
"name": string;
|
||||
/** why: a refusal's cause, or a removal's (retention, tag-gone, by-hand) */
|
||||
"reason"?: string;
|
||||
/** the reference the seat answers: <registry>/<module>/<artifact>@sha256:<digest>, or <name>@<version> for a package (ADR 0605 §9) */
|
||||
"reference"?: string;
|
||||
/** the tag it carries, for a tagged version */
|
||||
"tag"?: string;
|
||||
/** the transfer it ends, when it ended one */
|
||||
"transfer"?: string;
|
||||
/** the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone */
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** one part of a transfer */
|
||||
export interface Part {
|
||||
/** the part's digest, sha256:<hex>: an image's layer or config, a package's file, a bundle's blob */
|
||||
"digest": string;
|
||||
/** its size in bytes */
|
||||
"size": number;
|
||||
}
|
||||
|
||||
/** is what publish takes. */
|
||||
export interface PublishInput {
|
||||
/** the source commit it was built from */
|
||||
"commit"?: string;
|
||||
/** its digest, sha256:<hex> (a Go package's h1: hash beside it in the version's record) */
|
||||
"digest": string;
|
||||
/** the build's fingerprint */
|
||||
"fingerprint"?: string;
|
||||
/** what it is */
|
||||
"kind": "package" | "image" | "bundle" | "archive" | "upstream";
|
||||
/** the package's, image's, bundle's or archive's name */
|
||||
"name": string;
|
||||
/** every part's digest and size; none when the digest is already held */
|
||||
"parts"?: Part[];
|
||||
/** the tag it carries, for a tagged version */
|
||||
"tag"?: string;
|
||||
/** the transfer's name, the caller's own; the same name opens the same transfer again */
|
||||
"transfer": string;
|
||||
/** the version the builder gave it (design 51 *The versions*); empty for a bundle or archive published by its digest alone */
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** is what publish answers. */
|
||||
export interface PublishAnswer {
|
||||
/** the digest is held already: nothing to send; the outcome follows as an event */
|
||||
"held"?: boolean;
|
||||
/** the digests of the parts the holder lacks, to send by publish-part */
|
||||
"lacks"?: string[];
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
/** is what publish-part takes. */
|
||||
export interface PublishPartInput {
|
||||
/** the chunk's bytes, base64 (at most 760 KiB before encoding) */
|
||||
"data": string;
|
||||
/** this chunk is the part's last */
|
||||
"last": boolean;
|
||||
/** the part's digest */
|
||||
"part": string;
|
||||
/** the chunk's place in its part, from 0 */
|
||||
"sequence": number;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
/** is what publish-part answers. */
|
||||
export interface PublishPartAnswer {
|
||||
/** the part is whole and its bytes match its digest */
|
||||
"complete"?: boolean;
|
||||
/** the part */
|
||||
"part": string;
|
||||
/** the chunks of the part held so far */
|
||||
"received"?: number;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
/** is what versions takes. */
|
||||
export interface VersionsInput {
|
||||
/** narrowed to one kind (optional) */
|
||||
"kind"?: string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
}
|
||||
|
||||
/** is what versions answers. */
|
||||
export interface VersionsAnswer {
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** newest first */
|
||||
"versions": Artifact[];
|
||||
}
|
||||
|
||||
/** is what remove takes. */
|
||||
export interface RemoveInput {
|
||||
/** the digest (for a bundle, archive or copied base) */
|
||||
"digest"?: string;
|
||||
/** the name */
|
||||
"name": string;
|
||||
/** why it goes */
|
||||
"reason": "tag-gone" | "retention";
|
||||
/** the tag (for a tagged version) */
|
||||
"tag"?: string;
|
||||
/** the version */
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** is what remove answers. */
|
||||
export interface RemoveAnswer {
|
||||
"artifact"?: Artifact;
|
||||
/** it is gone */
|
||||
"removed": boolean;
|
||||
}
|
||||
|
||||
/** is the body of the event published. */
|
||||
export type PublishedEvent = Outcome;
|
||||
|
||||
/** is the body of the event refused. */
|
||||
export type RefusedEvent = Outcome;
|
||||
|
||||
/** is the body of the event removed. */
|
||||
export type RemovedEvent = Outcome;
|
||||
|
||||
Reference in New Issue
Block a user