agenr 3.2.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 (39) hide show
  1. package/CHANGELOG.md +104 -3
  2. package/README.md +40 -42
  3. package/dist/adapters/skeln/index.d.ts +629 -51
  4. package/dist/adapters/skeln/index.js +782 -2039
  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-5AYIXQRF.js +4452 -0
  8. package/dist/{chunk-FMQTRTWE.js → chunk-5TIP2EPP.js} +1453 -2563
  9. package/dist/{chunk-5LADPJ4C.js → chunk-GAERET5Q.js} +138 -504
  10. package/dist/chunk-GF3PX3VM.js +41 -0
  11. package/dist/chunk-GKZQ5AG5.js +44 -0
  12. package/dist/chunk-LDJN7CVU.js +3231 -0
  13. package/dist/{chunk-ZYADFKX3.js → chunk-MC3C2XM5.js} +34 -1
  14. package/dist/{chunk-KL6X2E3I.js → chunk-NBS62ES5.js} +1168 -816
  15. package/dist/chunk-NSLTJBUC.js +270 -0
  16. package/dist/chunk-OJSIZDZD.js +9 -0
  17. package/dist/chunk-OWGQWQUP.js +45 -0
  18. package/dist/{chunk-ZAX3YSTU.js → chunk-Q5UTJXHZ.js} +2 -140
  19. package/dist/{chunk-TMDNFBBC.js → chunk-SOQW7356.js} +271 -1935
  20. package/dist/chunk-VBPYU7GO.js +597 -0
  21. package/dist/chunk-VTHBPXDQ.js +1750 -0
  22. package/dist/{chunk-UEGURBBW.js → chunk-XFJ4S4G2.js} +844 -39
  23. package/dist/chunk-Y5NB3FTH.js +106 -0
  24. package/dist/{chunk-6HY5F5FE.js → chunk-ZX55JBV2.js} +1704 -314
  25. package/dist/cli.js +1125 -9537
  26. package/dist/core/recall/index.d.ts +64 -6
  27. package/dist/core/recall/index.js +8 -1
  28. package/dist/internal-eval-server.js +9 -6
  29. package/dist/internal-recall-eval-server.js +9 -6
  30. package/dist/lifecycle-checkpoint-IAC5FCQU.js +154 -0
  31. package/dist/{ports-CpzWESmZ.d.ts → ports-C4QkwDBS.d.ts} +114 -69
  32. package/dist/scan-6JKPOQHD.js +6 -0
  33. package/dist/service-EKFACEN6.js +15 -0
  34. package/dist/service-RHNB5AEQ.js +861 -0
  35. package/dist/sink-AUAAWC5O.js +8 -0
  36. package/package.json +7 -4
  37. package/dist/adapters/openclaw/index.d.ts +0 -32
  38. package/dist/adapters/openclaw/index.js +0 -3112
  39. /package/dist/{chunk-GELCEVFA.js → chunk-5AXMFBHR.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,107 @@
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
+
81
+ ## [3.3.0] - 2026-06-02
82
+
83
+ Feature flag defaults, Skeln install policy, and OpenClaw package cleanup release.
84
+
85
+ ### Added
86
+
87
+ - **Init now records every known feature flag as enabled.** First-run `agenr init` writes the full current feature surface into `config.json`, making staged working-memory, session-tree, and goal-continuation flags explicit.
88
+ - **Fresh Skeln installs now carry a memory-policy default.** The Skeln plugin manifest seeds a conservative `memoryPolicy` that keeps session-start and before-turn injection off while leaving working context available.
89
+
90
+ ### Changed
91
+
92
+ - **The OpenClaw plugin package now publishes as `@agenr/openclaw-plugin`.** Install docs, build filters, smoke tests, and package metadata were aligned with the new scoped package name.
93
+ - **OpenClaw runtime dependencies now stay with the plugin package.** The root `agenr` package no longer carries OpenClaw as a runtime dependency, while plugin builds and package smoke tests still cover the OpenClaw integration.
94
+ - **Repository release metadata is slimmer.** GitHub Actions CI and the synced release procedure were removed in favor of the local release workflow.
95
+
96
+ ### Validation
97
+
98
+ Changes since last push to `origin/master`:
99
+
100
+ - Remove OpenClaw from root runtime dependencies and keep plugin build coverage intact
101
+ - Rename the OpenClaw plugin package to `@agenr/openclaw-plugin` across install docs, build filters, smoke tests, and package metadata
102
+ - Drop GitHub Actions CI and the synced release procedure from the repository
103
+ - Add canonical feature flag keys and have first-run init write every current feature flag as enabled
104
+ - Add a Skeln plugin `memoryPolicy` install default with setup, manifest, and regression coverage
105
+
5
106
  ## [3.2.0] - 2026-06-02
6
107
 
7
108
  Cross-platform packaging, CI smoke coverage, and path handling hardening release.
@@ -291,7 +392,7 @@ Ingest concurrency and progress reporting patch release.
291
392
 
292
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.
293
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.
294
- - **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)`.
295
396
 
296
397
  ### Validation
297
398
 
@@ -498,7 +599,7 @@ The surgeon retirement pass — an autonomous agent that evaluates and retires s
498
599
  ### Added
499
600
 
500
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.
501
- - **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.
502
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.
503
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.
504
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.
@@ -510,7 +611,7 @@ The surgeon retirement pass — an autonomous agent that evaluates and retires s
510
611
 
511
612
  ### Changed
512
613
 
513
- - **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`.
514
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.
515
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.
516
617
 
