akm-cli 0.9.0-rc.2 → 0.9.0-rc.3

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +34 -8
  2. package/dist/assets/improve-strategies/catchup.json +3 -1
  3. package/dist/assets/improve-strategies/consolidate.json +3 -1
  4. package/dist/assets/improve-strategies/frequent.json +3 -1
  5. package/dist/assets/improve-strategies/graph-refresh.json +3 -1
  6. package/dist/assets/improve-strategies/memory-focus.json +4 -1
  7. package/dist/assets/improve-strategies/proactive-maintenance.json +1 -0
  8. package/dist/assets/improve-strategies/quick.json +3 -1
  9. package/dist/assets/improve-strategies/recombine-only.json +2 -0
  10. package/dist/assets/improve-strategies/reflect-distill.json +1 -0
  11. package/dist/assets/improve-strategies/synthesize.json +2 -0
  12. package/dist/assets/tasks/core/backup.yml +2 -2
  13. package/dist/cli/config-migrate.js +554 -26
  14. package/dist/cli.js +3 -1
  15. package/dist/commands/backup-cli.js +6 -4
  16. package/dist/commands/config-cli.js +10 -3
  17. package/dist/commands/feedback-cli.js +24 -7
  18. package/dist/commands/health/checks.js +94 -15
  19. package/dist/commands/health/surfaces.js +2 -1
  20. package/dist/commands/improve/anti-collapse.js +3 -3
  21. package/dist/commands/improve/collapse-detector.js +5 -5
  22. package/dist/commands/improve/consolidate.js +123 -66
  23. package/dist/commands/improve/distill/promote-memory.js +8 -6
  24. package/dist/commands/improve/distill/quality-gate.js +1 -1
  25. package/dist/commands/improve/distill-guards.js +1 -1
  26. package/dist/commands/improve/distill-promotion-policy.js +32 -26
  27. package/dist/commands/improve/distill.js +52 -36
  28. package/dist/commands/improve/eligibility.js +9 -8
  29. package/dist/commands/improve/extract-prompt.js +2 -2
  30. package/dist/commands/improve/extract.js +43 -11
  31. package/dist/commands/improve/improve-auto-accept.js +14 -28
  32. package/dist/commands/improve/improve-cli.js +4 -2
  33. package/dist/commands/improve/improve-strategies.js +2 -1
  34. package/dist/commands/improve/improve.js +49 -8
  35. package/dist/commands/improve/loop-stages.js +11 -6
  36. package/dist/commands/improve/preparation.js +51 -17
  37. package/dist/commands/improve/procedural.js +10 -6
  38. package/dist/commands/improve/recombine.js +31 -7
  39. package/dist/commands/improve/reflect.js +24 -14
  40. package/dist/commands/improve/salience.js +5 -1
  41. package/dist/commands/improve/source-identity.js +43 -0
  42. package/dist/commands/migrate-cli.js +36 -0
  43. package/dist/commands/mv-cli.js +647 -258
  44. package/dist/commands/proposal/drain.js +16 -4
  45. package/dist/commands/proposal/proposal-cli.js +3 -2
  46. package/dist/commands/proposal/proposal.js +16 -55
  47. package/dist/commands/proposal/repository.js +664 -58
  48. package/dist/commands/read/curate.js +4 -2
  49. package/dist/commands/read/knowledge.js +4 -1
  50. package/dist/commands/read/search.js +6 -2
  51. package/dist/commands/read/show.js +8 -7
  52. package/dist/commands/sources/self-update.js +156 -112
  53. package/dist/commands/sources/sources-cli.js +7 -2
  54. package/dist/core/common.js +36 -3
  55. package/dist/core/config/config-io.js +2 -2
  56. package/dist/core/config/config-schema.js +15 -3
  57. package/dist/core/config/config.js +14 -13
  58. package/dist/core/file-lock.js +2 -2
  59. package/dist/core/migration-backup.js +816 -171
  60. package/dist/core/migration-operation.js +44 -0
  61. package/dist/core/state/migrations.js +4 -7
  62. package/dist/core/state-db.js +22 -7
  63. package/dist/core/write-source.js +86 -18
  64. package/dist/indexer/db/db.js +109 -53
  65. package/dist/indexer/index-writer-lock.js +38 -37
  66. package/dist/indexer/index-written-assets.js +73 -56
  67. package/dist/indexer/indexer.js +5 -1
  68. package/dist/indexer/search/search-source.js +2 -2
  69. package/dist/indexer/usage/usage-events.js +8 -2
  70. package/dist/integrations/agent/engine-resolution.js +14 -7
  71. package/dist/scripts/migrate-storage.js +867 -990
  72. package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +405 -566
  73. package/dist/setup/detected-engines.js +7 -13
  74. package/dist/setup/engine-config.js +14 -4
  75. package/dist/setup/setup.js +1 -1
  76. package/dist/setup/steps/connection.js +1 -1
  77. package/dist/setup/steps/tasks.js +1 -1
  78. package/dist/sources/providers/git-stash.js +58 -21
  79. package/dist/sources/providers/git.js +1 -1
  80. package/dist/storage/engines/sqlite-migrations.js +138 -3
  81. package/dist/storage/repositories/events-repository.js +24 -0
  82. package/dist/storage/repositories/proposals-repository.js +14 -0
  83. package/dist/tasks/embedded.js +2 -0
  84. package/dist/workflows/db.js +24 -13
  85. package/dist/workflows/validator.js +24 -2
  86. package/docs/migration/release-notes/0.9.0.md +24 -7
  87. package/docs/migration/v0.8-to-v0.9.md +124 -19
  88. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
