import { type WriteAction } from "./plan.js"; /** * A write that ensures `.gitignore` ignores the harness's generated DATA while * keeping the committed `.aih/usage-record.mjs` recorder tracked. Strips every line * this block owns (the managed patterns AND any pre-existing `.aih`-directory exclude * in any form) and re-appends the managed block, so the result is idempotent * (byte-identical when already correct → recorded as `unchanged`), migrates an older * block or a hand-written `.aih/` without duplication, and — crucially — never leaves * a dir-exclude that would neuter the negation. Preserves all other `.gitignore` * content, its position, and its EOL style (CRLF vs LF). */ export declare function aihIgnoreWrite(root: string): WriteAction; /** * Whether an existing ignore file has no AIH-shaped lines whose ownership is * ambiguous. Policy hooks use this narrower primitive so their receipt can * later restore the user's exact prior bytes; the general init writer above is * intentionally allowed to migrate older managed blocks instead. */ export declare function canAppendPolicyAihIgnore(existing: string | undefined): boolean; /** * Append a separately-owned policy hook ignore block without rewriting any * pre-existing bytes. The matching rollback helper below can therefore put * an unchanged user file back exactly as it was. */ export declare function policyAihIgnoreWrite(root: string): WriteAction; /** Exact inverse of `policyAihIgnoreWrite`; undefined contents means remove the new file. */ export declare function policyAihIgnoreRollbackContents(current: string): { contents?: string; } | undefined;