crbro-memory 2.9.0 โ†’ 2.9.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/README.md CHANGED
@@ -35,7 +35,7 @@ Or in USDC. Send **USDC only** and **only on the network shown**; on any other n
35
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
- - **โณ Shelf life: what may have changed comes apart** โ€” A port, a price, a version or who holds a role changes in the world without anyone telling the memory, and recall used to serve the old value with `confidence: strong`. Now every fact has a shelf life โ€” `volatile` (versions, prices, ports, hosts, paths, config, people in roles: 90 days), `normal` (365), `durable` (decisions and patterns: 730) or `permanent` (preferences, errors, debts, history: never) โ€” set with `shelf_life` on `crbro_learn` or, when omitted, inferred from the text and returned. The clock runs from the last verification: `crbro_revise status=verified` when the agent checked a line against its source, or the same fact learned again with nothing else in the call. A recall row whose best line is past its window moves, whole, to a separate `possibly_stale` block with `age_days` and `last_verified`, and the hint says how to reconfirm or supersede it; the ranking does not change and what is current stays where it was. The windows are a policy choice, not a measurement โ€” `CRBRO_SHELF_DAYS="volatile=90,normal=365,durable=730"` changes them, `CRBRO_STALENESS=0` turns the whole feature off. An existing brain is not flooded on upgrade: non-volatile lines written before the first boot of this version start counting near that boot, staggered so they do not all come due on the same day, lines with no date are never flagged, and nothing is rewritten on disk. **Measured, and it did not change what the agent answers:** in the pre-registered agentic case below, recall flags all four changed values correctly, but no agent opened the file to check โ€” see the table. A second iteration changes how the warning arrives: the answer opens with `stale_warning`, each stale row leads with `warning` and a `next_step` (open the file the line itself names, or look where the value lives; if that is not possible, say it may be out of date) and carries the old line as `last_known` rather than as ordinary content, and `crbro_learn` asks that a changeable value say where it came from. **Measured on a second pre-registered case, and still not met:** when recall flags the row, the agent stops giving the old value as current (it warns or abstains), but it still does not open the file to check, and only two of that case's six changed values were flagged at all โ€” see the table *(unreleased)*
38
+ - **โณ Shelf life: what may have changed comes apart** โ€” A port, a price, a version or who holds a role changes in the world without anyone telling the memory, and recall used to serve the old value with `confidence: strong`. Now every fact has a shelf life โ€” `volatile` (versions, prices, ports, hosts, paths, config, people in roles: 90 days), `normal` (365), `durable` (decisions and patterns: 730) or `permanent` (preferences, errors, debts, history: never) โ€” set with `shelf_life` on `crbro_learn` or, when omitted, inferred from the text and returned. Since 2.9.1 two kinds of unmarked fact are inferred `permanent`: a line the miner imported (`shelf_reason: "miner"`), and a dated record of something done โ€” a date and a finished action in the line's first sentence, "FASE 2 completada (ago 2026)", "Deployed v2.3.1 on 2026-06-18" (`shelf_reason: "history"`) โ€” unless that sentence states what holds from a date on ("desde el 18-sep el puerto es 9443", "as of 2026-10-01 the plan is $49"), looks ahead ("caduca", "will be released"), speaks of the present ("actualmente", "last deployed") or says the value it carries still holds ("Comprobado el 4-oct-2026: cuesta 35 โ‚ฌ", "Migrado el panel al puerto 9443 (18-sep-2026)"); those keep warning. The clock runs from the last verification: `crbro_revise status=verified` when the agent checked a line against its source, or the same fact learned again with nothing else in the call. A recall row whose best line is past its window moves, whole, to a separate `possibly_stale` block with `age_days` and `last_verified`, and the hint says how to reconfirm or supersede it; the ranking does not change and what is current stays where it was. The windows are a policy choice, not a measurement โ€” `CRBRO_SHELF_DAYS="volatile=90,normal=365,durable=730"` changes them, `CRBRO_STALENESS=0` turns the whole feature off. An existing brain is not flooded on upgrade: unmarked lines written before the first boot of this version start counting near that boot โ€” since 2.9.1 the ones the detector infers volatile too, when the brain itself predates shelf life โ€” staggered so they do not all come due on the same day; a line marked volatile by hand gets no grace, lines with no date are never flagged, and nothing is rewritten on disk. **Measured, and it did not change what the agent answers:** in the pre-registered agentic case below, recall flags all four changed values correctly, but no agent opened the file to check โ€” see the table. A second iteration changes how the warning arrives: the answer opens with `stale_warning`, each stale row leads with `warning` and a `next_step` (open the file the line itself names, or look where the value lives; if that is not possible, say it may be out of date) and carries the old line as `last_known` rather than as ordinary content, and `crbro_learn` asks that a changeable value say where it came from. **Measured on a second pre-registered case, and still not met:** when recall flags the row, the agent stops giving the old value as current (it warns or abstains), but it still does not open the file to check, and only two of that case's six changed values were flagged at all โ€” see the table
39
39
  - **๐Ÿงน 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+)*
