/** * Durable JSON persistence for config workflow state. * * Follows delegation-persistence.ts pattern: * - Separate JSON file in the same state directory * - Atomic write via tmp + rename * - Normalize on read (invalid entries silently dropped) * - Deep-clone on read (prevents mutation aliasing) * * @module config-workflow/workflow-persistence */ import type { ConfigWorkflowState } from "./workflow-types.js"; /** * Get the file path for workflow persistence. * Follows delegation-persistence.ts pattern: same state directory, different file. * * @returns Absolute path to `config-workflows.json`. */ export declare function getWorkflowStorePath(): string; /** * Read all persisted workflows from disk. * Returns a Map keyed by workflow ID. Invalid entries are silently dropped. * * @returns Map of workflow ID → workflow state. */ export declare function readPersistedWorkflows(): Map; /** * Persist all workflows to disk (atomic write: tmp + rename). * * @param workflows - Map of workflow ID → workflow state. */ export declare function persistWorkflows(workflows: Map): void; /** * Persist a single workflow (reads all, updates one, writes all). * * @param workflow - The workflow state to persist. */ export declare function persistWorkflow(workflow: ConfigWorkflowState): void; /** * Read a single workflow by ID. Returns undefined if not found. * * @param workflowId - The workflow ID to look up. * @returns The workflow state, or `undefined`. */ export declare function readWorkflow(workflowId: string): ConfigWorkflowState | undefined; /** * Delete a workflow by ID from the persisted store. * * @param workflowId - The workflow ID to delete. */ export declare function deleteWorkflow(workflowId: string): void; //# sourceMappingURL=workflow-persistence.d.ts.map