dual-brain 0.2.13 → 0.2.14
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/package.json +1 -1
- package/src/head.mjs +15 -0
package/package.json
CHANGED
package/src/head.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
+
import { readDiagnosticNoticings } from '../.claude/hooks/diagnostic-companion.mjs';
|
|
3
4
|
|
|
4
5
|
const STATE_DIR = join(process.cwd(), '.dualbrain');
|
|
5
6
|
const STATE_FILE = join(STATE_DIR, 'head-state.json');
|
|
@@ -483,6 +484,20 @@ export function notice(situation, state, context = {}) {
|
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
|
|
487
|
+
|
|
488
|
+
// Diagnostic companion: feed tool-call pattern observations into deliberation
|
|
489
|
+
try {
|
|
490
|
+
const diagnosticNoticings = readDiagnosticNoticings();
|
|
491
|
+
for (const dn of diagnosticNoticings) {
|
|
492
|
+
noticings.push({
|
|
493
|
+
type: 'diagnostic',
|
|
494
|
+
severity: dn.severity || 'medium',
|
|
495
|
+
observation: dn.observation,
|
|
496
|
+
shouldSurface: dn.severity === 'high',
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
} catch {}
|
|
500
|
+
|
|
486
501
|
return noticings;
|
|
487
502
|
}
|
|
488
503
|
|