/** * Git hooks commands: hooks:install, hooks:uninstall, hooks:status * * Integrates tx graph verification with git post-commit hooks for * automatic verification after refactors. */ import { Effect } from "effect"; import { type Flags } from "../utils/parse.js"; /** Default configuration for .txrc */ export interface TxrcConfig { hooks?: { enabled?: boolean; fileThreshold?: number; highValueFiles?: string[]; verifyOnCommit?: boolean; }; } /** * Validate a file pattern for safe embedding in generated bash scripts. * Rejects patterns containing shell metacharacters that could enable * command injection when interpolated into grep -qE '...' expressions. */ export declare function isValidHookPattern(pattern: string): boolean; /** * Read .txrc configuration file. * Returns default config if file doesn't exist. */ export declare function readTxrc(projectDir: string): TxrcConfig; /** * Write .txrc configuration file. */ export declare function writeTxrc(projectDir: string, config: TxrcConfig): void; /** * Find git root directory from current directory. */ export declare function findGitRoot(startDir: string): string | null; /** * Generate the post-commit hook script content. */ export declare function generatePostCommitHook(config: TxrcConfig): string; /** * tx hooks:install [--force] [--threshold ] [--high-value ] * Install post-commit hook for anchor verification */ export declare const hooksInstall: (_pos: string[], flags: Flags) => Effect.Effect; /** * tx hooks:uninstall * Remove post-commit hook */ export declare const hooksUninstall: (_pos: string[], flags: Flags) => Effect.Effect; /** * tx hooks:status [--json] * Show current hook status */ export declare const hooksStatus: (_pos: string[], flags: Flags) => Effect.Effect; //# sourceMappingURL=hooks.d.ts.map