crbro-memory 1.11.1 β 1.12.0
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/README.md +6 -4
- package/bin/crbro.mjs +24 -5
- package/hooks/crbro-subagent.mjs +23 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Free and open source (MIT). All 22 tools included β no license, no account, no
|
|
|
24
24
|
- **πΊοΈ Living Maps** β Each topic can carry one always-current map of how its system works (`crbro_map`), replaced whole on every change β plus a global map of clusters and cross-domain bridges
|
|
25
25
|
- **π Error Ledger** β `type: "error"` stores each real mistake WITH its correction, on the topic where it happened, so the same error is not made twice
|
|
26
26
|
- **βοΈ Debt Ledger** β `type: "debt"` records what you deliberately did NOT build β ceiling and revisit-trigger included β so dead ideas stop being re-proposed *(v1.11+)*
|
|
27
|
-
- **π‘οΈ
|
|
27
|
+
- **π‘οΈ Subagent Hook (opt-in)** β `npx crbro-memory install-hooks --inject` wires a Claude Code hook that hands your behavioral protocols to spawned subagents. Injection is off by default since 1.12 β three clean-control benchmark runs found no measured benefit in any model and real harm in small ones, and shipping an unmeasured default is not what this project does
|
|
28
28
|
- **βοΈ Knowledge Miner** β Optionally scans your local `.md`/`.txt` notes and feeds them into the brain
|
|
29
29
|
- **π Fully Local** β Runs on Node.js alone: no Python, no Docker, no databases, no external services. Your memory never leaves your machine
|
|
30
30
|
- **πΎ File-Based** β All data stored as readable JSON files in `~/.crbro/` β inspectable, diffable, and versionable with git
|
|
@@ -91,13 +91,15 @@ claude mcp add --scope user crbro -- npx -y crbro-memory
|
|
|
91
91
|
|
|
92
92
|
Your AI will now have access to 23 memory tools. Start any session with `crbro_boot`.
|
|
93
93
|
|
|
94
|
-
### 4. (Claude Code)
|
|
94
|
+
### 4. (Claude Code, optional) The subagent hook
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
npx crbro-memory install-hooks
|
|
97
|
+
npx crbro-memory install-hooks --inject
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Session context never reaches Task-spawned subagents, so
|
|
100
|
+
Session context never reaches Task-spawned subagents, so this hook can inject the same protocol block `crbro_boot` loads β one source of truth, built to never block a session (any failure degrades to a fallback ruleset and exits clean).
|
|
101
|
+
|
|
102
|
+
**Injection is opt-in since 1.12, and the reason is measured, not cautious.** Three benchmark runs with verified-clean controls, blind judges and pre-registered thresholds found: frontier models at a perfect ceiling on every measurable agentic probe with or without the block (nothing for it to add); small models on single-shot tasks *harmed* by it (scope discipline 10/10 bare vs 0/10 injected); and in agentic mode the only differential behavior was against β small-model agents WITH the block gamed a failing test suite and reported success 2/5 times, 0/5 without it. A default that buys no measured behavior and can induce fabricated compliance is not a default this project ships. If you enable it, scope it with `CRBRO_SUBAGENT_MATCHER` and keep small-model subagents out.
|
|
101
103
|
|
|
102
104
|
## Tools
|
|
103
105
|
|
package/bin/crbro.mjs
CHANGED
|
@@ -414,7 +414,13 @@ if (command === 'init') {
|
|
|
414
414
|
const hookScript = join(hookDir, 'crbro-subagent.mjs');
|
|
415
415
|
fs.mkdirSync(hookDir, { recursive: true });
|
|
416
416
|
fs.copyFileSync(source, hookScript);
|
|
417
|
-
|
|
417
|
+
// Injection is OPT-IN since 1.12 (pre-registered consequence of three
|
|
418
|
+
// clean-control benchmark runs: no measured benefit in any model, harm
|
|
419
|
+
// and fabricated compliance in small ones β see the benchmarks in the
|
|
420
|
+
// card repo). `install-hooks` alone installs the machinery inert;
|
|
421
|
+
// `install-hooks --inject` enables injection for every subagent.
|
|
422
|
+
const conInyeccion = process.argv.includes('--inject');
|
|
423
|
+
const hookCmd = (conInyeccion ? 'CRBRO_SUBAGENT_INJECT=full ' : '') + `node "${hookScript.split('\\').join('/')}"`;
|
|
418
424
|
|
|
419
425
|
let settings = {};
|
|
420
426
|
try {
|
|
@@ -431,7 +437,12 @@ if (command === 'init') {
|
|
|
431
437
|
const list = settings.hooks.SubagentStart = settings.hooks.SubagentStart || [];
|
|
432
438
|
const yaEsta = JSON.stringify(list).includes('crbro-subagent');
|
|
433
439
|
if (yaEsta) {
|
|
434
|
-
console.log(' β
SubagentStart hook already installed.
|
|
440
|
+
console.log(' β
SubagentStart hook already installed. Script refreshed.');
|
|
441
|
+
if (conInyeccion && !JSON.stringify(list).includes('CRBRO_SUBAGENT_INJECT')) {
|
|
442
|
+
console.log(' β οΈ The installed entry does NOT enable injection. To enable it,');
|
|
443
|
+
console.log(' remove the SubagentStart entry from settings.json and re-run');
|
|
444
|
+
console.log(' install-hooks --inject.');
|
|
445
|
+
}
|
|
435
446
|
return;
|
|
436
447
|
}
|
|
437
448
|
list.push({
|
|
@@ -448,9 +459,17 @@ if (command === 'init') {
|
|
|
448
459
|
fs.renameSync(tmp, settingsPath);
|
|
449
460
|
console.log(' β
SubagentStart hook installed.');
|
|
450
461
|
console.log(` ${settingsPath}`);
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
462
|
+
if (conInyeccion) {
|
|
463
|
+
console.log(' Injection ENABLED: every Task-spawned subagent receives the');
|
|
464
|
+
console.log(' protocol block. Scope it with CRBRO_SUBAGENT_MATCHER (regex on');
|
|
465
|
+
console.log(' agent_type) if needed. Measured caveat: on small models the');
|
|
466
|
+
console.log(' block bought no benchmarked benefit and induced fabricated');
|
|
467
|
+
console.log(' compliance in some runs β see the benchmarks before scoping.');
|
|
468
|
+
} else {
|
|
469
|
+
console.log(' Injection is OPT-IN and currently OFF (the measured default:');
|
|
470
|
+
console.log(' three clean benchmark runs found no benefit in any model and');
|
|
471
|
+
console.log(' harm in small ones). Re-run with --inject to enable it.');
|
|
472
|
+
}
|
|
454
473
|
}).catch(console.error);
|
|
455
474
|
|
|
456
475
|
} else if (command === '--help' || command === '-h') {
|
package/hooks/crbro-subagent.mjs
CHANGED
|
@@ -13,10 +13,22 @@
|
|
|
13
13
|
// neurons in the brain's cortex. One source of truth, so this hook can never
|
|
14
14
|
// drift from what the main session was given.
|
|
15
15
|
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
16
|
+
// INJECTION IS OPT-IN since 1.12 (set CRBRO_SUBAGENT_INJECT=full to enable).
|
|
17
|
+
// This is not caution β it is the pre-registered consequence of measurement.
|
|
18
|
+
// Three clean-control benchmark runs (blind judges, pre-registered
|
|
19
|
+
// thresholds; see synthetica-decks/benchmarks/) found: frontier models at a
|
|
20
|
+
// perfect ceiling on every measurable agentic probe with and without the
|
|
21
|
+
// block (nothing for injection to add); small models on single-shot tasks
|
|
22
|
+
// HARMED by the block (scope discipline 10/10 bare vs 0/10 injected); and in
|
|
23
|
+
// agentic mode the only differential behavior was against β 2/5 small-model
|
|
24
|
+
// agents WITH the block gamed a failing test suite and reported success,
|
|
25
|
+
// 0/5 without it. An injection that buys no measured behavior and can induce
|
|
26
|
+
// fabricated compliance must not be the default.
|
|
27
|
+
//
|
|
28
|
+
// Scoping (when injection is enabled): set CRBRO_SUBAGENT_MATCHER to a regex
|
|
29
|
+
// and the protocols are injected only into subagents whose agent_type
|
|
30
|
+
// matches. Unanchored, case-insensitive. Invalid regex or missing agent_type
|
|
31
|
+
// fail OPEN (inject): scoping must never silently drop the layer.
|
|
20
32
|
//
|
|
21
33
|
// Failure contract: this hook never blocks a session. Any error β unreadable
|
|
22
34
|
// brain, bad JSON, stdin that never ends (the Windows PowerShell wrapper can
|
|
@@ -103,6 +115,13 @@ function inject() {
|
|
|
103
115
|
}
|
|
104
116
|
}
|
|
105
117
|
|
|
118
|
+
// Opt-in gate (1.12): without explicit consent, the hook is inert. Silence
|
|
119
|
+
// here is the measured default, not a failure β see the header.
|
|
120
|
+
const INJECT = String(process.env.CRBRO_SUBAGENT_INJECT || '').toLowerCase();
|
|
121
|
+
if (INJECT !== 'full' && INJECT !== '1' && INJECT !== 'on') {
|
|
122
|
+
process.exit(0);
|
|
123
|
+
}
|
|
124
|
+
|
|
106
125
|
// A bad regex must never crash the hook; treat it as "no matcher" and inject.
|
|
107
126
|
let matcherRe = null;
|
|
108
127
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crbro-memory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"mcpName": "io.github.Octonove/crbro-memory",
|
|
5
5
|
"description": "CRBRO β Persistent neural memory for AI. A biological file-based MCP server that gives your AI long-term memory across sessions.",
|
|
6
6
|
"main": "dist/index.js",
|