Files
mesh-contracts/ts/seats/containerimageregistry/src/index.ts
T
jschoubben 859da7b1ce Registry seats: remove answers and says kept when a tagged version shares its digest
A store that cannot remove a tag alone (another tag names its digest) kept the tag and the holder said
removed, so the builder and every follower believed the tagged version gone while it stayed pullable:
work reported done that was not done. The shared registry part gains the outcome kept: in remove's
answer (kept, the reason shared-digest, the tags still naming the digest) and as its own event, in all
four registry seats. Regenerated with mesh-catalog's seatgen (join-mesh-catalog ccb7eaff); seatgen
-check passes; fixtures for the answer and the event in each seat.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-04 18:12:34 +01:00

160 lines
4.1 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 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",
kept: "kept",
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 keptSubject = "mesh.seat.container-image-registry.event.kept";
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 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;
}
/** 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 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;
}