agenr 3.3.0 → 2026.6.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +79 -3
  2. package/README.md +34 -38
  3. package/dist/adapters/skeln/index.d.ts +630 -51
  4. package/dist/adapters/skeln/index.js +881 -4682
  5. package/dist/build-before-turn-artifact-NPUHVWFE.js +71 -0
  6. package/dist/build-recall-artifact-F3LS3PZX.js +62 -0
  7. package/dist/chunk-5AXMFBHR.js +14 -0
  8. package/dist/chunk-5AYIXQRF.js +4452 -0
  9. package/dist/{chunk-Z5X7T4QZ.js → chunk-5TIP2EPP.js} +1519 -2565
  10. package/dist/{chunk-5LADPJ4C.js → chunk-GAERET5Q.js} +138 -504
  11. package/dist/chunk-GF3PX3VM.js +41 -0
  12. package/dist/chunk-GKZQ5AG5.js +44 -0
  13. package/dist/chunk-LDJN7CVU.js +3231 -0
  14. package/dist/{chunk-ZYADFKX3.js → chunk-MC3C2XM5.js} +34 -1
  15. package/dist/chunk-NBS62ES5.js +3012 -0
  16. package/dist/chunk-NSLTJBUC.js +270 -0
  17. package/dist/chunk-OJSIZDZD.js +9 -0
  18. package/dist/chunk-OWGQWQUP.js +45 -0
  19. package/dist/chunk-Q5UTJXHZ.js +1069 -0
  20. package/dist/{chunk-M5M65AYP.js → chunk-SOQW7356.js} +271 -1934
  21. package/dist/chunk-VBPYU7GO.js +597 -0
  22. package/dist/chunk-VTHBPXDQ.js +1750 -0
  23. package/dist/{chunk-KH52KJSJ.js → chunk-XFJ4S4G2.js} +844 -39
  24. package/dist/chunk-Y5NB3FTH.js +106 -0
  25. package/dist/{chunk-RYMSM3OS.js → chunk-ZX55JBV2.js} +1710 -322
  26. package/dist/claim-slot-policy-CdrW_1l4.d.ts +13 -0
  27. package/dist/cli.js +4159 -13768
  28. package/dist/core/recall/index.d.ts +65 -6
  29. package/dist/core/recall/index.js +8 -1
  30. package/dist/internal-eval-server.js +9 -5
  31. package/dist/internal-recall-eval-server.js +9 -5
  32. package/dist/lifecycle-checkpoint-IAC5FCQU.js +154 -0
  33. package/dist/{claim-slot-policy-CQ-h0GaV.d.ts → ports-C4QkwDBS.d.ts} +168 -78
  34. package/dist/scan-6JKPOQHD.js +6 -0
  35. package/dist/service-EKFACEN6.js +15 -0
  36. package/dist/service-RHNB5AEQ.js +861 -0
  37. package/dist/sink-AUAAWC5O.js +8 -0
  38. package/package.json +4 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,82 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2026.6.2] - 2026-06-06