40
40
  - **๐Ÿ’ฝ Backs itself up** โ€” one gzipped copy a day at consolidation, rotated, beside the brain it belongs to; `CRBRO_BACKUP_DIR` points it at a synced folder. The quarantine and machine tokens never travel *(v2.5+)*
41
41
  - **โœ๏ธ Correctable** โ€” Knowledge can be superseded or retracted, not just piled up โ€” facts, and since 2.0 decisions, patterns, errors and debts too. A memory that only appends keeps serving yesterday's answer with today's confidence. What was retired stays in the file and can come back (`status=active`); what must not exist on disk goes through `crbro_forget`, quarantine copy first
@@ -68,8 +68,8 @@ The short version, measured on 2026-10-03 with 2.7.2: **a fresh session did not
68
68
  | What | Result | The honest part |
69
69
  |------|--------|-----------------|
70
70
  | **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)* |
71
- | **A value that changed and nobody retired** (`stale-unmarked`: four fictitious values โ€” a version, a price, a port, a person in a role โ€” still live in memory at 200 days while the current one sits in a file in the working directory, readable by both arms; thresholds pre-registered before any run; 2.8.0 `before` vs the shelf-life branch `after`, haiku and sonnet, Claude Code 2.1.270, n=3; measured 2026-10-04) | with CRBRO, **0/12** correct before and **0/12** after in both models; old value given without a warning: haiku 11 โ†’ 9 and 10, sonnet 12 โ†’ 11 and 12 (two `after` runs each). Without memory the agent reads the file and gets 1-6 of 12 | **Not met โ€” the pre-registered claim is not made.** The shelf-life feature does its part (recall moves all four rows to `possibly_stale`, 200 days old, with a hint to check them), but in 48 `after` cells no agent with CRBRO opened the file: they answered from recall, abstained, or once (sonnet) gave the old value with a warning. Here memory still answers worse than no memory with the file at hand. The 12 original tasks still pass all four thresholds in the complete `after` runs (24/24, 0 retired values, controls 6/6). Cost per CRBRO cell on these tasks: haiku $0.0121 โ†’ ~$0.015, sonnet $0.0263 โ†’ ~$0.027. Limits: no task has an old value that is still true, so false warnings are not measured, and two of the four texts match the detector's own examples. Full tables in [`benchmarks/agentic/PREREGISTRO.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/agentic/PREREGISTRO.md) *(unreleased)* |
72
- | **The same, second iteration** (`stale-unmarked-b`: a new fictitious project, six values that changed โ€” an SMS provider, a price, a person in a role, an API host, a time, a cancellation window โ€” still live in memory at 130-300 days, two marked volatile, one marked normal, three unmarked, current values in files both arms can read; tasks and thresholds pre-registered before any run; 2.8.0 `before` vs the branch with the second iteration `after`, one run per model, haiku and sonnet, Claude Code 2.1.270, n=3; measured 2026-10-04) | with CRBRO, **0/18 โ†’ 1/18** correct (haiku) and **0/18 โ†’ 0/18** (sonnet); old value given without a warning: haiku 14 โ†’ 9, sonnet 18 โ†’ 12; with a warning: sonnet 0 โ†’ 6; abstentions: haiku 4 โ†’ 8. Without memory the agent reads the file and gets 6 (haiku) and 9 (sonnet) of 18 | **Not met โ€” the pre-registered claim is not made** (U1, U2, U3 fail in both models; U4 and U5 pass). Recall flagged only two of the six rows: the other four, unmarked or marked normal and under 365 days old, are served as current, and nothing changed there (same answers before and after). On the two flagged rows the old value as current went from 5 to 0 (haiku) and 6 to 0 (sonnet): haiku abstains, sonnet gives it with a warning. An agent with CRBRO opened a file in 1 of 48 cells. False warnings are now measured too: on an old value that is still true, sonnet keeps answering it right but adds "may be out of date"; haiku abstains as it did on 2.8.0. The 12 original tasks still pass all four thresholds in the same runs. Cost per CRBRO cell on these tasks: haiku $0.0114 โ†’ $0.0129, sonnet $0.0268 โ†’ $0.0272. Six tasks by one author on one project; the author of the product change knew the tasks. Full tables in [`benchmarks/agentic/PREREGISTRO.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/agentic/PREREGISTRO.md) *(unreleased)* |
71
+ | **A value that changed and nobody retired** (`stale-unmarked`: four fictitious values โ€” a version, a price, a port, a person in a role โ€” still live in memory at 200 days while the current one sits in a file in the working directory, readable by both arms; thresholds pre-registered before any run; 2.8.0 `before` vs the shelf-life branch `after`, haiku and sonnet, Claude Code 2.1.270, n=3; measured 2026-10-04) | with CRBRO, **0/12** correct before and **0/12** after in both models; old value given without a warning: haiku 11 โ†’ 9 and 10, sonnet 12 โ†’ 11 and 12 (two `after` runs each). Without memory the agent reads the file and gets 1-6 of 12 | **Not met โ€” the pre-registered claim is not made.** The shelf-life feature does its part (recall moves all four rows to `possibly_stale`, 200 days old, with a hint to check them), but in 48 `after` cells no agent with CRBRO opened the file: they answered from recall, abstained, or once (sonnet) gave the old value with a warning. Here memory still answers worse than no memory with the file at hand. The 12 original tasks still pass all four thresholds in the complete `after` runs (24/24, 0 retired values, controls 6/6). Cost per CRBRO cell on these tasks: haiku $0.0121 โ†’ ~$0.015, sonnet $0.0263 โ†’ ~$0.027. Limits: no task has an old value that is still true, so false warnings are not measured, and two of the four texts match the detector's own examples. Full tables in [`benchmarks/agentic/PREREGISTRO.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/agentic/PREREGISTRO.md) |
72
+ | **The same, second iteration** (`stale-unmarked-b`: a new fictitious project, six values that changed โ€” an SMS provider, a price, a person in a role, an API host, a time, a cancellation window โ€” still live in memory at 130-300 days, two marked volatile, one marked normal, three unmarked, current values in files both arms can read; tasks and thresholds pre-registered before any run; 2.8.0 `before` vs the branch with the second iteration `after`, one run per model, haiku and sonnet, Claude Code 2.1.270, n=3; measured 2026-10-04) | with CRBRO, **0/18 โ†’ 1/18** correct (haiku) and **0/18 โ†’ 0/18** (sonnet); old value given without a warning: haiku 14 โ†’ 9, sonnet 18 โ†’ 12; with a warning: sonnet 0 โ†’ 6; abstentions: haiku 4 โ†’ 8. Without memory the agent reads the file and gets 6 (haiku) and 9 (sonnet) of 18 | **Not met โ€” the pre-registered claim is not made** (U1, U2, U3 fail in both models; U4 and U5 pass). Recall flagged only two of the six rows: the other four, unmarked or marked normal and under 365 days old, are served as current, and nothing changed there (same answers before and after). On the two flagged rows the old value as current went from 5 to 0 (haiku) and 6 to 0 (sonnet): haiku abstains, sonnet gives it with a warning. An agent with CRBRO opened a file in 1 of 48 cells. False warnings are now measured too: on an old value that is still true, sonnet keeps answering it right but adds "may be out of date"; haiku abstains as it did on 2.8.0. The 12 original tasks still pass all four thresholds in the same runs. Cost per CRBRO cell on these tasks: haiku $0.0114 โ†’ $0.0129, sonnet $0.0268 โ†’ $0.0272. Six tasks by one author on one project; the author of the product change knew the tasks. Full tables in [`benchmarks/agentic/PREREGISTRO.md`](https://github.com/Octonove/crbro-memory/blob/master/benchmarks/agentic/PREREGISTRO.md) |
73
73
  | **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+)* |
