import type { WorkflowConfig, WorkflowCallStep, WorkflowMaxSteps, WorkflowResumePointEntry, WorkflowState } from '../../models/types.js'; import type { RunPaths } from '../run/run-paths.js'; import type { RuntimeStepResolution, StepRunResult, WorkflowCallChildEngine, WorkflowCallResolver, WorkflowEngineOptions, WorkflowSharedRuntimeState } from '../types.js'; import { type WorkflowCallIsolatedStateSync, type WorkflowCallSessionUpdates } from './WorkflowCallExecutor.js'; import type { LiveInterventionChannel } from '../live-intervention/types.js'; interface WorkflowCallRunnerDeps { getConfig: () => WorkflowConfig; getMaxSteps: () => WorkflowMaxSteps; getAbortSignal?: () => AbortSignal | undefined; updateMaxSteps: (maxSteps: WorkflowMaxSteps) => void; state: WorkflowState; projectCwd: string; getCwd: () => string; task: string; getOptions: () => WorkflowEngineOptions; sharedRuntime: WorkflowSharedRuntimeState; resumeStackPrefix: WorkflowResumePointEntry[]; consumeWorkflowCallContinuation: (step: WorkflowCallStep, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]) => WorkflowResumePointEntry | undefined; runPaths: RunPaths; setActiveResumePoint: (step: WorkflowCallStep, iteration: number, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]) => void; emit: (event: string, ...args: unknown[]) => void; resolveWorkflowCall: WorkflowCallResolver; createEngine: (config: WorkflowConfig, cwd: string, task: string, options: WorkflowEngineOptions) => WorkflowCallChildEngine; } export interface WorkflowCallExecutionToken { readonly stepName: string; readonly occurrence: number; readonly resumeStackPrefix: readonly WorkflowResumePointEntry[]; fail(error: unknown): void; cancel(): void; } export declare class WorkflowCallRunner { private readonly deps; private readonly executor; private readonly preparedExecutions; private pendingExecution; constructor(deps: WorkflowCallRunnerDeps); private resolveParentWorkflowProviderContext; private resolveChildProviderModel; resolveRuntime(_step: WorkflowCallStep): RuntimeStepResolution; isArtifactNamespaceReserved(step: WorkflowCallStep, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]): boolean; private buildChildPersonaProviders; private buildChildProviderRouting; private buildChildProviderLadders; private buildWorkflowCallResponse; private requireIsolatedSessionUpdates; private requireIsolatedStateSync; private translateWorkflowCallConfigError; private resolveCallableChildWorkflow; private buildAttemptLifecycle; private buildTerminalLifecycle; private buildFailedLifecycle; private resolveAttempt; private executeAttempt; private failAttempt; private terminatePreparedExecution; private prepareInvocation; cancelPendingInvocation(): void; activateInvocation(step: WorkflowCallStep, iteration: number, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]): WorkflowCallExecutionToken; private consumePreparedExecution; private executeChildWorkflow; run(step: WorkflowCallStep, token: WorkflowCallExecutionToken, runtime?: RuntimeStepResolution): Promise; runIsolated(step: WorkflowCallStep, runtime: RuntimeStepResolution, resumeStackPrefix: readonly WorkflowResumePointEntry[], token: WorkflowCallExecutionToken, options?: { /** Null prevents the isolated child from inheriting the parent channel. */ readonly liveIntervention?: LiveInterventionChannel | null; }): Promise<{ result: StepRunResult; sessionUpdates: WorkflowCallSessionUpdates; stateSync: WorkflowCallIsolatedStateSync; }>; } export {}; //# sourceMappingURL=WorkflowCallRunner.d.ts.map