import type { QualityIntelligenceUiRunSummary } from "@oscharko-dev/keiko-contracts";
export type QiActiveRunStatus = "running" | "succeeded" | "failed" | "cancelled";
interface QiActiveRun {
    readonly runId: string;
    status: QiActiveRunStatus;
    readonly requestedAt: string;
    readonly controller: AbortController;
    totals: {
        candidates: number;
        findings: number;
        exports: number;
    };
}
export declare class QiRunRegistry {
    private readonly runs;
    /** Register a starting run and return its AbortController so the executor can wire cancellation. */
    register(runId: string, requestedAt: string): AbortController;
    updateTotals(runId: string, totals: Partial<QiActiveRun["totals"]>): void;
    /** Mark terminal and drop the run from the active set (it is now durable in evidence). */
    complete(runId: string, status: Exclude<QiActiveRunStatus, "running">): void;
    /** Request cancellation. Returns false when the run is unknown/already finished. */
    cancel(runId: string): boolean;
    isActive(runId: string): boolean;
    /** Active-run summaries for merging into the run list (status always "running"). */
    listActiveSummaries(): readonly QualityIntelligenceUiRunSummary[];
    /** Test seam: clear all active runs. */
    reset(): void;
}
export declare const qiRunRegistry: QiRunRegistry;
export {};
//# sourceMappingURL=runRegistry.d.ts.map