74
74
  | **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+)* |
75
75
  | **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 |
@@ -262,7 +262,7 @@ Mods need Claude Code 2.1.286 or later and are drawn in the CLI and in the deskt
262
262
  | Tool | Description |
263
263
  |------|-------------|
264
264
  | `crbro_boot` | Boot the brain at session start โ€” loads hot topics, context, the last three sessions and the `retired_tools` map. `project` (the folder or repo name) puts that project's neurons first and lists them in `project_neurons` |
265
- | `crbro_inspect` | Read-only views by id or name: `view=status`, `neuron`, `neurons`, `sessions`, `global_map`. `view=neuron` is an index by default โ€” every entry as id, kind, date and preview; `entries=[ids]` reads those in full, `detail=full` the whole neuron. `view=sessions session=<id>` reads one day log whole |
265
+ | `crbro_inspect` | Read-only views by id or name: `view=status` (with the version the process runs, and the one installed on disk when npx replaced it under a running process), `neuron`, `neurons`, `sessions`, `global_map`. `view=neuron` is an index by default โ€” every entry as id, kind, date and preview; `entries=[ids]` reads those in full, `detail=full` the whole neuron. `view=sessions session=<id>` reads one day log whole |
266
266
  | `crbro_learn` | Store a fact, decision, pattern, preference, error or debt โ€” with the keywords a future question may use. `supersedes` retires the old version in the same call; `shelf_life` says how fast a fact goes stale (inferred from the text when omitted, and returned); the same fact again, with nothing else in the call, counts as re-verified |
