import { ExecutionNode } from "./checkpoint-types.js"; import { InputRequest, WorkflowExecutionContext } from "./workflow-context.js"; import { WorkflowMessageListener } from "./workflow-state.js"; type WorkflowContext = Record; export declare const CURRENT_NODE_SYMBOL: unique symbol; export declare class ExecutionContext { context: WorkflowContext; private parent?; constructor(context: WorkflowContext, parent?: ExecutionContext | undefined, { messageListener, onRequestInput, onRestoreCheckpoint, checkpoint, executionScope, }?: { messageListener?: WorkflowMessageListener; onRequestInput?: (inputRequest: InputRequest) => Promise; onRestoreCheckpoint?: (node: ExecutionNode, feedback: unknown) => Promise; checkpoint?: ExecutionNode; executionScope?: Record; }); init(): Promise; withContext(newContext: Partial): ExecutionContext; get(key: K): WorkflowContext[K] | undefined; getWorkflowContext(): WorkflowExecutionContext; getCurrentNode(): ExecutionNode | undefined; withCurrentNode(node: ExecutionNode, fn: () => T): T; } export type RunInContext = (fn: () => T) => T; export declare function withContext(context: ExecutionContext, fn: () => T): T; export declare function getCurrentContext(): ExecutionContext; export declare function getContextSnapshot(): RunInContext; export declare function getCurrentNodeCheckpointManager(): { node: undefined; completeNode: () => void; updateNode: () => void; addMetadata: () => void; } | { node: ExecutionNode; completeNode: (output: unknown, opts?: { wrapInPromise?: boolean; }) => void; updateNode: (updates: Partial) => void; addMetadata: (metadata: Record) => void; }; export {}; //# sourceMappingURL=context.d.ts.map