Generated by seatgen (mesh-catalog, GEN1 and GEN2 on its worktree) from the definitions of CT1 to CT9; module.json names the artifacts of the new seats mesh-builds, mesh-pipeline-runner and git. seatgen -check is clean; every seat package's generated fixture test passes. Builds: design 47 G §341 (a TypeScript contract is emitted as index.js with index.d.ts), §196, §339 (the generator refuses an unknown callers entry), §260, §331. Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
246 lines
7.0 KiB
TypeScript
246 lines
7.0 KiB
TypeScript
// 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 declare const seat: "container-image-registry";
|
|
|
|
export declare const verbs: {
|
|
readonly publish: "publish";
|
|
readonly publishPart: "publish-part";
|
|
readonly versions: "versions";
|
|
readonly remove: "remove";
|
|
readonly mirror: "mirror";
|
|
readonly tags: "tags";
|
|
readonly hold: "hold";
|
|
readonly release: "release";
|
|
readonly list: "list";
|
|
};
|
|
|
|
export declare const events: {
|
|
readonly published: "published";
|
|
readonly refused: "refused";
|
|
readonly removed: "removed";
|
|
readonly kept: "kept";
|
|
readonly held: "held";
|
|
readonly released: "released";
|
|
};
|
|
|
|
export declare const family: { readonly name: "container-image-registry.events"; readonly maxAgeDays: 7 };
|
|
|
|
export declare const publishedSubject: "mesh.seat.container-image-registry.event.published";
|
|
|
|
export declare const refusedSubject: "mesh.seat.container-image-registry.event.refused";
|
|
|
|
export declare const removedSubject: "mesh.seat.container-image-registry.event.removed";
|
|
|
|
export declare const keptSubject: "mesh.seat.container-image-registry.event.kept";
|
|
|
|
export declare const heldSubject: "mesh.seat.container-image-registry.event.held";
|
|
|
|
export declare const releasedSubject: "mesh.seat.container-image-registry.event.released";
|
|
|
|
export declare const states: {
|
|
readonly holds: "holds";
|
|
readonly windows: "windows";
|
|
};
|
|
|
|
/** The key of one value of the state holds under the form "<seat>.<name>.<digest>". */
|
|
export declare function holdsBySeatNameDigestKey(seat: string, name: string, digest: string): string;
|
|
|
|
/** The parts of a key of the form "<seat>.<name>.<digest>", or undefined for a key of another form. */
|
|
export declare function parseHoldsBySeatNameDigestKey(_key: string): { seat: string; name: string; digest: string } | undefined;
|
|
|
|
/** The key of one value of the state windows under the form "<caller>". */
|
|
export declare function windowsByCallerKey(caller: string): string;
|
|
|
|
/** The parts of a key of the form "<caller>", or undefined for a key of another form. */
|
|
export declare function parseWindowsByCallerKey(_key: string): { caller: string } | undefined;
|
|
|
|
export type Artifact = registry.Artifact;
|
|
export type KeptEvent = registry.KeptEvent;
|
|
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;
|
|
}
|
|
|
|
export interface Listed {
|
|
/** for a manifest keeping one bundle or archive, the digest of that blob: what a reference names it by */
|
|
"artifact"?: string;
|
|
/** the manifest's digest, sha256:<hex> */
|
|
"digest": string;
|
|
/** a hold keeps it from retention */
|
|
"held": boolean;
|
|
/** it is an index, naming a manifest per platform */
|
|
"index": boolean;
|
|
/** for an index, the digests of the manifests it names */
|
|
"platforms"?: string[];
|
|
/** its bytes: its own content and every blob it names */
|
|
"size": number;
|
|
/** the tags naming it, none for an untagged one */
|
|
"tags"?: string[];
|
|
}
|
|
|
|
export interface Repository {
|
|
/** each manifest it holds, by digest */
|
|
"manifests": Listed[];
|
|
/** the repository */
|
|
"name": 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 {
|
|
/** a hold was let go; false when there was none */
|
|
"released": boolean;
|
|
}
|
|
|
|
/** is what list takes. */
|
|
export interface ListInput {
|
|
/** the repository, <module>/<artifact>; every repository of the seat when not given */
|
|
"name"?: string;
|
|
}
|
|
|
|
/** is what list answers. */
|
|
export interface ListAnswer {
|
|
/** each repository named, in order of its name */
|
|
"repositories": Repository[];
|
|
}
|
|
|
|
/** is the body of the event held. */
|
|
export type HeldEvent = Hold;
|
|
|
|
/** is the body of the event released. */
|
|
export type ReleasedEvent = Hold;
|
|
|
|
/** is one value of the state holds under the key <seat>.<name>.<digest>. */
|
|
export interface HoldsBySeatNameDigestValue {
|
|
"by": string;
|
|
"digest": string;
|
|
"kind": string;
|
|
"name": string;
|
|
"seat": string;
|
|
/** when (RFC 3339 time) */
|
|
"since": string;
|
|
"why"?: string;
|
|
}
|
|
|
|
export interface WindowsByCallerValueDroppedItem {
|
|
/** when (RFC 3339 time) */
|
|
"at"?: string;
|
|
"by"?: string;
|
|
"node": string;
|
|
"why"?: string;
|
|
}
|
|
|
|
/** is one value of the state windows under the key <caller>. */
|
|
export interface WindowsByCallerValue {
|
|
/** when it last closed (RFC 3339 time) */
|
|
"closed"?: string;
|
|
/** retired nodes dropped by hand */
|
|
"dropped"?: WindowsByCallerValueDroppedItem[];
|
|
/** the nodes holding it open */
|
|
"holding"?: string[];
|
|
"last_holding"?: string[];
|
|
/** the caller whose window it is */
|
|
"name": string;
|
|
"open"?: boolean;
|
|
/** node to when it began to hold */
|
|
"since"?: Record<string, string>;
|
|
/** of each node holding the window, why it holds it */
|
|
"why"?: Record<string, string>;
|
|
}
|
|
|