267
267
  | `crbro_recall` | Search every stored line, not just topic names โ€” returns what matched, how confidently, and the topic's next best lines. Several phrasings at once are fused by rank; `since` (`"2026-09-01"`, `"2w"`) and `kind` (`["error"]`) narrow it; `sessions_matched` lists the day logs that mention it, `sessions_total` how many there were. A line that is not yours says where it came from, in `also_matched` too: `origin` is `team:<space>` (with `by`, which the author declares and can be forged), plain `team` when the neuron is no longer shared, or `miner`. A row whose best line is past its shelf life since last verified comes back apart, in `possibly_stale`: `warning` and `next_step` first (what to check before answering, naming the file the line cites when it cites one), the line as `last_known`, then `age_days`, `last_verified`, `shelf_life` and `shelf_inferred`; the answer then opens with `stale_warning`. An old `also_matched` preview carries `stale_days` |
268
268
  | `crbro_revise` | Retire facts (and decisions, patterns, errors, debts via `entries`) as superseded or retracted, reactivate them with `status=active`, reconfirm facts, decisions and patterns checked against their source with `status=verified`, edit summary, domain, tags or name, and split a neuron with `move_to` โ€” the entries keep their dates |
@@ -9,6 +9,7 @@ export interface DaemonState {
9
9
  started: string;
10
10
  brain: string;
11
11
  }
