Merge origin/main (#5): mesh-broker's Binding is the wire form; restore-kept and snapshot-kept taken out, the binding names its objects
The conflicts in mesh-broker's seat.json and fixtures took origin/main's Binding (list, show and orphans answer each binding) and the objects field of C8; C8's snapshot-kept, restore-kept, KeptPoint and Aside are not carried over as G section 555 moves them to the seat mesh-recovery, which mesh-broker does not gain. The generated Go and TypeScript of mesh-broker are written again by seatgen. Builds: design 47 G §399, §513, §555 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
Vendored
+25
-122
@@ -13,8 +13,6 @@ export declare const verbs: {
|
||||
readonly apply: "apply";
|
||||
readonly recreate: "recreate";
|
||||
readonly drop: "drop";
|
||||
readonly snapshotKept: "snapshot-kept";
|
||||
readonly restoreKept: "restore-kept";
|
||||
};
|
||||
|
||||
export declare const events: {
|
||||
@@ -49,36 +47,34 @@ export declare const recreatedSubject: "mesh.seat.mesh-broker.event.recreated";
|
||||
|
||||
export declare const droppedSubject: "mesh.seat.mesh-broker.event.dropped";
|
||||
|
||||
/** live kept data a restore set aside, never removed but by discard-aside */
|
||||
export interface Aside {
|
||||
/** when it was set aside */
|
||||
"at"?: string;
|
||||
/** the form it held */
|
||||
"form"?: number;
|
||||
/** its id, for discard-aside */
|
||||
"id": string;
|
||||
/** the kept data */
|
||||
"kept": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the name it is kept under on the bus */
|
||||
"name": string;
|
||||
/** its size in bytes */
|
||||
"size"?: number;
|
||||
}
|
||||
|
||||
/** the binding a module receives in its membership for one entry (ADR 0595 §1, §7) */
|
||||
/** the binding a module receives in its membership for one entry (ADR 0595 §1, §7): the names on the bus of the entry's objects, one form in the events, in list, show and orphans, and in the membership */
|
||||
export interface Binding {
|
||||
/** the entry's name on the bus */
|
||||
"bus-name": string;
|
||||
/** a key-value bucket's name */
|
||||
"bucket"?: string;
|
||||
/** a ledger's history stream */
|
||||
"history"?: string;
|
||||
/** a ledger's index buckets, by index name */
|
||||
"indexes"?: Record<string, string>;
|
||||
/** the entry's local name in the module's manifest */
|
||||
"local": string;
|
||||
/** an object store's name */
|
||||
"object-store"?: string;
|
||||
/** the bus name of the state's <state>-objects, where its large values go (design 47 G 58, 399) */
|
||||
"objects"?: string;
|
||||
/** how the bus keeps it */
|
||||
"storage-type": string;
|
||||
/** its subjects, for a stream */
|
||||
"subjects"?: string[];
|
||||
/** the subject of a ledger's instances' snapshots */
|
||||
"snapshot"?: string;
|
||||
/** a ledger's state bucket */
|
||||
"state"?: string;
|
||||
/** how the bus keeps it: the entry's storage type */
|
||||
"storage": string;
|
||||
/** a stream's name on the bus */
|
||||
"stream"?: string;
|
||||
/** the subject a stream's messages are on; also a ledger's history's */
|
||||
"subject"?: string;
|
||||
/** its template */
|
||||
"template"?: string;
|
||||
/** a ledger's types, as its manifest declares them */
|
||||
"types"?: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
/** one piece of bus state as a manifest asks it */
|
||||
@@ -108,6 +104,8 @@ export interface Fill {
|
||||
|
||||
/** one entry as the bus holds it */
|
||||
export interface Held {
|
||||
/** the binding a module receives for the entry, as created and recreated carry it; present on an entry whose objects the bus holds, absent on one it does not (design 25 bindings-first-view §2) */
|
||||
"binding"?: Binding;
|
||||
/** its name on the bus, <module>_<local name> */
|
||||
"bus-name": string;
|
||||
/** its own configuration, where no template fits */
|
||||
@@ -131,43 +129,6 @@ export interface Held {
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** the catch-up tool and its arguments the restore point records (design 47 G 406) */
|
||||
export interface KeptPointCatchUp {
|
||||
"arguments"?: Record<string, unknown>;
|
||||
"tool": string;
|
||||
}
|
||||
|
||||
export interface KeptPointConsumersItem {
|
||||
/** the durable consumer */
|
||||
"consumer": string;
|
||||
/** its acknowledged position */
|
||||
"sequence": number;
|
||||
/** the stream */
|
||||
"stream": string;
|
||||
}
|
||||
|
||||
/** a restore point of one module's kept data on the bus, whole, with its consumers' positions */
|
||||
export interface KeptPoint {
|
||||
/** when it was taken */
|
||||
"at"?: string;
|
||||
/** the catch-up tool and its arguments the restore point records (design 47 G 406) */
|
||||
"catch-up"?: KeptPointCatchUp;
|
||||
/** each durable consumer the module reads with, and its position */
|
||||
"consumers"?: KeptPointConsumersItem[];
|
||||
/** the fingerprint the restore point is taken before */
|
||||
"fingerprint": string;
|
||||
/** its form, the number the holder raises when it changes how it writes it (0 when undeclared) */
|
||||
"form": number;
|
||||
/** the kept data, its local name in the module's manifest */
|
||||
"kept": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** its size in bytes */
|
||||
"size"?: number;
|
||||
/** the restore point's name */
|
||||
"snapshot": string;
|
||||
}
|
||||
|
||||
export interface Named {
|
||||
/** the entry's local name */
|
||||
"local-name": string;
|
||||
@@ -298,64 +259,6 @@ export interface DropAnswer {
|
||||
"snapshot"?: string;
|
||||
}
|
||||
|
||||
/** the catch-up tool the newer manifest declares beside the kept data and its arguments whole, recorded in the restore point (design 47 G 299, 406) */
|
||||
export interface SnapshotKeptInputCatchUp {
|
||||
"arguments"?: Record<string, unknown>;
|
||||
"tool": string;
|
||||
}
|
||||
|
||||
/** is what snapshot-kept takes. */
|
||||
export interface SnapshotKeptInput {
|
||||
/** the catch-up tool the newer manifest declares beside the kept data and its arguments whole, recorded in the restore point (design 47 G 299, 406) */
|
||||
"catch-up"?: SnapshotKeptInputCatchUp;
|
||||
/** the fingerprint the restore point is taken before */
|
||||
"fingerprint": string;
|
||||
/** its form, the number the holder raises when it changes how it writes it (0 when undeclared) */
|
||||
"form": number;
|
||||
/** the kept data, its local name in the module's manifest */
|
||||
"kept": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** why it is taken */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** is what snapshot-kept answers. */
|
||||
export interface SnapshotKeptAnswer {
|
||||
/** why it failed; set alone */
|
||||
"error"?: string;
|
||||
"point"?: KeptPoint;
|
||||
}
|
||||
|
||||
/** is what restore-kept takes. */
|
||||
export interface RestoreKeptInput {
|
||||
/** set the live data aside and restore nothing */
|
||||
"aside-only"?: boolean;
|
||||
/** the name of data set aside: remove it and restore nothing */
|
||||
"discard-aside"?: string;
|
||||
/** the fingerprint the restore point is taken before */
|
||||
"fingerprint": string;
|
||||
/** its form, the number the holder raises when it changes how it writes it (0 when undeclared) */
|
||||
"form": number;
|
||||
/** the kept data, its local name in the module's manifest */
|
||||
"kept": string;
|
||||
/** the module */
|
||||
"module": string;
|
||||
/** the restore point's name; not with aside-only or discard-aside */
|
||||
"snapshot"?: string;
|
||||
/** why */
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** is what restore-kept answers. */
|
||||
export interface RestoreKeptAnswer {
|
||||
"aside"?: Aside;
|
||||
/** why it failed; set alone */
|
||||
"error"?: string;
|
||||
/** the restore point is the live data now */
|
||||
"restored"?: boolean;
|
||||
}
|
||||
|
||||
/** is the body of the event created. */
|
||||
export type CreatedEvent = Said;
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ export const verbs = {
|
||||
apply: "apply",
|
||||
recreate: "recreate",
|
||||
drop: "drop",
|
||||
snapshotKept: "snapshot-kept",
|
||||
restoreKept: "restore-kept",
|
||||
};
|
||||
|
||||
export const events = {
|
||||
|
||||
Reference in New Issue
Block a user