import type { ChainExecution } from "./types.js"; /** Error thrown to suspend execution at a gate step (frees the worker). */ export declare class GateSuspendError extends Error { readonly stepId: string; readonly executionId: string; constructor(stepId: string, executionId: string); } export declare function getPendingApprovals(getExecution: (id: string) => ChainExecution | undefined): Array<{ executionId: string; stepId: string; chainName: string; prompt: string; startedAt: string; }>; export declare function approveGate(executionId: string, stepId: string, approved: boolean): boolean; export declare function waitForApproval(executionId: string, stepId: string, timeoutHours: number, onTimeout: "skip" | "error" | "approve"): Promise; export declare function getGateResult(key: string): string | undefined; export declare function deleteGateResult(key: string): void; export declare function setGateResult(key: string, value: string): void; export declare function hasGateResult(key: string): boolean; export declare function setGateTimer(key: string, timer: ReturnType): void; /** Remove all gate entries whose key starts with the given executionId. */ export declare function cleanupGates(executionId: string): void; /** Purge gate entries older than 1 hour. */ export declare function purgeExpiredGates(): void;