crbro-memory 2.7.0 β†’ 2.7.2

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 CHANGED
@@ -32,7 +32,7 @@ Or in USDC. Send **USDC only** and **only on the network shown**; on any other n
32
32
  - **🎯 Read the entry, not the neuron** β€” `crbro_inspect view=neuron` returns an index: every fact, decision, pattern, preference, error, debt and the map as an id, a kind, a date and a preview. `entries=[ids]` reads just those; every recall hit carries its `entry_id`. The whole-neuron read still exists as `detail=full`, behind a declared ceiling. A 307-fact neuron went from 66,952 tokens to 1,887 to open *(v2.1+)*
33
33
  - **πŸ““ The diary is searchable** β€” every session summary is in the index, as paragraphs. `crbro_recall` returns the days that mention the question in a list of their own, `sessions_matched`, so narrative never outranks a fact; `crbro_inspect view=sessions session=<id>` reads one day whole. Lexical only, rebuilt once on upgrade *(v2.2+)*
34
34
  - **πŸ—£οΈ The model in the loop** β€” Two levers no embedding model replaces, measured blind: keywords written at save time (the caller knows the synonyms: a line about Hetzner gets *hosting, alojamiento, servidor*) and several phrasings searched at once, fused by rank. Zero disk, zero RAM; numbers in the table below *(v1.15+)*
35
- - **🧭 Semantic recall** β€” `npx crbro-memory init` installs a local embedding model (`multilingual-e5-small`, int8) fused with the keyword engine, so paraphrases the words do not cover start to land. Measured: +8 points of recall@1 over the keyword engine, +2 to +5 on top of save-time keywords. Costs ~500 MB on disk once per machine and ~0.5 GB of RAM while a server runs; `init --no-semantic` skips it, `CRBRO_SEMANTIC=0` turns it off *(v1.14+, installed by default since v1.16)*
35
+ - **🧭 Semantic recall** β€” `npx crbro-memory init` installs a local embedding model (`multilingual-e5-small`, int8) fused with the keyword engine, so paraphrases the words do not cover start to land. It matters most in a big brain: with 1,482 unrelated facts around the test set it lifts recall@1 from 54% to 67% on the original exam and from 31% to 48% on a new 96-question one; on a small brain it measures within 2 points of the keyword engine (75% vs 77% on 2.7.2). Costs ~500 MB on disk once per machine and ~0.5 GB of RAM while a server runs; `init --no-semantic` skips it, `CRBRO_SEMANTIC=0` turns it off *(v1.14+, installed by default since v1.16)*
36
36
  - **πŸ”₯ Heat Scores** β€” Automatic relevance tracking based on frequency, recency, and connectivity. Topics written in the same session are linked at consolidation, so the graph fills itself in *(v1.13+)*
37
37
  - **πŸ•°οΈ Dates that mean something** β€” A recency lift of at most 4% breaks ties towards the newer telling (measured: it only ever flipped exact ties), `crbro_recall since` / `kind` narrow a search to "the last two weeks" or "only past mistakes", and `crbro_maintenance backfill_dates` dates the entries written before 1.13 from the date stated in their own text β€” never guessed *(v2.5+)*
38
38
  - **🧹 Housekeeping that reports before it acts** β€” every maintenance run lists entries whose own deadline has passed, neurons that outgrew one read (with `crbro_revise move_to` to split them keeping every date) and the one-line neurons a bulk import left behind (`compact:true` folds them into a digest). All read-only until asked *(v2.5+)*
@@ -59,18 +59,20 @@ Or in USDC. Send **USDC only** and **only on the network shown**; on any other n
59
59
 
60
60
  ## Measured, not promised
61
61
 
