import type { ForkOptions } from '../../types.ts'; import type { WorkflowHandle } from '../handles.ts'; import type { EngineInternals } from '../internals.ts'; import { type FreshResumeClaimTracker } from './resume.ts'; import { type LifecycleCallbacks, type RecoverAllOptions } from './shared.ts'; export declare function recoverAll(internals: EngineInternals, callbacks: LifecycleCallbacks, options?: RecoverAllOptions): Promise; /** Options for {@link resume}. */ export type ResumeOptions = { /** * Skip the local-ownership fast path and always replay from durable storage. * * Required by ADR 0002 reclaim-driven resume: deposition drops only the * registry's claim entry, so local checkpoints, parked markers, contexts and * generators survive. Without this, a reclaim by the same engine returns the * pre-deposition handle without reaching `resumeWorkflowFromStorage()` and * renews a run that never restarted from durable state. Ordinary * `engine.resume()` leaves it `false` — nothing was deposed there. */ readonly forceReplayFromStorage?: boolean; /** * Forwarded to `resumeWorkflowFromStorage()`'s matching options — see * `ResumeFromStorageOptions` (WFT-134 issue D). Set by * `recoverEntryOrIsolateFailure` only; unset for the local-ownership fast * path above, which never reaches that function. */ readonly deferClaimReleaseOnRejection?: boolean; readonly freshClaimTracker?: FreshResumeClaimTracker; }; export declare function resume(internals: EngineInternals, workflowId: string, callbacks: LifecycleCallbacks, onRecoveredWorkflow?: RecoverAllOptions['onRecoveredWorkflow'], options?: ResumeOptions): Promise; export declare function fork(internals: EngineInternals, sourceWorkflowId: string, options: ForkOptions | undefined, callbacks: LifecycleCallbacks): Promise;