/** Which hooks to install. Every one is on unless the user turned it off. */ export interface HookSelection { resume: boolean; escalate: boolean; wakeup: boolean; guard: boolean; taskBoard: boolean; messages: boolean; } export declare const ALL_HOOKS: HookSelection; /** The shell scripts, by the selection key that installs each one. */ declare const SCRIPTS: { readonly resume: "chat_recall_resume_hook.sh"; readonly escalate: "chat_recall_escalate_hook.sh"; readonly wakeup: "chat_recall_wakeup_hook.sh"; readonly guard: "chat_recall_guard_hook.sh"; }; type ScriptKey = keyof typeof SCRIPTS; /** Every event an entry of ours can sit on. Uninstall and reinstall walk all of them. */ export declare const HOOK_EVENTS: string[]; type Entry = { matcher: string; hooks: Array>; }; type Config = { hooks?: Record; [k: string]: unknown; }; /** True for every hook entry chat-recall writes, in any version. */ export declare function isOurEntry(entry: unknown): boolean; /** True for an entry of a script that this version no longer installs. */ export declare function isLegacyEntry(entry: unknown): boolean; /** * Every Claude profile's `settings.json`, deduped by real path. * * `CLAUDE_CONFIG_DIR=~/.claude-work` makes that directory the whole config root * for a session, so each profile needs its own registration. Only profiles that * are real installs (they have `projects/`) are returned. */ export declare function claudeSettingsFiles(): string[]; /** The `[event, entry]` pairs for a selection. */ export declare function hookEntries(sel: HookSelection, paths: { scripts: Partial>; execPath: string; cliEntry: string; messageHookEntry: string; }): Array<[string, Entry]>; /** Replace our entries in one parsed settings object; entries of other tools stay. */ export declare function mergeOurEntries(config: Config, entries: Array<[string, Entry]>): void; /** Remove our entries from one parsed config; returns how many. */ export declare function removeOurEntries(config: Config): number; export interface InstallReport { /** settings.json files written. */ written: string[]; /** settings.json files left alone because they do not parse. */ skipped: string[]; /** Old entries removed from hooks.json files. */ migrated: number; /** Shell hooks left out because this platform cannot run them. */ shellSkipped: boolean; scriptsDir: string; selection: HookSelection; guardTargets: Array<{ label: string; configPath: string; note?: string; }>; /** The other AI tools that got the message hook. */ messageTargets: Array<{ label: string; configPath: string; note?: string; }>; } /** * Install the selected hooks in every profile. Idempotent: a second run * replaces our entries and adds no duplicate. * * On Windows the four shell hooks are left out: Claude Code runs a hook * command through cmd.exe, which cannot run a `.sh`. The board and message * hooks are node plus a bundle path, and install everywhere. */ export declare function installHooks(distDir: string, sel?: HookSelection): Promise; export interface UninstallReport { removed: number; files: string[]; guardRemoved: Array<{ label: string; configPath: string; }>; messagesRemoved: Array<{ label: string; configPath: string; }>; } /** Remove every chat-recall hook, and record the choice so the MCP server does not put them back. */ export declare function uninstallHooks(): Promise; /** * Install the hooks when this version has not installed them, or when a * profile is missing them. The MCP server calls this at every start. * Returns null when nothing was needed, or when the user uninstalled them. */ export declare function ensureHooks(distDir: string): Promise; export {}; //# sourceMappingURL=install-hooks.d.ts.map