/** * Claude Code hook integration for Dossier CLI. * Manages the UserPromptSubmit hook that triggers automatic dossier discovery, * and MCP server configuration for Claude Code. */ export interface DossierEntry { name: string; title: string; } declare const DOSSIER_HOOK_ID = "dossier-discovery-hook"; declare const DOSSIER_HOOK_COMMAND = "dossier prompt-hook"; declare const DOSSIER_HOOK_PATTERN: RegExp; declare const CLAUDE_SETTINGS_FILE: string; declare const DOSSIER_LIST_CACHE_FILE: string; declare const CACHE_TTL_MS = 300000; /** * Install the Dossier discovery hook into Claude Code settings. * Returns true if newly installed, false if already present. */ declare function installClaudeHook(): boolean; /** * Remove the Dossier discovery hook from Claude Code settings. * Returns true if found and removed, false if not found. */ declare function removeClaudeHook(): boolean; /** * Test whether a user prompt matches the dossier discovery pattern. */ declare function matchesHookPattern(prompt: string): boolean; /** * Return cached dossier list if fresh (< 5 minutes), null otherwise. */ declare function getCachedDossierList(): DossierEntry[] | null; /** * Write dossier list to cache file. */ declare function saveDossierListCache(dossiers: DossierEntry[]): void; declare const CLAUDE_MCP_CONFIG_FILE: string; declare const MCP_SERVER_NAME = "dossier"; declare const MCP_SERVER_PACKAGE = "@ai-dossier/mcp-server"; /** * Check whether the `claude` CLI is available on PATH. */ declare function isClaudeCliAvailable(): boolean; /** * Check if the dossier MCP server is already configured. * Checks both `claude mcp list` output (if CLI available) and the JSON config file. */ declare function isMcpServerConfigured(): boolean; /** * Configure the dossier MCP server for Claude Code. * * Strategy: * 1. If `claude` CLI is on PATH, use `claude mcp add` (canonical approach) * 2. Otherwise, fall back to writing ~/.claude/mcp.json directly * * Returns 'installed' | 'already' | 'error' */ declare function installMcpServer(): 'installed' | 'already' | 'error'; /** * Write the MCP server config directly to ~/.claude/mcp.json. * Merges safely with existing config. */ declare function installMcpServerViaJson(): 'installed' | 'already'; export { DOSSIER_HOOK_ID, DOSSIER_HOOK_COMMAND, DOSSIER_HOOK_PATTERN, CLAUDE_SETTINGS_FILE, CLAUDE_MCP_CONFIG_FILE, MCP_SERVER_NAME, MCP_SERVER_PACKAGE, DOSSIER_LIST_CACHE_FILE, CACHE_TTL_MS, installClaudeHook, removeClaudeHook, matchesHookPattern, getCachedDossierList, saveDossierListCache, isClaudeCliAvailable, isMcpServerConfigured, installMcpServer, installMcpServerViaJson, }; //# sourceMappingURL=hooks.d.ts.map