import type { StuckSpec } from '../../types/index.js';
/**
 * Runs `git branch --merged <targetBranch>` ONCE and returns a Set of branch
 * names for O(1) lookup. Strips leading `* ` (current branch marker) and trims
 * whitespace from each line.
 *
 * @param projectPath  - Absolute path to the git repo.
 * @param targetBranch - Branch to check merges against (default: 'main').
 */
export declare function buildMergedBranchSet(projectPath: string, targetBranch?: string): Promise<Set<string>>;
/**
 * Detects specs that are stuck: status is 'approved' or 'implementing' AND
 * their `gitBranch` is non-empty AND that branch has been merged into
 * `targetBranch`.
 *
 * Uses a single `git branch --merged` call regardless of spec count — O(n)
 * scan with O(1) lookups per spec.
 *
 * @param projectPath  - Absolute path to the project.
 * @param targetBranch - Branch to compare against (default: 'main').
 */
export declare function detectStuckSpecs(projectPath: string, targetBranch?: string): Promise<StuckSpec[]>;
/**
 * Closes a stuck spec by calling `handleUpdateStatus` with `status: 'done'`
 * and `force: true`. Best-effort — failures are logged to the autopilot log
 * and swallowed so release can proceed.
 *
 * @param spec        - The stuck spec to close.
 * @param projectPath - Absolute path to the project.
 */
export declare function autoCloseStuckSpec(spec: StuckSpec, projectPath: string): Promise<void>;
/**
 * Appends an audit-trail entry recording that a release was force-bypassed
 * despite stuck specs being detected.
 *
 * @param specIds     - IDs of the stuck specs that were bypassed.
 * @param projectPath - Absolute path to the project.
 */
export declare function logForceReleaseAudit(specIds: string[], projectPath: string): Promise<void>;
//# sourceMappingURL=stuck-spec-detector.d.ts.map