import { SqliteConnection } from "./connection.js"; //#region src/suspended-run-store.d.ts /** * One durably-parked agent run (`awaiting_approval`). `stateJson` is * the agent-serialized resumable `RunState` (the version-stamped, * secret-redacted `graphorin-run-state/x.y` payload produced by * `Agent.serializeState`); the store treats it as an opaque string. * * @stable */ interface SuspendedRunRecord { readonly runId: string; readonly agentId: string; readonly sessionId?: string; readonly userId?: string; readonly stateJson: string; /** Epoch ms of the FIRST suspension - stable across re-puts. */ readonly suspendedAt: number; } /** * Durable sidecar for the server's `RunStateTracker`: a run suspended * on durable HITL outlives the process, so the REST resume endpoint * keeps working after a restart. The `@graphorin/server` package * consumes this surface; the schema ships in migration 038. * * @stable */ interface SuspendedRunStore { /** * Insert or refresh a suspension. A re-put for the same `runId` * replaces the state but keeps the original `suspendedAt`, so the * column always answers "how long has this approval been waiting". */ put(record: SuspendedRunRecord): Promise; get(runId: string): Promise; delete(runId: string): Promise; /** Every parked run, oldest suspension first - boot hydration. */ list(): Promise>; } /** * Default `SuspendedRunStore` implementation. * * @stable */ declare class SqliteSuspendedRunStore implements SuspendedRunStore { #private; constructor(conn: SqliteConnection); put(record: SuspendedRunRecord): Promise; get(runId: string): Promise; delete(runId: string): Promise; list(): Promise>; } //#endregion export { SqliteSuspendedRunStore, SuspendedRunRecord, SuspendedRunStore }; //# sourceMappingURL=suspended-run-store.d.ts.map