agenr 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +15 -7
- package/dist/{chunk-A6CLW24R.js → chunk-YU3EWRVT.js} +585 -493
- package/dist/cli.js +5491 -1892
- package/dist/core/recall/index.d.ts +135 -4
- package/dist/core/recall/index.js +1 -2
- package/dist/internal-recall-eval-server.js +2 -3
- package/package.json +29 -22
- package/.prettierrc +0 -5
- package/.vscode/launch.json +0 -77
- package/.vscode/tasks.json +0 -12
- package/AGENTS.md +0 -269
- package/dist/adapters/openclaw/index.d.ts +0 -32
- package/dist/adapters/openclaw/index.js +0 -2310
- package/dist/adapters/openclaw/openclaw.plugin.json +0 -33
- package/dist/adapters/openclaw/package.json +0 -10
- package/dist/chunk-3CUEEUDS.js +0 -1035
- package/dist/chunk-ETQPUJGS.js +0 -0
- package/dist/ports--s4nSj4z.d.ts +0 -166
- package/docs/EVALS.md +0 -516
- package/docs/INGEST.md +0 -340
- package/docs/OPENCLAW-PLUGIN.md +0 -417
- package/docs/PLAN.md +0 -488
- package/docs/RECALL.md +0 -416
- package/docs/STORE.md +0 -246
- package/eslint.config.js +0 -172
- package/openclaw.plugin.json +0 -33
- package/scripts/check-sim.ts +0 -89
- package/scripts/copy-openclaw-plugin-artifacts.mjs +0 -16
- package/src/adapters/api/internal-recall-eval-server.ts +0 -204
- package/src/adapters/api/routes/internal-recall-eval.ts +0 -120
- package/src/adapters/api/validation/recall-eval-request.ts +0 -441
- package/src/adapters/db/client.ts +0 -206
- package/src/adapters/db/openclaw-plugin-queries.ts +0 -285
- package/src/adapters/db/queries.ts +0 -455
- package/src/adapters/db/recall-adapter.ts +0 -344
- package/src/adapters/db/row-mapping.ts +0 -216
- package/src/adapters/db/schema.ts +0 -399
- package/src/adapters/embeddings.ts +0 -286
- package/src/adapters/files/transcript-files.ts +0 -52
- package/src/adapters/llm.ts +0 -646
- package/src/adapters/openclaw/config.ts +0 -104
- package/src/adapters/openclaw/format/prompt-section.ts +0 -58
- package/src/adapters/openclaw/format/recall-format.ts +0 -86
- package/src/adapters/openclaw/hooks/before-prompt-build.ts +0 -338
- package/src/adapters/openclaw/hooks/before-reset.ts +0 -112
- package/src/adapters/openclaw/index.ts +0 -65
- package/src/adapters/openclaw/memory/flush-plan.ts +0 -21
- package/src/adapters/openclaw/memory/runtime.ts +0 -83
- package/src/adapters/openclaw/openclaw.plugin.json +0 -33
- package/src/adapters/openclaw/package.json +0 -10
- package/src/adapters/openclaw/runtime.ts +0 -182
- package/src/adapters/openclaw/session/predecessor.ts +0 -319
- package/src/adapters/openclaw/session/sessions-store-reader.ts +0 -136
- package/src/adapters/openclaw/session/state.ts +0 -157
- package/src/adapters/openclaw/session/summary-reader.ts +0 -112
- package/src/adapters/openclaw/session/summary.ts +0 -373
- package/src/adapters/openclaw/session/tui-lane.ts +0 -59
- package/src/adapters/openclaw/tools.ts +0 -944
- package/src/adapters/openclaw/transcript/jsonl.ts +0 -53
- package/src/adapters/openclaw/transcript/message-content.ts +0 -300
- package/src/adapters/openclaw/transcript/parser.ts +0 -406
- package/src/adapters/openclaw/transcript/timestamps.ts +0 -99
- package/src/adapters/openclaw/transcript/tool-summarization.ts +0 -347
- package/src/adapters/openclaw/types.ts +0 -248
- package/src/app/evals/recall/collect-diagnostics.ts +0 -292
- package/src/app/evals/recall/contracts.ts +0 -345
- package/src/app/evals/recall/index.ts +0 -21
- package/src/app/evals/recall/instrumented-recall-ports.ts +0 -115
- package/src/app/evals/recall/normalize-response.ts +0 -78
- package/src/app/evals/recall/provision-fixtures.ts +0 -268
- package/src/app/evals/recall/run-recall-eval-case.ts +0 -134
- package/src/app/evals/recall/sandbox.ts +0 -92
- package/src/app/ingestion/index.ts +0 -9
- package/src/app/ingestion/ports.ts +0 -81
- package/src/app/ingestion/service.ts +0 -313
- package/src/cli/commands/db.ts +0 -117
- package/src/cli/commands/ingest.ts +0 -652
- package/src/cli/commands/init/cost-estimator.ts +0 -91
- package/src/cli/commands/init/external-commands.ts +0 -241
- package/src/cli/commands/init/index.ts +0 -17
- package/src/cli/commands/init/openclaw-detect.ts +0 -58
- package/src/cli/commands/init/session-scanner.ts +0 -83
- package/src/cli/commands/init/wizard.ts +0 -498
- package/src/cli/commands/recall.ts +0 -249
- package/src/cli/commands/setup.ts +0 -1411
- package/src/cli/main.ts +0 -41
- package/src/cli/ui.ts +0 -180
- package/src/cli.ts +0 -6
- package/src/config.ts +0 -357
- package/src/core/ingestion/dedup.ts +0 -561
- package/src/core/ingestion/extract.ts +0 -329
- package/src/core/ingestion/index.ts +0 -15
- package/src/core/ingestion/parser.ts +0 -271
- package/src/core/ingestion/pipeline.ts +0 -390
- package/src/core/ingestion/prompts.ts +0 -436
- package/src/core/ports.ts +0 -108
- package/src/core/recall/index.ts +0 -6
- package/src/core/recall/lexical.ts +0 -247
- package/src/core/recall/scoring.ts +0 -177
- package/src/core/recall/search.ts +0 -463
- package/src/core/recall/temporal.ts +0 -111
- package/src/core/recall/trace.ts +0 -124
- package/src/core/recall/types.ts +0 -67
- package/src/core/store/embedding-text.ts +0 -11
- package/src/core/store/hashing.ts +0 -28
- package/src/core/store/index.ts +0 -3
- package/src/core/store/pipeline.ts +0 -324
- package/src/core/store/validation.ts +0 -153
- package/src/core/types.ts +0 -112
- package/src/internal-recall-eval-server.ts +0 -95
- package/src/logger.ts +0 -83
- package/src/ui.ts +0 -74
- package/src/version.ts +0 -24
- package/tests/adapters/api/internal-recall-eval-server.test.ts +0 -88
- package/tests/adapters/api/routes/internal-recall-eval.test.ts +0 -461
- package/tests/adapters/api/validation/recall-eval-request.test.ts +0 -285
- package/tests/adapters/db/client.test.ts +0 -286
- package/tests/adapters/db/schema.test.ts +0 -275
- package/tests/adapters/embeddings.test.ts +0 -193
- package/tests/adapters/files/transcript-files.test.ts +0 -107
- package/tests/adapters/llm.test.ts +0 -453
- package/tests/adapters/openclaw/before-prompt-build.test.ts +0 -1160
- package/tests/adapters/openclaw/before-reset.test.ts +0 -287
- package/tests/adapters/openclaw/config.test.ts +0 -60
- package/tests/adapters/openclaw/flush-plan.test.ts +0 -18
- package/tests/adapters/openclaw/package-metadata.test.ts +0 -37
- package/tests/adapters/openclaw/prompt-section.test.ts +0 -25
- package/tests/adapters/openclaw/runtime.test.ts +0 -247
- package/tests/adapters/openclaw/session/predecessor.test.ts +0 -393
- package/tests/adapters/openclaw/session/summary.test.ts +0 -256
- package/tests/adapters/openclaw/session/tui-lane.test.ts +0 -32
- package/tests/adapters/openclaw/session-state.test.ts +0 -44
- package/tests/adapters/openclaw/tools.test.ts +0 -476
- package/tests/adapters/openclaw/transcript/parser.test.ts +0 -501
- package/tests/app/evals/recall/instrumented-recall-ports.test.ts +0 -120
- package/tests/app/evals/recall/run-recall-eval-case.test.ts +0 -508
- package/tests/app/ingestion/service.test.ts +0 -251
- package/tests/cli/commands/db.test.ts +0 -34
- package/tests/cli/commands/ingest.test.ts +0 -142
- package/tests/cli/commands/init/cost-estimator.test.ts +0 -50
- package/tests/cli/commands/init/external-commands.test.ts +0 -86
- package/tests/cli/commands/init/index.test.ts +0 -20
- package/tests/cli/commands/init/openclaw-detect.test.ts +0 -35
- package/tests/cli/commands/init/session-scanner.test.ts +0 -58
- package/tests/cli/commands/init/wizard.test.ts +0 -247
- package/tests/cli/commands/recall.test.ts +0 -82
- package/tests/cli/commands/setup.test.ts +0 -347
- package/tests/cli/fake-prompts.ts +0 -150
- package/tests/config.test.ts +0 -77
- package/tests/core/ingestion/dedup.test.ts +0 -351
- package/tests/core/ingestion/extract.test.ts +0 -294
- package/tests/core/ingestion/parser.test.ts +0 -251
- package/tests/core/ingestion/pipeline.test.ts +0 -592
- package/tests/core/ingestion/prompts.test.ts +0 -100
- package/tests/core/recall/lexical.test.ts +0 -91
- package/tests/core/recall/scoring.test.ts +0 -155
- package/tests/core/recall/search.integration.test.ts +0 -753
- package/tests/core/recall/search.test.ts +0 -262
- package/tests/core/recall/temporal.test.ts +0 -71
- package/tests/core/store/hashing.test.ts +0 -28
- package/tests/core/store/pipeline.test.ts +0 -295
- package/tests/core/store/validation.test.ts +0 -154
- package/tests/logger.test.ts +0 -77
- package/tests/ui.test.ts +0 -30
- package/tests/version.test.ts +0 -14
- package/tsconfig.json +0 -21
- package/tsup.config.ts +0 -14
- package/dist/{chunk-TQV24PSV.js → chunk-FLRJOP3J.js} +91 -91
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.0] - 2026-03-29
|
|
4
|
+
|
|
5
|
+
The surgeon retirement pass — an autonomous agent that evaluates and retires stale knowledge entries.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **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.
|
|
10
|
+
- **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.
|
|
11
|
+
- **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.
|
|
12
|
+
- **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.
|
|
13
|
+
- **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.
|
|
14
|
+
- **Surgeon model configuration in setup.** `agenr setup` and `agenr init` now include surgeon model overrides in the advanced task-specific model configuration flow.
|
|
15
|
+
- **Budget and completion governance.** Cost-based budget tracking, context-limit detection, completion guards that reject premature pass completion, and continuation prompts that keep the surgeon working when budget remains.
|
|
16
|
+
- **Run and action persistence.** Surgeon runs and individual actions (retirements, skips, updates) are logged to the database for auditability and recently-evaluated filtering on future runs.
|
|
17
|
+
- **Database backup before apply.** Surgeon creates a timestamped backup of the knowledge database (including WAL/SHM sidecars) before executing mutations in apply mode.
|
|
18
|
+
- **Surgeon configuration.** New `surgeon` section in `config.json` supporting model override, cost caps, daily cost limits, context limits, custom instructions, and per-pass protection thresholds.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **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`.
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Tightened npm publish surface.** Root package now uses a strict `"files"` allowlist so only intended artifacts are published.
|
|
29
|
+
|
|
30
|
+
## [1.1.0] - 2026-03-28
|
|
31
|
+
|
|
32
|
+
This release splits the OpenClaw plugin into its own publishable npm package and tightens session-start handoff reliability.
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **Standalone OpenClaw plugin package.** Publishes the OpenClaw integration separately as `@agenr/openclaw-plugin` while keeping the runtime plugin id as `agenr`.
|
|
37
|
+
- **Workspace-based build layout.** Adds `pnpm-workspace.yaml` and package-specific build wiring for the dedicated plugin package.
|
|
38
|
+
- **Plugin packaging coverage.** Expands tests to verify the standalone plugin package metadata, manifest/version alignment, and that the plugin entry graph stays free of CLI-only code.
|
|
39
|
+
- **Plugin-specific docs.** Adds package-level README content and OpenClaw docs covering the new install and local development paths.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **CLI package is no longer the plugin package.** The root `agenr` package now builds the CLI plus the plugin package, but no longer exposes OpenClaw plugin metadata itself.
|
|
44
|
+
- **OpenClaw install instructions updated.** Installation now uses `openclaw plugins install @agenr/openclaw-plugin`, with migration guidance for existing users and unchanged plugin id/config keys.
|
|
45
|
+
- **Init flow updated for split packaging.** OpenClaw setup and installation flows now point at the standalone plugin package instead of the root package.
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- **Plugin manifests now carry release versions.** Both shared and published OpenClaw manifests include explicit version metadata.
|
|
50
|
+
- **Longer session-start summary timeout.** Increases the read-time predecessor summary generation timeout from 10 seconds to 20 seconds so session handoff injection is less likely to fail on slower LLM responses.
|
|
51
|
+
|
|
3
52
|
## [1.0.1] - 2026-03-28
|
|
4
53
|
|
|
5
54
|
A focused patch release for OpenClaw plugin compatibility and installation reliability.
|
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, todos, events, and relationships 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, and adapter-friendly architecture. The core is hexagonal, so multiple agent systems can share the same brain over time. Today the production adapter is the OpenClaw memory plugin, and the CLI provides offline ingest and recall against that same database.
|
|
21
|
+
What makes agenr different is the combination of local-first storage, semantic embeddings, hybrid recall, and adapter-friendly architecture. The core is hexagonal, so multiple agent systems can share the same brain over time. Today the production adapter is the OpenClaw memory plugin, published separately as `@agenr/openclaw-plugin`, and the CLI provides offline ingest and recall against that same database.
|
|
22
22
|
|
|
23
23
|
## Features
|
|
24
24
|
|
|
@@ -55,20 +55,23 @@ Run `agenr init` again any time you want to re-run onboarding, reinstall the plu
|
|
|
55
55
|
If you already have agenr configured, or you want to install the plugin separately:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
openclaw plugins install agenr
|
|
58
|
+
openclaw plugins install @agenr/openclaw-plugin
|
|
59
59
|
openclaw gateway restart
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
`agenr init` normally does this for you, updates `openclaw.json`, and offers an initial ingest pass over existing sessions.
|
|
63
|
-
The
|
|
63
|
+
The OpenClaw plugin id remains `agenr`, so `plugins.entries.agenr`, `plugins.slots.memory`, and existing plugin config keys do not change.
|
|
64
|
+
After the plugin is installed, `openclaw plugins update agenr` continues to target that same plugin id.
|
|
64
65
|
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`.
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
If you want to pin an exact plugin release, install a versioned package spec such as `openclaw plugins install @agenr/openclaw-plugin@1.0.1`.
|
|
68
|
+
|
|
69
|
+
For local development or a custom build path, run `pnpm build` first and point OpenClaw at the plugin package root:
|
|
67
70
|
|
|
68
71
|
```json
|
|
69
72
|
{
|
|
70
73
|
"plugins": {
|
|
71
|
-
"load": { "paths": ["/path/to/agenr/
|
|
74
|
+
"load": { "paths": ["/path/to/agenr/packages/openclaw-plugin"] },
|
|
72
75
|
"allow": ["agenr"],
|
|
73
76
|
"slots": { "memory": "agenr" },
|
|
74
77
|
"entries": {
|
|
@@ -85,6 +88,11 @@ For local development or a custom build path, run `pnpm build` first and point O
|
|
|
85
88
|
|
|
86
89
|
If `config.json` is not next to `dbPath`, add `"configPath": "/path/to/config.json"` inside `plugins.entries.agenr.config`.
|
|
87
90
|
|
|
91
|
+
Migration note:
|
|
92
|
+
|
|
93
|
+
- 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.
|
|
94
|
+
- After that reinstall, `openclaw plugins update agenr` should continue to work because updates key off the plugin id `agenr`.
|
|
95
|
+
|
|
88
96
|
## Configuration
|
|
89
97
|
|
|
90
98
|
`agenr init` and `agenr setup` handle configuration interactively. By default, agenr stores config at `~/.agenr/config.json` and the database at `~/.agenr/knowledge.db`.
|
|
@@ -175,10 +183,10 @@ pnpm check # format + lint + typecheck + test
|
|
|
175
183
|
| Problem | What to check |
|
|
176
184
|
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
177
185
|
| `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. |
|
|
178
|
-
| `openclaw plugins install agenr` fails
|
|
186
|
+
| `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. |
|
|
179
187
|
| `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. |
|
|
180
188
|
| 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. |
|
|
181
|
-
| 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 `
|
|
189
|
+
| 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. |
|
|
182
190
|
|
|
183
191
|
## License
|
|
184
192
|
|