/** * One committed frontier, read whole, as values nothing live still owns. * * This is the other half of the artifact boundary. `writeXmdArtifact()` accepts * a complete detached snapshot and knows nothing about runs; this produces one * from a run and knows nothing about containers. Everything in between — the * executor lock, the recovery copy, where the file goes — belongs to the export * operation that calls both. * * ## Whole, not a prefix * * `readForkSource()` reads the prefix one checkpoint selects, because a fork * inherits history up to a point and writes its own beginning. An export * inherits nothing: it records what the run committed, so it reads every * journal row, every retained root, and every other XMD-owned record the run * holds. The two are deliberately separate readers over the same tables rather * than one reader with a mode, because "up to this checkpoint" and "everything" * differ in what they are allowed to leave out. * * ## Read, never repair * * Everything here is a `SELECT` on a connection the caller opened read-only. * Nothing settles a status, relabels a stop reason, replays an event, or * completes a half-written Workspace. A run whose host died mid-execution * exports as the `running` run it is — the artifact records what was committed, * and inventing a tidier frontier would be recording something that never * happened. */ import type { DatabaseSync } from "node:sqlite"; import type { Json } from "@executablemd/durable-streams"; import type { DetachedXmdArtifact } from "./artifact/types.js"; import type { WorkflowRunRecord } from "../storage/record.js"; /** * The complete committed state of one run, as the artifact writer's input. * * `closure` is checked against the definition this frontier actually retains * before it is carried, so a caller cannot seal one run's evidence around * another run's Markdown. The writer checks the bytes hash to the identities * the definition names; what is checked here is that it is the right * definition at all. */ export declare function readExportFrontier(database: DatabaseSync, record: WorkflowRunRecord, path: string): Omit; /** Where this host could fetch the definition from, as the run last recorded it. */ export declare function readRetrievalMetadata(database: DatabaseSync): Json | undefined;