import { PendingPauseRecord, WorkflowState } from "./types.js"; import { CheckpointStore } from "@graphorin/core"; //#region src/inspect.d.ts /** Snapshot returned by {@link readThreadState}. @stable */ interface ThreadInspection { readonly workflowName: string; readonly namespace: string; readonly threadId: string; readonly checkpointId: string; readonly stepNumber: number; readonly createdAt: string; readonly status: WorkflowState['status']; /** The unwrapped channel record persisted at the latest checkpoint. */ readonly state: unknown; /** Node the run last stopped in, when the store recorded one. */ readonly nodeName?: string; /** Full pending-pause frontier: timers (`wakeAt`), awakeables/approvals (`name`). */ readonly pendingPauses: ReadonlyArray; } /** One row of {@link listThreadCheckpoints}. @stable */ interface ThreadCheckpointSummary { readonly checkpointId: string; readonly parentId?: string; readonly stepNumber: number; readonly createdAt: string; readonly status?: string; readonly nodeName?: string; } /** * Read the latest checkpoint of `threadId` under workflow * `workflowName` and decode it exactly like `Workflow.getState` does * (versioned state envelope + frontier tag). Returns `null` when the * thread does not exist in that namespace - an operator CLI reports * that instead of throwing. * * @stable */ declare function readThreadState(store: CheckpointStore, workflowName: string, threadId: string): Promise; /** * List every persisted checkpoint of `threadId` under workflow * `workflowName`, newest first as the store yields them, summarised * for operator display (id, parent, step, status, node). * * @stable */ declare function listThreadCheckpoints(store: CheckpointStore, workflowName: string, threadId: string): Promise>; //#endregion export { ThreadCheckpointSummary, ThreadInspection, listThreadCheckpoints, readThreadState }; //# sourceMappingURL=inspect.d.ts.map