From 64d0d9436f802382f2fa668fa5f1c6b8e750a52b Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:35:47 -0400 Subject: [PATCH] fix(install): preserve opencode non-hook defaults --- scripts/lib/install/hook-consent.js | 4 ---- tests/lib/hook-consent.test.js | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/lib/install/hook-consent.js b/scripts/lib/install/hook-consent.js index a97fc5187..f12bd833c 100644 --- a/scripts/lib/install/hook-consent.js +++ b/scripts/lib/install/hook-consent.js @@ -56,10 +56,6 @@ function isHookRuntimeOperation(operation = {}) { || source === '.cursor/hooks' || source.startsWith('.cursor/hooks/') || source === '.cursor/hooks.json' - || source === '.opencode/plugins' - || source.startsWith('.opencode/plugins/') - || source === '.opencode/dist/plugins' - || source.startsWith('.opencode/dist/plugins/') || destination.endsWith('/hooks/hooks.json') || destination.endsWith('/.cursor/hooks.json') || destination.includes('/.cursor/hooks/') diff --git a/tests/lib/hook-consent.test.js b/tests/lib/hook-consent.test.js index 8749dd3d0..716a91b3a 100644 --- a/tests/lib/hook-consent.test.js +++ b/tests/lib/hook-consent.test.js @@ -72,6 +72,14 @@ function runTests() { assert.strictEqual(isHookRuntimeOperation({ sourceRelativePath: 'hooks/hooks.json' }), true); assert.strictEqual(isHookRuntimeOperation({ sourceRelativePath: '.cursor/hooks.json' }), true); assert.strictEqual(isHookRuntimeOperation({ destinationPath: '/root/.claude/hooks/hooks.json' }), true); + assert.strictEqual( + isHookRuntimeOperation({ + moduleId: 'platform-configs', + sourceRelativePath: '.opencode/plugins/ecc-hooks.ts', + destinationPath: '/root/.config/opencode/plugins/ecc-hooks.ts', + }), + false + ); assert.strictEqual(isHookRuntimeOperation({ sourceRelativePath: 'rules/common.md' }), false); assert.strictEqual( isHookRuntimeOperation({ sourceRelativePath: 'skills/webhooks-guide.md' }),