import { CheckpointManager, ExecutionNode } from "./checkpoint.js"; import { JsonValue, WorkflowMessageListener } from "./workflow-state.js"; export declare const WORKFLOW_CONTEXT_SYMBOL: unique symbol; type JsonSchema = unknown; export type InputRequest = { type: "input-request"; nodeId: string; resultSchema: JsonSchema; timeoutAt: string | null; } | { type: "external-tool"; toolName: string; nodeId: string; params: unknown; paramsSchema: JsonSchema; resultSchema: JsonSchema; }; export interface WorkflowExecutionContext { checkpointManager: CheckpointManager; sendWorkflowMessage: WorkflowMessageListener; onRequestInput: (request: InputRequest) => Promise; objectStateMap: Map; onRestoreCheckpoint: (node: ExecutionNode, feedback: unknown) => Promise; checkpointLabelMap: Map; executionScope: Record; } export declare function createWorkflowContext({ onMessage, onRequestInput, onRestoreCheckpoint, checkpoint, executionScope, }?: { onMessage?: WorkflowMessageListener; onRequestInput?: (request: InputRequest) => Promise; onRestoreCheckpoint?: (node: ExecutionNode, feedback: unknown) => Promise; checkpoint?: ExecutionNode; executionScope?: Record; }): WorkflowExecutionContext; export declare function getWorkflowContext(): WorkflowExecutionContext | undefined; export {}; //# sourceMappingURL=workflow-context.d.ts.map