6
+
7
+ Calendar versioning, host session-memory parity, durable staleness, and package-boundary hardening release.
8
+
9
+ ### Added
10
+
11
+ - **OpenClaw host session-memory parity.** OpenClaw now uses scoped session identity, compaction transcript handling, pre-compaction episode capture, host-neutral session-memory routing, and before-turn session artifacts that align with the Skeln memory-runtime model.
12
+ - **Memory doctrine and tool guidance.** Shared prompt doctrine, claim-key guidance, project metadata update support, and fetch/update/store tool formatting now give agents clearer instructions and warnings at the tool boundary.
13
+ - **Release-version validation and package syncing.** Calendar release-version parsing plus the package-version sync script keep root package metadata, plugin package metadata, and OpenClaw plugin manifests aligned.
14
+
15
+ ### Changed
16
+
17
+ - **Release versioning** now follows OpenClaw's `YYYY.M.PATCH` calendar scheme instead of semver. The third component is a monthly patch counter, not a calendar day.
18
+ - **OpenClaw plugin packaging** now ships as a thinner adapter package and defers optional runtime modules while copying shared root build artifacts needed by dynamic imports into plugin packages.
19
+ - **`agenr_update` patch handling** is more focused and docs now distinguish project metadata corrections from durable content corrections.
20
+ - **Database ports** expose `closeDurableValidity` and `closeProcedureValidity` instead of `retireDurable` and `retireProcedure`.
21
+ - **Docs and tests** updated for the staleness model across durables, episodes, procedures, dreaming, and the OpenClaw plugin.
22
+
23
+ ### Breaking
24
+
25
+ - **Greenfield database only.** Schema versioning and in-place migrations are removed. Startup rejects legacy tables and columns such as `entries`, `retired`, `minhash_sig`, `cluster_id`, `durables_retired`, and `recall_delta`, and rejects partially initialized databases that are missing required tables. Run `agenr db reset` before upgrading.
26
+ - **Removed unused columns.** `durables.minhash_sig`, `durables.cluster_id`, and `dream_run_actions.recall_delta` are dropped from the schema.
27
+ - **Keyed durables require lifecycle status.** Rows with a `claim_key` must also store a valid `claim_key_status`; NULL lifecycle status is no longer treated as legacy at read time.
28
+ - **Retirement flags removed; staleness uses `valid_to`.** `durables`, `episodes`, and `procedures` no longer store `retired`, `retired_at`, or `retired_reason`. Close validity with `valid_to` plus optional `supersession_kind: "stale"` and `supersession_reason` instead.
29
+ - **`agenr_retire` removed.** Use `agenr_update` with `validTo` to close durable validity from OpenClaw hosts.
30
+ - **`agenr_trace` removed from OpenClaw.** Use `agenr trace` for provenance, lineage, and recall-history inspection.
31
+ - **Dreaming prune actions renamed.** Run summaries and `dream_runs.durables_staled` replace `durables_retired`; audit actions use `stale` instead of `retire`.
32
+ - **Neighborhood expansion flag renamed.** Recall adapters accept `includeHistorical` instead of `includeRetired`.
33
+
34
+ ### Fixed
35
+
36
+ - **Plugin dynamic imports** now resolve shared root dist artifacts from packaged OpenClaw and Skeln plugin builds.
37
+ - **Validation cleanup** clears ESLint warnings so `pnpm check` runs green.
38
+
39
+ ### Validation
40
+
41
+ Changes since last push to `origin/master`:
42
+
43
+ - Replace OpenClaw continuity with host session-memory parity, scoped session identity, compaction handling, and shared session-start artifacts
44
+ - Add centralized memory doctrine, stronger claim-key guidance, and project metadata update support
45
+ - Switch releases to OpenClaw-style calendar versions and add package-version sync checks
46
+ - Thin OpenClaw plugin packaging while preserving runtime dynamic-import resolution for plugin packages
47
+ - Replace retirement semantics with valid-time staleness across durable, episode, procedure, dreaming, and recall paths
48
+ - Add dreaming milestone work, compute-efficiency eval seams, directive topic triggers, and concurrency hardening already summarized in the `4.0.0` section below
49
+ - Clear validation issues so `pnpm check` passes before release
50
+
51
+ ## [4.0.0] - 2026-06-05
52
+
53
+ ### Breaking
54
+
55
+ - **Greenfield schema with `durables` and dreaming tables.** The `entries` table and all `surgeon_*` tables are gone. This build only supports schema version `4` on a fresh database. Delete existing knowledge databases and re-run `agenr init` or `agenr db reset` before upgrading.
56
+ - **`entries` renamed to `durables` across types, SQL, ingest, recall, and scenarios.** There are no compatibility aliases. Extraction JSON now uses a top-level `durables` array.
57
+ - **Surgeon removed; dreaming replaces it.** `agenr surgeon ...` commands, `surgeon` config, and surgeon docs are deleted. Use `agenr dream run|status|history` and the `dreaming` config section instead.
58
+
59
+ ### Added
60
+
61
+ - **Dreaming Milestone 1 skeleton.** Scan, deterministic reconcile, and apply stages with `dream_runs`, `dream_run_actions`, `dream_proposals`, `dream_state`, and `profile_snapshots` persistence.
62
+ - **Dreaming Milestone 2 injection hardening.** Bi-temporal as-of valid-time filtering shared by session-start, before-turn, and default recall, plus injection-filtering and directive-abstention scenario fixtures and regression tests that prove expired or not-yet-valid durables never auto-inject.
63
+ - **Dreaming Milestone 3 extract and temporalize stages.** The `extract` stage mines durable candidates from episode evidence with content-hash and context-lookup deduplication; the `temporalize` stage revises stale beliefs through supersession (insert successor, close the predecessor valid-time window, link `superseded_by`) without rewriting content in place.
64
+ - **Dreaming proposal review surface.** New `agenr dream actions`, `agenr dream proposals`, `agenr dream backlog`, and `agenr dream review` commands, with backed-up transactional proposal apply.
65
+ - **Session-end episode boundaries.** OpenClaw now writes the current session's episode from its `session_end` hook so dreaming has fresh evidence before the next session starts; the write is best-effort and idempotent by session id. Skeln's shutdown chain writes through the same bounded episode contract.
66
+ - **Dreaming pipeline scenario fixtures.** New fixtures under `tests/scenarios/dreaming/pipeline/` cover implicit-preference capture, trip-lifecycle revision, point-in-time recall, and the no-overconsolidation guard.
67
+ - **Dreaming Milestone 5 release path.** The `prune` stage now closes validity on protected low-signal durables on `standard` and `deep` runs, background `light` runs fire after host session-end episode writes, successful `agenr_store` calls can trigger `light` runs when accumulated durable importance crosses the configured threshold, and completion summaries include compute-efficiency counters for the eval scoreboard.
68
+ - **Dreaming ops hardening (WS6).** A process-wide dreaming lease prevents overlapping CLI, background, store-triggered runs, and host episode writes; the lock heartbeat reclaims rows orphaned by a crashed process after a stale timeout without stealing active long-running runs; episode writes serialize through the same lock before post-session light dreaming; background apply runs record `backupSkipped` in completion summaries; `agenr dream status` warns when recent applied `light` runs skipped backup; and `procedures/agenr-dream-deep-maintenance.yaml` documents weekly deep maintenance.
69
+ - **Dreaming compute-efficiency suite (WS3).** `recomputeRatio` is now `synthesizedDurableMutations / evidenceItemsRead`; a new `POST /internal/evals/dreaming-efficiency/run` seam provisions pre-baked completion summaries and derives efficiency from persisted scan/project/stage counters (Option A); `agenr-evals` ships `manifests/dreaming/compute-efficiency.json` with three regression cases via the `agenr-dreaming-efficiency-http` adapter.
70
+ - **Directive topic triggers (WS4).** Proactive `topic:<term>` directives now surface during before-turn when the current user turn mentions the topic; abstain directives still run last and suppress conflicting topic directives. Session-start behavior for `topic:` triggers is unchanged in v1.
71
+ - **Docs:** `docs/DURABLES.md`, `docs/DREAMING.md`. `docs/STORE.md` and `docs/SURGEON.md` removed.
72
+
73
+ ### Changed
74
+
75
+ - **Claim-key scenario harness** now supports `dreaming` scenarios instead of `surgeon` scenarios.
76
+ - **Dreaming `deep` tier** now reads the full evidence backlog instead of only the incremental cursor.
77
+ - **Dreaming config parsing** now accepts and persists non-default `tiers`, `stages.extract`, `stages.project`, and `triggers` settings.
78
+ - **Dreaming `light` tier semantics.** Background `light` runs now skip reconcile and prune while keeping temporalize and project, and run summaries record those skips in `stages_skipped`. Light extract defaults to at most two episode sessions per run (`stages.extract.lightMaxSessionsPerRun`).
79
+ - **AGENTS.md, ARCHITECTURE.md, README.md, DEBUGGING.md, and VS Code launch configs** updated for the durable/dreaming nomenclature.
80
+
5
81
  ## [3.3.0] - 2026-06-02