8
8
 
9
9
  ### Added
10
10
 
11
+ - **Explicit, crash-resumable 0.9 migration coordination.** `akm migrate
12
+ status` classifies config, `state.db`, and `workflow.db` independently;
13
+ `akm migrate apply [--config <prepared>]` creates a verified,
14
+ installation-scoped backup before sealing ledgers or applying pending
15
+ migrations. Apply and restore use authenticated phase journals, exact
16
+ artifact fingerprints, bounded streaming I/O, SQLite integrity checks,
17
+ active-writer barriers, WAL/SHM-safe publication, and idempotent recovery.
18
+ Routine reads and current database opens no longer depend on a historical
19
+ cutover bundle. See `docs/migration/release-notes/0.9.0.md`.
11
20
  - **Workflow orchestration engine (experimental).** akm can now execute
12
21
  multi-step workflows as deterministic **YAML programs**, driven either by a
13
22
  native engine or by any agent session. This is a new, self-contained
@@ -283,17 +292,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
283
292
  but never written — their citing files are reported in `readOnlyCiters` as
284
293
  manual follow-ups. Output:
285
294
  `{ok, from, to, rewrote: [{file, count}], readOnlyCiters, utilityPreserved}`;
286
- a successful move appends an `mv` event. The operation spans FS + DB and is
287
- not transactional, but its ordering (plan rewrites apply citer edits
288
- rename last → re-key index last) makes an interrupted run safely
289
- re-runnable; with no local index built, the rename still succeeds and the
290
- next `akm index` picks it up, and `utilityPreserved: false` discloses when
291
- an existing index could not be re-keyed (the ranking history then resets
292
- on the next full index). Added to the v1 §9.4 command surface as an
293
- Experimental-tier additive entry (see `STABILITY.md`).
295
+ a successful move appends an exactly-once `mv` event. A durable mutation
296
+ journal stages citer rewrites and the asset publication, preserves
297
+ source-qualified utility/salience history, and resumes index/state
298
+ finalization after interruption. Divergent citers and late-created targets
299
+ fail closed instead of being overwritten. Added to the v1 §9.4 command
300
+ surface as an Experimental-tier additive entry (see `STABILITY.md`).
294
301
 
295
302
  ### Changed
296
303
 
304
+ - **Improve target identity is now end-to-end and source-qualified.** Explicit
305
+ targets govern reads, generated proposals, triage promotion, consolidation,
306
+ retrieval signals, cooldowns, and replay state. Duplicate bare refs in other
307
+ sources no longer affect the selected corpus. Generated lessons and
308
+ provenance follow stash placement conventions and canonical `xrefs`.
309
+ - **Writable Git boundaries commit only operation-owned paths.** Improve,
310
+ proposal, supersedes, and direct write flows preserve unrelated staged or
311
+ dirty work, including files beside generated assets in `content/` layouts.
312
+
297
313
  - **Directory (scope/domain) tokens now always merge into `tags` at index
298
314
  time**, even when an asset sets explicit `tags:` frontmatter. Previously
299
315
  explicit tags suppressed all path-derived tags, so a nested asset like
@@ -334,6 +350,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
334
350
 
335
351
  ### Fixed
336
352
 
353
+ - **Proposal promotion, reversion, and rejection are durable and recoverable.**
354
+ Acceptance and reversion persist target ownership and content fingerprints,
355
+ publish atomically across filesystem layouts, index immediately, commit exact
356
+ Git paths, and emit idempotent lifecycle events. Crash recovery and legacy
357
+ accepted proposals fail closed on ambiguous targets instead of clobbering
358
+ another source.
359
+ - **Engine/setup/health behavior now matches the effective improve plan.**
360
+ Built-in strategies compose over one baseline, setup preserves independent
361
+ general and LLM defaults, native OpenCode SDK execution does not require an
362
+ unused fallback, and health checks each enabled process and credential.
337
363
  - **Check-in directives now survive plain-text output and `workflow
338
364
  status`** (check-in review C2/M1): `formatWorkflowNextPlain` and
