@agenr/openclaw-plugin 0.14.0 → 1.1.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 DELETED
@@ -1,2624 +0,0 @@
1
- # Changelog
2
-
3
- ## [0.14.0] - 2026-03-24
4
-
5
- ### Surgeon — Budget Model Overhaul
6
-
7
- - **`--budget` now means dollars, not tokens.** The cumulative token budget that double-counted context re-sends across turns is gone. The surgeon is now constrained by two things: cost (dollars) and context window (tokens). Config `surgeon.budget` is dollars per run. Default: $5.
8
- - **Context-aware limits.** New `surgeon.contextLimit` config field and `--context-limit` CLI flag. Auto-detects from `model.contextWindow * 0.85` if not set. The surgeon stops when context is full, not from artificial token counting.
9
- - **`costCap` removed.** Replaced by `budget`. Old `costCap` values are accepted as backward-compatible alias with deprecation warning.
10
-
11
- ### Surgeon — Contradiction Improvements
12
-
13
- - **`coexists` relation for `log_conflict`.** The surgeon can now log reviewed false-positive pairs as coexisting rather than forcing them into `contradicts` or `supersedes`. Coexists conflicts are auto-resolved as `keep-both` so they don't accumulate as pending conflicts and future scans skip them.
14
- - **Improved contradiction candidate filtering.** Suppresses historical series pairs (release versions, prompt paths, roadmap snapshots) from claim divergence scanning. Prioritizes `current_state` claim divergence pairs.
15
-
16
- ### Surgeon — Retirement Candidate Scoping
17
-
18
- - **Scoped candidate queries.** `query_candidates` now accepts `scope` parameter: `actionable` (default) filters to entries with high retirement probability — temporary, ephemeral, todos, low-importance events, mislabeled temporal artifacts. `all` shows the full candidate pool for deep sweeps.
19
- - **Improved candidate ordering.** Actionable scope returns temporary entries first, then ephemeral, then todos, then low-importance events. Durable permanent decisions and preferences are excluded from the default scope.
20
- - **Two-phase retirement in auto mode.** Surgeon starts with actionable candidates, widens to full pool only if budget remains after exhausting the actionable set.
21
-
22
- ## [0.13.4] - 2026-03-23
23
-
24
- ### Surgeon
25
-
26
- - **Tightened completion gating thresholds.** Final completion now requires 75% budget usage (was 25%). Phase completion requires 75% (was 50%). Safety valve raised to 5 rejections (was 3). Continuation attempts raised to 5 (was 3). These changes force the surgeon to work through substantially more of the corpus before accepting completion.
27
-
28
- ## [0.13.3] - 2026-03-23
29
-
30
- ### Surgeon
31
-
32
- - **`complete_pass` gating rejects premature completion.** The tool now validates budget utilization and candidate coverage before accepting completion. Final completion rejected if <25% budget used. Dedup phase rejected if <50% of clusters processed with budget remaining. Retirement phase rejected if <40 candidates evaluated with budget remaining. Safety valve accepts after 3 rejections per phase. Rejection messages tell the surgeon exactly what to do next.
33
- - **System prompt tightened.** Budget Awareness section now explicitly states that `complete_pass` will reject premature attempts, and that efficiency means spending budget on the right candidates, not spending less budget overall.
34
-
35
- ## [0.13.2] - 2026-03-23
36
-
37
- ### Surgeon
38
-
39
- - **Continuation loop prevents early exit.** If the surgeon model stops without calling `complete_pass` and has >10% budget remaining, a continuation prompt is injected to push it back to work. Up to 3 nudges before allowing exit. Eliminates the "surgeon quits at 1% budget" problem.
40
- - **Lowered default dedup similarity threshold from 0.82 to 0.60.** The threshold controls candidate surfacing, not merge execution — the surgeon agent still makes every merge decision. Lower threshold surfaces more candidates for review on large corpora.
41
- - **`reset` parameter for `query_dedup_clusters` and `query_contradiction_candidates`.** Query parameters are no longer permanently frozen after the first call. Pass `reset: true` to clear cached clusters and rebuild at a new threshold. Lets the surgeon start wide and narrow if noisy.
42
- - **Strengthened auto sweep prompts.** Contradictions phase always runs proactive scan (no more skipping when pending conflicts = 0). Budget discipline section added — surgeon must keep working while budget remains. Retirement throughput expectations: 500+ candidates on a 3K corpus, not 100.
43
- - **Dedup threshold guidance in prompts.** Surgeon is told the default is deliberately low, and can raise it via reset if too noisy.
44
-
45
- ## [0.13.1] - 2026-03-23
46
-
47
- ### MCP Server
48
-
49
- - **`agenr_store` tool added to MCP surface.** MCP consumers (Claude Desktop/Cowork, Claude Code, etc.) can now make structured memory writes with explicit type, subject, importance, expiry, tags, project, and scope — matching the fidelity of OpenClaw's store tool.
50
- - **Enriched tool descriptions with embedded doctrine.** All 5 MCP tool descriptions (`agenr_recall`, `agenr_store`, `agenr_extract`, `agenr_retire`, `agenr_update`) now carry usage guidance directly in their metadata — when to recall, query tips, importance calibration, lifetime selection, what to store vs. not store. MCP consumers no longer need external instruction files to use memory well.
51
- - **Fixed `scope` persistence bug.** Manual store writes were not persisting the `scope` field due to a missing column in the insert path. Fixed in the shared store persistence layer.
52
-
53
- ### Surgeon
54
-
55
- - **Proactive contradiction discovery.** Surgeon can now discover contradictions proactively during sweeps, rather than only resolving pre-flagged conflicts.
56
- - **Supersession scan.** New surgeon pass identifies entries that have been superseded by newer, more complete information.
57
- - **Contradictions pass and auto sweep.** Combined contradictions + auto multi-pass mode where a single agent loop has all tools from all passes registered simultaneously.
58
- - **Dedup pass.** Dedicated surgeon dedup pass for identifying and merging near-duplicate entries.
59
- - **Graceful abort.** Surgeon now handles abort signals gracefully and removes artificial loop caps.
60
- - **Paginated retirement.** Retirement pass now paginates to handle large corpora without memory pressure.
61
- - **Inspect provenance.** New surgeon tool for inspecting entry provenance chains.
62
- - **Prompt loading fix.** Fixed surgeon prompt loading for bundled distribution.
63
-
64
- ### Infrastructure
65
-
66
- - **Removed `agenr maintain` and `agenr consolidate` commands.** Surgeon is now the sole corpus-health entry point. Replace any cron jobs or scripts with `agenr surgeon run`.
67
- - **Watcher interval floor.** Enforced minimum watcher polling interval to prevent excessive resource usage.
68
- - **Default model migration.** Migrated defaults to gpt-5.4 models.
69
- - **Surgeon workflow limits and budget defaults.** Increased defaults for production workloads.
70
-
71
- ## [0.13.0] - 2026-03-22
72
-
73
- ### Architecture
74
-
75
- - **Hexagonal architecture restructure.** Complete reorganization of the codebase into a modular monolith with hexagonal (ports & adapters) architecture. `src/` now has four top-level directories: `modules/`, `shared/`, `edge/`, and `runtime/`.
76
- - **Five bounded context modules.** `recall`, `store`, `ingestion`, `surgeon`, and `eval` — each with `domain/`, `application/`, `ports/`, and `adapters/` layers.
77
- - **OpenClaw plugin as edge adapter.** Moved to `src/edge/openclaw/` with internal hex layering (`domain/`, `application/`, `adapters/`), alongside CLI, MCP, and watch edge adapters.
78
- - **Eliminated `src/memory/`.** The awkward middle layer between app and db is gone. Recall orchestration moved to the recall module; store pipeline moved to the store module.
79
- - **Eliminated `src/domain/`, `src/app/`, `src/prompts/`, `src/adapters/`.** Each module now owns its own domain logic, application workflows, and prompt templates.
80
- - **Runtime consolidation.** Collapsed 31 `*-defaults.ts` wiring files into 8 focused composition roots — one per module plus shared infrastructure.
81
- - **Module boundary tests.** New architecture boundary tests enforce: domain purity, no cross-module internal imports, ports-only cross-module communication.
82
- - **Operations owner matrix.** DB utility workflows assigned to owning modules or shared operations (`context/` → recall, `classify-entries/` → store, `clusters/` → surgeon, `watcher-report/` and `session-store-metrics/` → `src/shared/operations/`). Only genuinely cross-module admin tooling remains in `src/shared/operations/`.
83
- - **App-boundary allowlist dropped to zero.** All previously allowlisted cross-layer imports are now legitimate within-module imports or port-mediated cross-module calls.
84
-
85
- ### Corpus Health
86
-
87
- - **Surgeon is now the sole corpus-health entry point.** Removed `agenr maintain` and standalone `agenr consolidate`. `agenr surgeon run` now owns deterministic cleanup, quality evolution, vector integrity checks, retirement, dedup/merge, and contradiction resolution.
88
- - **Maintenance and consolidation internals absorbed into surgeon.** Deterministic pre/post steps now run inside surgeon workflows, and clustering/merge infrastructure moved under `src/modules/surgeon/application/clustering/`.
89
- - **Migration note.** Replace any cron jobs or scripts invoking `agenr maintain` or `agenr consolidate` with `agenr surgeon run`.
90
-
91
- ## [0.12.3] - 2026-03-22
92
-
93
- ### Fixed
94
-
95
- - **Plugin DB tables in core schema.** `session_projects`, `seen_sessions`, and `session_identity_breadcrumbs` tables are now created as part of the main schema init, fixing `SQLITE_ERROR: no such table: session_projects` errors when calling `agenr_set_session_project` or `agenr_get_session_project`. Previously these tables depended on a lazy plugin-db init path that could fail to run.
96
- - **Tool schema Codex compatibility.** Replaced `Type.Union([Type.Literal(...)])` with `Type.String({ enum: [...] })` for the `expiry` and recall `context` fields in tool schemas. Codex and other providers that reject `anyOf`/`oneOf` at top level now get clean schemas.
97
- - **Support-aware cluster validation.** Consolidation cluster validation now uses support-aware entry resolution, preventing false merge candidates from stale or unsupported cluster assignments.
98
-
99
- ## [0.12.2] - 2026-03-22
100
-
101
- ### Recall Scoping Fixes
102
-
103
- - **Wildcard project passthrough.** `project: "*"` no longer gets silently dropped to `undefined` during recall request building. The wildcard marker now flows through the full stack to `hasWildcardProjectOverride` in `prepareRecallInputs`, enabling true cross-project recall.
104
- - **Default project fallback for unscoped recall.** When an agent calls `agenr_recall` without an explicit `project`, the session's default project is now used as a `universal_first` hint — searching the default project first with null-project fallback. Previously, unscoped recall defaulted to null-project-only entries, silently returning near-empty results for project-heavy corpora.
105
- - **Wildcard default when no project context.** When neither an explicit project nor a session default is available, unscoped recall now defaults to wildcard (`*`) cross-project search instead of null-project-only.
106
-
107
- ### Browse Recall
108
-
109
- - **Temporal proximity rebalancing.** Browse mode recall now prioritizes temporal proximity over importance with a diversity pass, better surfacing recent entries during temporal exploration.
110
- - **Removed default 1d since window.** Browse mode no longer applies a default 1-day `since` window, allowing full temporal exploration of the corpus.
111
-
112
- ### Update & Retire Improvements
113
-
114
- - **Expiry changes via `agenr_update`.** The update tool now supports changing an entry's expiry tier (`core` → `permanent`, etc.) without retiring and re-creating it. Entry history (confirmations, recall count, created_at) is preserved.
115
- - **Subject selectors for update and retire.** Both `agenr_update` and `agenr_retire` now accept `subject` as an alternative to `entry_id`. Subject matching is case-insensitive exact match; when multiple entries share a subject, the most recent is targeted.
116
- - **Agent action replay.** Retire and update operations now support recall target hints for agent action replay workflows.
117
-
118
- ### Maintenance
119
-
120
- - **Vector integrity detection.** New `vector-integrity` maintain task detects and repairs drift between the vector shadow table and the entries table.
121
-
122
- ## [0.12.1] - 2026-03-21
123
-
124
- ### Post-Ingest Quality Fixes
125
-
126
- - **Active-only FTS index.** FTS triggers and rebuild helpers now scope to active entries only (`retired = 0, superseded_by IS NULL`). Retired entries no longer occupy FTS slots or get reindexed during maintenance.
127
- - **Active-only vector index.** The `idx_entries_embedding_shadow` partial index now excludes retired entries. Vector `top_k` queries no longer waste slots on retired embeddings that get post-filtered. Rebuild and health-check paths updated to match.
128
- - **Schema regression test.** Fresh `init`/`reset` must create active-only trigger and index definitions — validated by new schema test.
129
-
130
- ### Passthrough Dedup Fix
131
-
132
- - **Normalized content hash dedup.** Passthrough now checks active `norm_content_hash` before insert, catching exact duplicates that survived because the previous `contentHash` included `source.file`. Identical content from different tool calls is now correctly deduplicated.
133
- - **Within-batch norm-hash tracking.** Local batch dedup tracks both `contentHash` and `normContentHash`, preventing same-batch duplicates with different synthetic source files.
134
- - **Granular skip tracking.** `stats.skipped` now counts by skipped candidates rather than matched set size.
135
-
136
- ### Store Guidance
137
-
138
- - **Future-session test.** Updated `agenr_store` tool description, Memory Doctrine (`system-context.ts`), and SKILL.md with concrete store/don't-store guidance. Agents are now instructed to apply the "future-session test" before storing: will a fresh session need this to act differently, or is this just logging what happened?
139
- - **Importance calibration.** Added "importance is not recency" guidance — shipping events are 5-6, recurring operational hazards are 7-8.
140
-
141
- ## [0.12.0] - 2026-03-20
142
-
143
- ### Ingestion Overhaul
144
-
145
- - **Unified extraction pipeline.** Consolidated `src/extractor/` and `src/app/extract/` into `src/app/ingest/extraction/`. Removed legacy extraction runtime infrastructure and redundant module exports.
146
- - **Claim extraction enabled by default.** Structured claims (subject/attribute/predicate/object) are now extracted during ingest without requiring `--claims`. Added embedding validation for extracted entries.
147
- - **Batch claim extraction.** New batch mode for `backfill-claims` and eval commands processes multiple entries per LLM call.
148
- - **Within-batch dedup renamed and simplified.** Renamed pre-store dedup to within-batch dedup. Removed the DB-based deduplication layer — online store-time dedup handles cross-batch conflicts.
149
- - **Token usage tracking.** Threaded `tokenUsageTracker` through the full ingest pipeline for per-run cost reporting.
150
- - **Per-file and workflow timing breakdowns.** Ingest now reports extraction, queue wait, and store exec timing per file and in the summary. Wall-clock timing alongside cumulative timing shows the benefit of parallel workers.
151
- - **Per-file project inference.** When `--project` is not specified, each file infers its project from transcript metadata (session project block → cwd detection → label mapping → agent store projects). Matches watcher behavior.
152
- - **Source classification for ingest entries.** Entries extracted via `ingest` now get `source_class: "cli"` instead of being misclassified as `"watcher"`.
153
- - **Dedup quality warning tracking.** Expanded valuation negative signals and added tracking for dedup quality warnings in ingest results.
154
- - **Claim extraction config controls.** Added `claims` and `claimExtractionConcurrency` config fields to normalize ingest result reporting.
155
-
156
- ### Session Metadata Enrichment
157
-
158
- - **Agent-stored entries as extraction seeds.** The OpenClaw adapter now parses successful `agenr_store` tool calls from session files, correlating with tool results to confirm success. These pre-validated entries seed the extraction LLM's "previously extracted" context, preventing duplicate/inferior re-extraction.
159
- - **Enhanced tool call summaries.** `agenr_store` → `[attempted brain store: decision: "subject" project=X]`, `agenr_recall` → `[recalled from brain: "query" project=X]`, `sessions_spawn` → `[spawned sub-agent: label (mode model=X)]`. Replaces generic one-liners with structured summaries.
160
- - **Session project parsing.** The OpenClaw adapter extracts `sessionProject` from the injected `current_session_project:` block in the first user message. Three-value semantics: string (authoritative project), null (explicitly none), undefined (not found).
161
- - **Models used tracking.** Collects all models from session records, model_change records, and assistant messages into `metadata.modelsUsed`.
162
- - **Project fallback chain.** `resolveFallbackProjectFromMetadata` now checks: session project → cwd detection (gated against configured projects) → session label mapping → agent store projects (unanimous only).
163
- - **Configured project slug validation.** Detected projects from `cwd` are now gated against configured project slugs. Random git repos (like `~/.openclaw/workspace`) no longer create phantom projects.
164
-
165
- ### Maintenance Overhaul
166
-
167
- - **Removed edge-decay and clusters tasks.** Eliminated cluster scoring and graph-based edge-decay from the maintain workflow.
168
- - **Removed reflection synthesis.** Removed synthetic recall generation and the reflection synthesis system.
169
- - **Removed auto-resolve confidence threshold.** Simplified conflict resolution by removing the automatic resolution path.
170
- - **Deterministic retirement.** Added a deterministic retirement path for clearly stale entries with conflict-based protection for entries under active dispute.
171
- - **Recall recency grace periods.** Added grace periods to db audit retirement that protect recently-recalled entries from premature retirement.
172
- - **Configurable forgetting threshold.** Added `forgetting.lowScoreTriggerCount` config field for auto-forgetting trigger and improved retirement field consistency.
173
-
174
- ### Consolidation Overhaul
175
-
176
- - **Migrated consolidation to `src/app/consolidate/`.** Moved from top-level into the app domain with updated documentation.
177
- - **Post-merge claim normalization.** Consolidation merges now re-extract structured claims and validate subject specificity.
178
- - **Removed cluster and graph scoring.** Recall scoring no longer uses cluster membership or graph augmentation signals.
179
- - **Replaced multiplicative recall scoring.** Switched from multiplicative to signal-averaging for recall score composition. Added recall engagement reporting.
180
-
181
- ### Watcher Improvements
182
-
183
- - **OpenClaw watcher demotion policy.** Watcher-extracted entries from OpenClaw sessions get capped importance and temporary expiry with auto-retirement tracking and session metrics reporting.
184
- - **Source-aware watcher deferral.** Watcher now defers to tool-stored entries for the same session, with tracking and reporting of deferral decisions.
185
- - **Session key threading.** OpenClaw `session_key` is threaded through the watcher workflow into store options for cross-surface correlation.
186
- - **Watcher report command.** New `watcher-report` command analyzes tool/watcher overlap, coverage gaps, and readiness for transition from watcher to tool-primary ingestion.
187
-
188
- ### Store Pipeline
189
-
190
- - **Source classification columns.** Added `source_class` and `session_key` columns to the entries table with normalized source classification.
191
- - **Batch store lookups.** Added batch lookup methods to the store repository with precomputed dedup resolutions.
192
- - **Entity normalization.** Added entity normalization during ingest extraction with entity hint threading through the dedup workflow.
193
- - **Per-task context types.** Replaced monolithic `TaskExecutionContext` with per-task context types and type-safe task dispatch in the maintain orchestrator.
194
-
195
- ### Audit & Diagnostics
196
-
197
- - **DB audit command.** New `db audit` command for legacy structural and quality issue cleanup.
198
- - **Importance inflation audit.** Added per-entry attribution and preview logging for importance inflation detection.
199
- - **Contradiction blocking tracking.** Added infrastructure for tracking and reporting contradiction blocking decisions.
200
- - **Shadow threshold telemetry.** Added multi-threshold analysis for contradiction audit shadow thresholds.
201
- - **Unresolved reference detection.** Improved detection of dead cross-references with weak self-containedness signal in valuation.
202
-
203
- ### Fixed
204
-
205
- - **Vector index rebuild.** Fixed libsql vector index rebuild not populating the shadow table after `DROP INDEX` + `CREATE INDEX`. Added `UPDATE entries SET embedding = embedding` to force re-indexing of existing rows.
206
- - **`resolveStoreKnownProjects` using paths instead of slugs.** Fixed the function to extract `.project` values from config instead of using directory path keys.
207
- - **Removed `"workspace"` from `DEFAULT_KNOWN_PROJECTS`.** Prevented phantom project inference from the OpenClaw workspace `.git` directory.
208
-
209
- ### Dependencies
210
-
211
- - Updated `@mariozechner/pi-ai` to 0.60.0.
212
- - Fixed `streamSimple` import to use package root instead of dist path.
213
-
214
- ## [0.11.3] - 2026-03-18
215
-
216
- ### Fixed
217
-
218
- - Added `sessionStartSectionCaps` to `openclaw.plugin.json` config schema so OpenClaw validates it correctly.
219
-
220
- ## [0.11.2] - 2026-03-18
221
-
222
- ### Added
223
-
224
- - Added `sessionStartSectionCaps` plugin config option to control per-section caps for session-start memory injection. Set a section to `0` to disable it (e.g. `{ "preferences": 0, "recent": 0 }` to suppress noisy non-core sections while keeping core context). Sections: `core` (default 6), `active` (default 4), `preferences` (default 4), `recent` (default 2).
225
-
226
- ## [0.11.1] - 2026-03-18
227
-
228
- ### Fixed
229
-
230
- - Fixed `@agenr/openclaw-plugin` package missing `openclaw.extensions` field, which prevented OpenClaw from installing the plugin.
231
-
232
- ## [0.11.0] - 2026-03-18
233
-
234
- ### Changed
235
-
236
- - **Recall pipeline rebuilt from scratch.** Removed ~42,000 lines of heuristic post-processing (decision policies, confidence gates, category rollup assembly, suppression chains, lexical rescue, expansion heuristics, name-bound token matching) and replaced them with a clean ~1,750-line retrieval pipeline: normalize → embed → scoped vector search → lexical search → combine scores → rerank top-N → top-k → return.
237
- - Added a narrow second-stage reranker with query intent detection. The reranker operates only on a bounded candidate window and uses query-conditioned features (lexical specificity, scope match, metadata signals, temporal markers) instead of global corpus-wide score adjustments.
238
- - Improved lexical candidate admission: FTS now evaluates all query variants before trimming, subject overlap is scored separately from content overlap, and recent/state-like entries get query-conditioned admission preference.
239
- - Simplified the eval harness to measure ranked retrieval directly (hit@k, MRR, precision@k, scope bleed) instead of tracking deleted heuristic concepts.
240
-
241
- ### Added
242
-
243
- - Added deterministic ingest-time classification: `entry_kind` (directive, state, identity, episode, reference) and `temporal_class` (ephemeral, durable) columns on entries, assigned at store time using type, subject, and content signals. No LLM calls — pure pattern matching.
244
- - Added tag-based project inference at store time: entries with a single known-project tag and no explicit project assignment are automatically promoted.
245
- - Added `agenr maintenance classify-entries` command to backfill classification metadata on existing databases.
246
- - Added rerank intent detection (`policy_seeking`, `status_seeking`, `recentness_seeking`, `topic_seeking`, `general`) used exclusively by the reranker to condition feature weights.
247
-
248
- ### Fixed
249
-
250
- - Fixed exact-policy queries consistently losing rank to generic same-topic entries.
251
- - Fixed session handoff and status queries being polluted by handoff-infrastructure notes.
252
- - Fixed temporal/recency queries returning older durable entries instead of recent events.
253
- - Reduced project scope bleed in retrieval results.
254
-
255
- ### Removed
256
-
257
- - Removed decision-policy state machine, confidence gates, and mode-dependent dispatch (~3,500 lines).
258
- - Removed category rollup assembly subsystem (~3,700 lines).
259
- - Removed suppression framework and reflection suppression (~800 lines).
260
- - Removed rescue mechanisms (change-lookup-prior-state-rescue, structured-state-rescue).
261
- - Removed query expansion heuristics, name-bound token matching, and topic-specific boosting.
262
- - Removed surface-selection heuristics and compact-bundle diagnostics.
263
-
264
- ## [0.10.1] - 2026-03-17
265
-
266
- ### Fixed
267
-
268
- - Fixed `agenr_recall` tool using mid-session recall scoping, which caused the session's configured project to be applied as a strict filter — excluding universal/personal memories when the agent didn't explicitly pass a `project` parameter (#552).
269
-
270
- ### Changed
271
-
272
- - Separated recall reads from writes in the OpenClaw plugin tool path. Tool recall now uses a shared read-only connection (read-safe init, no schema work) and writes recall events asynchronously via a serialized write queue. This eliminates `SQLITE_BUSY` errors when the agent fires multiple `agenr_recall` calls in parallel (#553).
273
-
274
- ## [0.10.0] - 2026-03-17
275
-
276
- ### Changed
277
-
278
- - Refactored the codebase around clearer application, runtime, adapter, and domain boundaries, extracting major workflow orchestration into `src/app/`, adding explicit app ports/runtime defaults, and converting command modules into thinner presentation layers.
279
- - Reorganized large retrieval, ingest, maintain, config, watcher, and OpenClaw plugin surfaces into more focused modules, including modular category-rollup assembly, session continuity/handoff plumbing, watcher runtime pieces, and config normalization/schema layers.
280
- - Tightened architectural discipline and boundary enforcement with new architecture tests, updated contributor/architecture docs, and cleanup of internal architecture/research/history material from version control.
281
-
282
- ### Added
283
-
284
- - Added shared app-layer slices and runtime defaults for recall, store, extract, ingest, maintain, evaluation, DB operations, watch flows, and OpenClaw recall feedback, giving the codebase clearer dependency seams for future work.
285
- - Added live-facing personal-topic contamination controls for family/parents recall, including shared personal-topic filtering, cleaner rollup evidence selection, and focused regression coverage for personal-family retrieval behavior.
286
- - Added broader recall and eval-harness support during the refactor, including modular recall-regression tooling, richer gold-harness diagnostics, and artifact checks used to debug live-vs-eval family contamination gaps.
287
-
288
- ### Fixed
289
-
290
- - Fixed broad personal-family recall contamination across both rollup and non-rollup live CLI paths by suppressing project/debug/meta memories when grounded family evidence exists.
291
- - Fixed category-rollup evidence selection so adversarial family contamination cases no longer survive into selected evidence bundles and synthesized rollup summaries in the new regression coverage.
292
- - Fixed multiple adapter/runtime boundary leaks uncovered during the refactor by centralizing dependencies behind app/runtime seams instead of letting command and infrastructure code reach directly across layers.
293
-
294
- ## [0.9.99] - 2026-03-15
295
-
296
- ### Added
297
-
298
- - Added a full post-rebuild tightening tranche across recall evaluation and diagnosis, including truth-telling regression metrics and query-class breakdowns, null-project scope audit/recovery tooling, cloned-DB before/after probe workflows, strict scope-sensitive snapshot coverage, and graph diagnosis artifacts in `agenr-evals`.
299
- - Added targeted broad-recall upgrades for category and project rollups, including rollup-specific retrieval shaping, deterministic rollup summaries, semantic diversity, graph-neighborhood-aware assembly, project workstream interpretation, and bounded non-project neighborhood interpretation.
300
- - Added standing graph-sensitive coverage beyond project rollups, including family neighborhood completion and project continuity completion cases that let graph diagnosis distinguish helpful vs low-leverage graph participation.
301
-
302
- ### Fixed
303
-
304
- - Fixed historical issue recall for exact repair/diagnosis questions by routing explicit `what fixed/caused/issue with ...` queries into historical lookup instead of collapsing into `abstain_or_narrow`, then tightened historical exactness scoring so older exact answers can beat newer broad policy distractors when appropriate.
305
- - Fixed strict project-scoped retrieval end to end by recovering a safe first slice of missing `project=agenr` rows, proving the recovery path in strict-scope probes, and then eliminating the remaining surfaced-result bleed and partial-bundle residuals.
306
- - Fixed project-rollup graph behavior so graph-backed assembly now backs off when base retrieval already has a sufficient bundle, preserves participation only when it materially completes the answer, and exposes explicit participation diagnostics that `agenr-evals` now interprets correctly.
307
-
308
- ## [0.9.98] - 2026-03-15
309
-
310
- ### Changed
311
-
312
- - Refactored the codebase into cleaner responsibility boundaries across the app/runtime, MCP server, init/setup flow, watch context refresh, OpenClaw plugin service calls, and shared store/retire plumbing, reducing entry-point sprawl while preserving the existing product surface.
313
- - Continued internal cleanup after the large module split by removing now-unused variables, functions, and imports across the refactored codebase.
314
- - Updated architecture documentation to match the new module organization and adapter boundaries so the repository structure and implementation seams are easier to navigate after the refactor.
315
-
316
- ## [0.9.97] - 2026-03-15
317
-
318
- ### Fixed
319
-
320
- - Fixed a follow-on watch/change issue discovered immediately after the 0.9.96 release and shipped the corrective patch as a fast follow-up release.
321
-
322
- ## [0.9.96] - 2026-03-15
323
-
324
- ### Fixed
325
-
326
- - Fixed the bulk rebuild ingest path so Phase 3 structured fields are no longer bypassed during ingest when claims are enabled. Bulk ingest now runs structured-claim normalization and optional claim extraction before insert, keeping `subject_key`, `claim_predicate`, and `claim_role` population aligned with the normal store path.
327
- - Fixed ingest/eval parity so bulk-mode and normal-mode claim population stay aligned, and added regression coverage proving bulk ingest can fill structured columns while still leaving `entry_supports` empty on first insert until later reinforcement/consolidation.
328
-
329
- ## [0.9.95] - 2026-03-15
330
-
331
- ### Added
332
-
333
- - Added a full Phase 3 structured-memory spine for canonical claims, including support accumulation, explicit `current_state` and `prior_state` anchors, and explicit committed `state_transition` anchors for replacement/migration changes.
334
- - Added bounded and then broader structured retrieval support over the new state fields, including direct structured lookup, subject-key recovery from weak footholds, hybrid candidate assembly, and structure-aware embedding composition so canonical anchors can win semantically as well as lexically.
335
- - Added pre-rebuild alignment work for consolidation, maintenance, conflicts, and runtime prompt guidance so rebuild-time operation follows the new canonical brain model instead of the legacy blob-brain assumptions.
336
-
337
- ### Fixed
338
-
339
- - Fixed live recall crash behavior around retired related-entry hydration by making relation-neighbor expansion safe in the presence of retired superseded source rows, then removed active-to-retired `relations.supersedes` residue as a write-time invariant rather than leaving retrieval to tolerate it forever.
340
- - Fixed consolidation and maintenance behavior to preserve Phase 3 canonical invariants: same-identity structured claims now reinforce deterministically instead of synthesizing blob merges, current/prior/transition anchors remain distinct, canonical structured claims are protected from generic retirement/reflection demotion, and superseded cleanup distinguishes true supersession from expiry residue.
341
- - Fixed prompt/runtime alignment so extraction, dedup, consolidation, reflection, and rebuild-oriented prompt paths now encode the new structured-claim, role-aware, rebuild-required model instead of lagging behind older assumptions.
342
-
343
- ## [0.9.94] - 2026-03-14
344
-
345
- ### Added
346
-
347
- - Added a Phase 2 query-normalization and retrieval-mode layer that interprets raw recall phrasing together with explicit `agenr_recall` parameters, making current-state, historical, decision, preference/policy/workflow, change/transition, and abstain-or-narrow routing explicit and traceable.
348
- - Added noisy conversational/currentness/transition/param-interaction eval coverage plus surfaced-set diagnostics that measure what users actually see, including output-alignment reasons and bounded transition/currentness support shaping.
349
-
350
- ### Fixed
351
-
352
- - Fixed recall precision and surface behavior across the full Phase 1/Phase 2 brain-quality tranche: adjacent-wrong suppression, lexical candidate survival, generic lookup query-shape handling, selected-support-only surfacing, abstain-or-narrow trust behavior, historical clear-winner qualification, and currentness/transition before-after pair handling.
353
- - Fixed explicit migration/replacement transition queries in both isolated eval and realistic snapshot/live-brain paths so prior-state rows remain available for bounded before/after answers without reopening broad stale-history retrieval.
354
-
355
- ## [0.9.93] - 2026-03-13
356
-
357
- ### Added
358
-
359
- - Added focused gold-eval coverage and regression protections for fallback surfaced-set suppression, blocker-shaped current-state routing, natural prerequisite pair assembly, residual holdout abstain/pair-selection cases, and currentness-update-posture bundle/commitment-state cases.
360
- - Added memory-formation eval diagnostics that preserve extractor warnings in gold harness artifacts, making provider/auth failures visible instead of collapsing them into misleading empty extraction results.
361
-
362
- ### Fixed
363
-
364
- - Hardened fallback surfaced-set selection so answer-bearing support can suppress adjacent same-topic distractors without reopening broad ranking changes.
365
- - Fixed blocker-shaped `still blocked` status questions so they route into current-state/resolved-state handling instead of generic lexical fallback.
366
- - Fixed natural prerequisite phrasing and bounded pair assembly so answerable prerequisite questions stop abstaining or dropping complementary support.
367
- - Fixed residual holdout generic-intent abstain and prerequisite completeness cases, eliminating the last holdout distractor-intrusion failures.
368
- - Fixed currentness-update-posture residuals by routing bounded policy-bundle questions into pair handling and tightening commitment-state recognition for settled `code slice` phrasing.
369
- - Fixed sandbox eval credential resolution so inherited bad API-key env vars no longer override valid sandbox-config credentials during eval runs.
370
-
371
- ## [0.9.92] - 2026-03-13
372
-
373
- ### Added
374
-
375
- - Added an `agenr eval harness --mode recall-regression` path for replaying live-brain snapshot recall cases as focused regression suites, with targeted fixtures and assertions for rank expectations and trace inspection.
376
- - Added targeted full-recall regression coverage for lexical-candidate rescue and affinity-rerank edge cases, including generic-subject strong body matches and direct workspace repair answers with only soft meta wording.
377
-
378
- ### Fixed
379
-
380
- - Tightened lexical candidate rescue so strong handoff-style body matches can survive vector-top-k misses and reach reranking in bounded recall flows.
381
- - Refined affinity reranking so soft meta signals such as `workspace` or procedural wording no longer blanket-demote otherwise direct operational answers, while preserving demotion pressure for genuinely meta/config memories on non-meta queries.
382
-
383
- ## [0.9.91] - 2026-03-13
384
-
385
- ### Added
386
-
387
- - Added a public `agenr eval harness --mode ingest-inspect` seam for structured ingestion inspection and private eval-pack orchestration against session-derived fixtures.
388
-
389
- ### Fixed
390
-
391
- - Hardened ingestion hygiene against transcript-like session scaffolding and bookkeeping residue by adding a conservative pre-chunk sanitizer that preserves intended durable content while stripping obvious session junk.
392
- - Fixed ingestion parity harness measurement so paired normal/bulk comparisons reuse a single cached extraction artifact per fixture instead of comparing unrelated live extraction samples.
393
- - Fixed the shared extraction blind spot behind `ingestion-parity-002` by threading platform through raw-text extraction, narrowing procedural-noise valuation so replacement-state entries like "open todo" are not rejected as command noise, and tightening replacement/completed-state extraction guidance.
394
- - Restored full test-suite health after the ingest work by aligning the OpenClaw doctrine string with the expected wording, reapplying synthesized reflection demotions during reflection maintenance, and updating the stale reflection demotion unit test expectation.
395
-
396
- ## [0.9.90] - 2026-03-12
397
-
398
- ### Fixed
399
-
400
- - Hardened reflection maintenance so verification now fails closed instead of applying a reflection after repeated verification-parse failure.
401
- - Stopped reflection apply from destructively lowering canonical source-memory importance, preserving durable source salience even when synthesis recommends demotion.
402
- - Narrowed reflected-source suppression so recall retains the best reflected source instead of blanket-hiding all reflected sources whenever a reflection surfaces.
403
-
404
- ## [0.9.89] - 2026-03-12
405
-
406
- ### Changed
407
-
408
- - Strengthened the OpenClaw `prependSystemContext` agenr memory doctrine so it explicitly treats agenr as the only allowed durable memory workflow, forbids `memory_search`, `memory_get`, `MEMORY.md`, `memory/*.md`, and markdown journals for memory recall, and instructs agents to ignore any conflicting earlier prompt guidance.
409
-
410
- ## [0.9.88] - 2026-03-12
411
-
412
- ### Fixed
413
-
414
- - Updated the OpenClaw plugin for `openclaw@2026.3.11` by migrating agenr command lifecycle handling from the stale typed `api.on("command", ...)` path to named `api.registerHook(["command:new", "command:reset"], ...)` registration, restoring clean command-hook compatibility and removing current-release hook registration warnings.
415
- - Removed temporary OpenClaw prompt-build debug instrumentation after confirming `prependSystemContext` and `prependContext` injection is functioning in the sandbox.
416
-
417
- ## [0.9.87] - 2026-03-12
418
-
419
- ### Changed
420
-
421
- - Added an OpenClaw `prependSystemContext` agenr-first memory doctrine that supersedes legacy markdown-memory guidance without replacing OpenClaw's dynamically built system prompt.
422
- - Split OpenClaw prompt-build injection into stable doctrine (`prependSystemContext`) and dynamic recalled memory (`prependContext`), preserving existing session-start, mid-session, signal, and nudge behavior.
423
- - Added the `openclawMemoryDoctrine.enabled` plugin config gate, default-enabled, so operators can disable the stable doctrine block without turning off dynamic memory injection.
424
- - Updated OpenClaw plugin docs, architecture notes, and regression coverage to reflect the new doctrine/system-context path and its no-op-session behavior.
425
-
426
- ## [0.9.86] - 2026-03-12
427
-
428
- ### Fixed
429
-
430
- - Fixed OpenClaw session-start core injection to read from a strict core-only path, preventing generic recall behavior from leaking non-core material into startup memory.
431
- - Fixed OpenClaw mid-session wildcard recall scoping so explicit `project="*"` now behaves as an intentional unscoped bypass instead of being treated like a literal project slug.
432
-
433
- ## [0.9.85] - 2026-03-11
434
-
435
- ### Changed
436
-
437
- - Raised the default OpenAI task-model baseline from `gpt-4.1-nano` to `gpt-4.1-mini` across config defaults, setup flows, and benchmark defaults after memory-reliability validation showed `mini` is the minimum viable extraction model for the bounded memory-formation contract slice.
438
- - Preserved the recently landed memory-reliability improvements through downstream OpenClaw surface-contract alignment so prompt-visible memory now honors authoritative `surfacedIds`, preserves abstain posture, and correctly surfaces commitment-shaped startup memory without procedural-noise leakage.
439
-
440
- ### Fixed
441
-
442
- - Closed the bounded currentness residual seam, bounded temporal-boundary continuity seam, memory-formation commitment-preservation tranche, and downstream OpenClaw memory-surface contract tranche as part of the current memory-reliability phase milestone.
443
-
444
- ## [0.9.84] - 2026-03-09
445
-
446
- ### Added
447
-
448
- - Added a public `agenr eval harness` CLI seam for private eval-run orchestration, including fail-closed sandbox validation that rejects default home config/DB paths and emits stable JSON metadata for harness tooling.
449
-
450
- ## [0.9.83] - 2026-03-08
451
-
452
- ### Fixed
453
-
454
- - Hardened OpenClaw session-start startup reads by preserving the `initDbForStartupReads` export in test mocks, updating startup-read assertion shapes to match the current read-safe API, aligning deferred handoff timing coverage with the current lifecycle, and eliminating a real startup PRAGMA vs `BEGIN IMMEDIATE` contention race in regression coverage.
455
-
456
- ## [0.9.82] - 2026-03-08
457
-
458
- ### Added
459
-
460
- - Added a GitHub Actions `Validate` workflow that runs on pull requests and `master` pushes, installs dependencies, runs `pnpm typecheck`, and then runs the full `pnpm check` gate.
461
-
462
- ### Changed
463
-
464
- - Documented `pnpm check` as the canonical local validation command and called out `pnpm typecheck` as the minimum fast sanity check before trusting passing tests.
465
- - Hardened update-path validation and regression coverage so validation-gate checks no longer depend on ambient host project config or local previous-session state.
466
-
467
- ## [0.9.81] - 2026-03-08
468
-
469
- ### Added
470
-
471
- - Added in-place entry metadata updates for memory hygiene, starting with `importance`, via the new `agenr update --id <id> --importance <n>` CLI command.
472
- - Added the `agenr_update` MCP tool and native OpenClaw plugin tool so agents can demote stale-but-still-true entries without retiring them.
473
- - Added focused coverage for CLI and MCP update flows plus OpenClaw plugin tool wiring.
474
-
475
- ### Fixed
476
-
477
- - Added startup-only `SQLITE_BUSY` retry/backoff for OpenClaw session-start browse and memory-index reads, reducing transient lock-induced degradation immediately after handoff recovery.
478
- - Session-start browse now logs explicit retry and unavailable states instead of collapsing lock failures into the ordinary `browse returned 0 entries` path.
479
- - Preserved existing startup fail-open rendering behavior by continuing to omit unavailable browse or memory-index sections while still completing session-start with the remaining recovered context.
480
- - Added focused regression coverage for strict startup browse execution, compatibility preservation in `runRecall()`, and session-start retry/degradation logging for browse and memory-index lock contention.
481
-
482
- ## [0.9.79] - 2026-03-08
483
-
484
- ### Fixed
485
-
486
- - Fixed OpenClaw session-start memory index observability so startup logs now distinguish successful empty loads from timeout, invalid-response, and error states instead of collapsing them all into `0 projects`.
487
- - Fixed the OpenClaw session-start core recall debug log to report configured `coreProjects` truthfully rather than mislabeling config length as "active projects".
488
- - Fixed OpenClaw session-start fallback recovery for newer TUI session keys such as `agent:main:tui-<uuid>` by allowing degraded same-family TUI predecessor acceptance when the current session identity resolves `family=tui` but cannot recover a stable lane.
489
- - Preserved strict lane matching for explicit predecessors and known-lane fallback cases, while keeping cross-family fallback candidates ineligible.
490
- - Added regression coverage for memory-index load result typing, session-start memory-index availability logging, markdown omission on unavailable index states, truthful core-project log wording, unknown-lane TUI fallback acceptance, alternate same-family TUI lane acceptance, cross-family rejection, and the new-key debug logging path.
491
-
492
- ## [0.9.78] - 2026-03-08
493
-
494
- ### Fixed
495
-
496
- - Restored OpenClaw session-start continuity for legacy TUI session keys that expose `family=tui` without explicit lane metadata by deriving a narrow compatibility lane from safe structured key forms such as `agent:main:tui` and `agent:main:macbook_tui`.
497
- - Added regression coverage ensuring legacy plain and aliased TUI keys recover same-lane explicit and fallback predecessors, while ambiguous non-lane identifiers still fail closed.
498
-
499
- ## [0.9.77] - 2026-03-08
500
-
501
- ### Fixed
502
-
503
- - Added DB-backed OpenClaw session identity breadcrumbs keyed by `sessionId`, allowing agenr to recover family and lane identity for reset-archived predecessors after OpenClaw renames live transcripts to `*.jsonl.reset.*`.
504
- - Restored same-family and same-lane OpenClaw session-start continuity across reset artifacts while preserving fail-closed rejection for different-family or different-lane predecessors.
505
- - Hardened OpenClaw session-start continuity so direct event identity now beats stale mirrored context, preventing `ctx.sessionKey` lane data from overriding an incoming event family or manufacturing a lane the event never asserted.
506
- - Hardened predecessor validation so structured identity from validated session keys and session ids now outranks stale manifest `origin.surface` metadata, preserving correct family and lane classification when those signals conflict.
507
- - Fixed session-store reverse lookup to resolve relative `sessionFile` entries against the OpenClaw sessions directory, preventing valid predecessors from collapsing to `unknown` due to path-base mismatches.
508
- - Explicit predecessor references that point at a base `*.jsonl` path now canonicalize back to the real archived transcript artifact when the live file is gone and only a supported reset or deleted artifact remains on disk.
509
-
510
- ## [0.9.76] - 2026-03-07
511
-
512
- ### Changed
513
-
514
- - Centralized recall, store, extract, retire, and trace orchestration behind shared internal service modules under `src/app/`, so the CLI, MCP server, and OpenClaw plugin reuse the same typed business logic instead of duplicating normalization and execution paths.
515
- - Centralized shared adapter tool-log normalization for Claude Code and OpenClaw so common tool-call extraction, summary rendering, and tool-result retention logic now live in one place while platform-specific behavior stays explicit where needed.
516
- - Split the DB schema internals into responsibility-based modules under `src/db/schema/` and centralized entry-read projections and row mapping in a shared helper so schema initialization, migrations, and read paths have clearer ownership with a stable public surface.
517
- - Refactored the OpenClaw `before_prompt_build` and session-start selector internals into stage-specific helper modules for startup context recovery, recall-data preparation, prompt rendering, heuristic analysis, and final selection, while preserving existing prompt composition behavior.
518
- - Added repository-wide formatting and lint tooling with Prettier, ESLint, and a top-level `pnpm check` quality gate that runs format check, lint, typecheck, and tests.
519
- - Refreshed the OpenClaw contributor and architecture docs to match the refactored module layout, including new contributor-orientation, project, and handoff lifecycle references.
520
-
521
- ### Fixed
522
-
523
- - Restored the remaining watcher, config, vector-decoding, and OpenClaw plugin regression coverage needed for the consolidated post-`0.9.75` codebase to pass the full `pnpm check` verification path.
524
- - Stabilized OpenClaw `before_prompt_build` test expectations and watcher fixtures so the stricter typed helper boundaries introduced by the refactors remain covered without weakening runtime contracts.
525
-
526
- ## [0.9.75] - 2026-03-07
527
-
528
- ### Changed
529
-
530
- - OpenClaw session-start memory injection now runs browse/core recall through a dedicated startup selector that favors continuity utility over raw browse ordering, suppresses overlap with `Recent session`, and applies hard section caps before rendering.
531
- - Session-start startup memory now treats `fact`, `event`, `lesson`, `relationship`, and `reflection` intentionally instead of sending all residual non-core entries into one broad startup bucket.
532
- - The session-start composer now reserves space for `Memory Index` before rendering `Recent memory`, so aggressive char trimming keeps recovery breadcrumbs whenever they still fit.
533
-
534
- ### Fixed
535
-
536
- - OpenClaw session-start dedupe now records only the entry IDs that actually survive selector filtering and prompt rendering, so startup-trimmed entries remain eligible for later mid-session recall.
537
- - Session-start selector freshness now treats missing or malformed `updated_at` values conservatively as stale instead of accidentally boosting them as fresh.
538
- - Tightened session-start exact-state detection to require structured operational state such as active branch/worktree/cwd, numbered PR or issue references, concrete path or file state, or explicit config/env/version state.
539
- - Added a narrow older-continuity escape hatch so importance-7 lessons, relationships, and exact-state or open-thread facts can survive beyond the freshness window when they still materially affect current work.
540
- - OpenClaw session-start browse candidate assembly now prefetches a small larger pool, caps `reflection` entries before the final 10-slot cutoff, and backfills remaining slots by existing browse score so durable non-reflection entries are not starved upstream of the selector.
541
- - Tightened OpenClaw session-start selector admission for historical decisions and preferences so high importance now boosts ranking only after current behavioral, exact-state, or real continuity evidence is present.
542
- - Made session-start `openThread` detection more precise by treating weak narrative words like `next`, `continue`, and `fix` as continuity signals only when they are very recent, while preserving stronger unfinished-work cues.
543
- - Removed a redundant post-classification cosmetic-preference filter from session-start selection and added regression coverage for stale high-importance decisions and weak versus strong continuity wording.
544
-
545
- ## [0.9.74] - 2026-03-07
546
-
547
- ### Added
548
-
549
- - Added a shared extractor-side valuation layer with source-aware priors for coding-agent transcripts and README/AGENTS/INSTALL-style repo docs, plus lightweight reason-coded tracing in verbose runs.
550
- - Added mixed-signal benchmark fixtures for README, AGENTS, INSTALL, repo cartography, and Codex transcript chatter so precision-first ingest regressions can be measured against real traps.
551
- - Added focused regression coverage for valuation punch-through and suppression behavior, including adversarial setup keyword traps, architecture-keyword cartography traps, release-rationale noise, and plain durable doc-rule fixtures.
552
-
553
- ### Changed
554
-
555
- - Extraction-driven ingest now shares the same valuation semantics across watcher and bulk ingest by gating entries centrally before downstream dedup/store cleanup.
556
- - Tightened extractor valuation so durable constraints, rationale, conventions, and concrete architecture boundaries can still punch through, while weak cues no longer beat doc/profile demotions and procedural or transient negatives on their own.
557
- - Broadened doc source-profile detection to catch README/AGENTS/INSTALL/runbook/playbook-style filename variants, including benchmark fixture names, so doc-like priors apply consistently instead of falling back to the default profile.
558
- - Tightened the extraction system prompt to reject source paraphrase, setup/onboarding replay, repo cartography, and operational chatter while still extracting buried durable signal.
559
- - `agenr benchmark` fixture discovery now includes `.md`, `.markdown`, and `.txt` sources alongside `.jsonl` sessions.
560
-
561
- ## [0.9.73] - 2026-03-06
562
-
563
- ### Added
564
-
565
- - OpenClaw now persists an explicit per-session project state in the plugin DB and exposes `agenr_set_session_project`, `agenr_get_session_project`, and `agenr_clear_session_project` so the active session can be pinned, inspected, or explicitly cleared without relying on project inference.
566
- - Session-start OpenClaw recall is now project-aware for this MVP slice: fresh sessions inherit the previous session's explicit project or explicit clear-state, inject that state as authoritative prompt context, and scope startup recall accordingly. This is intentionally limited to explicit session state at session start, not broader inferred project recall.
567
- - OpenClaw watcher extraction now re-reads explicit session project state on each pass and uses it as the primary attribution source for project-worthy entries, while preserving cleared-state "no project" behavior.
568
-
569
- ### Changed
570
-
571
- - `agenr_store` now applies project precedence as `project` passed on the tool call first, then the explicit OpenClaw session project when every entry in the batch is project-worthy, then the configured default project.
572
- - OpenClaw project attribution now fails closed for ambiguous, personal, or generic entries instead of over-scoping them into the active session project, and the same conservative project-worthiness gate is shared between tool-time and watcher-time attribution.
573
-
574
- ### Fixed
575
-
576
- - Fresh-session handoff preservation now keeps an explicit cleared session-project state authoritative, so stale handoff summaries cannot silently re-pin the next session to a previously active project.
577
-
578
- ## [0.9.72] - 2026-03-06
579
-
580
- ### Fixed
581
-
582
- - Online dedup no longer allows a higher-tier incoming entry (`core > permanent > temporary`) to end in `SKIP` against a lower-tier existing row. Higher-tier `SKIP` outcomes are now overridden to a safe `UPDATE` that preserves existing content while promoting the stored expiry.
583
- - The near-exact semantic duplicate fast path now blocks `SKIP` for higher-tier incoming entries and only auto-promotes when the subjects still align; otherwise it falls through to a non-skip path instead of swallowing the stronger lifecycle.
584
- - Added regression coverage for higher-tier `SKIP` overrides in both the store pipeline and the CLI `store` path, while preserving allowed equal-tier and lower-tier `SKIP` behavior.
585
- - Extended `verify:dist` to fail release builds unless the bundled runtime contains the higher-tier `SKIP` guard and reproduces the live failure shape as an `UPDATE` in the built artifact.
586
-
587
- ## [0.9.71] - 2026-03-06
588
-
589
- ### Fixed
590
-
591
- - Release builds now clean `dist/` before bundling, so stale hashed chunks with obsolete online-dedup merge logic no longer survive into packed artifacts.
592
- - Added `prepack` dist verification that fails packaging unless the bundled CLI runtime keeps the higher expiry tier on online-dedup `UPDATE` merges and persists `expiry = ?` in the merge SQL helper.
593
- - Added CLI store-path regression coverage that seeds a permanent row, stores an incoming core entry through `runStoreCommand`, and verifies the merged row is persisted as `core`.
594
-
595
- ## [0.9.70] - 2026-03-06
596
-
597
- ### Fixed
598
-
599
- - Online dedup `UPDATE` merges now preserve the higher expiry tier between the stored row and the incoming entry, and persist the reconciled lifecycle to the database.
600
- - Consolidation merges now preserve the highest expiry tier across source entries in both the LLM merge path and the near-exact keeper update path, and invalid or missing LLM expiry output no longer promotes all-temporary clusters to `permanent`.
601
- - Consolidation and store row mappers now normalize raw DB expiry values conservatively before applying precedence comparisons.
602
- - Added regression coverage for expiry-tier precedence across online dedup updates, consolidation merges, consolidation DB-row normalization, and in-memory dedup merging.
603
-
604
- ## [0.9.69] - 2026-03-05
605
-
606
- ### Fixed
607
-
608
- - OpenClaw session-start memory injection now renders `expiry: "core"` entries in a dedicated `### Core Context` section before the normal recall sections, instead of flattening them into generic memory groups.
609
- - Session-start memory formatting now preserves the shared memory budget while preventing core entries from being duplicated in the non-core sections.
610
-
611
- ## [0.9.68] - 2026-03-05
612
-
613
- ### Added
614
-
615
- - Added standalone `agenr synthetic` command to generate synthetic recall signals against existing database entries without re-running ingest.
616
- - Added `agenr synthetic` options for source-file scoping, similarity/session/event thresholds, dry-run mode, JSON output, and optional post-pass quality seeding.
617
- - Added command coverage for standalone synthetic execution, dry-run no-write behavior, source-file scoping, and quality seeding flow.
618
-
619
- ### Changed
620
-
621
- - `agenr backfill-claims` now runs claim extraction in parallel with a configurable `--concurrency` limit (default `5`), significantly reducing wall-clock time for large databases. The default `--batch-size` also increased from `10` to `50`.
622
-
623
- ### Fixed
624
-
625
- - `agenr ingest` now runs synthetic recall generation by default after successful ingest; use `--no-synthetic` to disable the post-ingest synthetic pass.
626
- - Updated synthetic ingest documentation and tests for the default-on behavior, including explicit `--no-synthetic` disable coverage.
627
- - Claim extraction during ingest is now disabled by default for better ingest throughput; use `--claims` to opt in, or run `agenr backfill-claims` for bulk claim extraction.
628
- - Added `agenr ingest --contradiction` to explicitly enable contradiction checks during ingest regardless of config.
629
- - Clarified and tested ingest contradiction defaults: contradiction checks remain disabled by default unless `config.contradiction.enableDuringIngest === true` or `--contradiction` is passed.
630
- - OpenClaw plugin `agenr_store` now defaults `platform` to `openclaw` when the tool call omits `platform`, while preserving explicitly passed platform values.
631
- - Added OpenClaw tool registration tests covering `agenr_store` default platform injection and explicit platform pass-through.
632
- - Fixed OpenClaw session-start dedupe persistence: `hasSeenSession`/`markSessionSeen` now use a durable `seen_sessions` SQLite table with in-memory map fast-path caching.
633
- - Added OpenClaw session dedupe diagnostics (`hasSeenSession key=... found=... mapSize=...`) to detect map resets and repeated `isFirst=true` triggers.
634
- - Added seen-session cleanup and limits for OpenClaw dedupe state (evict rows older than 24 hours and cap persisted rows to `AGENR_OPENCLAW_MAX_SEEN_SESSIONS`).
635
- - Added OpenClaw regression tests for first/second-hit dedupe behavior, persistence across simulated module reload, stale-row cleanup, and max-row capping.
636
-
637
- ## [0.9.67] - 2026-03-05
638
-
639
- ### Added
640
-
641
- - Added hybrid mid-session recall presentation in OpenClaw plugin: inject top matches and surface remaining matches as a `[MEMORY CHECK]` subject summary nudge.
642
- - Added `midSessionRecall.mode` config with `hybrid` (default), `inject` (legacy), and `nudge` modes.
643
- - Added `midSessionRecall.injectMax` config (default `2`) to control how many entries are directly injected in hybrid mode.
644
-
645
- ### Changed
646
-
647
- - Mid-session recall now defaults to `hybrid` mode instead of injecting all fresh matches.
648
- - Added nudge suppression when the most recent assistant turn already includes an `agenr_recall` tool call.
649
-
650
- ## [0.9.66] - 2026-03-04
651
-
652
- ### Added
653
-
654
- - Added `agenr recall --index --json` for project-grouped memory index output (`projects`, `totalEntries`).
655
- - Added `--null-project` as an explicit `agenr recall` filter for NULL-project-only queries.
656
- - Added OpenClaw plugin memory-index module at `src/openclaw-plugin/memory-index.ts` with dedicated formatter and unit tests.
657
- - Added pre-store embedding dedup layer for ingest (#474) with 0.90 threshold, sameType gate, event exclusion.
658
- - Added `survivorEmbeddings` return from pre-store dedup, threaded `EmbeddingCache` through write queue into `storeEntries`.
659
- - Added `embeddingCache?: EmbeddingCache` to `StoreEntriesOptions`.
660
-
661
- ### Changed
662
-
663
- - OpenClaw session-start browse recall now uses stricter universal filters (`--null-project`, `--min-importance 7`) with a 30-day window and a 20-entry cap.
664
- - OpenClaw session-start memory index is now loaded through `agenr recall --index --json`.
665
-
666
- ### Fixed
667
-
668
- - Capped consolidation reflection importance at max source importance (hard cap 8 unless source was 9+) to prevent importance inflation during merges (#472).
669
- - Added merge prompt guidance: "Merging entries does not make them more important - it makes them more concise."
670
- - Added retroactive fix to downgrade inflated importance-9 reflections to 7.
671
- - Fixed consolidate leaving superseded source entries as active; they are now properly retired with reason 'superseded' (#465).
672
- - Added maintain task to retroactively retire existing superseded-but-active ghost entries.
673
-
674
- ## [0.9.65] - 2026-03-04
675
-
676
- ### Added
677
-
678
- - Added `agenr memory-index --json [--db <path>]` to return a compact project memory index (`project`, `count`, `lastTouched`).
679
- - Added `--universal-only` to `agenr recall` to filter recall results to NULL-project entries.
680
- - Added OpenClaw plugin config `sessionStartBudgetChars` (default `12000`) to cap total session-start injected context.
681
-
682
- ### Changed
683
-
684
- - Refactored OpenClaw session-start injection to lean mode: handoff context, universal browse recall only (`project IS NULL`, importance >= 7, limit 10), and memory index summary.
685
- - Removed session-start semantic seed recall and Phase 2 dedup assembly from `before_prompt_build`.
686
- - Added a strict session-start hard cap with truncation notice so injected context cannot exceed the configured budget.
687
-
688
- ## [0.9.64] - 2026-03-04
689
-
690
- ### Fixed
691
-
692
- - Truncated OpenClaw session-start recall entry content to 500 chars by default, with configurable per-entry limits and a total formatted output cap (`maxChars`, default 10000).
693
- - Truncated OpenClaw mid-session recall entry content to 500 chars by default, with configurable per-entry limits and a total formatted output cap (`maxChars`, default 4000).
694
- - Reduced OpenClaw session-start browse recall limit from 20 to 12 entries to lower prompt injection size.
695
- - Wired formatter options through `before-prompt-build` so recall injection limits are explicitly passable for future config overrides.
696
- - Removed misplaced/dead `[System Message]` handling in `mid-session-recall.ts`: fixed `normalizeBufferedMessage` truncation path and updated `buildQuery` to return an empty query for system-message-prefixed inputs.
697
-
698
- ## [0.9.63] - 2026-03-03
699
-
700
- ### Added
701
-
702
- - `agenr checkpoint export` - export agent-curated entries to JSONL for brain rebuild preservation
703
- - `agenr checkpoint import` - re-import checkpointed entries with dedup and recall event re-linking
704
- - 3-layer export curation: mechanical filters (contradictions, never-recalled) and staleness detection (near-duplicates)
705
- - Orphaned `recall_events` automatically re-linked to imported entries via `content_fingerprint` matching
706
-
707
- ### Fixed
708
-
709
- - Heartbeat polls no longer trigger unnecessary LLM handoff calls (#458)
710
-
711
- ## [0.9.62] - 2026-03-03
712
-
713
- ### Fixed
714
-
715
- - Restored deleted integration and scoring coverage in `tests/db/recall.test.ts` after the Phase 4 field-removal rewrite.
716
- - Updated restored recall tests to the `recall_events` model: removed legacy `StoredEntry` recall fields, replaced metadata assertions with `recall_events` checks, and removed `useRecallEvents` and `recallStrength` legacy-path tests.
717
- - Restored `warmStartThreshold` and `syntheticFloor` coverage in `tests/db/recall-score-metrics.test.ts` and removed legacy compatibility assertions tied to deleted scoring paths.
718
-
719
- ### Changed
720
-
721
- - **BREAKING**: Recall scoring now exclusively uses `recall_events` table; legacy entry-level `recall_count`, `last_recalled_at`, and `recall_intervals` fields are no longer read or written
722
- - `computeSpacingFactor` simplified to use only `maxGapDays` from RecallMetrics
723
- - `scoreEntry` / `scoreEntryWithBreakdown` now require `metricsMap` parameter (no longer optional)
724
- - Retirement, health, consolidation, maintenance, and `forgettingScore` queries derive recall activity from `recall_events` table
725
- - Removed legacy `recallStrength` function (replaced by `recallStrengthFromMetrics`)
726
-
727
- ### Removed
728
-
729
- - `scoring.useRecallEvents` feature flag - recall_events is now the sole scoring path
730
- - `recall_count`, `last_recalled_at`, `recall_intervals` from `StoredEntry` type
731
- - Dual-write of entry-level recall columns in `updateRecallMetadata`
732
- - Legacy interval-parsing and imputation in `computeSpacingFactor`
733
- - In-memory recall_count mutation in CLI recall and MCP server handlers
734
-
735
- ## [0.9.61] - 2026-03-03
736
-
737
- ### Added
738
-
739
- - **Synthetic cold-start signals** (#417 Phase 3): `agenr ingest --bulk --synthetic` now runs a post-ingest cross-session mention analysis pass. Entries that appear across multiple session transcripts receive synthetic recall events so they start with meaningful recall profiles instead of flat zero-history signals.
740
- - `--synthetic` and `--synthetic-dry-run` flags for `agenr ingest`.
741
- - Quality score seeding from synthetic recall signals with four tiers (`0.6`, `0.65`, `0.7`, `0.8`) based on distinct session count and temporal spread. Seeding is guarded so only entries still at `quality_score = 0.5` are updated.
742
-
743
- ### Improvements
744
-
745
- - Synthetic event generation writes flat `signal_value = 0.4` per event (frequency is carried by event count), caps ANN fan-out at top-5 neighbors per entry, and uses chunked transaction batches with `INSERT OR IGNORE` idempotency on the existing synthetic dedup index.
746
-
747
- ## 0.9.60 (2026-03-03)
748
-
749
- ### Features
750
-
751
- - feat(recall): add Phase 2 scoring switchover to read recall signals from `recall_events` behind `scoring.useRecallEvents` (#417)
752
- - feat(recall): add batch `RecallMetrics` aggregation (`getRecallMetricsBatch`) with chunked SQL + max-gap window query
753
- - feat(recall): add `recallStrengthFromMetrics` warm-start blending and live-first recency anchor (`lastLiveRecalledAt` fallback chain)
754
- - feat(recall): thread metrics-aware scoring through primary recall and cluster/graph/relation expansion paths
755
-
756
- ### Tests
757
-
758
- - test(recall): add unit coverage for `getRecallMetricsBatch` counts, timestamps, signal sum, max-gap, and chunking
759
- - test(recall): add unit coverage for metrics-based recall strength, spacing override, and metrics-map scoring behavior
760
- - test(recall): add integration coverage for `useRecallEvents` on/off behavior, no-events fallback, session-start path, spacing override, and expansion candidates
761
-
762
- ## 0.9.59 (2026-03-03)
763
-
764
- ### Features
765
-
766
- - feat(schema): add `recall_events` table for durable recall event storage (#417)
767
- - feat(schema): application-level trigger to orphan recall events on entry deletion
768
- - feat(migration): migrate existing recall_count/recall_intervals data to recall_events
769
- - feat(recall): dual-write recall events on every recall alongside entry-level cache
770
- - feat(merge): re-link recall events during both LLM merge and rules-based merge
771
-
772
- ### Tests
773
-
774
- - test(schema): recall_events table creation and indexes
775
- - test(migration): epoch-to-ISO conversion, migrated vs migrated_approx tagging, sentinel guard
776
- - test(trigger): entry deletion orphans recall events
777
- - test(recall): updateRecallMetadata inserts recall_events with correct fields
778
- - test(merge): recall events re-linked for both merge paths, fingerprint preserved
779
-
780
- ## 0.9.58 (2026-03-03)
781
-
782
- ### Improvements
783
-
784
- - Rewrite reflection synthesis prompt for fact preservation - LLM now preserves all numbers, versions, and paths; can reject incoherent clusters; anti-editorializing rules added (#443)
785
-
786
- ## 0.9.57 (2026-03-03)
787
-
788
- ### Improvements
789
-
790
- - Semantic coherence gate on cluster formation - clusters below 0.45 average pairwise cosine similarity are rejected to prevent cross-domain contamination in reflections (#441)
791
-
792
- ## 0.9.56 (2026-03-03)
793
-
794
- ### Bug Fixes
795
-
796
- - Deterministic importance inheritance for reflections - importance is now computed from source entries instead of hardcoded to 8 (#442)
797
-
798
- ## 0.9.55 (2026-03-03)
799
-
800
- ### Scoring Improvements
801
-
802
- - Fix session-start candidate selection to include importance-ordered entries, not just recency (#audit-R1)
803
- - Replace relative normalization with log-scale absolute thresholds in quality evolution (#audit-Q2)
804
- - Add cold-start awareness to quality blend ratio - sparse usage data no longer drags scores down (#audit-Q1/Q3)
805
- - Gentler decay penalty for never-recalled entries in quality evolution (#audit-Q4)
806
- - Drop SIGNAL_UNCLEAR from 0.4 to 0.2 for faster quality decay on unused entries (#audit-F1)
807
- - Increase feedback EMA alpha from 0.2 to 0.3 for more responsive quality updates (#audit-F2)
808
- - Add quality_score as factor in retirement forgettingScore (#audit-F6)
809
- - Add confirmation bonus (up to +10%) to recall scoring (#audit-R4)
810
- - Source-weighted initial quality: watcher entries start at 0.4, manual stores at 0.6 (#audit-F5)
811
- - Wire all new scoring parameters into ScoringConfig for config-only tuning
812
-
813
- ## 0.9.54 (2026-03-03)
814
-
815
- ### Bug Fixes
816
-
817
- - Fix checkpoint not being deleted after successful consolidation when merges occur (#434)
818
- - Add allPhasesCompleted tracking to prevent deferredPhase3Work from incorrectly persisting checkpoints
819
-
820
- ## 0.9.53 (2026-03-03)
821
-
822
- ### Performance
823
-
824
- - Consolidation now tracks changes per entry type, skipping dedup for unchanged types (#430)
825
- - Add 30-minute minimum entry age filter to prevent active session ingestion from triggering wasteful consolidation runs
826
- - Reduces LLM calls during cron when only some entry types have new data
827
-
828
- ## 0.9.52 (2026-03-03)
829
-
830
- ### Bug Fixes
831
-
832
- - Fix consolidation checkpoint not being deleted after successful completion (#431)
833
- - Fix toErrorMessage losing context for non-Error objects (#365)
834
- - Fix mapBufferToVector throwing on unaligned ArrayBufferView byteOffset (#366)
835
- - Fix resolveUserPath incorrectly expanding ~username paths (#367)
836
- - Fix isHeartbeatPoll not detecting heartbeat prompts, causing unnecessary mid-session recall
837
- - Fix resolveUserPath not handling Windows-style backslash paths (CodeRabbit)
838
-
839
- ### Improvements
840
-
841
- - Add progress counter to reflection task during maintain (#404)
842
-
843
- ## 0.9.51 (2026-03-03)
844
-
845
- ### Bug Fixes
846
-
847
- - Fix runTraceTool passing unrecognized --json flag to trace CLI (#426)
848
-
849
- ### Performance
850
-
851
- - Consolidation now skips entirely when no entries changed since last successful run (#427)
852
- - Uses watermark pattern (same as edge-decay) to detect entry changes
853
- - Reduces cron consolidation from ~10 minutes to <1 second when brain is stable
854
- - Checkpoint-aware: always resumes interrupted runs regardless of watermark
855
-
856
- ## 0.9.50 (2026-03-02)
857
-
858
- ### Features
859
-
860
- - agenr_trace tool for entry provenance (#386)
861
- - New `agenr trace <entry_id>` CLI command
862
- - New `agenr_trace` OpenClaw plugin tool
863
- - Traces reflections back to source entries, and entries forward to reflections
864
- - Also shows merge provenance from consolidation
865
- - Supports lookup by entry_id, subject match, or --last flag
866
- - New `src/db/provenance.ts` module with `getEntryProvenance()` and `findEntryBySubject()`
867
-
868
- ## 0.9.49 (2026-03-02)
869
-
870
- ### Features
871
-
872
- - Stale reflection detection and invalidation during maintain (#418)
873
- - New `stale-reflections` maintain task runs before reflection synthesis
874
- - Detects reflections with >50% retired or updated source entries
875
- - Retires stale reflections automatically, freeing clusters for re-synthesis
876
- - Pure DB queries (no LLM required), respects --dry-run and --apply flags
877
- - New DB helpers: getActiveReflections, getSourceEntryStalenessCounts
878
-
879
- ### Bug Fixes
880
-
881
- - Stronger reflection demotion in recall scoring (#410)
882
- - Default REFLECTION_DEMOTION lowered from 0.85 to 0.70
883
- - Cluster bonus no longer applied to reflection entries (breaks circular boost)
884
- - Reflection entries excluded from cluster peer expansion
885
- - Break recall scoring feedback loop (#414)
886
- - recallStrength capped at 0.5 (was 1.0) to prevent recall from dominating scores
887
- - Removed RECALL_MILESTONES automatic importance promotion (counts 3, 10, 25)
888
- - Importance now only changes via explicit updates or re-extraction
889
-
890
- ### Tests
891
-
892
- - 5 new stale-reflections task tests (retired/updated majority, healthy, dry-run, no sources)
893
- - 3 new DB-layer tests for staleness detection helpers
894
- - 2 new cluster bonus tests for reflection skip behavior
895
- - Updated recall scoring tests for new defaults and removed milestones
896
- - Updated maintain task ordering tests for new stale-reflections task
897
-
898
- ## 0.9.48 (2026-03-02)
899
-
900
- ### Features
901
-
902
- - Reflections now inherit and synthesize tags from their source entries (#388)
903
- - Tags appearing on 2+ source entries are included (all tags for small clusters)
904
- - "reflection" tag always prepended for identifiability
905
- - Capped at 10 tags per reflection, sorted by frequency
906
- - Fixes FTS/tag-based recall blindness for all reflection entries
907
-
908
- ### Bug Fixes
909
-
910
- - Cap freshness bonus at 1.0 for reflection entries to prevent synthesized
911
- summaries from crowding out raw entries in recall results (#410)
912
-
913
- ### Tests
914
-
915
- - 8 new tests for reflection tag inheritance (DB queries + task integration)
916
-
917
- ## 0.9.47 (2026-03-02)
918
-
919
- ### Bug Fixes
920
-
921
- - Added reflection type demotion in recall scoring (default 0.85x) to prevent reflections from crowding out specific raw entries in recall results
922
- - Added `scoring.reflectionDemotion` config knob (range 0-1) with normalization and recall score breakdown visibility
923
-
924
- ## 0.9.46 (2026-03-02)
925
-
926
- ### Improvements
927
-
928
- - Rewrote reflection verification prompt to evaluate synthesis quality instead of completeness (#411)
929
- - Replaces fact-checker framing with synthesis quality reviewer
930
- - Checks accuracy (misrepresentation) separately from theme coverage
931
- - Omissions are expected and no longer penalized
932
- - Lowered default reflection coverage threshold from 0.7 to 0.5
933
- - Added parse error retry with JSON-only nudge and permissive fallback
934
- - Parallelized reflection cluster processing in configurable batches to reduce maintain runtime overhead (#409)
935
- - Adds `maintain.reflectionConcurrency` (default `5`) for batch size control
936
- - Moves per-cluster work into a standalone `processCluster` flow
937
- - Adds per-batch progress logging with estimated minutes remaining
938
- - Adds SQLITE_BUSY retry/backoff for reflection write transactions under concurrent load
939
-
940
- ### Bug Fixes
941
-
942
- - Bumped OpenClaw plugin store timeout from 10s to 30s to prevent agenr_store timeouts with larger brains (#412)
943
-
944
- - Eliminated ~25% false negative verification failures caused by prompt bias
945
-
946
- ## 0.9.45 (2026-03-02)
947
-
948
- ### Features
949
-
950
- - Reduced default min cluster size from 3 to 2 for better pair clustering (#402)
951
- - Added subject-match clustering phase for entries sharing exact subjects (#402)
952
- - Lowered default cosine similarity threshold from 0.72 to 0.68 (#402)
953
-
954
- ### Bug Fixes
955
-
956
-
957
- - `maintain --full` now bypasses cluster freshness guard (#399)
958
-
959
- ## 0.9.44 (2026-03-02)
960
-
961
- ### Features
962
-
963
- - Make recall scoring parameters configurable via `scoring.*` config keys (#392)
964
- - Allows tuning recall weights, boosts, and thresholds without code changes
965
- - Threads scoring config through recall and session-start recall paths
966
- - Add graph recall config knobs: graphBonus, graphSeedCount, graphNeighborLimit, graphMinEdgeWeight, graphMinSeedVectorSim (#392)
967
- - Suppress demoted source entries when their reflection is in recall results (#389)
968
- - Prevents redundant results when both a reflection and its sources match a query
969
- - Backfills results to maintain requested limit after suppression
970
-
971
- ## 0.9.43 (2026-03-02)
972
-
973
- ### Features
974
-
975
- - Embedding-based clustering fallback for orphan entries (#387)
976
- - Assigns orphans to nearest existing cluster by embedding similarity
977
- - Forms new clusters from orphans with similar embeddings
978
- - Configurable similarity threshold (default 0.72), max cluster size (default 50)
979
- - New `method` column on clusters table (`co_recall` | `embedding`)
980
- - Reports fallback stats in detectAndStoreClusters result
981
-
982
- ### Bug Fixes
983
-
984
-
985
- - Replace sigmoid scoring compression with sqrt for better score differentiation (#390)
986
- - Old formula squashed all scores into 0.22-0.26 band (0.033 spread)
987
- - New sqrt compression gives 0.50-0.67 range (0.17 spread, 5x improvement)
988
- - FTS bonus moved from additive post-compression (0.15) to multiplicative pre-compression (1.3x)
989
- - Importance/recall blend (70/30) replaces MAX - recall history now always contributes
990
- - Apply --limit flag to reflection task cluster count (#385)
991
- - Tighten extraction importance calibration to reduce inflation (#391)
992
- - Added stronger downward pressure in calibration text
993
- - Rebalanced examples: two 8s lowered to 7, added importance-6 example
994
- - Production showed 30.7% of entries at 8+ vs 20% target
995
-
996
- ### Tests
997
-
998
- - 8 new tests for embedding fallback clustering
999
- - 3 new tests for scoring (spread, FTS proportionality, recall contribution)
1000
- - 1 new test for reflection limit enforcement
1001
-
1002
- ## 0.9.42 (2026-03-02)
1003
-
1004
- ### Features
1005
- - **Periodic reflection and synthesis** (#269): New `reflection` maintain task that
1006
- synthesizes clusters of related entries into higher-level reflections using
1007
- two-step LLM prompting (question generation + synthesis) with a verification pass.
1008
- Source entries are importance-demoted (not retired) so raw knowledge remains
1009
- accessible. Co-recall edges are transferred to reflection entries for graph
1010
- continuity.
1011
- - New entry type: `reflection` for synthesized knowledge
1012
- - New `reflections` table for process metadata
1013
- - Extended `entry_sources` with `action` column for unified provenance tracking
1014
- - New `--full` flag for full-brain reflection (ignores change detection)
1015
- - Configurable: reflection model, verification model, coverage threshold, demotion
1016
- amount, importance threshold, cluster size minimum
1017
- - Re-synthesis guards: minimum cumulative importance threshold for changed entries
1018
-
1019
- ### Bug Fixes
1020
-
1021
- - Fix parseSynthesisResponse bailing on first JSON candidate instead of trying alternatives
1022
- - Fix verification prompt missing explicit check instructions
1023
- - Fix demoteEntryImportance/retireReflectionEntry using wall clock instead of injected time
1024
- - Fix transferCoRecallEdges silently dropping stronger edges (now uses MAX weight)
1025
- - Fix verification ignoring the verified boolean (only checked coverage_score)
1026
- - Extract shared JSON parsing utilities to reduce duplication
1027
- - Add cluster churn detection for re-synthesis safety
1028
-
1029
- ## 0.9.41 - 2026-03-01
1030
-
1031
- ### Fixed
1032
- - Recall score saturation: sigmoid compression + multiplicative boosts preserve ranking discrimination (#341)
1033
- - Classifier now recognizes bare numbers, issue refs (#380), and version patterns (v0.9.22) as entities (#331)
1034
- - Skip expensive recall and context injection when session-start is triggered by heartbeat poll (#340)
1035
- - Extraction prompt now skips hypothetical examples, test data, and mock entities (#283)
1036
- - Extraction prompt now skips meta-conversation about the knowledge base itself (#248)
1037
-
1038
- ### Tests
1039
- - Score saturation: ranking preservation tests, updated ratio assertions to ordering
1040
- - Classifier: numeric reference detection with positive and negative cases
1041
- - Heartbeat detection: pattern matching and session skip verification
1042
- - Extraction prompt: anti-pattern content validation
1043
-
1044
- ## 0.9.40 - 2026-03-01
1045
-
1046
- ### Fixed
1047
- - Add HH:MM:SS timestamps to all createLogger output lines (#380)
1048
-
1049
- ### Tests
1050
- - Updated logger tests to validate timestamp format and ranges
1051
-
1052
- ## 0.9.39 - 2026-03-01
1053
-
1054
- ### Changed
1055
- - Migrated colocated test files out of `src/` into `tests/` with mirrored folder structure and updated relative imports to target `src/` from their new locations.
1056
- - Merged colliding test suites into existing `tests/` files for:
1057
- - `openclaw-plugin/index`
1058
- - `openclaw-plugin/recall`
1059
- - `db/store`
1060
- - Moved the large `src/commands/init.test.ts` suite to `tests/commands/init-src.test.ts` to preserve Vitest mock isolation while removing the `src/` colocated test file.
1061
- - Removed `src/llm/__tests__/` after moving `stream-registry.test.ts` to `tests/llm/`.
1062
-
1063
- ## 0.9.38 - 2026-03-01
1064
-
1065
- ### Changed
1066
- - Refactored `src/openclaw-plugin/index.ts` to decompose `register()` into thin wiring and move hook logic into new modules under `src/openclaw-plugin/hooks/`:
1067
- - `before-prompt-build.ts`: `handleBeforePromptBuild()` for session-start recall, mid-session recall, signals, and store nudging.
1068
- - `before-reset.ts`: `handleBeforeReset()` for feedback, quality checks, and reset handoff handling.
1069
- - `register-tools.ts`: `registerAgenrTools()` for `agenr_recall`, `agenr_store`, `agenr_extract`, and `agenr_retire` registration.
1070
- - `types.ts`: shared hook parameter interfaces.
1071
- - Preserved existing plugin exports and behavior by keeping `__testing` in `index.ts` and passing explicit params into extracted handlers.
1072
- - Added an explicit hook-wiring test to verify `register()` still registers `before_prompt_build`, `before_reset`, and `command`.
1073
-
1074
- ## 0.9.37 - 2026-03-01
1075
-
1076
- ### Added
1077
- - Added `src/utils/logger.ts` with a shared `createLogger` factory and global verbose controls (`setVerbose`, `isVerbose`) to standardize stderr logging output.
1078
- - Added `tests/utils/logger.test.ts` coverage for logger method shape and stderr output behavior for `info`, `warn`, `error`, and `debug`.
1079
-
1080
- ### Changed
1081
- - Replaced ad-hoc logging in targeted modules with the shared logger factory, including maintain helpers, OpenClaw plugin debug/handoff paths, DB conflict and contradiction flows, store pipeline diagnostics, claim extraction diagnostics, whole-file and extractor warnings, shutdown logging, and selected command-level logging paths.
1082
- - Updated maintain LLM logging to use a dedicated `maintain-llm` logger prefix instead of raw prefixed strings.
1083
-
1084
- ## 0.9.36 - 2026-03-01
1085
-
1086
- ### Changed
1087
- - Split `src/cli-main.ts` into focused command registration modules under `src/cli/`:
1088
- - `helpers.ts`: shared CLI helpers (`stderrLine`, `assertReadableFile`, `createEmptyStats`, `formatTaskModelLines`, `toReportKey`)
1089
- - `extract.ts`: extract types (`ExtractCommandOptions`, `CliDeps`), `runExtractCommand`, and extract command registration
1090
- - `store.ts`, `recall.ts`, `retire.ts`, `review.ts`, `edges.ts`, `eval.ts`, `watch.ts`, `todo.ts`, `ingest.ts`, `benchmark.ts`, `consolidate.ts`, `maintain.ts`, `conflicts.ts`, `backfill.ts`, `init.ts`, `mcp.ts`, `watcher.ts`, `db.ts`, `setup.ts`, `config.ts`, `auth.ts`: command-specific registration builders
1091
- - Slimmed `src/cli-main.ts` to a composition root that wires `register*Command` functions and keeps the root status action inline.
1092
- - Preserved `src/cli-main.ts` public extract exports by re-exporting `ExtractCommandOptions`, `CliDeps`, and `runExtractCommand` from `src/cli/extract.ts`.
1093
- - Added CLI registration coverage test to verify `createProgram()` registers all expected top-level commands.
1094
-
1095
- ## 0.9.35 - 2026-03-01
1096
-
1097
- ### Changed
1098
- - Split `src/db/recall.ts` into focused modules under `src/db/recall/`:
1099
- - `index.ts`: recall orchestration and public exports
1100
- - `types.ts`: recall types and shared defaults
1101
- - `score.ts`: recall scoring and recency math
1102
- - `filters.ts`: recall filter helpers
1103
- - `candidates.ts`: SQL candidate and FTS retrieval
1104
- - `graph.ts`: co-recall graph neighbor expansion
1105
- - `cluster.ts`: cluster peer expansion
1106
- - `metadata.ts`: recall metadata update queue and persistence
1107
- - `helpers.ts`: stored-entry mapping, tags, and recall text helpers
1108
- - Updated all source and test imports to use `src/db/recall/index.ts`.
1109
- - Added recall export coverage test to verify core public recall exports remain available after the split.
1110
-
1111
- ## 0.9.34 - 2026-03-01
1112
-
1113
- ### Changed
1114
- - Split `src/commands/maintain.ts` into focused modules under `src/commands/maintain/`:
1115
- - `index.ts`: maintain orchestration and task registry wiring
1116
- - `types.ts`: shared maintain types/constants
1117
- - `helpers.ts`: option parsing, task execution, and shared utility helpers
1118
- - `report.ts`: maintain run reporting/rendering
1119
- - `history.ts`: maintain history rendering and history command
1120
- - `tasks/clusters.ts`, `tasks/quality.ts`, `tasks/edge-decay.ts`, `tasks/conflicts.ts`, `tasks/consolidation.ts`, `tasks/retirement.ts`, `tasks/snapshot.ts`: task executors and task-specific helpers
1121
- - Updated maintain imports in CLI and tests to `src/commands/maintain/index.ts`.
1122
- - Added maintain export coverage test to verify the public command API and type exports remain available after the split.
1123
-
1124
- ## 0.9.33 - 2026-03-01
1125
-
1126
- ### Changed
1127
- - Split `src/commands/ingest.ts` into focused modules under `src/commands/ingest/`:
1128
- - `index.ts`: ingest command orchestration and reporting
1129
- - `file-resolver.ts`: input glob and file resolution helpers
1130
- - `bulk-store.ts`: bulk-mode dedup and store pipeline
1131
- - `target-processor.ts`: per-file extract/store processing and watch offset sync
1132
- - `pipeline.ts`: worker pool, first pass, and retry orchestration
1133
- - `progress.ts`: progress rendering and byte formatting helpers
1134
- - `helpers.ts`: ingest-specific retry, cleanup, and ingest-log helpers
1135
- - Updated ingest imports across CLI, command runtime, and tests to use `src/commands/ingest/index.ts`.
1136
- - Added an ingest export coverage test to verify the public `runIngestCommand` API and type exports remain available after the split.
1137
-
1138
- ### Fixed
1139
- - Ingest bulk mode now reports `StoreResult.total_entries` correctly as `added + skipped`.
1140
- - Ingest command now initializes `embeddingApiKey` without a redundant always-true guard.
1141
- - Progress rendering now uses ANSI clear-line (`\x1b[2K\r`) so shorter updates do not leave trailing characters.
1142
- - File resolver now treats `[` and `]` as literal characters and fails fast on missing file paths with explicit `File not found` or `Directory not found` errors.
1143
- - Force re-ingest and failed-file cleanup delete sequences now run inside transactions with rollback on failure.
1144
- - Ingest worker loop now catches unexpected per-target exceptions and records file-level errors instead of aborting the whole pass.
1145
- - Bulk ingest teardown now preserves both pipeline and cleanup errors by attaching cleanup failure as cause when both happen.
1146
- - Chunk-failure counters now avoid double-counting the same file across retries by applying per-file deltas.
1147
-
1148
- ## 0.9.32 - 2026-03-01
1149
-
1150
- ### Changed
1151
- - Split src/openclaw-plugin/index.ts (1,858 lines) into focused modules
1152
- - session-handoff.ts: transcript building, LLM summarization, handoff orchestration
1153
- - session-state.ts: session tracking, LRU, signal state
1154
- - plugin-db.ts: plugin database lifecycle
1155
- - index.ts: hook wiring and tool registration
1156
-
1157
- ## 0.9.31 - 2026-03-01
1158
-
1159
- ### Changed
1160
- - Split src/db/store.ts (1,908 lines) into 4 focused modules under src/db/store/
1161
- - queries.ts: DB query helpers, hashing, similarity search, entry insertion
1162
- - online-dedup.ts: LLM-based online dedup pipeline
1163
- - planner.ts: entry action planning, mutation application, subject resolution
1164
- - index.ts: storeEntries orchestration and public API
1165
-
1166
- ## 0.9.30 - 2026-03-01
1167
-
1168
- ### Changed
1169
- - Split src/extractor.ts (2,569 lines) into focused modules under src/extractor/
1170
- - parser.ts: entry validation, coercion, and schema mapping
1171
- - dedup.ts: LLM dedup pipeline and batch processing
1172
- - prefetch.ts: related entry pre-fetching and blocked subjects
1173
- - chunk-runner.ts: chunk extraction with retry logic
1174
- - debug.ts: extraction debug logging
1175
- - index.ts: pipeline orchestration and public API
1176
- - Centralized all LLM prompts under src/prompts/ (extraction, maintain, consolidate, handoff)
1177
-
1178
- ## 0.9.29 - 2026-03-01
1179
-
1180
- ### Changed
1181
- - Extracted shared utilities into dedicated modules: `parsePositiveInt`, `resolveUserPath`, vector math, sleep, `toErrorMessage`, and `isRecord`.
1182
- - Deduplicated copy-pasted utility functions across 30+ files.
1183
- - Fixed imports for `toNumber`, `toStringValue`, and `MILLISECONDS_PER_DAY` to use existing shared exports.
1184
-
1185
- ## 0.9.28 (2026-03-01)
1186
-
1187
- ### Added
1188
- - `agenr maintain` now includes an opt-in `edge-decay` mechanical task that
1189
- attenuates co-recall edge weights over time when `maintain.edgeDecay: true`
1190
- is set in config. Runs with `--skip-llm`. (#270)
1191
- - Added `--prune-edges` flag to `agenr maintain` for explicit pruning of
1192
- co-recall edges below the configured decay floor. Pruning is no longer
1193
- automatic. (#270)
1194
- - Added `maintain` config section support in `AgenrConfig` with
1195
- `edgeDecay`, `edgeDecayFactor`, `edgeDecayFloor`, and `clusterStaleHours`.
1196
- (#270)
1197
- - LLM-powered conflict resolution task in maintain command.
1198
- - `maintain` model task added to config (for conflict resolution,
1199
- consolidation, retirement).
1200
- - Shared LLM call wrapper for maintenance tasks.
1201
- - Auto-resolve for high-confidence conflicts, recommend-only for ambiguous.
1202
- - `--apply` flag overrides both confidence threshold and high-importance (>=9)
1203
- protection for conflict resolution.
1204
- - Per-conflict atomic commits with failure tracking.
1205
- - Consolidation task in maintain command wrapping existing consolidation
1206
- infrastructure. Default mode: dry-run assessment. With `--apply`: runs
1207
- full LLM-driven cluster merging via orchestrator. (#270)
1208
- - Retirement task in maintain command using forgettability scoring
1209
- (`1 - retentionScore`). LLM confirms each retirement with `--apply`.
1210
- High-importance entries (>=9) require `--apply`, importance 10 always
1211
- protected. (#270)
1212
- - Retirement prompt template for LLM-confirmed entry retirement decisions.
1213
- - Co-recall edge cleanup on retirement (matches retireEntries behavior).
1214
- - SQL pre-filters and LIMIT 5000 safety cap on retirement candidate query.
1215
- - `--cron` flag for scheduled/unattended maintenance runs with
1216
- min-interval guard and quiet output. (#270)
1217
- - Config fields: `consolidationSimThreshold`, `consolidationLimit`,
1218
- `retirementLimit`, `retirementMinAgeDays`, `retirementMinForgettingScore`.
1219
-
1220
- ### Changed
1221
- - Consolidation similarity threshold default lowered from 0.9 to 0.76 (matching
1222
- standalone `agenr consolidate` defaults). Floor lowered from 0.8 to 0.7. (#270)
1223
- - `decayCoRecallEdges()` now supports floor, cutoff-date, and prune mode
1224
- options, returns full decay stats, and clamps low weights to floor by
1225
- default instead of deleting them. (#270)
1226
- - Edge decay safety guards added to maintain task flow:
1227
- sabbatical guard (no recall in 14 days), reinforcement exemption (skip
1228
- edges reinforced since last decay), and idempotency watermark (skip if last
1229
- decay was under 20 hours ago). (#270)
1230
- - Maintain task order updated to: quality -> edge-decay -> clusters ->
1231
- conflicts -> consolidation -> retirement -> snapshot. (#270)
1232
- - `--limit` flag now controls all LLM tasks (conflicts, consolidation,
1233
- retirement), not just conflicts.
1234
- - Maintain command description updated to reflect all available tasks.
1235
- - Verbose LLM debug logging for maintain conflict resolution, retirement, and
1236
- consolidation tasks (model name, prompt preview, response preview, token
1237
- usage, parsed decisions). Uses `[AGENR:maintain-llm]` prefix.
1238
- - Migrated maintain log prefixes to `[AGENR:tag]` convention:
1239
- `[MAINTAIN]` -> `[AGENR:maintain]`,
1240
- `[CONFLICT-RESOLVE]` -> `[AGENR:conflict-resolve]`,
1241
- `[CONFLICT-LOG]` -> `[AGENR:conflict-log]`.
1242
- - `--cron` skip message now outputs valid JSON when `--json` is also passed.
1243
- - `--cron` help text now mentions the 55-minute minimum interval guard.
1244
-
1245
- ### Fixed
1246
- - Retirement scoring uses forgettability (`1 - retentionScore`) to correctly
1247
- target stale entries instead of inverting polarity. (#270)
1248
- - Retirement timestamps use injected `context.now` instead of SQLite
1249
- `datetime('now')` for testability.
1250
- - Conflict task: resolve errors tracked separately from LLM errors.
1251
- - Conflict task: failure count lookback filters for runs that included
1252
- conflicts task.
1253
- - Conflict task: corrupted `summary_json` in previous runs handled
1254
- gracefully.
1255
- - Config: `autoResolveConfidence` floor enforced at normalization level
1256
- (0.5).
1257
- - Config: `retirementMinForgettingScore` floor enforced at 0.1.
1258
-
1259
- ## 0.9.27 (2026-03-01)
1260
-
1261
- ### Added
1262
- - Programmatic conflict resolution API (`src/db/conflict-resolution.ts`) with
1263
- `resolveConflict()`, `getConflictWithEntries()`, and
1264
- `getPendingConflictsWithEntries()` functions. Enables automated conflict
1265
- resolution by the upcoming `agenr maintain` command (#270). (#270)
1266
- - `resolution_reasoning` column on conflict_log table for storing why a
1267
- conflict was resolved (human or automated reasoning). (#270)
1268
- - `resolved_by` column on conflict_log table for tracking resolution source
1269
- (user, auto, janitor). (#270)
1270
- - Debug logging with `[CONFLICT-RESOLVE]` and `[CONFLICT-LOG]` prefixes
1271
- for conflict resolution pipeline observability.
1272
-
1273
- ### Changed
1274
- - Conflict resolution logic extracted from conflicts-ui.ts into reusable
1275
- conflict-resolution.ts module. UI behavior unchanged. (#270)
1276
-
1277
- ## 0.9.26 (2026-02-28)
1278
-
1279
- ### Added
1280
- - agenr clusters command - discovers topic clusters from the co-recall graph
1281
- using label propagation community detection. Supports --detect, --detail,
1282
- --json, and --min-size flags. (#303)
1283
- - Cluster-aware recall boost - entries from the same cluster as top recall
1284
- results receive a 0.10 score bonus, improving topical coherence of
1285
- recall results. Works alongside the existing co-recall graph boost. (#303)
1286
- - Clusters summary section added to agenr health output showing total
1287
- clusters, largest cluster, and orphan entry count. (#303)
1288
- - New clusters table and entries.cluster_id column for persistent
1289
- cluster storage. (#303)
1290
-
1291
- ### Bug Fixes
1292
-
1293
- - Cluster-aware recall now batches cluster peer lookups into a single
1294
- fetch pass, avoiding per-peer N+1 entry queries. (#303)
1295
- - Cluster-aware recall now applies the cluster bonus symmetrically to
1296
- existing scored entries in seed clusters and records `scores.cluster`
1297
- for both existing and injected entries. (#303)
1298
- - Cluster detection now returns an explicit convergence flag, and the
1299
- `agenr clusters` command surfaces a warning when propagation does not
1300
- converge within the iteration cap. (#303)
1301
- - Re-detection now clears `entries.cluster_id` only for rows that are
1302
- currently clustered, avoiding unnecessary full-table updates. (#303)
1303
- - Cluster detection persistence now uses `db.transaction("write")` so
1304
- cluster resets, inserts, and member assignments run atomically on a
1305
- single libsql transaction connection. (#303)
1306
- - Cluster peer lookup now excludes retired entries before applying limits,
1307
- preventing retired rows from consuming cluster boost peer slots. (#303)
1308
- - `agenr clusters --min-size` now fails fast on invalid values instead of
1309
- silently defaulting, with a descriptive positive-integer error message. (#303)
1310
-
1311
- ## 0.9.25 (2026-02-28)
1312
-
1313
- ### Bug Fixes
1314
-
1315
- - Health command now reads conflict data from conflict_log table instead of
1316
- the never-incremented entries.contradictions column. Shows total conflicts,
1317
- breakdown by relation type, pending count, and auto-resolved count. (#334)
1318
- - High-confidence coexists conflicts (>0.8) now auto-resolve instead of being
1319
- flagged for review. Previously, any coexists involving decision or lesson
1320
- types was flagged regardless of confidence, creating a false backlog. (#335)
1321
- - OpenClaw plugin: system messages (e.g. subagent completions) now classify
1322
- as trivial for mid-session recall, preventing wasted embedding API calls
1323
- on garbage queries containing session IDs and boilerplate text.
1324
-
1325
- ## 0.9.24 (2026-02-28)
1326
-
1327
- ### Bug Fixes
1328
-
1329
- - Added storeNudge to openclaw.plugin.json configSchema so OpenClaw accepts
1330
- storeNudge config without validation errors
1331
-
1332
- ## 0.9.23 (2026-02-28)
1333
-
1334
- ### Added
1335
- - `agenr db evolve-quality` command - computes quality scores from recall frequency,
1336
- co-recall graph connectivity, confirmations, importance, and time-based decay
1337
- - Supports --dry-run and --json flags
1338
- - Quality scores now differentiate entries instead of sitting static at 0.5
1339
- - Bumped default store nudge maxPerSession from 3 to 5 for better coverage in longer sessions
1340
-
1341
- ## 0.9.22 (2026-02-28)
1342
-
1343
- ### Bug Fixes
1344
-
1345
- - OpenClaw plugin: added missing pronouns (You, She, They) to
1346
- FALSE_POSITIVE_NOUNS so short messages like "You there?" correctly
1347
- classify as trivial instead of triggering recall. (#329)
1348
-
1349
- ### Improvements
1350
- - OpenClaw plugin: standardized all log output with `[AGENR:tag]`
1351
- prefix for easy filtering from OpenClaw internal logs. (#329)
1352
-
1353
- ## 0.9.21 (2026-02-28)
1354
-
1355
- ### Improvements
1356
- - OpenClaw plugin: simplified mid-session recall from three-tier
1357
- classification (trivial/normal/complex) to two-tier (trivial/recall).
1358
- All non-trivial messages now use a single recall limit of 8, eliminating
1359
- fragile regex-driven classification that missed edge cases like
1360
- "What's the status of X?" being classified as normal instead of complex.
1361
- Config fields normalLimit and complexLimit are deprecated in favor of
1362
- a single limit field. (#326)
1363
-
1364
- ## 0.9.20 (2026-02-28)
1365
-
1366
- ### Bug Fixes
1367
-
1368
- - OpenClaw plugin: mid-session recall query now uses the raw current
1369
- message instead of accumulating a sliding window with stop-word
1370
- stripping. Fixes garbled queries that returned irrelevant context.
1371
- - OpenClaw plugin: tightened message classifier to avoid marking
1372
- conversational acks as complex. Messages with no entities, temporal
1373
- patterns, or recall phrases now correctly classify as normal or
1374
- trivial regardless of length.
1375
- - OpenClaw plugin: expanded trivial phrase list and added word-count
1376
- gate so low-signal conversational messages skip recall entirely.
1377
- - OpenClaw plugin: recall queries are capped at 200 chars to prevent
1378
- large data pastes from producing oversized embedding queries. (#323)
1379
-
1380
- ## 0.9.19 (2026-02-28)
1381
-
1382
- ### Features
1383
- - OpenClaw plugin: store nudging - injects a system nudge when the
1384
- agent has not called agenr_store in 8+ turns (configurable via
1385
- storeNudge plugin config). Nudges are spaced by the threshold
1386
- interval, capped at 3 per session. (#290)
1387
-
1388
- ## 0.9.18 (2026-02-28)
1389
-
1390
- ### Features
1391
- - OpenClaw plugin: subsequent-turn auto-recall with heuristic message
1392
- classifier. Messages are classified as trivial (skip), normal (5 results),
1393
- or complex (8 results) based on entity detection, temporal references,
1394
- and explicit recall phrases. Queries built from a sliding window of
1395
- recent messages with Jaccard similarity dedup. Recalled entries are
1396
- deduplicated against session-start context. Configurable via
1397
- midSessionRecall plugin config.
1398
-
1399
- ### Bug Fixes
1400
-
1401
- - MCP: fix stdout corruption during store and contradiction checks.
1402
- Diagnostic logs in db/store.ts and db/contradiction.ts were writing to
1403
- stdout via console.log, corrupting MCP JSON-RPC framing. Routed all
1404
- diagnostic logging to stderr via console.error.
1405
-
1406
- ### Changed
1407
- - Removed agenr_store tool from MCP server. Coding agents should rely on
1408
- Watcher for knowledge ingest from session transcripts. Reduces MCP
1409
- surface area and eliminates stdout corruption risk.
1410
- - Removed store option from agenr_extract MCP tool. Extract now returns
1411
- extracted entries without storing them.
1412
-
1413
- ### Tests
1414
- - 16-case message classifier test suite
1415
- - Query builder, similarity check, and state management tests
1416
- - Integration tests for mid-session recall in before_prompt_build
1417
- - MCP stdout corruption test
1418
- - Updated MCP server tests for removed store tool and extract store option
1419
-
1420
- ## 0.9.17 - 2026-02-27
1421
-
1422
- ### Changed
1423
- - Optimized LLM dedup in consolidate clustering: batch up to 10 pairs per API
1424
- call with 5 concurrent batches. Reduces a 2400-pair dedup queue from ~60min
1425
- (sequential, 1 call per pair) to ~2min.
1426
-
1427
- ## 0.9.16 - 2026-02-27
1428
-
1429
- ### Added
1430
- - Added progress logging throughout the consolidate pipeline. Pairwise
1431
- similarity scan, rules phases, cluster processing, LLM dedup checks, and
1432
- LLM merge calls now report progress so users can see the system is working.
1433
- Phase-level progress logs are always shown (not gated behind `--verbose`).
1434
- - Added live cluster progress updates with ETA during consolidation phases so
1435
- long-running Phase 1, Phase 2, and Phase 3 work shows continuous terminal
1436
- activity.
1437
-
1438
- ## 0.9.14 - 2026-02-27
1439
-
1440
- ### Fixed
1441
- - Fixed a pi-ai dual module registry bug that caused bundled `streamSimple`
1442
- calls and consolidate LLM dedup pre-screening to silently fail. `tsup`
1443
- split pi-ai imports across separate ESM instances with separate API
1444
- registries; `runSimpleStream` now imports from
1445
- `@mariozechner/pi-ai/dist/stream.js` so provider registration and stream
1446
- lookup use the same registry instance.
1447
- - Reverted the 0.9.13 workaround that made consolidate loose-band LLM dedup
1448
- opt-in only when `--loose-threshold` was set.
1449
-
1450
- ## 0.9.13 - 2026-02-27
1451
-
1452
- ### Changed
1453
- - LLM dedup pre-screening in consolidate is now opt-in via --loose-threshold.
1454
- Without it, consolidate uses subject-aware auto-union in the loose band but
1455
- skips LLM calls, avoiding potentially hundreds of sequential API round-trips.
1456
-
1457
- ## 0.9.12 - 2026-02-27
1458
-
1459
- ### Fixed
1460
- - Register pi-ai API providers before streamSimple calls so consolidate
1461
- LLM dedup and merge can resolve the OpenAI/Anthropic streaming backend.
1462
- Root cause: tsup tree-shook the side-effect import; now uses explicit
1463
- registration via ensureApiProviders() guard.
1464
- - Added 15s timeout to LLM dedup pre-screening calls in consolidate clustering
1465
- to prevent hangs from unresponsive LLM endpoints.
1466
-
1467
- ## 0.9.10 - 2026-02-27
1468
-
1469
- ### Added
1470
- - Ingest creates co-recall edges between entries extracted from the same
1471
- session file, seeding the graph for graph-augmented recall after fresh
1472
- installs or DB resets (#300).
1473
- - Ingest backfills co-recall edges for already-ingested files on re-ingest
1474
- without requiring --force (#300).
1475
- - Consolidation clustering now uses in-memory pairwise cosine similarity
1476
- instead of per-entry SQLite vector queries, eliminating O(N) database
1477
- round-trips (#263).
1478
- - Consolidation clustering now supports a loose similarity band with
1479
- subject-aware auto-union and optional LLM pre-screening to catch
1480
- semantically equivalent entries below the tight cosine threshold (#264).
1481
- - Consolidation reports now include loose-band LLM dedup pre-screen call and
1482
- match counts across phases (#264).
1483
-
1484
- ## 0.9.9 - 2026-02-27
1485
-
1486
- ### Added
1487
- - Graph-augmented recall: top embedding matches seed 1-hop traversal of
1488
- co-recall edges, pulling in associatively connected entries that similarity
1489
- alone would miss. Graph neighbors are scored with real embedding similarity
1490
- plus an additive graph bonus (0.15 * edge weight). Seeds are selected by
1491
- embedding similarity only to prevent recency bias (#297).
1492
-
1493
- ## 0.9.8 - 2026-02-27
1494
-
1495
- ### Added
1496
- - Co-recall edge creation (Hebbian learning): entries that are both recalled and
1497
- used in the same session form weighted associations. Edges strengthen on
1498
- repeated co-occurrence and decay over time (#267 Phase 2).
1499
- - Review queue: entries flagged for human review are tracked in a dedicated table.
1500
- Low-quality entries (quality_score < 0.2 after 10+ recalls) are auto-flagged
1501
- for retirement review (#267 Phase 2).
1502
- - `agenr review` command to list, dismiss, or retire flagged entries.
1503
- - `agenr edges` command to inspect co-recall edges.
1504
- - Co-recall edge statistics and review queue summary in `agenr health` output.
1505
-
1506
- ## 0.9.7 - 2026-02-27
1507
-
1508
- ### Fixed
1509
- - `agenr init` no longer pins MCP config to a version-specific path. It now
1510
- resolves the `agenr` shim or binary on PATH so upgrades take effect
1511
- automatically (#294).
1512
-
1513
- ## 0.9.6 - 2026-02-27
1514
-
1515
- ### Added
1516
- - `--around <date>` flag for recall: shifts recency scoring to peak at a target
1517
- date instead of now. Entries closer to the target date rank higher regardless
1518
- of whether they are older or newer than it (#189).
1519
- - `--around-radius <days>` flag: controls the window width for `--around` queries
1520
- (default: 14 days). Also auto-sets since/until bounds when not explicitly
1521
- provided.
1522
- - `gaussianRecency` scoring function for temporal targeting.
1523
- - `agenr_recall` native tool now exposes `around` and `aroundRadius` parameters
1524
- for temporal targeting in mid-session recall.
1525
- - MCP server `agenr_recall` tool now exposes `around` and `aroundRadius`
1526
- parameters for temporal targeting.
1527
-
1528
- ## 0.9.5 - 2026-02-27
1529
-
1530
- ### Added
1531
- - Feedback-driven recall scoring (#267 Phase 1): recalled entries are tracked per
1532
- session and compared against agent responses at session end. Entries that are
1533
- used get quality score boosts; unused entries drift slightly downward.
1534
- - Correction signal: if the agent stores a contradicting entry via agenr_store
1535
- during the session, the recalled entry that was corrected gets a strong
1536
- negative signal (quality score drops toward 0).
1537
- - Rolling quality_score (0-1) per entry, integrated into recall ranking formula.
1538
- Consistently useful entries rank higher over time.
1539
- - Entry-type quality floor: facts and preferences cannot drop below 0.35 to
1540
- prevent background-context entries from being unfairly penalized.
1541
- - Auto-strengthen: entries reaching recall count milestones (3, 10, 25) get
1542
- importance bumped by 1 (capped at 9, never auto-promotes to 10).
1543
- - Quality score distribution in `agenr health` output.
1544
-
1545
- ## 0.9.4 (2026-02-27)
1546
-
1547
- ### Changed
1548
- - refactor: removed top-level `model` config field; `models` is now required with all four task keys (extraction, claimExtraction, contradictionJudge, handoffSummary) always explicit (#277)
1549
- - `resolveModelForTask` simplified to direct lookup (no fallback chain)
1550
- - `isCompleteConfig` now checks for complete `models` instead of top-level `model`
1551
- - Old configs with top-level `model` auto-upgrade on read (value populates all task models)
1552
- - `config set model <value>` removed; use `config set models.extraction <value>` etc.
1553
-
1554
- ## 0.9.3 (2026-02-26)
1555
-
1556
- ### Added
1557
- - feat: `config set` now supports per-task model overrides via dot-path keys (for example, `models.extraction`, `models.claimExtraction`) (#276)
1558
- - Set value to `default` to remove an override and fall back to the global model
1559
- - Schema: subject_entity, subject_attribute, subject_key, claim_predicate, claim_object, claim_confidence columns on entries table (#266)
1560
- - Schema: conflict_log table for contradiction audit trail (#266)
1561
- - Schema: idx_entries_subject_key partial index (#266)
1562
- - SubjectIndex: in-memory subject key index with lazy initialization (#266)
1563
- - ConflictLogEntry type definition (#266)
1564
- - Claim extraction: dedicated LLM call extracts structured claims (subject/predicate/object) from entries at store time (#266)
1565
- - Config: per-task model configuration via config.models (#266)
1566
- - Setup: optional advanced per-task model selection in setup wizard (#266)
1567
- - resolveModelForTask() helper for consistent model resolution (#266)
1568
- - Tuned claim extraction prompt for entity normalization and reduced false no_claim results (#266)
1569
- - Fixed benchmark fixtures for edge cases (#266)
1570
- - Tuned claim extraction prompt: short-claim guidance, no-claim edge cases, entity hint from subject field (#266)
1571
- - Fixed benchmark fixtures: fact-breed alt values, decision-release-strategy realistic object (#266)
1572
- - Added alternate expected values to claim scorer for entity, attribute, predicate, object (#266)
1573
- - Expanded predicate equivalence groups and soft matches (#266)
1574
- - Removed personal information from claim extraction prompt and benchmark fixtures (#266)
1575
- - Added contradiction detection core: LLM judge classifies entry pairs as supersedes/contradicts/coexists/unrelated (#266)
1576
- - Added type-specific resolution: auto-supersede for facts and preferences, flag decisions and lessons for review (#266)
1577
- - Added conflict log for tracking detected contradictions and their resolutions (#266)
1578
- - Added contradiction judge benchmark: fixtures, scorer, and CLI flag --judge for regression testing the LLM judge (#266)
1579
- - Rewrote contradiction judge prompt: singular vs additive attribute heuristic, shorter and more focused for nano (#266)
1580
- - Tuned judge benchmark fixtures for clarity (#266)
1581
- - Fixed contradiction judge prompt regression: reverted temperature setting, restored original prompt structure with targeted additive-attribute guidance (#266)
1582
- - Added alternate accepted relations to ambiguous judge benchmark fixtures: sup-diet, sup-storage, edge-event-immutable, edge-similar-different (#266)
1583
- - Integrated contradiction detection into store pipeline: runs after claim extraction on ADD decisions, resolves conflicts with type-specific rules (#266)
1584
- - Contradiction detection is enabled by default for all store paths (watcher, plugin, CLI, ingest) (#266)
1585
- - Added production logging for claim extraction, contradiction detection, and conflict resolution (#266)
1586
- - Added `agenr backfill-claims` command to extract claims for existing entries, enabling subject index and contradiction detection on older knowledge (#266)
1587
- - Added `agenr conflicts` command: local web UI for reviewing and resolving detected contradictions (#266, seeds #171)
1588
- - Init wizard: per-task model selection for extraction, claim extraction, contradiction judge, and handoff summary (#266)
1589
-
1590
- ### Fixed
1591
- - fix: CLI banner now displays the current agenr version (#278)
1592
- - fix: setup and init wizards now write explicitly selected task models even when they match defaults (#275)
1593
- - fix: resolveConflict now reads autoSupersedeConfidence from config instead of hardcoding 0.85 (#275)
1594
- - fix: claim fields explicitly propagated through mutation pipeline (#275)
1595
- - fix: supersede + insert wrapped in transaction for online-dedup path (#275)
1596
- - fix: entity names with slashes sanitized during claim extraction (#275)
1597
- - fix: LLM judge errors now logged via console.warn instead of silent fallback (#275)
1598
- - fix: entity alias resolution no longer depends on single-entity heuristic (#275)
1599
- - Critical: conflicts UI "keep-new"/"keep-old" resolution was retiring the wrong entry (swarm review)
1600
- - Contradiction detection: cap subject-index candidates to maxCandidates, sort by recency
1601
- - Contradiction detection: always run both subject-index and embedding search (removed hardcoded < 3 gate)
1602
- - Contradiction detection: parallelize classifyConflict LLM calls via Promise.all
1603
- - Contradiction detection: high-confidence supersession with lower importance now flags for review instead of silent coexist
1604
- - Contradiction detection: lowered default similarity threshold from 0.72 to 0.55 (matches real contradiction scores)
1605
- - Contradiction detection: entity hint injection from DB for consistent claim extraction across sessions
1606
- - Contradiction detection: fuzzy attribute matching fallback in subject index
1607
- - Contradiction detection: cross-entity lookup for same-attribute conflicts across entity aliases
1608
- - Subject index rebuild is now atomic (swap instead of clear-then-populate)
1609
- - Conflicts UI: request body size limit (64KB), auth token on POST endpoints, safe browser open
1610
- - Extracted shared LLM helpers (clampConfidence, resolveModelForLlmClient, extractToolCallArgs) to src/db/llm-helpers.ts
1611
- - Removed unnecessary Float32Array conversions in contradiction detection pipeline
1612
- - Replaced __pendingConflicts side-channel with scoped Map
1613
- - Init wizard: change model without re-running auth setup (#275)
1614
-
1615
- ## 0.9.2 (2026-02-26)
1616
-
1617
- ### Fixed
1618
- - fix(consolidate): fragmented clustering produced duplicate canonical entries instead of a single winner (#249)
1619
- - Phase 1 now over-fetches neighbors (3x) when type-filtered to preserve same-type neighborhood coverage
1620
- - Added a new Phase 3 post-merge dedup pass to merge near-duplicate canonical entries created in the same run
1621
- - Phase 3 disables idempotency and only processes clusters that include entries created during the current run
1622
-
1623
- ## 0.9.1 (2026-02-26)
1624
-
1625
- ### Changed
1626
- - Renamed `agenr daemon` CLI command to `agenr watcher` - "watcher" better describes what it does
1627
- - `agenr daemon` still works as a hidden compatibility command
1628
- - Updated user-facing command output to say "watcher" instead of "daemon"
1629
-
1630
- ### Internal
1631
- - Renamed `src/commands/daemon.ts` to `src/commands/watcher.ts`
1632
- - Renamed daemon command interfaces and exports from `Daemon*`/`runDaemon*` to `Watcher*`/`runWatcher*`
1633
-
1634
- ## 0.9.0 (2026-02-25)
1635
-
1636
- ### Features
1637
- - Interactive onboarding wizard for `agenr init` (#170)
1638
- - Auth setup with API key links and connection testing
1639
- - Embeddings API key connectivity check during setup
1640
- - Platform auto-detection for OpenClaw and Codex (macOS, Linux, Windows)
1641
- - OpenClaw directory confirmation with custom path support
1642
- - DB isolation prompt for non-default OpenClaw paths (shared vs isolated)
1643
- - Project slug derivation with interactive edit
1644
- - Reconfigure mode with "keep current" defaults
1645
- - Change tracking for auth, model, embeddings, directory, and DB path
1646
- - Global projects map in `~/.agenr/config.json` for OpenClaw and Codex
1647
- - Keyed by directory path (multiple instances can share the same project slug)
1648
- - Stores platform, project slug, and optional dbPath per instance
1649
- - Per-repo platforms (Cursor, Claude Code, Windsurf) unchanged
1650
- - Current config display shows all registered projects with directories and DB isolation status
1651
- - `resolveProjectFromGlobalConfig()` helper for O(1) project lookup by directory
1652
- - Shared DB warning when same project slug and same database across instances
1653
- - Fix: OpenClaw sessionsDir correctly resolves to agents/main/sessions
1654
- - OpenClaw plugin auto-install with gateway restart during wizard
1655
- - Isolated DB path auto-written to OpenClaw plugin config (no manual editing)
1656
- - Session file scanner with recursive discovery, mtime filtering, size totals
1657
- - Cost estimation before ingest using model pricing from @mariozechner/pi-ai
1658
- - "Recent" ingest passes only last-7-day file paths; "full" uses directory glob
1659
- - Bulk ingest integration (--workers 10 --concurrency 1 --whole-file)
1660
- - Post-ingest consolidation prompt (merges near-duplicates from bulk ingest)
1661
- - Watcher daemon setup on macOS with launchd (120s interval)
1662
- - Re-ingest flow on model/auth change: stops watcher, resets DB, re-ingests
1663
- - Expanded setup summary with plugin/ingest/consolidate/watcher status
1664
- - Next steps section for skipped or failed wizard steps
1665
-
1666
- ### Changed
1667
- - Refactored setup.ts: extracted `runSetupCore()` for programmatic use
1668
- - Subscription auth methods moved to "Advanced options" submenu
1669
- - Default recommended model changed to gpt-4.1-mini
1670
- - Non-interactive init behavior preserved when CLI flags are provided
1671
- - Skip .gitignore writes for OpenClaw and Codex (not git repos)
1672
-
1673
- ### Fixed
1674
- - Test isolation: init wizard tests use isolated config path via `AGENR_CONFIG_PATH`
1675
- - fix(init): `installOpenClawPlugin` no longer forces the `OPENCLAW_HOME`
1676
- environment variable on OpenClaw CLI calls, preventing production config
1677
- overwrites when targeting a non-default directory (e.g. sandbox)
1678
- - fix(init): wizard now adds `"agenr"` to `plugins.allow` in the target
1679
- OpenClaw config, ensuring the plugin is explicitly trusted and suppressing
1680
- the auto-load warning
1681
-
1682
- ## [0.8.40] - 2026-02-25
1683
-
1684
- ### Added
1685
- - New `agenr benchmark` CLI command to run extraction against benchmark session
1686
- fixtures, score results against rubric JSON, and report per-session plus overall
1687
- metrics (recall, partial recall, precision proxy, composite, pass rate)
1688
- - New benchmark scoring engine in `src/benchmark/scorer.ts` with continuous
1689
- rule scoring, entry claiming, regex-based must-skip checks, count/importance
1690
- gates, and composite score penalties
1691
- - New benchmark types in `src/benchmark/types.ts` and JSON output schema with
1692
- reproducibility metadata (`prompt_hash`, `fixture_hash`, model/version/runs)
1693
- - Multi-run benchmark aggregation with mean/min/stdev composite reporting and
1694
- pass-rate tracking
1695
- - New scorer regression test suite (`src/benchmark/scorer.test.ts`) covering
1696
- perfect pass, partial credit paths, regex fallback, count and ceiling penalties,
1697
- case-insensitive matching, entry-claiming, and rule specificity ordering
1698
-
1699
- ### Fixed
1700
- - Fix: benchmark chunk text now joins messages with newline separator instead of empty string
1701
- - Fix: --user-only on ingest now yields zero chunks when no user messages found (was falling back to full content)
1702
- - Fix: added --user-only and --context options to CLI docs
1703
-
1704
- ### Changed
1705
- - Extraction pipeline now accepts optional `temperature`, `logDir`, and `logAll`
1706
- parameters so benchmark runs can force deterministic temperature (`0`) and
1707
- capture per-chunk LLM request/response debug logs
1708
- - Extraction prompt: strengthened skip-by-default opening, added EPHEMERAL vs DURABLE classification gate
1709
- - Extraction prompt: shifted default importance from 7 to 6, recalibrated Score 6/7 descriptions across all calibration blocks
1710
- - Extraction prompt: added 6 new anti-patterns (items 11-16) for concrete noise rejection (typos, version bumps, publish events, file observations, tautological facts)
1711
- - Extraction prompt: added 6 new SKIP examples in few-shot section to rebalance extract:skip example ratio
1712
- - Extraction prompt: added anti-consolidation instruction for personal facts with per-fact granularity and subject naming guidance
1713
- - Extraction prompt: added project convention decisions to DURABLE classification list
1714
- - Extraction prompt: improved anti-pattern #16 with extractable vs skip examples for file observations
1715
- - Extraction prompt: added anti-pattern #17 for release-engineering session noise
1716
- - Extraction prompt: whole-file calibration now distinguishes technical (consolidate) vs personal (granular) entries
1717
- - Benchmark: now runs in whole-file mode to match real ingest behavior
1718
- - Benchmark: relaxed rubric content_contains matching for paraphrase resilience
1719
- - Extraction prompt: rewrote whole-file calibration with 3-step process (session triage, user message priority, constrained extraction)
1720
- - Extraction prompt: added importance ceiling of 8 for coding/technical sessions, tightened inflation threshold from 30% to 20%
1721
- - Extraction prompt: added anti-pattern #18 for agent capability/tool setup announcements
1722
- - Extraction prompt: file contents read by agent during startup/exploration explicitly distinguished from user speech
1723
-
1724
- ## [0.8.39] - 2025-02-25
1725
-
1726
- ### Features
1727
- - **ingest:** Add LLM debug logging via `--log-dir`, `--log-all`, and `--sample-rate` flags (#238)
1728
- - Captures raw LLM prompt input and response output per chunk
1729
- - Logs dedup before/after entry lists
1730
- - Best-effort writes, never blocks extraction
1731
- - Sampling defaults to 1-in-10 files; use `--log-all` for full capture
1732
-
1733
- ### Tests
1734
- - Add tests for ingest debug logging: file creation, sampling, dedup logs, graceful failure on bad logDir
1735
-
1736
- ## [0.8.38] - 2026-02-24
1737
-
1738
- ### Fixed
1739
- - Handoff log line now shows model ID string instead of [object Object]
1740
- - Upgraded handoff retirement and browse debug logs from logger.debug to
1741
- console.log for production visibility
1742
- - Handoff transcript now strips OpenClaw/agenr injected context (memory
1743
- blocks, signals, conversation metadata, timestamp prefixes) before
1744
- sending to the LLM, preventing the summarizer from summarizing its own
1745
- metadata (#235)
1746
-
1747
- ### Added
1748
- - Opt-in `handoff.includeBackground` config flag for handoff summarizer: when
1749
- enabled, prior session messages are included as background context with strong
1750
- section headers so the LLM can orient without blending stale facts into the
1751
- current session summary (#235)
1752
- - New system prompt variant with anti-hallucination instructions for background
1753
- context mode ("BACKGROUND CONTEXT (DO NOT SUMMARIZE)" / "SUMMARIZE THIS
1754
- SESSION ONLY" section headers)
1755
- - Optional `handoff.logDir` config: when set, writes the full LLM request
1756
- transcript and response to files for prompt tuning and debugging (#235)
1757
-
1758
- ### Changed
1759
- - Default handoff behavior unchanged: current session only, no prior messages
1760
-
1761
- ### Removed
1762
- - All temporary [AGENR-PROBE] debug logging from openclaw-plugin (replaced with
1763
- clean operational logs where needed)
1764
-
1765
- ## [0.8.37] - 2026-02-24
1766
-
1767
- ### Fixed
1768
- - openclaw-plugin: await runHandoffForSession in session_start handler instead of void
1769
- fire-and-forget; webchat /new goes through sessions.reset RPC which does not trigger
1770
- before_reset, so session_start is the only hook that fires on that path - making it
1771
- void meant the LLM summary was always dropped (closes #232)
1772
-
1773
- ## [0.8.36] - 2026-02-24
1774
-
1775
- ### Fixed
1776
- - openclaw-plugin: await LLM upgrade in runHandoffForSession instead of fire-and-forget; the gateway awaits before_reset so the LLM call can and should block until the summary is stored (closes #230)
1777
- - openclaw-plugin: raise Phase 1 fallback store success/failure logs from logger.debug to console.log for production visibility (extends #223)
1778
-
1779
- ## [0.8.34] - 2026-02-24
1780
-
1781
- ### Fixed
1782
- - rebuild dist - --force flag missing from 0.8.33 artifact (stale build)
1783
-
1784
- ## [0.8.33] - 2026-02-24
1785
-
1786
- ### Fixed
1787
- - retire --force flag skips confirmation prompts for programmatic retirement (#225)
1788
- - runRetireTool now passes --force so high-importance handoff entries (imp >= 8) are properly retired (#225)
1789
-
1790
- ## [0.8.32] - 2026-02-24
1791
-
1792
- ### Fixed
1793
- - summarizeSessionForHandoff: changed logger.debug to console.log for all skip-reason
1794
- and LLM call logging so output is visible in gateway.err.log at production log level
1795
- (closes #223)
1796
-
1797
- ## [0.8.31] - 2026-02-24
1798
-
1799
- ### Fixed
1800
- - plugin: LLM handoff now logs transcript size, model, and summary length before/after the LLM call for observability (#221)
1801
- - plugin: fallback handoff retirement now matches by subject+importance+tag only, dropping fragile content equality check that left stale fallback entries alongside LLM summaries (#221)
1802
-
1803
- ## [0.8.30] - 2026-02-24
1804
-
1805
- ### Fixed
1806
- - Rebuild dist to include Phase 1A handoff trigger missing from 0.8.29.
1807
- The dist/ artifact in 0.8.29 was stale - runHandoffForSession() call added
1808
- in the 0.8.29 source (commit e3222c5) was not present in the published
1809
- package. No logic changes. Build-only fix.
1810
-
1811
- ## [0.8.29] - 2026-02-24
1812
-
1813
- ### Added
1814
- - Phase 1A now triggers LLM handoff summarization (fire-and-forget) when a
1815
- previous session file is found at session start. This is a reliable
1816
- fallback for the before_reset/command hook paths that do not fire in
1817
- current OpenClaw versions due to a dispatch gap (openclaw/openclaw#25074).
1818
- The existing before_reset and command hook paths are unchanged.
1819
-
1820
- ### Changed
1821
- - runHandoffForSession source type now includes "session_start"
1822
-
1823
- ### Tests
1824
- - 5 new tests in session-handoff.test.ts covering the Phase 1A handoff
1825
- trigger path
1826
-
1827
- ## [0.8.28] - 2026-02-24
1828
-
1829
- ### Fixed
1830
- - command hook fires before_reset handoff logic for RPC-triggered /new (closes #210)
1831
- - before_reset hook only fires in the in-process auto-reply path; sessions.reset RPC
1832
- path only fires the command hook
1833
- - new command hook handler reads and parses the session JSONL directly, then runs
1834
- the same Phase 1 fallback store + Phase 2 LLM upgrade logic
1835
- - dedup guard (Set<sessionId>) prevents double-writes when both hooks fire in
1836
- auto-reply path
1837
-
1838
- ### Added
1839
- - [AGENR-PROBE] debug logging throughout command hook path for observability
1840
- (to be removed in a future cleanup pass)
1841
- - readAndParseSessionJsonl() helper to parse JSONL session files line by line
1842
- - runHandoffForSession() shared helper extracted from before_reset for reuse
1843
-
1844
- ### Tests
1845
- - 5 new tests for command hook handoff behavior in index.test.ts
1846
-
1847
- ## [0.8.27] - 2026-02-24
1848
-
1849
- ### Changed
1850
- - Add stderr debug probes to openclaw plugin to diagnose before_reset hook dispatch issue
1851
- - Probes: register() entry, hook registrations, session_start handler, before_reset handler entry and guard points
1852
-
1853
- ## [0.8.26] - 2026-02-23
1854
-
1855
- ### Added
1856
- - feat(openclaw-plugin): LLM-summarized multi-session handoff entry at
1857
- before_reset (#199). Builds a merged transcript from the current session
1858
- (via event.messages) and the most recent prior .reset.* file (if under
1859
- 24h old), labeled with timestamps and surface (webchat/telegram/etc.)
1860
- from sessions.json. Summarizes via the configured LLM (from agenr config,
1861
- default gpt-4.1-nano) into a structured four-section handoff. Falls back
1862
- to raw text extraction on any failure. Handler is now properly async with
1863
- awaited store call.
1864
-
1865
- ### Changed
1866
- - fix(openclaw-plugin): before_reset handoff store now uses a two-phase flow to
1867
- avoid race windows with detached hook execution. Phase 1 stores fallback
1868
- exchange text immediately at importance 9, then Phase 2 asynchronously upgrades
1869
- to an importance 10 LLM summary when available.
1870
- - fix(openclaw-plugin): when the LLM upgrade succeeds, fallback handoff entries
1871
- are looked up and retired (subject/content/tag match) before storing the
1872
- upgraded summary, preventing stale fallback carryover.
1873
- - fix(openclaw-plugin): prior reset session surface lookup now maps
1874
- `*.jsonl.reset.*` files back to base `*.jsonl` paths via getBaseSessionPath,
1875
- and unknown surface fallback now uses "prior session" to improve prompt context.
1876
- - fix(openclaw-plugin): capTranscriptLength now enforces a hard length cap even
1877
- when the current session alone exceeds 8000 chars.
1878
- - chore(openclaw-plugin): added before_reset debug logs for missing sessionFile,
1879
- missing apiKey, and pre-LLM invocation traceability.
1880
-
1881
- ### Tests
1882
- - test(openclaw-plugin): added coverage for getBaseSessionPath, reset-path surface
1883
- resolution, capTranscriptLength edge cases (prior-only overflow, current-only
1884
- overflow, under-cap passthrough), missing-apiKey debug behavior, budget tail
1885
- slicing assertions, and buildMergedTranscript ordering.
1886
- - test(openclaw-plugin): updated before_reset integration coverage for two-phase
1887
- fallback-plus-upgrade storage behavior and no-sessionFile debug path.
1888
-
1889
- ## [0.8.25] - 2026-02-23
1890
-
1891
- ### Changed
1892
- - fix(openclaw-plugin): strip OpenClaw conversation metadata JSON blocks from
1893
- extractRecentTurns() output (issue #208)
1894
- - fix(openclaw-plugin): extractRecentTurns() now reads JSONL bottom-up, ensuring
1895
- most recent turns are always included when maxTurns budget is exceeded
1896
- - fix(openclaw-plugin): increase RECENT_TURN_MAX_CHARS from 150 to 300
1897
- - fix(openclaw-plugin): normalize internal whitespace in extracted turns (collapse
1898
- newlines/spaces to single space) to keep " | " separator clean
1899
-
1900
- ### Tests
1901
- - test(openclaw-plugin): added tests for metadata stripping, bottom-up reading,
1902
- and whitespace normalization in extractRecentTurns()
1903
-
1904
- ## [0.8.22] - 2026-02-23
1905
-
1906
- ### Changed
1907
- - feat(openclaw-plugin): replace thin-prompt/stash session-start recall with three-phase
1908
- cross-session context injection (issue #205)
1909
- - Phase 1A (always): reads last 7 user+assistant turns from most recently modified
1910
- session JSONL file in ~/.openclaw/agents/<agentId>/sessions/
1911
- - Phase 1B (always): runs agenr recall --browse --since 1d --limit 20, picks up
1912
- importance:10 handoff entry written at /new time
1913
- - Phase 2 (conditional): semantic recall seeded from Phase 1A turns + first user
1914
- message if >= 5 words; results deduplicated against Phase 1B by entry id
1915
- - Handoff entries retired after first use (one-time read)
1916
- - feat(openclaw-plugin): added findPreviousSessionFile, extractRecentTurns,
1917
- buildSemanticSeed to src/openclaw-plugin/session-query.ts
1918
- - feat(openclaw-plugin): findPreviousSessionFile uses parallel stat() calls for
1919
- performance on large sessions dirs
1920
- - feat(openclaw-plugin): sessionsDir configurable via AgenrPluginConfig.sessionsDir;
1921
- defaults to ~/.openclaw/agents/<agentId>/sessions using ctx.agentId with "main"
1922
- fallback
1923
- - feat(openclaw-plugin): RunRecallOptions extended with limit?: number to support
1924
- --limit flag in browse recall
1925
- - refactor(openclaw-plugin): removed isThinPrompt, resolveSessionQuery,
1926
- sessionTopicStash, stashSessionTopic, shouldStashTopic, sweepInterval, clearStash,
1927
- readLatestArchivedUserMessages
1928
-
1929
- ### Tests
1930
- - test(openclaw-plugin): added unit tests for findPreviousSessionFile, extractRecentTurns,
1931
- buildSemanticSeed in session-query.test.ts
1932
- - test(openclaw-plugin): added integration tests for three-phase before_prompt_build flow,
1933
- Phase 2 deduplication, and isFirstInSession guard in index.test.ts
1934
- - test(openclaw-plugin): added second-message guard test (isFirstInSession prevents
1935
- re-injection on subsequent messages in same session)
1936
-
1937
- ## [0.8.19] - 2026-02-23
1938
-
1939
- ### Changed
1940
- - feat(openclaw-plugin): `before_reset` handoff store content now uses a structured recent exchange summary (`U:`/`A:` turns) instead of user-only fragments, improving cross-session handoff clarity while keeping stash-based recall seeding unchanged (issue #196)
1941
- - feat(openclaw-plugin): added `extractLastExchangeText(messages, maxTurns?)` in `src/openclaw-plugin/session-query.ts` to collect the last 5 user-turn windows with interleaved assistant context, per-turn truncation (200 chars), and chronological `U:`/`A:` formatting
1942
- - chore(openclaw-plugin): exported `SESSION_QUERY_LOOKBACK` from `session-query.ts` for direct test assertions
1943
-
1944
- ### Tests
1945
- - test(openclaw-plugin): added `extractLastExchangeText` coverage for empty input, U/A formatting, per-message truncation, 5-user-turn collection window, and no-extractable-content behavior
1946
- - test(openclaw-plugin): updated handoff-store integration assertion to verify stored content includes exchange context prefixes (`U:`/`A:`) rather than flattened user-only text
1947
-
1948
- ## [0.8.18] - 2026-02-23
1949
-
1950
- ### Changed
1951
- - feat(openclaw-plugin): `before_prompt_build` now uses browse-mode recall (`--browse --since 1d`) for cold session starts where no stash/query seed is available, and keeps embed/query recall for substantive or stash-seeded starts (issue #196)
1952
- - chore(openclaw-plugin): removed archived-session fallback query synthesis from session-start recall seeding, simplifying thin-prompt startup behavior to browse vs stash/embed paths only (issue #196)
1953
- - feat(openclaw-plugin): `before_reset` now stores a fire-and-forget `event` memory entry (`session handoff ...`) with the latest user context to support next-session handoff continuity (issue #196)
1954
- - feat(openclaw-plugin): session-start browse results now auto-retire surfaced handoff entries after context injection to avoid repeated carryover (`reason: consumed at session start`) (issue #196)
1955
- - feat(openclaw-plugin): `runRecall` in `src/openclaw-plugin/recall.ts` now accepts an optional context options object and maps browse context to CLI browse args while preserving existing default/session-start call behavior for unchanged callers (issue #196)
1956
-
1957
- ### Tests
1958
- - test(openclaw-plugin): updated query-seeding coverage for new cold-start browse path and removed archive-fallback-specific expectations (issue #196)
1959
- - test(openclaw-plugin): added regression coverage for before-reset handoff storage and session-start handoff auto-retire success, non-handoff skip, missing-id skip, and retire-failure resilience (issue #196)
1960
- - test(openclaw-plugin): added plugin recall browse-args unit coverage to assert `runRecall` browse flag construction and query omission behavior (issue #196)
1961
-
1962
- ## [0.8.17] - 2026-02-23
1963
-
1964
- ### Changed
1965
- - chore: rebuild dist to include browse mode CLI flag inadvertently omitted from 0.8.16 publish
1966
-
1967
- ## [0.8.16] - 2026-02-23
1968
-
1969
- ### Added
1970
- - feat(recall): new temporal browse mode for recall via `agenr recall --browse` and MCP `agenr_recall` with `context="browse"` (issue #190)
1971
- - docs(recall): added `docs/usage/recall.md` with browse-mode CLI and MCP usage examples
1972
-
1973
- ### Changed
1974
- - recall browse mode now uses a SQL-only path that requires no query and performs zero embedding/OpenAI API calls
1975
- - browse mode does not increment recall metadata (`recall_count`, `last_recalled_at`, `recall_intervals`)
1976
- - OpenClaw plugin tool wiring now maps `context="browse"` to the CLI `--browse` flag (and omits query/context positional args appropriately)
1977
-
1978
- ### Tests
1979
- - test(recall): added browse-mode coverage in DB recall, CLI command recall, MCP server recall, and OpenClaw plugin recall tool argument wiring
1980
-
1981
- ## [0.8.15] - 2026-02-23
1982
-
1983
- ### Fixed
1984
- - fix(consolidate): switch GROUP_CONCAT separator from comma to pipe in buildClusters to prevent silent tag corruption when tag values contain commas (issue #155)
1985
- - fix(consolidate): Tier 1 near-exact duplicate merge now preserves the highest importance across merged entries by raising the keeper's `importance` floor to the group max (issue #156)
1986
- - fix(consolidate): Tier 1 near-exact duplicate merge now preserves oldest provenance by inheriting the oldest `created_at` across the merge group into the keeper (issue #156)
1987
- - test(consolidate): new cluster.test.ts with pipe-separator roundtrip and comma-in-tag regression coverage (issue #155)
1988
- - test(consolidate): added merge coverage for tag union transfer, keeper importance floor, and keeper `created_at` inheritance in rules consolidation tests (issue #156)
1989
-
1990
- ## [0.8.13] - 2026-02-23
1991
-
1992
- ### Fixed
1993
- - fix(openclaw-plugin): session-start recall now falls back to reading the most recent archived OpenClaw session file (`*.reset.*`) when webchat `/new` bypasses `before_reset`. If stash-based seeding is unavailable and the opening prompt is short (< 40 characters), recall query text is built from the last 3 user messages in the archived session.
1994
-
1995
- ## [0.8.12]
1996
-
1997
- ### Fixed
1998
- - fix(openclaw-plugin): strip OpenClaw metadata envelope from `before_prompt_build` prompts before session-start recall query resolution; query seeding now uses the user message after the final timestamp marker instead of prepended metadata, with last-match handling for repeated timestamp patterns
1999
-
2000
- ## [0.8.11]
2001
-
2002
- ### Changed
2003
- - feat(plugin): resolveSessionQuery now blends the before_reset stash with the live prompt for session-start recall; when a stash exists and the live prompt is high-signal (>=40 chars / >=5 words), the query is stash + live prompt; when the live prompt is low-signal (common short opener like "did the plugin fire?"), the stash wins outright; no-stash behavior is unchanged (issue #181)
2004
-
2005
- ## [0.8.10]
2006
-
2007
- ### Added
2008
- - feat(plugin): session-start recall now uses the inbound user message as the recall query seed, enabling vector similarity scoring instead of pure recency ranking; entries relevant to the actual conversation topic now surface at session start (issues #177, #178)
2009
- - feat(plugin): before_reset hook captures the last 3 substantive user messages before a /new reset and stashes them in memory; the next session-start recall uses the stash as its query seed when the opening prompt is low-signal (issues #177, #178)
2010
- - feat(plugin): session topic stash eviction sweep runs every 5 minutes; TTL is 1 hour
2011
-
2012
- ### Changed
2013
- - chore(plugin): session-start recall timeout increased from 5s to 10s to accommodate the embedding API call now required when a query is present
2014
- - chore(plugin): session topic stash requires a minimum of 40 characters and 5 words to filter out low-signal conversational closers
2015
- - refactor(plugin): session query helpers extracted from index.ts into session-query.ts
2016
-
2017
- ### Fixed
2018
- - fix(plugin): session-start recall no longer skips vector similarity scoring when a query is available; previously RecallQuery.text was always undefined at session start (issue #177)
2019
-
2020
- ## [0.8.9]
2021
-
2022
- ### Added
2023
- - feat(extractor): broadened extraction prompt to capture personal user context (health, diet, family, occupation, location, values) even from casual or passing mentions; added 6-month durability test heuristic to distinguish durable personal facts from transient states (issue #173)
2024
- - feat(extractor): new few-shot examples for RELATIONSHIP, PREFERENCE, FACT, and EVENT types covering personal context scenarios with scoring rationale
2025
-
2026
- ### Fixed
2027
- - fix(ingest): suppress redundant whole-file ignored-params warning; now fires once per ingest run via shared ExtractRunOnceFlags object instead of once per file (issue #168)
2028
- - fix(ingest): silence SQLITE_ERROR vector-index-not-found pre-fetch error during bulk ingest when vector index is intentionally absent; all other pre-fetch errors still log (issue #168)
2029
- - fix(ingest): detect .jsonl.reset.TIMESTAMP session files as JSONL adapter by extending suffix-stripping regex to handle both .deleted and .reset suffixes (issue #169)
2030
- - fix(consolidate): added merge system prompt constraint that expiry must be exactly permanent or temporary, never a date or timestamp; complements existing runtime fallback (issue #172)
2031
- - fix(daemon): daemon install plist now uses the runtime CLI path resolved from argv[1] via the injected argvFn, preventing hardcoded npm global paths from breaking pnpm installs (issue #174)
2032
-
2033
- ## [0.8.8]
2034
-
2035
- ### Fixed
2036
- - fix(ingest): whole-file mode now uses model-aware output token budgets for context-fit checks and whole-file extraction calls, including support for gpt-5-nano, gpt-5.2-codex, and gpt-5.3-codex (issue #166)
2037
- - fix(ingest): removed whole-file 100-entry truncation; extracted entries are no longer discarded and now only emit a verbose warning when entry count exceeds 500 before downstream dedup (issue #166)
2038
-
2039
- ## [0.8.7]
2040
-
2041
- ### Fixed
2042
- - fix(ingest): detect `.jsonl.deleted.<timestamp>` session files as JSONL by stripping the `.deleted.*` suffix before extension lookup, restoring OpenClaw/Codex adapter routing instead of silent text fallback (issues #160, #163)
2043
- - fix(ingest): pass the resolved ingest `verbose` flag into extraction calls so whole-file diagnostics are emitted with `--verbose`, including unknown-model context-window warnings and whole-file retry/fallback logs (issues #161, #162)
2044
- - fix(ingest): emit an explicit `[whole-file]` verbose warning when auto mode receives zero parsed messages and falls back to chunked extraction (issue #163)
2045
-
2046
- ## [0.8.5]
2047
-
2048
- ### Added
2049
- - feat(ingest): `--bulk` mode for large-scale ingests; drops FTS triggers and the vector index before writing, uses `batchSize=500` with `BEGIN IMMEDIATE` transactions per batch, and rebuilds FTS content + vector index in a single pass after all entries are written (issue #135)
2050
- - feat(ingest): MinHash dedup (`src/db/minhash.ts`) - 128-hash signatures using 5-gram shingles and FNV32 with pre-seeded arrays; two-layer dedup combines an in-memory norm-content-hash Set (cross-batch per run) with per-candidate exact-hash + MinHash scan; new `norm_content_hash` and `minhash_sig` columns added via schema migration with automatic backfill
2051
- - feat(ingest): crash recovery for interrupted bulk ingests; `_meta` flag (`bulk_ingest_state`) is set before teardown and cleared only after REINDEX succeeds; `checkAndRecoverBulkIngest()` detects an interrupted run on next startup, rebuilds missing FTS triggers and/or vector index, runs `PRAGMA integrity_check`, and clears the flag (issue #135)
2052
-
2053
- ### Fixed
2054
- - fix(bulk): `seenNormHashes` was updated inside the transaction before `COMMIT`, causing a rollback to poison the in-memory Set and silently skip affected entries on retry; fixed by moving the update to after `COMMIT` using a local `committedHashes` Set
2055
- - fix(bulk): `bufferToMinhashSig` threw an unhandled `RangeError` on any `minhash_sig` blob that was not exactly 512 bytes (corrupt row, partial write, or schema version mismatch); fixed with a byte-length guard before conversion
2056
- - fix(bulk): `rebuildVectorIndex` DROP+CREATE fallback was not atomic; if `CREATE INDEX` failed after `DROP` succeeded the vector index was permanently absent until recovery ran; fixed by wrapping the fallback in `BEGIN IMMEDIATE`
2057
- - fix(bulk): backfill of `norm_content_hash` and `minhash_sig` ran unconditionally on every `agenr ingest` invocation; gated on `bulkMode` to avoid unnecessary write transactions on non-bulk runs
2058
- - fix(bulk): backfill cap (5000 rows) was hit silently; warns to stderr when more rows remain so the user knows to run ingest again
2059
- - fix(minhash): short-text MinHash fallback used raw `text` instead of normalized `chars`, causing near-duplicate short strings differing only in whitespace to score Jaccard ~0
2060
- - fix(bulk): `getBulkIngestMeta` silently swallowed JSON parse errors, disabling crash recovery without any signal; now warns to stderr
2061
-
2062
- ## [0.8.4]
2063
-
2064
- ### Added
2065
- - feat(openclaw-plugin): project scoping via config.project in openclaw.json; all session-start recall and store calls are scoped to the configured project when set (issue #71)
2066
- - feat(openclaw-plugin): optional subject field in agenr_store schema; agents can now pass an explicit subject per entry rather than always relying on inference (issue #86)
2067
- - feat(openclaw-plugin): platform normalization and source_file format warnings in runStoreTool; platform is inferred from source when missing, invalid values are warned and dropped, freeform source strings trigger a format hint (issue #145)
2068
-
2069
- ### Fixed
2070
- - fix(recall): cap final recall scores at 1.0 after FTS bonus; Math.min(1.0) applied in scoreEntryWithBreakdown (issue #64)
2071
- - fix(mcp): correct misleading retire tool message; retired entries are hidden from all recall paths (issue #143)
2072
- - fix(mcp): inferSubject now splits on punctuation followed by whitespace only, preventing truncation on file path periods (e.g. .ts, .js)
2073
- - fix(openclaw-plugin): subject inference in runStoreTool processedEntries now uses the same safe regex as inferSubject
2074
-
2075
- ### Changed
2076
- - chore(openclaw-plugin): remove openclaw.plugin.json version field; package.json is now the single source of truth (issue #91)
2077
- - chore(openclaw-plugin): remove formatRecallAsSummary dead code; writeAgenrMd was already removed, this cleans up the last orphaned export (issue #77)
2078
-
2079
- ## [0.8.3]
2080
-
2081
- ### Fixed
2082
- - setup: custom model aliases (gpt-4.1-nano, gpt-4.1-mini) now appear in
2083
- the model picker when using openai-api-key auth (issue #136)
2084
- - setup: revert hint null-normalization regression (details?.name ?? undefined)
2085
- - setup: warn user when empty credential is entered during key rotation
2086
- - setup: note that updated credential is saved but not re-validated
2087
- - setup: openai-api-key now prioritizes gpt-4.1-nano, gpt-4.1-mini, and
2088
- gpt-5-nano in preferred model selection, and adds gpt-5-nano alias
2089
- resolution for OpenAI model lookup
2090
- - setup: reconfigure now offers to update stored API key even when existing
2091
- credential is valid (issue #13)
2092
- - embeddings: EmbeddingCache is now bounded with LRU eviction (default
2093
- max 5000 entries) to prevent unbounded heap growth during large ingests
2094
- (issue #57)
2095
- - embeddings: EmbeddingCache constructor throws RangeError for maxSize < 1
2096
-
2097
- ## [0.8.2] - 2026-02-22
2098
-
2099
- ### Added
2100
- - Per-platform extraction prompt addenda for codex/claude-code (code session rules with inline confidence caps) and plaud (meeting transcript rules)
2101
- - plaud added to KNOWLEDGE_PLATFORMS and normalizeKnowledgePlatform
2102
- - applyConfidenceCap now enforces importance cap for codex and claude-code platforms
2103
- - All CLI --platform help text updated to include plaud
2104
-
2105
- ## [0.8.1] - 2026-02-22
2106
-
2107
- ### Fixed
2108
- - fix(openclaw-plugin): sync plugin version in openclaw.plugin.json to match npm package (was stale at 0.7.21, now 0.8.1)
2109
-
2110
- ## [0.8.0] - 2026-02-22
2111
-
2112
- ### Added
2113
- - feat(ingest): whole-file extraction mode for transcript ingest. `extractKnowledgeFromChunks` now supports `wholeFile: "auto" | "force" | "never"` with automatic fit detection against known model context windows and single-call extraction when a file fits.
2114
- - feat(ingest): new `--whole-file` and `--chunk` ingest flags to force whole-file or chunked extraction mode.
2115
- - feat(ingest): new whole-file utilities in `src/ingest/whole-file.ts` for context-window detection, mode resolution, overlap-free message reconstruction, and hard-cap truncation.
2116
-
2117
- ### Changed
2118
- - ingest: whole-file mode now reconstructs extraction text from parsed `messages` via `renderTranscriptLine` instead of joining chunk text, avoiding overlap duplication at chunk boundaries.
2119
- - extractor: whole-file mode now skips embedding pre-fetch and skips post-extraction LLM dedup, applies a 100-entry hard cap by importance, and retries failed whole-file extraction attempts before falling back to chunked mode.
2120
- - watch: watcher calls now set `watchMode: true`, which enforces chunked extraction even if whole-file mode is requested.
2121
- - mcp: ingest-style extraction now forwards parsed `messages` into extraction so whole-file mode can be resolved consistently.
2122
-
2123
- ## [0.7.21] - 2026-02-21
2124
-
2125
- ### Fixed
2126
- - fix(openclaw-plugin): sync plugin version in openclaw.plugin.json to match npm package (was stale at 0.7.7, now 0.7.21)
2127
-
2128
- ## [0.7.20] - 2026-02-21
2129
-
2130
- ### Added
2131
- - feat(models): add gpt-4.1-nano, gpt-4.1-mini, and gpt-4.1 aliases for OpenAI
2132
- provider; gpt-4.1-nano is now the recommended fast/cheap extraction model
2133
- (--model gpt-4.1-nano or agenr config set model gpt-4.1-nano) (#127)
2134
-
2135
- ### Changed
2136
- - perf(ingest): pre-batch embedding calls in storeEntries; all entries in a
2137
- write-queue batch are now embedded in a single API call instead of one call
2138
- per entry, cutting embedding API round-trips from O(n) to O(1) per batch
2139
- and reducing ingest wall-clock time proportionally to batch size (#127)
2140
-
2141
- ## [0.7.19] - 2026-02-21
2142
-
2143
- ### Fixed
2144
- - fix(ingest): WriteQueue backpressure deadlock when processing large session files; raised default highWatermark from 500 to 2000 and added configurable backpressure timeout (default 120s) that surfaces a clear error instead of hanging forever (#125)
2145
-
2146
- ### Added
2147
- - feat(ingest): --queue-high-watermark and --queue-backpressure-timeout-ms CLI flags for tuning write queue behavior on large ingest jobs
2148
- - feat(ingest): verbose mode now logs "[X/N] file -- starting" before extraction begins, eliminating the silent gap during large-file processing (#124)
2149
-
2150
- ## [0.7.18] - 2026-02-21
2151
-
2152
- ### Fixed
2153
- - fix(lockfile): suppress false-positive "Another agenr process is writing" warning during multi-worker ingest; `isDbLocked` now returns false when the lock is held by the current process (#121)
2154
-
2155
- ## [0.7.17] - 2026-02-21
2156
-
2157
- ### Performance
2158
- - perf(ingest): two-phase extract+write pipeline eliminates SQLite write-lock contention; extraction workers run in parallel while a single background writer drains entries in batched transactions (#107)
2159
- - feat(ingest): add `--workers` flag (default 10) for file-level parallelism; previously hardcoded to 1
2160
- - The write queue retries each write sub-batch once on transient failure (2s delay) before surfacing the error to the outer file-level retry loop. Use `--no-retry` to disable all retries including the inner write retry.
2161
-
2162
- ### Changed
2163
- - ingest: `entriesStored` now counts `added + superseded` (previously only `added`); superseded entries are written before the previous entry is marked superseded
2164
-
2165
- ## [0.7.16] - 2026-02-21
2166
-
2167
- ### Fixed
2168
- - docs(skill): comprehensive SKILL.md refresh covering all four tools, full importance scale, confidence-aware extraction, store optional params (subject, scope, tags, project), retire and extract tool docs
2169
-
2170
- ## [0.7.15] - 2026-02-21
2171
-
2172
- ### Fixed
2173
- - fix(openclaw-plugin): agenr_recall tool now correctly passes --until flag to CLI (was silently dropped)
2174
- - docs(skill): document all agenr_recall parameters in SKILL.md (since, until, types, platform, project, limit, context)
2175
-
2176
- ## [0.7.14] - 2026-02-21
2177
-
2178
- ### Added
2179
- - feat(recall): added `until` upper date bound to recall query filtering in CLI, MCP, and DB recall paths (`since` + `until` now define an inclusive window)
2180
-
2181
- ### Changed
2182
- - fix(recall): recency decay now anchors to the `until` ceiling for historical windows while freshness boost remains anchored to real query time
2183
- - fix(recall): centralized `parseSinceToIso` in `src/utils/time.ts` and removed duplicate implementations from recall CLI and MCP server
2184
- - fix(recall): added inverted date-range validation - recall now returns a descriptive error when `since > until` instead of returning an empty list
2185
- - fix(recall): interim 3x candidate over-fetch under date bounds to improve in-window recall coverage until SQL-level date filtering is added
2186
- - fix(recall): corrupt `created_at` values are now safely excluded under date-bound filters instead of leaking invalid rows into filtered recall
2187
-
2188
- ## [0.7.13] - 2026-02-21
2189
-
2190
- ### Fixed
2191
- - fix(extractor): added platform-aware extraction system prompt builder (`buildExtractionSystemPrompt`) and OpenClaw confidence addendum for role-labeled transcript handling
2192
- - fix(extractor): added `applyConfidenceCap` hard-cap enforcement for OpenClaw `unverified` entries so tagged claims cannot exceed importance 5
2193
- - fix(extractor): threaded `platform` through `extractKnowledgeFromChunks` and call sites in ingest/watch flows so OpenClaw-specific confidence behavior applies during transcript ingestion
2194
- - fix(extractor): added OpenClaw confidence few-shot examples to `SYSTEM_PROMPT` to distinguish hedged unverified claims from tool-verified claims
2195
-
2196
- ## [0.7.12] - 2026-02-21
2197
-
2198
- ### Fixed
2199
- - fix(recall): retired entries now correctly excluded from all recall queries -- missing `AND retired = 0` filter added to recall.ts and session-start.ts
2200
- - fix(consolidate): retired entries excluded from Tier-1 and clustering queries in rules.ts and cluster.ts
2201
- - fix(recall): consolidated duplicate parseSince implementations into shared utility supporting h/d/m/y units
2202
-
2203
- ## [0.7.11] - 2026-02-20
2204
-
2205
- ### Fixed
2206
- - fix(init): agenr MCP command now resolved via process.execPath (node binary) and process.argv[1] (CLI entry script) instead of which lookup -- eliminates PATH failures in GUI clients like Codex that launch with restricted environments
2207
-
2208
- ## [0.7.10] - 2026-02-20
2209
-
2210
- ### Fixed
2211
- - fix(init): codex platform now writes MCP entry directly to ~/.codex/config.toml instead of .mcp.json (which Codex does not read)
2212
- - fix(init): openclaw platform no longer writes a .mcp.json file (OpenClaw native plugin handles MCP registration via openclaw plugins install agenr)
2213
- - fix(init): agenr binary path is now resolved at init time via which or PNPM_HOME fallback -- GUI clients that launch with a restricted PATH will now find the correct binary
2214
- - fix(init): codex config.toml write is idempotent -- re-running init replaces the agenr line without duplicating it
2215
- - docs: remove redundant Memory (agenr) AGENTS.md block from OPENCLAW.md -- OpenClaw plugin handles agent instruction injection automatically via the built-in skill
2216
-
2217
- ## [0.7.9] - 2026-02-20
2218
-
2219
- ### Fixed
2220
- - fix(openclaw-plugin): moved session-start recall injection from before_agent_start to before_prompt_build -- recall now fires exactly once per session instead of twice due to OpenClaw calling before_agent_start twice (once for model-resolve where prependContext is discarded, once for prompt-build where it is used)
2221
-
2222
- ## [0.7.8] - 2026-02-20
2223
-
2224
- ### Fixed
2225
- - fix(openclaw-plugin): session-start recall dedup now keys on sessionId instead of a shared seen-Set -- each new session (including after /new) correctly receives injected context instead of being silently skipped on the second run
2226
- - fix(extractor): normalizeImportance now defaults to 7 instead of 5 -- aligns runtime default with schema declaration and coaching guidance
2227
-
2228
-
2229
- ## [0.7.7] - 2026-02-20
2230
-
2231
- ### Fixed
2232
- - fix(extractor): rewrote importance score calibration in SYSTEM_PROMPT -- per-score definitions (5-10) replace undifferentiated 8-10 band
2233
- - fix(extractor): added signal-cost framing -- 8+ fires real-time cross-session alerts; prompt now uses this as conservative filter
2234
- - fix(extractor): made score 7 the explicit default workhorse; 8+ now requires cross-session justification
2235
- - fix(extractor): added dev-session-observations rule -- verified/tested/confirmed patterns cap at 6 unless result is surprising or breaking
2236
- - fix(extractor): resolved conflict between dev-session cap and explicit memory request rule ("remember this" overrides cap)
2237
- - fix(extractor): removed "verified again today" from score-8 pnpm example to avoid contradicting dev-session rule
2238
- - fix(extractor): added NOT-8 negative examples alongside existing NOT-9 callouts
2239
- - fix(extractor): added 3 non-developer few-shot examples (health at 8, personal at 7, preference at 6) to prevent domain bias
2240
- - fix(extractor): lowered 8+ calibration cap from 30% to 20%
2241
-
2242
- ## [0.7.6] - 2026-02-20
2243
-
2244
- ### Fixed
2245
- - fix(plugin): `agenr_recall` now passes query as a positional argument instead of unsupported `--query`
2246
- - fix(plugin): `agenr_recall` now uses `--type` (singular) instead of invalid `--types`
2247
- - fix(plugin): removed unsupported `--threshold` forwarding from `agenr_recall`; threshold has no direct CLI equivalent
2248
- - fix(plugin): `agenr_store` now sends entries array directly on stdin and passes `platform`/`project` as CLI flags
2249
- - fix(plugin): `agenr_store` now infers missing `subject` from `content` before CLI spawn, matching MCP server behavior
2250
- - fix(plugin): `agenr_retire` now calls `agenr retire --id <entry_id>` instead of subject matching with UUIDs
2251
- - fix(cli): `agenr retire` now supports `--id <id>` and enforces exactly one of subject or `--id`
2252
- - fix(plugin): `agenr_extract` now uses a two-step flow for `store=true` (`extract --json` then `store`) and injects source metadata before storing
2253
- - fix(cli): `agenr store` now accepts the `--aggressive` flag used by plugin dedup config forwarding
2254
-
2255
- ## [0.7.5] - 2026-02-20
2256
-
2257
- ### Changed
2258
- - fix(plugin): raise default signalMinImportance from 7 to 8 - default-importance stores (importance 7) no longer trigger mid-session signal interrupts
2259
- - fix(plugin): lower default maxPerSignal from 5 to 3 - smaller batches
2260
- - fix(dedup): lower DEFAULT_DEDUP_THRESHOLD from 0.80 to 0.72 - entries with cosine similarity 0.72-0.80 now reach LLM review instead of being stored as duplicates
2261
- - fix(extractor): increase MAX_PREFETCH_RESULTS from 3 to 5 and lower PREFETCH_SIMILARITY_THRESHOLD from 0.78 to 0.72
2262
- - fix(extractor): increase PREFETCH_CANDIDATE_LIMIT from 10 to 15 for broader elaborative encoding candidates
2263
- - fix(extractor): tighten extractor prompt to suppress near-variant entries already captured in DB
2264
- - fix(extractor): recalibrate importance scoring anchors so routine verifications and test-pass observations default to 6-7; reserve 8+ for cross-session alert-worthy updates
2265
-
2266
- ### Added
2267
- - feat(plugin): signalCooldownMs config - minimum ms between signal batches per session (default: 30000)
2268
- - feat(plugin): signalMaxPerSession config - max total signal batches per session lifetime (default: 10)
2269
- - feat(plugin): signalMaxAgeSec config - only surface entries created within last N seconds (default: 300)
2270
- - feat(dedup): dedup.aggressive config in ~/.agenr/config.json - lower thresholds and more candidate lookups for high-noise environments
2271
- - feat(dedup): dedup.threshold config - manual override for LLM dedup similarity threshold
2272
-
2273
- ## [0.7.4] - 2026-02-20
2274
-
2275
- ### Added
2276
- - feat(plugin): native agenr_recall, agenr_store, agenr_extract, agenr_retire tools registered via api.registerTool() in the OpenClaw plugin - tools now appear in the agent toolset alongside exec, browser, etc.
2277
-
2278
- ## [0.7.3] - 2026-02-20
2279
-
2280
- ### Added
2281
- - feat(plugin): bundled OpenClaw skill (skills/SKILL.md) - teaches agents when to call agenr_store and agenr_recall as MCP tools; automatically available when plugin is installed
2282
- - feat(plugin): complete configSchema in openclaw.plugin.json (signalMinImportance, signalMaxPerSignal, signalsEnabled, dbPath)
2283
-
2284
- ### Changed
2285
- - fix(init): removed AGENTS.md auto-detection heuristic for openclaw platform - openclaw must be specified explicitly via --platform openclaw (AGENTS.md is also used by Codex; the heuristic was unreliable)
2286
- - fix(init): agenr init --platform openclaw no longer writes to AGENTS.md - the OpenClaw plugin handles memory injection via prependContext; AGENTS.md write was redundant
2287
-
2288
- ### Internal
2289
- - chore(plugin): bump openclaw.plugin.json version to 0.7.3
2290
-
2291
- ## [0.7.2] - 2026-02-20
2292
-
2293
- ### Fixed
2294
- - fix(store): within-batch deduplication - entries with the same subject+type+source file in a single storeEntries() call are now deduplicated before processing, preventing same-batch signal duplicates (entries from different source files with the same subject are kept as distinct)
2295
- - fix(store): re-extraction guard - entries with the same subject+type+source_file extracted within 24 hours now increment confirmations instead of adding a new entry
2296
- - fix(mcp): append-only MCP access log at ~/.agenr/mcp-access.log for observability of agenr_recall and agenr_store tool calls
2297
-
2298
- ## [0.7.1] - 2026-02-20
2299
-
2300
- ### Added
2301
- - feat(init): new `agenr init` command to auto-wire project instructions, MCP config, and `.agenr/config.json` with project slug/platform/projectDir
2302
- - feat(init): `--depends-on` support for dependency-aware project recall scope in `.agenr/config.json`
2303
-
2304
- ### Changed
2305
- - feat(mcp): default `agenr_recall` scope now reads `AGENR_PROJECT_DIR` + `.agenr/config.json` per call and auto-includes direct dependencies when `project` is omitted
2306
- - feat(mcp): `project="*"` now bypasses configured project scope, while explicit `project` values stay strict (no dependency expansion)
2307
- - feat(mcp): default `agenr_store` project now comes from configured project scope when caller omits `project`
2308
- - docs: corrected setup guidance in `docs/guides/scenarios.md` and aligned MCP examples in `docs/MCP.md` with current init output
2309
-
2310
- ### Removed
2311
- - perf(mcp): removed public `since_seq` parameter/handler from `agenr_recall`
2312
- - perf(plugin): removed redundant OpenClaw `writeAgenrMd` write path (session-start context is still injected via `prependContext`)
2313
- - perf(signals): removed extra `agenr_recall` footer from signal notifications for lower token overhead
2314
-
2315
- ## [0.7.0] - 2026-02-19
2316
-
2317
- ### Added
2318
- - feat(signals): mid-session signal delivery via `before_prompt_build` hook - notifies agents of new high-importance entries (imp >= 7) with compact 50-100 token notifications
2319
- - feat(signals): `signal_watermarks` table for per-consumer rowid-based watermark tracking
2320
- - feat(mcp): `since_seq` parameter on `agenr_recall` for watermark-based incremental recall without embedding cost
2321
- - feat(plugin): `signalsEnabled`, `signalMinImportance`, `signalMaxPerSignal`, and `dbPath` plugin config options
2322
-
2323
- ### Changed
2324
- - refactor(plugin): plugin now opens a direct DB connection for sub-ms signal queries (vs CLI spawn)
2325
- - refactor(plugin/types): expanded `PluginApi` and `AgenrPluginConfig` types for signal support
2326
-
2327
- ## [0.6.15] - 2026-02-19
2328
-
2329
- ### Changed
2330
- - perf(db): file-backed DB clients now set `PRAGMA busy_timeout=3000` during WAL initialization, reducing immediate `SQLITE_BUSY` failures under write contention
2331
- - perf(db): `initDb()` now explicitly sets `PRAGMA wal_autocheckpoint=1000` for WAL-enabled clients to make checkpoint behavior explicit and testable
2332
- - perf(watch): watcher now supports `walCheckpointIntervalMs` (default `30000`) to rate-limit per-cycle WAL checkpoints while keeping shutdown checkpoint behavior unchanged
2333
-
2334
- ### Fixed
2335
- - test(watch): updated per-cycle checkpoint tests to pass `walCheckpointIntervalMs: 0` when asserting legacy always-checkpoint behavior
2336
- - test(db): added coverage for file-backed `busy_timeout`, explicit `wal_autocheckpoint`, and `:memory:` busy-timeout exclusion
2337
- - test(watch): added interval-gating, shutdown-checkpoint, and sentinel-bypass coverage for WAL checkpoint scheduling
2338
-
2339
- ## [0.6.14] - 2026-02-19
2340
-
2341
- ### Fixed
2342
- - fix(daemon): launchd plist now uses `KeepAlive` with `Crashed`-only semantics and `ThrottleInterval` of 10 seconds so intentional daemon stops do not auto-restart while crash recovery remains enabled
2343
-
2344
- ## [0.6.13] - 2026-02-19
2345
-
2346
- ### Added
2347
- - feat(daemon): `agenr daemon status` now includes watcher health details from `watcher.health.json` (heartbeat age, stalled warning, sessions watched, entries stored)
2348
-
2349
- ### Changed
2350
- - test(daemon): added daemon status health coverage for fresh/missing/stale/error health scenarios and deterministic heartbeat age output
2351
-
2352
- ### Fixed
2353
- - fix(consolidate): corrected `@libsql/client` arg typing in scoped filter paths by using `InValue[]` for SQL args
2354
- - fix(daemon): status command now handles health read failures gracefully and still exits successfully
2355
-
2356
- ## [0.6.12] - 2026-02-19
2357
-
2358
- ### Added
2359
- - feat(watch): new `src/watch/health.ts` heartbeat support with `WatcherHealth` schema, atomic `watcher.health.json` writes, resilient reads, and `isHealthy()` stale-heartbeat checks (5 minute threshold)
2360
- - feat(watch): `runWatcher` now writes heartbeat health snapshots on startup and after every cycle, including PID, start time, last heartbeat timestamp, sessions watched, and total entries stored
2361
- - feat(watch): directory-mode session switch events now increment `sessionsWatched` (including initial `null -> first` activation)
2362
-
2363
- ### Changed
2364
- - chore(watch): injected `writeHealthFileFn` dependency in watcher and watch command paths to keep heartbeat writes testable and mockable
2365
- - test(watch): added `tests/watch/health.test.ts` (10 tests) and new watcher heartbeat assertion coverage in `tests/watch/watcher.test.ts`
2366
-
2367
- ## [0.6.11] - 2026-02-19
2368
-
2369
- ### Fixed
2370
- - fix(shutdown): SIGINT/SIGTERM now wake the watcher immediately via a shared wake callback, so long polling sleeps are interrupted without waiting for the next interval
2371
- - fix(watch): watcher now registers and always deregisters the shutdown wake callback in `runWatcher`, preventing stale wake handlers across normal exits (`--once`) and repeated runs
2372
- - fix(watch): `runWatchCommand` now executes registered shutdown handlers on signal-triggered exits, keeps direct PID cleanup for clean `--once` exits, and adds a 5s force-exit timeout guard (`.unref()`) to avoid indefinite hangs
2373
-
2374
- ## [0.6.10] - 2026-02-19
2375
-
2376
- ### Fixed
2377
- - OpenClaw plugin: AGENR.md now writes a compact summary (subjects only + entry count + recall instructions) instead of full content, preventing double-injection of full context if loaded into Project Context
2378
- - Note: version 0.6.9 was published with a stale build and unpublished; 0.6.10 is the correct release of these changes
2379
-
2380
- ## [0.6.9] - 2026-02-19
2381
-
2382
- ### Fixed
2383
- - OpenClaw plugin: session-seen guard prevents recall firing on every turn (fires once per session)
2384
- - OpenClaw plugin: sessionKey now read from ctx (second handler arg) instead of event
2385
- - OpenClaw plugin: DEFAULT_AGENR_PATH uses correct 2-level relative path to dist/cli.js
2386
- - OpenClaw plugin: spawn strategy detects .js vs executable binary
2387
-
2388
- ### Added
2389
- - OpenClaw plugin: writes AGENR.md to ctx.workspaceDir after successful recall (fire-and-forget)
2390
-
2391
- ## [0.6.8] - 2026-02-19
2392
-
2393
- ### Fixed
2394
- - fix(openclaw-plugin): OpenClaw plugin now uses api.on("before_agent_start") instead of api.registerHook("agent:bootstrap"). The previous approach registered the handler in the gateway bundle's internal handlers map, which is a different module instance from the embedded agent runner. The typed hook system (api.on) uses the shared global plugin registry and works correctly across both bundles.
2395
-
2396
- ## [0.6.7] - 2026-02-19
2397
-
2398
- ### Fixed
2399
- - fix(openclaw-plugin): add name and description to registerHook opts to resolve OpenClaw hook registration warning
2400
-
2401
- ## [0.6.6] - 2026-02-19
2402
-
2403
- ### Added
2404
- - feat(openclaw-plugin): OpenClaw plugin that injects agenr memory into agent sessions
2405
- - New src/openclaw-plugin/index.ts: plugin entry point, registers agent:bootstrap hook
2406
- - New src/openclaw-plugin/recall.ts: runs agenr CLI recall, formats JSON as markdown
2407
- - New src/openclaw-plugin/types.ts: local type aliases for OpenClaw SDK compatibility
2408
- - Memory injected as synthetic AGENR.md file into # Project Context in system prompt
2409
- - Grouped markdown output: Active Todos / Preferences and Decisions / Facts and Events
2410
- - Skips subagent and cron sessions automatically (sessionKey pattern check)
2411
- - Configurable: budget, enabled via openclaw.json plugins.entries.agenr.config
2412
- - 5 second timeout on recall; all errors swallowed silently to never block session start
2413
- - package.json "openclaw" key declares dist/openclaw-plugin/index.js as plugin extension
2414
-
2415
- ## [0.6.5] - 2026-02-19
2416
-
2417
- ### Added
2418
- - feat(watch): watcher writes watcher.pid on start and deletes on exit
2419
- - feat(ingest): ingest exits 1 with clear error if watcher is running
2420
- - feat(watch): isWatcherRunning() helper with stale-PID detection in src/watch/pid.ts
2421
- - feat(watch): deleteWatcherPid registered via onShutdown() as v0.6.6 graceful shutdown hook point
2422
-
2423
- ### Fixed
2424
- - fix(ingest): write conflicts between ingest and watcher are now blocked at the ingest entry point
2425
- - fix(watch): watcher PID write failures now use error-level formatting for consistent clack error output
2426
- - fix(ingest): watcher-running guard now reports via clack error output instead of raw stderr text
2427
-
2428
- ## [0.6.4] - 2026-02-19
2429
-
2430
- ### Added
2431
- - feat(recall): spaced repetition recall strength via recall_intervals tracking
2432
- - feat(recall): computeSpacingFactor() rewards entries with proven long inter-recall gaps
2433
- - feat(schema): recall_intervals column (TEXT/JSON) added via COLUMN_MIGRATIONS
2434
- - feat(types): recall_intervals field on StoredEntry, spacing field on RecallResult.scores
2435
-
2436
- ### Fixed
2437
- - fix(recall): legacy spacing imputation now anchors at created_at and lands exactly on last_recalled_at (including recall_count=1), restoring expected spacing bonuses
2438
- - fix(recall): spacingFactor now applies to the recall-base component before importance comparison, preventing early saturation while keeping memoryStrength clamped to <= 1.0
2439
- - fix(recall): updateRecallMetadata uses json_insert SQLite built-in for atomic array append, avoiding read-modify-write concurrency race
2440
- - fix(recall): recall_intervals timestamps stored as Unix integer seconds (not ISO string) to prevent x1000 unit error in gap calculations
2441
- - fix(recall): removed unused getScoreComponents() refactor artifact to avoid divergence from the active scoring path
2442
- - fix(db): VACUUM database after db reset to reclaim freed pages immediately
2443
-
2444
- ## [0.6.3] - 2026-02-19
2445
-
2446
- ### Added
2447
- - agenr db reset --full --confirm-reset: full clean-slate reset
2448
- - Deletes watch-state.json and review-queue.json after DB schema reset
2449
- - Creates a pre-reset DB backup before any destructive operation
2450
- - Prints backup path to stdout
2451
- - Dry-run mode when --confirm-reset is omitted
2452
- - Extracted resetDb() into src/db/schema.ts (shared by db reset and db reset --full)
2453
- - Added backupDb() helper in src/db/client.ts
2454
-
2455
- ## [0.6.2] - 2026-02-19
2456
-
2457
- ### Added
2458
- - feat(extractor): elaborative encoding pre-fetch now runs before each chunk extraction, retrieves top-related memories from the vector index, and injects up to 3 references into the extractor prompt
2459
- - feat(cli): `--no-pre-fetch` flag added to `agenr extract`, `agenr ingest`, and `agenr watch` to opt out of prompt memory pre-fetch
2460
- - feat(cli): `--db` flag added to `agenr extract`, `agenr ingest`, and `agenr watch` for database path overrides
2461
- - feat(recall): exported `fetchRelatedEntries()` thin wrapper for direct ANN vector candidate queries
2462
-
2463
- ### Changed
2464
- - tuning(extractor): pre-fetch similarity threshold set to `0.78` for `text-embedding-3-small` (1024 dimensions)
2465
- - tuning(extractor): fresh-install pre-fetch skip threshold set to 20 non-superseded entries
2466
- - tuning(extractor): pre-fetch timeout set to 5000ms to avoid chunk extraction stalls on hanging embedding calls
2467
-
2468
- ### Security
2469
- - prompt: injected related memories are explicitly reference-only and do not lower the SKIP threshold
2470
- - runtime: pre-fetch is always best-effort and silently degrades to empty related-memory context on any error
2471
-
2472
- ## [0.6.1] - 2026-02-19
2473
-
2474
- ### Fixed
2475
- - fix(watch): context file generation failed with CLIENT_CLOSED when context path is configured
2476
- - fix(mcp): remove agenr_done tool (was not removed in v0.6.0 as intended)
2477
-
2478
- ## [0.6.0] - 2026-02-18
2479
-
2480
- ### Added
2481
- - feat(consolidate): forgettingScore, protected subject patterns, and active forgetting pass with `--forget` deletion gate
2482
- - feat(config): `forgetting.protect` never-forget registry plus `scoreThreshold`/`maxAgeDays`/`enabled` config defaults
2483
- - feat(health): new `agenr health` command with read-only DB health and forgetting candidate summaries
2484
- - feat(consolidate): `--report` pre-run consolidation stats mode (and report-only behavior with `--dry-run`)
2485
- - feat(watch): `context-mini.md` and `context-hot.md` context variants on watch context refresh
2486
- - feat(schema): retired, retired_at, retired_reason, suppressed_contexts columns
2487
- - feat(recall): session-start context filtering respects suppressed_contexts
2488
- - feat(db): retirements.json ledger for durable retirement across re-ingest
2489
- - feat(mcp): entry IDs in agenr_recall output
2490
- - feat(mcp): agenr_retire tool - retire any entry type by ID
2491
- - feat(cli): agenr retire command with dry-run, persist, contains flags
2492
-
2493
- ### Fixed
2494
- - fix(health): initialize schema before health queries and support `--db` path override
2495
- - fix(health): reduce scan memory usage by omitting `content` from health stats query
2496
- - fix(consolidate): batch forgetting deletes, reuse assessed candidates, and avoid synchronous full `VACUUM`
2497
- - fix(watch): use real recall score breakdown in generated context variants
2498
-
2499
- ### Removed
2500
- - `agenr_done` MCP tool removed; use `agenr_retire` instead (supports all entry types, not just todos)
2501
-
2502
- ## [0.5.4] - 2026-02-18
2503
-
2504
- ### Added
2505
- - feat(todos): `agenr todo done` command to mark todos complete via CLI
2506
- - feat(mcp): `agenr_done` MCP tool for completing todos from AI tools
2507
- - feat(store): cross-type superseding - new entries can supersede entries of any type, not just same-type
2508
-
2509
- ## [0.5.3] - 2026-02-18
2510
-
2511
- ### Added
2512
- - Explicit memory requests: "remember this/that" triggers importance >= 7, deterministic capture
2513
- - Session label → project mapping via `labelProjectMap` config field
2514
- - `normalizeLabel` utility for deterministic label normalization
2515
- - `SYSTEM_PROMPT` exported from `src/extractor.ts` for testability
2516
-
2517
- ### Fixed
2518
- - `agenr eval recall` now returns correct results for all 5 query categories (was returning zero for 4 of 5 due to FTS literal match; replaced with SQL type filters and hybrid vector+FTS recall)
2519
-
2520
- ## [0.5.2] - 2026-02-18
2521
-
2522
- ### Added
2523
- - `entries.project` column (with index) to tag knowledge by source project/repo (NULL for legacy entries)
2524
- - Project auto-detection from transcript CWD in watch mode (tags entries at write time)
2525
- - `--project` and `--exclude-project` filters/tags across commands:
2526
- - `agenr recall --project/--exclude-project [--strict]`
2527
- - `agenr context --project/--exclude-project [--strict]`
2528
- - `agenr store --project`
2529
- - `agenr ingest --project`
2530
- - `agenr consolidate --project/--exclude-project` (never merges across projects)
2531
- - `agenr db stats --project/--exclude-project`
2532
- - `agenr db export --project/--exclude-project`
2533
- - MCP tool support for project:
2534
- - `agenr_recall` accepts optional `project` filter (comma-separated for multiple)
2535
- - `agenr_store` accepts optional `project` tag
2536
- - `agenr eval recall` command for scoring regression checks (baseline save and compare)
2537
-
2538
- ### Fixed
2539
- - Recall scoring and session-start recall:
2540
- - Freshness boost for importance >= 6 (clamped to avoid amplifying noisy entries)
2541
- - Smooth exponential todo staleness decay (half-life 7 days; floors at 0.10 or 0.40 for importance >= 8)
2542
- - Session-start permanent window widened to 30 days (temporary remains shorter)
2543
- - Dynamic budget allocation based on available categories
2544
- - Recency tiebreaking within a 0.05 score dead-band applied to the recent category only
2545
- - Watch ingestion now advances `byteOffset` by bytes actually read in each cycle, preventing duplicate processing when files grow during read.
2546
- - Watch state saves are now atomic (temp file + rename), preventing partial-write corruption on process crashes.
2547
-
2548
- ## [0.5.0] - 2026-02-17
2549
-
2550
- ### Added
2551
- - `_meta` table with schema version stamp for future migrations
2552
- - `agenr db version` command to print schema version metadata
2553
- - `agenr daemon start|stop|restart` commands
2554
- - `agenr daemon install --dir/--platform/--node-path` options for explicit daemon configuration
2555
- - `entries.platform` column (with index) to tag knowledge by platform (`openclaw|claude-code|codex`, NULL for legacy entries)
2556
- - `--platform` filters/tags across commands:
2557
- - `agenr recall --platform`
2558
- - `agenr context --platform`
2559
- - `agenr store --platform`
2560
- - `agenr ingest --platform`
2561
- - `agenr consolidate --platform`
2562
- - `agenr db export --platform`
2563
- - MCP tool support for platform:
2564
- - `agenr_recall` accepts optional `platform` filter
2565
- - `agenr_store` accepts optional `platform` tag
2566
-
2567
- ### Changed
2568
- - `agenr db stats` output now includes schema version
2569
- - `agenr db stats` now includes per-platform breakdown
2570
- - `agenr daemon install` now uses smart platform defaults and writes `watch --dir <path> --platform <name>` instead of `watch --auto`
2571
- - `agenr daemon install` now prefers stable node symlinks (Homebrew) when `process.execPath` is version-specific; use `--node-path` to override
2572
- - `agenr watch --auto` is deprecated; `agenr watch --platform <name>` is now the standard invocation and auto-resolves the default platform directory when `--dir` is omitted
2573
-
2574
- ## [0.4.1] - 2026-02-17
2575
-
2576
- ### Fixed
2577
- - npx symlink handling: isDirectRun check now uses realpathSync to resolve npx symlinks correctly
2578
-
2579
- ## [0.4.0] - 2026-02-15
2580
-
2581
- ### Added
2582
- - `agenr context` command - generate context files for AI tool integration
2583
- - `agenr watch --context` - auto-refresh context file after each extraction cycle
2584
- - `agenr daemon` - launchd daemon management for background watching
2585
- - `agenr consolidate` - knowledge base cleanup with rule-based and LLM-assisted merging
2586
- - Online dedup at write time (mem0-style dedup with 3 cosine bands)
2587
- - Post-extraction LLM dedup pass
2588
- - Concurrent chunk extraction
2589
- - Smart filtering before chunking
2590
- - Rate limit protection for chunk extraction
2591
- - Graceful shutdown for long-running commands (SIGINT/SIGTERM)
2592
- - Ingest auto-retry for failed files
2593
- - Source adapter refactor with timestamp preservation
2594
- - Watch WAL checkpointing
2595
-
2596
- ### Changed
2597
- - Embedding dimensions upgraded from 512 to 1024 (text-embedding-3-small)
2598
- - `confidence` field renamed to `importance` for clarity
2599
-
2600
- ### Fixed
2601
- - Session-start recall no longer dominated by stale todos (todo staleness penalty)
2602
- - Consolidate releases DB lock after WAL checkpoint, not before
2603
-
2604
- ## [0.3.0] - 2026-02-15
2605
-
2606
- ### Added
2607
- - `agenr watch` - live file watcher with auto-extraction
2608
- - `agenr ingest` - bulk ingestion of markdown, plaintext, and JSONL
2609
- - `agenr mcp` - MCP server for cross-tool AI memory (recall, store, extract)
2610
-
2611
- ## [0.2.0] - 2026-02-14
2612
-
2613
- ### Added
2614
- - `agenr store` - smart dedup with cosine similarity bands
2615
- - `agenr recall` - recall with scoring and budget-constrained retrieval
2616
- - `agenr db` subcommands (stats, export, reset, path)
2617
-
2618
- ## [0.1.0] - 2026-02-14
2619
-
2620
- ### Added
2621
- - `agenr extract` - structured knowledge extraction from conversation transcripts
2622
- - `agenr setup` - interactive configuration
2623
- - `agenr auth status` - live connection testing
2624
- - `agenr config` - configuration management