6
82
 
7
83
  Feature flag defaults, Skeln install policy, and OpenClaw package cleanup release.
@@ -316,7 +392,7 @@ Ingest concurrency and progress reporting patch release.
316
392
 
317
393
  - **Dedup now honors bounded concurrency.** Multi-entry similarity clusters are now arbitrated in parallel with deterministic result ordering, and ingest paths explicitly thread configured/default concurrency into dedup instead of leaving arbitration serial.
318
394
  - **Claim extraction now uses real batch concurrency without violating ordered semantics.** Batch claim-key extraction now honors configured concurrency, preserves past-only hint visibility via per-entry frozen hint snapshots, and propagates sensible defaults through the relevant ingest/store paths instead of falling back to historical hardcoded single-worker behavior.
319
- - **Ingest spinner now reports real post-extraction stages.** Non-verbose `agenr ingest entries` runs now surface dedup, claim-key extraction, store pipeline, and bulk-write index preparation/finalization stages instead of looking stuck after `(N/N extracted)`.
395
+ - **Ingest spinner now reports real post-extraction stages.** Non-verbose `agenr ingest durables` runs now surface dedup, claim-key extraction, store pipeline, and bulk-write index preparation/finalization stages instead of looking stuck after `(N/N extracted)`.
320
396
 
