/** * Hook installer registry — one table, six former call sites. * * Before this, six places mapped a platform name to a hook installer or a hook * status with a literal comparison, and they did not agree. The worst was a * *read* site: `commands/cost.ts` resolved status as * `p.name === 'claude-code' ? claudeCodeHookStatus : kiroHookStatus` inside a loop * over every registered provider, so registering a third provider would have * printed Kiro's hook state under the new platform's label — on the diagnostic * built specifically to stop capture failing silently. * * **This table is static and independent of the provider registry, on purpose.** * Three doctor migrations kept their own two-entry tables because `allProviders()` * is empty unless someone has called `registerBuiltinProviders()`, and a * diagnostic that silently finds nothing is worse than no diagnostic. Deriving * hook platforms from the provider registry would reintroduce exactly that. A * module-level literal cannot be empty (agent-portability/AC-41, AC-43). * * Requirements: agent-portability/AC-41, AC-42, AC-43 * Design: design.md A5 * * @module */ import { type HookStatus } from './claude-code.js'; /** What every platform that can carry a cost hook must provide. */ export interface HookInstaller { readonly platform: string; install(projectRoot: string, nodePath: string, cliPath: string): void; remove(projectRoot: string): void; status(projectRoot: string): HookStatus; } /** Platform names that have a hook installer. Never empty. */ export declare function hookPlatforms(): string[]; /** The installer for a platform, or null when it has none. */ export declare function hookInstaller(platform: string): HookInstaller | null; /** * A platform's hook status, or null when the platform has no hook mechanism. * * Returning null rather than falling back to another platform's status is the * whole point: a platform with no installer has no hook state to report, and * saying so is different from reporting somebody else's. */ export declare function hookStatusFor(platform: string, projectRoot: string): HookStatus | null; //# sourceMappingURL=registry.d.ts.map