import { type BacklogItemStatus } from './shared/item-status.js';
/** Result of an {@link archiveBacklogItem} run. */
export interface ArchiveBacklogItemResult {
    id: string;
    result: 'archived' | 'noop';
    status: BacklogItemStatus | null;
    completedEntry: 'written' | 'scaffolded' | 'skipped';
    movedTo: string | null;
    indexRegenerated: boolean;
    warnings: string[];
}
export interface ArchiveBacklogItemOptions {
    wontDo?: boolean;
    summary?: string;
    /** Injectable clock for deterministic tests; defaults to the current time. */
    now?: Date;
}
/**
 * Actionable close-out failure (unknown id, invalid current status). The
 * command wrapper maps `exitCode` onto `process.exitCode` and logs `message`.
 */
export declare class BacklogArchiveError extends Error {
    readonly exitCode: 1 | 2;
    constructor(message: string, exitCode?: 1 | 2);
}
/**
 * Atomic backlog close-out. Validates the current status, sets the terminal
 * status and `updated`, records a canonical `completed.md` entry, moves the
 * item file into `archived/`, and regenerates the index. Idempotent when the
 * item is already archived.
 */
export declare function archiveBacklogItem(backlogRoot: string, id: string, options?: ArchiveBacklogItemOptions): Promise<ArchiveBacklogItemResult>;
//# sourceMappingURL=archive.d.ts.map