@agenr/openclaw-plugin 0.14.1 → 1.2.0

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