import type { AgentStore } from './spi/agent-store.js';
/**
 * Leave nothing waiting on a run that is over and did not say so itself.
 *
 * A run normally settles its own row, its calls and its thread from inside its body. One that is
 * refused a checkpoint position, or whose worker died, never gets there: its row stays `running`,
 * a call it had put to a person stays `pending_approval` — an approval card that takes a "yes" and
 * then does nothing, for ever — and its thread stays pointed at it. Everything here is written
 * straight to the store, outside any checkpoint, because the callers are exactly the paths that
 * have no journal left to write to; each write is idempotent (first-terminal run row, only
 * still-pending calls, a release conditional on the holder), so doing it twice changes nothing.
 *
 * Best-effort on purpose: this runs while something else is already failing, and must not replace
 * that failure with one of its own.
 */
export declare function settleDeadRun(store: AgentStore, args: {
    runId: string;
    threadId?: string;
    error: string;
    errorCode?: string;
}): Promise<void>;
/** `approve` / `reject` / `answer` addressed at a run that is no longer running. */
export declare class RunNotActiveError extends Error {
    readonly runId: string;
    readonly status = 409;
    readonly code = "run_not_active";
    constructor(runId: string);
}
//# sourceMappingURL=dead-run.d.ts.map