321
397
  ### Validation
322
398
 
@@ -523,7 +599,7 @@ The surgeon retirement pass — an autonomous agent that evaluates and retires s
523
599
  ### Added
524
600
 
525
601
  - **Surgeon retirement pass.** A standalone agent loop powered by `@mariozechner/pi-agent-core` that evaluates knowledge entries and retires semantically stale ones. Runs as `agenr surgeon run` with full dry-run and apply modes, budget governance, and completion guards.
526
- - **7 surgeon tools.** `get_health_stats`, `query_candidates`, `inspect_entry`, `simulate_recall`, `retire_entry`, `update_entry`, and `complete_pass` — each adapted from the v0 surgeon for v1's simpler schema.
602
+ - **7 surgeon tools.** `get_health_stats`, `query_candidates`, `inspect_durable`, `simulate_recall`, `retire_durable`, `update_durable`, and `complete_pass` — each adapted from the v0 surgeon for v1's simpler schema.
527
603
  - **Recall simulation without telemetry.** The `simulate_recall` tool wraps the v1 recall pipeline with a no-op telemetry adapter and optional target-entry exclusion, so the surgeon can test retrieval impact without polluting recall metrics.
528
604
  - **Surgeon CLI commands.** `agenr surgeon run`, `agenr surgeon status`, `agenr surgeon history`, and `agenr surgeon actions <run-id>` for running, inspecting, and auditing surgeon passes.
529
605
  - **Surgeon status shows evaluation coverage.** `agenr surgeon status` now displays recently evaluated vs new candidates, so you can see how much work remains before running.
@@ -535,7 +611,7 @@ The surgeon retirement pass — an autonomous agent that evaluates and retires s
535
611
 
536
612
  ### Changed
537
613
 
538
- - **Schema version bumped to 2.** The `surgeon_runs` table is expanded with pass type, status, token/cost tracking, model, dry-run flag, and structured summary fields. A new `surgeon_run_actions` table logs individual surgeon actions with indexed `entry_id` for efficient recently-evaluated queries. Existing databases are migrated automatically via `ALTER TABLE ADD COLUMN`.
614
+ - **Schema version bumped to 2.** The `surgeon_runs` table is expanded with pass type, status, token/cost tracking, model, dry-run flag, and structured summary fields. A new `surgeon_run_actions` table logs individual surgeon actions with indexed `durable_id` for efficient recently-evaluated queries. Existing databases are migrated automatically via `ALTER TABLE ADD COLUMN`.
539
615
  - **Protection threshold raised to importance ≥ 9.** Entries with importance 8 are now eligible for surgeon evaluation since many entries default to importance 8 during ingestion.
540
616
  - **Setup prompt updated.** The advanced model override prompt now reads "Customize task-specific models?" to reflect the addition of surgeon alongside extraction and dedup overrides.
541
617
 
package/README.md CHANGED
@@ -27,9 +27,9 @@ What makes agenr different is the combination of local-first storage, semantic e
27
27
  - Procedural memory: repo-authored YAML procedures synced into durable structured runbooks for repeatable how-to workflows.
28
28
  - LLM-powered knowledge extraction from conversation transcripts.
29
29
  - Semantic deduplication using exact hashes, normalized hashes, embeddings, and within-run clustering.
