/** * legacy-cost-hooks migration: re-install cost hooks that predate the shim. * * Replaces `stale-cost-hooks` (cost-capture-goes-dark/AC-14, AC-18). That * migration asked "does the absolute CLI path recorded in the hook still exist?" * — the right question only while the command *contained* an absolute path. Hook * commands now invoke `.aidlc/cost/capture.sh`, which resolves node and the CLI * at run time, so there is no longer a path that can go stale and nothing left * to detect. What remains is a one-time migration: hooks installed by an older * version still carry the frozen paths and are still silently broken. * * WHY THIS ONE REPAIRS, WHERE ITS PREDECESSOR ONLY REPORTED. `stale-cost-hooks` * was deliberately report-only, reasoning that "a diagnostic must not silently * rewrite a user's .claude/settings.json". That reasoning was sound and is * narrowed here rather than discarded: this migration only ever replaces hook * entries carrying our own `#aidlc-cost-hook` marker, via the same * merge-not-clobber installer that leaves every other key and every unmarked * hook untouched. Nothing the user wrote is rewritten. * * The reason to change the stance at all is what report-only cost us: the * detection was correct, the report printed on every `aidlc update`, and the * data was lost anyway, because the last link in the chain was a human reading a * line. A repair that needs to be noticed is a repair that does not happen. The * failure it prevents is silent and unrecoverable — usage that was never * captured cannot be reconstructed later. * * Self-clearing: re-installing produces the shim form, so `legacy` goes false * and this stops reporting without anyone editing state. */ import type { Migration } from '../types.js'; /** * Platforms whose installed hook still uses the pre-shim absolute-path form. * Read-only half, exported for reuse and direct testing. * * Only installed hooks are considered: an absent hook is a different condition * (never armed, not broken), and `aidlc cost hooks status` already says so. */ export declare function legacyCostHookPlatforms(projectRoot: string): string[]; export declare const legacyCostHooks: Migration; //# sourceMappingURL=legacy-cost-hooks.d.ts.map