import type { WorkflowConfig, WorkflowCallStep, WorkflowCallInvocationRecord, WorkflowMaxSteps, WorkflowResumePointEntry, WorkflowState } from '../../models/types.js'; import type { RunPaths } from '../run/run-paths.js'; import type { StepProviderInfo, WorkflowAbortKind, WorkflowCallChildEngine, WorkflowCallResolver, WorkflowEngineOptions, WorkflowSharedRuntimeState, WorkflowStepFailureSummary } from '../types.js'; import type { LiveInterventionChannel } from '../live-intervention/types.js'; export interface WorkflowCallSessionUpdate { expectedSessionId: string | undefined; sessionId: string | undefined; } export type WorkflowCallSessionUpdates = ReadonlyMap; export interface WorkflowCallIsolatedStateSync { iteration: number; maxSteps?: WorkflowMaxSteps; } export interface WorkflowCallChildExecutionState { readonly originalError: unknown; readonly sessionUpdates: WorkflowCallSessionUpdates; readonly stateSync: WorkflowCallIsolatedStateSync; } export declare function preserveWorkflowCallChildExecutionState(error: unknown, sessionUpdates: WorkflowCallSessionUpdates, stateSync: WorkflowCallIsolatedStateSync): unknown; export declare function getWorkflowCallChildExecutionState(error: unknown): WorkflowCallChildExecutionState | undefined; interface WorkflowCallExecutorDeps { getConfig: () => WorkflowConfig; getOptions: () => WorkflowEngineOptions; getAbortSignal?: () => AbortSignal | undefined; getMaxSteps: () => WorkflowMaxSteps; updateMaxSteps: (maxSteps: WorkflowMaxSteps) => void; getCwd: () => string; projectCwd: string; task: string; sharedRuntime: WorkflowSharedRuntimeState; resumeStackPrefix: WorkflowResumePointEntry[]; consumeWorkflowCallContinuation: (step: WorkflowCallStep, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]) => WorkflowResumePointEntry | undefined; runPaths: RunPaths; resolveWorkflowCall: WorkflowCallResolver; createEngine: (config: WorkflowConfig, cwd: string, task: string, options: WorkflowEngineOptions) => WorkflowCallChildEngine; emit: (event: string, ...args: unknown[]) => void; state: { iteration: number; personaSessions: Map; stepIterations: Map; userInputs: string[]; }; setActiveResumePoint: (step: WorkflowCallStep, iteration: number, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]) => void; } export interface PreparedWorkflowCallExecution { readonly parentWorkflowReference: string; readonly stepName: string; readonly childWorkflow: WorkflowConfig; readonly occurrence: number; readonly resumeStackPrefix: readonly WorkflowResumePointEntry[]; readonly invocation: Readonly; } interface ExecuteWorkflowCallRequest { step: WorkflowCallStep; preparedExecution: PreparedWorkflowCallExecution; childProviderInfo: StepProviderInfo; parentProviderOptions: WorkflowEngineOptions['providerOptions']; personaProviders: WorkflowEngineOptions['personaProviders']; providerRouting: WorkflowEngineOptions['providerRouting']; providerLadders: WorkflowEngineOptions['providerLadders']; /** Undefined preserves direct workflow_call inheritance; null explicitly disables it for an isolated child. */ liveIntervention?: LiveInterventionChannel | null; } interface ExecuteWorkflowCallOptions { syncParentState: boolean; } export type WorkflowCallExecutionResult = WorkflowState & { abortKind?: WorkflowAbortKind; abortReason?: string; abortFailure?: WorkflowStepFailureSummary; returnValue?: string; sessionUpdates?: WorkflowCallSessionUpdates; isolatedStateSync?: WorkflowCallIsolatedStateSync; }; export declare class WorkflowCallExecutor { private readonly deps; private readonly childRoutingRuntimes; constructor(deps: WorkflowCallExecutorDeps); private getChildRoutingRuntime; private buildWorkflowCallNamespace; private buildCurrentWorkflowCallFrame; private resolveChildResumeStartStep; private resolveChildContinuation; recordPendingInvocation(step: WorkflowCallStep, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]): void; prepare(step: WorkflowCallStep, childWorkflow: WorkflowConfig, occurrence: number, resumeStackPrefix: readonly WorkflowResumePointEntry[]): PreparedWorkflowCallExecution; private relayChildEvents; private syncStateFromChild; execute(request: ExecuteWorkflowCallRequest, executeOptions: ExecuteWorkflowCallOptions): Promise; } export {}; //# sourceMappingURL=WorkflowCallExecutor.d.ts.map