import type { ContextOperationRequest } from '../context.ts'; import type { EngineInternals } from './internals.ts'; import type { CoordinationOperationCallbacks } from './operations-coordination.ts'; type WaitConditionOperation = Extract; export type ConditionOperationCallbacks = Pick & { /** * Fail the pending operation, feeding the error to the generator so it * re-throws at the `yield* ctx.waitUntil` site. Used when the user predicate * throws — a throwing predicate must surface as a catchable workflow failure, * not park the run forever. */ failOperation: (workflowId: string, operation: WaitConditionOperation, error: unknown) => void; /** Whether the workflow is still running — gates completion after a wake. */ isWorkflowRunning: (workflowId: string) => Promise; /** Schedule the deterministic deadline timer (`cond:${workflowId}:${step}`). */ scheduleConditionDeadline: (workflowId: string, step: number, fireAt: number) => Promise; /** Cancel the deadline timer in storage on teardown. */ cancelConditionDeadline: (workflowId: string, step: number) => Promise; }; export declare function processWaitConditionOperation(internals: EngineInternals, workflowId: string, operation: WaitConditionOperation, callbacks: ConditionOperationCallbacks): Promise; export {};