Files
mesh-contracts/ts/seats/meshrecovery/index.d.ts
T
jschoubben 2172a8732d H2 K1: every seat package read tolerantly, saying its form
A reader of another part's value refused a field it did not know, so a holder
that added one broke every reader until each was rebuilt. Every package is
generated again by mesh-delivery's seatgen (feat/47-H2 ff7db337): each
generated decoder keeps unknown fields, returns the form read (1 when absent)
and each package states its Form (1 everywhere, left out on the wire). The
hand-written clients take the three values, and the node-engine client's
ask, answer, composition and have decoders keep unknown fields too; their tests
now hold that tolerance. seatgen -check clean in all five folders.

Builds: design 47 H2 §780; H-A-350 DMC-4
2026-11-21 23:15:25 +01:00

519 lines
19 KiB
TypeScript

// Code generated by seatgen from the seat definitions; DO NOT EDIT.
// The contract of the seat "mesh-recovery", defined whole (seats/mesh-recovery/seat.json): Takes, sets aside and restores a module's kept data on the live bus, each act in the hand-act log (design 47 G 554). Its verbs answer at once and the result is the event.
export declare const seat: "mesh-recovery";
export declare const verbs: {
readonly snapshotKept: "snapshot-kept";
readonly restoreKept: "restore-kept";
readonly keptPoints: "kept-points";
readonly restoreAside: "restore-aside";
readonly cancel: "cancel";
readonly take: "take";
readonly restore: "restore";
readonly retry: "retry";
readonly aside: "aside";
readonly discardAside: "discard-aside";
readonly expirePoints: "expire-points";
};
export declare const events: {
readonly ended: "ended";
readonly restoreStarted: "restore-started";
readonly restored: "restored";
readonly setAside: "set-aside";
readonly asideDiscarded: "aside-discarded";
readonly pointRemoved: "point-removed";
readonly expiryEnded: "expiry-ended";
};
export declare const family: { readonly name: "mesh-recovery.events"; readonly maxAgeDays: 7 };
export declare const endedStream: "SEAT_mesh-recovery_ended";
export declare function endedSubject(module: string, kept: string): string;
export declare const endedSubjectAll: "mesh.seat.mesh-recovery.event.ended.*.*";
export declare const restoreStartedStream: "SEAT_mesh-recovery_restore-started";
export declare function restoreStartedSubject(module: string, kept: string): string;
export declare const restoreStartedSubjectAll: "mesh.seat.mesh-recovery.event.restore-started.*.*";
export declare const restoredStream: "SEAT_mesh-recovery_restored";
export declare function restoredSubject(module: string, kept: string): string;
export declare const restoredSubjectAll: "mesh.seat.mesh-recovery.event.restored.*.*";
export declare const setAsideStream: "SEAT_mesh-recovery_set-aside";
export declare function setAsideSubject(module: string, kept: string): string;
export declare const setAsideSubjectAll: "mesh.seat.mesh-recovery.event.set-aside.*.*";
export declare const asideDiscardedStream: "SEAT_mesh-recovery_aside-discarded";
export declare function asideDiscardedSubject(module: string, kept: string): string;
export declare const asideDiscardedSubjectAll: "mesh.seat.mesh-recovery.event.aside-discarded.*.*";
export declare const pointRemovedStream: "SEAT_mesh-recovery_point-removed";
export declare function pointRemovedSubject(module: string, kept: string): string;
export declare const pointRemovedSubjectAll: "mesh.seat.mesh-recovery.event.point-removed.*.*";
export declare const expiryEndedStream: "SEAT_mesh-recovery_expiry-ended";
export declare const expiryEndedSubject: "mesh.seat.mesh-recovery.event.expiry-ended";
/** the live data set aside before a restore: a directory under aside/ in the recovery module's directory, nothing of it on the bus (design 47 G 516) */
export interface Aside {
/** the directory's name */
"id": string;
/** the bus names it was live under, one per bus object */
"names": string[];
/** its bytes on disk */
"size": number;
}
/** the catch-up of the newer manifest: a tool and its arguments, never text (design 47 G 451, 516, 631) */
export interface CatchUp {
"arguments"?: Record<string, unknown>;
"tool": string;
}
/** one durable consumer of the kept data and the sequence it had acknowledged */
export interface Consumer {
"name": string;
"sequence": number;
"stream": string;
}
/** the digest of one object of a point's bytes */
export interface Digest {
"digest": string;
"name": string;
}
/** a restore point: the kept data whole and its consumers' positions, in the recovery module's points directory (design 47 G 516, 560) */
export interface Point {
/** when it was taken, RFC 3339 */
"at": string;
"catch-up"?: CatchUp;
"consumers"?: Consumer[];
/** the digest of each object's bytes, checked before a restore (design 47 G 567) */
"digests"?: Digest[];
/** the fingerprint it was 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 bus names it took, one per bus object (design 47 G A-230) */
"names": string[];
/** its bytes */
"size": number;
/** the point's name, also its directory's */
"snapshot": string;
}
/** the act that runs, since when and what it waits on (design 47 G 517, 554) */
export interface Running {
"act": string;
"since": string;
"step"?: string;
/** what it waits on, when it waits */
"waits-on"?: string;
}
/** is what snapshot-kept takes. */
export interface SnapshotKeptInput {
"catch-up"?: CatchUp;
/** the fingerprint the restore point is taken before, or reverted from */
"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, which the hand-act log keeps */
"why": string;
}
/** is what snapshot-kept answers. */
export interface SnapshotKeptAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what restore-kept takes. */
export interface RestoreKeptInput {
/** the fingerprint the restore point is taken before, or reverted from */
"fingerprint": string;
/** its form, the number the holder raises when it changes how it writes it (0 when undeclared) */
"form": number;
/** ask the backup holder for the points directory when the point is missing there (design 47 G 516) */
"from-backup"?: boolean;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** the restore point's name */
"snapshot"?: string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what restore-kept answers. */
export interface RestoreKeptAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what kept-points takes. */
export interface KeptPointsInput {
/** one kept data (optional) */
"kept"?: string;
/** one module (optional) */
"module"?: string;
}
/** is what kept-points answers. */
export interface KeptPointsAnswer {
"asides": Aside[];
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
"points": Point[];
"running"?: Running;
/** the asides whose record ended at removed that no running act holds: the live data of those names is gone and only the aside holds it; the module's health check fails while one is listed (design 47 G 554, 657, A-129) */
"unrestored": Aside[];
}
/** is what restore-aside takes. */
export interface RestoreAsideInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** the aside's id */
"id": string;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what restore-aside answers. */
export interface RestoreAsideAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what cancel takes. */
export interface CancelInput {
/** the act's id */
"act": string;
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what cancel answers. */
export interface CancelAnswer {
/** accepted: the id of the act it cancelled, whose ending event follows under that id */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why not, naming the step an act has begun; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what take takes. */
export interface TakeInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** the fingerprint whose form the point is taken at */
"fingerprint": string;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what take answers. */
export interface TakeAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what restore takes. */
export interface RestoreInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** ask the backup holder for the points directory when the point is missing there; only with snapshot */
"from-backup"?: boolean;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** a keeper's snapshot by its request (design 47 G 681) */
"request"?: string;
/** a restore point's name */
"snapshot"?: string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what restore answers. */
export interface RestoreAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what retry takes. */
export interface RetryInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what retry answers. */
export interface RetryAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what aside takes. */
export interface AsideInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what aside answers. */
export interface AsideAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what discard-aside takes. */
export interface DiscardAsideInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** the aside's id */
"id": string;
/** the kept data, its local name in the module's manifest */
"kept": string;
/** the module */
"module": string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what discard-aside answers. */
export interface DiscardAsideAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is what expire-points takes. */
export interface ExpirePointsInput {
/** who asked: the caller the tool runner proved and recorded for the call (who@node, or operator), which the tools bundle's recovery tool passes and a module's process leaves out; the hand-act log names it beside the account the bus proved (design 47 G 682) */
"asker"?: string;
/** why, which the hand-act log keeps */
"why": string;
}
/** is what expire-points answers. */
export interface ExpirePointsAnswer {
/** accepted: the act's id, which the ending event carries */
"accepted"?: string;
/** busy: the id of the act that runs; it keeps no queue, so the caller asks again on that act's ending event */
"busy"?: string;
/** why it was not taken; set alone */
"error"?: string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
}
/** is the body of the event ended. */
export interface EndedEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
"catch-up"?: CatchUp;
"consumers"?: Consumer[];
"digests"?: Digest[];
/** when failed */
"error"?: string;
"fingerprint"?: string;
"form"?: number;
"kept": string;
"module": string;
/** how the act ended */
"outcome": "done" | "failed";
"size"?: number;
"snapshot"?: string;
/** the words of the hand act that ended it, for a cancel (design 47 G A-117, 560) */
"why"?: string;
}
/** is the body of the event restore-started. */
export interface RestoreStartedEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
"fingerprint"?: string;
"form"?: number;
"kept": string;
"module": string;
"snapshot"?: string;
}
/** is the body of the event restored. */
export interface RestoredEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
"aside"?: Aside;
/** when it was said, RFC 3339 */
"at": string;
"error"?: string;
"fingerprint"?: string;
"form"?: number;
"kept": string;
/** the point is not in the recovery module's directory */
"missing"?: boolean;
"module": string;
/** how the act ended */
"outcome": "done" | "failed";
"snapshot"?: string;
/** the words of the hand act that ended it, for a cancel (design 47 G A-117, 560) */
"why"?: string;
}
/** is the body of the event set-aside. */
export interface SetAsideEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
"id": string;
/** the bus names it was live under, one per bus object */
"names": string[];
"size": number;
}
/** is the body of the event aside-discarded. */
export interface AsideDiscardedEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
"id": string;
/** the bus names it was live under, one per bus object */
"names": string[];
"size": number;
}
/** is the body of the event point-removed. */
export interface PointRemovedEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
"fingerprint"?: string;
"form"?: number;
"kept": string;
"module": string;
"snapshot"?: string;
}
/** is the body of the event expiry-ended. */
export interface ExpiryEndedEvent {
/** the id the act was answered accepted with, or a hand act's own id (design 47 G 560) */
"act": string;
/** when it was said, RFC 3339 */
"at": string;
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
"form"?: number;
/** the number of points the run removed, 0 included */
"removed": number;
}