dual-brain 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/health-check.mjs +6 -2
- package/install.mjs +1 -0
- package/package.json +1 -1
package/hooks/health-check.mjs
CHANGED
|
@@ -196,8 +196,12 @@ function checkHookRegistration() {
|
|
|
196
196
|
const expectedPre = "node .claude/hooks/enforce-tier.mjs";
|
|
197
197
|
const expectedPost = "node .claude/hooks/cost-logger.mjs";
|
|
198
198
|
|
|
199
|
-
const
|
|
200
|
-
|
|
199
|
+
const hasCommand = (entries, cmd) => entries.some(e =>
|
|
200
|
+
e === cmd || e?.command === cmd || e?.hooks?.some(h => h.command === cmd)
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
const hasPre = hasCommand(preToolUse, expectedPre);
|
|
204
|
+
const hasPost = hasCommand(postToolUse, expectedPost);
|
|
201
205
|
|
|
202
206
|
if (hasPre && hasPost) {
|
|
203
207
|
return check("hook_registration", STATUS.pass, "required hooks registered");
|
package/install.mjs
CHANGED
|
@@ -832,6 +832,7 @@ function generateGitignoreEntries(workspace) {
|
|
|
832
832
|
'.claude/dual-brain.memory.json',
|
|
833
833
|
'.claude/dual-brain.version.json',
|
|
834
834
|
'.claude/dual-brain.update-check.json',
|
|
835
|
+
'.claude/dual-brain.permissions.json',
|
|
835
836
|
];
|
|
836
837
|
let existing = '';
|
|
837
838
|
try { existing = readFileSync(join(workspace, '.gitignore'), 'utf8'); } catch {}
|
package/package.json
CHANGED