12
+ /** The package version, read from disk on each call (the same lookup as view=status), '0.0.0' when unreadable. */
12
13
  export declare function packageVersion(): string;
13
14
  /**
14
15
  * Version plus the build's own timestamp. The version alone would let a
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../src/daemon/endpoint.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,eAAe,IAAI,CAAC;AAIjC,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,cAAc,IAAI,MAAM,CAWvC;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAShC;AAED,wBAAgB,SA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AAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAwB9G;AAED,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAOrF;AAED,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAkB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAOzG;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9F;AAED,8EAA8E;AAC9E,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAY1E;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAErF;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAGvD;AAED,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AASD,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAK9F;AAED,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAQpF"}
@@ -47,23 +47,14 @@ const node_fs_1 = require("node:fs");
47
47
  const node_os_1 = __importDefault(require("node:os"));
48
48
  const node_path_1 = __importDefault(require("node:path"));
49
49
  const shelf_js_1 = require("../engine/shelf.js");
50
+ const version_js_1 = require("../version.js");
50
51
  exports.DAEMON_PROTOCOL = 1;
51
52
  const DAEMON_DIR = '.daemon';
52
53
  const ENABLED_FLAG = 'enabled';
54
+ /** The package version, read from disk on each call (the same lookup as view=status), '0.0.0' when unreadable. */
53
55
  function packageVersion() {
54
- try {
55
- const here = __dirname; // CommonJS output: dist/daemon, or src/daemon under the test runner
56
- for (const up of ['..', node_path_1.default.join('..', '..')]) {
57
- try {
58
- const pkg = JSON.parse((0, node_fs_1.readFileSync)(node_path_1.default.join(here, up, 'package.json'), 'utf8'));
59
- if (pkg?.name === 'crbro-memory' && pkg.version)
60
- return String(pkg.version);
61
- }
62
- catch { /* try the next level */ }
63
- }
64
- }
65
- catch { /* fall through */ }
66
- return '0.0.0';
56
+ const v = (0, version_js_1.readPackageVersion)();
57
+ return v === 'unknown' ? '0.0.0' : v;
67
58
  }
