import { type LockRecord } from "../domain/run-lock.ts"; /** Thrown when another live run already holds this issue's lock. */ export declare class RunLockedError extends Error { readonly issue: string; readonly owner: LockRecord; constructor(issue: string, owner: LockRecord); } /** A handle that releases the lock it acquired. release() is best-effort and idempotent. */ export interface RunLockHandle { release(): Promise; } /** * Acquire the per-issue lock, reclaiming a stale (dead-owner) lock if present. * Throws RunLockedError when a live run already holds it — the caller should * exit non-zero WITHOUT touching the worktree. Returns a handle whose release() * removes the lockfile (call on completion, halt, or crash). */ export declare function acquireRunLock(diabloDir: string, issue: string, now?: () => Date): Promise;