/**
 * Active-run tracking + terminal-transition helper for WorkflowRuns.
 *
 * A WorkflowRun spends ~seconds to minutes in `status: "running"` between
 * CREATE (workflow-execute.ts:331) and the terminal SET
 * (workflow-execute.ts:611). If the process dies inside that window —
 * SIGTERM from the scheduler's DISPATCH_TIMEOUT_MS, or an unhandled
 * exception that bypasses the terminal SET — the run is left as a zombie
 *.
 *
 * This module lets both failure paths converge on one terminal-transition
 * Cypher statement, guarded by `WHERE r.status = 'running'` so replay from
 * a second sink after the normal SET is a silent no-op.
 *
 *   CREATE WorkflowRun ──▶ markRunActive(runId)
 *                              │
 *                              ▼
 *                        step loop + terminal SET
 *                              │
 *              ┌───────────────┼───────────────┐
 *              ▼               ▼               ▼
 *     normal completion   exception     SIGTERM fires
 *       (status set       (catch calls   (index.ts handler
 *        by terminal       terminal-      calls reapActiveRuns
 *        SET)              Transition-    which calls terminal-
 *                          Failed)        TransitionFailed for
 *                                         each tracked run)
 *              │               │               │
 *              └───────────────┼───────────────┘
 *                              ▼
 *                    markRunComplete(runId)
 */
export declare function markRunActive(runId: string): void;
export declare function markRunComplete(runId: string): void;
export declare function snapshotActiveRuns(): string[];
export declare function terminalTransitionFailed(runId: string, errorMsg: string): Promise<void>;
export declare function reapActiveRuns(reason: string): Promise<void>;
//# sourceMappingURL=active-runs.d.ts.map