/** * The `Run` facade — one harness execution as the SDK exposes it. Built from a `runs.get` lookup * (read a past run, record outlives the workspace), from `harness.run()` (which also captures the file * changes inline), or from `harness.start()` (a live handle; `wait()` settles it). `result` is * derived from the wire status; `changes` is captured inline by `run()` and fetched by `wait()` once * the run is terminal (the event-sourced fileChange projection that backs reads arrives in Phase 1); * `artifacts` is empty until the artifact store is exposed; `record` reads via the run/record * endpoints. */ import type { Run as WireRun } from "@sealant/api-contracts"; import type { Run, RunFileChange } from "../types.js"; import type { SdkContext } from "./context.js"; export interface RunChangesData { readonly files: readonly RunFileChange[]; readonly diff: string; readonly available: boolean; readonly unavailableReason?: string; } export interface RunInit { readonly wire: WireRun; readonly changes?: RunChangesData; } /** Maps the wire changes shape to the facade data (shared with the run-harness execution path). */ export declare const toRunChangesData: (wire: { readonly files: readonly { readonly path: string; readonly change: "added" | "deleted" | "modified" | "renamed"; readonly oldPath?: string | undefined; }[]; readonly diff: string; readonly available?: boolean | undefined; readonly unavailableReason?: string | undefined; }) => RunChangesData; export declare const makeRun: (ctx: SdkContext, init: RunInit) => Run;