/** * Independent checkpoint sinks. A local chain alone cannot detect deletion of * a whole segment or of its tail, so every checkpoint is also published to a * sink the ledger directory does not control. * * - `gitRefCheckpointSink` (the default) stores the canonical checkpoint as a * git blob and moves `refs/aiwg/effects//checkpoint` to it with a * compare-and-swap `update-ref`. * - `memoryCheckpointSink` is for tests and embedding hosts. * - Other sinks (for example the #1567 operator-decision audit) implement the * same `CheckpointSink` port. */ import type { EffectCheckpoint, EffectScope, EffectSubsystem } from './types.js'; export interface CheckpointSinkReceipt { sink: string; reference: string; } export interface CheckpointSink { readonly name: string; publish(checkpoint: EffectCheckpoint): Promise; /** The most recent published checkpoint for `scope`, or null when none was published. */ latest(scope: EffectScope): Promise; } export interface GitResult { stdout: string; exitCode: number; } export type GitRunner = (args: string[], stdin?: string) => Promise; export interface GitRefCheckpointSinkOptions { repoDir: string; subsystem: EffectSubsystem; /** Defaults to `refs/aiwg/effects//checkpoint`. */ ref?: string; runner?: GitRunner; } export declare function gitRefCheckpointSink(options: GitRefCheckpointSinkOptions): CheckpointSink; /** In-memory sink. `published` holds every checkpoint in publication order. */ export declare function memoryCheckpointSink(): CheckpointSink & { published: EffectCheckpoint[]; }; //# sourceMappingURL=checkpoint-sinks.d.ts.map