/** * Helpers for managing the squad-state .gitignore marker block. * * When the state backend is 'two-layer' or 'orphan', .squad/decisions.md * and .squad/agents/history.md are owned by the squad-state orphan branch. * Adding them to .gitignore prevents accidental staging via git add ., * git add -A, IDE "stage all", or git commit -am -- defense-in-depth * complement to the pre-commit hook installed by squad upgrade --state-backend. * * The block is delimited by marker comments so it can be reliably added and * removed without touching unrelated .gitignore content. */ import type { StorageProvider } from '../storage/index.js'; export declare const SQUAD_STATE_GITIGNORE_OPEN_MARKER = "# Squad: state owned by squad-state branch (two-layer/orphan backend)"; export declare const SQUAD_STATE_GITIGNORE_CLOSE_MARKER = "# /Squad: state owned by squad-state branch"; /** * Append the squad-state marker block to .gitignore if not already present. * * Idempotent: if the opening marker already exists in the file, this is a * no-op. Returns true if the block was added, false if it was already present. */ export declare function addSquadStateGitignoreBlock(gitignorePath: string, storage: StorageProvider): boolean; /** * Remove the squad-state marker block from .gitignore if present. * * Finds the opening and closing marker lines and removes all lines between * them (inclusive), plus one leading blank line in what follows if present. * Returns true if the block was removed, false if it was not present. */ export declare function removeSquadStateGitignoreBlock(gitignorePath: string, storage: StorageProvider): boolean; //# sourceMappingURL=gitignore-state.d.ts.map