import type { NestedWorkflowNodeDefinition, NodeAttempt, NodeAttemptId, WorkflowDefinition, WorkflowDiagnostic, WorkflowErrorSummary, WorkflowEventEmitter, WorkflowRegistry, WorkflowRun, WorkflowRunId, WorkflowRuntimeEvent, WorkflowValue } from "../types/index.js"; import type { WorkflowRunStore } from "../store/index.js"; export type NestedWorkflowExecutorContext = { workflow: WorkflowDefinition; run: WorkflowRun; nodeAttemptId: NodeAttemptId; nodeId: string; node: NestedWorkflowNodeDefinition; childWorkflow: WorkflowDefinition; childRunId: WorkflowRunId; input: WorkflowValue; namespace?: string; }; export type NestedWorkflowExecutorResult = { output: WorkflowValue; childRun: WorkflowRun; events?: WorkflowRuntimeEvent[]; }; export type NestedWorkflowExecutor = (context: NestedWorkflowExecutorContext) => Promise | NestedWorkflowExecutorResult; export type WorkflowNestedWorkflowNodeDispatchOptions = { registry: Pick; now?: () => Date | string; createNodeAttemptId?: () => NodeAttemptId; createChildRunId?: () => WorkflowRunId; store?: WorkflowRunStore; emitEvent?: WorkflowEventEmitter; nestedWorkflowExecutor: NestedWorkflowExecutor; }; export type WorkflowNestedWorkflowNodeDispatchSuccess = { ok: true; run: WorkflowRun; nodeAttempt: NodeAttempt; events: WorkflowRuntimeEvent[]; output: WorkflowValue; childRun: WorkflowRun; }; export type WorkflowNestedWorkflowNodeDispatchFailure = { ok: false; run: WorkflowRun; nodeAttempt?: NodeAttempt; events: WorkflowRuntimeEvent[]; diagnostics: WorkflowDiagnostic[]; error: WorkflowErrorSummary; childRun?: WorkflowRun; }; export type WorkflowNestedWorkflowNodeDispatchResult = WorkflowNestedWorkflowNodeDispatchSuccess | WorkflowNestedWorkflowNodeDispatchFailure; export declare function dispatchWorkflowNestedWorkflowNode(definition: WorkflowDefinition, run: WorkflowRun, nodeId: string, input: WorkflowValue, options: WorkflowNestedWorkflowNodeDispatchOptions): Promise; //# sourceMappingURL=nested-workflow-node.d.ts.map