akm-cli 0.8.4 → 0.8.6

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 CHANGED
@@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.8.6] - 2026-06-09
8
+
9
+ ### Added
10
+
11
+ - **`consolidate.incrementalSince` profile config field.** Setting
12
+ `incrementalSince: "7d"` (or any duration string) in the `consolidate` block
13
+ of an improve profile narrows the candidate pool to memories modified within
14
+ that window plus their top-5 graph neighbours, keeping each pass focused on
15
+ recent changes. This makes it practical to run consolidation more often than
16
+ once per day (e.g. via `akm-improve-consolidate` every 4 h) without
17
+ re-scanning the full pool every time. The nightly default profile leaves this
18
+ unset (full-pool sweep, same as before). The `incrementalSince` option already
19
+ existed in `akmConsolidate()` but was hardcoded off at the call site; the
20
+ field is now surfaced in the config schema and read from the profile.
21
+
22
+ ## [0.8.5] - 2026-06-09
23
+
24
+ ### Fixed
25
+
26
+ - **Consolidation starved merge recall; the memory pool grew unbounded.** Commit
27
+ `633ece41` made the `incrementalSince` narrowing unconditional, so every
28
+ consolidation run only judged memories changed since the last run plus their
29
+ immediate vector-neighbors. Stale-but-unmerged duplicate clusters were never
30
+ re-examined, so the eligible pool grew monotonically and never shrank, and
31
+ contradiction detection (which rides on the consolidation pass) went dark.
32
+ Consolidation only runs on the nightly default-profile pass (`quick`/`frequent`
33
+ disable it), so a full-pool sweep is correct and affordable; the override is
34
+ removed. `lastConsolidateTs` still gates whether the pass runs.
35
+
7
36
  ## [0.8.4] - 2026-06-08
8
37
 
9
38
  ### Fixed
@@ -2162,16 +2162,11 @@ async function runImprovePostLoopStage(args) {
2162
2162
  // Tie consolidate proposals back to this improve invocation so
2163
2163
  // accept-rate-per-run aggregation works. Mirrors reflect/propose/extract.
2164
2164
  sourceRun: `consolidate-${Date.now()}`,
2165
- // Incremental consolidation: pass the last-consolidation timestamp so
2166
- // akmConsolidate skips chunks with no memory changed since then. Converts
2167
- // consolidation cost from O(pool) to O(changed clusters) the fix for
2168
- // the rising p95 tail where full-pool re-judging produced 5–10 min runs
2169
- // that promoted ~0. undefined → full pass on first-ever run (bootstrap).
2170
- // volumeTriggered correctly forces the run past cooldown but must NOT
2171
- // override incrementalSince — the stash has ~1400 eligible memories so
2172
- // volumeTriggered=true on every run, permanently forcing full 12-chunk
2173
- // scans (~264s) instead of the intended 1-2 chunk incremental path (~44s).
2174
- incrementalSince: lastConsolidateTs,
2165
+ // incrementalSince: when set in the profile config, narrows the candidate
2166
+ // pool to memories modified within that window + their graph neighbours,
2167
+ // keeping each pass focused on recent changes. Omit for a full-pool sweep
2168
+ // (default for nightly passes). See config-schema.ts for guidance.
2169
+ incrementalSince: improveProfile?.processes?.consolidate?.incrementalSince,
2175
2170
  maxChunkSize: improveProfile?.processes?.consolidate?.maxChunkSize,
2176
2171
  // Honor profile.autoAccept (already merged into options.autoAccept at the
2177
2172
  // top of akmImprove). The CLI parser always supplies 90 when --auto-accept
@@ -132,6 +132,12 @@ export const ImproveProcessConfigSchema = z
132
132
  defaultSince: z.string().min(1).optional(),
133
133
  maxTotalChars: positiveInt.optional(),
134
134
  maxChunkSize: z.number().int().min(1).max(50).optional(),
135
+ // Consolidate process: when set, narrows the candidate pool to memories
136
+ // modified within this window (e.g. "7d", "48h") plus their graph
137
+ // neighbours. Useful when consolidation runs more than once per day —
138
+ // keeps each pass focused on recent changes without re-scanning the full
139
+ // pool. Leave unset (full-pool sweep) for the nightly default pass.
140
+ incrementalSince: z.string().min(1).optional(),
135
141
  // Triage process config (only meaningful for the `triage` process)
136
142
  applyMode: z.enum(["queue", "promote"]).optional(),
137
143
  policy: z.string().min(1).optional(),
@@ -14521,6 +14521,7 @@ var init_config_schema = __esm(() => {
14521
14521
  defaultSince: exports_external.string().min(1).optional(),
14522
14522
  maxTotalChars: positiveInt.optional(),
14523
14523
  maxChunkSize: exports_external.number().int().min(1).max(50).optional(),
14524
+ incrementalSince: exports_external.string().min(1).optional(),
14524
14525
  applyMode: exports_external.enum(["queue", "promote"]).optional(),
14525
14526
  policy: exports_external.string().min(1).optional(),
14526
14527
  maxAcceptsPerRun: positiveInt.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akm-cli",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "type": "module",
5
5
  "description": "akm (Agent Knowledge Management) — A package manager for AI agent skills, commands, tools, and knowledge. Works with Claude Code, OpenCode, Cursor, and any AI coding assistant.",
6
6
  "keywords": [