YeonGyu-Kim a60a153d19 refactor(hooks): rename sisyphus-gpt-hephaestus-reminder to no-sisyphus-gpt
Shorter hook name, disableable via disabled_hooks config, migration added
for backward compatibility. Also forces agent switch to Hephaestus on
Sisyphus + GPT detection. Docs updated with new hook name.
2026-02-18 16:33:16 +09:00

39 lines
1.0 KiB
TypeScript

// Migration map: old hook names → new hook names (for backward compatibility)
// null means the hook was removed and should be filtered out from disabled_hooks
export const HOOK_NAME_MAP: Record<string, string | null> = {
// Legacy names (backward compatibility)
"anthropic-auto-compact": "anthropic-context-window-limit-recovery",
"sisyphus-orchestrator": "atlas",
"sisyphus-gpt-hephaestus-reminder": "no-sisyphus-gpt",
// Removed hooks (v3.0.0) - will be filtered out and user warned
"empty-message-sanitizer": null,
}
export function migrateHookNames(
hooks: string[]
): { migrated: string[]; changed: boolean; removed: string[] } {
const migrated: string[] = []
const removed: string[] = []
let changed = false
for (const hook of hooks) {
const mapping = HOOK_NAME_MAP[hook]
if (mapping === null) {
removed.push(hook)
changed = true
continue
}
const newHook = mapping ?? hook
if (newHook !== hook) {
changed = true
}
migrated.push(newHook)
}
return { migrated, changed, removed }
}