30
- - Session continuity with predecessor resolution, recent transcript tails, and LLM-generated continuity summaries.
31
- - Surgeon maintenance passes for corpus health: claim-key quality, proposal resolution, supersession review, and retirement cleanup, all with audit history.
32
- - Agent tools for durable memory through the OpenClaw plugin (`store`, `recall`, `retire`, `update`, and `trace`) and the Skeln plugin (`store`, `recall`, `update`, `work`, and goal aliases).
30
+ - Session-end episode ingest for the just-finished OpenClaw session.
31
+ - Dreaming maintenance pipeline for corpus health: tiered scan, deterministic reconcile, and apply with audit history.
32
+ - Agent tools for durable memory through the OpenClaw plugin (`store`, `recall`, `fetch`, `update`, and `trace`) and the Skeln plugin (`store`, `recall`, `update`, `work`, and goal aliases).
33
33
  - Native OpenClaw memory plugin that replaces OpenClaw's built-in memory slot.
34
34
  - Skeln extension with working-memory tools, goal aliases, and shared recall/store semantics.
35
35
  - Local-first storage with SQLite/libSQL. Memory stays on your machine; only model and embedding calls leave it.
@@ -70,7 +70,7 @@ The OpenClaw plugin id remains `agenr`, so `plugins.entries.agenr`, `plugins.slo
70
70
  After the plugin is installed, `openclaw plugins update agenr` continues to target that same plugin id.
71
71
  If `plugins.entries.agenr.config` is omitted, the plugin falls back to agenr's normal config resolution: `AGENR_CONFIG_PATH`, then `~/.agenr/config.json`, and the `dbPath` from that config or `~/.agenr/knowledge.db`.
72
72
 
73
- If you want to pin an exact plugin release, install a versioned package spec such as `openclaw plugins install @agenr/openclaw-plugin@3.0.0`.
73
+ If you want to pin an exact plugin release, install a versioned package spec such as `openclaw plugins install @agenr/openclaw-plugin@2026.6.1`.
74
74
 
75
75
  For local development or a custom build path, run `pnpm build` first and point OpenClaw at the plugin package root:
76
76
 
@@ -140,7 +140,7 @@ Important: when agenr is running as an OpenClaw plugin, session summaries and st
140
140
  Compatibility policy:
141
141
 
142
142
  - Agenr only supports the current `config.json` shape. Move any legacy `apiKey` value into `credentials.openaiApiKey` or `credentials.anthropicApiKey`, move any `embeddingApiKey` value into `credentials.openaiApiKey`, then remove the legacy fields.
143
- - Agenr only supports fresh databases and databases already at the current schema version. Older schema versions are no longer auto-migrated at startup.
143
+ - Agenr only supports fresh databases created by the current schema. Run `agenr db reset` before upgrading when the knowledge database predates the current shape.
144
144
 
145
145
  ## What You Need
146
146
 
@@ -152,30 +152,26 @@ Compatibility policy:
152
152
 
153
153
  The CLI surface is still intentionally compact, but it now covers setup, recall, ingest, and corpus maintenance.
154
154
 
155
- | Command | What it does |
156
- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
157
- | `agenr init` | Interactive first-run wizard: auth, model selection, OpenClaw detection, plugin install, and optional initial ingestion. |
158
- | `agenr setup` | Configure auth, model defaults, embeddings, and the agenr database path. |
159
- | `agenr recall <query>` | Run the hybrid recall pipeline with optional temporal and type/tag filters. |
160
- | `agenr trace` | Inspect one entry's provenance and claim-family lineage by id, subject, or `--last`. |
161
- | `agenr ingest <path>` | Default durable-entry ingest shorthand. Equivalent to `agenr ingest entries <path>`. |
162
- | `agenr ingest entries <path>` | Bulk-ingest one file or directory of OpenClaw transcript files into durable knowledge entries. |
163
- | `agenr ingest episodes [path]` | Backfill episodic summaries from OpenClaw session transcripts, including rotated `.reset.*` and `.deleted.*` files. |
164
- | `agenr ingest procedures [path]` | Sync repo-authored YAML procedures into procedural-memory revisions stored in the knowledge database. |
165
- | `agenr surgeon run` | Execute surgeon maintenance. Defaults to the autonomous multi-pass sequence; use `--pass <type>` for one pass. Dry-run by default; add `--apply` to mutate the corpus. |
166
- | `agenr surgeon status` | Show corpus health, claim-key lifecycle counts, proposal backlog, and the latest surgeon run summary. |
167
- | `agenr surgeon history` | Show recent surgeon runs. |
168
- | `agenr surgeon actions <runId>` | Show the audit trail for one surgeon run. |
169
- | `agenr surgeon backlog` | List open surgeon proposals across runs. |
170
- | `agenr surgeon proposals <runId>` | Show proposals recorded for one surgeon run. |
171
- | `agenr surgeon review <proposalId>` | Apply or reject one open proposal. |
172
- | `agenr scenarios list` | List repo-local claim-key sandbox scenarios. |
173
- | `agenr scenarios run` | Run one or more claim-key sandbox scenarios. |
174
- | `agenr db reset` | Delete and recreate the knowledge database. |
175
-
176
- The OpenClaw plugin also gives the agent five tools directly inside the runtime: `agenr_store`, `agenr_recall`, `agenr_retire`, `agenr_update`, and `agenr_trace`.
177
-
178
- The Skeln plugin exposes seven tools: `agenr_store`, `agenr_recall`, `agenr_update`, `agenr_work`, `get_goal`, `create_goal`, and `update_goal`. It does not expose `agenr_retire` or `agenr_trace`.
155
+ | Command | What it does |
156
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
157
+ | `agenr init` | Interactive first-run wizard: auth, model selection, OpenClaw detection, plugin install, and optional initial ingestion. |
158
+ | `agenr setup` | Configure auth, model defaults, embeddings, and the agenr database path. |
159
+ | `agenr recall <query>` | Run the hybrid recall pipeline with optional temporal and type/tag filters. |
160
+ | `agenr trace` | Inspect one entry's provenance and claim-family lineage by id, subject, or `--last`. |
161
+ | `agenr ingest <path>` | Default durable-entry ingest shorthand. Equivalent to `agenr ingest durables <path>`. |
162
+ | `agenr ingest durables <path>` | Bulk-ingest one file or directory of OpenClaw transcript files into durable knowledge entries. |
163
+ | `agenr ingest episodes [path]` | Backfill episodic summaries from OpenClaw session transcripts, including rotated `.reset.*` and `.deleted.*` files. |
164
+ | `agenr ingest procedures [path]` | Sync repo-authored YAML procedures into procedural-memory revisions stored in the knowledge database. |
165
+ | `agenr dream run` | Execute a dreaming maintenance run. Dry-run by default; add `--apply` to mutate the corpus. Use `--tier light`, `standard`, or `deep`. |
166
+ | `agenr dream status` | Show corpus health, claim-key lifecycle counts, and the latest dreaming run summary. |
167
+ | `agenr dream history` | Show recent dreaming runs. |
168
+ | `agenr scenarios list` | List repo-local claim-key sandbox scenarios. |
169
+ | `agenr scenarios run` | Run one or more claim-key sandbox scenarios. |
170
+ | `agenr db reset` | Delete and recreate the knowledge database. |
171
+
172
+ The OpenClaw plugin gives the agent four tools directly inside the runtime: `agenr_store`, `agenr_recall`, `agenr_fetch`, and `agenr_update`.
173
+
174
+ The Skeln plugin exposes eight tools: `agenr_store`, `agenr_recall`, `agenr_fetch`, `agenr_update`, `agenr_work`, `get_goal`, `create_goal`, and `update_goal`. Neither host exposes a runtime trace tool; use `agenr trace` for provenance inspection.
179
175
 
180
176
  Examples:
181
177
 
@@ -192,11 +188,11 @@ agenr ingest episodes ~/.openclaw/agents/main/sessions/ --recent 30d
192
188
  # Preview procedure sync changes
193
189
  agenr ingest procedures --dry-run
194
190
 
195
- # Run the default autonomous surgeon sequence (dry-run by default)
196
- agenr surgeon run --budget 2.00
191
+ # Run a standard-tier dreaming pass (dry-run by default)
192
+ agenr dream run --tier standard
197
193
 
198
- # Run one explicit surgeon pass
199
- agenr surgeon run --pass supersession --budget 2.00
194
+ # Apply dreaming mutations explicitly
195
+ agenr dream run --tier standard --apply
200
196
 
201
197
  # Inspect the latest stored entry
202
198
  agenr trace --last
@@ -221,23 +217,23 @@ Recall is a hybrid pipeline. Agenr embeds the query, retrieves candidates throug
221
217
 
222
218
  Agenr has two transcript-ingest pipelines plus one repo-authored procedure sync path:
223
219
 
224
- - `agenr ingest entries <path>` extracts durable typed knowledge such as facts, decisions, preferences, lessons, milestones, and relationships.
220
+ - `agenr ingest durables <path>` extracts durable typed knowledge such as facts, decisions, preferences, lessons, milestones, and relationships.
225
221
  - `agenr ingest episodes [path]` generates one narrative summary per session so the brain can answer temporal questions like "what happened last week?"
226
222
  - `agenr ingest procedures [path]` validates and syncs repo-authored procedural workflows from `procedures/` into the database.
227
223
 
228
- The two transcript paths parse OpenClaw transcripts first, but they optimize for different outputs: entry ingest distills durable knowledge and runs semantic dedup across the whole ingest batch, while episode ingest does a session-by-session preflight pass, uses `sessions.json` metadata when available, reconstructs missing surface metadata for rotated files, and writes episodic summaries. Procedure sync is different: it reads strict YAML authoring files, normalizes them into canonical stored revisions, and writes only when a procedure is new or semantically changed. Details: [docs/INGEST.md](./docs/INGEST.md), [docs/STORE.md](./docs/STORE.md), and [docs/PROCEDURES.md](./docs/PROCEDURES.md).
224
+ The two transcript paths parse OpenClaw transcripts first, but they optimize for different outputs: durable ingest distills long-term knowledge and runs semantic dedup across the whole ingest batch, while episode ingest does a session-by-session preflight pass, uses `sessions.json` metadata when available, reconstructs missing surface metadata for rotated files, and writes episodic summaries. Procedure sync is different: it reads strict YAML authoring files, normalizes them into canonical stored revisions, and writes only when a procedure is new or semantically changed. Details: [docs/INGEST.md](./docs/INGEST.md), [docs/DURABLES.md](./docs/DURABLES.md), and [docs/PROCEDURES.md](./docs/PROCEDURES.md).
229
225
 
230
226
  ## How Procedures Work
231
227
 
232
- Procedures are the durable how-to layer. They are authored in `procedures/` as reviewed YAML, normalized into canonical stored procedure revisions, and synced with `agenr ingest procedures [path]`. Procedure recall is live through unified host-plugin `agenr_recall` and before-turn suggestion, but the standalone CLI `agenr recall` command still targets entry recall only. For the current model, storage shape, sync semantics, and read surfaces, see [docs/PROCEDURES.md](./docs/PROCEDURES.md).
228
+ Procedures are the durable how-to layer. They are authored in `procedures/` as reviewed YAML, normalized into canonical stored procedure revisions, and synced with `agenr ingest procedures [path]`. Procedure recall is live through unified host-plugin `agenr_recall` and before-turn suggestion, but the standalone CLI `agenr recall` command still targets durable recall only. For the current model, storage shape, sync semantics, and read surfaces, see [docs/PROCEDURES.md](./docs/PROCEDURES.md).
233
229
 
234
230
  ## How Episodes Work
235
231
 
236
232
  Episodes are session-level memory artifacts stored separately from durable entries. They preserve temporal narrative: what happened in a session, when it happened, which agent/session it belonged to, and optionally an embedding for semantic episode search. Recall can route narrative or time-bounded questions toward episodes automatically, or combine episode and entry results in mixed mode. For implementation details and the episode recall model, see [docs/EPISODES.md](./docs/EPISODES.md).
237
233
 
238
- ## How the Surgeon Works
234
+ ## How Dreaming Works
239
235
 
240
- The surgeon is a maintenance system for the durable-memory corpus. Four passes are implemented today: `claim_key_quality`, `proposal_resolution`, `supersession`, and `retirement`. `agenr surgeon run` defaults to an autonomous sequence across those passes and is safe by default because it starts in dry-run mode; `--pass <type>` runs one pass, and `--apply` is the explicit mutation switch. For runtime details, governance, and audit behavior, see [docs/SURGEON.md](./docs/SURGEON.md).
236
+ Dreaming is the maintenance system for the durable-memory corpus. Milestone 1 ships a pipeline skeleton with `scan`, deterministic `reconcile`, and `apply`. `agenr dream run` is dry-run by default; `--apply` is the explicit mutation switch, and `--tier` selects `light`, `standard`, or `deep` coverage. For runtime details, governance, and the stage roadmap, see [docs/DREAMING.md](./docs/DREAMING.md).
241
237
 
242
238
  ## Development
243
239