type HookCommand = { type: "command"; command: string; }; type HookEntry = { matcher: string; hooks: HookCommand[]; }; export type ClaudeSettingsJson = { [key: string]: unknown; hooks?: { [key: string]: HookEntry[] | undefined; UserPromptSubmit?: HookEntry[]; }; }; export interface ClaudeSettingsWriteResult { written: boolean; settingsPath: string; diagnostic?: { code: "corrupted-json" | "write-error"; message: string; }; } /** * Pure function: parses raw JSON string into Claude settings. * Returns empty settings with a diagnostic when the JSON is corrupted. */ export declare function parseClaudeSettingsJson(raw: string): { settings: ClaudeSettingsJson; diagnostic?: { code: "corrupted-json"; message: string; }; }; /** * Pure function: upserts the orchestra UserPromptSubmit hook into an existing * settings object. Preserves all other hooks and settings. */ export declare function mergeOrchestraHook(existing: ClaudeSettingsJson): ClaudeSettingsJson; /** * Generates or updates `.claude/settings.json` with the UserPromptSubmit hook * that injects task/workflow state into Claude Code sessions at prompt start. * Fails open: corrupted existing settings are recovered and a diagnostic is returned. */ export declare function initClaudeSettings(root: string): Promise; export {};