import type { Checkpoint, StartOptions, WorkflowState } from '../../types.ts'; import type { EngineInternals } from '../internals.ts'; import { type LifecycleCallbacks, type RegistrationEntry } from './shared.ts'; export declare function runWorkflowStartInterceptor(_internals: EngineInternals, workflowId: string, workflowType: string, input: unknown, parentHeaders: Map | undefined, callbacks: LifecycleCallbacks): Map | undefined; export declare function startWorkflowExecution(internals: EngineInternals, workflowId: string, workflowExecutionToken: string | undefined, workflowType: string, /** * The starting run's persisted `WorkflowState.revision` (WFT-19/WFT-20): * populates the per-instance identity cache readers use for revision-scoped * routing, and is echoed to the strategy's `startWorkflow` for worker-protocol * revision validation. */ revision: string | undefined, input: unknown, checkpoint: Checkpoint, nestingDepth: number, executionDeadline: number | undefined, executionStateOwnerId: string, _callbacks?: LifecycleCallbacks): void; export declare function beginWorkflowExecution(internals: EngineInternals, workflowId: string, workflowExecutionToken: string | undefined, workflowType: string, /** * The starting run's persisted `WorkflowState.revision` (WFT-19/WFT-20). * Threaded into both the queued-inline path below (which also re-reads * `revision` off the RELOADED `WorkflowState` at flush time — * `inline-launch-queue.ts` — exactly like it already does for * `workflowExecutionToken`) and the non-inline `startWorkflowExecution` * branch, which populates the per-instance identity cache with it directly. */ revision: string | undefined, input: unknown, checkpoint: Checkpoint, executionDeadline: number | undefined, executionStateOwnerId: string, _registration: RegistrationEntry, callbacks: LifecycleCallbacks, onStarted?: () => void): void; /** * `defer: false` is an inline-only liveness gate: it awaits the moment the * generator is first driven. A worker-mode start queues to the Worker transport * (no inline liveness to await), and a delayed start has not begun executing at * all — so both reject rather than silently behaving like `defer: true`. */ export declare function assertDeferSupported(internals: EngineInternals, options: StartOptions | undefined, isDelayedStart: boolean): void; type BeginExecutionParams = { type: string; input: unknown; checkpoint: Checkpoint; state: WorkflowState; registration: RegistrationEntry; options: StartOptions | undefined; isDelayed: boolean; }; /** * Drive the initial execution for a freshly-started workflow and, when * `defer: false`, await the run actually beginning before resolving. A delayed * start does not begin executing now, so it neither begins execution here nor * awaits liveness. The liveness promise is settled by the inline-launch queue * once the generator is driven (or by dispose if the queued start is discarded), * so a `defer: false` caller can rely on the run being live without a macrotask * round-trip the moment `engine.start()` resolves. */ export declare function beginExecutionAwaitingLiveness(internals: EngineInternals, params: BeginExecutionParams, workflowId: string, callbacks: LifecycleCallbacks): Promise; export {};