From c0942288396ec02e91504a964a495abcf8cf01dc Mon Sep 17 00:00:00 2001 From: rUv Date: Sun, 8 Feb 2026 22:15:49 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: rebrand/ruvflow-umbrella - Timestamp: 2026-02-08T22:15:49Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- v3/@claude-flow/cli/src/init/executor.ts | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/v3/@claude-flow/cli/src/init/executor.ts b/v3/@claude-flow/cli/src/init/executor.ts index 24236c8c00..3128815f3b 100644 --- a/v3/@claude-flow/cli/src/init/executor.ts +++ b/v3/@claude-flow/cli/src/init/executor.ts @@ -430,19 +430,22 @@ export async function executeUpgrade(targetDir: string, upgradeSettings = false) } } - // 0. ALWAYS update auto-memory-hook.mjs (force overwrite) - const autoMemoryHookPath = path.join(targetDir, '.claude', 'helpers', 'auto-memory-hook.mjs'); + // 0. ALWAYS update critical helpers (force overwrite) const sourceHelpersForUpgrade = findSourceHelpersDir(); if (sourceHelpersForUpgrade) { - const sourceAutoMemory = path.join(sourceHelpersForUpgrade, 'auto-memory-hook.mjs'); - if (fs.existsSync(sourceAutoMemory)) { - if (fs.existsSync(autoMemoryHookPath)) { - result.updated.push('.claude/helpers/auto-memory-hook.mjs'); - } else { - result.created.push('.claude/helpers/auto-memory-hook.mjs'); + const criticalHelpers = ['auto-memory-hook.mjs', 'hook-handler.cjs']; + for (const helperName of criticalHelpers) { + const targetPath = path.join(targetDir, '.claude', 'helpers', helperName); + const sourcePath = path.join(sourceHelpersForUpgrade, helperName); + if (fs.existsSync(sourcePath)) { + if (fs.existsSync(targetPath)) { + result.updated.push(`.claude/helpers/${helperName}`); + } else { + result.created.push(`.claude/helpers/${helperName}`); + } + fs.copyFileSync(sourcePath, targetPath); + try { fs.chmodSync(targetPath, '755'); } catch {} } - fs.copyFileSync(sourceAutoMemory, autoMemoryHookPath); - fs.chmodSync(autoMemoryHookPath, '755'); } }