akm-cli 0.10.261013-beta → 0.10.261014-beta

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 (477) hide show
  1. package/CHANGELOG.md +494 -3
  2. package/README.md +15 -0
  3. package/SECURITY.md +9 -8
  4. package/STABILITY.md +45 -49
  5. package/dist/assets/hints/cli-hints-full.md +15 -12
  6. package/dist/assets/opencode/akm-plugin.js +177 -0
  7. package/dist/assets/stash-skeleton/README.md +1 -1
  8. package/dist/assets/tasks/core/improve.yml +1 -1
  9. package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
  10. package/dist/assets/ui/config.js +27 -10
  11. package/dist/assets/workflows/workflow-template.md +2 -2
  12. package/dist/cli/clack.js +3 -1
  13. package/dist/cli/selection.js +33 -0
  14. package/dist/cli/shared.js +14 -1
  15. package/dist/cli/unknown-flags.js +6 -37
  16. package/dist/cli.js +69 -48
  17. package/dist/commands/agent/agent-dispatch.js +17 -25
  18. package/dist/commands/agent/contribute-cli.js +9 -8
  19. package/dist/commands/command/command-cli.js +4 -8
  20. package/dist/commands/command/command-execution.js +25 -39
  21. package/dist/commands/completions.js +1 -1
  22. package/dist/commands/config-cli.js +14 -5
  23. package/dist/commands/env/child-env.js +12 -14
  24. package/dist/commands/env/env-cli.js +2 -2
  25. package/dist/commands/env/secret-cli.js +2 -2
  26. package/dist/commands/health/checks.js +10 -849
  27. package/dist/commands/health/connections-and-harnesses-check.js +109 -0
  28. package/dist/commands/health/egress.js +3 -3
  29. package/dist/commands/health/html-report.js +9 -10
  30. package/dist/commands/health/plugin-staleness.js +18 -11
  31. package/dist/commands/health/report-view-model.js +16 -12
  32. package/dist/commands/health/semantic-search-check.js +85 -0
  33. package/dist/commands/health/type-directory-check.js +0 -3
  34. package/dist/commands/health.js +30 -42
  35. package/dist/commands/improve/consolidate/pair-pass.js +10 -25
  36. package/dist/commands/improve/consolidate.js +10 -15
  37. package/dist/commands/improve/distill.js +5 -15
  38. package/dist/commands/improve/eligibility.js +1 -1
  39. package/dist/commands/improve/execution.js +37 -40
  40. package/dist/commands/improve/extract-cli.js +6 -11
  41. package/dist/commands/improve/extract-prompt.js +2 -2
  42. package/dist/commands/improve/extract.js +67 -97
  43. package/dist/commands/improve/improve-cli.js +22 -128
  44. package/dist/commands/improve/improve-report.js +1 -1
  45. package/dist/commands/improve/improve-strategies.js +25 -108
  46. package/dist/commands/improve/improve.js +10 -14
  47. package/dist/commands/improve/loop-stages.js +3 -0
  48. package/dist/commands/improve/memory/memory-improve.js +1 -1
  49. package/dist/commands/improve/preparation.js +8 -13
  50. package/dist/commands/improve/reflect.js +203 -332
  51. package/dist/commands/improve/retrieval-scope.js +1 -1
  52. package/dist/commands/improve/session-asset.js +3 -2
  53. package/dist/commands/improve/stage.js +87 -115
  54. package/dist/commands/lint/base-linter.js +3 -3
  55. package/dist/commands/lint/index.js +2 -2
  56. package/dist/commands/models-cli.js +103 -63
  57. package/dist/commands/proposal/drain.js +26 -39
  58. package/dist/commands/proposal/proposal-cli.js +14 -18
  59. package/dist/commands/proposal/propose-cli.js +4 -2
  60. package/dist/commands/proposal/propose.js +37 -64
  61. package/dist/commands/proposal/repository.js +17 -17
  62. package/dist/commands/proposal/validators/proposal-validators.js +2 -2
  63. package/dist/commands/read/curate.js +10 -6
  64. package/dist/commands/read/registry-search.js +2 -48
  65. package/dist/commands/read/search-cli.js +1 -8
  66. package/dist/commands/read/search.js +5 -6
  67. package/dist/commands/read/show.js +2 -4
  68. package/dist/commands/remember.js +25 -40
  69. package/dist/commands/sources/bundle-config-ops.js +2 -2
  70. package/dist/commands/sources/info.js +12 -1
  71. package/dist/commands/sources/init.js +1 -1
  72. package/dist/commands/sources/installed-stashes.js +2 -2
  73. package/dist/commands/sources/migration-help.js +1 -1
  74. package/dist/commands/sources/plugin-upgrade.js +8 -15
  75. package/dist/commands/sources/schema-repair.js +4 -8
  76. package/dist/commands/sources/source-add.js +2 -2
  77. package/dist/commands/sources/source-manage.js +4 -4
  78. package/dist/commands/targets.js +175 -0
  79. package/dist/commands/tasks/explain.js +103 -68
  80. package/dist/commands/tasks/tasks-cli.js +9 -11
  81. package/dist/commands/tasks/tasks.js +37 -41
  82. package/dist/commands/ui/api.js +11 -3
  83. package/dist/commands/ui/redact.js +1 -27
  84. package/dist/commands/ui/workspace-actions.js +1 -1
  85. package/dist/commands/workflow/plan.js +1 -1
  86. package/dist/commands/workflow-cli.js +3 -4
  87. package/dist/core/adapter/adapters/agent-skills-adapter.js +10 -11
  88. package/dist/core/adapter/adapters/akm-adapter.js +33 -38
  89. package/dist/core/adapter/adapters/akm-lint.js +7 -8
  90. package/dist/core/adapter/adapters/akm-task-adapter.js +3 -3
  91. package/dist/core/adapter/adapters/akm-workflow-adapter.js +5 -5
  92. package/dist/core/adapter/adapters/claude-adapter.js +1 -1
  93. package/dist/core/adapter/adapters/dotenv-adapter.js +3 -3
  94. package/dist/core/adapter/adapters/generic-files-adapter.js +5 -5
  95. package/dist/core/adapter/adapters/index.js +3 -4
  96. package/dist/core/adapter/adapters/llm-wiki-adapter.js +12 -14
  97. package/dist/core/adapter/adapters/okf-adapter.js +8 -10
  98. package/dist/core/adapter/adapters/opencode-adapter.js +1 -1
  99. package/dist/core/adapter/adapters/shared.js +3 -3
  100. package/dist/core/adapter/adapters/tool-dir-shared.js +7 -25
  101. package/dist/core/adapter/adapters/website-snapshot-adapter.js +3 -3
  102. package/dist/core/adapter/detect-adapter.js +1 -1
  103. package/dist/core/adapter/execution-source.js +13 -35
  104. package/dist/core/adapter/registry.js +1 -1
  105. package/dist/core/adapter/validate-context.js +2 -4
  106. package/dist/core/asset/asset-placement.js +1 -1
  107. package/dist/core/asset/asset-ref.js +3 -3
  108. package/dist/core/closest-match.js +37 -0
  109. package/dist/core/common.js +33 -5
  110. package/dist/core/config/config-io.js +26 -18
  111. package/dist/core/config/config-schema.js +19 -106
  112. package/dist/core/config/config-sources.js +3 -3
  113. package/dist/core/config/config-types.js +4 -4
  114. package/dist/core/config/config-walker.js +50 -77
  115. package/dist/core/config/config.js +385 -93
  116. package/dist/core/config/convert-engine-references.js +114 -0
  117. package/dist/core/config/convert-engines-shared.js +40 -0
  118. package/dist/core/config/convert-engines.js +300 -0
  119. package/dist/core/config/convert-models-overlay.js +137 -0
  120. package/dist/core/config/credentials.js +304 -0
  121. package/dist/core/config/engine-semantics.js +3 -3
  122. package/dist/core/config/migrate-keys.js +222 -0
  123. package/dist/core/config/model-aliases.js +37 -0
  124. package/dist/core/config/models-file.js +34 -0
  125. package/dist/core/config/retired-engines.js +53 -0
  126. package/dist/core/config/schema/connections.js +41 -0
  127. package/dist/core/config/schema/embedding.js +2 -2
  128. package/dist/core/config/schema/harnesses.js +41 -0
  129. package/dist/core/config/schema/improve-processes.js +9 -28
  130. package/dist/core/config/schema/improve.js +36 -1
  131. package/dist/core/config/schema/index-config.js +18 -20
  132. package/dist/core/config/schema/primitives.js +41 -22
  133. package/dist/core/config/schema/search.js +6 -11
  134. package/dist/core/config/schema/sources-bundles.js +7 -7
  135. package/dist/core/config/schema/workflow.js +2 -6
  136. package/dist/core/config/unusable-entries.js +66 -0
  137. package/dist/core/content-safety.js +3 -6
  138. package/dist/core/endpoint-url.js +47 -0
  139. package/dist/core/errors.js +9 -15
  140. package/dist/core/extra-params.js +3 -3
  141. package/dist/core/improve-result.js +8 -9
  142. package/dist/core/json-schema.js +1 -1
  143. package/dist/core/lesson-lint.js +1 -1
  144. package/dist/core/llm-inference.js +80 -0
  145. package/dist/core/parse.js +2 -2
  146. package/dist/core/paths.js +32 -4
  147. package/dist/core/recognition-util.js +8 -10
  148. package/dist/core/redaction.js +78 -52
  149. package/dist/core/state/migrations.js +17 -22
  150. package/dist/core/structured.js +2 -68
  151. package/dist/core/subprocess.js +63 -22
  152. package/dist/core/type-presentation.js +10 -14
  153. package/dist/execution/input-contract.js +3 -6
  154. package/dist/execution/notices.js +49 -0
  155. package/dist/execution/resolved-request.js +24 -40
  156. package/dist/execution/source.js +21 -45
  157. package/dist/execution/target-ref.js +2 -2
  158. package/dist/indexer/bundle-identity-guard.js +6 -5
  159. package/dist/indexer/ensure-index.js +1 -1
  160. package/dist/indexer/index-writer-lock.js +1 -1
  161. package/dist/indexer/indexer.js +19 -6
  162. package/dist/indexer/installations.js +11 -14
  163. package/dist/indexer/materialize-embeddings.js +20 -16
  164. package/dist/indexer/passes/memory-inference.js +21 -50
  165. package/dist/indexer/passes/metadata.js +5 -5
  166. package/dist/indexer/scan/doc-to-entry.js +1 -1
  167. package/dist/indexer/scan/drain-dir.js +6 -8
  168. package/dist/indexer/search/db-search.js +9 -7
  169. package/dist/indexer/search/search-source.js +40 -22
  170. package/dist/indexer/usage/usage-events.js +2 -3
  171. package/dist/indexer/walk/index-context.js +2 -1
  172. package/dist/indexer/walk/matchers.js +3 -11
  173. package/dist/indexer/walk/walker.js +14 -4
  174. package/dist/integrations/agent/akm-read-tools.js +81 -0
  175. package/dist/integrations/agent/config.js +1 -1
  176. package/dist/integrations/agent/detect.js +32 -36
  177. package/dist/integrations/agent/execution.js +130 -428
  178. package/dist/integrations/agent/index.js +1 -1
  179. package/dist/integrations/agent/profiles.js +24 -28
  180. package/dist/integrations/agent/prompts.js +17 -30
  181. package/dist/integrations/agent/request-lowering.js +67 -101
  182. package/dist/integrations/agent/resolution.js +332 -0
  183. package/dist/integrations/agent/runner-dispatch.js +154 -178
  184. package/dist/integrations/agent/runner.js +20 -72
  185. package/dist/integrations/agent/runtime-port.js +4 -0
  186. package/dist/integrations/agent/runtime.js +10 -0
  187. package/dist/integrations/agent/spawn.js +65 -190
  188. package/dist/integrations/harnesses/aider/index.js +19 -39
  189. package/dist/integrations/harnesses/amazonq/index.js +17 -32
  190. package/dist/integrations/harnesses/claude/index.js +59 -28
  191. package/dist/integrations/harnesses/claude/session-log.js +7 -5
  192. package/dist/integrations/harnesses/codex/index.js +19 -31
  193. package/dist/integrations/harnesses/copilot/index.js +17 -35
  194. package/dist/integrations/harnesses/gemini/index.js +18 -34
  195. package/dist/integrations/harnesses/harness.js +36 -0
  196. package/dist/integrations/harnesses/index.js +20 -51
  197. package/dist/integrations/harnesses/opencode/agent-builder.js +132 -100
  198. package/dist/integrations/harnesses/opencode/index.js +11 -33
  199. package/dist/integrations/harnesses/opencode/roots.js +50 -0
  200. package/dist/integrations/harnesses/opencode/runtime/binary.js +206 -0
  201. package/dist/integrations/harnesses/opencode/runtime/command.js +152 -0
  202. package/dist/integrations/harnesses/opencode/runtime/index.js +177 -0
  203. package/dist/integrations/harnesses/opencode/runtime/tar.js +107 -0
  204. package/dist/integrations/harnesses/opencode/session-log-v1.js +15 -7
  205. package/dist/integrations/harnesses/opencode/session-log-v2.js +72 -48
  206. package/dist/integrations/harnesses/opencode/session-log.js +58 -137
  207. package/dist/integrations/harnesses/opencode/version.js +34 -53
  208. package/dist/integrations/harnesses/openhands/index.js +13 -37
  209. package/dist/integrations/harnesses/pi/index.js +21 -32
  210. package/dist/integrations/lockfile.js +1 -1
  211. package/dist/integrations/session-logs/index.js +11 -31
  212. package/dist/llm/client.js +93 -111
  213. package/dist/llm/embedder.js +19 -34
  214. package/dist/llm/embedders/connection.js +31 -0
  215. package/dist/llm/embedders/local-model-files.js +56 -0
  216. package/dist/llm/embedders/local.js +146 -115
  217. package/dist/llm/embedders/remote.js +26 -24
  218. package/dist/llm/embedders/types.js +1 -1
  219. package/dist/llm/index-passes.js +33 -39
  220. package/dist/llm/memory-infer.js +67 -77
  221. package/dist/llm/model-list.js +35 -0
  222. package/dist/llm/rerank-client.js +8 -14
  223. package/dist/llm/structured-call.js +45 -99
  224. package/dist/llm/structured.js +60 -0
  225. package/dist/output/renderers.js +2 -7
  226. package/dist/output/shapes/helpers.js +18 -42
  227. package/dist/output/shapes/passthrough.js +1 -0
  228. package/dist/output/shapes.js +1 -7
  229. package/dist/output/text/command-format.js +29 -37
  230. package/dist/output/text/health-format.js +8 -2
  231. package/dist/output/text/helpers.js +1 -1
  232. package/dist/output/text/migrate.js +12 -0
  233. package/dist/output/text/models.js +3 -2
  234. package/dist/output/text/registry-commands.js +1 -2
  235. package/dist/output/text/show-format.js +0 -2
  236. package/dist/output/text/targets-table.js +70 -0
  237. package/dist/output/text/workflow-format.js +7 -8
  238. package/dist/output/text.js +1 -1
  239. package/dist/registry/providers/skills-sh.js +1 -28
  240. package/dist/registry/providers/static-index.js +1 -71
  241. package/dist/runtime.js +6 -2
  242. package/dist/scripts/akm-migrate-node.js +5280 -4263
  243. package/dist/scripts/akm-migrate.js +5280 -4263
  244. package/dist/setup/detect.js +28 -273
  245. package/dist/setup/endpoint.js +36 -0
  246. package/dist/setup/semantic-assets.js +13 -19
  247. package/dist/setup/setup-flags.js +77 -0
  248. package/dist/setup/setup-plan.js +144 -0
  249. package/dist/setup/setup.js +134 -358
  250. package/dist/setup/steps/connection-shared.js +49 -101
  251. package/dist/setup/steps/connection.js +121 -524
  252. package/dist/setup/steps/embeddings.js +151 -0
  253. package/dist/setup/steps/harnesses.js +118 -0
  254. package/dist/setup/steps/platforms.js +2 -81
  255. package/dist/setup/steps.js +10 -0
  256. package/dist/setup/summary.js +67 -0
  257. package/dist/sources/freshness.js +16 -21
  258. package/dist/sources/providers/git-provider.js +2 -9
  259. package/dist/sources/providers/provider-utils.js +1 -5
  260. package/dist/sources/snapshot-fetchers/robots.js +11 -12
  261. package/dist/sources/snapshot-fetchers/website-ingest.js +8 -15
  262. package/dist/standalone/onnxruntime-library.js +52 -0
  263. package/dist/storage/repositories/improve-ledger-repository.js +1 -1
  264. package/dist/storage/repositories/improve-runs-repository.js +0 -13
  265. package/dist/storage/repositories/index-entries-repository.js +2 -2
  266. package/dist/storage/repositories/workflow-runs-repository.js +8 -15
  267. package/dist/storage/sqlite-read-snapshot.js +33 -29
  268. package/dist/tasks/log-redaction.js +7 -119
  269. package/dist/tasks/prepare/prepare-support.js +5 -5
  270. package/dist/tasks/prepare/prepare.js +5 -5
  271. package/dist/tasks/prepare/script-capture.js +3 -5
  272. package/dist/tasks/run/attempt-lifecycle.js +17 -35
  273. package/dist/tasks/run/load-task.js +8 -13
  274. package/dist/tasks/run/run-command-task.js +15 -10
  275. package/dist/tasks/run/run-native-task.js +8 -13
  276. package/dist/tasks/run/run-task.js +5 -8
  277. package/dist/tasks/run/run-workflow-task.js +12 -19
  278. package/dist/tasks/run/task-history.js +9 -17
  279. package/dist/tasks/run/task-log.js +1 -5
  280. package/dist/tasks/scheduler-invocation.js +13 -18
  281. package/dist/tasks/source/bounded-document.js +31 -76
  282. package/dist/tasks/source/project-v4.js +5 -3
  283. package/dist/tasks/source/task-input-diagnostics.js +3 -4
  284. package/dist/tasks/source/task-source-v4.js +47 -68
  285. package/dist/tasks/source-v3.js +2 -5
  286. package/dist/tasks/task-run-reserved-flags.js +1 -2
  287. package/dist/workflows/authoring/authoring.js +2 -7
  288. package/dist/workflows/concurrency-policy.js +4 -4
  289. package/dist/workflows/exec/child-workflow.js +0 -2
  290. package/dist/workflows/exec/dispatch-redaction.js +14 -83
  291. package/dist/workflows/exec/environment.js +2 -3
  292. package/dist/workflows/exec/exec-unit.js +10 -59
  293. package/dist/workflows/exec/frozen-judge.js +10 -26
  294. package/dist/workflows/exec/native-executor.js +56 -45
  295. package/dist/workflows/exec/run-workflow.js +7 -24
  296. package/dist/workflows/exec/step-work.js +9 -14
  297. package/dist/workflows/exec/unit-dispatch.js +6 -13
  298. package/dist/workflows/freeze/freeze.js +14 -32
  299. package/dist/workflows/freeze/step-values.js +5 -11
  300. package/dist/workflows/freeze/targets/command.js +3 -6
  301. package/dist/workflows/freeze/task-bindings.js +0 -1
  302. package/dist/workflows/parser.js +44 -34
  303. package/dist/workflows/plan.js +3 -1
  304. package/dist/workflows/renderer.js +6 -5
  305. package/dist/workflows/resource-limits.js +2 -2
  306. package/dist/workflows/runtime/run-plan.js +2 -1
  307. package/dist/workflows/runtime/runs.js +14 -9
  308. package/docs/README.md +10 -16
  309. package/docs/architecture/README.md +2 -37
  310. package/docs/architecture/adapters.md +2 -2
  311. package/docs/architecture/akm-core-principles.md +256 -118
  312. package/docs/architecture/architecture.md +282 -98
  313. package/docs/architecture/improvement.md +8 -2
  314. package/docs/architecture/internals/classification.md +1 -3
  315. package/docs/architecture/internals/fresh-host-rebuild-runbook.md +7 -6
  316. package/docs/architecture/internals/health-advisories.md +35 -74
  317. package/docs/architecture/internals/improve-workflow.md +27 -26
  318. package/docs/architecture/internals/indexing.md +3 -3
  319. package/docs/architecture/internals/storage-locations.md +45 -12
  320. package/docs/architecture/persisted-data-compat.md +9 -6
  321. package/docs/architecture/specs/okf-support.md +9 -11
  322. package/docs/architecture/specs/ref.md +7 -9
  323. package/docs/architecture/testing/testing-workflow.md +164 -42
  324. package/docs/architecture/workflow-engine.md +17 -14
  325. package/docs/guides/README.md +0 -1
  326. package/docs/guides/author-bundles.md +1 -3
  327. package/docs/guides/author-workflows.md +61 -73
  328. package/docs/guides/bundles.md +4 -5
  329. package/docs/guides/discover-and-load.md +1 -1
  330. package/docs/guides/getting-started.md +49 -3
  331. package/docs/guides/improve-the-library.md +10 -4
  332. package/docs/guides/recipes/headless-install.md +11 -16
  333. package/docs/guides/run-workflows.md +6 -9
  334. package/docs/guides/scheduling.md +2 -2
  335. package/docs/guides/use-with-any-agent.md +20 -22
  336. package/docs/integration/bundling-akm.md +19 -9
  337. package/docs/maintainers/README.md +0 -3
  338. package/docs/migration/README.md +10 -3
  339. package/docs/migration/release-notes/0.10.0.md +81 -16
  340. package/docs/migration/release-notes/0.6.0.md +1 -1
  341. package/docs/migration/release-notes/0.7.0.md +1 -1
  342. package/docs/migration/release-notes/0.9.0.md +1 -1
  343. package/docs/migration/release-notes/README.md +1 -1
  344. package/docs/migration/v0.9-to-v0.10.md +295 -59
  345. package/docs/migration/v0.9.1-to-v0.9.2.md +6 -5
  346. package/docs/posts/config-v2-lessons-16.md +1 -1
  347. package/docs/posts/llm-mode-reflect-13.md +1 -1
  348. package/docs/posts/release-0.6.0.md +11 -11
  349. package/docs/posts/release-0.8.0.md +4 -4
  350. package/docs/posts/workflows-vaults-09.md +1 -1
  351. package/docs/reference/README.md +1 -1
  352. package/docs/reference/asset-types.md +2 -2
  353. package/docs/reference/cli.md +356 -279
  354. package/docs/reference/configuration.md +569 -557
  355. package/docs/reference/data-and-telemetry.md +8 -5
  356. package/docs/reference/env-and-secrets.md +11 -5
  357. package/docs/reference/refs.md +3 -20
  358. package/docs/reference/registry.md +6 -27
  359. package/docs/reference/supported-formats.md +1 -1
  360. package/docs/reference/tasks.md +11 -8
  361. package/docs/reference/ui-api.md +11 -6
  362. package/docs/reference/workflow-schema.md +106 -134
  363. package/docs/reference/workflows.md +4 -6
  364. package/package.json +9 -11
  365. package/schemas/akm-config.json +1696 -2922
  366. package/schemas/akm-task.json +2 -0
  367. package/schemas/akm-workflow.json +36 -9
  368. package/ROADMAP.md +0 -112
  369. package/dist/assets/models.json +0 -35
  370. package/dist/commands/health/engine-usage.js +0 -45
  371. package/dist/core/config/schema/engines.js +0 -160
  372. package/dist/core/config/schema/execution.js +0 -23
  373. package/dist/core/spawn-env.js +0 -268
  374. package/dist/integrations/agent/builder-shared.js +0 -33
  375. package/dist/integrations/agent/builders.js +0 -43
  376. package/dist/integrations/agent/engine-fallback.js +0 -59
  377. package/dist/integrations/agent/engine-resolution.js +0 -335
  378. package/dist/integrations/agent/model-map.js +0 -475
  379. package/dist/integrations/harnesses/aider/agent-builder.js +0 -107
  380. package/dist/integrations/harnesses/aider/result-extractor.js +0 -53
  381. package/dist/integrations/harnesses/amazonq/agent-builder.js +0 -138
  382. package/dist/integrations/harnesses/amazonq/result-extractor.js +0 -48
  383. package/dist/integrations/harnesses/claude/agent-builder.js +0 -106
  384. package/dist/integrations/harnesses/claude/config-import.js +0 -67
  385. package/dist/integrations/harnesses/claude/result-extractor.js +0 -67
  386. package/dist/integrations/harnesses/codex/agent-builder.js +0 -150
  387. package/dist/integrations/harnesses/codex/result-extractor.js +0 -110
  388. package/dist/integrations/harnesses/copilot/agent-builder.js +0 -117
  389. package/dist/integrations/harnesses/copilot/result-extractor.js +0 -178
  390. package/dist/integrations/harnesses/gemini/agent-builder.js +0 -114
  391. package/dist/integrations/harnesses/gemini/result-extractor.js +0 -149
  392. package/dist/integrations/harnesses/opencode/config-import.js +0 -149
  393. package/dist/integrations/harnesses/opencode/model-config.js +0 -33
  394. package/dist/integrations/harnesses/opencode/model-work-agent.js +0 -115
  395. package/dist/integrations/harnesses/opencode/session-log-types.js +0 -12
  396. package/dist/integrations/harnesses/opencode-sdk/index.js +0 -44
  397. package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +0 -1052
  398. package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +0 -199
  399. package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +0 -254
  400. package/dist/integrations/harnesses/opencode-sdk/wire.js +0 -66
  401. package/dist/integrations/harnesses/openhands/agent-builder.js +0 -120
  402. package/dist/integrations/harnesses/openhands/result-extractor.js +0 -135
  403. package/dist/integrations/harnesses/pi/agent-builder.js +0 -89
  404. package/dist/integrations/harnesses/pi/result-extractor.js +0 -168
  405. package/dist/integrations/harnesses/shared.js +0 -18
  406. package/dist/integrations/harnesses/types.js +0 -55
  407. package/dist/llm/feature-gate.js +0 -115
  408. package/dist/output/shapes/models-list.js +0 -16
  409. package/dist/output/shapes/registry-search.js +0 -10
  410. package/dist/setup/detected-engines.js +0 -136
  411. package/dist/setup/engine-config.js +0 -97
  412. package/dist/setup/harness-config-import.js +0 -47
  413. package/dist/setup/providers.js +0 -14
  414. package/dist/setup/steps/semantic.js +0 -39
  415. package/dist/workflows/exec/lowering-notices.js +0 -23
  416. package/docs/architecture/0.10-process-rules.md +0 -832
  417. package/docs/architecture/akm-architecture-decision-history.md +0 -2055
  418. package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +0 -544
  419. package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +0 -72
  420. package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +0 -142
  421. package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +0 -187
  422. package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +0 -97
  423. package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +0 -108
  424. package/docs/architecture/decisions/0006-task-source-version-routing.md +0 -124
  425. package/docs/architecture/decisions/0007-workflow-composition-bounds.md +0 -83
  426. package/docs/architecture/decisions/0008-task-binding-normalization.md +0 -88
  427. package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +0 -80
  428. package/docs/architecture/decisions/0010-driver-protocol-cut.md +0 -36
  429. package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +0 -125
  430. package/docs/architecture/decisions/README.md +0 -62
  431. package/docs/architecture/internals/functional-contract-patterns.md +0 -340
  432. package/docs/architecture/internals/registry-network-boundary.md +0 -57
  433. package/docs/architecture/internals/search.md +0 -248
  434. package/docs/architecture/reviews/env-secret-access.md +0 -319
  435. package/docs/architecture/runtime-boundary-design.md +0 -153
  436. package/docs/architecture/specs/0.9.0-close-out-plan.md +0 -361
  437. package/docs/architecture/specs/0.9.0-decisions.md +0 -532
  438. package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +0 -745
  439. package/docs/architecture/specs/0.9.0-open-items-register.md +0 -135
  440. package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +0 -740
  441. package/docs/architecture/specs/0.9.0-release-surface-review.md +0 -636
  442. package/docs/architecture/specs/agent-command-engine-model-design.md +0 -513
  443. package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +0 -501
  444. package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +0 -291
  445. package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +0 -2059
  446. package/docs/architecture/specs/di-seams-plan.md +0 -539
  447. package/docs/architecture/specs/driver-protocol-keep-or-cut.md +0 -275
  448. package/docs/architecture/specs/fact-asset-type.md +0 -142
  449. package/docs/architecture/specs/improve-collapse-churn-detector-design.md +0 -634
  450. package/docs/architecture/specs/reviews/task-workflow-unification/README.md +0 -72
  451. package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +0 -152
  452. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +0 -352
  453. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +0 -300
  454. package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +0 -402
  455. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +0 -758
  456. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +0 -645
  457. package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +0 -602
  458. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +0 -27
  459. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +0 -27
  460. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +0 -74
  461. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +0 -15
  462. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +0 -132
  463. package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +0 -147
  464. package/docs/architecture/specs/stash-conventions-code-spec.md +0 -275
  465. package/docs/architecture/specs/stash-organization-conventions.md +0 -377
  466. package/docs/architecture/specs/task-workflow-format-unification.md +0 -721
  467. package/docs/architecture/specs/workflow-engine-buy-vs-build.md +0 -231
  468. package/docs/architecture/specs/workflow-format-unification.md +0 -432
  469. package/docs/architecture/testing/manual-testing-checklist.md +0 -3379
  470. package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +0 -924
  471. package/docs/architecture/testing/task-workflow-manual-tests.md +0 -1702
  472. package/docs/guides/claude-code-vs-akm-workflows.md +0 -29
  473. package/docs/guides/knowledge-management.md +0 -18
  474. package/docs/maintainers/curate-workmap.md +0 -335
  475. package/docs/migration/v0.5-to-v0.6.md +0 -759
  476. package/docs/migration/v0.7-to-v0.8.md +0 -1378
  477. package/docs/plans/0.9.2-agent-command-workflow-plan.md +0 -423