68
59
  /**
69
60
  * Version plus the build's own timestamp. The version alone would let a
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../src/daemon/endpoint.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,uEAAuE;AACvE,4EAA4E;AAC5E,EAAE;AACF,wEAAwE;AACxE,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,yEAAyE;AACzE,oCAAoC;;;;;;AAuBpC,wCAWC;AAQD,0BASC;AAED,8BAEC;AASD,kCAOC;AAGD,sCAGC;AAOD,0CAUC;AAED,8BAEC;AAUD,8CAwBC;AAKD,kCAEC;AAED,kCAKC;AAGD,oCAOC;AAED,oCAEC;AAUD,4CAwBC;AAED,4BAEC;AAED,gCAOC;AAED,8BAOC;AAED,kCAKC;AAGD,gCAYC;AAED,sBAEC;AAED,8BAGC;AAED,4BAEC;AASD,sCAKC;AAED,4CAQC;AAjRD,6CAAmF;AACnF,qCAAiE;AACjE,sDAAyB;AACzB,0DAA6B;AAC7B,iDAAwF;AAE3E,QAAA,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,U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C;IACrC,CAAC;AACH,CAAC"}
@@ -1539,6 +1539,17 @@ class Cortex {
1539
1539
  const backup = await this.quarantine(found);
1540
1540
  let removed = 0;
1541
1541
  const wanted = targets.map(t => t.trim().toLowerCase());
1542
+ // An entry goes when a target names its text or its id: the entryId the
1543
+ // neuron index and recall show, or a decision's own id. Until 2.9.1 only
1544
+ // facts matched by id, so taking a credential out of a preference meant
1545
+ // pasting the credential back into the conversation to name it.
1546
+ const matches = (text, ownId) => {
1547
+ const t = (text || '').trim().toLowerCase();
1548
+ if (!t)
1549
+ return false;
1550
+ return wanted.includes(t) || wanted.includes((0, ops_js_1.entryId)(text).toLowerCase())
1551
+ || (!!ownId && wanted.includes(ownId.toLowerCase()));
1552
+ };
1542
1553
  const after = await (0, fs_js_1.updateJSON)(this.brain.paths.neuron(found.id), current => {
1543
1554
  if (!current)
1544
1555
  return null;
@@ -1555,16 +1566,16 @@ class Cortex {
1555
1566
  });
1556
1567
  // Decisions, patterns and preferences too. A credential is no less
1557
1568
  // exposed for sitting in one of those, and nothing else could remove it.
1558
- current.decisions = current.decisions.filter(d => !wanted.includes((d.text || '').trim().toLowerCase()));
1559
- current.patterns = current.patterns.filter(p => !wanted.includes((p || '').trim().toLowerCase()));
1560
- current.preferences = current.preferences.filter(p => !wanted.includes((p || '').trim().toLowerCase()));
1569
+ current.decisions = current.decisions.filter(d => !matches(d.text, d.id));
1570
+ current.patterns = current.patterns.filter(p => !matches(p));
1571
+ current.preferences = current.preferences.filter(p => !matches(p));
1561
1572
  const erroresAntes = (current.errors || []).length;
1562
1573
  if (current.errors) {
1563
- current.errors = current.errors.filter(e => !wanted.includes((e || '').trim().toLowerCase()));
1574
+ current.errors = current.errors.filter(e => !matches(e));
1564
1575
  }
1565
1576
  const deudasAntes = (current.debts || []).length;
1566
1577
  if (current.debts) {
1567
- current.debts = current.debts.filter(d => !wanted.includes((d || '').trim().toLowerCase()));
1578
+ current.debts = current.debts.filter(d => !matches(d));
1568
1579
  }
1569
1580
  let mapaBorrado = 0;
1570
1581
  if (current.map && wanted.includes(current.map.text.trim().toLowerCase())) {
@@ -1637,22 +1648,22 @@ class Cortex {
1637
1648
  }
1638
1649
  }
1639
1650
  for (const d of found.decisions || []) {
1640
- if (wanted.includes((d.text || '').trim().toLowerCase())) {
1651
+ if (matches(d.text, d.id)) {
1641
1652
  await this.emit(found.id, { kind: 'decision_purge', key: (0, ops_js_1.entryId)(d.text), at: cuando });
1642
1653
  }
1643
1654
  }
1644
1655
  for (const p of found.patterns || []) {
1645
- if (wanted.includes((p || '').trim().toLowerCase())) {
1656
+ if (matches(p)) {
1646
1657
  await this.emit(found.id, { kind: 'pattern_purge', key: (0, ops_js_1.entryId)(p), at: cuando });
1647
1658
  }
1648
1659
  }
1649
1660
  for (const e of found.errors || []) {
1650
- if (wanted.includes((e || '').trim().toLowerCase())) {
1661
+ if (matches(e)) {
1651
1662
  await this.emit(found.id, { kind: 'error_purge', key: (0, ops_js_1.entryId)(e), at: cuando });
1652
1663
  }
1653
1664
  }
1654
1665
  for (const d of found.debts || []) {
1655
- if (wanted.includes((d || '').trim().toLowerCase())) {
1666
+ if (matches(d)) {
1656
1667
  await this.emit(found.id, { kind: 'debt_purge', key: (0, ops_js_1.entryId)(d), at: cuando });
1657
1668
  }
1658
1669
  }