62
- Every number below comes from a deterministic benchmark in [`benchmarks/`](https://github.com/Octonove/crbro-memory/tree/master/benchmarks) that runs in CI β€” no API calls, reproducible on your machine with `node benchmarks/<name>/run.mjs`. The unflattering ones are published on purpose.
62
+ Every number below comes from a benchmark in [`benchmarks/`](https://github.com/Octonove/crbro-memory/tree/master/benchmarks), reproducible on your machine with `node benchmarks/<name>/run.mjs`. All of them are deterministic and run in CI with no API calls, except the agentic one, which puts a real Claude Code agent to work and spends tokens. The unflattering ones are published on purpose.
63
63
 
64
- The short version, re-measured on 2026-10-03 with 2.7.0: as installed, **73%** of blind questions land on the right fact at rank 1 and **90%** within the topic's top three lines; with the two free habits the card teaches, **90%** at rank 1 and **96%** within the top lines. The keyword engine underneath, with nothing installed, is the floor at 71%. Some of these figures are lower than the ones published with 1.14–1.16 (79% at rank 1 as installed); 2.6.0 measures the same as 2.7.0, and the cause of the drop has not been traced yet. Not one credential in the adversarial set gets through, and a session pays about 750 tokens for all of it.
64
+ The short version, measured on 2026-10-03 with 2.7.2: **a fresh session did not ask again what memory already held** β€” with CRBRO a real agent answered 24 of 24 questions whose answer lived only in memory, without it 0 of 24 (haiku and sonnet, Claude Code 2.1.270, n=3). As installed, **75%** of blind questions land on the right fact at rank 1 and **90%** within the topic's top three lines; with the two free habits the card teaches, **92%** at rank 1 and **98%** within the top lines. A second, harder exam of 96 new questions lands 57% at rank 1, and the semantic layer earns its place as the brain grows: inside 1,482 unrelated facts it holds 48% where the keyword engine alone falls to 31%. The drop of the semantic layer since 2.5 (79% β†’ 73%) is traced to two changes in how ties and vectors are computed, not to a search bug. Not one credential in the adversarial set gets through, and a session pays about 1,000 tokens for all of it.
65
65
 
66
66
  | What | Result | The honest part |
67
67
  |------|--------|-----------------|
68
- | **Retrieval, as installed** (48 blind paraphrased queries, written by someone who never saw the stored text; the semantic layer is on by default since 1.16; measured 2026-10-03, `CRBRO_SEMANTIC=1 node benchmarks/retrieval/run.mjs`) | recall@1 **73%** Β· recall@3 **79%** Β· MRR 0.760 β€” **81% / 90%** counting `also_matched` | Vectors from `multilingual-e5-small` (int8) fused with BM25 by reciprocal rank. Alone, the model scored 63% / 81% when it was measured in 1.14; fused, it now adds 2 points at recall@1 over the keyword engine (it added 8 in 1.14) and no distractor reaches a real hit's score (0 of 14; 11 return something, 10 of them labelled `weak`). The cosine floor under which a vector-only candidate is dropped (0.84) was picked on this same set β€” a tuned number, not a blind one. Costs ~500 MB on disk, ~0.5 GB of RAM while the server runs, a one-time embedding pass (~3 min for a 4k-line brain) and ~13 s of model load per process. Installed by `init` since 1.16; `CRBRO_SEMANTIC=0` turns it off *(v1.14+)* |
69
- | **Retrieval with the two habits the card teaches** (same 48 queries; keywords at save time and several phrasings at recall, both written blind by a model that saw only one half of the test; measured 2026-10-03) | keywords alone: recall@1 **83%** Β· recall@3 **90%** β€” everything on (keywords + rewrites + semantic layer): **90% / 92%**, and **94% / 96%** counting `also_matched` | The biggest lever costs nothing: 2-5 keywords written when a fact is saved close exactly the gaps no embedding model closed. Rewrites alone do not move the keyword engine at rank 1 (71% β†’ 71% / 83%); they add up on top of keywords. With everything on, all 14 distractors return something, none at a real hit's score, all 14 labelled `weak`. Every configuration and the three questions still missed are in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md) *(v1.15+)* |
70
- | **The keyword engine alone** (same 48 queries; `CRBRO_SEMANTIC=0`, or before the model is installed; measured 2026-10-03, `node benchmarks/retrieval/run.mjs`) | recall@1 **71%** Β· recall@3 **77%** Β· MRR 0.744 β€” and **77% / 83%** counting the neuron's `also_matched` lines (79% / 85% when published in 1.13) | Was 56% / 69% in 1.12. Of the 13 misses, 8 were the *right neuron answering with the wrong line* (its name chunk, or a sibling fact) β€” fixed in the engine; the rest are vocabulary gaps, which a short bilingual synonym table now closes in part. A naive substring search scores 38% / 58%. This is the floor every install starts from, and the misses are listed in the benchmark output |
71
- | **Retrieval β€” false confidence** (14 questions about things that are NOT stored; measured 2026-10-03) | keyword engine: 11 return *something*; **2** at a real hit's score; **10 of 11** labelled `weak`. As installed: 11 return something, **0** at a real hit's score, 10 of 11 labelled `weak` | A keyword memory answers almost anything. Every result now carries `confidence`, and the label catches nearly every distractor β€” at the price of also calling 18 of 48 real hits weak. Weak means "little of the question was covered", not "wrong" |
68
+ | **A fresh session does not ask again** (a new Claude Code session, no history, gets a question whose answer lives only in a memory seeded earlier; the prompt never mentions memory; 12 frozen fictitious tasks, 4 thresholds fixed before running; haiku and sonnet, Claude Code 2.1.270, n=3; measured 2026-10-03, `node benchmarks/agentic/run.mjs`) | with CRBRO **24/24** on answers that live only in memory, **0** retired values given (12/12 where an old value was replaced) β€” without it **0/24**, and sonnet invented 4 | Both controls behave: when the answer is in the question both arms get it (6/6), and when it is nowhere CRBRO abstains as often as the bare agent (6/6, nothing invented). The server's instructions were fixed twice between runs on these same 12 tasks β€” the published run is the one where the fix works, not a blind one β€” and these are short single-question sessions. A result holds for that model and that Claude Code version; another needs its own run. Pre-registration and every run are in [`benchmarks/agentic/`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/agentic/PREREGISTRO.md) *(v2.7.2)* |
69
+ | **Retrieval, as installed** (48 blind paraphrased queries, written by someone who never saw the stored text; the semantic layer is on by default since 1.16; measured 2026-10-03 on 2.7.2, `CRBRO_SEMANTIC=1 node benchmarks/retrieval/run.mjs`) | recall@1 **75%** Β· recall@3 **81%** Β· MRR 0.781 β€” **81% / 90%** counting `also_matched` | Vectors from `multilingual-e5-small` (int8) fused with BM25 by reciprocal rank. On this small set the fusion now sits 2 points below the keyword engine at rank 1 (75% vs 77%) β€” the keyword engine got better in 2.7.2, the fusion barely moved β€” and no distractor reaches a real hit's score (0 of 14). It added 8 points in 1.14; the βˆ’6 since 2.5 is traced in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md). The cosine floor under which a vector-only candidate is dropped (0.84) was picked on this same set and re-checked on a separate tuning set β€” a tuned number, not a blind one. Costs ~500 MB on disk, ~0.5 GB of RAM while the server runs, a one-time embedding pass (~3 min for a 4k-line brain when it was measured in batches; one line at a time since 2.7.2 takes 1.6Γ— as long) and ~13 s of model load per process. Installed by `init` since 1.16; `CRBRO_SEMANTIC=0` turns it off *(v1.14+)* |
70
+ | **Retrieval with the two habits the card teaches** (same 48 queries; keywords at save time and several phrasings at recall, both written blind by a model that saw only one half of the test; measured 2026-10-03 on 2.7.2) | keywords alone: recall@1 **83%** Β· recall@3 **92%** β€” everything on (keywords + rewrites + semantic layer): **92% / 96%**, and **94% / 98%** counting `also_matched` | The biggest lever costs nothing: 2-5 keywords written when a fact is saved close exactly the gaps no embedding model closed β€” which is why `crbro_learn` now asks for them when a fact arrives without. Rewrites alone do not move the keyword engine at rank 1 (77% β†’ 77% / 90%); they add up on top of keywords. With everything on, no distractor reaches a real hit's score. Every configuration and the questions still missed are in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md) *(v1.15+)* |
71
+ | **The keyword engine alone** (same 48 queries; `CRBRO_SEMANTIC=0`, or before the model is installed; measured 2026-10-03 on 2.7.2, `node benchmarks/retrieval/run.mjs`) | recall@1 **77%** Β· recall@3 **83%** Β· MRR 0.806 β€” the same counting `also_matched` (71% / 77% on 2.7.1) | Was 56% / 69% in 1.12. 2.7.2 weighs each query term by its rarity, chosen on a separate tuning set: +6 here, +12 inside the 1,482-fact haystack, and nothing on the new 96-question exam (49%). A naive substring search scores 38% / 58%. This is the floor every install starts from, and the misses are listed in the benchmark output |
72
+ | **Retrieval at scale** (a second blind exam of 96 questions + 20 distractors, and a haystack of 1,482 facts in 114 unrelated topics learned before the test brain; both frozen before measuring; measured 2026-10-03 on 2.7.2) | as installed: recall@1 **57%** Β· recall@3 **60%**; inside the haystack **48% / 52%**. Keyword engine alone: 49% / 53%, inside the haystack **31% / 40%** | The new exam is harder than the original one and gives more false confidence: 8 of its 20 distractors come back at a real hit's score as installed, 11 with the keyword engine. Its numbers did not move between 2.7.1 and 2.7.2. What it shows is what the semantic layer is for: the more unrelated facts a brain holds, the more it carries recall β€” 17 points here |
73
+ | **Retrieval β€” false confidence** (14 questions about things that are NOT stored; measured 2026-10-03 on 2.7.2) | keyword engine: **2** at a real hit's score. As installed: **0** at a real hit's score | A keyword memory answers almost anything. Every result carries `confidence`, and the label catches nearly every distractor on this set β€” at the price of also calling some real hits weak. Weak means "little of the question was covered", not "wrong". On the harder 96-question exam it catches far fewer (see the row above) |
72
74
  | **Secret redaction** (20 credentials in adversarial disguises, 19 near-miss innocents) | **100%** caught Β· **0%** false positives | 100% on *this frozen set* β€” a floor, not a security proof. The set grows as new evasion shapes appear; four of its entries were misses in the first run and were fixed, not hidden |
73
- | **Cost** (what CRBRO adds to a session) | ~**750 tokens** of protocol block Β· **~2.8k tokens** for the whole boot payload on a 1,145-neuron brain Β· **~2k** per recall (five ranked results) Β· **~6.8k tokens** of tool definitions Β· **<1 ms** local recall over 300 facts | The boot block is paid once. The 750 figure is the protocol text alone; what boot RETURNS also carries hot topics, the active context and recent sessions, and on a mature brain that reached 20,352 tokens until 2.0.3 put a declared ceiling on it β€” 4,989 measured after 2.0.3 and 2,758 after 2.1, which also made the neuron view an index (a 307-fact neuron: 66,952 β†’ 1,887 tokens to open), cut recall to five ranked results by default and dropped the pretty-printing every response paid for. No read is allowed past that ceiling now, and anything shortened says so. The 15 tool definitions (27,095 characters of description + input schema, measured with a real `tools/list` on 2.1.0 and divided by 4; 32,246 counting the output schemas of the three readers, ~8.1k tokens) are paid on every request by clients that load all tools (Claude Desktop, Cursor); Claude Code defers them and pays only for the ones it uses. Fewer tools, not fewer characters: the 23 of 1.13 measured 21,662 (~5.4k tokens), because each parameter's text now lives in the tool that absorbed it |
75
+ | **Cost** (what CRBRO adds to a session) | ~**1,000 tokens** of protocol block Β· **~2.8k tokens** for the whole boot payload on a 1,145-neuron brain Β· **~2k** per recall (five ranked results) Β· **~7.5k tokens** of tool definitions Β· **~1 ms** local recall over 300 facts with the keyword engine, **~10 ms** with the semantic layer, which embeds the question | The boot block is paid once. The 1,000 figure is the protocol text alone β€” Card Zero's ten protocols, 4,035 characters, measured on 2026-10-03 (750 before its tenth protocol); what boot RETURNS also carries hot topics, the active context and recent sessions, and on a mature brain that reached 20,352 tokens until 2.0.3 put a declared ceiling on it β€” 4,989 measured after 2.0.3 and 2,758 after 2.1, which also made the neuron view an index (a 307-fact neuron: 66,952 β†’ 1,887 tokens to open), cut recall to five ranked results by default and dropped the pretty-printing every response paid for. No read is allowed past that ceiling now, and anything shortened says so. The 15 tool definitions (29,897 characters of description + input schema, measured with a real `tools/list` on 2.7.2 on 2026-10-03 and divided by 4; 35,416 counting the output schemas of the three readers, ~8.9k tokens; 29,757 on 2.7.1; 27,095 and 32,246 on 2.1.0) are paid on every request by clients that load all tools (Claude Desktop, Cursor); Claude Code defers them and pays only for the ones it uses. Fewer tools, not fewer characters: the 23 of 1.13 measured 21,662 (~5.4k tokens), because each parameter's text now lives in the tool that absorbed it |
74
76
 
75
77
  What these benchmarks deliberately do **not** claim β€” human productivity, "it knows you", comparisons against other memory systems β€” is written down in [`benchmarks/LIMITS.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/LIMITS.md).
76
78
 
@@ -441,17 +443,17 @@ npx crbro-memory --help # Help
441
443
 
442
444
  ### Semantic recall
443
445
 
444
- The keyword engine has no synonyms, and the blind benchmark shows exactly where that bites: paraphrases β€” *"where are the sites hosted"* for a fact about a Hetzner VPS. Keywords written at save time close most of that gap for free (above); a small embedding model closes a little more. Since 1.16 `npx crbro-memory init` installs it by default, once per machine, and the layer is on wherever its runtime is present. What it costs, measured: ~500 MB on disk (runtime ~380 MB + model 118 MB), ~0.5 GB of RAM while a server runs, ~13 s of model load per process (in the background) and a one-time embedding pass. Skip it with `init --no-semantic`; turn it off any time with `CRBRO_SEMANTIC=0` in the server's env.
446
+ The keyword engine has no synonyms, and the blind benchmark shows exactly where that bites: paraphrases β€” *"where are the sites hosted"* for a fact about a Hetzner VPS. Keywords written at save time close most of that gap for free (above); a small embedding model closes a little more on a small brain and a lot more on a big one. Since 1.16 `npx crbro-memory init` installs it by default, once per machine, and the layer is on wherever its runtime is present. What it costs, measured: ~500 MB on disk (runtime ~380 MB + model 118 MB), ~0.5 GB of RAM while a server runs, ~13 s of model load per process (in the background) and a one-time embedding pass. Skip it with `init --no-semantic`; turn it off any time with `CRBRO_SEMANTIC=0` in the server's env.
445
447
 
446
448
  ```bash
447
449
  npx crbro-memory init # installs it (skip with --no-semantic)
448
450
  npx crbro-memory semantic status # runtime, model, on or off, and why
449
- npx crbro-memory semantic build # embed an existing brain once (a 4k-line brain: ~3 min)
451
+ npx crbro-memory semantic build # embed an existing brain once (a 4k-line brain: ~3 min in batches; 2.7.2 embeds one line at a time, 1.6x that)
450
452
  ```
451
453
 
452
454
  Every new line is embedded when it is saved (ids are content hashes, so nothing is embedded twice), the model warms in the background after boot, and `crbro_recall` fuses both rankings by reciprocal rank. Results the vectors ranked carry `semantic_score`; a vector-only match is `strong` from cosine 0.86. With `CRBRO_SEMANTIC=0`, or without the runtime, no vectors are read and no model is loaded: recall is the keyword engine byte for byte.
453
455
 
454
- The model is `multilingual-e5-small` and stays so on purpose. `CRBRO_SEMANTIC_MODEL` accepts any e5-family model, and `e5-base` and `e5-large` were measured on the same benchmark: the large one is the better model alone (71% vs 63% recall@1) but fused with the keyword engine it scores the same or worse (75% / 85% vs 79% / 83%) for 4Γ— the disk, 1.2 GB of RAM and 6Γ— the time per line. The table is in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md).
456
+ The model is `multilingual-e5-small` and stays so on purpose. `CRBRO_SEMANTIC_MODEL` accepts any e5-family model, and `e5-base` and `e5-large` were measured on the same benchmark: the large one is the better model alone (71% vs 63% recall@1) but fused with the keyword engine it scored the same or worse when measured in 1.16 (75% / 85% vs 79% / 83%) for 4Γ— the disk, 1.2 GB of RAM and 6Γ— the time per line. The table is in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md).
455
457
 
456
458
  What it buys on the frozen benchmark, and what it does not, is in the table above and in [`benchmarks/README.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/README.md) β€” including the fact that the 0.84 cosine floor was chosen on that same set. One limit worth knowing before you install 500 MB: the model does not understand the question. Queries that share no concrete word with the stored line ("which machine serves the pages" for a fact about a Hetzner VPS) land in a flat 0.80–0.84 cosine band with near-random ordering β€” measured, and the reason the floor exists. What it adds is tolerance to vocabulary variation and to entities, which is where the benchmark gain comes from.
457
459
 
@@ -38,7 +38,11 @@ export declare const THRESHOLDS: {
38
38
  /** Word-set overlap for two requests to count as the same one. */
39
39
  readonly sameRequestJaccard: 0.8;
40
40
  };
41
- /** Lines the client writes on the person's behalf. Not requests. */
41
+ /**
42
+ * Lines the client writes on the person's behalf. Not requests. The last one is
43
+ * the Claude desktop app resuming after a usage limit: it arrives as a human
44
+ * prompt with no flag, so only its wording tells it apart (seen in Spanish).
45
+ */
42
46
  export declare const NOT_A_REQUEST: RegExp;
43
47
  /**
44
48
  * The text a person typed in one user entry, or '' when the entry is a tool
@@ -61,6 +65,10 @@ export declare const CORRECTION_PATTERNS: ReadonlyArray<{
61
65
  label: string;
62
66
  re: RegExp;
63
67
  }>;
68
+ /** A correction opens the message: only its first characters are looked at. */
69
+ export declare const CORRECTION_WINDOW = 160;
70
+ /** Longer than this it is a brief or a scheduled prompt ("si algo sale mal…"), not a correction. */
71
+ export declare const CORRECTION_MAX_CHARS = 1200;
64
72
  export declare function correctionLabel(text: string): string | null;
65
73
  /** Redact first, then cut: a cut first could leave half a secret the filter no longer recognises. */
66
74
  export declare function excerpt(text: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"postmortem.d.ts","sourceRoot":"","sources":["../../src/engine/postmortem.ts"],"names":[],"mappings":"AAwBA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE/F,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,yCAAyC;IACzC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,E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E,CAAC,CAW/E;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAWzE;AAID,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAW5E,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,oGAAoG;AACpG,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK3D;AAED,qGAAqG;AACrG,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG5C;AA+LD,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAaD,wBAAsB,aAAa,CAAC,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8D3F;AAWD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,CA+B5D"}
@@ -22,7 +22,7 @@
22
22
  // orchestrating model, not the person, so its corrections are not theirs.
23
23
  // Every string this module returns has been through redact().
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.CORRECTION_PATTERNS = exports.NOT_A_REQUEST = exports.THRESHOLDS = void 0;
25
+ exports.CORRECTION_MAX_CHARS = exports.CORRECTION_WINDOW = exports.CORRECTION_PATTERNS = exports.NOT_A_REQUEST = exports.THRESHOLDS = void 0;
26
26
  exports.userText = userText;
27
27
  exports.toolResults = toolResults;
28
28
  exports.toolCalls = toolCalls;
@@ -46,8 +46,12 @@ exports.THRESHOLDS = {
46
46
  };
47
47
  const EXCERPT_CHARS = 160;
48
48
  // ─── What the person typed ───────────────────────────────────────
49
- /** Lines the client writes on the person's behalf. Not requests. */
50
- exports.NOT_A_REQUEST = /^(?:<local-command-|<system-reminder>|<command-stdout>|<command-message>|<bash-|<user-prompt-submit-hook>|<task-notification>|\[Request interrupted|Caveat: )/;
49
+ /**
50
+ * Lines the client writes on the person's behalf. Not requests. The last one is
51
+ * the Claude desktop app resuming after a usage limit: it arrives as a human
52
+ * prompt with no flag, so only its wording tells it apart (seen in Spanish).
53
+ */
54
+ exports.NOT_A_REQUEST = /^(?:<local-command-|<system-reminder>|<command-stdout>|<command-message>|<bash-|<user-prompt-submit-hook>|<task-notification>|\[Request interrupted|Caveat: |AlcancΓ© mi lΓ­mite de uso mientras trabajabas)/;
51
55
  /**
52
56
  * The text a person typed in one user entry, or '' when the entry is a tool
53
57
  * result, a meta line, a compaction summary or a reminder. Reads only the
@@ -116,16 +120,24 @@ exports.CORRECTION_PATTERNS = [
116
120
  { label: 'Β«no,Β»', re: /^\s*no\s*[,.!;:]/i },
117
121
  { label: 'Β«te dijeΒ»', re: /\b(?:ya\s+)?te\s+(?:lo\s+)?(?:dije|he\s+dicho|hab[iΓ­]a\s+dicho|ped[iΓ­]|he\s+pedido)\b/i },
118
122
  { label: 'Β«otra vezΒ»', re: /\botra\s+vez\b/i },
119
- { label: 'Β«eso noΒ»', re: /\beso\s+no\b/i },
123
+ // Only when it opens a sentence: "eso no interfiere" and "para eso no?" are not corrections.
124
+ { label: '«eso no»', re: /(?:^|[.!?‘¿\n]\s*)eso\s+no\b/i },
120
125
  { label: 'Β«no es esoΒ»', re: /\bno\s+es\s+(?:eso|as[iΓ­]|lo\s+que\s+(?:te\s+)?(?:he\s+)?ped)/i },
121
126
  { label: 'Β«malΒ»', re: /^\s*mal\b|\b(?:est[aΓ‘]|lo\s+has\s+hecho|has\s+hecho|sigue|queda|sale|va)\s+mal\b/i },
122
127
  { label: "Β«that's wrongΒ»", re: /\bthat'?s\s+(?:wrong|not\s+(?:it|right|what\s+i))/i },
123
128
  { label: 'Β«I saidΒ»', re: /\bi\s+(?:said|told\s+you|already\s+(?:said|told))\b/i },
124
129
  { label: 'Β«not what I askedΒ»', re: /\bnot\s+what\s+i\s+(?:asked|wanted|meant)\b/i },
125
130
  ];
131
+ /** A correction opens the message: only its first characters are looked at. */
132
+ exports.CORRECTION_WINDOW = 160;
133
+ /** Longer than this it is a brief or a scheduled prompt ("si algo sale mal…"), not a correction. */
134
+ exports.CORRECTION_MAX_CHARS = 1200;
126
135
  function correctionLabel(text) {
136
+ if (text.length > exports.CORRECTION_MAX_CHARS)
137
+ return null;
138
+ const opening = text.slice(0, exports.CORRECTION_WINDOW);
127
139
  for (const p of exports.CORRECTION_PATTERNS)
128
- if (p.re.test(text))
140
+ if (p.re.test(opening))
129
141
  return p.label;
130
142
  return null;
131
143
  }
@@ -155,6 +167,8 @@ function repeatable(text, norm) {
155
167
  }
156
168
  /** How many recent requests a new one is compared with for near-repeats. */
157
169
  const NEAR_WINDOW = 40;
170
+ /** A pause longer than this is a break, not time spent in the session. */
171
+ const IDLE_GAP_MS = 30 * 60_000;
158
172
  async function scanSession(s, stats) {
159
173
  const findings = [];
160
174
  const requests = new Map();
@@ -166,6 +180,9 @@ async function scanSession(s, stats) {
166
180
  let userTurns = 0;
167
181
  let first = '';
168
182
  let last = '';
183
+ // Active time, not first-to-last: a session resumed over weeks is not weeks long.
184
+ let activeMs = 0;
185
+ let prevMs = NaN;
169
186
  let toolsSinceUser = [];
170
187
  const corrections = [];
171
188
  let streak = null;
@@ -185,6 +202,13 @@ async function scanSession(s, stats) {
185
202
  if (!first)
186
203
  first = entry.timestamp;
187
204
  last = entry.timestamp;
205
+ const ms = Date.parse(entry.timestamp);
206
+ if (Number.isFinite(ms)) {
207
+ const gap = ms - prevMs;
208
+ if (gap > 0 && gap <= IDLE_GAP_MS)
209
+ activeMs += gap;
210
+ prevMs = ms;
211
+ }
188
212
  }
189
213
  if (entry.type === 'assistant') {
190
214
  const id = entry.message?.id;
@@ -292,8 +316,10 @@ async function scanSession(s, stats) {
292
316
  }
293
317
  const nResponses = responses.size + responsesNoId;
294
318
  if (userTurns >= exports.THRESHOLDS.longUserTurns || nResponses >= exports.THRESHOLDS.longResponses) {
295
- const hours = first && last ? (Date.parse(last) - Date.parse(first)) / 3_600_000 : NaN;
296
- const span = Number.isFinite(hours) ? ` over ${hours.toFixed(1)} h` : '';
319
+ const days = first && last ? Math.floor((Date.parse(last) - Date.parse(first)) / 86_400_000) + 1 : NaN;
320
+ const span = Number.isFinite(days)
321
+ ? ` in ${(activeMs / 3_600_000).toFixed(1)} h of activity${days > 1 ? ` spread over ${days} days` : ''}`
322
+ : '';
297
323
  findings.push({
298
324
  ...base,
299
325
  kind: 'long_session',
@@ -1 +1 @@
1
- {"version":3,"file":"postmortem.js","sourceRoot":"","sources":["../../src/engine/postmortem.ts"],"names":[],"mappings":";AAAA,mEAAmE;AACnE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,EAAE;AACF,yEAAyE;AACzE,8EAA8E;AAC9E,2BAA2B;AAC3B,EAAE;AACF,iCAAiC;AACjC,4EAA4E;AAC5E,oEAAoE;AACpE,2EAA2E;AAC3E,8EAA8E;AAC9E,0DAA0D;AAC1D,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,8DAA8D;;;AAgE9D,4BAmBC;AAGD,kCAWC;AAGD,8BAWC;AAiBD,0CAGC;AAGD,0BAGC;AAiMD,sCA8DC;AAWD,4CA+BC;AAhbD,6CAAsC;AACtC,4DAGiC;AAiCpB,QAAA,UAAU,GAAG;IACxB,4DAA4D;IAC5D,WAAW,EAAE,CAAC;IACd,sDAAsD;IACtD,UAAU,EAAE,CAAC;IACb,yDAAyD;IACzD,aAAa,EAAE,EAAE;IACjB,qDAAqD;IACrD,aAAa,EAAE,GAAG;IAClB,kEAAkE;IAClE,kBAAkB,EAAE,GAAG;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84
84
  /** Age at which the lift is half of what a chunk written today gets. */
85
85
  const RECENCY_HALF_DAYS = 120;
86
+ /**
87
+ * Rarity weighting of query terms (2.7.2), on by default. Chosen on the tuning
88
+ * set only (benchmarks/retrieval/dev.json): keyword engine recall@1 63% -> 67%
89
+ * alone and 44% -> 52% inside a 1,482-fact haystack; the semantic fusion did
90
+ * not move. CRBRO_IDF=0 turns it off.
91
+ */
92
+ const IDF_DEFAULT = true;
93
+ function idfWeighting() {
94
+ const v = (process.env.CRBRO_IDF || '').toLowerCase();
95
+ if (v === '0' || v === 'off' || v === 'false')
96
+ return false;
97
+ if (v === '1' || v === 'on' || v === 'true')
98
+ return true;
99
+ return IDF_DEFAULT;
100
+ }
86
101
  function recencyWeight() {
87
102
  const raw = process.env.CRBRO_RECENCY;
88
103
  if (raw === undefined || raw === '')
@@ -567,15 +582,36 @@ class SearchEngine {
567
582
  }
568
583
  return true;
569
584
  };
585
+ // Each term's hits are normalised against that term's own best, which makes
586
+ // every term worth up to 1 β€” a word in a third of the brain ("cuΓ‘nto",
587
+ // "mes") as much as the one rare word that names the thing. Weighting each
588
+ // term by its rarity (BM25 idf over the chunks it matches, relative to the
589
+ // rarest term of the query) gives that information back (2.7.2).
590
+ const porTermino = [];
570
591
  for (const term of terms) {
571
592
  const hits = await this.searchTerm(term, options?.domain);
572
- if (hits.length === 0)
573
- continue;
593
+ if (hits.length > 0)
594
+ porTermino.push({ term, hits });
595
+ }
596
+ const pesoTermino = new Map();
597
+ if (idfWeighting()) {
598
+ const n = Math.max(1, this.docCount);
599
+ const idf = (df) => Math.log(1 + (n - df + 0.5) / (df + 0.5));
600
+ for (const { term, hits } of porTermino) {
601
+ const df = hits.filter(h => h.document.kind !== 'session').length;
602
+ pesoTermino.set(term, idf(df));
603
+ }
604
+ const max = Math.max(0, ...pesoTermino.values());
605
+ for (const [t, v] of pesoTermino)
606
+ pesoTermino.set(t, max > 0 ? v / max : 1);
607
+ }
608
+ for (const { term, hits } of porTermino) {
574
609
  const best = hits[0].score || 1;
610
+ const w = pesoTermino.get(term) ?? 1;
575
611
  for (const hit of hits) {
576
612
  const doc = hit.document;
577
613
  const key = doc.id;
578
- const normalised = best > 0 ? hit.score / best : 0;
614
+ const normalised = best > 0 ? (hit.score / best) * w : 0;
579
615
  // Session logs are searched, but never as neurons: they keep a list
580
616
  // of their own, so a long narrative cannot outrank the fact that
581
617
  // answers, and the neuron path below never sees them.