package/CHANGELOG.md CHANGED
@@ -6,6 +6,496 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.261014] - 2026-10-27
10
+
11
+ ### Added
12
+
13
+ - Connections and harnesses replace engines (#1244). `config.json` names
14
+ `connections`, the OpenAI-compatible endpoints akm reaches models through
15
+ (`endpoint`, `apiKey`, `models`, `contextLength`, `timeoutMs`, `concurrency`;
16
+ every other key on a connection or a model entry is a request field in the
17
+ endpoint's own spelling, sent as written), and `harnesses`, the agent programs
18
+ you already have (`platform`, `bin`, `args`, `workspace`, `agent`,
19
+ `timeoutMs`, `models`). There is no `defaults` block: the entry named
20
+ `default`, or the only entry, is the default connection or harness. Anywhere a
21
+ connection or harness can be named (config, a flag, an asset's `connection:`
22
+ or `harness:`) and none is, the default is used; a name that is not
23
+ configured is an error (exit 78) that names it, lists the configured ones and
24
+ the nearest, and is never replaced by the default. With neither
25
+ configured, model features and agent work are off, each command that needs one
26
+ says so and points at `akm setup`, and everything that needs no model keeps
27
+ working.
28
+ - `improve.strategy` replaces `defaults.improveStrategy`. `improve.processes.
29
+ <process>` and `improve.qualityGate` say where each process and the quality
30
+ gates run (`connection` or `harness`, `model`, `llm`, `timeoutMs`),
31
+ `improve.connection` and `improve.harness` where all of `akm improve`'s model
32
+ work runs, and `index` takes `connection`, `model`, `llm` and `timeoutMs`. A
33
+ strategy says which processes run, never where.
34
+ - `embedding` with a `model` and no `endpoint` is served by the default
35
+ connection: its endpoint and its key. With no connection, the built-in local
36
+ embedder runs, with one warning.
37
+ - A connection or harness its own schema rejects (no endpoint, an endpoint that
38
+ is not a URL, a harness akm cannot run) is ignored with one warning naming
39
+ it, instead of stopping every command; the rest of the file loads.
40
+ - Aliases and `akm models`. A connection's `models` maps an alias (`fast`,
41
+ `balanced`, `reasoning`, or your own) to the model's name, or to an object
42
+ holding the name and request fields of its own; a harness's `models` maps an
43
+ alias to the harness's own model name, over the map akm ships for its platform
44
+ (Claude Code has one). An alias a connection does not map answers with its
45
+ first model. `akm models` lists a connection's aliases, then the models its
46
+ endpoint lists, and `akm models set <alias> <model>` changes one, keeping the
47
+ request fields of an alias that has them and warning when the endpoint does not
48
+ list the model. `--connection` picks another connection and `--no-probe` skips
49
+ the listing.
50
+ - `--connection`, `--harness` and `--model` on `akm agent`, `akm command run`,
51
+ `akm improve`, `akm proposal new`, `akm proposal extract` and `akm task add`
52
+ say where one invocation runs and with which model; omitted means the default,
53
+ and `--connection` and `--harness` are mutually exclusive. A run's selection
54
+ reaches every call in it, the quality-gate judges of `akm improve` included.
55
+ `akm task add` writes them into the task, and `akm task explain` reads them
56
+ back.
57
+ - Keys come from a `$VAR` reference (`apiKey: "$NAME"`) or from
58
+ `<config dir>/credentials.json` (0600), where each key is stored for one
59
+ endpoint: `{ "connections": { "<name>": { "key", "endpoint" } }, "services":
60
+ { "embedding" | "curateRerank": { "key", "endpoint" } } }`. A key is read for
61
+ that endpoint alone, and a connection called `embedding` and the embedding
62
+ service hold different keys. A connection only an `extends` base defines uses
63
+ no key stored on this host (the base chose its endpoint); its runner records
64
+ `storedKey: false`, so a journaled or resumed run withholds it whether or not
65
+ the config is loaded. A literal `apiKey` in
66
+ `config.json` is kept, warned about once, and never read, sent or printed;
67
+ `akm config get` masks it and the redactor treats it as a secret.
68
+ - `akm health` has one `connections-and-harnesses` check, and `akm info` a
69
+ `connectionsAndHarnesses` list, with a
70
+ row for each connection (its endpoint, whether its key is held and, for
71
+ health, whether the endpoint answers), each harness (its platform, whether its
72
+ binary is found and, when probing, its version) and each kind of work (improve,
73
+ judges, agents, extract, enrich, index, embedding, curate rerank) naming the
74
+ connection or harness and the model it resolves to. The rows are resolved by
75
+ the code the calls use, so the table cannot disagree with a dispatch. An
76
+ override is compared by kind as well as name and model, so a connection and a
77
+ harness that share a name do not hide a per-process pin; each override row
78
+ carries `kind`. `akm info` contacts nothing, and neither does `akm health
79
+ --no-probe`.
80
+ - `akm setup` asks which installed agent programs to enable (saying whether akm
81
+ can limit each to reading and searching for its own model calls, judged on the
82
+ program the harness will run: `harnesses.<name>.bin`, else the platform's
83
+ binary on `PATH`), whether the default one also
84
+ takes akm's model calls (a no with no connection after it is saved as
85
+ `modelWork: false` on that harness, which keeps model calls off it by default;
86
+ a saved `modelWork: false` stays through `--yes` and is the question's default,
87
+ and only a yes clears it), an endpoint with its key at a masked prompt and one
88
+ model for each alias, picked from the models the endpoint lists, and where
89
+ embeddings come from. A key you type is stored in `credentials.json` for the
90
+ connection and its endpoint. Each flag answers one question and `--yes` takes the
91
+ detected default for the rest: `--endpoint`, `--api-key-env`, `--name`,
92
+ `--harness`, `--embedding`, `--embedding-endpoint` and
93
+ `--embedding-api-key-env`. A rerun starts from the current config and keeps the
94
+ alias picks it has. `--no-probe` runs offline: the endpoint is not contacted,
95
+ no models are listed, and the connection has no model until `akm models set`
96
+ names one.
97
+ - Non-interactively, with no harness yet configured, `akm setup` enables every
98
+ agent program found on `PATH`, the first the default; with none, agent work
99
+ runs on akm's own runtime over the connection.
100
+ - Agent work on a connection, with no harness, runs on akm's own runtime: a
101
+ pinned OpenCode 2 binary (2.1.4) that akm fetches and runs as a process, one
102
+ per run (#1244). It has no entry in config, and `opencode-sdk` is not a
103
+ harness platform.
104
+ - The first run fetches the binary: the one `@opencode/cli-<platform>` package
105
+ for the machine (its OS and CPU, musl, and the baseline build for an x64 CPU
106
+ without AVX2, chosen as OpenCode's own installer chooses), about 114 MB, from
107
+ the npm registry into `<akm cache dir>/opencode/2.1.4/`, checked against the
108
+ registry's sha512 integrity before anything is extracted. Two akm processes
109
+ fetching at once both finish. A failed fetch fails the run as not started and
110
+ names the package, its URL and the cache path; with no network for that step,
111
+ enable the `opencode` harness with an installed OpenCode 2. No setting points
112
+ the runtime at a binary of your own. On Alpine/musl the binary needs
113
+ `libstdc++` and `libgcc` (the Alpine Node image has them).
114
+ - The run is the command the `opencode` harness builds for OpenCode 2 model
115
+ work (`run --standalone --title akm`, the prompt on stdin), driven by the
116
+ connection a run was dispatched with, as the run froze it: the connection is
117
+ the process's only provider (`@ai-sdk/openai-compatible`, which the binary
118
+ bundles, so nothing is downloaded for it), at the connection's endpoint with
119
+ its key, carrying the one model the run names and the context window and
120
+ output cap the connection states, so the endpoint receives the model name as
121
+ written, as on chat, and a connection edited or removed later cannot redirect
122
+ the run.
123
+ - The process is akm's own. OpenCode's config, data, cache, state and temp
124
+ directories are under `<akm data dir>/opencode-runtime/`, no `OPENCODE_*`
125
+ variable of akm's environment reaches it, and it has no user or project
126
+ OpenCode config, no Claude Code skills, no model catalog fetch and no hosted
127
+ free models. It still
128
+ loads what OpenCode reads from outside its config directories: `~/.agents`,
129
+ and OpenCode's system config (`/etc/opencode`, or macOS managed
130
+ preferences).
131
+ - `--standalone` keeps a run to one process that ends with it, and another
132
+ run's unfinished turns are never resumed (OpenCode's background service
133
+ resumes every top-level session whose turn did not finish, whichever process
134
+ owns it). OpenCode makes and migrates its database at start, and two
135
+ processes doing that to one database break each other, so the first start of
136
+ the runtime's OpenCode version is a run of its own (`session list`, no model)
137
+ under a lock file in the runtime directory, and every run that starts with it,
138
+ a workflow's parallel units or another akm process's, waits for it.
139
+ - A plugin akm writes to the runtime's config directory gives the agent akm's
140
+ read tools (`akm_search`, `akm_show`, `akm_curate`), which call the `akm` that
141
+ started the run with `--detail agent --format json` and the run's
142
+ environment, so a stamped run's reads count as that run's. The same plugin lays
143
+ the connection's request fields, in the endpoint's own spelling, over each
144
+ model request, and takes off the output cap OpenCode adds to every request
145
+ (`max_completion_tokens: 32000` unless the model's limit says otherwise): a
146
+ request carries the cap the connection or the call writes, and none
147
+ otherwise, as on chat. A persona goes in the prompt.
148
+ - The commands the agent runs get the environment a CLI harness's child gets,
149
+ less its `OPENCODE_*` variables: akm's own, with its directories
150
+ (`AKM_CONFIG_DIR` and the rest) and the run's variables (workflow and task
151
+ `env:`, `AKM_EVENT_SOURCE`) set over it. What
152
+ akm sets for the OpenCode process itself (its directories and its OpenCode
153
+ settings) is put back to what akm runs in, or removed, for each command.
154
+ - The connection's key is in no process's environment: the inline config names
155
+ a file under `<akm data dir>/opencode-runtime/keys/` that holds it for the
156
+ run (0600, removed when the run ends).
157
+ - Sessions are stored in the runtime's own OpenCode database,
158
+ `<akm data dir>/opencode-runtime/data/opencode/opencode.db`; akm reads your
159
+ OpenCode 2 database read-only, for OpenCode 2 history (below).
160
+ - A timeout or an abort ends the run's process group, SIGINT first and SIGTERM
161
+ and SIGKILL after 5 s each, as for every harness. A unit `timeout` therefore
162
+ ends a turn in about the timeout when the endpoint is down; OpenCode alone
163
+ retries a failing endpoint with backoff for over a minute and has no config
164
+ setting to shorten it, so a unit with no `timeout` waits that long.
165
+ - OpenCode's headless `run` cancels questions and rejects permission requests,
166
+ and the model carries on. A run reports its session id and the tokens its turn
167
+ used, read from the session OpenCode keeps in the runtime's database, so a
168
+ workflow's `budget.max_tokens` and the unit journal count them; a harness run
169
+ reports neither.
170
+ - A failed run reports as a harness run does, a non-zero exit with OpenCode's
171
+ own message: the `llm_rate_limit`, `llm_content_filter` and `parse_error`
172
+ reasons the embedded runtime gave are not given.
173
+ - `platform: "opencode"` is your OpenCode, whichever major is installed, run
174
+ through its CLI: `opencode run` with the prompt on stdin, a model only when akm
175
+ names one, an agent only when the asset names one, and your `args` as written.
176
+ Agent work adds nothing else. Your OpenCode owns its configuration, logins and
177
+ sessions; akm reads, copies and embeds nothing of yours, and its runs are in
178
+ your OpenCode history, which improve reads. An interactive `akm agent` still
179
+ hands the terminal to the CLI. Model work is akm's own process: it adds its
180
+ agent to your inline config, read as OpenCode reads it (JSONC, and a
181
+ `{env:NAME}` reference written outside a string replaced by its value), and
182
+ keeps the rest of it, sets
183
+ `OPENCODE_DISABLE_FREE_MODELS=1` (OpenCode 2.1.2 and later honor it: a call
184
+ with no usable provider fails instead of sending the prompt to OpenCode's
185
+ hosted free model), and on OpenCode 2 runs `--standalone` (one process that
186
+ ends with the run, not a background service) with `--title akm`.
187
+ - A config in the old form (`engines`, `defaults.engine`, `defaults.llmEngine`,
188
+ `defaults.improveStrategy`, `workflow.judgeEngine`, a strategy's `engine`,
189
+ `model`, `llm` and `timeoutMs`) still loads: it is read as the new form in
190
+ memory, with one warning that names `akm migrate apply`, and the file is
191
+ rewritten only by `akm migrate apply`. An ordinary write (`akm config set`)
192
+ edits the file's own document and no longer converts it or drops what the
193
+ loader only reads; removing a value the old form supplies is refused, naming
194
+ `akm migrate apply`. `akm migrate apply` converts it for good, under a backup
195
+ of `config.json`:
196
+ - `engines` and `defaults` become `connections` and `harnesses` (the default
197
+ engine is renamed `default`, and references follow), `defaults.improveStrategy`
198
+ becomes `improve.strategy`, a strategy's per-process `engine` becomes
199
+ `connection` or `harness` by the target's kind, the where-fields a strategy
200
+ carried move to `improve.processes` and `improve.qualityGate`, and
201
+ `index.defaults.*` and `index.<pass>.engine` become `index.*` and
202
+ `connection`. An engine that is akm's own OpenCode runtime, or a setting akm
203
+ no longer reads, is dropped with a note.
204
+ - An engine's `apiKeyFile`, a literal or `${secrets/...}` `apiKey`, and the
205
+ same literal or secret-store `apiKey` on a connection, `embedding` or
206
+ `search.curateRerank`, are read and stored in `credentials.json` for the
207
+ connection's new name (or the `embedding` or `curateRerank` service) and the
208
+ endpoint the block names, then removed from the file. A key that cannot be
209
+ moved (its secret does not resolve, the block names no endpoint of its own, a
210
+ `connections` entry now gives it another endpoint than its engine wrote the key
211
+ for, or `credentials.json` already holds a different key or endpoint for that
212
+ slot) stays on the
213
+ connection as `apiKey`, with a note. One note per key names it, never its
214
+ value. `AKM_ENGINE_<NAME>_API_KEY` and `AKM_LLM_API_KEY`, when set, become
215
+ `apiKey: "$VAR"`. An engine that names no key, with none of those variables
216
+ set, gets none, and a note names the variables.
217
+ - A key in `credentials.json`'s older flat `{ "<name>": "<key>" }` form is
218
+ filed under the endpoint the config gives its block, after the file is copied
219
+ to `<cache dir>/config-backups/credentials.json.<timestamp>`. A block that
220
+ already has a stored key is never overwritten: the same key for the same
221
+ endpoint drops the older entry, and any other leaves both, with a note. A flat
222
+ key called `connections` or `services` is told from the namespace of that name
223
+ by its shape.
224
+ - The old engine names are kept in the data directory (`migrate/engine-targets.json`)
225
+ until no `engine:` key that names one is left in a file the migration can
226
+ reach, so an asset in a read-only bundle, a block it could not rewrite, or an
227
+ asset that is a symbolic link (read through, never rewritten) keeps its
228
+ meaning in the meantime, as does a retired `--engine` flag. The run
229
+ that forgets them adds one note, `assetEngineKeys.notes`, listing each
230
+ renamed engine with the flag that replaces `--engine <old name>`
231
+ (`--connection` or `--harness`).
232
+ - The user `models.json` is folded into the models of the connections and
233
+ harnesses it names, then moved to
234
+ `<cache dir>/config-backups/models.json.<timestamp>`. A connection's own
235
+ column beats the `*` column and the flat shorthand, which beat the engine's
236
+ own model; a model the config already names for an alias stands. What it
237
+ cannot place is listed in the notes.
238
+ - `engine:` on commands, agents, workflows (`defaults` and units) and task
239
+ sources becomes `connection:` or `harness:` by what the name is now, under
240
+ one backup directory per run (a name that is neither is written as
241
+ `harness:`, with a note). `akm migrate status` and `--dry-run` list the files.
242
+ The step reads the roots the runtime reads, by each bundle's adapter (an
243
+ `akm` stash's typed directories, an `akm-workflow` or `akm-task` bundle's
244
+ root, a Claude or OpenCode bundle's commands and agents, there for
245
+ `akm.engine` only), the default stash (`~/akm`)
246
+ included when no bundle or `AKM_BUNDLE_DIR` names it, and leaves a disabled
247
+ bundle as written, the default stash or the `AKM_BUNDLE_DIR` directory
248
+ included, under any spelling of its path.
249
+ - A connection or harness the loader ignores stays in the file, with a note
250
+ on what to fix; `akm migrate apply` never deletes one.
251
+ - The residue sweep leaves the `.akm/` of a stash a disabled bundle owns as
252
+ written, as the task and asset steps do.
253
+ - The standalone binary does local semantic search. It carries the ONNX Runtime
254
+ library for its platform and, the first time it embeds, copies it once into
255
+ `<cache dir>/onnxruntime/<version>-<platform>-<arch>/` (18 to 34 MB) and loads
256
+ it from there. A binary writes its native addon to the system temp directory,
257
+ so a `noexec` temp directory blocks semantic search (keyword search works): set
258
+ `TMPDIR` to an executable one.
259
+ Alpine/musl and Intel macOS have no native ONNX Runtime library: the index
260
+ reports semantic search `blocked` with the reason, and keyword search works.
261
+ - `akm index --format json` reports `verification.embeddingRuntime`, the runtime
262
+ the local embedder embedded with (`onnxruntime-node`); it is absent for a
263
+ remote embedding provider and when nothing was embedded locally.
264
+ - `akm health` has a `semantic-search` check again. `akm index` records the
265
+ semantic status it found (with the runtime and, when semantic search is
266
+ `blocked` or `unavailable` on this machine, the reason) beside its other
267
+ index facts, and the check reads that record with the index's current entry
268
+ and vector counts: `pass` when every entry has a vector on the native runtime,
269
+ `warn` when vectors lag, another runtime embedded, or the platform has no
270
+ native ONNX Runtime library (Alpine/musl, Intel macOS), `fail` when blocked
271
+ or unavailable for a cause that can be fixed (the library did not load). It
272
+ loads no model and sends no request, and search does not read
273
+ the record. The health report's Semantic Search line shows the check (`OK`,
274
+ `OFF`, `BLOCKED`, `UNAVAILABLE` or `UNKNOWN`); it used to say `OK` always.
275
+
276
+ ### Changed
277
+
278
+ - Each kind of call asks for a shipped alias until something nearer names a
279
+ model: improve passes, extract, enrich and the index passes ask for `fast`;
280
+ judges (the reflect and distill quality gates, triage's judgment, workflow
281
+ gates) and agent work ask for `balanced`. A harness with a model map but no
282
+ entry for the alias warns once.
283
+ - Model work runs on any harness. Where a harness can be restricted it is: Claude
284
+ Code runs with its settings files ignored, only `Read` and `akm search`, `akm
285
+ show` and `akm curate`, no MCP servers and no saved transcript, Codex with
286
+ `--sandbox read-only`, and OpenCode 2 as an agent passed inline for the run,
287
+ in OpenCode 2's native `agents` map so that an entry of its name in your
288
+ config cannot replace it, with every tool denied except `read`, `glob` and
289
+ `grep` (and `akm_search`, `akm_show` and `akm_curate` when the akm plugin is
290
+ installed), so a tool a plugin adds is denied too; a plugin's own hooks still
291
+ run. Where it cannot
292
+ (the other platforms, and OpenCode 1, which warns once), the call runs
293
+ unrestricted, in a scratch directory, with a notice. A config that names an `opencode` harness for model work loads, and a
294
+ native agent named for model work is ignored with a notice. Agent work is not
295
+ restricted: it runs the program as you would.
296
+ - The `opencode` CLI dispatch path is no longer deprecated (0.10.261001 deprecated
297
+ it in favour of an `opencode-sdk` engine, which is gone): `platform:
298
+ "opencode"` is the `opencode` harness, your own OpenCode of either major run
299
+ through `opencode run`.
300
+ - Every process akm starts inherits akm's environment: a harness's child, a
301
+ workflow `exec` unit's command, a task's command and the commands of an agent
302
+ on akm's own runtime get the environment akm runs in, with the directories this akm
303
+ resolved, the run's `AKM_EVENT_SOURCE` and a unit's `env:` bindings set over it.
304
+ The environment allowlist, the Windows floor, the `PATH` supplement for
305
+ scheduler contexts, each harness's passthrough names and the passthrough
306
+ redaction policy are gone, and a frozen `pass_env` still parses and selects
307
+ nothing. A dispatch reply from any runner is scrubbed of the connection's key.
308
+ It, and the output and diagnostics a workflow `exec` unit journals, are
309
+ scrubbed of the values of credential-named variables in the environment the
310
+ child inherited (names such as `*_API_KEY`, `*_TOKEN`, `*_SECRET` and
311
+ `*_PASSWORD`, eight characters or more), the same rule a task log uses; a
312
+ task log also scrubs the values its `redact:` list names, and a workflow
313
+ journal the `secrets/` values substituted into a binding.
314
+ `env run --clean` keeps its own list. Agent work on OpenCode adds nothing to the
315
+ invocation; Codex agent work no longer sets `--sandbox workspace-write` and
316
+ Aider no longer gets `--no-auto-commits`, so each runs with the settings its
317
+ own configuration gives it (model work on Codex still runs `--sandbox
318
+ read-only`).
319
+ - Stopping a child process (a timeout, an abort, or a signal to akm) sends its
320
+ process group SIGINT first, then SIGTERM and SIGKILL, each after a 5 second
321
+ grace for as long as it still runs, where it sent SIGTERM and then SIGKILL.
322
+ SIGTERM also follows at once when the leader exits and leaves members of its
323
+ group behind. This covers agent programs, workflow `exec` units and task
324
+ commands. A program that records how a run ended acts on the SIGINT: OpenCode 2
325
+ marks its session interrupted and releases it, and only a run that had to be
326
+ terminated or killed stays suspended in your OpenCode history, where your own
327
+ OpenCode's background service may resume it (up to ten attempts, OpenCode's own
328
+ policy). On Windows there is no process group and a signal ends the program at
329
+ once.
330
+ - Harnesses are thin shells. akm writes only the arguments a program needs to run
331
+ without a person, hands it the prompt and takes its standard output as the
332
+ reply, as written: it no longer asks for JSON output or reads a result or a
333
+ session id out of it. A reply that must have a shape is parsed once by the
334
+ caller, from the schema instruction already in the prompt. Claude Code and pi
335
+ take the prompt on stdin, and their persona goes to `--append-system-prompt`
336
+ (appended to pi's own prompt).
337
+ - `akm agent` with no `--prompt` starts the harness for a person, with the
338
+ terminal and the harness's model; a connection has nothing to start, and the
339
+ command says so, naming `--prompt` and a harness.
340
+ - One loop corrects a reply that must have a shape. When the parser refuses the
341
+ reply, it is sent once more with what was wrong; reflect, distill, extract,
342
+ `akm proposal new`, the judges, the proposal drain's judgment and a workflow
343
+ unit with an output schema all use it. A call that fails ends as the dispatch
344
+ reported it, and a workflow exec step is never run twice to fix its output.
345
+ - A model call has one timeout, and it is the resolver's: the call's own setting,
346
+ else the connection's or harness's `timeoutMs`, else ten minutes for model work
347
+ (agent work on a harness runs until it finishes). A retry after a transient
348
+ failure spends what is left of the call's budget, and `akm remember --enrich`
349
+ keeps its 10 s limit on the request itself.
350
+ - `--engine NAME` on `akm agent`, `akm command run`, `akm task add`, `akm
351
+ proposal new` and `akm proposal extract`, and `--require-engines` on `akm
352
+ improve`, are still accepted, hidden from `--help` and completions, with one
353
+ warning each. `--engine` names a connection by that name, else a harness (`akm
354
+ task add --engine` writes `connection:` or `harness:`), and `--require-engines`
355
+ does nothing: `akm improve` stops at planning (exit 78) before any lock, index
356
+ write or log when no process that calls a model has a connection or harness to
357
+ run on (or there are several and none is called `default`), with no flag asking
358
+ for it. That is weaker than what the flag did, and a scheduled caller that
359
+ relied on it loses that: no check before the run that every enabled process
360
+ has a usable target and a working completion. A run with some processes that
361
+ can run and some that cannot runs the former and lists the rest in
362
+ `skippedProcesses`, and a configured but unusable target (a harness program
363
+ that is not installed, a connection that does not answer) is found when the
364
+ process dispatches. Run `akm health` first instead (`akm health && akm
365
+ improve`; it exits 4 on a warning): its `connections-and-harnesses` check names
366
+ each connection that does not answer, each harness program that is not
367
+ installed and a missing default. A did-you-mean for an unknown flag never
368
+ offers a hidden flag.
369
+ - A workflow run frozen by an earlier release (plan irVersion 7 or lower) whose
370
+ plan holds a command target is no longer resumed: it is abandoned (status
371
+ `failed`) with a message naming `akm workflow run <ref>` to start afresh.
372
+ Converting its engine runners would have changed unit input hashes and
373
+ published a second child run. Plans with no command target still decode. The
374
+ plan version is now 8, which freezes a connection or a harness where 7
375
+ froze an engine.
376
+ - `akm proposal extract --type opencode` and the improve extract gate read
377
+ OpenCode 2 history from the `session_v2` and `session_message` tables with
378
+ SQLite, read-only, from your OpenCode database and akm's own: top-level
379
+ sessions only, without subagent sessions or akm's model work (which ran as the
380
+ `akm-model-work` agent; OpenCode 1 keeps no such marker). The content hash
381
+ of every session is unchanged, so nothing is extracted again. A file or
382
+ session that cannot be read (a session missing from its file, a file with
383
+ neither OpenCode layout) is recorded as `read_failed`, not as an empty
384
+ `too_short` session.
385
+ - OpenCode's directories follow `XDG_DATA_HOME`, `XDG_CACHE_HOME` and
386
+ `XDG_CONFIG_HOME` on every platform, as OpenCode's own do (the data path was
387
+ wrong on macOS and ignored `XDG_DATA_HOME`); `akm health` follows
388
+ `XDG_CACHE_HOME` for OpenCode's plugin cache too.
389
+ - Model work no longer counts as user demand. Model work run through
390
+ `structured-call`, `propose` or `drain` stamped no event source, so the `akm`
391
+ commands its agent ran were recorded as the user's, which feeds ranking; it now
392
+ stamps `improve` (a task's agent still records `task`, and an unknown source
393
+ `unknown`).
394
+ - `GET /api/config` lists `connections` and `harnesses`, each a list of named
395
+ entries, where it listed `engines`, and the config page shows the two as
396
+ tables.
397
+ - The npm package depends on no OpenCode library: akm's own runtime fetches one
398
+ OpenCode binary on first use instead, so `npm install -g akm-cli` needs no
399
+ compiler (the OpenCode libraries it replaces pulled in a native addon that
400
+ built from source) and the installed package is smaller. Standalone binaries are
401
+ built by `scripts/build-standalone.ts` with no stubs for those libraries.
402
+ - Bundles are fetched when added and on `akm bundle update`. `akm index` no
403
+ longer re-fetches a git or website bundle after twelve hours, `--full` does
404
+ not force a fetch, and a failed forced refresh reports the failure instead of
405
+ serving the old copy for up to seven days (the previous copy stays on disk).
406
+ A configured npm bundle with no lock entry is skipped by `akm index` with one
407
+ warning naming `akm bundle update`, instead of hitting the npm registry on
408
+ every index run.
409
+ - `akm search --assets` is removed. It asked registries for asset-level hits,
410
+ but `akm search` never put them in its output, so the flag printed nothing; the
411
+ registry providers' asset scoring and the `assetHits` response field go with it.
412
+ - Registry hits from `akm search --from registry|all` carry `installRef` (the ref
413
+ for `akm bundle add`). The brief projection already listed it, but the hit was
414
+ built without it, so `--detail brief` showed only the name and score.
415
+ - `akm search --detail normal` includes `ref` on local hits, as `brief` already
416
+ did. `normal` was the only level that showed a hit without the ref `akm show`
417
+ needs.
418
+ - Env and secret files are indexed even when the bundle's `.gitignore` hides them
419
+ (`akm bundle create` ignores `env/` and `secrets/`), so `akm show env/<name>`
420
+ and `akm search --type env` work in a default bundle. The indexer lists the
421
+ git-ignored files under those two directories in addition to the tracked and
422
+ untracked ones; values still never reach the index.
423
+ - `akm health --no-probe` also skips the `plugin-version` newest-tag lookup (a
424
+ `git ls-remote` against the plugin marketplace). With probing off the row
425
+ reports `unknown` ("not probed") instead of "up to date", and the local
426
+ version-range check still runs.
427
+ - `akm task doctor` no longer reports `historyDir`. It named `$CACHE/tasks/history`,
428
+ which does not exist now that task run history lives in `state.db`.
429
+ - Four user-facing messages no longer cite deleted spec sections: the lesson
430
+ frontmatter error from `akm distill` ("See v1 spec §13"), the two `agent-skills`
431
+ lint details ("spec §4.5"), the bundle-identity-drift warning ("spec §11.5") and
432
+ the unknown-`quality` warning ("v1 spec §4.2").
433
+ - `akm config unset` removes the named key and leaves a parent object that
434
+ becomes empty. It used to delete the parent too, so unsetting a harness's only
435
+ key removed the harness and `akm agent` then exited 78 (`{}` is how a harness
436
+ is enabled).
437
+ - The local embedder runs the model on `onnxruntime-node` with
438
+ `@huggingface/tokenizers`. `@huggingface/transformers` and the `sharp`,
439
+ `@huggingface/jinja` and `onnxruntime-web` packages it brought are no longer
440
+ installed. akm fetches the model's four files from the Hugging Face Hub itself,
441
+ into the same `$HF_HOME/<repo>/` layout as before (`HF_HUB_OFFLINE` still
442
+ forbids the fetch), so a model cache an earlier release filled is reused. The
443
+ vectors are the same to within 1e-6 of Transformers.js, so an index built
444
+ before stays valid.
445
+
446
+ ### Fixed
447
+
448
+ - `bun.lock` resolved `onnxruntime-node` to `onnxruntime-web`, so every checkout
449
+ and CI run embedded on WebAssembly, about eight times slower than the native
450
+ runtime. It resolves to the real package. (npm installs do not read `bun.lock`;
451
+ the release binaries could not embed at all, see Added.)
452
+
453
+ ### Removed
454
+
455
+ - `engines`, the `defaults` block (`defaults.engine`, `defaults.llmEngine`, with
456
+ `defaults.improveStrategy` now `improve.strategy`), `workflow.judgeEngine`, a
457
+ strategy's `engine`, `model`, `llm` and `timeoutMs`, `provider`, and
458
+ `extraParams` as a key (write the request fields on the connection or model
459
+ entry), all read from an old file and converted by `akm migrate apply`. An
460
+ `extraParams` key that shadows a first-class setting (`temperature`,
461
+ `maxTokens`, `enableThinking`, `reasoningEffort`) is dropped with a note, and
462
+ the setting wins.
463
+ - `models.json`, the user overlay and the one akm shipped, and the `akm models
464
+ list` and `akm models copy-defaults` commands that managed them. Aliases live
465
+ on `connections.<name>.models`, and `akm models` shows and changes them.
466
+ - `apiKeyFile`, the implicit `AKM_ENGINE_<NAME>_API_KEY` and `AKM_LLM_API_KEY`
467
+ lookups, and `${secrets/...}` as a connection key. Use `apiKey: "$VAR"` or
468
+ `credentials.json`.
469
+ - `supportsJsonSchema`. When an endpoint rejects a response schema, akm retries
470
+ without one and remembers that for the rest of the process.
471
+ - The fallback engine. With no engine configured, akm used the `opencode` binary
472
+ on `PATH`; with no connection and no harness, model features and agent work are
473
+ off and each command that needs one points at `akm setup`.
474
+ - The `opencode-sdk` engine platform, and the load-time rule that refused model
475
+ work on an `opencode` engine.
476
+ - The LLM feature gate, with the 600 s timeout it carried: curate's rerank reads
477
+ `search.curateRerank.enabled` and memory inference `index.memory.enabled`
478
+ themselves.
479
+ - The per-harness result extractors and the JSON output modes they read.
480
+ - The `default-engine`, `default-llm-engine`, `configured-engines`,
481
+ `active-improve-strategy`, `thinking-control` and `engine-last-used` checks of
482
+ `akm health`, and its hard failure for an unreachable default connection; an
483
+ unreachable connection is a warning in the `connections-and-harnesses` check.
484
+ - `akm setup --probe` and `--config`, and the engine, Ollama and provider steps
485
+ of the wizard.
486
+ - The `opencode serve` server management, the OpenCode 1 and 2 HTTP adapters,
487
+ and the `@opencode-ai/sdk` and `@opencode/client` dependencies. Agent work on a
488
+ connection needs no OpenCode of yours or client package, so `akm health` checks
489
+ for neither.
490
+ - Asset tool requests. An agent or command's `tools:` (or a Claude command's
491
+ `allowed-tools:`) is no longer read, a task's `tools:` is ignored with a
492
+ warning, and `akm migrate apply` drops a v3 task's `akm.tools`. With them go
493
+ the `execution.allowedTools` config key (now an unknown key: warned, ignored
494
+ and dropped by `akm migrate apply`), the `EXECUTION_NOT_AUTHORIZED` error,
495
+ `toolPolicy` in `akm show`, the harness builders' tool flags, and recognizing
496
+ a file as an agent by its `tools:` key. Restrict an agent's tools in the
497
+ harness's own agent definition and select it with the harness's `agent`.
498
+
9
499
  ## [0.10.261013] - 2026-10-23
