import type { CodeNodeResult, JsonValue, NodeAttempt, NodeId, NodeLocalStateReader, StatePatch, TypeScriptCodeNodeDefinition, WorkflowDefinition, WorkflowDiagnostic, WorkflowGlobalStateReader, WorkflowRun } from "../types/index.js"; export declare class WorkflowStateAccessViolation extends Error { readonly diagnostic: WorkflowDiagnostic; constructor(diagnostic: WorkflowDiagnostic); } export declare function createInitialWorkflowRunState(global: Record, local?: Record>): WorkflowRun["state"]; export declare function localStateSnapshotForNode(run: WorkflowRun, nodeId: string): Pick; export declare function createNodeScopedWorkflowRun(run: WorkflowRun, nodeId: string): WorkflowRun; export declare function createWorkflowRunWithoutLocalState(run: WorkflowRun): WorkflowRun; export declare function createCurrentNodeStateView(state: WorkflowRun["state"], nodeId: string): WorkflowRun["state"]; export declare function createStateReader(scope: "global" | "local", values: Record, node: TypeScriptCodeNodeDefinition, nodeId: string): WorkflowGlobalStateReader | NodeLocalStateReader; export declare function validateCodeNodePatches(definition: WorkflowDefinition, node: TypeScriptCodeNodeDefinition, nodeId: string, result: CodeNodeResult): WorkflowDiagnostic[]; export declare function applyCodeNodePatches(run: WorkflowRun, nodeId: string, globalPatch: StatePatch | undefined, localPatch: StatePatch | undefined): void; //# sourceMappingURL=state.d.ts.map