Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix(install): preserve opencode non-hook defaults

haelyra64d0d9436f80
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' }),