10
500
 
11
501
  ### Fixed
@@ -589,7 +1079,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
589
1079
  its whole deadline. It now returns at once with `reason: "aborted"` and the declined tool call in `error`.
590
1080
  - **Documented: OpenCode permission defaults in a dispatch (#1049).** OpenCode 1 asks before reading or writing outside
591
1081
  the project directory; OpenCode 2 does not unless its config says `ask`, so akm's permission rejection only happens
592
- on OpenCode 2 once you add that rule. akm changes no default. See [Configuration](docs/reference/configuration.md#engines).
1082
+ on OpenCode 2 once you add that rule. akm changes no default. See [Configuration](docs/reference/configuration.md#harnesses).
593
1083
 
594
1084
  ## [0.10.26101201] - 2026-10-12
595
1085
 
@@ -1178,7 +1668,7 @@ When upgrading from 0.9.27:
1178
1668
  with a message saying to set `"plugin": ["akm-opencode@next"]`, and lockstep stays on the `@latest` pin.
1179
1669
  Missing, older-than-`@latest` or unpinned `@next` fails closed like the stable lockstep. Claude Code and
1180
1670
  Codex are unchanged (no prerelease channel). The result gains `channel`. Works with `--check`, `--force`
1181
- and `-q`. See [`akm upgrade`](docs/reference/cli.md#prereleases-next).
1671
+ and `-q`. See [`akm upgrade`](docs/reference/cli.md#prereleases---next).
1182
1672
 
1183
1673
  ## [0.9.28-alpha.4] - 2026-10-08
1184
1674
 
@@ -5249,7 +5739,8 @@ install's cron schedule, not their worth.
5249
5739
  instead. This is a Markdown-frontmatter-only key — a GitHub-shaped
5250
5740
  workflow's closed root key set has no extension surface for it, the same
5251
5741
  reason it cannot declare `params:` either. See
5252
- [Workflow Schema: Workflow outputs](docs/reference/workflow-schema.md#workflow-outputs).
5742
+ [Moving from akm 0.9 to 0.10: Workflows](docs/migration/v0.9-to-v0.10.md#workflows),
5743
+ which removed top-level `outputs:`.
5253
5744
  - **`akm workflow plan <ref>`** (Evolving) — compiles, resolves, and freezes
5254
5745
  a workflow exactly as starting a run would, then stops: zero durable
5255
5746
  writes, no published run, no event, no lease. Prints the canonical step
package/README.md CHANGED
@@ -40,6 +40,21 @@ prefers Bun for execution; old, unusable, or absent Bun installations fall
40
40
  back to Node.js. Node.js remains required for the npm package. The standalone
41
41
  binaries are runtime-free.
42
42
 
43
+ Local semantic search runs its embedding model on ONNX Runtime
44
+ (`onnxruntime-node`). A standalone binary carries the library for its platform
45
+ and copies it once into akm's cache (18 to 34 MB); a `noexec` temp directory
46
+ blocks a standalone binary's semantic search (keyword search still works), so
47
+ set `TMPDIR` to a writable, executable one.
48
+ Alpine/musl and Intel macOS have no native ONNX Runtime, so semantic search is
49
+ unavailable there and keyword search works. See
50
+ [Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/#standalone-binary-and-semantic-search).
51
+
52
+ With a connection and no harness, agent work runs on akm's own runtime, a pinned
53
+ OpenCode 2 binary. The first time it runs, akm downloads that binary from the npm
54
+ registry (about 114 MB, once) into its cache; on Alpine/musl it needs `libstdc++`
55
+ and `libgcc` (the Alpine Node image has them). See
56
+ [Getting Started](https://akm.fwdslsh.dev/docs/guides/getting-started/#akms-own-agent-runtime).
57
+
43
58
  ## Quick Start
44
59
 
45
60
  ```sh
package/SECURITY.md CHANGED
@@ -43,8 +43,8 @@ bugs, but you should be aware of them:
43
43
  Workflow steps run in your shell with your PATH and your environment
44
44
  variables — including any secrets you have exported or loaded via
45
45
  `akm env run` / `akm secret run`. **Only add workflow sources you trust.** See
46
- [`docs/reference/workflows.md` — "Security: workflow sources are executed
47
- code"](docs/reference/workflows.md#security-workflow-sources-are-executed-code)
46
+ [`docs/guides/run-workflows.md` — "Security: workflow sources are executed
47
+ code"](docs/guides/run-workflows.md#security-workflow-sources-are-executed-code)
48
48
  for the full discussion.
49
49
 
50
50
  ### Scripts execute shell commands
@@ -87,12 +87,13 @@ graph content to an arbitrary path.
87
87
 
88
88
  `akm improve` (whose strategies run processes such as reflect, distill, and
89
89
  consolidate) and `akm proposal new` can send asset frontmatter and body to the
90
- named LLM engine selected by the command, strategy, or current defaults. LLM
91
- connections live under
92
- `engines.<name>` in `~/.config/akm/config.json`. If you configure a third-party
93
- LLM, your asset content goes to that third party. Use a local engine endpoint
94
- (for example, `http://localhost:11434/v1/chat/completions` via Ollama) for assets
95
- containing secrets or private notes.
90
+ connection (or harness) selected by the command, strategy, or current defaults.
91
+ Connections live under `connections.<name>` in `~/.config/akm/config.json`,
92
+ with their keys in the environment or in `~/.config/akm/credentials.json`. If you
93
+ configure a third-party LLM, your asset content goes to that third party, and a
94
+ harness you enable (Claude Code, Codex, ...) sends it wherever it is configured
95
+ to. Use a local endpoint (for example, `http://localhost:11434/v1` via Ollama)
96
+ for assets containing secrets or private notes.
96
97
 
97
98
  ## Known non-issues
98
99