@agenr/openclaw-plugin 0.10.1

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