/** * Git hook management utilities. * * Extracted from init.ts to enable shared use across init, upgrade, and * doctor/health-check workflows. * * Handles installation, update, and verification of managed git hooks * from the package's templates/git-hooks/ directory. */ import type { HookCheckResult, ScaffoldResult } from '@cleocode/contracts/scaffold-diagnostics'; export type { HookCheckResult, ScaffoldResult, } from '@cleocode/contracts/scaffold-diagnostics'; export interface EnsureGitHooksOptions { force?: boolean; } /** Git hooks managed by CLEO. */ export declare const MANAGED_HOOKS: readonly ["commit-msg", "pre-commit", "pre-push"]; export type ManagedHook = (typeof MANAGED_HOOKS)[number]; /** * Install or update managed git hooks from templates/git-hooks/ into .git/hooks/. * * Handles: * - No .git directory (skips gracefully) * - No source templates directory (skips gracefully) * - Hooks already installed (skips unless force) * - Sets executable permissions on installed hooks */ export declare function ensureGitHooks(projectRoot: string, opts?: EnsureGitHooksOptions): Promise; /** * Verify managed hooks are installed and current. * * Compares installed hooks in .git/hooks/ against source templates in the * package's templates/git-hooks/ directory. Returns per-hook status including * whether the hook is installed and whether its content matches the source. */ export declare function checkGitHooks(projectRoot: string): Promise; //# sourceMappingURL=hooks.d.ts.map