/** * Hook Installation * * Install and manage hooks for Cursor and Claude Code. * Hooks are installed at repo-level for isolation. */ /** * Get the Cursor hooks.json path for a repo. */ export declare function getCursorHooksPath(repoRoot: string): string; /** * Get the Claude Code settings.json path for a repo. */ export declare function getClaudeSettingsPath(repoRoot: string): string; /** * Get the OpenCode plugin directory path for a repo. */ export declare function getOpenCodePluginDir(repoRoot: string): string; /** * Get the OpenCode agentblame plugin file path for a repo. */ export declare function getOpenCodePluginPath(repoRoot: string): string; /** * Install the Cursor hooks at repo-level (.cursor/hooks.json) */ export declare function installCursorHooks(repoRoot: string): Promise; /** * Install the Claude Code hooks at repo-level (.claude/settings.json) * BULLETPROOF: Uses both PreToolUse and PostToolUse for accurate before/after capture */ export declare function installClaudeHooks(repoRoot: string): Promise; /** * Install the OpenCode hooks at repo-level (.opencode/plugin/agentblame.ts) */ export declare function installOpenCodeHooks(repoRoot: string): Promise; /** * Check if OpenCode hooks are installed for a repo. */ export declare function areOpenCodeHooksInstalled(repoRoot: string): Promise; /** * Uninstall OpenCode hooks from a repo */ export declare function uninstallOpenCodeHooks(repoRoot: string): Promise; /** * Check if Cursor hooks are installed for a repo. */ export declare function areCursorHooksInstalled(repoRoot: string): Promise; /** * Check if Claude Code hooks are installed for a repo. */ export declare function areClaudeHooksInstalled(repoRoot: string): Promise; /** * Install all hooks (Cursor, Claude Code, and OpenCode) for a repo */ export declare function installAllHooks(repoRoot: string): Promise<{ cursor: boolean; claude: boolean; opencode: boolean; }>; /** * Detected git hooks setup type */ export type HooksSetupType = { type: "custom"; path: string; } | { type: "standard"; path: string; }; /** * Detect where git hooks should be installed. * Simple approach: * 1. Check core.hooksPath (explicit git config - works for husky, lefthook, custom setups) * 2. Fall back to .git/hooks/ (standard location) */ export declare function detectHooksSetup(repoRoot: string): Promise; /** * Check if git hook is already installed */ export declare function isGitHookInstalled(repoRoot: string): Promise; /** * Lazily install git hook on first capture. * Called from capture command to auto-setup without user running enable. */ export declare function ensureGitHook(repoRoot: string): Promise; /** * Install git hook by detecting existing setup and integrating appropriately. * Simple approach: * 1. Detect hooks directory (core.hooksPath or .git/hooks/) * 2. Create/append to post-commit hook there */ export declare function installGitHookSmart(repoRoot: string): Promise<{ success: boolean; method: string; }>; /** * Uninstall git post-commit hook */ export declare function uninstallGitHook(repoRoot: string): Promise; /** * Uninstall Cursor hooks from a repo */ export declare function uninstallCursorHooks(repoRoot: string): Promise; /** * Uninstall Claude Code hooks from a repo */ export declare function uninstallClaudeHooks(repoRoot: string): Promise; /** * Install GitHub Actions workflow for handling squash/rebase merges * Always overwrites to ensure the latest version is installed */ export declare function installGitHubAction(repoRoot: string): Promise; /** * Uninstall GitHub Actions workflow */ export declare function uninstallGitHubAction(repoRoot: string): Promise;