package/README.md CHANGED
@@ -18,7 +18,7 @@ agenr gives agents a persistent brain: a local SQLite database of durable knowle
18
18
 
19
19
  It exists because most agent runtimes forget everything important between sessions. Even when a tool has a built-in memory feature, it is often lossy, file-based, or tightly coupled to one surface. agenr keeps memory structured and queryable: facts, decisions, preferences, lessons, milestones, relationships, and session-level episodes live in one local store instead of getting flattened into prompt text.
20
20
 
21
- What makes agenr different is the combination of local-first storage, semantic embeddings, hybrid recall, episodic temporal memory, and adapter-friendly architecture. The core is hexagonal, so multiple agent systems can share the same brain over time. Today the production host adapters are the OpenClaw memory plugin (`@agenr/agenr-plugin`) and the Skeln extension (`@agenr/skeln-plugin`). The CLI provides offline ingest, recall, and maintenance against that same database.
21
+ What makes agenr different is the combination of local-first storage, semantic embeddings, hybrid recall, episodic temporal memory, and adapter-friendly architecture. The core is hexagonal, so multiple agent systems can share the same brain over time. Today the production host adapters are the OpenClaw memory plugin (`@agenr/openclaw-plugin`) and the Skeln extension (`@agenr/skeln-plugin`). The CLI provides offline ingest, recall, and maintenance against that same database.
22
22
 
23
23
  ## Features
24
24
 
@@ -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.
@@ -59,16 +59,18 @@ Run `agenr init` again any time you want to re-run onboarding, reinstall the plu
59
59
  If you already have agenr configured, or you want to install the plugin separately:
60
60
 
61
61
  ```bash
62
- openclaw plugins install @agenr/agenr-plugin
62
+ openclaw plugins install @agenr/openclaw-plugin
63
63
  openclaw gateway restart
64
64
  ```
65
65
 
66
+ The main `agenr` CLI package does not depend on the OpenClaw SDK at runtime. OpenClaw installs should use the plugin package above.
67
+
66
68
  `agenr init` normally does this for you, updates `openclaw.json`, and offers an initial ingest pass over existing sessions.
67
69
  The OpenClaw plugin id remains `agenr`, so `plugins.entries.agenr`, `plugins.slots.memory`, and existing plugin config keys do not change.
68
70
  After the plugin is installed, `openclaw plugins update agenr` continues to target that same plugin id.
69
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`.
70
72
 
71
- If you want to pin an exact plugin release, install a versioned package spec such as `openclaw plugins install @agenr/agenr-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`.
72
74
 
73
75
  For local development or a custom build path, run `pnpm build` first and point OpenClaw at the plugin package root:
74
76
 
@@ -94,7 +96,7 @@ If `config.json` is not next to `dbPath`, add `"configPath": "/path/to/config.js
94
96
 
95
97
  Migration note:
96
98
 
97
- - Existing users who originally installed the plugin from the `agenr` package should reinstall once with `openclaw plugins install @agenr/agenr-plugin` so OpenClaw records the new npm package source.
99
+ - Existing users who originally installed the plugin from the `agenr` package should reinstall once with `openclaw plugins install @agenr/openclaw-plugin` so OpenClaw records the new npm package source.
98
100
  - After that reinstall, `openclaw plugins update agenr` should continue to work because updates key off the plugin id `agenr`.
99
101
 
100
102
  ## Quick Start - Skeln Plugin (manual)
@@ -138,7 +140,7 @@ Important: when agenr is running as an OpenClaw plugin, session summaries and st
138
140
  Compatibility policy:
139
141
 
140
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.
141
- - 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.
142
144
 
143
145
  ## What You Need
144
146
 
@@ -150,30 +152,26 @@ Compatibility policy:
150
152
 
151
153
  The CLI surface is still intentionally compact, but it now covers setup, recall, ingest, and corpus maintenance.
152
154
 