339
365
  `formatWorkflowStatusPlain` render the `CONTINUE` directive, and every
@@ -7,7 +7,9 @@
7
7
  "memoryInference": { "enabled": false },
8
8
  "graphExtraction": { "enabled": false },
9
9
  "extract": { "enabled": false },
10
- "triage": { "enabled": true, "applyMode": "queue", "policy": "personal-stash", "maxAcceptsPerRun": 100 }
10
+ "triage": { "enabled": true, "applyMode": "queue", "policy": "personal-stash", "maxAcceptsPerRun": 100 },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false }
11
13
  },
12
14
  "sync": { "enabled": true, "push": true }
13
15
  }
@@ -7,7 +7,9 @@
7
7
  "memoryInference": { "enabled": false },
8
8
  "graphExtraction": { "enabled": false },
9
9
  "extract": { "enabled": false },
10
- "triage": { "enabled": false }
10
+ "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false }
11
13
  },
12
14
  "sync": { "enabled": true, "push": true }
13
15
  }
@@ -7,7 +7,9 @@
7
7
  "memoryInference": { "enabled": true },
8
8
  "graphExtraction": { "enabled": true },
9
9
  "extract": { "enabled": true, "minNewSessions": 3, "triage": { "enabled": true, "minScore": 2 } },
10
- "triage": { "enabled": false }
10
+ "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false }
11
13
  },
12
14
  "sync": { "enabled": true, "push": true }
13
15
  }
@@ -7,7 +7,9 @@
7
7
  "memoryInference": { "enabled": false },
8
8
  "graphExtraction": { "enabled": true, "fullScan": true },
9
9
  "extract": { "enabled": false },
10
- "triage": { "enabled": false }
10
+ "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false }
11
13
  },
12
14
  "sync": { "enabled": true, "push": true }
13
15
  }
@@ -6,7 +6,10 @@
6
6
  "consolidate": { "enabled": false },
7
7
  "memoryInference": { "enabled": true },
8
8
  "graphExtraction": { "enabled": false },
9
- "triage": { "enabled": false }
9
+ "extract": { "enabled": false },
10
+ "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false }
10
13
  },
11
14
  "sync": { "enabled": true, "push": true }
12
15
  }
@@ -10,6 +10,7 @@
10
10
  "memoryInference": { "enabled": false },
11
11
  "graphExtraction": { "enabled": false },
12
12
  "extract": { "enabled": false },
13
+ "validation": { "enabled": false },
13
14
  "triage": {
14
15
  "enabled": true,
15
16
  "applyMode": "promote",
@@ -10,7 +10,9 @@
10
10
  "consolidate": { "enabled": false },
11
11
  "memoryInference": { "enabled": false },
12
12
  "graphExtraction": { "enabled": false },
13
- "triage": { "enabled": false }
13
+ "triage": { "enabled": false },
14
+ "validation": { "enabled": false },
15
+ "proactiveMaintenance": { "enabled": false }
14
16
  },
15
17
  "sync": { "enabled": true, "push": true }
16
18
  }
@@ -8,6 +8,8 @@
8
8
  "graphExtraction": { "enabled": false },
9
9
  "extract": { "enabled": false },
10
10
  "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false },
11
13
  "recombine": {
12
14
  "enabled": true,
13
15
  "minClusterSize": 3,
@@ -15,6 +15,7 @@
15
15
  "triage": { "enabled": true, "minScore": 2 },
16
16
  "minNewSessions": 1
17
17
  },
18
+ "validation": { "enabled": false },
18
19
  "triage": {
19
20
  "enabled": true,
20
21
  "applyMode": "promote",
@@ -8,6 +8,8 @@
8
8
  "graphExtraction": { "enabled": false },
9
9
  "extract": { "enabled": false },
10
10
  "triage": { "enabled": false },
11
+ "validation": { "enabled": false },
12
+ "proactiveMaintenance": { "enabled": false },
11
13
  "recombine": { "enabled": true },
12
14
  "procedural": { "enabled": false }
13
15
  },
@@ -1,5 +1,5 @@
1
1
  version: 2
2
2
  schedule: "0 3 * * 0"
3
3
  command: akm db backups
4
- enabled: true
5
- description: Weekly config/DB backup
4
+ enabled: false
5
+ description: Disabled until akm provides a general recurring backup command