153
- | Command | What it does |
154
- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
155
- | `agenr init` | Interactive first-run wizard: auth, model selection, OpenClaw detection, plugin install, and optional initial ingestion. |
156
- | `agenr setup` | Configure auth, model defaults, embeddings, and the agenr database path. |
157
- | `agenr recall <query>` | Run the hybrid recall pipeline with optional temporal and type/tag filters. |
158
- | `agenr trace` | Inspect one entry's provenance and claim-family lineage by id, subject, or `--last`. |
159
- | `agenr ingest <path>` | Default durable-entry ingest shorthand. Equivalent to `agenr ingest entries <path>`. |
160
- | `agenr ingest entries <path>` | Bulk-ingest one file or directory of OpenClaw transcript files into durable knowledge entries. |
161
- | `agenr ingest episodes [path]` | Backfill episodic summaries from OpenClaw session transcripts, including rotated `.reset.*` and `.deleted.*` files. |
162
- | `agenr ingest procedures [path]` | Sync repo-authored YAML procedures into procedural-memory revisions stored in the knowledge database. |
163
- | `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. |
164
- | `agenr surgeon status` | Show corpus health, claim-key lifecycle counts, proposal backlog, and the latest surgeon run summary. |
165
- | `agenr surgeon history` | Show recent surgeon runs. |
166
- | `agenr surgeon actions <runId>` | Show the audit trail for one surgeon run. |
167
- | `agenr surgeon backlog` | List open surgeon proposals across runs. |
168
- | `agenr surgeon proposals <runId>` | Show proposals recorded for one surgeon run. |
169
- | `agenr surgeon review <proposalId>` | Apply or reject one open proposal. |
170
- | `agenr scenarios list` | List repo-local claim-key sandbox scenarios. |
171
- | `agenr scenarios run` | Run one or more claim-key sandbox scenarios. |
172
- | `agenr db reset` | Delete and recreate the knowledge database. |
173
-
174
- The OpenClaw plugin also gives the agent five tools directly inside the runtime: `agenr_store`, `agenr_recall`, `agenr_retire`, `agenr_update`, and `agenr_trace`.
175
-
176
- 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.
177
175
 
178
176
  Examples:
179
177
 
@@ -190,11 +188,11 @@ agenr ingest episodes ~/.openclaw/agents/main/sessions/ --recent 30d
190
188
  # Preview procedure sync changes
191
189
  agenr ingest procedures --dry-run
192
190
 
193
- # Run the default autonomous surgeon sequence (dry-run by default)
194
- agenr surgeon run --budget 2.00
191
+ # Run a standard-tier dreaming pass (dry-run by default)
192
+ agenr dream run --tier standard
195
193
 
196
- # Run one explicit surgeon pass
197
- agenr surgeon run --pass supersession --budget 2.00
194
+ # Apply dreaming mutations explicitly
195
+ agenr dream run --tier standard --apply
198
196
 
199
197
  # Inspect the latest stored entry
200
198
  agenr trace --last
@@ -219,23 +217,23 @@ Recall is a hybrid pipeline. Agenr embeds the query, retrieves candidates throug
219
217
 
220
218
  Agenr has two transcript-ingest pipelines plus one repo-authored procedure sync path:
221
219
 
222
- - `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.
223
221
  - `agenr ingest episodes [path]` generates one narrative summary per session so the brain can answer temporal questions like "what happened last week?"
224
222
  - `agenr ingest procedures [path]` validates and syncs repo-authored procedural workflows from `procedures/` into the database.
225
223
 
226
- 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).
227
225
 
228
226
  ## How Procedures Work
229
227
 
230
- 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).
231
229
 
232
230
  ## How Episodes Work
233
231
 
234
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).
235
233
 
236
- ## How the Surgeon Works
234
+ ## How Dreaming Works
237
235
 
238
- 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).
239
237
 
240
238
  ## Development
241
239
 
@@ -254,7 +252,7 @@ agenr scenarios run --kind store --preserve --verbose
254
252
  | Problem | What to check |
255
253
  | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
256
254
  | `agenr init` cannot complete setup | Re-run `agenr setup` and verify the selected auth method is actually available. Subscription flows depend on the relevant external login being present, and non-OpenAI extraction setups still need a separate OpenAI embedding key. |
257
- | `openclaw plugins install @agenr/agenr-plugin` fails | Make sure the `openclaw` CLI is installed and on `PATH`. For local development, run `pnpm build` and use `plugins.load.paths` instead. |
255
+ | `openclaw plugins install @agenr/openclaw-plugin` fails | Make sure the `openclaw` CLI is installed and on `PATH`. For local development, run `pnpm build` and use `plugins.load.paths` instead. |
258
256
  | `agenr recall` or `agenr_recall` fails with embedding/auth errors | Embeddings always use OpenAI. Confirm `credentials.openaiApiKey` is configured, or re-run `agenr setup` to set the embedding key explicitly. |
259
257
  | SQLite says the database is locked | Avoid running multiple writers against the same DB at once. Stop overlapping ingest/reset runs, restart the OpenClaw gateway if needed, then retry. |
260
258
  | OpenClaw does not pick up the plugin | Restart the gateway, confirm `plugins.slots.memory` is `agenr`, confirm `plugins.allow` contains `agenr`, and for dev installs confirm `plugins.load.paths` points at the built `packages/openclaw-plugin` directory. |