@qvac/harness 1.0.0-rc.2 → 1.0.0-rc.4

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 (404) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +2280 -1485
  3. package/README.md +56 -43
  4. package/dist-lib/index.d.ts +50 -6
  5. package/dist-lib/index.js +130 -28
  6. package/dist-lib/lib/agent/delegate.d.ts +3 -2
  7. package/dist-lib/lib/agent/delegate.js +6 -4
  8. package/dist-lib/lib/agent/follow.d.ts +5 -0
  9. package/dist-lib/lib/agent/follow.js +2 -0
  10. package/dist-lib/lib/agent/resolve.js +22 -17
  11. package/dist-lib/lib/agent/tool-selection.d.ts +4 -2
  12. package/dist-lib/lib/agent/tool-selection.js +5 -6
  13. package/dist-lib/lib/agent/tools.d.ts +1 -0
  14. package/dist-lib/lib/agent/tools.js +2 -1
  15. package/dist-lib/lib/capabilities/agent-ports.js +3 -3
  16. package/dist-lib/lib/capabilities/completion-engine/actors/batching.js +1 -0
  17. package/dist-lib/lib/capabilities/completion-engine/actors/direct-search.js +2 -0
  18. package/dist-lib/lib/capabilities/completion-engine/actors/executing.js +60 -9
  19. package/dist-lib/lib/capabilities/completion-engine/actors/execution-plan.js +4 -4
  20. package/dist-lib/lib/capabilities/completion-engine/actors/inspect-prepare.js +3 -2
  21. package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.js +35 -6
  22. package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.d.ts +1 -1
  23. package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.js +2 -0
  24. package/dist-lib/lib/capabilities/completion-engine/actors/preparing.js +67 -27
  25. package/dist-lib/lib/capabilities/completion-engine/actors/rejecting.js +6 -1
  26. package/dist-lib/lib/capabilities/completion-engine/actors/resolving.js +61 -16
  27. package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.js +2 -2
  28. package/dist-lib/lib/capabilities/completion-engine/actors/skill-step.js +23 -13
  29. package/dist-lib/lib/capabilities/completion-engine/actors/stream.d.ts +8 -3
  30. package/dist-lib/lib/capabilities/completion-engine/actors/stream.js +61 -3
  31. package/dist-lib/lib/capabilities/completion-engine/actors/streaming.d.ts +5 -1
  32. package/dist-lib/lib/capabilities/completion-engine/actors/streaming.js +47 -21
  33. package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.d.ts +1 -0
  34. package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.js +30 -5
  35. package/dist-lib/lib/capabilities/completion-engine/driver.js +27 -11
  36. package/dist-lib/lib/capabilities/completion-engine/durable.d.ts +1 -0
  37. package/dist-lib/lib/capabilities/completion-engine/durable.js +5 -1
  38. package/dist-lib/lib/capabilities/completion-engine/index.d.ts +2 -1
  39. package/dist-lib/lib/capabilities/completion-engine/index.js +2 -2
  40. package/dist-lib/lib/capabilities/completion-engine/loop.d.ts +15 -2
  41. package/dist-lib/lib/capabilities/completion-engine/loop.js +7 -0
  42. package/dist-lib/lib/capabilities/completion-engine/metrics.d.ts +9 -2
  43. package/dist-lib/lib/capabilities/completion-engine/metrics.js +28 -7
  44. package/dist-lib/lib/capabilities/completion-engine/model-round.d.ts +46 -0
  45. package/dist-lib/lib/capabilities/completion-engine/model-round.js +45 -0
  46. package/dist-lib/lib/capabilities/completion-engine/operations.js +1 -1
  47. package/dist-lib/lib/capabilities/completion-engine/ports.js +3 -7
  48. package/dist-lib/lib/capabilities/completion-engine/round.d.ts +23 -3
  49. package/dist-lib/lib/capabilities/completion-engine/round.js +323 -97
  50. package/dist-lib/lib/capabilities/completion-engine/session.d.ts +10 -3
  51. package/dist-lib/lib/capabilities/completion-engine/session.js +30 -2
  52. package/dist-lib/lib/capabilities/completion-engine/tool-caller.js +3 -2
  53. package/dist-lib/lib/capabilities/completion-engine/tool-execution.d.ts +4 -3
  54. package/dist-lib/lib/capabilities/completion-engine/tool-execution.js +15 -10
  55. package/dist-lib/lib/capabilities/completion-engine/turns.d.ts +11 -4
  56. package/dist-lib/lib/capabilities/completion-engine/turns.js +48 -65
  57. package/dist-lib/lib/capabilities/download.d.ts +9 -7
  58. package/dist-lib/lib/capabilities/download.js +1 -1
  59. package/dist-lib/lib/capabilities/enhance.d.ts +1 -1
  60. package/dist-lib/lib/capabilities/enhance.js +20 -8
  61. package/dist-lib/lib/capabilities/preview-model-source.d.ts +7 -0
  62. package/dist-lib/lib/capabilities/preview-model-source.js +83 -23
  63. package/dist-lib/lib/capabilities/sdk-tool.d.ts +1 -0
  64. package/dist-lib/lib/capabilities/sdk-tool.js +18 -1
  65. package/dist-lib/lib/capabilities/tool-plan.d.ts +1 -1
  66. package/dist-lib/lib/capabilities/tool-plan.js +5 -5
  67. package/dist-lib/lib/capabilities/tool-prompt-log.js +3 -3
  68. package/dist-lib/lib/capabilities/tool-turns.d.ts +7 -9
  69. package/dist-lib/lib/capabilities/tool-turns.js +25 -20
  70. package/dist-lib/lib/client/index.d.ts +19 -0
  71. package/dist-lib/lib/client/index.js +262 -0
  72. package/dist-lib/lib/connect.d.ts +13 -10
  73. package/dist-lib/lib/connect.js +62 -24
  74. package/dist-lib/lib/context-window.d.ts +1 -0
  75. package/dist-lib/lib/context-window.js +3 -3
  76. package/dist-lib/lib/contract/agent.d.ts +7 -3
  77. package/dist-lib/lib/contract/completion.d.ts +44 -29
  78. package/dist-lib/lib/contract/egress-proxy.d.ts +13 -0
  79. package/dist-lib/lib/contract/egress-proxy.js +1 -0
  80. package/dist-lib/lib/contract/exec.d.ts +3 -3
  81. package/dist-lib/lib/contract/hooks.d.ts +4 -1
  82. package/dist-lib/lib/contract/index.d.ts +1 -0
  83. package/dist-lib/lib/contract/models.d.ts +6 -4
  84. package/dist-lib/lib/contract/policy.d.ts +75 -0
  85. package/dist-lib/lib/contract/policy.js +1 -0
  86. package/dist-lib/lib/contract/run.d.ts +9 -3
  87. package/dist-lib/lib/contract/sandbox.d.ts +3 -1
  88. package/dist-lib/lib/contract/translation.d.ts +20 -0
  89. package/dist-lib/lib/contract/translation.js +1 -0
  90. package/dist-lib/lib/contract-types.d.ts +32 -14
  91. package/dist-lib/lib/embeddings/index.d.ts +7 -1
  92. package/dist-lib/lib/embeddings/index.js +26 -5
  93. package/dist-lib/lib/errors.d.ts +266 -0
  94. package/dist-lib/lib/errors.js +198 -0
  95. package/dist-lib/lib/fold/index.d.ts +25 -1
  96. package/dist-lib/lib/fold/index.js +75 -9
  97. package/dist-lib/lib/guarded-fetch.js +11 -7
  98. package/dist-lib/lib/hardware/gpu-probe.js +10 -1
  99. package/dist-lib/lib/helpers/completion-params.d.ts +6 -2
  100. package/dist-lib/lib/helpers/completion-params.js +10 -1
  101. package/dist-lib/lib/helpers/engine-error.d.ts +2 -1
  102. package/dist-lib/lib/helpers/engine-error.js +12 -12
  103. package/dist-lib/lib/helpers/goal-check.d.ts +4 -0
  104. package/dist-lib/lib/helpers/goal-check.js +81 -0
  105. package/dist-lib/lib/helpers/head-tail.js +1 -1
  106. package/dist-lib/lib/helpers/load-stall.d.ts +1 -1
  107. package/dist-lib/lib/helpers/load-stall.js +2 -2
  108. package/dist-lib/lib/helpers/markup-stream-filter.d.ts +4 -1
  109. package/dist-lib/lib/helpers/markup-stream-filter.js +20 -6
  110. package/dist-lib/lib/helpers/repeated-reply.js +24 -16
  111. package/dist-lib/lib/helpers/thinking.d.ts +3 -2
  112. package/dist-lib/lib/helpers/thinking.js +19 -0
  113. package/dist-lib/lib/hooks/built-in/arg-repair.js +6 -2
  114. package/dist-lib/lib/hooks/built-in/policy-rules.d.ts +8 -0
  115. package/dist-lib/lib/hooks/built-in/policy-rules.js +192 -0
  116. package/dist-lib/lib/hooks/built-in/sandbox.js +23 -5
  117. package/dist-lib/lib/hooks/index.d.ts +4 -1
  118. package/dist-lib/lib/hooks/index.js +9 -4
  119. package/dist-lib/lib/hooks/run.js +3 -3
  120. package/dist-lib/lib/lifecycle/index.js +15 -14
  121. package/dist-lib/lib/lifecycle/machine.js +2 -2
  122. package/dist-lib/lib/log.d.ts +26 -5
  123. package/dist-lib/lib/log.js +86 -23
  124. package/dist-lib/lib/machine/completion/actions/completion.d.ts +4 -2
  125. package/dist-lib/lib/machine/completion/actions/completion.js +75 -10
  126. package/dist-lib/lib/machine/completion/actions/prepare.js +1 -1
  127. package/dist-lib/lib/machine/completion/actions/tools.js +48 -5
  128. package/dist-lib/lib/machine/completion/context.js +4 -1
  129. package/dist-lib/lib/machine/completion/guards/retry.d.ts +1 -0
  130. package/dist-lib/lib/machine/completion/guards/retry.js +8 -2
  131. package/dist-lib/lib/machine/completion/implementations.d.ts +10 -4
  132. package/dist-lib/lib/machine/completion/implementations.js +27 -6
  133. package/dist-lib/lib/machine/completion/machine.d.ts +21 -3
  134. package/dist-lib/lib/machine/completion/machine.js +33 -4
  135. package/dist-lib/lib/machine/completion/rules.d.ts +17 -2
  136. package/dist-lib/lib/machine/completion/rules.js +49 -3
  137. package/dist-lib/lib/machine/completion/types.d.ts +36 -0
  138. package/dist-lib/lib/machine/index.d.ts +27 -4
  139. package/dist-lib/lib/machine/index.js +6 -1
  140. package/dist-lib/lib/models/context-choice.d.ts +15 -0
  141. package/dist-lib/lib/models/context-choice.js +55 -0
  142. package/dist-lib/lib/models/download-gate.d.ts +20 -0
  143. package/dist-lib/lib/models/download-gate.js +73 -0
  144. package/dist-lib/lib/models/gguf-header.d.ts +5 -0
  145. package/dist-lib/lib/models/gguf-header.js +165 -14
  146. package/dist-lib/lib/models/llm-presets.d.ts +5 -1
  147. package/dist-lib/lib/models/llm-presets.js +6 -5
  148. package/dist-lib/lib/models/memory-cap.d.ts +13 -0
  149. package/dist-lib/lib/models/memory-cap.js +21 -0
  150. package/dist-lib/lib/models/model-catalog.d.ts +2 -0
  151. package/dist-lib/lib/models/model-catalog.js +15 -0
  152. package/dist-lib/lib/models/model-fit.d.ts +1 -1
  153. package/dist-lib/lib/models/model-fit.js +5 -6
  154. package/dist-lib/lib/models/model-handle.d.ts +8 -2
  155. package/dist-lib/lib/models/model-handle.js +14 -3
  156. package/dist-lib/lib/models/model-list.d.ts +8 -1
  157. package/dist-lib/lib/models/model-list.js +23 -0
  158. package/dist-lib/lib/models/model-pool.d.ts +35 -5
  159. package/dist-lib/lib/models/model-pool.js +121 -43
  160. package/dist-lib/lib/models/model-source.d.ts +1 -0
  161. package/dist-lib/lib/models/model-source.js +23 -5
  162. package/dist-lib/lib/models/sdk-faults.d.ts +1 -0
  163. package/dist-lib/lib/models/sdk-faults.js +9 -0
  164. package/dist-lib/lib/no-redirect-fetch-bare.js +2 -1
  165. package/dist-lib/lib/no-redirect-fetch-impl.js +2 -1
  166. package/dist-lib/lib/office/engine/pptx/picture-area.d.ts +23 -0
  167. package/dist-lib/lib/office/engine/pptx/picture-area.js +84 -0
  168. package/dist-lib/lib/office/engine/pptx/presentation.d.ts +2 -0
  169. package/dist-lib/lib/office/engine/pptx/presentation.js +55 -17
  170. package/dist-lib/lib/office/engine/pptx/types.d.ts +1 -0
  171. package/dist-lib/lib/office/engine/xlsx/workbook.d.ts +1 -0
  172. package/dist-lib/lib/office/engine/xlsx/workbook.js +34 -3
  173. package/dist-lib/lib/office/extract.js +4 -3
  174. package/dist-lib/lib/office/index.js +2 -1
  175. package/dist-lib/lib/plugins/registry.d.ts +3 -0
  176. package/dist-lib/lib/plugins/registry.js +16 -7
  177. package/dist-lib/lib/policy/index.d.ts +10 -0
  178. package/dist-lib/lib/policy/index.js +229 -0
  179. package/dist-lib/lib/prompt.d.ts +1 -0
  180. package/dist-lib/lib/prompt.js +7 -1
  181. package/dist-lib/lib/residency/completion-runtime.d.ts +1 -0
  182. package/dist-lib/lib/residency/completion-runtime.js +11 -4
  183. package/dist-lib/lib/residency/index.d.ts +44 -4
  184. package/dist-lib/lib/residency/index.js +399 -35
  185. package/dist-lib/lib/resolution-detector.js +3 -3
  186. package/dist-lib/lib/rpc-session.js +2 -1
  187. package/dist-lib/lib/sdk-loader.js +17 -11
  188. package/dist-lib/lib/serve.js +76 -36
  189. package/dist-lib/lib/sidecar/index.d.ts +29 -0
  190. package/dist-lib/lib/sidecar/index.js +174 -0
  191. package/dist-lib/lib/sidecar/user-plugins.d.ts +8 -0
  192. package/dist-lib/lib/sidecar/user-plugins.js +117 -0
  193. package/dist-lib/lib/skills-host/index.d.ts +1 -0
  194. package/dist-lib/lib/skills-host/index.js +8 -4
  195. package/dist-lib/lib/spawn.d.ts +3 -4
  196. package/dist-lib/lib/spawn.js +17 -17
  197. package/dist-lib/lib/spill.d.ts +1 -0
  198. package/dist-lib/lib/spill.js +12 -8
  199. package/dist-lib/lib/tools/attachments/staging.js +8 -8
  200. package/dist-lib/lib/tools/exec/runner.js +2 -1
  201. package/dist-lib/lib/tools/exec/scope.d.ts +0 -1
  202. package/dist-lib/lib/tools/exec/scope.js +23 -114
  203. package/dist-lib/lib/tools/exec/shell-guidance.js +4 -4
  204. package/dist-lib/lib/tools/exec/shell-line.d.ts +26 -0
  205. package/dist-lib/lib/tools/exec/shell-line.js +334 -0
  206. package/dist-lib/lib/tools/exec.d.ts +4 -1
  207. package/dist-lib/lib/tools/exec.js +87 -26
  208. package/dist-lib/lib/tools/files/edit-file.d.ts +3 -0
  209. package/dist-lib/lib/tools/files/edit-file.js +74 -0
  210. package/dist-lib/lib/tools/files/glob.d.ts +3 -0
  211. package/dist-lib/lib/tools/files/glob.js +65 -0
  212. package/dist-lib/lib/tools/files/grep.d.ts +6 -0
  213. package/dist-lib/lib/tools/files/grep.js +114 -0
  214. package/dist-lib/lib/tools/files/index.d.ts +3 -0
  215. package/dist-lib/lib/tools/files/index.js +23 -0
  216. package/dist-lib/lib/tools/files/list-dir.d.ts +6 -0
  217. package/dist-lib/lib/tools/files/list-dir.js +136 -0
  218. package/dist-lib/lib/tools/files/make-dir.d.ts +3 -0
  219. package/dist-lib/lib/tools/files/make-dir.js +48 -0
  220. package/dist-lib/lib/tools/files/read-file.d.ts +3 -0
  221. package/dist-lib/lib/tools/files/read-file.js +105 -0
  222. package/dist-lib/lib/tools/files/transfer.d.ts +4 -0
  223. package/dist-lib/lib/tools/files/transfer.js +83 -0
  224. package/dist-lib/lib/tools/files/trash-file.d.ts +4 -0
  225. package/dist-lib/lib/tools/files/trash-file.js +62 -0
  226. package/dist-lib/lib/tools/files/write-file.d.ts +3 -0
  227. package/dist-lib/lib/tools/files/write-file.js +56 -0
  228. package/dist-lib/lib/tools/fs/document-text.d.ts +2 -0
  229. package/dist-lib/lib/tools/fs/document-text.js +38 -0
  230. package/dist-lib/lib/tools/fs/drive.d.ts +14 -3
  231. package/dist-lib/lib/tools/fs/drive.js +9 -1
  232. package/dist-lib/lib/tools/fs/edit-match.d.ts +11 -0
  233. package/dist-lib/lib/tools/fs/edit-match.js +85 -0
  234. package/dist-lib/lib/tools/fs/ignore.d.ts +13 -0
  235. package/dist-lib/lib/tools/fs/ignore.js +104 -0
  236. package/dist-lib/lib/tools/fs/local.js +28 -5
  237. package/dist-lib/lib/tools/fs/remote-protocol.d.ts +23 -3
  238. package/dist-lib/lib/tools/fs/remote.d.ts +3 -4
  239. package/dist-lib/lib/tools/fs/remote.js +23 -13
  240. package/dist-lib/lib/tools/fs/scope.d.ts +5 -1
  241. package/dist-lib/lib/tools/fs/scope.js +5 -2
  242. package/dist-lib/lib/tools/fs/search.d.ts +41 -0
  243. package/dist-lib/lib/tools/fs/search.js +382 -0
  244. package/dist-lib/lib/tools/{file-glob.d.ts → fs/targets.d.ts} +1 -5
  245. package/dist-lib/lib/tools/fs/targets.js +32 -0
  246. package/dist-lib/lib/tools/fs/tool-path.d.ts +27 -0
  247. package/dist-lib/lib/tools/fs/tool-path.js +70 -0
  248. package/dist-lib/lib/tools/fs/walk.d.ts +15 -3
  249. package/dist-lib/lib/tools/fs/walk.js +118 -24
  250. package/dist-lib/lib/tools/http-request.js +12 -2
  251. package/dist-lib/lib/tools/index.js +2 -10
  252. package/dist-lib/lib/tools/office/ops.js +1 -1
  253. package/dist-lib/lib/tools/office.js +77 -21
  254. package/dist-lib/lib/tools/pdf/build.d.ts +5 -1
  255. package/dist-lib/lib/tools/pdf/build.js +31 -6
  256. package/dist-lib/lib/tools/pdf.js +17 -2
  257. package/dist-lib/lib/tools/skill.js +10 -7
  258. package/dist-lib/lib/tools/skills/bundled-dir.js +4 -4
  259. package/dist-lib/lib/tools/skills/catalog.d.ts +2 -0
  260. package/dist-lib/lib/tools/skills/catalog.js +6 -2
  261. package/dist-lib/lib/tools/skills/cli-argv.js +25 -5
  262. package/dist-lib/lib/tools/skills/cli-schema-check.d.ts +1 -0
  263. package/dist-lib/lib/tools/skills/cli-schema-check.js +3 -0
  264. package/dist-lib/lib/tools/skills/cli-schema-load.js +10 -0
  265. package/dist-lib/lib/tools/skills/cli-schema-types.d.ts +2 -0
  266. package/dist-lib/lib/tools/skills/cli-schema.js +6 -3
  267. package/dist-lib/lib/tools/skills/credential-health.js +3 -3
  268. package/dist-lib/lib/tools/skills/frontmatter-parser.d.ts +2 -0
  269. package/dist-lib/lib/tools/skills/frontmatter-parser.js +4 -0
  270. package/dist-lib/lib/tools/skills/manifest-parse.d.ts +1 -0
  271. package/dist-lib/lib/tools/skills/manifest-parse.js +12 -0
  272. package/dist-lib/lib/tools/skills/mention-name.d.ts +6 -0
  273. package/dist-lib/lib/tools/skills/mention-name.js +6 -0
  274. package/dist-lib/lib/tools/skills/mention.d.ts +2 -2
  275. package/dist-lib/lib/tools/skills/mention.js +11 -4
  276. package/dist-lib/lib/tools/skills/overlay-crud.js +3 -2
  277. package/dist-lib/lib/tools/url-guard.d.ts +6 -1
  278. package/dist-lib/lib/tools/url-guard.js +8 -2
  279. package/dist-lib/lib/tools/web-fetch.js +10 -4
  280. package/dist-lib/lib/wire.js +3 -5
  281. package/dist-lib/plugins/coding/index.d.ts +1 -1
  282. package/dist-lib/plugins/coding/index.js +2 -4
  283. package/dist-lib/plugins/coding/session.d.ts +3 -3
  284. package/dist-lib/plugins/coding/session.js +26 -14
  285. package/dist-lib/plugins/command-hooks/index.js +5 -3
  286. package/dist-lib/plugins/egress-proxy/index.d.ts +53 -0
  287. package/dist-lib/plugins/egress-proxy/index.js +182 -0
  288. package/dist-lib/plugins/image/edit-image.js +4 -3
  289. package/dist-lib/plugins/image/generate-image.d.ts +4 -3
  290. package/dist-lib/plugins/image/generate-image.js +10 -9
  291. package/dist-lib/plugins/image/index.d.ts +1 -1
  292. package/dist-lib/plugins/image/index.js +13 -10
  293. package/dist-lib/plugins/language-hint/index.d.ts +15 -0
  294. package/dist-lib/plugins/language-hint/index.js +51 -0
  295. package/dist-lib/plugins/lsp/tool.js +2 -2
  296. package/dist-lib/plugins/mcp/index.js +6 -3
  297. package/dist-lib/plugins/music/generate-music.d.ts +4 -2
  298. package/dist-lib/plugins/music/generate-music.js +7 -4
  299. package/dist-lib/plugins/music/index.js +12 -9
  300. package/dist-lib/plugins/obsidian/command.js +2 -2
  301. package/dist-lib/plugins/obsidian/note-name.js +2 -1
  302. package/dist-lib/plugins/obsidian/safe-path.js +5 -4
  303. package/dist-lib/plugins/obsidian/vault-create.js +3 -2
  304. package/dist-lib/plugins/obsidian/vault-fs.js +2 -2
  305. package/dist-lib/plugins/obsidian/vault-paths.js +3 -2
  306. package/dist-lib/plugins/obsidian/vault-read.js +6 -5
  307. package/dist-lib/plugins/obsidian/vault-write.js +13 -12
  308. package/dist-lib/plugins/python/guarded-fetch.d.ts +2 -1
  309. package/dist-lib/plugins/python/guarded-fetch.js +5 -1
  310. package/dist-lib/plugins/python/interrupt-timer.js +2 -2
  311. package/dist-lib/plugins/python/loader.js +68 -3
  312. package/dist-lib/plugins/python/memfs.js +2 -2
  313. package/dist-lib/plugins/python/pyodide.d.ts +1 -0
  314. package/dist-lib/plugins/python/pyodide.js +9 -8
  315. package/dist-lib/plugins/python/python-adapter.js +3 -1
  316. package/dist-lib/plugins/python/run-session.d.ts +1 -0
  317. package/dist-lib/plugins/python/run-session.js +19 -8
  318. package/dist-lib/plugins/python/wheels.js +8 -6
  319. package/dist-lib/plugins/python/worker/active.js +2 -2
  320. package/dist-lib/plugins/python/worker/client.js +9 -8
  321. package/dist-lib/plugins/python/worker/protocol.d.ts +2 -0
  322. package/dist-lib/plugins/python/worker/serve.js +23 -4
  323. package/dist-lib/plugins/python/worker/spawn.d.ts +2 -1
  324. package/dist-lib/plugins/python/worker/spawn.js +2 -1
  325. package/dist-lib/plugins/run-report/chain.d.ts +2 -0
  326. package/dist-lib/plugins/run-report/chain.js +73 -0
  327. package/dist-lib/plugins/run-report/flow-view.js +2 -1
  328. package/dist-lib/plugins/run-report/flow.d.ts +1 -1
  329. package/dist-lib/plugins/run-report/flow.js +66 -14
  330. package/dist-lib/plugins/run-report/index.d.ts +23 -2
  331. package/dist-lib/plugins/run-report/index.js +27 -12
  332. package/dist-lib/plugins/run-report/model.d.ts +10 -1
  333. package/dist-lib/plugins/run-report/model.js +12 -6
  334. package/dist-lib/plugins/run-report/page.d.ts +9 -0
  335. package/dist-lib/plugins/run-report/page.js +55 -15
  336. package/dist-lib/plugins/run-report/script.js +317 -43
  337. package/dist-lib/plugins/run-report/story.d.ts +2 -1
  338. package/dist-lib/plugins/run-report/story.js +3 -3
  339. package/dist-lib/plugins/run-report/style.d.ts +1 -1
  340. package/dist-lib/plugins/run-report/style.js +126 -0
  341. package/dist-lib/plugins/run-report/why.js +1 -1
  342. package/dist-lib/plugins/sandbox-linux/index.d.ts +60 -0
  343. package/dist-lib/plugins/sandbox-linux/index.js +347 -0
  344. package/dist-lib/plugins/sandbox-linux/seccomp.d.ts +2 -0
  345. package/dist-lib/plugins/sandbox-linux/seccomp.js +74 -0
  346. package/dist-lib/plugins/sandbox-macos/index.d.ts +23 -11
  347. package/dist-lib/plugins/sandbox-macos/index.js +239 -49
  348. package/dist-lib/plugins/sandbox-vm/vm-shell.d.ts +4 -2
  349. package/dist-lib/plugins/sandbox-vm/vm-shell.js +9 -4
  350. package/dist-lib/plugins/sandbox-windows/helper/qvac-sandbox.c +554 -0
  351. package/dist-lib/plugins/sandbox-windows/index.d.ts +53 -0
  352. package/dist-lib/plugins/sandbox-windows/index.js +205 -0
  353. package/dist-lib/plugins/sandbox-windows/prebuilds/win32-arm64/qvac-sandbox.exe +0 -0
  354. package/dist-lib/plugins/sandbox-windows/prebuilds/win32-x64/qvac-sandbox.exe +0 -0
  355. package/dist-lib/plugins/speech/audio-resample.d.ts +1 -1
  356. package/dist-lib/plugins/speech/audio-resample.js +7 -8
  357. package/dist-lib/plugins/speech/audio-transcode-bare.d.ts +1 -1
  358. package/dist-lib/plugins/speech/audio-transcode-bare.js +23 -26
  359. package/dist-lib/plugins/speech/audio-transcode-node.d.ts +1 -1
  360. package/dist-lib/plugins/speech/audio-transcode-node.js +1 -3
  361. package/dist-lib/plugins/speech/speech-runtime.js +37 -37
  362. package/dist-lib/plugins/speech/voice.d.ts +5 -1
  363. package/dist-lib/plugins/speech/voice.js +100 -31
  364. package/dist-lib/plugins/translation/index.d.ts +1 -0
  365. package/dist-lib/plugins/translation/index.js +16 -9
  366. package/dist-lib/plugins/translation/translate.d.ts +7 -3
  367. package/dist-lib/plugins/translation/translate.js +64 -58
  368. package/dist-lib/plugins/weather/geocode.js +2 -1
  369. package/dist-lib/plugins/weather/lookup.js +5 -4
  370. package/dist-lib/plugins/web-search/engines/bing.js +2 -1
  371. package/dist-lib/plugins/web-search/engines/google.js +2 -1
  372. package/dist-lib/plugins/web-search/fetch-html.d.ts +5 -5
  373. package/dist-lib/plugins/web-search/fetch-html.js +12 -15
  374. package/dist-lib/plugins/web-search/tool.js +1 -0
  375. package/dist-lib/schema/harness.js +48 -7
  376. package/dist-lib/spec/bind.js +9 -0
  377. package/dist-lib/spec/calls.js +3 -0
  378. package/dist-lib/spec/hrpc/hrpc.json +42 -3
  379. package/dist-lib/spec/hrpc/index.js +44 -8
  380. package/dist-lib/spec/hrpc/messages.js +297 -202
  381. package/dist-lib/spec/hyperschema/index.js +297 -202
  382. package/dist-lib/spec/hyperschema/schema.json +155 -84
  383. package/dist-lib/spec/hyperschema/types.d.ts +23 -3
  384. package/package.json +101 -38
  385. package/patches/@qvac%2Finference@0.22.0.patch +59 -0
  386. package/patches/pyodide@314.0.2.patch +37 -8
  387. package/scripts/addon-externals.cjs +10 -5
  388. package/worker/harness-sidecar.mjs +18 -154
  389. package/dist-lib/lib/tools/create-documents.d.ts +0 -3
  390. package/dist-lib/lib/tools/create-documents.js +0 -95
  391. package/dist-lib/lib/tools/edit-documents.d.ts +0 -3
  392. package/dist-lib/lib/tools/edit-documents.js +0 -132
  393. package/dist-lib/lib/tools/exec/shell-argv.d.ts +0 -2
  394. package/dist-lib/lib/tools/exec/shell-argv.js +0 -61
  395. package/dist-lib/lib/tools/file-glob.js +0 -118
  396. package/dist-lib/lib/tools/grep.d.ts +0 -5
  397. package/dist-lib/lib/tools/grep.js +0 -184
  398. package/dist-lib/lib/tools/read-files.d.ts +0 -5
  399. package/dist-lib/lib/tools/read-files.js +0 -160
  400. package/dist-lib/plugins/coding/write-file.d.ts +0 -3
  401. package/dist-lib/plugins/coding/write-file.js +0 -52
  402. package/patches/@qvac%2Finference@0.21.0.patch +0 -67
  403. package/patches/bare-stow@0.1.5.patch +0 -68
  404. package/patches/hypercore-blob-server@1.15.0.patch +0 -15
package/CHANGELOG.md CHANGED
@@ -6,1078 +6,1328 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  While the major version is `0`, a breaking change bumps the minor version.
8
8
 
9
+ Each entry ends with the issue or pull request that made it. The examples call
10
+ a `Harness` named `harness` (or `spawnHarness` for a sidecar), in the shape the
11
+ API had in that release; a breaking change shows the call before and after.
12
+
9
13
  ## [Unreleased]
10
14
 
15
+ 1.0 makes the harness a small core that plugins extend. Speech, translation,
16
+ image, music, weather, web search, Obsidian, Python and MCP are now plugins a
17
+ host composes as instances, and the harness builds `exec` from what they
18
+ declare. Runs gain handoffs, plans and goals, steering, deferred tools, a fold
19
+ for long chats and parallel decoding. [README.md](README.md) is the tour; every
20
+ breaking change is listed under Changed and Removed.
21
+
11
22
  ### Added
12
23
 
13
- - `slots` (and `llm.slots` through `spawnHarness`) lets one loaded chat model
14
- decode that many completions at once, each with its own context: on the
15
- 2B, four requests at `slots: 4` decode about 30% more tokens a second in all
16
- and each starts in about 0.2 s instead of queueing. At `parallel` 2 or more,
17
- `@qvac/llm-llamacpp` 0.53 to 0.56 re-sends every reply as one last chunk,
18
- doubling the text and the tool calls; the harness drops that repeat in the
19
- stream and in the SDK's final result. (#316)
20
-
21
- - A spawned harness takes plugin options. `spawnHarness` and `harnessChild`
22
- accept `pluginOptions: { speech?, mcp?: { servers? } }`, sent to the sidecar
23
- as JSON in one argv slot. The sidecar builds `Speech` with
24
- `pluginOptions.speech` (`tts: 'moss'`, `voice`, `dialogue`) and `McpPlugin`
25
- with `pluginOptions.mcp.servers` (each may set `defer`), so a host that
26
- spawns the harness reaches MOSS and deferred MCP tools. (#322)
27
-
28
- - `Parakeet-TDT-1.1B-Q8_0` is a curated transcription model: it lists in
29
- `/models` and `transcribe({ model: 'Parakeet-TDT-1.1B-Q8_0' })` loads it. It
30
- transcribes English only, lowercase and without punctuation, so
31
- `Parakeet-TDT-0.6B-v3-Q8_0` stays the default on every profile. It runs
32
- without Core ML: SDK 0.21 does not fetch its encoder bundle yet.
33
- `infraModelsFor` still keeps only the default transcription model.
34
- - The `base` music choice runs the undistilled ACE-Step 1.5 base DiT (Q4_K_M)
35
- on the shared text encoder, LM and VAE, at 50 steps by default. It needs a
36
- GPU. Pick it with `modelChoice: 'base'` in the `generate_music` tool-config.
37
- (#315)
38
- - A loaded model reports the engine's own fit probe. `LoadedModel.fit`, in
39
- `diagnostics().models` and `model-event.loaded`, carries the probe's verdict
40
- (`fit`, `does-not-fit` or `unknown`), its reason, the plan (`nCtx`,
41
- `nGpuLayers`, `nGpuDevices`) and the projected `deviceBytes` and `hostBytes`.
42
- The pool reads it with `getLoadedModelInfo` after each load; it is report
43
- only, and a failed read never fails the load. The harness now writes
44
- `fitStubBudgetMs: 10000` into `qvac.config.json`, so an offline registry
45
- falls back to the calibrated estimate in 10 s instead of the SDK's 40 s.
46
- (#314)
47
- - Deferred tools. A `ToolDefinition` with `defer: true` (and an optional `group`)
48
- is listed by name in the SDK's `tool_search` instead of sending its schema;
49
- the model loads it with `tool_search`, whose result appends to the history,
50
- so the tool block and the prompt prefix stay fixed. A call to a tool not
51
- loaded yet is refused with a reply to search first, and a re-ask after a load
52
- is not forced. `McpServerConfig.defer` defers a server's tools under its name.
53
- A tool named `tool_search` is refused while anything defers. (#311)
54
- - MOSS text-to-speech, opt-in with `new Speech({ tts: 'moss' })`. It streams,
55
- clones a voice from `voice` (a 24 kHz wav), or speaks a dialogue of up to five
56
- `speakers` on a local MOSS-TTSD backbone; a dialogue does not stream. No device
57
- profile picks MOSS. Its load evicts the idle chat model first, and a chat load
58
- frees an idle MOSS. Downloading `MOSS-TTS-8B-F16` fetches its codec decoder
59
- too. `SpeakResult.sampleRate` is the rate the SDK reports.
60
- `SpeechService.defaultModel(profile)` names the model an unnamed `speak` loads.
61
- (#312)
62
-
63
- - An agent may run on its own model. `AgentConfig.model` (and `model` on the
64
- wire's agent knobs) names it; absent, the agent runs on the request's
65
- `model`. It applies to a single run, to every hop of a chain including the
66
- entry agent, and to `delegate` children through `base.agent`, so triage on
67
- one model can hand a health question to an agent on `MEDPSY_1_7B`. A resume
68
- still matches on the `model` the host first sent.
69
-
70
- - An external agent target can run on the user's own login. `login: 'user'`
71
- on an `ExternalAgents` target keeps the user's `HOME`, sets no
72
- `CODEX_HOME` or `CLAUDE_CONFIG_DIR`, and runs `claude` without `--bare`, so
73
- a CLI the user signed in to works with no API key. It then runs with the
74
- user's own settings and plugins, and bills their subscription.
75
- `claude` also gets `--setting-sources user --strict-mcp-config`, so the
76
- workdir's own settings and MCP config never load. The default,
77
- `'isolated'`, is unchanged. `DelegateTarget.policyVersion` folds into the
78
- `delegate` tool's, so changing a target's login refuses a resume; every
79
- existing `delegate` `policyVersion` changes once with this, so a durable run
80
- with external targets saved before the upgrade refuses to resume.
81
-
82
- - `CodingPlugin` runs on macOS. `SeatbeltSandbox` provides the `sandbox`
83
- service: each line runs under `sandbox-exec` with the project as its write
84
- root and a `TMPDIR` that lasts until the workspace closes. It is not
85
- isolated, so every coding call asks. `shell_jobs` stops a job from the host:
86
- SIGTERM to its group, then SIGKILL, and a job runs as long as what its line
87
- started. The coding state moves under the provider's `TMPDIR`.
88
- - **Breaking:** `SandboxWorkspace` gains `start(command, { cwd? })`, a
89
- background line the provider holds, returning `{ exited, stop() }`. A
90
- custom `SandboxService` must implement it. `SeatbeltSandbox` now declares
91
- `provides: ['sandbox']`, so composing it beside another sandbox provider
92
- fails at construction; leave one out.
93
-
94
- - MCP servers as a plugin. `./plugins/mcp` exports `McpPlugin`, named `mcp`.
95
- `servers: [{ name, url, auth? }]` lists each server's tools when the harness
96
- opens and adds them as `<server>__<tool>` tools with the server's schema;
97
- each asks for approval. A server that fails or does not answer within
98
- `setupTimeoutMs` (10 s) adds no tools, and the harness still opens.
99
- `auth: { tokenCredentialKey }` sends that credential to that server only.
100
- `generic: true` adds `mcp_call` and the skill catalog's mcp operations.
101
- `PluginContext.fetch` is a guarded fetch for a plugin's setup, and
102
- `Tools.operations(catalog, transports)` compiles a catalog's operations over
103
- the transport tools given. (#277)
104
-
105
- - `@qvac/harness/tools` exports `Tools`. `Tools.product(options)` returns the
106
- product tool list the sidecar serves, in the same order, with the fs tools
107
- fenced off the storage root it derives from `options.sdkHome`; it throws
108
- without one. The options also take `skillsDir`, `skillCatalog` and
109
- `credentialStore`. Operation tools and
110
- credentials need `skillCatalog`, and `skill` needs `skillsDir`.
111
- `Tools.deniedRoots(sdkHome)` is the deny list. (#273)
112
- - `PluginContext.deniedRoots` hands every plugin setup the folders the host
113
- fences: the storage root and spill dir a harness derives from `sdkHome`, or
114
- `PluginRegistryOptions.deniedRoots` for a registry built directly; frozen,
115
- canonical at setup like `ExecutionContext.deniedRoots`, so a symlinked
116
- storage root matches the real path a plugin resolves, and empty when none is
117
- known. (#296, #299)
118
-
119
- - `Tools.bundledSkillsDir()` from `@qvac/harness/tools` writes the bundled
120
- skills to a private dir named by their content hash, and returns its path,
121
- for an in-process host such as the mobile worklet. `@qvac/harness/skill-manifest`
122
- exports `credentialSlots(entry)`, which unions an entry's `credentials` and
123
- `requires.credentials` into any-of slots (`a|b`). (#283)
124
-
125
- - Claude Code hook files. `./plugins/command-hooks` exports `CommandHooks`,
126
- a plugin whose config is the `hooks` object of a `settings.json`. Each
127
- `type: "command"` hook runs under `/bin/sh -c` on its harness phase
128
- (`PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `UserPromptSubmit`,
129
- `Stop`, `PreCompact`, `SubagentStart`, `SubagentStop`), reads the event as
130
- JSON on stdin, and answers by exit code (2 blocks) or stdout JSON
131
- (`permissionDecision`, `updatedInput`, `additionalContext`,
132
- `decision: block`, `continue: false`). The default timeout is 60 s, and a
133
- timeout kills the command's process group. Other exit codes fail closed.
134
- `SessionStart`, `SessionEnd`, `Notification` and `PermissionRequest`
135
- entries load but never run. A `PreToolUse`, `PostToolUse` or
136
- `PostToolUseFailure` matcher that is not a valid regex fails `validate()`.
137
- A config with a `Stop` command also registers `command-hooks:Stop:end` on
138
- `runEnd`; when no other `runEnd` hook is loaded, this adds a `hook:runEnd`
139
- step to the run log of each run that started. (#261)
140
-
141
- - Hooks reach further on the same fold. `HarnessHook.matcher` scopes a tool
142
- hook to tool names (full-match regex) and `timeoutMs` bounds a hook (no
143
- default). New phases: `promptSubmit` (the prompt and each mid-run input; a
144
- rejected input emits `input-rejected` and the run goes on), `toolFailure`
145
- (every call that did not succeed), `stop` (`{ continue }` takes one more
146
- round within the round limit) and `preFold` (`{ instructions }` for the
147
- summary). New results: `{ permission: 'allow' | 'deny' | 'ask' }` on
148
- `preToolCall` (a plugin's `allow` is dropped, and no `allow` gets past plan
149
- mode or the outbound guard), `{ context }` for the model, and `{ halt }`,
150
- which ends the run as a `HookHalt` failure (on a mid-run input it rejects
151
- the input instead). Each new phase is journaled, so a
152
- resume replays the decision. (#260)
153
-
154
- - macOS sandbox. `./plugins/sandbox-macos` exports `SeatbeltSandbox`
155
- (`{ preset: 'read-only' | 'workspace-write', network }`). Its `.shell` runs
156
- exec's shell under `sandbox-exec`, writing only to the run's local write
157
- roots and a temp dir. Its `.plugin` checks the platform and the profile at
158
- start, and provides no `sandbox` service yet. Exec passes the write roots to
159
- a composed shell as `ExecutionContext.writeRoots`, and `createShellAdapter`
160
- takes a `name`. Linux and Windows follow. (#254)
161
- - Approval quote. `ToolDefinition.quote(args, ctx)` returns the confirmation a
162
- person reads before an approvable call runs, such as its cost, or null for
163
- none, and `ApproveFn` receives it as `quote`. Over the wire, `approval-ask`
164
- carries it in its existing `question` field, and `connectHarness` hands it
165
- back as `quote`; no schema field is added. For qvac-core: no API break. (#183)
166
- - Plugins pack as their own packages. `image`, `knowledge`, `music`,
167
- `obsidian`, `sandbox-vm`, `speech` and `weather` each have a
168
- `qvac-plugin-<name>` manifest in `plugins/<name>/`, and
169
- `prepare-publish --plugin <name>` points it at its `dist-lib/`, rewrites
170
- its imports of the core to `@qvac/harness/...` and sets its `@qvac/harness`
171
- peer to `^<root version>`.
172
- Nothing is published yet. The root `exports` map gains the 11 keys the
173
- plugins import: `./lib/contract/index.ts`, `./lib/contract/knowledge.ts`,
174
- `./lib/contract/models.ts`, `./lib/contract/speech.ts`, `./lib/guards.ts`,
175
- `./lib/helpers/load-stall.ts`, `./lib/helpers/retry-memo.ts`,
176
- `./lib/helpers/spawn-path.ts`, `./lib/log.ts`, `./lib/models/context.ts` and
177
- `./lib/models/model-source.ts`. They are internals for the plugins, not a
178
- stable API, and can change in a minor release. (#187)
179
- - A run with `agents` takes `CompletionContext.input`. `Agent.follow` gives each
180
- hop its own queue, so a steer or follow-up reaches the running hop, and input a
181
- hop leaves unacked at a transfer goes to the next hop first. (#247)
182
- - `@qvac/harness/addon-externals` exports `scripts/addon-externals.cjs` and its
183
- types, so a host seeds `copyAddonExternals` with `deferredAddonPackages(bundle)`
184
- instead of keeping its own copy of the script. (#228)
185
- - `QuickJs` from `./plugins/quickjs` runs `language: "javascript"` in QuickJS
186
- WASM as an exec language: compose `quickjs.language` into
187
- `createExecTool({ languages })` and pass `quickjs.plugin`. A run has no files,
188
- network, modules or tools, only `console`, so it is a read. Each call gets a
189
- fresh runtime with memory and stack limits, and its deadline is the smallest
190
- of `timeoutMs`, the run budget and 30 s. It runs on the harness thread and is
191
- desktop-only until mobile is verified. Code mode runs on `QuickJs.run` beside
192
- it. (#232)
193
- - The harness folds a chat when its window runs short (what `@qvac/core` called
194
- compaction). `lib/fold/` holds the trigger tiers on `cacheTokens / ctxSize`,
195
- the 4,096 floor, the summary turn and the summarizer prompt. A run folds
196
- before its first round when the last reading for its `cacheKey` is past its
197
- tier, and on an overflow of the whole history before the ladder drops turns,
198
- then retries the round. After text was shown, an overflow still folds and
199
- deletes the key, and the run fails as before. The fold keeps the last user
200
- turn and this run's own rounds, deletes the chat key once, records the
201
- summarizer request in the run log, and emits `fold` `{ phase: 'start' }` and
202
- `{ phase: 'done', summary, throughId, foldedTurns }`. `ChatMessage.id` (and
203
- `id` on the wire message) is a new optional opaque field: `throughId` is the
204
- id of the last folded message, and a history without it does not fold. For
205
- qvac-core: send each message's last chunk id, store the fold from the `done`
206
- event, and turn its own fold off in the same release; the decision record
207
- lists what core deletes and keeps. (#241)
208
- - `@qvac/harness/plugins/coding`: `CodingPlugin` adds `shell`, `shell_jobs` and
209
- `write_file` in a new `coding` toolset, run in a sandbox provider. `shell` keeps
210
- the cwd and exported variables between calls of a run, allows pipes and
211
- redirects, waits 300 s by default (1800 s at most, cut to the run budget) and
212
- starts background jobs that `shell_jobs` lists, reads from an offset and stops;
213
- a run's jobs stop when it ends. `write_file` creates or overwrites a file in the
214
- run's single write root. The plugin needs the new `sandbox` service
215
- (`SandboxService` in `lib/contract/sandbox.ts`, exported as
216
- `./lib/contract/sandbox.ts`); no provider ships yet. A tool is a read only on an
217
- isolated provider under the host's `read: CodingPlugin.TOOLS` grant and outside
218
- plan mode, which refuses it. qvac-core: opt in by passing a provider and the
219
- plugin, grant one writable directory, pass `maxToolRounds`, and label the
220
- `coding` toolset. A harness given `sdkHome` makes `shell` and `write_file`
221
- refuse a workspace that holds the storage root or sits inside it, since the
222
- provider mounts the whole workspace; `deniedRoots` adds folders to that
223
- list. (#179, #279, #296)
224
- - Code mode: `new CodeMode({ quickjs })` from `./plugins/code-mode` adds
225
- `run_code`, a script that calls the run's other tools as
226
- `await tools.<name>(args)`. Compose it as `{ plugin, read: ['run_code'] }`
227
- beside `quickjs.plugin`. Each inner call takes the same hooks, policy checks,
228
- plan-mode refusal and approval as a direct call, one at a time, at most 16 per
229
- script. `QuickJs.run` is the runtime under it. New `ToolDefinition.callsTools`
230
- and `minCapabilityProfile`; `run_code` is offered from `mid` models only. For
231
- qvac-core: no API break; an inner approval carries the call id `<outer>.<n>`.
232
- (#237)
233
- - `CompletionContext.goal` keeps a run going across answers until the goal is
234
- met: `{ objective, rounds?, ms?, tokens? }`. A goal is met when every step of
235
- the run's plan is done, and a goal run is always offered `update_plan`. While
236
- it is unmet, the run adds a goal turn after each answer and continues: the
237
- goal nudge (`wording.goalContinuation`), the objective and the open plan.
238
- Queued input still comes first. The run stops when its round budget
239
- (`rounds`, 40 by default), its deadline (`ms`) or its generated tokens
240
- (`tokens`, checked when an answer ends) run out. Each continuation and the
241
- end emit a `goal` event `{ status, turn, round, text? }`, with `status` one of
242
- `open`, `met`, `rounds`, `time` or `tokens`; `text` is the turn the run
243
- added. A resume keeps the run's own goal. A run seeds its plan from the last
244
- `update_plan` call in `messages`, unless that plan was finished. Single runs
245
- only: a run with `agents` drops the goal, and a goal with a `responseFormat`
246
- is refused, since a structured answer has no `update_plan`. The goal crosses the wire in the
247
- start payload, and the event as `goal`. For qvac-core: no API break; a goal
248
- run has several answers, which a host splits on `goal` events, and it stores
249
- each goal turn from the event's `text` so that the next request replays it.
250
- (#240)
251
- - `update_plan` keeps a plan in the run: a list of up to 12 steps, each
252
- `pending`, `in_progress` or `done`, that the model replaces on each call. The
253
- run keeps the plan in its machine context, so a pause, resume or replay
254
- keeps it. The plan is shown to the model on the continuation nudge while a
255
- step is open, and is never put in the system prompt. Turn it on with the
256
- agent knob `plan`, which is off by default. `CompletionContext.planMode`
257
- starts a run in plan mode. Plan mode refuses every write except
258
- `update_plan` with `submit: true`, which goes to the approver with the
259
- numbered steps as its `quote`. Once the submit is approved, or auto-approved
260
- under `skip-all`, writes run. With no approver, the run stays plan-only.
261
- Outside plan mode a submit is an ordinary update and asks no one.
262
- `planMode` crosses the wire in the start payload, and `plan` crosses it in
263
- the agent frame. For qvac-core: no API break. The continuation nudge in a
264
- captured inference call can now end in a `Plan:` block. (#234)
265
- - Oversized host shell output spills to a run-scoped file the model reads back.
266
- When a run has `read_files`, an exec stream over `maxOutputChars` is written
267
- whole to `<tmp>/qvac-harness-spill-<user>/<runId>/`, and its marker carries a
268
- locator: `…[N chars omitted; read_files path=<abs> startLine=<n>]…`. The
269
- directory is removed when the run ends, except after a durable pause, and a
270
- boot sweep reclaims what a crash left. For qvac-core: no API break, but stored
271
- exec `stdout` and `stderr` can now carry the locator, and `deniedRootsFor`
272
- returns two roots, the storage root and the spill root. With no `read_files`
273
- the marker is unchanged. (#238)
274
- - `CompletionContext.input` sends turns to a running run. A `steer` is
275
- delivered at the next tool boundary, in place of the continuation nudge; a
276
- `follow-up` continues the same run after its answer, under the run's round
277
- budget and deadline. Each delivery emits an `input` event with the input's
278
- `id`, `text` and the `round` it precedes; input with no such event was not
279
- delivered. Over the wire it travels as `steer` and `follow-up` frames and an
280
- `input` event. Text only, and for single runs: a run with `agents` ignores it. (#186)
281
- - `RunLog.watch()` follows a run live from the steps the host commits. Feed it
282
- with `watch.step(step)` after an in-process `onStep` commit, or wrap a
283
- spawned run's `HostRunLog` with `watch.host(runLog)`. `views()` streams one
284
- view per record: the state, the transition trace with its guards, the
285
- approval, `pendingCall`, `currentCall`, `toolQueue`, `outcome` and the
286
- inspector's lines. `html()` streams the inspector page, with the current
287
- state highlighted and no script. A bad step becomes an error view and never
288
- fails the run. `step()` follows a single run, so an in-process host makes a
289
- new watcher per run. Through `host()` one watcher follows runs one after
290
- another, such as a handoff's hops; concurrent runs need one watcher each.
291
- `RunLog.renderHtml` now tags each graph node with `data-state`.
292
- `examples/run-log/live.ts` replaces `examples/run-log/tail.ts`. (#236)
293
- - **Breaking:** the run log records every model request. Before each send,
294
- the engine appends a `request` record (`round`, `attempt`, `droppedTurns`,
295
- `keep`, `messages`, `tools`, `params`) and waits for the host to take it, so
296
- the log holds every request the model saw, overflow steps and grammar or
297
- forced-call retries included. A record carries the messages the previous
298
- request did not (`keep` counts the ones it shares), messages identical to the
299
- run request's point at them by index, and the tool block is written once per
300
- process under its sha256 `ref`. The messages are redacted as the
301
- checkpoint history is; the tool block and generation params are kept as
302
- sent. `RunLog.requests(core)` rebuilds each request, byte for byte where
303
- redaction changed nothing, with its `index`, `round`, `attempt` and
304
- `droppedTurns`, and `RunLog.inspect` and
305
- `renderHtml` list them; `requestRecord` (`--request` in
306
- `examples/run-log/inspect.ts`) prints one in full. `EngineOperationPort`
307
- gains `recordRequest`. For qvac-core: a host run-log codec that allows only
308
- known record types must accept `request` before it moves to this version;
309
- `RUN_LOG_VERSION` stays 1. (#235)
310
- - `ToolDefinition.concurrent` lets a read tool run alongside the round's other
311
- opted-in reads. Up to four that need no approval run together; a write, a
312
- call that needs approval and any tool that does not opt in run alone. Results
313
- land and events go out in the model's order, each event with its own
314
- `callId`. `read_files`, `grep` and `file_glob` opt in. (#193)
315
- - A completion follows an agent's handoffs. `CompletionContext.agents`, in
316
- `index.ts` and `./lib/contract-types.ts`, holds the agents `agent` may hand
317
- to, by id. When a run ends with `transfer_to_agent`, the completion emits a
318
- `transfer` event (`from`, `to`, `reason`, the new `TransferEvent`) and goes on
319
- as the next agent's run, with the reason noted on the last user turn. Each
320
- hop is a run of its own: hop k runs as `<runId>/<k>-<agent>` with cache key
321
- `<cacheKey>/a-<agent>`. After three transfers the last agent must answer.
322
- Every event in a chained run carries `agent`. Over the wire, `agent-knobs`
323
- carries `handoffs` (a new `agent-handoff` struct), and the client runs each
324
- hop as its own wire completion with its own `HostRunLog` lease. In process,
325
- `agents` with `boot` or `onStep` throws. The loop is `Agent.follow`. For
326
- qvac-core: pass `agents` to `harness.completion()` to hand a run on, and
327
- resume a hop with its own `runId`. (#233)
328
- - `LspPlugin` from `./plugins/lsp` gives a run one read tool, `lsp`, over
329
- the language servers a host configures: `definition`, `references`,
330
- `hover`, `symbols` (a file's outline, or a project search with `query`)
331
- and `diagnostics`. A position is a 1-based `line` and the `symbol` on it.
332
- Paths are scoped like the file tools: a harness given `sdkHome` fences the
333
- storage root (#296) and the config's `deniedRoots` adds to it;
334
- locations and hover text from a denied root are not shown. The server
335
- starts through `/bin/sh`, so a bad command is an error and never a failed
336
- spawn. One server runs per language and granted root, is shared, stops after
337
- `idleMs` and on close, and restarts after a crash. Add
338
- `{ plugin: new LspPlugin(), config: { servers }, read: ['lsp'] }` to
339
- `HarnessOptions.plugins`, with absolute commands; TypeScript 7's
340
- `tsc --lsp --stdio` is the tested server. Nothing wires it yet (#179).
341
- (#202)
342
- - `HarnessOptions.llmLoad` (and `llm.llmLoad` for a spawned harness) passes
343
- llama.cpp load knobs to every completion load: `threads`, `batch-size`,
344
- `ubatch-size`, `kv-offload` (`false` only) and `n-cpu-moe`. Each one keys
345
- the model pool. Unset, the SDK defaults apply; the harness sets none until
346
- they are measured (#184). (#194)
347
- - Plugin services share one context per harness. A plugin reads the services
348
- it names in `needs` or `provides` through `ctx.services`; the core keeps the
349
- context private. The framework lives in `lib/plugins/`, with concrete
350
- implementations in `plugins/`. `@qvac/harness/plugins` exports the framework,
351
- `PluginRegistry`, with `PluginRegistry.API_VERSION` and
352
- `PluginRegistry.loadAddons` as statics; augment `Services` through
353
- `@qvac/harness/plugins/context`. Plugins can register cleanup immediately
354
- with `ctx.onDispose`, including during partial setup that later fails. Startup rolls back before rejecting, and close waits
355
- for active setup while skipping later plugins. The context stays local to
356
- the process and survives runs and suspend/resume. (#171) `./plugins` does
357
- not export the contract types: import `AddonLoaders` from the root or
358
- `./lib/contract/index.ts`, and `ExecLanguage`, `ExecRoute` and `ExecShell`
359
- from the root or `./lib/contract/exec.ts`. (#284)
360
-
361
- - Knowledge is a plugin: `knowledgePlugin` from `./plugins/knowledge` keeps
362
- one TurboVec index for the harness, fed by the host through
24
+ - `CompletionContext.modelRound`, in process only, sends each `generating` and
25
+ `wrapping` model round to another device. It gets the request the local
26
+ round would send and streams `content` and `thinking` back through `emit`;
27
+ tools, the stop hook and `answering` stay on the run owner.
28
+ A run started with it pauses for it on resume. A paused or cancelled round,
29
+ local or remote, now ends at once even when the model sends nothing. See the
30
+ [decision record](docs/decisions/2026-10-19-a-remote-host-serves-the-model-round.md).
31
+ (#493)
32
+ - `ModelRoundIo.retake()` restarts a remote round when another host takes it:
33
+ the run emits `round-reset` for the round and the returned emitter carries
34
+ the new taker's chunks, while the earlier taker's late chunks are dropped.
35
+ The port resolves with the new taker's result. (#497)
36
+ - The `HarnessLog` class is the log's API, through statics:
37
+ `HarnessLog.warn('unload failed')`, `HarnessLog.setSink(sink)`,
38
+ `HarnessLog.setLevel('warn')`. The root names `hlog`, `harnessLog`,
39
+ `setHarnessLog`, `setHarnessLogLevel` and `setHarnessLogSink` stay and
40
+ call the statics; `hlog` logs at `info`. (#532)
41
+ - `LanguageHint` (`@qvac/harness/plugins/language-hint`): a prompt that is not
42
+ in English reaches the model with its language and its English, translated on
43
+ device, so a small model can route and call tools from it. It needs
44
+ `TranslationPlugin`, which now provides the `translation` service (#407).
45
+
46
+ ```js
47
+ new Harness({ plugins: [new TranslationPlugin(), new LanguageHint()] })
48
+ ```
49
+
50
+ - An access policy: one optional `AccessPolicy` for files, network, Unix
51
+ sockets, exec, env and rules, with the presets `read-only`,
52
+ `workspace-write` and `full`. `HarnessOptions.policy` is the ceiling;
53
+ `AgentConfig.policy` (one `json` field on the wire) and
54
+ `CompletionContext.policy` (in-process only) only narrow it. The harness
55
+ compiles the three layers at run start; a grant outside the policy fails the
56
+ run before round 1. `files.write` bounds the write grants and grants
57
+ nothing itself. `Policy`, exported from `@qvac/harness`, narrows and
58
+ compiles one. (#388)
59
+ - Policy rules decide per call. A rule is
60
+ `{ decision, tool?, command?, paths?, hosts? }`: `command` is an argv
61
+ prefix matched against each simple command of a parsed shell line, `paths`
62
+ are globs and `hosts` are exact hosts or `*.example.com`. Any deny wins, a
63
+ line a rule cannot read asks, and a compound line is allowed only when
64
+ every part matches an `allow` rule. A tool with no rule for it is
65
+ unchanged. The built-in `PolicyRulesHook` evaluates them, appended after the
66
+ host's and the plugins' hooks of a run with rules; a tool exposes what it
67
+ matches through the new `ToolDefinition.command` and
68
+ `ToolDefinition.paths`. A malformed rule fails the run at start. (#390)
69
+
70
+ ```js
71
+ const policy = {
72
+ rules: [
73
+ { decision: 'allow', command: ['git', 'status'] },
74
+ { decision: 'deny', command: ['rm'] },
75
+ { decision: 'ask', tool: 'read_files', paths: ['/Users/u/.ssh/**'] }
76
+ ]
77
+ }
78
+ harness.completion({ model, messages, agent: { ...agent, policy } })
79
+ ```
80
+
81
+ - `network.mode: 'hosts'` runs. `web_fetch`, `http_request`, a plugin tool's
82
+ fetch (MCP included) and Python reach only the hosts in `network.hosts`, on
83
+ every redirect hop; delegate's external targets need `mode: 'on'`. The new
84
+ `EgressProxy` plugin (`@qvac/harness/plugins/egress-proxy`) gives
85
+ `SeatbeltSandbox` a loopback proxy per call, and the profile allows no other
86
+ remote socket, so `SeatbeltSandbox` holds `hosts` while it is loaded and
87
+ names it in the refusal otherwise. The host shell refuses `hosts`.
88
+ `Policy.allowsHost` is the one matcher (exact or `*.example.com`) for rules
89
+ and `network.hosts`, and host lists narrow by coverage. A plugin may now
90
+ `wants` a service it uses only when present. (#389)
91
+
92
+ ```js
93
+ const harness = new Harness({
94
+ exec: true,
95
+ policy: { network: { mode: 'hosts', hosts: ['pypi.org', '*.pythonhosted.org'] } },
96
+ plugins: [new SeatbeltSandbox(), new EgressProxy()]
97
+ })
98
+ ```
99
+
100
+ - Plugins. `HarnessOptions.plugins` takes `HarnessPlugin` instances that add
101
+ tools, hooks, services, `exec` languages, routes and a shell, and tools only
102
+ `invoke` reaches (`PluginSetup.capabilities`). Setup gets `ctx.services`,
103
+ `ctx.onDispose`, `ctx.deniedRoots` and, for a tool that declares `egress`,
104
+ `ctx.fetch`; it may `need` the core's `models` service (`ModelHost`) and
105
+ return `unload()` and `unloadIdle()`. A plugin tool is a write unless the
106
+ host grants it in `read`.
107
+ `@qvac/harness/plugins` exports `PluginRegistry`. Every plugin but
108
+ `code-mode`, `lsp` and `python` has a `qvac-plugin-<name>` manifest to pack
109
+ on its own (none published yet); the export keys the plugins import are
110
+ internals, not a stable API. See [Plugins](README.md#plugins), the
111
+ [plugin framework](lib/plugins/README.md) and
112
+ [a custom plugin](examples/custom-plugin/README.md). (#171, #187, #284, #296,
113
+ #299)
114
+ - Agents that hand off. `CompletionContext.agents` holds the agents a run may
115
+ hand to; `transfer_to_agent` emits a `transfer` event (`TransferEvent`) and
116
+ the run goes on as the next agent's, each hop a run of its own, at most three
117
+ transfers. `AgentConfig.model` runs an agent on its own model, and `input`
118
+ reaches whichever hop is running. See
119
+ [Agents that hand off](README.md#agents-that-hand-off) and
120
+ [examples/handoffs](examples/handoffs/README.md). (#233, #247, #318)
121
+ - External agents on the user's own login. `login: 'user'` on an
122
+ `ExternalAgents` target runs a CLI the user signed in to, with no API key;
123
+ `'isolated'` stays the default. See
124
+ [Hand the hard parts to Claude Code](README.md#hand-the-hard-parts-to-claude-code)
125
+ and [plugins/external-agents](plugins/external-agents/README.md). (#319,
126
+ #328)
127
+ - MCP servers. `McpPlugin` from `@qvac/harness/plugins/mcp` adds each server's
128
+ tools as `<server>__<tool>`, each asking for approval; a server that fails or
129
+ does not answer in 10 s adds none. `auth: { tokenCredentialKey }` sends a
130
+ credential to that server only, and `generic: true` adds `mcp_call` and the
131
+ skill catalog's mcp operations. See [plugins/mcp](plugins/mcp/README.md).
132
+ (#277)
133
+ - Deferred tools. A `ToolDefinition` with `defer: true` (and an optional
134
+ `group`) is listed by name in `tool_search` until the model loads it, so the
135
+ prompt prefix stays cached as the tool list grows; `McpServerConfig.defer`
136
+ defers a whole server. See
137
+ [Large tool sets, on demand](README.md#large-tool-sets-on-demand). (#311)
138
+ - Coding on macOS. `CodingPlugin` adds `shell` (keeps cwd and exports between
139
+ calls) and `shell_jobs` (background jobs) in a `coding` toolset; file
140
+ writes come from the files toolset's `write_file`. They run in a `sandbox` service provider (`SandboxService`).
141
+ `SeatbeltSandbox` from `@qvac/harness/plugins/sandbox-macos` provides it, and
142
+ runs `exec`'s shell under `sandbox-exec` with a `read-only` or
143
+ `workspace-write` preset. It is not isolated, so every coding call asks. See
144
+ [Sandboxed code](README.md#sandboxed-code),
145
+ [plugins/coding](plugins/coding/README.md) and
146
+ [plugins/sandbox-macos](plugins/sandbox-macos/README.md). (#179, #254, #279,
147
+ #296, #320, #329)
148
+ - Exec confined on Windows. `AppContainerSandbox` runs `exec`'s shell lines in
149
+ an AppContainer through a small C helper, under the run's access policy:
150
+ writes only to the write roots, reads only what is granted, and the network
151
+ on or off. Loopback stays closed, and the helper's grants stay on the
152
+ granted folders. See [plugins/sandbox-windows](plugins/sandbox-windows/README.md).
153
+ (#386)
154
+ - Exec confined on Linux. `LinuxSandbox` runs `exec`'s shell lines under
155
+ bubblewrap, with mounts built from the run's access policy: writes only to
156
+ the write roots, reads only what a `files.read` list names, denied roots
157
+ masked, and with the network off a seccomp filter that closes every socket
158
+ connect. It provides the `sandbox` service `CodingPlugin` runs in. See
159
+ [plugins/sandbox-linux](plugins/sandbox-linux/README.md). (#385)
160
+ - More places to run code. `QuickJs` runs `exec` with `language: "javascript"`
161
+ in QuickJS WASM, with no files or network. `CodeMode` adds `run_code`, a
162
+ script that calls the run's other tools, for `mid` models and up
163
+ (`ToolDefinition.callsTools`, `minCapabilityProfile`). `VmShell` runs exec's
164
+ shell in a barevisor VM, and `Python` adds Pyodide. See
165
+ [plugins/quickjs](plugins/quickjs/README.md),
166
+ [plugins/code-mode](plugins/code-mode/README.md),
167
+ [plugins/sandbox-vm](plugins/sandbox-vm/README.md) and
168
+ [plugins/python](plugins/python/README.md). (#174, #178, #232, #237)
169
+ - Language servers. `LspPlugin` adds a read tool, `lsp` (`definition`,
170
+ `references`, `hover`, `symbols`, `diagnostics`), over the servers a host
171
+ configures. See [plugins/lsp](plugins/lsp/README.md). (#202)
172
+ - Knowledge. The `Knowledge` plugin keeps one index the host feeds through
363
173
  `knowledgeUpsert`, `knowledgeRemove`, `knowledgeSearch` and
364
- `knowledgeStatus` (also over hrpc). An artifact whose vectors name the
365
- local embedder is indexed with no re-embedding; any other is re-embedded
366
- and its vectors handed back. `CompletionContext.knowledge = { scopes }`
367
- grants a run its scopes: the hits are injected into the last user turn
368
- before the first round, and with `tool: true` the plugin adds
369
- `knowledge_search`. Absent, a run retrieves nothing. A hit scoring under
370
- `minScore` (cosine, default 0.4) is dropped, so a run with no related
371
- knowledge injects nothing and keeps its cache key. The core lends plugins
372
- a second service, `embed`. `spawnHarness({ knowledge: { dir, model } })`
373
- adds the plugin to the bundled sidecar. (#197)
374
- - `createExecTool({ shell })` takes an `ExecShell`, where shell lines run
375
- after every exec check; the default is the host shell (`name: 'host'`). The
376
- shell name folds into exec's `policyVersion`. `VmShell` from
377
- `./plugins/sandbox-vm` runs the shell in a barevisor VM with no network, no
378
- disk and no mounts, from a prebuilt guest image the host ships: pass `shell`
379
- to `createExecTool` and `plugin` in `HarnessOptions.plugins`. It is opt-in,
380
- nothing wires it, and it is not a sandbox for untrusted code. **Upgrade:**
381
- `bare-process` moves to 4.5.1 (barevisor needs it), which adds the native
382
- addon `bare-posix`; a host that pins `bare-process` or audits its addons
383
- follows. Exec's `policyVersion` changes once, so a run paused before the
384
- upgrade does not resume. (#178)
385
- - Python is a plugin. `createPython({ loadPyodide, network })` from
386
- `./plugins/python` returns `{ language, plugin }`: pass `language` to
387
- `createExecTool({ languages })` and `plugin` in `HarnessOptions.plugins`,
388
- whose teardown closes the python worker. The entry also exports
389
- `stageInputs`, `runPython` and `closePythonWorker`. (#174)
390
- - Plugins: `HarnessOptions.plugins` takes `{ plugin, config, read }` entries. A
391
- `HarnessPlugin` declares its `name`, `api` (`PLUGIN_API_VERSION`), the
392
- services it `provides` and `needs`, an optional `validate(config)`, and a
393
- `setup(ctx, config)` that returns tools, hooks, services and a `teardown`.
394
- The list is checked when the `Harness` is constructed; plugins start on open
395
- in dependency order and are torn down in reverse on close. A plugin tool is a
396
- write unless the host lists it in `read`, it keeps `autoApprove` only then, its
397
- toolset must be one of `TOOLSETS` and its name may not repeat another tool on
398
- the harness, `transfer_to_agent` included. A granted tool with
399
- `autoApprove: true` runs unasked whatever its classifier says, so grant
400
- `read` only to a tool you would let run unasked. A plugin's `preToolCall`
401
- hooks run before the harness's hooks, so the gates check its arg rewrites; its other
402
- hooks run after them. `tools()` now waits for `ready()`, as `describe()`
403
- does, and `toolNames` and `diagnostics()` list plugin tools only after it,
404
- which a `spawnHarness` host never sees. With no plugins nothing changes. (#171)
405
- - A tool declares that it reaches the network with `egress(args)`, which
406
- returns the URL a call targets, or `null` when that is not known before the
407
- call. `HookPipeline.EgressGuardHook` now checks every tool that declares it,
408
- whatever its name, and no tool that does not: `http_request`, `web_fetch` and
409
- `mcp_call` declare it. A host tool named `http_request` built by hand must
410
- declare `egress` to keep the pre-call check. A plugin tool that declares
411
- `egress` gets `ctx.fetch`, a guarded fetch that reaches only the host its
412
- call's `egress` returned (none when that is `null`), refuses private hosts on
413
- every hop, stops with the call and refuses everything in sandbox mode. (#172,
414
- #224)
415
- - A run sets its tool-round limit with `maxToolRounds` (an integer of 1 or
416
- more, default 10), in process and on the wire. In process it also sets the
417
- model-facing text with `wording: { toolContinuation, toolDenied, toolCutOff }`:
418
- the nudge after a tool round, the result a declined call returns and the
419
- result of a call refused because the response hit the length limit. A resume
420
- keeps the values the run started with. An invalid `maxToolRounds` throws, in
421
- process and from `connectHarness` before the frame is sent; 0 on the wire
422
- means unset. (#159)
423
- - The `metrics` event reports speed per round and per run: `rounds[]` with
424
- each round's tokens, prefill and decode rates, time to first token, wall
425
- time and stop reason; `tools[]` with each tool's wall time; and `modelMs`
426
- and `toolMs`, the wall time spent in rounds and in tools. An in-process run
427
- without `onStep` that is stopped by its `signal` now sends `metrics` for the
428
- rounds it finished; a durable run or one over the wire sends none. The
429
- README's "Speed stats" section describes each field. (#195)
430
- - A host can replay an earlier turn's tool work: an assistant message may carry
431
- `toolCalls: { id, name, arguments }[]`, and a `tool` message `toolCallId` and
432
- `name`, with the result as JSON in `content`. A round's calls go in one
433
- assistant turn, grouped by the events' `round`, then one `tool` message per
434
- call. The harness renders them as the run that made the calls sent them, so a
435
- follow-up question is answered from the earlier result and the KV cache's
436
- message count still lines up. A replayed `skill` result becomes the reload
437
- stub; a replayed preload goes back into its user turn, and a replayed direct
438
- web search gets no nudge. In process and on the wire. It is opt-in: a host
439
- that sends plain turns and the `skillLoadedTurn` stub, as qvac-core does,
440
- works as before. **Upgrade:** switching rewrites history before the tail,
441
- which a warm cache ignores and mis-slices, so delete each chat's KV cache
442
- when it switches, as after a fold; that chat's next turn cold-primes once.
174
+ `knowledgeStatus`; `CompletionContext.knowledge = { scopes }` injects the hits
175
+ into the last user turn, and `tool: true` adds `knowledge_search`. See
176
+ [plugins/knowledge](plugins/knowledge/README.md). (#197)
177
+ - MOSS text-to-speech. `new Speech({ tts: 'moss' })` streams, clones a voice
178
+ from a 24 kHz `voice` wav, or speaks a `dialogue` of up to five speakers.
179
+ `Parakeet-TDT-1.1B-Q8_0` is a curated English-only transcription model; the
180
+ 0.6B stays the default. A plugin that provides `speech` implements
181
+ `SpeechService.defaultModel(profile)`, which the core calls to pick the voice
182
+ model for a `speak` that names none. See
183
+ [plugins/speech](plugins/speech/README.md). (#312, #315)
184
+ - A `base` music choice runs the undistilled ACE-Step 1.5 base DiT, set as
185
+ `modelChoice` in the `generate_music` tool-config or `musicModel` when
186
+ spawning. It needs a GPU and is the slowest. See
187
+ [plugins/music](plugins/music/README.md). (#315)
188
+ - Plugin options for a spawned harness. `spawnHarness` and `harnessChild` take
189
+ `pluginOptions: { speech?, mcp?: { servers? } }` (`HarnessPluginOptions`), so
190
+ a sidecar host reaches MOSS and deferred MCP tools. See the
191
+ [decision record](docs/decisions/2026-10-07-a-spawned-harness-takes-plugin-options-in-one-slot.md).
192
+ (#322, #325)
193
+ - A spawned harness loads a third-party plugin. `@qvac/harness/sidecar`
194
+ exports `HarnessSidecar`, the sidecar's boot, and
195
+ `@qvac/harness/worker/harness-sidecar.mjs` exports `firstPartyPlugins`. A
196
+ host stows its own entry with both and its plugin, whose options travel
197
+ under its name in `pluginOptions`. See
198
+ [a custom plugin](examples/custom-plugin/README.md#a-spawned-harness). (#359)
199
+
200
+ ```js
201
+ export default (ipc, ready) =>
202
+ HarnessSidecar.start(ipc, ready, (ctx) => {
203
+ const notes = ctx.pluginOptions.notes
204
+ return [...firstPartyPlugins(ctx), ...(notes ? [new Notes(notes)] : [])]
205
+ })
206
+ ```
207
+
208
+ - Hooks reach further. New phases `promptSubmit`, `toolFailure`, `stop` and
209
+ `preFold`; `HarnessHook.matcher` and `timeoutMs`; results
210
+ `{ permission: 'allow' | 'deny' | 'ask' }`, `{ context }` and `{ halt }`
211
+ (a `HookHalt` failure). `CommandHooks` runs the command hooks of a Claude
212
+ Code `settings.json` as they are. See
213
+ [plugins/command-hooks](plugins/command-hooks/README.md). (#260, #261)
214
+ - Approval quote. `ToolDefinition.quote(args, ctx)` returns the confirmation a
215
+ person reads before an approvable call, such as its cost, and `ApproveFn`
216
+ receives it as `quote`. (#183)
217
+ - Plans and goals. The agent knob `plan` offers `update_plan`, a checklist kept
218
+ in the run; `planMode` refuses writes until a submitted plan is approved; and
219
+ `goal: { objective, rounds?, ms?, tokens? }` keeps a run going until every
220
+ step is done, emitting `goal` events whose `text` the host stores as a turn.
221
+ See [Plans and goals](README.md#plans-and-goals). (#234, #240)
222
+ - Steering. `CompletionContext.input` sends `steer` and `follow-up` turns to a
223
+ running run, single or chained; each delivery emits an `input` event. See
224
+ [Steer a run while it works](README.md#steer-a-run-while-it-works). (#186,
225
+ #247)
226
+ - Fold. When the context runs short, older turns become one summary turn, and
227
+ `fold` `{ phase: 'done', summary, throughId, foldedTurns }` tells the host
228
+ what to store. It needs the new `ChatMessage.id`; a history without ids does
229
+ not fold; a host with a fold of its own, as qvac-core, turns it off. See the
230
+ [decision record](docs/decisions/2026-10-03-the-harness-decides-and-runs-the-fold.md).
231
+ (#241) A run also folds its own earlier rounds after the last user turn,
232
+ keeping the task, the latest plan, every `tool_search` and skill load and
233
+ the last two rounds. A round cut off at `length` forces a fold before the
234
+ next send, the wrap-up included. A fold of the run's own rounds emits no
235
+ `fold` event, and each one costs one cold prime of the folded history. The
236
+ wrap-up now carries `args.messages`, so in a multi-turn chat it can also fold
237
+ the host's turns (`foldChat`) and emit a host `fold` event (`start`, `done`),
238
+ at this new point in the run. See the
239
+ [decision record](docs/decisions/2026-10-13-a-run-folds-its-own-rounds.md).
240
+ (#446, #452)
241
+ - Exec output over `maxOutputChars` spills to a run-scoped file, and the marker
242
+ names it for `read_files`, when the run has `read_files`. `deniedRootsFor`
243
+ returns two roots, the storage root and the spill root. (#238)
244
+ - Run log. `RunLog.watch()` follows a run live as views or an inspector page,
245
+ and `RunLog.requests(core)` rebuilds every request the model saw. See
246
+ [examples/run-log](examples/run-log/README.md) and
247
+ [Resuming a completion](docs/resuming.md). (#235, #236)
248
+ - `bun run example run-log` is one CLI that opens a run from its run log file
249
+ or from the key of a run someone shares over Hyperswarm: `report` opens the
250
+ run report in the browser, `inspect` prints the raw log (`--html` for a
251
+ page, `--follow` to watch it grow), and `share` serves a run and prints its
252
+ key. It replaces `examples/run-log/report.ts`, `view.ts`, `live.ts` and
253
+ `inspect.ts`. (#408)
254
+ - `bun run example --report <file>` writes a run report page for each run an
255
+ example makes (its run log when the file ends in `.json`). `bun run example
256
+ --share` prints a key first, then streams every run to it as it goes, so
257
+ `run-log report <key>` or `run-log inspect <key> --follow` open it live.
258
+ `run-log report --live` serves a live run report on localhost that updates
259
+ in place, follows the newest step and run, and has a tab per run
260
+ (`RunReport.live`, `RunReport.parts`). Each example parses its own args, and
261
+ `bun run example <name> --help` lists them.
262
+ - Parallel. `ToolDefinition.concurrent` runs up to four opted-in reads of a
263
+ round together (`read_files`, `grep` and `file_glob` opt in). `slots` (or
264
+ `llm.slots` when spawned) lets one loaded model decode several completions at
265
+ once. See [Parallel](README.md#parallel) and
266
+ [examples/parallel](examples/parallel/README.md). (#193, #316, #333)
267
+ - `maxToolRounds` (default 10, in process and on the wire) sets a run's round
268
+ limit. `wording` (`toolContinuation`, `toolDenied`, `toolCutOff`,
269
+ `toolContextBoundary`, `toolRepeated`, `toolUnchanged`, `fileDelivered`,
270
+ `goalContinuation`) sets its model-facing text, in process only. A run that
271
+ wraps up after a delivered file ends with the `delivered` outcome. (#159,
272
+ #240, #317, #450, #453, #463)
273
+ - Speed. `metrics` adds `rounds[]`, `tools[]`, `modelMs` and `toolMs`. See
274
+ [Speed stats](docs/speed-stats.md). (#195) `metrics.outcome` names how the
275
+ run ended (its `RunOutcome`), and `rounds[].overflows` counts the prefills
276
+ the context overflowed before a round landed. (#442, #444)
277
+ `rounds[].contextBoundary` marks a round cut at the context window (#450),
278
+ and `rounds[].reasoningDeltas` counts its reasoning deltas, a cancelled round
279
+ included (#461, #484). A cancelled round carries `rawContentChars` and
280
+ `kind` (`streaming` or `wrap-up`). (#476, #480)
281
+ - `CompletionContext.budgetMs` sets one run's wall-clock budget, in process
282
+ only. A goal's `ms` wins, and a resume keeps the budget the run started
283
+ with. See the
284
+ [decision record](docs/decisions/2026-10-13-run-time-budget.md). (#442)
285
+ - `CompletionContext.roundCut`, in process only, hands the host a `cut(note)`
286
+ that stops the tool round streaming now and keeps the run. The round's whole
287
+ calls run, a call it may have truncated is answered with
288
+ `wording.toolRoundCut`, and the note is the next user turn, acked by an
289
+ `input` event. The second cut in a row ends the run as `mute`. The bench
290
+ bridge cuts a round at its deadline instead of ending the run. See the
291
+ [decision record](docs/decisions/2026-10-15-a-host-cuts-a-round-and-the-run-goes-on.md).
292
+ (#462)
293
+ - `CompletionSdkResult.toolCallStream`, optional, streams a round's calls
294
+ before `final`. With it, a round that streams one call 3 times or 32 calls
295
+ is cancelled mid-stream. (#453)
296
+ - Model fit. `LoadedModel.fit` reports the engine's fit verdict, plan and bytes
297
+ in `diagnostics().models` and `model` events, and `list()` rows of curated
298
+ chat models not loaded carry `fit`, `fitBasis` and `fitEvidence`. A curated
299
+ chat model with no set context steps down to 32768, 16384 or 8192 when its
300
+ tier would not fit, and an embedding load that would not fit unloads idle
301
+ chat models. `llmLoad` passes llama.cpp load knobs. See
302
+ [Know how fast it is](README.md#know-how-fast-it-is) and
303
+ [examples/model-residency](examples/model-residency/README.md). (#194, #196,
304
+ #314)
305
+ - Tool replay. An assistant message may carry `toolCalls` and a `tool` message
306
+ `toolCallId` and `name`, so a follow-up is answered from an earlier turn's
307
+ results. Opt in; delete each chat's KV cache when it switches. See the
308
+ [decision record](docs/decisions/2026-10-02-a-host-replays-tool-turns-the-harness-renders-them.md).
443
309
  (#169)
444
- - `CompletionEngine` takes an optional `outbound` guard
445
- (`new CompletionEngine(sdk, { outbound })` or
446
- `CompletionEngine.run(sdk, args, { outbound })`), defaulting to the built-in
447
- one. (#166)
448
- - `list()` rows for curated chat models that are not loaded carry `fit`,
449
- `fitBasis` and `fitEvidence`, from one batched SDK `assessModelFit` ask that
450
- is kept until a model loads or unloads, or the harness resumes. The
451
- `model-info` wire fields are new and optional. qvac-core can show "fits" for
452
- `likely-fits`, "too large" for `likely-too-large` and nothing for `unknown`,
453
- and suggest the largest `likely-fits` row; none of them blocks a download. (#196)
454
- - A curated chat model with no context set by the agent or `contextSize` steps
455
- down from today's tier to 32768, 16384 or 8192 on its first load when the
456
- SDK says the tier would not fit and confirms a lower one from calibration or
457
- the engine's fitter. The choice is kept for the process, and the load, the
458
- run's budget and the fit ask read it from one function. A cold run's
459
- `metrics.ctxSize` is the context the model loaded with. A manual `loadModel`
460
- steps down the same way and refuses only when no rung is confirmed. (#196)
461
- - The load decision for a curated chat model passes its registry coordinates,
462
- so the SDK runs the engine's own fitter (`native-fit`) once per load. Pin
463
- re-checks and list rows stay on the cheap calibrated estimate. (#196)
464
- - An embedding load that the SDK says would not fit unloads idle chat models
465
- that are not pinned and that no reply is using. (#196)
310
+ - Host building blocks. `Tools` from `@qvac/harness/tools` (`product`,
311
+ `deniedRoots`, `bundledSkillsDir`, `stageInputs`); `credentialSlots` from
312
+ `@qvac/harness/skill-manifest`; `@qvac/harness/addon-externals` with
313
+ `deferredAddonPackages`; and an `outbound` option on `CompletionEngine`. See
314
+ [Product tools and skills](docs/hosting.md#product-tools-and-skills) and
315
+ [Install](docs/hosting.md#install). (#166, #228, #273, #283, #317)
316
+ - `grep` runs on the host that holds a hyperdrive. A `grantedDrives` entry with
317
+ `search: true` gets a `search` op from `driveOp` and returns its hits inline,
318
+ so file bytes never cross to the harness. The host answers it with
319
+ `DriveSearch.answer(drive, request)`, where `drive` is the `Drive` its `list`
320
+ op already serves: a shallow list yields each subdirectory as
321
+ `{ key, dir: true }` and honours `skip`. Without the flag, `grep`
322
+ streams the drive as before; a failed search is the tool's error, never a
323
+ fallback. The host searches whole files, so results match streaming for
324
+ files under 8 MB; a line over 1 MB is searched in its first 1 MB on either
325
+ side. The regex runs in the host's process: a host that serves
326
+ untrusted regex calls the helper from a worker. On a sparse replica the
327
+ host still pulls the blocks from its peers. (#393)
466
328
 
467
- - Ternary Bonsai 2 27B joins the curated catalog in two builds,
468
- `Ternary-Bonsai-2-27B-PQ2_0` (7.2 GB) and `Ternary-Bonsai-2-27B-PTQ1_0`
469
- (5.9 GB), each with its vision projection. Both sit in the `high` tier, by
470
- their memory footprint rather than their parameter count. As a Qwen3.8-27B
471
- fine-tune whose name the SDK's dialect router does not recognise, it parses
472
- tool calls as `qwen35`; a catalog entry can now name its tool dialect.
329
+ ```js
330
+ import { DriveSearch } from '@qvac/harness/lib/tools/fs/search.ts'
331
+
332
+ harness.completion({
333
+ grantedDrives: [{ key, writable: false, search: true }],
334
+ driveOp: (request) =>
335
+ request.op === 'search' ? DriveSearch.answer(drive, request) : other(request)
336
+ })
337
+ ```
338
+
339
+ - A Node lane: `bun run test:node` runs the brittle suite under Node, and CI
340
+ runs it beside the Bare lane. (#535)
473
341
 
474
342
  ### Changed
475
343
 
476
- - **Breaking:** `@qvac/harness/plugins/speech` exports `Speech` and the types
477
- it takes (`SpeechOptions`, `SpeechDialogue`, `SpeechSpeaker`, `TtsEngine`)
478
- and nothing else. `buildWavBuffer`, `packSamples`, `speakOnce`,
344
+ - **Breaking** for a TypeScript host that reads it: `inference-sent` no longer
345
+ carries `messages`. `@qvac/inference` 0.22 does not report the slice it
346
+ pushed, so the field was always empty; a prompt inspector reads the payload
347
+ from `inference-call` and the cached share from `tokens.cached`. (#557)
348
+ - **Breaking** for a host that injects an SDK through `HarnessOptions.sdkLoader`:
349
+ `CompletionSdkResult` carries `events`, an `AsyncIterable` of the SDK's own
350
+ `CompletionEvent`, in place of the deprecated `tokenStream`. The harness
351
+ reads its `contentDelta` events as the reply text. (#510)
352
+ - **Breaking** for a caller that matches a fetch refusal as a `TypeError`:
353
+ every plugin fetch refusal (the guarded fetch, the Python sandbox's, and the
354
+ network-off and no-fetch refusals) is a `HarnessError('FETCH_REFUSED')`.
355
+ Match with `instanceof` or the code. (#506)
356
+ - **Breaking:** `isHarnessError(err, name)`, `harnessErrorCode(name)` and
357
+ `harnessErrorCodes()` from `@qvac/harness/errors` are the `HarnessError`
358
+ statics `HarnessError.is`, `HarnessError.code` and `HarnessError.codes`.
359
+ (#512)
360
+ - **Breaking:** the message constants `CONTEXT_OVERFLOW_MESSAGE`,
361
+ `IMAGE_LOAD_STALL_ERROR`, `TRANSLATION_LOAD_STALL_ERROR` and
362
+ `NO_STORAGE_ROOT` are `HarnessError` statics. `@qvac/harness/errors`,
363
+ `@qvac/harness/plugins/image` and the fs scope module no longer export them.
364
+ The package root keeps `CONTEXT_OVERFLOW_MESSAGE`. The text is unchanged.
365
+
366
+ ```js
367
+ // before
368
+ import { IMAGE_LOAD_STALL_ERROR } from '@qvac/harness/plugins/image'
369
+ if (result.error === IMAGE_LOAD_STALL_ERROR) retry()
370
+
371
+ // after
372
+ import { HarnessError } from '@qvac/harness/errors'
373
+ if (result.error === HarnessError.IMAGE_LOAD_STALL_ERROR) retry()
374
+ ```
375
+
376
+ (#552)
377
+
378
+ - `SeatbeltSandbox.setup()` runs `/usr/bin/getconf DARWIN_USER_TEMP_DIR` and
379
+ throws when it fails. A copy of the user's xcrun cache into a scratch `TMPDIR`
380
+ that fails for any reason but a missing cache fails that exec call, or the
381
+ workspace `open`. See the
382
+ [decision record](docs/decisions/2026-10-14-seatbelt-seeds-tmpdir-with-a-copy-of-the-xcrun-cache.md).
383
+ (#467)
384
+ - Identical calls in one round run once, writes included: two `echo x >> f`
385
+ in one round append once. One tool turn worded by `wording.toolRepeated`
386
+ tells the model. A runaway round, 3 repeats of one call or 32 calls, is
387
+ cancelled on its calls. `<tool_call>` markup left in a round's content, as in
388
+ a wrap-up or a frame the SDK did not parse, counts toward the same limits.
389
+ See the
390
+ [decision record](docs/decisions/2026-10-13-a-round-runs-each-call-once.md).
391
+ (#453, #480)
392
+ - A response cut off by the length limit runs its complete calls; only the
393
+ call the cut truncated is answered, and a truncated call to a tool that is
394
+ not loaded is answered as cut. A cut the patch flags as the output cap gets
395
+ `wording.toolCutOff`; any other `length` cut gets
396
+ `wording.toolContextBoundary`, which says the context window filled before
397
+ the arguments were complete. (#155, #450, #454, #458)
398
+ - With tools on, a prose round cut at the context window is retried with the
399
+ history folded, or wrapped up, instead of answered with its fragment. A cut
400
+ the patch flags as the output cap (`contextBoundary: false`), or a round with
401
+ no tools, keeps the fragment. `round-reset` fires only when the round is
402
+ retried or wrapped. (#456, #483)
403
+ - A host recopies `patches/@qvac%2Finference@0.22.0.patch` into its
404
+ `patchedDependencies` on this bump. The patch sets `contextBoundary` on every
405
+ `length` stop: `true` at the context window, `false` at a `predict` cap.
406
+ Every round, the wrap-up included, reads a stop flagged `false` as the output
407
+ cap and any other `length` stop as the context window: a cut call gets
408
+ `wording.toolContextBoundary`, a cut prose round with tools on is retried
409
+ with a fold, a wrap-up answers with the fallback and emits `round-reset`, and
410
+ `RoundSpeed.contextBoundary` is `true`. A stop flagged as the cap no longer
411
+ makes the next round fold. Without the patch's `plugin.js` hunk every
412
+ `length` stop, a `predict` cap included, reads as the window, and the harness
413
+ logs this once. See [Install](docs/hosting.md#install). (#450, #481, #485,
414
+ #488)
415
+ - A host that runs python on Node recopies `patches/pyodide@314.0.2.patch`
416
+ into its `patchedDependencies`. Pyodide now loads `child-process-stub.cjs`
417
+ by path, so guest `os.system` cannot spawn a process on Node either. A Bare
418
+ host needs nothing: the old patch already gave it the stub. On Node, guest
419
+ Python still reaches the host realm through `js` (#554, open). (#535)
420
+ - A call whose result is the same as its last result in the run is not
421
+ progress: its result carries `wording.toolUnchanged`, and 3 such calls send
422
+ the run to the wrap-up with the `exhausted` outcome. A round whose sent
423
+ history rewrote earlier turns (a fold, a ladder drop, a compaction) clears
424
+ what the run settled, so a re-read after it is new. The result digest is
425
+ keyed by the run key, so digests in run logs written before this change
426
+ differ. See the
427
+ [decision record](docs/decisions/2026-10-14-an-unchanged-result-is-not-progress.md).
428
+ (#463, #464, #465)
429
+ - One call that returns the same result 4 times in a row ends the run in the
430
+ wrap-up with the `exhausted` outcome, even when other calls progressed in
431
+ between. The unchanged note counts the runs: `wording.toolUnchanged` replaces
432
+ `{count}`. A goal run ends after this wrap-up with the new `GoalStatus`
433
+ `stalled`, instead of taking another goal turn. See the
434
+ [decision record](docs/decisions/2026-10-15-a-call-that-keeps-returning-the-same-result-ends-the-run.md).
435
+ (#499)
436
+ - A new result from any call restarts the unchanged count of every call, and a
437
+ result that prints nothing is never unchanged. An edit between two runs of one
438
+ check no longer counts toward the stop. (#508)
439
+ - A goal can name `checks`, the commands its result is judged by. The goal is
440
+ met only when the plan is done and the latest run of each check exited 0; a
441
+ run that names the check in a call's `command` with only `&&` after it counts.
442
+ Until then each goal turn names the checks not run yet and carries the output
443
+ tail of a failed one, and a run that spends its budget with a check failing
444
+ ends `rounds`, `time` or `tokens`, not `met`. The Terminal-Bench agent sends
445
+ the verify scripts and test runners its instruction names that the container
446
+ has, and returns `exitCode`, so a failing command is a failed call; its log
447
+ rows keep `return_code`, and the report adds `checkerRan` and
448
+ `checkerPassed`. (#530)
449
+ - A goal with no `checks` is no longer met on the model's word when the run
450
+ offers a tool that takes a `command`. Before its first turn, and on each goal
451
+ turn until it does, the model is asked to name the commands that prove the
452
+ task done under a `Checks:` line; the first turn that names them sets the
453
+ goal's checks, and the goal is met only once each ran and exited 0. A model
454
+ that names none runs the goal to its budget. The Terminal-Bench agent, when
455
+ its instruction names no check it can find, sends `test -s <path>` for each
456
+ absolute path the instruction asks it to write. A `goal` event names the
457
+ goal's checks in `checks` once it has some, the bench bridge's done frame
458
+ carries them in `goal.checks`, and the Terminal-Bench trial row keeps them as
459
+ `checks`. (#550)
460
+ - A round of unchanged calls counts once toward the stop for runs with no new
461
+ result, not once per call. Three such rounds in a row end the run, so one
462
+ sweep of re-checks with nothing new no longer ends a goal run as `stalled`. (#509)
463
+ - A fold, a forced fold, a ladder drop or a compaction no longer restarts the
464
+ unchanged count. A call that returns the same result and folds every few rounds
465
+ now ends the run at its fourth identical run. The re-read after a fold carries
466
+ no unchanged note and no progress credit. (#507)
467
+ - A wrap-up cut off at the context window answers with the fallback instead of
468
+ its fragment and emits `round-reset` for what it streamed; a wrap-up the
469
+ patch flags as cut at the output cap (`contextBoundary: false`) keeps its
470
+ text as the answer. The run's outcome does not
471
+ change. The wrap-up sends `predict` as `reasoning_budget + 4096`; a host
472
+ `predict` wins. (#452, #480)
473
+ - The bench bridge sends `thinkingDefault: 'enabled'`, so a model without a
474
+ preset gets the 8192 reasoning cap. (#461)
475
+ - A wrap-up's answer no longer overwrites why the run wrapped: `hook:runEnd`
476
+ and the persisted context keep `exhausted`, `time-capped` or `mute`. (#442)
477
+ - The default `goalContinuation` nudge says to mark a step done only once a
478
+ tool result shows it, and to make the last step a check of the whole result
479
+ with a tool. (#447)
480
+ - `exec` refuses an unterminated quote and `let`, `declare`, `typeset`,
481
+ `local`, `export`, `readonly`, `read`, `unset` or `printf -v` given `$` or a
482
+ backtick, whose subscript bash evaluates. With the network off it also
483
+ refuses a program name the shell still expands, such as `{curl,x}`. (#390)
484
+
485
+ - **Breaking:** a `driveOp` host answers the new `recursive` field of a `list`
486
+ request. With `recursive: false` it lists only the folder's direct children,
487
+ each subdirectory as `{ key, dir: true }` in `entries`, and `skip` names a
488
+ child to leave out. The walk behind `grep` and `file_glob` lists one
489
+ directory at a time this way, so it never lists an ignored tree. (#391)
490
+
491
+ ```js
492
+ // before
493
+ { op: 'list', driveKey, folder, skip, limit, cursor }
494
+ // after
495
+ { op: 'list', driveKey, folder, skip, recursive: false, limit, cursor }
496
+ ```
497
+
498
+ - `grep` and `file_glob` skip what `.gitignore` and `.ignore` files exclude,
499
+ and the `.hg`, `.svn`, `.venv`, `.cache` and `.next` directories, so an
500
+ ignored build tree no longer fills the walk's entry cap. `includeIgnored: true`
501
+ searches them too; `.git` and `node_modules` stay skipped. POSIX classes such
502
+ as `[[:alpha:]]`, `.git/info/exclude` and global excludes are not read. (#391)
503
+ - `grep` searches raw bytes and decodes only the line around a hit, runs its
504
+ queries as one regex, and reads up to 8 files at once; hits keep the walk's
505
+ order and the match cap stops at the same hit. A trailing newline no longer
506
+ adds an empty last line for `^$` or `.*` to match, a NUL in the first 1024
507
+ bytes marks a file binary before any hit counts, and case-insensitive
508
+ literals fold as the regex `i` flag does: ASCII as before, but the Kelvin
509
+ sign no longer matches `k`. (#392)
510
+ - **Breaking:** `network: { mode: 'off' }` in the agent's or the run's policy
511
+ replaces `sandboxMode`. It withholds the network toolsets and keeps exec,
512
+ python, plugin fetches and external delegate targets offline, as before.
513
+ A tool reads the compiled policy in `ctx.policy`, an exec shell in
514
+ `ExecutionContext.policy`, and a `preToolCall` hook reads `ctx.network`.
515
+ `agent-knobs.sandboxMode` stays on the wire, never read or written. (#388)
516
+
517
+ ```js
518
+ // before
519
+ harness.completion({ model, messages, agent: { ...agent, sandboxMode: true } })
520
+ // after
521
+ harness.completion({ model, messages, agent: { ...agent, policy: { network: { mode: 'off' } } } })
522
+ ```
523
+
524
+ - **Breaking:** `SeatbeltSandbox` takes only `{ sandboxExec }`. What a line may
525
+ touch comes from the run's compiled policy, per call and at
526
+ `SandboxService.open(dir, policy)`: the write grants (`files.write` only
527
+ bounds them), `files.deny`, the network, and with the network off the listed `sockets`,
528
+ `localhost` and `bind`; `env` drops names from the spawn allowlist. Its shell
529
+ is named `seatbelt`. A provider declares `enforces` on its `ExecShell` or
530
+ `SandboxService`, and the harness refuses a run whose policy one cannot hold
531
+ before round 1: Seatbelt refuses a `files.read` list, a `hosts` network
532
+ mode, and `localhost: false`, `bind: false` or `sockets` under `on`, and the host shell an `env` or `exec` list. `VmShell` holds any
533
+ policy. `ExecutionContext.writeRoots` and `deniedRoots` moved into
534
+ `ExecutionContext.policy`. (#388)
535
+
536
+ ```js
537
+ // before
538
+ new Harness({
539
+ exec: true,
540
+ plugins: [new SeatbeltSandbox({ preset: 'workspace-write', network: false })]
541
+ })
542
+ // after
543
+ new Harness({
544
+ exec: true,
545
+ policy: { preset: 'workspace-write' },
546
+ plugins: [new SeatbeltSandbox()]
547
+ })
548
+ ```
549
+
550
+ - **Breaking:** plugins are an array of instances, and the harness builds
551
+ `exec` from what they declare. `PluginEntry`, `{ plugin, config, read }` and
552
+ the `config` argument of `validate` and `setup` are gone: options and the
553
+ `read` grant go to the constructor. With `exec: true` and `sdkHome`, the
554
+ harness builds `exec` from each plugin's `PluginSetup.exec`; two shells, or a
555
+ host `exec` tool beside a contributing plugin, fail the start. (#269, #273)
556
+
557
+ ```js
558
+ // before
559
+ new Harness({
560
+ tools: [createExecTool({ deniedRoots, skillsDir, languages, routes }), ...tools],
561
+ plugins: [
562
+ { plugin: python.plugin },
563
+ { plugin: weatherPlugin, read: ['weather_lookup'] },
564
+ { plugin: imagePlugin, config: { model, clamps }, read: ['generate_image'] }
565
+ ]
566
+ })
567
+
568
+ // after
569
+ new Harness({
570
+ tools,
571
+ exec: true, // or { spawn, killProcess, realpath, policyVersion }
572
+ skillsDir,
573
+ sdkHome: sdkStorage.home,
574
+ plugins: [
575
+ new Python(),
576
+ new ObsidianRoute({ credentialStore }),
577
+ new Weather({ read: ['weather_lookup'] }),
578
+ new Image({ model, clamps, read: ['generate_image'] })
579
+ ]
580
+ })
581
+ ```
582
+
583
+ `Speech`, `Weather`, `Image`, `Music` and `Knowledge` replace the
584
+ `speechPlugin`, `weatherPlugin`, `imagePlugin`, `musicPlugin` and
585
+ `knowledgePlugin` objects, and `Python` replaces `createPython()`.
586
+ `ObsidianRoute`, `VmShell`, `SeatbeltSandbox`, `QuickJs` and `CodeMode` have
587
+ no `.plugin` pair. `SeatbeltSandbox.name` is `sandbox-macos` (the label is
588
+ `.shell.name`), `CommandHooks` takes `(hooks, { cwd })`, and `LspPlugin` and
589
+ `ExternalAgents` take their options in the constructor.
590
+
591
+ - **Breaking:** these built-ins are now plugins. A host that builds `Harness`
592
+ itself composes them; the bundled sidecar passes them all, so a
593
+ `spawnHarness` host needs no change. See [Plugins](README.md#plugins).
594
+ - Speech: `new Speech()`. Without it `transcribe`, `speak`, `speakStream` and
595
+ a voice model load reject with `speech needs the speech plugin`. (#173)
596
+ - Translation: `new TranslationPlugin()`. Without it `invoke` of `translate`
597
+ errors. (#275)
598
+ - Image and music: `new Image({ model, clamps })` and
599
+ `new Music({ model: musicModelSet(choice), clamps })`. `HarnessOptions`
600
+ loses `imageModel`, `imageClamps`, `musicModel` and `musicClamps`, and the
601
+ tools sit in new `image` and `music` toolsets. (#175)
602
+ - Weather: `new Weather({ read: ['weather_lookup'] })`.
603
+ `createWeatherLookupTool` is gone, a refused fetch is a plain `{ error }`,
604
+ and the 400 KB body cap is dropped. (#176)
605
+ - Web search: `new WebSearchPlugin({ read: ['web_search'] })`;
606
+ `Tools.product` no longer includes it. Its engines fetch through
607
+ `ctx.fetch`, so a redirect to an undeclared host fails that call. (#276)
608
+ - Obsidian: `new ObsidianRoute({ credentialStore })` with `exec: true`.
609
+ `ExecToolOptions.credentialStore` is gone. (#223)
610
+ - Python: `new Python({ loadPyodide, network })`. `createExecTool()` without
611
+ `languages` runs shell lines only, and `disablePyodide`, `loadPyodide` and
612
+ `pythonNetwork` are gone. (#174)
613
+ - MCP: see Removed.
614
+
615
+ - **Breaking:** every module's entry exports one class and its types.
616
+ (#216 to #221, #229)
617
+ - `completion()` is `CompletionEngine.run(sdk, args, options)`, and the
618
+ `./lib/capabilities/completion.ts` subpath is gone; its helpers and types
619
+ are root exports, except `trustedSourcesFrom`.
620
+ - `defaultHooks()` is `HookPipeline.defaults()`; `EgressGuardHook` and
621
+ `SkillCatalogGuardHook` are statics of `HookPipeline`.
622
+ - The contract type `Agent` is `AgentConfig`. `./agent` exports the `Agent`
623
+ class: `resolveAgent` and `agentPolicy` are `Agent.resolve` and
624
+ `Agent.policy`, and the other functions and constants keep their names as
625
+ statics.
626
+ - `createPluginRegistry(entries, options)` is
627
+ `new PluginRegistry(plugins, options)`.
628
+ - `./run-log` and `./run-log-inspect` export `RunLog`: `RUN_LOG_VERSION`,
629
+ `RUN_LOG_PROTOCOL_VERSION`, `inspectRun` and `renderRunLogHtml` are
630
+ `RunLog.VERSION`, `RunLog.PROTOCOL_VERSION`, `RunLog.inspect` and
631
+ `RunLog.renderHtml`, and the engine-boot functions are statics.
632
+ `./run-log` no longer exports the `Operation` and `RunBudget` types.
633
+ - `./machine` exports `CompletionMachine` (`create`, `definition`,
634
+ `emptyContext`, `VERSION`) and no longer re-exports the run log, the error
635
+ classes, `tagError`, `rehydrateError`, the failure-result helpers or the
636
+ stage payload types. The shared run types are root exports, and the
637
+ `./lib/tool-call-display.ts` subpath is gone.
638
+ - **Breaking:** `@qvac/harness/plugins/speech` exports only `Speech` and its
639
+ option types. `buildWavBuffer`, `packSamples`, `speakOnce`,
479
640
  `speakStreamOnce`, `transcribeStreaming`, `normalizeForSpeech`,
480
- `SPEECH_LEXICON`, `needsResample`, `resampleForTranscription`, `wavFormat` and
481
- `TARGET_SAMPLE_RATE` are internal; qvac-core imports none of them. (#312,
482
- #217)
483
-
484
- - **Breaking:** translation is a plugin. The translate runtime, the NMT
485
- catalog and the `translation` and `translation-nmtcpp` addon loaders moved
486
- from `lib/` to `plugins/translation/`, exported as
487
- `@qvac/harness/plugins/translation` (`TranslationPlugin`, package
488
- `qvac-plugin-translation`). A `Harness` built without it answers
489
- `invoke({ capability: 'translate' })` with
490
- `translate is not available on this device` and loads no NMT model or
491
- binding. `translate` is still never
492
- in `toolNames`, `tools()` or an agent's tool list: it comes from the new
493
- `PluginSetup.capabilities`, tools that only `invoke` reaches, whose names
494
- the registry checks like a tool's and which keep their own `effect`.
495
- `ModelHost.completionModel(model, signal)` loads a GGUF through the chat
496
- pool and returns `{ modelId, release }`; the core never leases a model
497
- borrowed this way as the resident chat model, which retires the
498
- `TranslatePsy-` name check from the core. The bundled sidecar passes the
499
- plugin, so a `spawnHarness` host is unchanged. **Upgrade:** a host that
500
- constructs `Harness` itself adds `new TranslationPlugin()` to `plugins`,
501
- with `import { TranslationPlugin } from '@qvac/harness/plugins/translation'`.
502
- The root exports `./lib/helpers/clean-answer.ts` and
503
- `./lib/capabilities/detect-language.ts` for the packed plugin. (#275)
504
- - **Breaking:** the translation catalog is `TranslationPlugin` statics. The
505
- root no longer exports them: `NMT_TO_ENGLISH`, `NMT_FROM_ENGLISH`,
641
+ `SPEECH_LEXICON`, `needsResample`, `resampleForTranscription`, `wavFormat`
642
+ and `TARGET_SAMPLE_RATE` are internal; speak and transcribe through the
643
+ harness. (#217, #312)
644
+ - **Breaking:** the translation catalog is static on `TranslationPlugin`, and
645
+ the root no longer exports it: `NMT_TO_ENGLISH`, `NMT_FROM_ENGLISH`,
506
646
  `EURONANO_LANGUAGES`, `SLM_LANGUAGE_CODES` and `SLM_LANGUAGE_NAMES` are
507
- `TranslationPlugin.NMT_TO_ENGLISH` and so on, `translationPlanFor(from, to)`
508
- is `TranslationPlugin.planFor(from, to)`, and the `TranslationPlan` type
509
- (with `TranslationRefusal`) comes from `@qvac/harness/plugins/translation`.
510
- There are no deprecated aliases. (#275)
511
- - A translation pack no longer stays resident across chat turns:
512
- `TranslationPlugin` frees it on the same idle sweeps as the image and music
513
- models, when a chat turn ends and when a chat model loads, and never while
514
- a translation is running or waiting. The next translation reloads it. (#275)
515
- - **Breaking:** `web_search` is a plugin. `Tools.product` no longer includes it;
516
- `WebSearchPlugin` from `@qvac/harness/plugins/web-search` provides it, with
517
- the same name, toolset, description and schema. Its options are `engines`
518
- (a subset, in tie-break order; default all seven), `maxResults` (overrides
519
- the 8 or 12 the context window picks) and `read`. `validate()` refuses an
520
- unknown engine, an empty list and a `maxResults` that is not a positive
521
- integer. The engines now fetch through the plugin `ctx.fetch`, so each
522
- request is checked for a private address, and a redirect to a host the call
523
- did not declare is refused: an engine that redirects to a consent or region
524
- page fails for that call. `ToolDefinition.egress` may return a list of URLs;
525
- the egress hook checks each one, and the plugin fetch admits the hosts they
526
- name. The tool moves after `exec` in the prompt prefix, which changes cache
527
- keys and bench comparability. `lib/web-search/html-helpers.ts` and
528
- `user-agents.ts` move to `lib/helpers/`. **Upgrade:** qvac-core and the
529
- mobile worklet add `new WebSearchPlugin({ read: ['web_search'] })` to
530
- `plugins`, next to the `Tools.product` list; without the read grant every
531
- search asks for approval. Hosts that use `spawnHarness` get it from the
532
- sidecar. A run paused on a `web_search` call does not resume across the
533
- upgrade. (#276)
534
-
535
- - **Breaking:** plugins are an array of instances, and the harness builds `exec`
536
- from what they declare. `HarnessOptions.plugins` is `readonly HarnessPlugin[]`;
537
- `PluginEntry` and `{ plugin, config, read }` are gone, and so are the `config`
538
- arguments of `validate` and `setup`. A plugin's options go to its constructor
539
- and the host's read grant is a constructor option carried as
540
- `HarnessPlugin.read`. Every shipped plugin is a class: `Speech`, `Weather`,
541
- `Image`, `Music` and `Knowledge` replace the object constants, `Python`
542
- replaces `createPython()`, and `ObsidianRoute`, `VmShell`, `SeatbeltSandbox`,
543
- `QuickJs` and `CodeMode` implement `HarnessPlugin` with no `.plugin` pair;
544
- `SeatbeltSandbox.name` is now the plugin name `sandbox-macos`, and the
545
- `seatbelt:<preset>:<network>` label is `.shell.name`.
546
- `CommandHooks` takes the hooks object first, `new CommandHooks(hooks, { cwd })`;
547
- `LspPlugin` and `ExternalAgents` take their options in the constructor.
548
- `PluginSetup.exec` declares the languages, routes and shell a plugin adds;
549
- with `HarnessOptions.exec` (`true` or
550
- `{ spawn, killProcess, realpath, policyVersion }`) the harness builds the
551
- `exec` tool from them, with its own `skillsDir` and skill settings, and
552
- rebuilds it on every dynamic swap. Two
553
- shells fail the start naming both; a host `exec` tool beside a contributing
554
- plugin fails the start naming the plugin. `HarnessOptions.sdkHome` is the SDK
555
- home, from which the harness derives the denied roots of the exec it builds.
556
- `ExecLanguage`, `ExecRoute`, `ExecShell` and the exec adapter and runner types
557
- live in `lib/contract/exec.ts` (export `./lib/contract/exec.ts`); the root
558
- exports the three. The `./docx` export is gone; `./office` keeps its functions.
559
- (#269) For qvac-core: `desktop/electron/assistant-sidecar.mjs` and the mobile
560
- worklet pass instances, `new Weather({ read: ['weather_lookup'] })`,
561
- `new Image({ model, clamps, read: ['generate_image'] })`; the sidecar drops
562
- `createExecTool`, `createPython` and the obsidian route from `tools` and passes
563
- `exec: true` with `sdkHome: sdkStorage.home`; `extractDocxText` callers move to
564
- `@qvac/harness/office`; the three `@qvac/harness` pins move to 0.9.0, the release after 0.8.5. The
565
- `./lib` keys stay this release; `./lib/tools/*` is gone (#273).
566
-
647
+ `TranslationPlugin.<name>`, and `translationPlanFor` is
648
+ `TranslationPlugin.planFor`. `TranslationPlan` and `TranslationRefusal` come
649
+ from `@qvac/harness/plugins/translation`. (#275)
650
+ - **Breaking:** a tool that reaches the network declares `egress(args)`.
651
+ `HookPipeline.EgressGuardHook` checks every tool that declares it and none
652
+ that does not, so a host tool named `http_request`, `web_fetch` or
653
+ `mcp_call` without it loses the pre-call check. The v0.7.3 guarded-fetch
654
+ exports have no public path; a plugin tool uses `ctx.fetch`. (#172, #224)
655
+ - **Breaking:** nothing a run does can load a new native addon: the sidecar
656
+ seals addon loading once the harness is ready. A plugin or tool that imports
657
+ a native addon lazily declares it in `HarnessPlugin.addons` or
658
+ `ToolDefinition.addons`. A `QVAC_PYODIDE_WORKER_ENTRY` must exit when
659
+ `workerData.preload` is true. See the
660
+ [decision record](docs/decisions/2026-10-02-the-sidecar-seals-addon-loading-after-boot.md).
661
+ (#177)
662
+ - **Breaking:** `SandboxWorkspace` gains `start(command, { cwd? })`, returning a
663
+ `SandboxJob`, which a custom `SandboxService` must implement.
664
+ `SeatbeltSandbox` declares `provides: ['sandbox']`, so it fails beside
665
+ another sandbox provider. (#320, #329)
666
+ - **Breaking:** the run log records every model request as a `request` record.
667
+ A host run-log codec that allows only known record types must accept
668
+ `request`; `EngineOperationPort` gains `recordRequest`. (#235)
567
669
  - **Breaking:** `CompletionEvent` gains `input-rejected`, and `HookPhase` and
568
- `HookRejection.phase` each gain `promptSubmit`, `toolFailure`, `stop` and
569
- `preFold`; a host that switches on them exhaustively must handle the new
570
- members. Every steer and follow-up now passes `promptSubmit` hooks. The hrpc
571
- `completion-event-type` enum now has `input-rejected`: before, a harness
572
- served over hrpc died when it emitted one. An older host decodes it with a
573
- `null` type. (#260, #264)
574
-
575
- - **Breaking:** `PreToolCallPayload.effect` and `.resource` are now required,
576
- so a pre-tool hook can single out writes and the resource a call touches. A
577
- host that calls `HookPipeline#runPreToolFold` itself passes both; a hook that
578
- only reads the payload is unaffected. The `hook:runPreToolFold` operation now
579
- records both in its arguments, so a run paused after a pre-tool hook ran
580
- before the upgrade does not resume (`Operation identity mismatch`). (#183)
581
- - `exec` refuses a `language` that no composed language claims, other than
582
- `shell`, instead of running `command` as a shell line. `python` keeps its own
583
- message. The language a call names reads it first, so Python's source
584
- inference no longer takes a call named for another language. (#232)
585
- - Long tool output keeps its start and end. Exec, python, the sandbox VM and
586
- obsidian keep the first and last `maxOutputChars` of each stream, joined by
587
- a marker that counts the chars dropped (`…[N chars omitted]…`), so errors
588
- and tracebacks at the end survive. The output no longer ends in
589
- `… [truncated]`, and the marker counts against `maxOutputChars`; a host that
590
- matched the old suffix follows. A result whose payload is over 65536 chars
591
- is trimmed the same way when it is rendered for the model, each long string
592
- field cut so the payload still parses; the `tool-result` event and the run
593
- log keep the full result, and the `skill` tool is exempt. (#180)
594
-
595
- - **Breaking:** a plugin can own a skill's readiness. `PluginSetup.skills`
596
- takes `SkillReadiness` entries: `skill`, `state(ctx)`, and optional
597
- `probeVersions` and `deviceSharedKeys`. The registry collects them into
598
- `StartedPlugins.skills`, and two plugins claiming one skill fail. `state()`
599
- runs after the platform, stub and model gates and before the bin gate; a
600
- state settles the skill, `null` defers. The obsidian readiness, the
601
- version-probe exclusion, the device-shared `obsidian_vault_path` and the
602
- vault-mode note moved from the core into `ObsidianRoute#plugin`, and
603
- `ObsidianRoute` takes `probe` for its filesystem checks.
604
- `SkillStateInputs.obsidianProbe` and the `credentialStore` option of
605
- `createSkillTool` are gone, and the core shares no credential key by default. `versionProbeSkills` takes
606
- `{ installedTools, platform, readiness }` after the catalog. The bundled
607
- sidecar wires the plugin; its hook joins the hook manifest, so a run paused
608
- before the upgrade does not resume. **Upgrade:** a host
609
- that builds its own tools, such as qvac-app, passes the route's plugin too:
610
- `const obsidian = new ObsidianRoute({ credentialStore })`, then
611
- `routes: [obsidian]` and `plugins: [{ plugin: obsidian.plugin }]`. A host that
612
- ships the obsidian skill without the plugin gets the generic gates: the vault
613
- path is per agent and no longer stands in for the bin, the load has no vault
614
- note, and `skills()` probes `obsidian version`, which opens the desktop app.
615
- (#227)
616
-
617
- - **Breaking:** every module's entry exports one class as its API, plus the
618
- types it takes and returns. (#217, #216, #218 to #221) For qvac-core:
619
- - The root no longer exports `completion()`: call
620
- `CompletionEngine.run(sdk, args, options)`, which takes the same arguments
621
- and defaults. `new CompletionEngine(sdk, options).run(args)` is the
622
- instance form. The `./lib/capabilities/completion.ts` subpath is gone: its
623
- `imageSettingsFrom`, `skillInContext`, `unreadySkillState`, `toSdkTool`,
624
- `loadedSkillsFrom`, `skillLoadedTurn` and `CONTEXT_OVERFLOW_MESSAGE` are
625
- root exports, and its types (`CompletionArgs`, `CompletionRun`,
626
- `CompletionSkillEntry` and the contract types) are root types.
627
- `trustedSourcesFrom` is no longer exported.
628
- - `defaultHooks()` is `HookPipeline.defaults()`, and `EgressGuardHook` and
629
- `SkillCatalogGuardHook` are `HookPipeline.EgressGuardHook` and
630
- `HookPipeline.SkillCatalogGuardHook`. The root exports `HookPipeline`. The
631
- hook types live in the contract, so the root also exports the hook payload
632
- types.
633
- - The contract type `Agent` is `AgentConfig`. `./agent` exports the `Agent`
634
- class: `resolveAgent`, `agentPolicy`, `parseToolGrant`, `enabledTools`,
635
- `permittedTools`, `collectToolGrants` and `skillIsActive` are its statics
636
- `resolve`, `policy` and the same names, and the tool-name constants and
637
- `NETWORK_TOOLSETS` are statics too. `new Agent(config, ports)` binds one
638
- agent.
639
- - `./plugins` exports the `PluginRegistry` class in place of
640
- `createPluginRegistry(entries, options)`: call
641
- `new PluginRegistry(entries, options)`. Its checks, messages and lifecycle
642
- are unchanged.
643
- - `./run-log` and `./run-log-inspect` both export the `RunLog` class.
644
- `createEngineBoot`, `buildEngineBoot`, `validateEngineBoot`,
645
- `applyEngineStep`, `contextFromBoot` and `requestFromBoot` are its statics,
646
- `RUN_LOG_VERSION` and `RUN_LOG_PROTOCOL_VERSION` are `RunLog.VERSION` and
647
- `RunLog.PROTOCOL_VERSION`, and `inspectRun` and `renderRunLogHtml` are
648
- `RunLog.inspect` and `RunLog.renderHtml`. `./run-log` now loads XState.
649
- It no longer exports the `Operation` and `RunBudget` types; the root
650
- still exports `Operation` and `RunBudget`.
651
- - `lib/machine` exports `CompletionMachine` and no longer re-exports the run
652
- log. `createCompletionMachine`, `completionMachineDefinition`,
653
- `emptyCompletionContext` and `MACHINE_VERSION` are `create`, `definition`,
654
- `emptyContext` and `VERSION`. `runEngine` moved to the completion engine,
655
- and `stableStringify`, `raceDrain` and `didDrainTimeOut` to `lib/helpers`.
656
- - The machine entry exports only `CompletionMachine` (`VERSION`, `create`,
657
- `definition`, `emptyContext`, `transitionName`) and the types those take
658
- and return. It no longer exports the error classes, `tagError`,
659
- `rehydrateError`, the failure-result helpers or the stage payload types.
660
- `AbortedError` stays on `./race-abort`. The shared run types (`Message`,
661
- `Operation`, `ToolExecutionOutcome`, ...) moved to the contract, so the
662
- root now also exports `Operation`, `RunOutcome`, `HistorySplice`,
663
- `CompletionHistoryEntry`, `FailureResultReference`, `TrustedOrigin`,
664
- `TrustedSource` and `TrustedSourceFacts`. The `./lib/tool-call-display.ts`
665
- subpath is gone; `ToolCallDisplay` and `ToolExecutionOutcome` come from
666
- the root. (#229)
667
- - `@qvac/sdk` and `@qvac/inference` 0.20.1. Every `llamacpp-completion` load
668
- now sends `system_prompt: ''`, so the SDK no longer seeds
669
- `'You are a helpful assistant.'` in front of a history with no system
670
- message. **For qvac-core:** no API break, but every completion modelId
671
- changes once, so each chat cold primes once after the upgrade. `fit` is left
672
- out: a 2B load with `fit: true` showed no fitting, and the SDK sends it as
673
- `'true'` where fabric's `--fit` takes `on` or `off`. (#194)
674
- - `@qvac/sdk` and `@qvac/inference` 0.21.0, with `@qvac/llm-llamacpp` 0.55.0,
675
- and the addons the plugins load directly at the SDK's peer ranges
676
- (`@qvac/asr-ggml` 0.7, `@qvac/tts-ggml` 0.10, `@qvac/audiogen-ggml` 0.5,
677
- `@qvac/diffusion-cpp` 0.26, `@qvac/embed-llamacpp` 0.43.0,
678
- `@qvac/translation-nmtcpp` 0.18.0). The SDK fits models itself, so
679
- `@qvac/model-fit` leaves the dependencies, `SdkLoader.addons` and
680
- `NATIVE_ADDON_PACKAGES`. `@qvac/fabric` ships its prebuilds as per-platform
681
- packages (`@qvac/fabric-<os>-<cpu>`); `collectRuntimeClosure` now follows a
682
- dependency's `#host-addon` package as well as a seed's, and a host that
683
- packages the addons exempts those names from any install age gate. The fit
684
- check asks the SDK's `loadModel`-shaped `assessModelFit` input with the
685
- model's source, and an embedding model is assessed as one. (#302)
686
- - **Breaking:** the chat-file staging and output policy the office, pdf and
687
- Python paths share move from `./plugins/python` into the core:
688
- `Tools.stageInputs` and the `ExecInput` type come from `@qvac/harness/tools`,
689
- and `./plugins/python` no longer exports them. `ExecLanguage.validate` takes
690
- an `ExecValidateScope`, which adds the round's `toolNames`, and
691
- `ResidentPoolSpec.modelConfigFor` lays a model's own config over the pool's,
692
- as the speech plugin does for Supertonic's steps. `wording.fileDelivered`
693
- replaces the nudge after a round that attached a file, and a run that wraps
694
- up one round after a delivered file ends with the `delivered` outcome.
695
- - The `pdf` tool declares `bare-pdfium` in its `addons`, so a sealed sidecar has
696
- it loaded before the first PDF call, and `NATIVE_ADDON_PACKAGES` names it.
697
- - **Breaking:** the sidecar seals native addon loading once the harness is ready
698
- (`Bare.Addon.seal()` through `#addon-seal`, a no-op on Node), so nothing a run
699
- does can load a new native addon. Whatever loads one declares it:
700
- `HarnessPlugin.addons`, `ToolDefinition.addons` and `SdkLoader.addons`, each a
701
- name and a literal `import()`. On Bare the harness loads them all as it opens,
702
- each plugin's before its `setup`. A failure rejects `ready()` naming the
703
- plugin or tool and the addon, and rolls the started plugins back. The build
704
- fails on a native addon `NATIVE_ADDON_PACKAGES` does not name. **Upgrade:** a
705
- host-written plugin or tool that imports a native addon lazily declares it in
706
- `addons`, or it fails under the seal. An entry set in
707
- `QVAC_PYODIDE_WORKER_ENTRY` must exit when `workerData.preload` is true, as
708
- the real entry does, or `ready()` waits on it. Opening a harness on Bare now loads the
709
- SDK's addons up front, not on the first call. (#177)
710
- - Plugin service registration rejects `undefined` and names reserved by the
711
- context, such as `get`, `provide` and `onDispose`. Rename conflicting services
712
- and return an initialized value. A failed registry cannot restart; construct
713
- another harness to retry. `HarnessPlugin` entries are the only plugin shape;
714
- the lower-level runtime is not exported. Model unload callbacks, tool grants
715
- and wire APIs keep their contracts. No qvac-core migration is
716
- needed for this framework integration. (#171)
717
- - **Breaking:** a tool declares that it reaches the network with
718
- `egress(args)`, which returns the URL a call targets, or `null` when that is
719
- not known before the call. `HookPipeline.EgressGuardHook` now checks every
720
- tool that declares it, whatever its name, and no tool that does not:
721
- `http_request`, `web_fetch` and `mcp_call` declare it. A plugin tool that
722
- declares `egress` gets `ctx.fetch`, a guarded fetch that refuses private
723
- hosts on every hop, stops with the call and refuses everything in sandbox
724
- mode. The v0.7.3 names `createGuardedFetch`, `GuardedResponse`,
725
- `GuardedResponseInit`, `GuardedFetchOptions`, `MAX_RESPONSE_BYTES`,
726
- `ConnectPolicy`, `setConnectPolicy` and `isGuardedFetch` from
727
- `./lib/tools/exec/adapters/python/guarded-fetch.ts` have no public path; a
728
- plugin tool uses `ctx.fetch`. **Upgrade:** a host tool that reaches the
729
- network declares `egress(args)`; one named `http_request`, `web_fetch` or
730
- `mcp_call` without it loses the pre-call check. `createHttpRequestTool`,
731
- `createWebFetchTool` and `createMcpCallTool` declare it, so qvac-core and
732
- qvac-app's mobile worklet are unchanged. (#172)
733
-
734
- - **Breaking:** speech is a plugin. Transcription, text-to-speech and the
735
- `bare-ffmpeg` audio decoding moved from `lib/` to `plugins/speech/`,
736
- exported as `@qvac/harness/plugins/speech` (`speechPlugin`). A `Harness`
737
- built without it rejects `transcribe`, `speak`, `speakStream` and a
738
- `loadModel` or `unloadModel` of a voice model with `speech needs the speech plugin`, before
739
- loading anything. The bundled sidecar passes the plugin, so a host that uses
740
- `spawnHarness` (qvac-core) is unchanged. **Upgrade:** a host that constructs
741
- `Harness` itself, such as qvac-app's `mobile/worker/harness-worklet.mjs`,
742
- adds `plugins: [{ plugin: speechPlugin }]` with
743
- `import { speechPlugin } from '@qvac/harness/plugins/speech'`. `SpeechService`, `SpeakResult` and the voice context types
744
- are exported from `index.ts`, and `SpeakResult` from
745
- `./lib/contract-types.ts`. (#173)
746
- - **Breaking:** `weather_lookup` is a plugin. It moved from
747
- `lib/tools/weather-lookup.ts` to `plugins/weather/`, exported as
748
- `@qvac/harness/plugins/weather` (`weatherPlugin`, and the tool as
749
- `weatherLookupTool`); `createWeatherLookupTool` and its `fetch` and
750
- `resolveHost` options are gone. The tool declares `egress` and fetches with
751
- the guarded `ctx.fetch`; a refused fetch is a plain `{ error }` with no
752
- `transport` code, and the 400 KB body cap is dropped. Granted read, it keeps
753
- `autoApprove`, so its schema still has no `intent` argument. The bundled
754
- sidecar passes the plugin, so `spawnHarness` hosts are unchanged. **Upgrade:** a host that constructs `Harness` itself, such as
755
- qvac-app's mobile worklet, adds
756
- `{ plugin: weatherPlugin, read: ['weather_lookup'] }` to `plugins` with
757
- `import { weatherPlugin } from '@qvac/harness/plugins/weather'`. Without it
758
- there is no `weather_lookup` and the bundled `weather` skill is unsupported.
759
- (#176)
760
- - **Breaking:** Obsidian is an exec route in `plugins/obsidian/`, exported as
761
- `@qvac/harness/plugins/obsidian` (`ObsidianRoute`). The modules under
762
- `lib/tools/exec/obsidian/` leave the package, and
763
- `ExecToolOptions.credentialStore` is gone: the route takes the store.
764
- `createExecTool({ routes })` takes `ExecRoute`s; the first route that claims a
765
- shell command runs it instead of the shell, after the shell checks. Route
766
- names fold into exec's `policyVersion`, so a run paused on an exec call does
767
- not resume. The bundled sidecar passes the route, so `spawnHarness` hosts are
768
- unchanged. **Upgrade:** a host that builds `exec` itself, such as qvac-app's
769
- mobile worklet, passes
770
- `routes: [new ObsidianRoute({ credentialStore })]` with
771
- `import { ObsidianRoute } from '@qvac/harness/plugins/obsidian'`. Without it
772
- `obsidian …` goes to the shell (on a phone, instead of the desktop-agent
773
- guidance), and the obsidian skill should be left out, since its readiness
774
- still reads `ready` when a vault path is set (#227). (#223)
775
- - **Breaking:** image and music generation are plugins. `generate_image`,
776
- `edit_image`, `generate_music`, their runtimes, the SDK diffusion and
777
- audiogen plugin registration, and the `bare-media` and `bare-image-resample`
778
- imports moved from `lib/` to `plugins/image/` and `plugins/music/`, exported
779
- as `@qvac/harness/plugins/image` (`imagePlugin`) and
780
- `@qvac/harness/plugins/music` (`musicPlugin`). `HarnessOptions` loses
781
- `imageModel`, `imageClamps`, `musicModel` and `musicClamps`, and the root
782
- loses `ImageModelOptions`, `MusicModelOptions`, `settingsDimension` and
783
- `settingsSteps`; the last two are exported from `@qvac/harness/plugins/image`.
784
- The three tools sit in two new toolsets, `image` and `music`, at the end of
785
- `TOOLSETS`, so an agent can switch each off. A plugin may now `need` the
786
- core's `models` service (`ModelHost`) and return `unload()` and
787
- `unloadIdle()`, which the harness calls on suspend, close, idle unload and
788
- before a chat model loads. `spawnHarness` and `harnessChild` keep their
789
- options and the bundled sidecar passes both plugins, granting
790
- `generate_image` and `generate_music` read. **Upgrade:** a host that
791
- constructs `Harness` itself passes
792
- `{ plugin: imagePlugin, config: { model, clamps }, read: ['generate_image'] }`
793
- and `{ plugin: musicPlugin, config: { model: musicModelSet(choice), clamps }, read: ['generate_music'] }`;
794
- music takes resolved stages, not a choice name. qvac-core's TUI imports
795
- `settingsDimension` from `@qvac/harness/plugins/image` instead of
796
- `@qvac/harness/lib/tools/generate-image.ts`, and adds `TOOLSET_HINTS` for
797
- `image` and `music`. (#175)
670
+ `HookRejection.phase` gain `promptSubmit`, `toolFailure`, `stop` and
671
+ `preFold`; exhaustive switches handle them. Every steer and follow-up passes
672
+ the `promptSubmit` hooks. (#260, #264)
673
+ - **Breaking:** `PreToolCallPayload.effect` and `.resource` are required; a
674
+ host that calls `HookPipeline#runPreToolFold` itself passes both. (#183)
675
+ - **Breaking:** a plugin can own a skill's readiness through
676
+ `PluginSetup.skills` (`SkillReadiness`), and the obsidian readiness moved
677
+ into `ObsidianRoute`. `SkillStateInputs.obsidianProbe` and the
678
+ `credentialStore` option of `createSkillTool` are gone, the core shares no
679
+ credential key by default, and `versionProbeSkills` takes
680
+ `{ installedTools, platform, readiness }`. (#227)
681
+ - **Breaking:** `Tools.stageInputs` and `ExecInput` come from
682
+ `@qvac/harness/tools`, no longer `./plugins/python`, and
683
+ `ExecLanguage.validate` takes an `ExecValidateScope`. (#317)
798
684
  - **Breaking:** `MAX_TOOL_ROUNDS`, `TOOL_CONTINUATION_NUDGE`,
799
- `TOOL_DENIED_MESSAGE` and `TOOL_CUT_OFF_MESSAGE` are no longer exported from
800
- `lib/machine`. All four are defaults now, exported from
801
- `lib/capabilities/tool-turns.ts`.
802
- `toolDeniedResult` takes its message, `contextCandidates` and
803
- `lastFailedToolAnswer` take the run's nudge, and
685
+ `TOOL_DENIED_MESSAGE` and `TOOL_CUT_OFF_MESSAGE` come from
686
+ `./lib/capabilities/tool-turns.ts`, not `lib/machine`, and
804
687
  `CompletionMachine.emptyContext` requires a `policy`. (#159)
805
- - **Breaking:** `skillPreloadMessage` is exported from
806
- `./lib/capabilities/tool-turns.ts`, no longer from
807
- `./lib/tools/skills/mention.ts`. (#166)
808
- - **Breaking:** `metrics.durationMs`, and `stats.durationMs` on the `runEnd`
809
- hook, are the run's wall time, as they already were for a capability
810
- invoke. They were an estimate of decode time. `promptTokensPerSecond` is
811
- weighted by every round's prompt tokens instead of being the first round's.
812
- (#195)
813
- - **Breaking:** `MACHINE_VERSION` and `RUN_LOG_VERSION` are both 1, and stay
814
- at 1 until 1.0.0 ships. A run saved with `1.0.0-rc.0` or `1.0.0-rc.1` does
815
- not resume, and `./run-log-inspect` no longer reads v4 or rc logs. (#205)
816
- - **Breaking:** the completion graph no longer has skill states. A turn's
817
- skill preload runs as a generic prepare step (`prepareChecking` and
818
- `prepareRunning`, actors `inspectPrepare` and `runPrepare`), and a skill call
819
- in a round runs in `executing`, so `tools.loadingSkill` is gone. Context
820
- `skills` is now `activated: string[]` and `skillPreload` is
821
- `prepareStep: { id, tool, args, facts? }`. `lib/machine` no longer exports
822
- `SkillLoadOutput`, `SkillPreloadState`, `PreloadInspectionOutput`,
823
- `SkillReadyPayload` or `SkillFailedPayload`; it exports `PrepareStep`,
824
- `PrepareStepProposal`, `PrepareInspectionOutput`, `PrepareRunOutput`,
825
- `PrepareResult` and `PrepareFailure`. `PreparingOutput` carries `step`,
826
- `InspectingOutput` only `call`, `execution` and `rejection`, and
827
- `ToolExecutionSnapshot` has `origin` in place of `kind: 'skill'` and
828
- `skillName`. Events, call ids (`preload-<name>`) and their order are
829
- unchanged. A run saved paused in a removed state does not resume. (#170)
830
- - A response cut off by the length limit no longer runs its tool calls. Each
831
- call gets a `tool-call` and then an error `tool-result` carrying the run's
832
- `wording.toolCutOff` text (#159), which asks for a shorter re-issue. Nothing
833
- runs, no approval is asked for, and the next round starts. A complete re-send
834
- in a later round still runs. (#155)
688
+ - **Breaking:** the completion graph has no skill states: a skill preload runs
689
+ as a generic prepare step. Context `skills` is `activated`, `skillPreload` is
690
+ `prepareStep`, `tools.loadingSkill` is gone, and `ToolExecutionSnapshot` has
691
+ `origin` in place of `kind: 'skill'` and `skillName`. (#170)
692
+ - **Breaking:** `resolveScriptRun` returns `{ args, trusted: false }` for a
693
+ call that is not a script run, and is no longer exported. (#163, #174)
694
+ - **Breaking:** `metrics.durationMs` and the `runEnd` hook's `stats.durationMs`
695
+ are the run's wall time, not decode time, and `promptTokensPerSecond` is
696
+ weighted over every round. (#195)
697
+ - **Breaking:** `CompletionMachine.VERSION` and `RunLog.VERSION` are 1 until
698
+ 1.0.0 ships. A run saved with `1.0.0-rc.0` or `1.0.0-rc.1` does not resume,
699
+ and `./run-log-inspect` no longer reads v4 or rc logs. (#205)
700
+ - **Breaking:** a run paused before the upgrade does not resume when its
701
+ policy or hook identity changed: exec calls (#174, #178, #223), `delegate`
702
+ calls with external targets (#319, #328), `web_search` calls (#276), runs
703
+ past a pre-tool hook (#183) and runs under the obsidian hook (#227).
704
+ - **Breaking:** the contract types match `Harness`. (#353)
705
+ - `ChatMessage.attachments` was `{ path: string }[] | null` and is now
706
+ `{ path: string }[]`; omit it instead of sending `null`.
707
+ - A contract context's `signal` was a structural
708
+ `{ aborted?, addEventListener?, removeEventListener? }` and is now
709
+ `bare-abort-controller`'s `AbortSignal`. A host that passes a global
710
+ `AbortSignal` types its input as `HostContext<CompletionContext>` (the
711
+ signal alone is `HostSignal`); `RemoteHarness` and `HarnessClient` take a
712
+ `HostContext`.
713
+ - `HarnessContract.on`/`off` took `'model' | 'status'` with
714
+ `(...args: never[]) => void` and now take `'model'` with
715
+ `(state: ModelState) => void`; the `'status'` event is gone.
716
+ - `bare-process` moves to 4.5.1, which adds the native addon `bare-posix`.
717
+ (#178)
718
+ - The plugins' addons follow the SDK's peer ranges, and
719
+ `collectRuntimeClosure` follows the per-platform `@qvac/fabric-<os>-<cpu>`
720
+ packages. (#302)
721
+ - A chat with no system message no longer gets
722
+ `'You are a helpful assistant.'`; every completion modelId changes once.
723
+ (#194)
724
+ - Each chat's first turn after the upgrade misses the prefix cache once: tool
725
+ descriptions spell out nested fields (#157), the exec schema reorders with
726
+ Python (#174), and `web_search` and `mcp_call` move after `exec` (#276,
727
+ #277).
728
+ - `tools()` waits for `ready()`, and `toolNames` and `diagnostics()` list
729
+ plugin tools only after it. Plugin service registration rejects `undefined`
730
+ and names reserved by the context, and `HarnessPlugin` is the only plugin
731
+ shape. (#171)
732
+ - Long tool output keeps its first and last `maxOutputChars`, joined by a
733
+ marker counting what was dropped, instead of ending in `… [truncated]`.
734
+ (#180)
735
+ - `exec` refuses a `language` that no composed language claims, instead of
736
+ running it as a shell line. (#232)
737
+ - A translation pack is freed on the idle sweeps instead of staying resident.
738
+ (#275)
835
739
  - Arg repair converts a string argument to the schema's scalar type when the
836
- conversion is lossless: a JSON number that does not underflow, a whole one
837
- only within the safe-integer range (`"1e20"` stays a string), `true`/`false`
838
- in any case, `"null"` where null is allowed, and an enum value matched
839
- ignoring case. Nested fields count too. An optional field sent as `"null"`
840
- is dropped only when its schema allows neither string nor null: an optional
841
- string field keeps `"null"`, and a nullable one becomes `null`. A tool may now
842
- receive `3` where it used to get `"3"`. (#156)
843
- - A tool description spells out a parameter's nested and defaulted fields
844
- (`Each item: {…}`), which the SDK strips from the schema. The prompt bytes of
845
- `read_files`, `create_documents`, `edit_documents`, `grep` and `edit_image`
846
- change, so each chat's first turn after the upgrade misses the prefix cache
847
- once. A tool with only flat parameters is unchanged. (#157)
848
- - exec labels a Pyodide run of inline Python, source pasted into `script`
849
- included, as `python[ · network: …]: …` in the approval; a bundled script
850
- keeps `python script <skill>/<script>`. `command` together with `script` is
851
- rejected. Pasted source classifies like the same source in `command`. (#163)
852
- - **Breaking:** `resolveScriptRun` returns `{ args, trusted: false }` instead
853
- of `null` for a call that is not a script run (#163). It moved out of
854
- `./lib/tools/exec.ts` into the python plugin and is no longer exported
855
- (#174).
856
- - **Breaking:** `createExecTool()` runs shell commands only unless it is given
857
- `languages`. Without Python its schema has no `language`, `packages`,
858
- `inputs`, `outputs`, `script`, `skill` or `scriptArgs`, and a
859
- `language: "python"`, interpreter or pip call is refused with a message that
860
- says no call runs it. Without a language, `packages`, `inputs`, `outputs` or
861
- `script` on a shell call is refused too, as before. `disablePyodide`, `loadPyodide` and `pythonNetwork` are
862
- gone: pass `loadPyodide` and `network` to `createPython()`. The harness no
863
- longer closes the python worker itself; the plugin's teardown does. The
864
- modules under `./lib/tools/exec/adapters/python/` moved to
865
- `plugins/python/` and are no longer exported one by one; take `stageInputs`
866
- from `./plugins/python`. With Python, the exec schema lists
867
- `script`, `skill` and `scriptArgs` before `workdir`, so each chat's first
868
- turn after the upgrade misses the prefix cache once, and a run paused on an
869
- exec call does not resume. (#174)
870
- - A round whose only tool calls the SDK could not parse or validate
871
- (`final.toolErrors`) gets a re-ask on its first stall: the failed markup as
872
- the assistant turn, a `call-malformed` tool turn with each error's code and
873
- message, then the continuation nudge. A round cut off at the length limit
874
- gets `wording.toolCutOff` in the tool turn instead. Once that re-ask is spent
875
- or no round is left, the round answers in prose as before, or takes the
876
- narrated re-ask when its prose narrates a call. The re-ask has its own
877
- one-retry budget, separate from the narrated re-ask, and a round that runs a
878
- call resets it. The run log keeps `toolErrors` with `raw` and `message`
879
- redacted, and redacts the malformed assistant turn and the `call-malformed`
880
- tool turn wholesale. Nothing changes on the wire or in `RunPolicy`. (#190)
881
- - The re-ask after a round that narrated a call, and the re-ask after a
882
- malformed call, demand a call: they send `tool_choice: 'required'` and
883
- `reasoning_budget: 0` over the session's params. A malformed round cut off at
884
- `length` is re-asked unforced. A mute retry of a re-ask is forced too, even
885
- after a cut-off. A run with no tools or with a response format is never
886
- forced. Every other round, the wrap-up included, keeps the session's params.
887
- When the addon refuses the forced call, the round runs again unforced on a
888
- fresh KV session. A grammar fault still falls back to
889
- `tool_choice: 'none'`. Each forced round resends the tool block into the
890
- chat's cache; #212 measures the cost. `LlmGenerationParams.tool_choice` now
891
- admits `'required'`. **Upgrade:** do not set it for a whole run, in process
892
- or in the wire's `generationParams`. The wrap-up sends no tools, and the SDK
893
- rejects `required` with none, so the run fails. qvac-core sends no
894
- `tool_choice` and is unchanged. (#191, #213)
740
+ conversion is lossless, so a tool may receive `3` for `"3"`. (#156)
741
+ - The exec approval labels inline Python as `python[ · network: …]: …`, and
742
+ `command` with `script` is rejected. (#163)
743
+ - A round whose only tool calls were malformed gets one re-ask carrying each
744
+ error. (#190)
745
+ - The narrated and malformed-call re-asks force a call with
746
+ `tool_choice: 'required'`. `LlmGenerationParams.tool_choice` admits
747
+ `'required'`; do not set it for a whole run, or the wrap-up fails. Narrated
748
+ intent counts in the last two sentences of a reply's last paragraph. (#191,
749
+ #213, #455)
750
+ - Reasoning that is on is capped at 8192 tokens a round instead of running
751
+ unbounded: the presets and `agent.reasoning: 'enabled'` send that cap where
752
+ they sent `-1`. `LlmGenerationParams.reasoning_budget` takes `-1`, `0` or a
753
+ positive token cap, and a host's `generationParams` still wins, so `-1` lifts
754
+ the cap. `'inherit'` still sends nothing. (#440)
755
+ - The `pdf` tool declares `bare-pdfium` in its `addons`. (#317)
756
+ - **Breaking for hosts:** a skill named with `@` or in prose reaches the model
757
+ as it did in 0.8.7 (#374): the user's turn as typed, then a `skill` call
758
+ (`preload-<name>`), its body as the result and the continuation nudge, not
759
+ written into the user's message. The run stays on the chat's KV cache key, so
760
+ its rounds and the turn after it read the cached prefix, and the preload no
761
+ longer opts its run out of the cache. The host must replay each run's turns as
762
+ it sent them (`@qvac/core` does from 0.7.0, tetherto/qvac-core#338): a host
763
+ that collapses a run to its request and answer leaves the cache's message
764
+ count stale, and the next turn's whole history is appended to the cache
765
+ again. The load is reported on every mention, not once per chat, so a replay
766
+ holds the turns the run sent; an edit to the skill reaches the chat on its
767
+ next mention. A host that groups a run's events by `round` still puts the
768
+ preload with round 0's calls: the harness renders it as its own round first.
769
+ A skill that fails to load is noted in the user's turn, sends no call, and
770
+ that run is not cached. (#511)
771
+
772
+ ### Removed
773
+
774
+ - **Breaking:** `harnessLogEnabled` from `./lib/log.ts`: use
775
+ `HarnessLog.enabled(level)` or `HarnessLog.level()`. (#471, #506, #532)
776
+ - **Breaking:** `./lib/log.ts` exports the `HarnessLog` class in place of the
777
+ free functions it had in 1.0.0-rc.2 and rc.3: `setHarnessLog`,
778
+ `setHarnessLogSink`, `hlog` and `hdiag` are `HarnessLog.enable`,
779
+ `HarnessLog.setSink`, `HarnessLog.info` and `HarnessLog.diag`. The root
780
+ names keep working. The `HarnessLog` type, an interface for the
781
+ `harnessLog` object since 0.8.10, now names the class: annotate a value with
782
+ `typeof HarnessLog`. (#532)
783
+
784
+ ```js
785
+ // before
786
+ import { hlog, setHarnessLogSink } from '@qvac/harness/lib/log.ts'
787
+ setHarnessLogSink(sink)
788
+ hlog('open')
789
+ // after
790
+ import { HarnessLog } from '@qvac/harness/lib/log.ts'
791
+ HarnessLog.setSink(sink)
792
+ HarnessLog.info('open')
793
+ ```
794
+
795
+ - **Breaking:** `Tools.product` no longer offers `mcp_call` or the skill
796
+ catalog's mcp operations (`notion_create_page`, `notion_insert_content`).
797
+ Use `new McpPlugin({ generic: true })` with the same `skillCatalog` and
798
+ `credentialStore`, and `read: ['mcp_call']`. (#277)
799
+ - **Breaking:** the `./lib/tools/*` wildcard export and the tool factories
800
+ `createHttpRequestTool`, `createWebFetchTool`, `createSkillTool`,
801
+ `createMcpCallTool` and `createWebSearchTool` are gone. Use `Tools.product`
802
+ (with `skillsDir` for `skill`), `McpPlugin` and `WebSearchPlugin`.
803
+ `credentialSlots` comes from `@qvac/harness/skill-manifest`,
804
+ `ensureBundledSkillsDir` is `Tools.bundledSkillsDir()`, and
805
+ `isDeviceSharedCredentialKey` has no replacement (plugins declare
806
+ `SkillReadiness.deviceSharedKeys`). Only `./lib/tools/exec.ts`,
807
+ `./lib/tools/toolsets.ts`, `./lib/tools/skills/index.ts`, `mention.ts` and
808
+ `mention-name.ts` keep their keys. (#273, #283)
809
+ - **Breaking:** `./plugins` no longer exports the contract types: import
810
+ `AddonLoaders`, `ExecLanguage`, `ExecRoute` and `ExecShell` from the root.
811
+ (#284)
812
+ - **Breaking:** the `./docx` export is gone; read a `.docx` with
813
+ `extractOfficeText` from `@qvac/harness/office`. (#269)
814
+ - **Breaking:** `lib/team`, `Team`, `TeamConfig`, `TeamRequest`, `TeamHost` and
815
+ `TeamEvent` are gone; pass `agents` to `harness.completion()`. (#233)
816
+ - **Breaking:** `rag_search`, `ragSearch` (on `CompletionArgs`,
817
+ `CompletionContext` and `ToolExecuteContext`), `RagSearchFn`,
818
+ `RagSearchResult` and `./lib/tools/rag-search.ts` are gone; knowledge reaches
819
+ the model by injection. (#162)
820
+ - **Breaking:** the module-level `harnessHooks` array is gone; pass
821
+ `new Harness({ hooks: [...HookPipeline.defaults(), mine] })`. (#158)
822
+ - **Breaking:** `./lib/capabilities/tool-selection.ts` and `tool-names.ts` are
823
+ `@qvac/harness/agent` (`Agent` statics). `isSelected`, `skillsAreSelected`,
824
+ `MCP_CALL_TOOL_NAME`, `ToolGrant`, `ToolGrantSource`, `ToolGrants`,
825
+ `SelectableTool` and `ToolGateInputs` are no longer exported. (#165, #206)
826
+ - **Breaking:** `./lib/tools/model-args.ts` (`unquoteArg`) is gone, with no
827
+ replacement. (#166)
828
+ - The sidecar bundle no longer ships `@qvac/ocr-ggml`, and ships only the
829
+ addons the bundle defers. (#226)
830
+ - **Breaking:** `skillPreloadMessage` and `withoutSkillLoadTurns`
831
+ (`lib/capabilities/tool-turns.ts`). Nothing writes a skill body into the
832
+ user's message any more, so no earlier load turn is dropped to keep the two
833
+ from contradicting each other. (#511)
834
+
835
+ ### Fixed
836
+
837
+ - A `pptx`, `docx` or `xlsx` call that builds a new file without `output` is
838
+ saved and attached instead of refused. The file is named after
839
+ `create.title` (`Climate Change` → `climate_change.docx`), or
840
+ `presentation.pptx`, `document.docx` or `workbook.xlsx` without one, the way
841
+ the `pdf` tool names a new PDF. A 2B model often left `output` off, and the
842
+ refusal sent it guessing attachment ids until the turn ended with no file.
843
+ A call whose ops only read (`read`, `sheets`, `paragraphStyles`, …) returns
844
+ their results and saves nothing, so it never attaches a blank file.
845
+ (QVAC-26944)
846
+ - A new Word document takes two more of a small model's slips instead of
847
+ refusing the whole call: a block position past the end of what the call has
848
+ built so far lands at the end, and `appendParagraphs` with an `at` inserts
849
+ the paragraphs there. An attached document keeps the strict checks. In any
850
+ `pptx`, `docx` or `xlsx` call, an `{ "op": "output", … }` entry is dropped
851
+ instead of refused, and a file name in it names the file unless `output` is
852
+ already set. (QVAC-26944)
853
+ - On Node, the Python plugin finds pyodide and the vendored wheels without
854
+ `import.meta.asset`: it resolves both with `import.meta.resolve`. (#535)
855
+ - A skill's tools are reselected on the turn the skill loads, so a run
856
+ resumed after a skill load no longer fails with
857
+ `Tools changed since this run paused`, and a resumed run hashes the system
858
+ turn it sent. (#516)
859
+ - On Linux and Windows, a `Harness` made in the host's own process no longer
860
+ relaunches the host's entry with `--gpu-probe`, which ran the host program a
861
+ second time and held each first model load for 5 seconds. Only an entry that
862
+ imports the probe hook first, as the sidecar entries do, is relaunched; any
863
+ other reads its memory budget from `nvidia-smi`, `rocm-smi`, sysfs or the
864
+ registry. (#539)
865
+ - An aborted run's metrics count the round the abort stopped: it is in
866
+ `rounds[]` with `stopReason: 'cancelled'`, and the metrics event's
867
+ `stopReason` is `cancelled`. See [Speed stats](docs/speed-stats.md). (#476,
868
+ #479)
869
+ - `serveHarness(ipc, new Harness(...))` compiles with no cast: a `Harness` is a
870
+ `HarnessContract`. `ChatMessage.attachments` no longer takes `null`, and the
871
+ contract's contexts take a bare `AbortSignal`; `RemoteHarness` and
872
+ `HarnessClient` still take any host signal (`HostSignal`). (#353)
873
+ - A reply that says it will act but asks the user something ends the turn,
874
+ instead of a forced round making up the answer. (#252, #272, #292)
875
+ - Under `SeatbeltSandbox`, a shell line can no longer read or write the app
876
+ storage root, and `SeatbeltSandbox.profile` takes
877
+ `(policy, { roots, denied, ancestors })`. (#293)
878
+ - Under `SeatbeltSandbox`, the `/usr/bin` xcrun shims (`git`, `python3`) no
879
+ longer run `xcodebuild` on every call when full Xcode is selected. Each call's
880
+ and each workspace's `TMPDIR` starts with a copy of the user's xcrun cache, and
881
+ a lookup that misses is saved to the copy only. (#467)
882
+ - A call to a skill name the turn does not have is refused with the names of
883
+ the skills shown that turn (`The skills are: weather, ...`), so a small model
884
+ loads one by its exact name instead of guessing. With no skills list shown,
885
+ the refusal is unchanged. (#473)
886
+ - On Node, reaching the SDK no longer fails with `Bare is not defined`: the
887
+ core and the speech, translation, image and music plugins leave SDK plugin
888
+ registration to the SDK's own Bare worker. (#362)
889
+ - On Node, exec's default shell no longer fails every command with
890
+ `require.addon is not a function`. (#274)
891
+ - On Node, a shell line under `SeatbeltSandbox` no longer fails with
892
+ `require.addon is not a function`. (#281)
893
+ - A completion event the hrpc schema cannot encode ends the run with an
894
+ `error` event instead of killing the harness process. (#267)
895
+ - `modelEvents`, `download`, `speakStream` and host `completion` frames that
896
+ cannot encode report an error instead of killing the process. (#278)
897
+ - `copyAddonExternals` ships a dependency nested under a package when the root
898
+ copy is out of its range. (#228)
899
+ - On the last tool round, an empty response wraps up instead of re-asking one
900
+ round past `maxToolRounds`. (#167)
901
+ - A `FAIL` sent while a run was finishing no longer runs the finishing step and
902
+ its `runEnd` hook again. (#167)
903
+
904
+ ## [0.8.11] - 2026-10-16
905
+
906
+ ### Fixed
907
+
908
+ - A skill CLI call the schema rejects names what the command accepts: an
909
+ `unknown parameter`, `unknown flag` or `unexpected argument` error now ends
910
+ with the node's parameters or subcommands, e.g.
911
+ `unknown parameter "title"; create takes: name, path, …`. The message
912
+ prefixes are unchanged. (#523)
913
+
914
+ ## [0.8.10] - 2026-10-16
915
+
916
+ ### Added
917
+
918
+ - Harness log lines carry a level, `error`, `warn`, `info` or `debug`, and run
919
+ on `@qvac/logging`. A sink set with `setHarnessLogSink` receives the level as
920
+ its second argument, `(line, level) => …`, and `harnessLog`,
921
+ `setHarnessLogLevel` and the `HarnessLog` and `LogLevel` types are exported.
922
+ `hlog` keeps working and logs at `info`. (#471)
923
+ - `@qvac/harness/errors`: every runtime failure the harness detects throws a
924
+ `HarnessError`, a `@qvac/error` error with a code in 102001–104000, and its
925
+ message is unchanged. `isHarnessError(err, name)` matches the code, also once
926
+ bare-rpc has turned it into a string, and `harnessErrorCode(name)` and
927
+ `harnessErrorCodes()` give the numbers. A code reaches a host on a unary RPC
928
+ call; completion, model and download events still carry only the message.
929
+ (#472)
930
+
931
+ ### Changed
932
+
933
+ - `QVAC_LOG_LEVEL` (the app's `--log-level`) now filters harness lines too. At
934
+ `info`, round stats and `sdk tool definitions`, which are `debug`, leave
935
+ `harness.log`. With it unset, an enabled log keeps every line, as before.
936
+ (#471)
937
+ - The `logger` a host passes to `spawnHarness` or `harnessChild` sets harness's
938
+ log level, in the sidecar's `harness.log` as well as in the host's process,
939
+ when it has `getLevel()`; `QVAC_LOG_LEVEL` still wins when set. The lines
940
+ harness writes in the host's process go to that logger at their level, not to
941
+ stdout, whose unread pipe can halt Bare on Windows. A sink set with
942
+ `setHarnessLogSink` still takes them first. (#471)
943
+ - **Breaking** for a caller that reads `.name`: `AbortedError`, `TimeoutError`,
944
+ `AbortError`, `JsonParseError` and `DriveReadTruncatedError` now extend
945
+ `HarnessError` and carry its registry name (`AbortedError` is `ABORTED`,
946
+ `TimeoutError` is `FETCH_TIMED_OUT`), and the Python sandbox's
947
+ `fetch refused: …` errors are no longer `TypeError`s. Match with `instanceof`
948
+ or the code. (#472)
949
+ - **Breaking** for a host that names file tools: with a folder grant, ten
950
+ flat tools replace `read_files`, `file_glob`, `grep`, `create_documents` and
951
+ `edit_documents`: `read_file`, `list_dir`, `glob`, `grep`, `write_file`,
952
+ `edit_file`, `move_file`, `copy_file`, `make_dir` and `trash_file`. Each call
953
+ names one file with plain string arguments, and `grep` takes one `pattern`
954
+ instead of `queries[]`. A relative path resolves inside the shared folder,
955
+ the first read grant or else the first write grant, and a write outside the
956
+ write grant is refused. `read_file` numbers its lines, takes a range, caps a
957
+ read at 20,000 characters and reads PDF, Word and PowerPoint as text.
958
+ Creating a file, `copy_file` and `make_dir` run unprompted; overwriting,
959
+ editing, moving and trashing ask first, and `trash_file` moves the file into
960
+ the folder's own `.trash`. All ten belong to the `files` toolset. A host that
961
+ labels, groups or describes tools by name needs the new names; old
962
+ tool-activity records keep the old ones. A run without a folder grant sends
963
+ the same prompt as before. (#490)
964
+ - `@qvac/sdk` is `^0.21.0`, not `0.21.0`, so a host resolves the newest 0.21.x
965
+ patch. (#520)
966
+
967
+ ### Removed
968
+
969
+ - **Breaking:** the `lib/tools/read-files.ts`, `file-glob.ts`, `grep.ts`,
970
+ `create-documents.ts` and `edit-documents.ts` subpaths, which `./lib/tools/*`
971
+ exposed. Their tools left the sidecar in #490; the new ones are under
972
+ `lib/tools/files/`. (#491)
973
+
974
+ ## [0.8.9] - 2026-10-15
975
+
976
+ ### Changed
977
+
978
+ - A skill with a `display_name` answers only to that handle; a skill without
979
+ one still answers to its folder name. `@documents` resolves the word skill
980
+ and `@word` no longer does, which replaces the 0.8.8 note that both resolve.
981
+ Implicit preload skips a leading `@name`, so a handle that resolves to no
982
+ skill loads nothing, while a plain "make an excel sheet" still preloads
983
+ Spreadsheets. A paired device on an older app build still sends `@word` and
984
+ `@excel`; once the skills package declares `display_name`, a host on this
985
+ version answers those requests without the skill. (#505)
986
+ - `@qvac/skills` 0.1.15: the Word and Excel skills declare `display_name`, so
987
+ their handles are `@documents` and `@spreadsheets`. The browser skill hands a
988
+ CAPTCHA, interstitial or login page to the user instead of clicking through
989
+ or waiting, and keeps its Chrome cookies and logins across chats. (#513)
990
+
991
+ ## [0.8.8] - 2026-10-15
992
+
993
+ ### Added
994
+
995
+ - A skill's manifest may declare `display_name`, the `@` handle users see and
996
+ type, as one word (letters, digits, `-` or `_`); a `display_name` that is
997
+ not one word is ignored. The Word and Excel skills are shown as Documents
998
+ and Spreadsheets, and their folder names are trademarks, so a host needs a
999
+ handle other than the name. Once the word skill's manifest declares
1000
+ `display_name: Documents`, `@documents` resolves it, and `@word` still does,
1001
+ so an app that sends the folder name keeps working. The catalog entry and
1002
+ the `skills` wire carry `displayName`, a customized copy of a skill keeps
1003
+ the shipped one, and `skillMentionHandle` gives a host the same rule the
1004
+ harness matches on. The folder name stays the skill's key everywhere else.
1005
+ (#469)
1006
+
1007
+ ### Fixed
1008
+
1009
+ - A replayed tool call keeps its markup when history is rendered from scratch.
1010
+ Every assistant turn lost its tool-call markup on the way in, so a retry,
1011
+ compaction, a dropped chat cache, an overflow candidate or another device
1012
+ showed the model an empty assistant turn followed by a result answering
1013
+ nothing. Only an assistant turn that no tool result follows is stripped now,
1014
+ which still keeps markup leaked into a final answer out of the prompt. (#402)
1015
+ - A web search the harness runs for "search the web" now ends on the same
1016
+ continuation nudge as a search the model makes. Without it, the round after
1017
+ the search often failed on Qwen3.5-9B with thinking on instead of answering.
1018
+ (#486)
1019
+ - An identical call to a read tool that already succeeded this turn is
1020
+ answered with a note pointing at the earlier result instead of running
1021
+ again, and counts as a strike. A small model could repeat the same call
1022
+ hundreds of times in one round until the context filled. Any other tool
1023
+ that runs clears the memo, and a round is cut to its first 16 calls. (#377)
1024
+ - Asking the `skill` tool for a file a loaded skill does not have returns
1025
+ guidance listing its real files instead of an error, so the app no longer
1026
+ shows a failed tool call for it. A file asked of an unknown skill returns
1027
+ `skill not found`. (#383)
1028
+
1029
+ ## [0.8.7] - 2026-10-12
1030
+
1031
+ ### Added
1032
+
1033
+ - A skill's manifest may declare `env`, the variables its `exec` commands run
1034
+ with. The child process env is an allowlist, so this is the only way a
1035
+ skill's binary sees a setting of its own. The value `${session}` expands to
1036
+ the chat the run belongs to, which lets a long-lived tool such as a browser
1037
+ daemon keep one instance per chat; a run with no session drops that variable.
1038
+ An overlay skill keeps the base skill's `env`, so an edit never widens what
1039
+ a command can reach. `completion()` takes an optional `session`, in process
1040
+ and over hrpc, and falls back to the first segment of `cacheKey`. (#341)
1041
+
1042
+ ```yaml
1043
+ metadata:
1044
+ env:
1045
+ AGENT_BROWSER_SESSION: '${session}'
1046
+ AGENT_BROWSER_HEADED: '1'
1047
+ ```
1048
+
1049
+ - A verb in a skill's `cli.schema.json` may carry `x-max-output-chars`, the
1050
+ most output `exec` returns for that command. The ceiling wins over the
1051
+ model's own `maxOutputChars`, the truncation note says which limit applied,
1052
+ and a schema whose cap is not a positive integer fails to load. Page
1053
+ snapshots and other verbose read verbs stay inside the context this way.
1054
+ (#342)
1055
+
1056
+ - The `browser` skill ships with `@qvac/skills` 0.1.14: an agent drives a
1057
+ Chromium through the `agent-browser` CLI, scoped to `exec(agent-browser)`,
1058
+ with one browser session per chat. (#405)
1059
+
1060
+ - A chat model's context climbs as far as the device and the SDK allow when
1061
+ neither the agent nor the host sets one: 262,144, then 131,072, then 65,536,
1062
+ before the default. The device class caps the climb, the trained window from
1063
+ the weight's GGUF header bounds it, and each rung must pass `assessModelFit`
1064
+ with its own config. The choice is kept per pool key for the life of the
1065
+ process. See the
1066
+ [decision record](https://github.com/tetherto/qvac-harness/blob/v0.8.7/docs/decisions/2026-10-08-the-device-class-sets-how-far-the-context-climbs.md).
1067
+ (#382)
1068
+
1069
+ ### Changed
1070
+
1071
+ - **Breaking for hosts:** a skill named with `@` or in prose now reaches the
1072
+ model as a `skill` call, its result and the continuation nudge right after the
1073
+ request, exactly the round a load the model makes itself leaves, instead of
1074
+ being written into the user's message. The user's turn is sent as typed and
1075
+ the run stays on the chat's KV cache key, so its rounds and the turn after it
1076
+ read the cached prefix; the child key 0.8.6 ran these turns under (#305) and
1077
+ its delete are gone. The host must replay each run's turns as it sent them
1078
+ (`@qvac/core` does from 0.7.0, tetherto/qvac-core#338): a host that collapses
1079
+ a run to its request and answer leaves the cache's message count stale, and
1080
+ the next turn's whole history is appended to the cache again. Because the body
1081
+ is replayed as sent, an edit to the skill reaches such a chat on its next
1082
+ mention of the skill, not on the next turn.
1083
+
1084
+ - `bare-stow` 0.1.7, with the patches it made stale dropped. (#396)
1085
+ - `lunte` 1.8.6 and `lunte-plugin-qvac` 0.2.0. (#397)
1086
+
1087
+ ### Fixed
1088
+
1089
+ - **Breaking:** a skill switched off on the agent can no longer be used. Naming
1090
+ it with `@` or in prose loads nothing and unlocks nothing, and a chat that
1091
+ loaded it earlier loses it as soon as it is switched off (QVAC-25357).
1092
+ `skillIsActive` reads the agent's `enabledSkills` alone, and
1093
+ `SkillActivation` drops its `mention` and `loadedSkills` fields. A host that
1094
+ relied on a mention to grant a skill must enable it on the agent first. (#338)
1095
+ - A round that says nothing and calls nothing is re-asked on a history that
1096
+ keeps that round's turn. The re-ask used to resend the history without it,
1097
+ which the SDK, having cached the turn, read as stale: it sent the whole
1098
+ history again and the addon appended it to the KV cache. (#403)
1099
+ - A model loaded by hand when nothing else is in memory is no longer refused,
1100
+ even when its estimate is above the memory cap. Beside another model a
1101
+ manual load is still refused, so it never piles a second model into memory.
1102
+ (#394)
1103
+
1104
+ - When llama.cpp overruns its grammar mid-round and a complete
1105
+ `<function=…></function>` call has already streamed, the round ends on that
1106
+ text and markup recovery runs the call, instead of the turn failing with
1107
+ "Unexpected empty grammar stack". The held-back prose is flushed before any
1108
+ rethrow, and the inference inspector reports the recovered round as
1109
+ `completed` with the grammar error as its `reason`. (#370)
1110
+
1111
+ - `@mention`s, the implicit skill preload and the explicit web-search check
1112
+ read the turn as the user typed it (`CompletionContext.said`, carried in the
1113
+ start frame's existing payload), so a host that rewrites the stored turn no
1114
+ longer hides a mention. Hosts that do not send `said` behave as before.
1115
+ (#372)
1116
+
1117
+ - Office files keep their pictures off the text: in a deck a picture fills an
1118
+ empty placeholder, sits below the text when there is room, and otherwise
1119
+ takes the right half; an op aimed at a slide a later `addSlide` creates is
1120
+ refused rather than moved. In a workbook `addImage` without a `cell` lands
1121
+ beside the data, as `addChart` does, and a second picture or chart stacks
1122
+ below the first. A nested op is named as its own entry in a tool error, and
1123
+ the tool result says when an attached image went unused. (#406)
895
1124
 
896
1125
  ### Removed
897
1126
 
898
- - **Breaking:** `Tools.product` no longer lists `mcp_call` or compiles the
899
- skill catalog's mcp operations (notion's `notion_create_page` and
900
- `notion_insert_content`). Add
901
- `new McpPlugin({ generic: true, skillCatalog, credentialStore, read: ['mcp_call'] })`
902
- from `@qvac/harness/plugins/mcp`; without `read`, every `mcp_reads` method
903
- asks. `mcp_call` now follows the exec tools in the prompt, so every cached
904
- prompt changes. (#277)
905
- - **Breaking:** the `./lib/tools/*` wildcard and five tool factory exports.
906
- Build the product list with `Tools.product` from `@qvac/harness/tools`:
907
- - `./lib/tools/http-request.ts` (`createHttpRequestTool`): `Tools.product`.
908
- - `./lib/tools/mcp-call.ts` (`createMcpCallTool`): `new McpPlugin({ generic: true })`
909
- from `@qvac/harness/plugins/mcp`.
910
- - `./lib/tools/web-search.ts` (`createWebSearchTool`): `WebSearchPlugin` from
911
- `./plugins/web-search` (#276).
912
- - `./lib/tools/web-fetch.ts` (`createWebFetchTool`): `Tools.product`.
913
- - `./lib/tools/skill.ts` (`createSkillTool`): `Tools.product` with `skillsDir`.
914
- - `./lib/tools/read-files.ts`, `file-glob.ts`, `grep.ts`,
915
- `create-documents.ts`, `edit-documents.ts`, `operations/compile.ts`:
916
- `Tools.product`, which passes them the denied roots.
917
- - `./lib/tools/skills/credential-slots.ts` (`credentialSlots`):
918
- `credentialSlots` from `@qvac/harness/skill-manifest` (#283).
919
- - `./lib/tools/skills/scope-key.ts` (`isDeviceSharedCredentialKey`, which
920
- #227 removed; `scopeKey` and `deviceSharedKeys` are harness-internal): no
921
- replacement. Plugins now declare their device-shared keys in
922
- `SkillReadiness.deviceSharedKeys`. A host that picks a credential's
923
- storage key outside the harness keeps its own list of device-shared keys,
924
- matching the plugins it composes. Today that is `obsidian_vault_path`,
925
- from `ObsidianRoute`. A mismatch fails closed: a key the host stores
926
- device-wide that no plugin shares reads as unset for an agent, and the
927
- skill shows needs-setup. (#283)
928
- - `./lib/tools/skills/bundled-dir.ts` (`ensureBundledSkillsDir`):
929
- `Tools.bundledSkillsDir()` from `@qvac/harness/tools` (#283).
930
- - `./lib/tools/skills/catalog.ts`: `./lib/tools/skills/index.ts` or the root
931
- `@qvac/harness`, which both re-export it.
932
- - `./lib/tools/skills/auth-resolver.ts`, `cli-schema.ts` and
933
- `credential-grants.ts`: `./lib/tools/skills/index.ts`, which re-exports
934
- them.
935
- - `./lib/tools/skills/frontmatter-parser.ts`: `./skill-manifest` or
936
- `./lib/tools/skills/index.ts`.
937
- - `./lib/tools/skills/skill-state-constants.ts`: `./skill-state`.
938
- - `./lib/tools/skills/tool-grants.ts` (`parseToolGrant`, already gone this
939
- release): `Agent.parseToolGrant` from `@qvac/harness/agent`.
940
- - Any other `./lib/tools/...` path: no replacement.
941
-
942
- Only `./lib/tools/exec.ts`, `./lib/tools/toolsets.ts`,
943
- `./lib/tools/skills/index.ts`, `./lib/tools/skills/mention.ts` and
944
- `./lib/tools/skills/mention-name.ts` keep their keys, and the packed plugins
945
- reach `exec/runner.ts`, `exec/shell-argv.ts`,
946
- `exec/adapters/shell/shell-adapter.ts`, `fs/scope.ts` and `fs/write.ts`
947
- through their own keys. (#273)
948
-
949
- - **Breaking:** `lib/team` and `Team`, with `TeamConfig`, `TeamRequest`,
950
- `TeamHost` and `TeamEvent`. `harness.completion({ agent, agents, messages })`
951
- replaces `Team.run(host, { entry, agents }, request)`; `TransferEvent` is a
952
- contract type now. (#233)
953
- - The sidecar bundle no longer ships `@qvac/ocr-ggml`: no harness code imports
954
- it, and the shipped addon closure is now seeded from the `@qvac` packages the
955
- bundle defers (`deferredAddonPackages`), so a host bundling neither image nor
956
- music ships neither `@qvac/diffusion-cpp` nor `@qvac/audiogen-ggml`. (#226)
957
-
958
- - **Breaking:** `rag_search`, the `ragSearch` host callback and its types.
959
- `CompletionArgs.ragSearch`, `CompletionContext.ragSearch` (`index.ts` and
960
- `./lib/contract-types.ts`), `ToolExecuteContext.ragSearch` (a root type),
961
- `RagSearchFn`, `RagSearchResult` and the `./lib/tools/rag-search.ts` export
962
- are gone. The callback was bound onto every tool's execute context, so a
963
- host's own tool could call `ctx.ragSearch`; no harness tool did. A host drops
964
- the field, and knowledge still reaches the model by injection. The `rag-ask`
965
- and `rag-result` wire values stay in the schema. (#162)
966
- - **Breaking:** `harnessHooks`. Hooks belong to a `Harness`:
967
- `new Harness({ hooks })` replaces the built-ins, and
968
- `HookPipeline.defaults()` returns fresh instances of them (arg-repair,
969
- egress-guard, sandbox, skill-catalog). To add a hook, pass
970
- `[...HookPipeline.defaults(), mine]`. `CompletionEngine` takes a `hooks`
971
- option and defaults to `HookPipeline.defaults()`, so a host that passes
972
- nothing runs the same four as before. (#158)
973
- - **Breaking:** the agent's tool selection and tool names are exported as
974
- `@qvac/harness/agent`, which replaces `./lib/capabilities/tool-selection.ts`
975
- and `./lib/capabilities/tool-names.ts` (and the unreleased
976
- `./lib/agent/tool-selection.ts` and `./lib/agent/tool-names.ts`). It exports
977
- the `Agent` class, with the statics `resolve`, `policy`, `parseToolGrant`,
978
- `enabledTools`, `permittedTools`, `collectToolGrants`, `skillIsActive`,
979
- `follow`, `NETWORK_TOOLSETS`, `SKILL_TOOL_NAME`, `WEB_SEARCH_TOOL_NAME`,
980
- `TRANSFER_TOOL_NAME` and `MAX_TRANSFERS`.
981
- `isSelected`, `skillsAreSelected`, `MCP_CALL_TOOL_NAME` and the types
982
- `ToolGrantSource`, `ToolGrants`, `SelectableTool` and `ToolGateInputs` are no
983
- longer exported; `SkillActivation` is a root type.
984
- `parseToolGrant` left `./lib/tools/skills/tool-grants.ts` (gone), and
985
- `NETWORK_TOOLSETS` and `permittedTools` left `./lib/tools/toolsets.ts`,
986
- which keeps `TOOLSETS`, `Toolset`, `asToolset` and `toolsetEnabled`.
987
- `ToolGrant` is no longer exported; `ToolsetScoped`, and `SystemPromptParts`
988
- from `./lib/prompt.ts`, are root types. (#165, #206)
989
- - **Breaking:** `./lib/tools/model-args.ts` (`unquoteArg`) is no longer
990
- exported. (#166)
1127
+ - **Breaking:** `skillPreloadMessage` (`lib/tools/skills/mention.ts`) and
1128
+ `withoutSkillLoadTurns` (`lib/capabilities/tool-turns.ts`). Nothing writes a
1129
+ skill body into the user's message any more, so no earlier load turn has to
1130
+ be dropped to keep the two from contradicting each other.
1131
+ - `CompletionSdk.deleteCache`. Nothing calls it now that the child key (#305)
1132
+ and the chat-cache drop after a model-loaded skill (#373, reverted in #400)
1133
+ are gone.
1134
+
1135
+ ## [0.8.6] - 2026-10-08
1136
+
1137
+ ### Added
1138
+
1139
+ - `setModelMemoryCap(percent)` keeps several models loaded side by side. Loaded
1140
+ models may fill that share of the device's memory budget, so chat models a
1141
+ request loaded stay loaded while they fit, and a chat switching between them
1142
+ loads neither again.
1143
+
1144
+ A load that would not fit unloads idle models one at a time, least recently
1145
+ used first within each group: image and music models first, then embedding,
1146
+ speech and transcription models, then chat models a request loaded, then
1147
+ those loaded by hand. A manual `loadModel` of any kind never unloads another
1148
+ model.
1149
+
1150
+ Each load is sized by `assessModelFit`. `list()` rows of loaded models carry
1151
+ the estimate as `memoryBytes`, and `memoryUsage()` answers their total. `0`,
1152
+ a mobile device, and a host that never sets a cap keep one chat model a
1153
+ request loaded, as before (QVAC-25735). See
1154
+ [Keeping several models in memory](https://github.com/tetherto/qvac-harness/blob/v0.8.6/README.md#keeping-several-models-in-memory)
1155
+ and the
1156
+ [decision record](https://github.com/tetherto/qvac-harness/blob/v0.8.6/docs/decisions/2026-10-07-loaded-models-share-a-memory-budget.md).
1157
+
1158
+ ```js
1159
+ await harness.setModelMemoryCap(85)
1160
+
1161
+ const { usedBytes } = await harness.memoryUsage()
1162
+ const loaded = (await harness.list({ cachedOnly: true })).filter((m) => m.isLoaded)
1163
+ // each loaded row carries memoryBytes, the estimate its load was sized by
1164
+ ```
1165
+
1166
+ (#358)
1167
+
1168
+ - `setDownloadsAllowed({ allowed })`, in process and over hrpc, lets a host hold
1169
+ model downloads, for example while a phone is on cellular, so a request
1170
+ cannot pull several GB without asking. Downloads are allowed by default, and
1171
+ `download()` itself is never held: it is how the host fetches a held model
1172
+ once the user approves.
1173
+
1174
+ While downloads are not allowed, a load whose model is not on the device
1175
+ emits a `model` event with `status: 'held'`, the model's download name and
1176
+ its `addon`, then waits. It goes ahead once a `download()` puts the model on
1177
+ the device or downloads are allowed again. Aborting the caller's signal ends
1178
+ it with `AbortedError`, and a wait that ends without loading reports `error`
1179
+ with `message: 'aborted'`. This covers the image, music and translation
1180
+ runtimes and every pooled load (chat, embedding, speech, transcription).
1181
+
1182
+ Over hrpc, every model event frame now carries an `addon` field, which is
1183
+ `null` unless the event is `held` or the `error` that ends a held wait. See
1184
+ [Holding model downloads](https://github.com/tetherto/qvac-harness/blob/v0.8.6/README.md#holding-model-downloads)
1185
+ and the
1186
+ [decision record](https://github.com/tetherto/qvac-harness/blob/v0.8.6/docs/decisions/2026-10-07-a-load-waits-for-a-download-the-host-holds.md).
1187
+
1188
+ ```js
1189
+ await harness.setDownloadsAllowed({ allowed: false })
1190
+
1191
+ harness.on('model', (state) => {
1192
+ if (state.status === 'held') askToDownload(state.model, state.addon)
1193
+ })
1194
+
1195
+ // later, once the user agrees
1196
+ await harness.setDownloadsAllowed({ allowed: true })
1197
+ ```
1198
+
1199
+ (#340)
1200
+
1201
+ - Ternary Bonsai 2 27B joins the curated catalog in two builds,
1202
+ `Ternary-Bonsai-2-27B-PQ2_0` (7.2 GB) and `Ternary-Bonsai-2-27B-PTQ1_0`
1203
+ (5.9 GB), each with its vision projection. Both sit in the `high` tier, by
1204
+ their memory footprint rather than their parameter count.
1205
+
1206
+ It is a Qwen3.8-27B fine-tune whose name the SDK's dialect router does not
1207
+ recognise, so it parses tool calls as `qwen35`; a catalog entry can now name
1208
+ its tool dialect.
1209
+
1210
+ ```js
1211
+ import { BONSAI_2_27B_PTQ1 } from '@qvac/harness/model-catalog'
1212
+
1213
+ await harness.loadModel({ model: BONSAI_2_27B_PTQ1, agent: { ctxSize: 8192 } })
1214
+ ```
1215
+
1216
+ (#303)
1217
+
1218
+ ### Changed
1219
+
1220
+ - `@qvac/sdk` and `@qvac/inference` 0.21.0, with `@qvac/llm-llamacpp` 0.55.0.
1221
+ A host that packages the addons exempts `@qvac/fabric-<os>-<cpu>` from any
1222
+ install age gate: `@qvac/fabric` now ships its prebuilds as those
1223
+ per-platform packages. `@qvac/model-fit` leaves the native graph. The fit
1224
+ check passes the model's source to the SDK's new `loadModel`-shaped
1225
+ `assessModelFit` input. (#302)
1226
+ - Transcribing long audio no longer needs memory in proportion to its length.
1227
+ It streams the audio to the model in 300 s segments instead of decoding the
1228
+ whole clip first: a 3.8 h clip peaked at about 0.9 GB above baseline, down
1229
+ from 1.8 GB. Clips under 60 s are transcribed as before. (#291)
991
1230
 
992
1231
  ### Fixed
993
1232
 
994
- - A reply that said it would act ("I'll …", "Let me …") but asked the user
995
- something got the narrated re-ask, and the forced round called a tool with
996
- the input the user was asked for made up. Such a reply is now the answer,
997
- and the turn ends there: a question mark outside code and outside a URL
998
- query, or a request for the user's input such as "tell me", "show me",
999
- "send me", "give me …", "please provide …" or "let me know". A request for
1000
- time, such as "give me a moment, I'll check", still gets the re-ask.
1001
- Nothing changes on the wire or in `RunPolicy`. (#252, #272, #292)
1002
- - Under `SeatbeltSandbox` (`./plugins/sandbox-macos`), a shell line could read
1003
- and write the app storage root when a write root held it, for example a home
1004
- grant: `cat <storage>/sdk-home/key` worked under both presets. Exec now passes
1005
- its canonical `deniedRoots` to the shell as `ExecutionContext.deniedRoots`,
1006
- and the Seatbelt profile denies reads and writes under each one, plus the
1007
- rename or removal of each folder above a denied root, up to and including
1008
- `/`. `SeatbeltSandbox.profile` takes `{ roots, denied, ancestors }`. (#293)
1009
- - On Node, exec's default shell runtime failed every command with
1010
- `require.addon is not a function`: it imported `bare-subprocess` and
1011
- `bare-process` directly. It now imports `child_process` and `process`, which
1012
- resolve to the Bare modules on Bare. The skill bin probe and the capability
1013
- probe share this runtime. (#274)
1014
- - On Node, a shell line run through `SeatbeltSandbox` (`./plugins/sandbox-macos`)
1015
- failed with `require.addon is not a function`: the plugin imported
1016
- `bare-subprocess` directly. It now imports `child_process`, which resolves to
1017
- `bare-subprocess` on Bare. (#281)
1018
- - A completion event the hrpc schema could not encode (a cycle in a tool
1019
- result, a negative number such as `progress({ percentage: -1 })`) killed the
1020
- harness process: hrpc encodes in a deferred write, outside any try/catch.
1021
- `serve` now encodes each event before it sends it. When that fails, the run
1022
- ends with an `error` event `cannot encode <type> event: <reason>`, and a later
1023
- run on the same connection still completes. (#267)
1024
- - The other wire writes no longer kill the process on a value the hrpc schema
1025
- cannot encode. `modelEvents` sends
1026
- `{ status: 'error', message: 'cannot encode model event: <reason>' }` with no
1027
- `model` and keeps the subscription open. `download` ends with an `error`
1028
- event `cannot encode <type> event: <reason>`. `speakStream` rejects with
1029
- `cannot encode speak frame: <reason>`, for a worker frame and for a host
1030
- fragment; before, it ended cleanly but cut short. A host `completion` frame that cannot encode destroys the stream and
1031
- rejects with `cannot encode <type> frame: <reason>`, with no `HARNESS_DIED`
1032
- code. The generated `spec/bind.js` turns a non-Error throw from a stream
1033
- handler into an `Error` and destroys `writeStream` with it. (#278)
1034
- - `copyAddonExternals` ships a dependency nested under a package because the
1035
- root copy is out of its range (`@qvac/tts-ggml`'s `bare-subprocess` ^5). (#228)
1036
- - On the last tool round, a response with no answer and no tool call re-asked
1037
- the model one round past `maxToolRounds`, and tool calls from that extra
1038
- round still ran. The run now wraps up instead. (#167)
1039
- - A `FAIL` sent while a run was finishing ran the finishing step again, and
1040
- with it the `runEnd` hook. The run now fails at once, as it does when the
1041
- finishing step itself throws. `runEnd` does not fire for that failure, so a
1042
- host hook does not see it. (#167)
1233
+ - A run that preloads a skill (`@skill`, or a skill named in prose) no longer
1234
+ prefills the whole prompt on every round of a tool loop. It caches its prompt
1235
+ under a child of the chat's key for the length of the run, and the child key
1236
+ is deleted when the run ends. (#305)
1043
1237
 
1044
1238
  ## [0.8.5] - 2026-10-06
1045
1239
 
1046
1240
  ### Added
1047
1241
 
1048
- - Skill-gated `pptx`, `docx` and `xlsx` tools on the office engine. A call takes
1049
- an `attachmentId` (or `create` options), `ops` that name engine methods with
1050
- named arguments, and an `output` file name; with an `attachmentId` alone it
1051
- returns the file's contents. The first failing op saves nothing and returns
1052
- the engine's error. An edit is never saved under the attached file's own
1053
- name. Saving the same file again in one turn answers with the one already
1054
- attached, and a changed file under that name is refused. The one-line answer
1055
- comes back as `reply`. These are the tools the presentations, word and excel
1056
- skills in `@qvac/skills` 0.1.12 call. (#286)
1242
+ - The model can now read, edit and create PowerPoint, Word and Excel files
1243
+ without Python, on Bare and Node: skill-gated `pptx`, `docx` and `xlsx`
1244
+ tools on the office engine. These are the tools the presentations, word and
1245
+ excel skills in `@qvac/skills` 0.1.12 call.
1246
+
1247
+ A call takes an `attachmentId` (or `create` options), `ops` that name engine
1248
+ methods with named arguments, and an `output` file name; with an
1249
+ `attachmentId` alone it returns the file's contents. The first failing op
1250
+ saves nothing and returns the engine's error.
1251
+
1252
+ An edit is never saved under the attached file's own name. Saving the same
1253
+ file again in one turn answers with the one already attached, and a changed
1254
+ file under that name is refused. The one-line answer comes back as `reply`.
1255
+ See the
1256
+ [office engine](https://github.com/tetherto/qvac-harness/blob/v0.8.5/lib/office/engine/README.md)
1257
+ for the methods an op can name.
1258
+
1259
+ ```js
1260
+ // the arguments a model passes to the pptx tool
1261
+ {
1262
+ create: { title: 'Q3 review' },
1263
+ ops: [{ op: 'addSlide', title: 'Revenue', body: 'Up 12% on Q2' }],
1264
+ output: 'q3-review.pptx'
1265
+ }
1266
+ ```
1267
+
1268
+ (#286)
1057
1269
 
1058
1270
  ### Changed
1059
1271
 
1060
1272
  - **Breaking:** `@qvac/skills` is now 0.1.12, whose office and pdf skills run on
1061
1273
  the `pptx`, `docx`, `xlsx` and `pdf` tools instead of Python. A host that
1062
1274
  passes its own `skillsDir` needs 0.1.12 as well: older office skills import
1063
- Python libraries this release no longer ships. (#286)
1064
- - `extractOfficeText` and `extractDocxText` read .docx, .xlsx and .pptx in
1065
- process on the engine instead of starting Pyodide, and read at most 1M cells
1275
+ Python libraries this release no longer ships. A host on the bundled skills
1276
+ has nothing to do.
1277
+
1278
+ ```sh
1279
+ # a host whose own skillsDir comes from @qvac/skills
1280
+ # before
1281
+ npm install @qvac/skills@0.1.11
1282
+ # after
1283
+ npm install @qvac/skills@0.1.12
1284
+ ```
1285
+
1286
+ (#286)
1287
+
1288
+ - `extractOfficeText` and `extractDocxText` no longer start Pyodide: they read
1289
+ .docx, .xlsx and .pptx in process on the engine, and read at most 1M cells
1066
1290
  across a workbook. Extracted workbook booleans read `true`/`false` instead of
1067
1291
  `True`/`False`. `closeOfficeWorker` and `closeDocxWorker` remain as no-ops.
1068
1292
  (#286)
1069
1293
  - `exec` refuses Python that imports `pptx`, `docx` or `openpyxl`, or declares
1070
- their packages, before it runs, and names the tool (or the skill that grants
1071
- it) to use instead. (#287)
1294
+ their packages, before it runs. The refusal names the tool (or the skill
1295
+ that grants it) to use instead, so the model moves to the office tools
1296
+ rather than trying to install the package. (#287)
1072
1297
  - **Breaking:** Python run through `exec` asks for approval like any other
1073
- write, including a run that only builds a new PDF. (#289)
1298
+ write, including a run that only builds a new PDF. Those runs used to
1299
+ skip `approve`; now the user is asked. The `pdf` tool, which builds PDFs now,
1300
+ counts as a read and does not ask.
1301
+
1302
+ ```js
1303
+ // before: exec running Python that only built a new PDF skipped approve
1304
+ // after: it reaches approve as a write, like any other Python run
1305
+ const context = {
1306
+ model,
1307
+ agent,
1308
+ messages,
1309
+ approve: async ({ name, effect }) => (effect === 'write' ? askUser(name) : true)
1310
+ }
1311
+ ```
1312
+
1313
+ (#289)
1074
1314
 
1075
1315
  ### Removed
1076
1316
 
1077
1317
  - **Breaking:** the vendored Python wheels for python-pptx, python-docx,
1078
1318
  openpyxl, fpdf2 and pypdf, and their dependencies. Only micropip is still
1079
1319
  seeded; any other package installs from PyPI, which sandbox mode refuses.
1080
- Use the office and `pdf` tools. (#286, #289)
1320
+ Use the office and `pdf` tools.
1321
+
1322
+ ```js
1323
+ // before: exec built a PDF offline with the vendored fpdf2
1324
+ { language: 'python', command: 'from fpdf import FPDF\n...', outputs: ['report.pdf'] }
1325
+ // after: the pdf tool builds it
1326
+ { action: 'create', markdown: '# Report\n...', output: 'report.pdf' }
1327
+ ```
1328
+
1329
+ (#286, #289)
1330
+
1081
1331
  - The `exec` guidance written for python-pptx, python-docx and fpdf2 code:
1082
1332
  their error hints and source checks, and the shrink-to-fit pass on saved
1083
1333
  decks. (#288, #289)
@@ -1086,42 +1336,64 @@ While the major version is `0`, a breaking change bumps the minor version.
1086
1336
 
1087
1337
  ### Added
1088
1338
 
1089
- - A skill-gated `pdf` tool on `bare-pdfium` 1.6.0. With an `attachmentId` and
1090
- no `action` it reads a PDF: the page count, each page's text and the form
1091
- fields. With an `action` it saves a new file named `output` and attaches it:
1092
- `create` from Markdown (chat images placed with `![caption](attachmentId)`),
1093
- `merge`, `split`, `rotate`, `watermark`, `fill`, `encrypt`, `decrypt` and
1094
- `text`. Errors name what exists, a locked PDF takes its password on any
1095
- action, and the one-line answer comes back as `reply`. On Node it reports
1096
- that the device cannot open PDFs. The pdf skill in the next `@qvac/skills`
1097
- release uses it instead of Python. (#256)
1098
- - An office engine in `lib/office/engine/` that reads, edits and creates `.pptx`,
1099
- `.docx` and `.xlsx` files in TypeScript on Bare and Node, so office editing no
1100
- longer needs Python and can run on mobile. It keeps untouched parts byte for
1101
- byte, fails with a `DocsError` whose code names the problem, and moves Excel
1102
- references when rows and columns change. It adds `@xmldom/xmldom`, makes
1103
- `bare-zlib` a direct dependency and maps `#zlib` to `bare-zlib` or `zlib`.
1339
+ - The model can read, create and change PDFs without Python: a skill-gated
1340
+ `pdf` tool on `bare-pdfium` 1.6.0. The pdf skill in the next `@qvac/skills`
1341
+ release uses it instead of Python. On Node it reports that the device cannot
1342
+ open PDFs.
1343
+
1344
+ With an `attachmentId` and no `action` it reads a PDF: the page count, each
1345
+ page's text and the form fields. With an `action` it saves a new file named
1346
+ `output` and attaches it: `create` from Markdown (chat images placed with
1347
+ `![caption](attachmentId)`), `merge`, `split`, `rotate`, `watermark`, `fill`,
1348
+ `encrypt`, `decrypt` and `text`.
1349
+
1350
+ Errors name what exists, a locked PDF takes its password on any action, and
1351
+ the one-line answer comes back as `reply`.
1352
+
1353
+ ```js
1354
+ // the arguments a model passes to the pdf tool
1355
+ { attachmentId, action: 'rotate', degrees: 90, pages: [2], output: 'scan-rotated.pdf' }
1356
+ ```
1357
+
1358
+ (#256)
1359
+
1360
+ - An office engine in `lib/office/engine/` reads, edits and creates `.pptx`,
1361
+ `.docx` and `.xlsx` files in TypeScript on Bare and Node, so office editing
1362
+ no longer needs Python and can run on mobile. It is internal in this release:
1363
+ the tools that drive it come in 0.8.5.
1364
+
1365
+ It keeps untouched parts byte for byte, fails with a `DocsError` whose code
1366
+ names the problem, and moves Excel references when rows and columns change.
1367
+ It adds `@xmldom/xmldom`, makes `bare-zlib` a direct dependency and maps
1368
+ `#zlib` to `bare-zlib` or `zlib`. See the
1369
+ [engine's README](https://github.com/tetherto/qvac-harness/blob/v0.8.0/lib/office/engine/README.md)
1370
+ and the
1371
+ [decision record](https://github.com/tetherto/qvac-harness/blob/v0.8.0/docs/decisions/2026-09-28-office-files-are-edited-by-the-harness-engine.md).
1372
+ (#150)
1104
1373
 
1105
1374
  ### Fixed
1106
1375
 
1107
- - Qwen3.5-family models: a tool call that ran goes back into the chat history
1108
- in the Qwen3.5 template's own format (`<tool_call>` wrapper, one line per tag,
1109
- string values as written) instead of a compact `<function=…>` line. A model
1110
- several calls into a turn copied the compact form, the tool grammar rejected
1111
- it, and the run ended in "This didn't finish". Models with another tool format
1112
- (e.g. MedPsy) still get a format that is not their own, until the SDK accepts
1113
- structured tool calls in history. (QVAC-23092, #146)
1114
- - A skill loaded with a `file` it does not have, before its instructions were
1115
- loaded, now returns those instructions with a line naming the files it has,
1116
- so the skill counts as loaded and its skill-gated tools appear. Before, a
1117
- one-file skill answered that the model already had its instructions, and its
1118
- tools stayed hidden. (#257)
1119
- - After a tool attaches a file, the loop tells the model the file is shown and
1120
- to answer, allows one more tool round, then writes the answer in a tool-less
1121
- round. Small models no longer keep calling tools on their own output until
1122
- the round cap. (#258)
1123
- - `exec`: a `$` before a digit, a space or punctuation in a shell command is
1124
- escaped instead of rejected, so text like `$1,299` runs on the first try. Real
1376
+ - Qwen3.5-family models no longer stall several tool calls into a turn. A tool
1377
+ call that ran goes back into the chat history in the Qwen3.5 template's own
1378
+ format (`<tool_call>` wrapper, one line per tag, string values as written)
1379
+ instead of a compact `<function=…>` line.
1380
+
1381
+ A model several calls into a turn copied the compact form, the tool grammar
1382
+ rejected it, and the run ended in "This didn't finish". Models with another
1383
+ tool format (e.g. MedPsy) still get a format that is not their own, until
1384
+ the SDK accepts structured tool calls in history. (QVAC-23092, #146)
1385
+
1386
+ - A skill's gated tools now appear when the model first asks the skill for a
1387
+ file it does not have. Loaded with such a `file` before its instructions were
1388
+ loaded, the skill returns those instructions with a line naming the files it
1389
+ has, so it counts as loaded. Before, a one-file skill answered that the model
1390
+ already had its instructions, and its tools stayed hidden. (#257)
1391
+ - Small models no longer keep calling tools on their own output until the round
1392
+ cap. After a tool attaches a file, the loop tells the model the file is shown
1393
+ and to answer, allows one more tool round, then writes the answer in a
1394
+ tool-less round. (#258)
1395
+ - `exec`: text like `$1,299` in a shell command runs on the first try. A `$`
1396
+ before a digit, a space or punctuation is escaped instead of rejected. Real
1125
1397
  shell expansion is still refused, now with a hint to single-quote the text.
1126
1398
  (#208)
1127
1399
 
@@ -1129,223 +1401,419 @@ While the major version is `0`, a breaking change bumps the minor version.
1129
1401
 
1130
1402
  ### Added
1131
1403
 
1132
- - A tool result may carry `answer: true` beside its `content` to end the turn
1133
- with that content as the reply, without another round through the model.
1134
- The `tool-result` event still fires. `weather_lookup` uses it for an
1135
- ambiguous or unknown place: the question that lists the namesakes, or the
1136
- not-found line, is the reply.
1404
+ - A tool can now end the turn with its own answer. A tool result may carry
1405
+ `answer: true` beside a non-empty `content`, and that content becomes the
1406
+ reply without another round through the model. The `tool-result` event still
1407
+ fires.
1408
+
1409
+ `weather_lookup` uses it for an ambiguous or unknown place: the question that
1410
+ lists the namesakes, or the not-found line, is the reply.
1411
+
1412
+ ```js
1413
+ const harness = new Harness({
1414
+ tools: [
1415
+ {
1416
+ name: 'store_hours',
1417
+ description: 'Opening hours of the store',
1418
+ parameters: { type: 'object', properties: {} },
1419
+ toolset: null,
1420
+ effect: () => 'read',
1421
+ execute: async () => ({ content: 'Open 9 to 5, Monday to Saturday.', answer: true })
1422
+ }
1423
+ ]
1424
+ })
1425
+ ```
1426
+
1427
+ (#153)
1137
1428
 
1138
1429
  ### Fixed
1139
1430
 
1140
- - `weather_lookup` finds the place before it asks for the weather. It looks the
1141
- city up on Open-Meteo's geocoder, `geocoding-api.open-meteo.com`, a new
1142
- outbound host, and asks wttr.in for the forecast at the coordinates of the
1143
- place it picked, which leads the report. A bare "Nassau" now reports Nassau,
1144
- Bahamas. It used to ask wttr.in by name, whose own geocoder put it in
1145
- Westbury, New York. A name that places of a similar size share, such as
1146
- Springfield, gets a question listing up to four of them instead of a
1147
- forecast: any namesake with a tenth of the largest one's population counts.
1148
- A country or state in the request picks among them. When the geocoder is
1149
- blocked, slow or failing, or knows no such place, the lookup asks wttr.in by
1150
- name, as before. The resource label names both hosts.
1431
+ - `weather_lookup` reports the place that was asked about: a bare "Nassau" now
1432
+ reports Nassau, Bahamas. It used to ask wttr.in by name, whose own geocoder
1433
+ put it in Westbury, New York.
1434
+
1435
+ It now finds the place before it asks for the weather. It looks the city up
1436
+ on Open-Meteo's geocoder, `geocoding-api.open-meteo.com`, a new outbound
1437
+ host, and asks wttr.in for the forecast at the coordinates of the place it
1438
+ picked, which leads the report. The resource label names both hosts.
1439
+
1440
+ A name that places of a similar size share, such as Springfield, gets a
1441
+ question listing up to four of them instead of a forecast: any namesake with
1442
+ a tenth of the largest one's population counts. A country or state in the
1443
+ request picks among them. When the geocoder is blocked, slow or failing, or
1444
+ knows no such place, the lookup asks wttr.in by name, as before. See the
1445
+ [decision record](https://github.com/tetherto/qvac-harness/blob/v0.7.3/docs/decisions/2026-09-16-a-lookup-reports-the-place-it-resolved.md).
1446
+ (#153)
1151
1447
 
1152
1448
  ## [0.7.2] - 2026-10-01
1153
1449
 
1154
1450
  ### Added
1155
1451
 
1156
- - `web_fetch` attaches a plain-text file (.txt, .csv, .json…) to the chat
1157
- besides returning its text, so the user can open or save it and `exec` can
1158
- stage it to read past the returned text. The result carries its
1159
- `attachmentId`, `fileName` and `byteLength`. A body cut at the fetch cap is
1160
- not attached, and a host that cannot store files gets the text alone, as
1161
- with page images. (#147, #148)
1452
+ - A plain-text file `web_fetch` fetched (.txt, .csv, .json…) is now attached
1453
+ to the chat besides its text being returned, so the user can open or save
1454
+ it and `exec` can stage it to read past the returned text. The result
1455
+ carries its `attachmentId`, `fileName` and `byteLength`.
1456
+
1457
+ A body cut at the fetch cap is not attached, and a host that cannot store
1458
+ files gets the text alone, as with page images.
1459
+
1460
+ ```js
1461
+ for await (const event of harness.completion(context)) {
1462
+ if (event.type === 'tool-result' && event.name === 'web_fetch') {
1463
+ const { attachmentId, fileName, byteLength } = event.result
1464
+ // attachmentId is undefined when nothing was attached
1465
+ }
1466
+ }
1467
+ ```
1468
+
1469
+ (#147, #148)
1162
1470
 
1163
1471
  ### Changed
1164
1472
 
1165
1473
  - Speech sounds cleaner on desktops. Devices on the `mid` profile and up now
1166
1474
  speak with Supertonic 3 FP16 (`Supertonic3-FP16`, 207 MB) instead of Q8_0
1167
1475
  (127 MB), at 16 inference steps instead of 5, which removes the artifacts
1168
- the 5-step output had. Synthesis takes about 2.7× as long, still around 7×
1169
- faster than real time on an M-series Mac. Phones (`low`) and `tiny` devices
1170
- keep Q4_0 at 5 steps. A host that prefetches `infraModelsFor` downloads the
1171
- FP16 model once; `Supertonic3-Q8_0` stays in the catalog, and now also runs
1172
- at 16 steps when a host asks for it by name. (#149)
1476
+ the 5-step output had.
1477
+
1478
+ Synthesis takes about 2.7× as long, still around 7× faster than real time on
1479
+ an M-series Mac. Phones (`low`) and `tiny` devices keep Q4_0 at 5 steps.
1480
+
1481
+ A host that prefetches `infraModelsFor` downloads the FP16 model once;
1482
+ `Supertonic3-Q8_0` stays in the catalog, and now also runs at 16 steps when a
1483
+ host asks for it by name.
1484
+
1485
+ ```js
1486
+ import { defaultTtsModelName } from '@qvac/harness/model-defaults'
1487
+
1488
+ defaultTtsModelName('mid') // 'Supertonic3-FP16', was 'Supertonic3-Q8_0'
1489
+ ```
1490
+
1491
+ (#149)
1173
1492
 
1174
1493
  ## [0.7.1] - 2026-09-30
1175
1494
 
1176
1495
  ### Added
1177
1496
 
1178
- - `list()` rows carry `isLoading`: true from the moment a load of that model
1179
- starts, whoever asked for it, until it is ready or the load fails. It is read
1180
- off the pool, so a host shows a model as loading without counting loads
1181
- itself. A model loading again under other settings while a copy of it is
1182
- resident reads `isLoaded` and `isLoading` both true. Chat models read it
1183
- today: image, music and translation models load for each generation, and
1184
- speech, transcription and embedding pools key by source, so those rows read
1185
- `false` for now. An optional field on the wire; a row from an older harness
1186
- reads `false`. (#143)
1497
+ - A host can show a model as loading without counting loads itself. `list()`
1498
+ rows carry `isLoading`: true from the moment a load of that model starts,
1499
+ whoever asked for it (a request, `warmModel` or `loadModel`), until it is
1500
+ ready or the load fails. It is read off the pool.
1501
+
1502
+ A model loading again under other settings while a copy of it is resident
1503
+ reads `isLoaded` and `isLoading` both true. Chat models read it today. Image,
1504
+ music and translation models load for each generation, and speech,
1505
+ transcription and embedding pools key by source, so those rows read `false`
1506
+ for now. It is an optional field on the wire; a row from an older harness
1507
+ reads `false`. See
1508
+ [Load and unload a model](https://github.com/tetherto/qvac-harness/blob/v0.7.1/README.md#load-and-unload-a-model).
1187
1509
 
1188
1510
  ```js
1189
1511
  const loading = (await harness.list({ cachedOnly: true })).filter((row) => row.isLoading)
1190
1512
  ```
1191
1513
 
1514
+ (#143)
1515
+
1192
1516
  ### Changed
1193
1517
 
1194
- - The `model` event carries `catalogChanged` at every edge a `list()` re-read
1195
- would show: the `loading` that starts a load and the `ready` or `error` that
1196
- ends it, beside `unloaded`. Progress ticks still do not. A host that re-reads
1197
- the list on `catalogChanged` sees a model turn loading, then loaded, with no
1198
- bookkeeping of its own. The served event stream never drops a frame that
1199
- carries it, so two `ready` frames of one model under two keys both cross. (#143)
1518
+ - A host that re-reads `list()` on `catalogChanged` sees a model turn loading,
1519
+ then loaded, with no bookkeeping of its own. The `model` event carries
1520
+ `catalogChanged` at every edge a re-read would show: the `loading` that
1521
+ starts a load and the `ready` or `error` that ends it, beside `unloaded`.
1522
+ Progress ticks still do not.
1523
+
1524
+ The served event stream never drops a frame that carries it, so two `ready`
1525
+ frames of one model under two keys both cross.
1526
+
1527
+ ```js
1528
+ harness.on('model', async (state) => {
1529
+ if (state.catalogChanged) render(await harness.list({ cachedOnly: true }))
1530
+ })
1531
+ ```
1532
+
1533
+ (#143)
1534
+
1200
1535
  - `ModelInfo` requires `isLoading`, and `listModels`, `customModelRows` and
1201
1536
  `mergeCustomRows` return `CatalogRow`, the row before the pools are asked. A
1202
- typed fake `list()` adds the field. (#143)
1537
+ typed fake `list()` adds the field.
1538
+
1539
+ ```js
1540
+ // before
1541
+ list: async () => [{ ...row, isLoaded: false }]
1542
+
1543
+ // after
1544
+ list: async () => [{ ...row, isLoaded: false, isLoading: false }]
1545
+ ```
1546
+
1547
+ (#143)
1548
+
1203
1549
  - A custom model's row reads `isLoaded` only once its load has landed; it used
1204
1550
  to read `true` from the first attempt. (#143)
1205
1551
 
1206
1552
  ### Fixed
1207
1553
 
1208
- - A load that ends without the model in memory emits `model` with `error` and
1209
- the reason: it failed, or a suspend or close cancelled it. It used to end in
1210
- silence, so a host could not tell a failed load from one still running. The
1211
- `error` also refreshes the cached `isCached`, since a load may have downloaded
1212
- the weights before it failed. (#143)
1554
+ - A host can tell a failed load from one still running. A load that ends
1555
+ without the model in memory emits `model` with `error` and the reason in
1556
+ `message`: it failed, or a suspend or close cancelled it. It used to end in
1557
+ silence. The `error` also refreshes the cached `isCached`, since a load may
1558
+ have downloaded the weights before it failed. (#143)
1213
1559
 
1214
1560
  ## [0.7.0] - 2026-09-29
1215
1561
 
1216
1562
  ### Added
1217
1563
 
1218
- - `list()` rows carry `taskType`, what the model is for: `llm`, `embeddings`,
1219
- `speech-to-text`, `text-to-speech`, `image-generation`, `audio-generation`,
1220
- `translation`, `text-recognition` or `other`. It is decided from the addon in
1221
- one place, `lib/models/model-task.ts`, on each side of the wire rather than
1222
- sent over it. `ModelTaskType` is exported, and grows the four new values a
1223
- preview never returns. (#140)
1564
+ - A host can tell what each model is for without keeping its own table.
1565
+ `list()` rows carry `taskType`: `llm`, `embeddings`, `speech-to-text`,
1566
+ `text-to-speech`, `image-generation`, `audio-generation`, `translation`,
1567
+ `text-recognition` or `other`.
1224
1568
 
1225
- - `modelsForAgent(agent, host)` lists every model an agent runs on a device,
1569
+ It is decided from the addon in one place, `lib/models/model-task.ts`, on
1570
+ each side of the wire rather than sent over it. `ModelTaskType` is exported,
1571
+ and grows the four new values a preview never returns.
1572
+
1573
+ ```js
1574
+ const rows = await harness.list({ cachedOnly: true })
1575
+ const transcribers = rows.filter((row) => row.taskType === 'speech-to-text')
1576
+ ```
1577
+
1578
+ (#140)
1579
+
1580
+ - `modelsForAgent(agent, host)` answers which models an agent runs on a device,
1226
1581
  each with its `use`: the chat model, clamped by `runnableModelName`, then the
1227
1582
  image and music models its skills need. A host deciding what to download, or
1228
1583
  which agents a model delete affects, asks this instead of working it out.
1229
- `runnableModelName(requested, host)` and `isMobilePlatform(platform)` move here
1230
- from `@qvac/core`: on a phone a pick above the device's profile runs as its
1231
- recommended model. Whether the host is a phone is the required `mobile` on
1232
- `HostCapability`, which `capability()` now reports, so its answer passes
1233
- straight in; a host built by hand has to say. Both functions are on the
1234
- browser-safe `@qvac/harness/model-catalog` entry too. (#141)
1584
+
1585
+ `runnableModelName(requested, host)` and `isMobilePlatform(platform)` move
1586
+ here from `@qvac/core`: on a phone, a pick above the device's profile runs as
1587
+ its recommended model. Whether the host is a phone is the required `mobile`
1588
+ on `HostCapability`, which `capability()` now reports, so its answer passes
1589
+ straight in; a host built by hand has to say. `runnableModelName` and
1590
+ `isMobilePlatform` are on the browser-safe `@qvac/harness/model-catalog`
1591
+ entry too.
1235
1592
 
1236
1593
  ```js
1237
- const chat = modelsForAgent(agent, await harness.capability()).find((m) => m.use === 'chat')
1594
+ import { modelsForAgent, QWEN_35_9B } from '@qvac/harness'
1595
+
1596
+ const agent = {
1597
+ modelName: QWEN_35_9B,
1598
+ installedSkills: ['image-generation'],
1599
+ skillsScope: 'all'
1600
+ }
1601
+ const models = modelsForAgent(agent, await harness.capability())
1602
+ // [{ name, addon: 'llm', use: 'chat' }, { name, addon, use: 'image' }]
1603
+ ```
1604
+
1605
+ ```js
1606
+ import { runnableModelName, QWEN_35_4B, QWEN_35_9B } from '@qvac/harness/model-catalog'
1607
+
1608
+ const host = { capabilityProfile: 'mid', recommendedModelName: QWEN_35_4B, mobile: true }
1609
+ runnableModelName(QWEN_35_9B, host) // QWEN_35_4B
1238
1610
  ```
1239
1611
 
1240
- - `capability()` answers `mobile`, whether the harness runs on a phone, read off
1241
- the platform it probes. It rides `capability-response` as an optional field;
1242
- a response from an older harness reads as `false`. (#141)
1612
+ (#141)
1243
1613
 
1244
- - `musicModelChoiceFrom(settings)` reads the music model pick out of an agent's
1245
- `generate_music` tool settings, so a host no longer knows what `modelChoice`
1246
- means there. `isMusicModelChoice` is exported beside it. (#141)
1614
+ - `capability()` answers `mobile`, whether the harness runs on a phone, read
1615
+ off the platform it probes. It rides `capability-response` as an optional
1616
+ field; a response from an older harness reads as `false`.
1617
+
1618
+ ```js
1619
+ const { mobile } = await harness.capability()
1620
+ ```
1621
+
1622
+ (#141)
1623
+
1624
+ - A host no longer needs to know what `modelChoice` means in an agent's
1625
+ `generate_music` tool settings. `musicModelChoiceFrom(settings)` reads the
1626
+ music model pick out of them, and `isMusicModelChoice` is exported beside it.
1627
+
1628
+ ```js
1629
+ import { musicModelChoiceFrom } from '@qvac/harness/music-catalog'
1630
+
1631
+ musicModelChoiceFrom({ modelChoice: 'turbo-hq' }) // 'turbo-hq'
1632
+ musicModelChoiceFrom({}) // undefined
1633
+ ```
1634
+
1635
+ (#141)
1247
1636
 
1248
1637
  ### Changed
1249
1638
 
1250
- - **Breaking:** the package no longer publishes a prebuilt sidecar:
1639
+ - **Breaking:** the package no longer publishes a prebuilt sidecar.
1251
1640
  `dist/harness.bundle`, `dist/harness.cjs`, `dist/prebuilds-manifest.json` and
1252
1641
  the `./dist/harness.cjs` export are gone. A host stows
1253
1642
  `worker/harness-sidecar.mjs` itself, as desktop and mobile already do, or
1254
- spawns `worker/stow-entry.mjs` straight from its install. (#127)
1255
- - **Breaking:** a stowed harness runs python in a worker rather than in-process.
1256
- A host that stows the harness stops deferring `pyodide`, keeps
1257
- `QVAC_PYODIDE_CACHE_DIR` writable, no longer stages a separate worker bundle,
1258
- and ships what stow offloads beside the bundle, which now includes pyodide's
1259
- wasm, stdlib and lock file and the vendored wheels. A target that embeds
1260
- assets instead of offloading them cannot run python, since `fs` cannot read
1261
- inside a bundle. (#127)
1262
- - A bundle of the package root carries neither pyodide nor the vendored wheels.
1263
- Only an entry that runs python, the exec tool or `@qvac/harness/docx` and
1264
- `/office`, pulls them in. (#127)
1643
+ spawns `worker/stow-entry.mjs` straight from its install. See
1644
+ [The published package](https://github.com/tetherto/qvac-harness/blob/v0.7.0/README.md#the-published-package)
1645
+ and [Spawning](https://github.com/tetherto/qvac-harness/blob/v0.7.0/README.md#spawning).
1646
+
1647
+ ```js
1648
+ // before
1649
+ const harness = require('@qvac/harness/dist/harness.cjs')
1650
+ const { ipc, sidecar, exit } = await harness.start(args)
1651
+
1652
+ // after
1653
+ import { spawnHarness } from '@qvac/harness'
1654
+
1655
+ const harness = spawnHarness({
1656
+ entry: require.resolve('@qvac/harness/worker/stow-entry.mjs'),
1657
+ sdkStorage
1658
+ })
1659
+ ```
1660
+
1661
+ (#127)
1662
+
1663
+ - **Breaking:** a stowed harness runs python in a worker rather than
1664
+ in-process. A host that stows the harness:
1665
+
1666
+ - stops deferring `pyodide`
1667
+ - keeps `QVAC_PYODIDE_CACHE_DIR` writable
1668
+ - no longer stages a separate worker bundle
1669
+ - ships what stow offloads beside the bundle, which now includes pyodide's
1670
+ wasm, stdlib and lock file and the vendored wheels
1671
+
1672
+ A target that embeds assets instead of offloading them cannot run python,
1673
+ since `fs` cannot read inside a bundle. See
1674
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.7.0/docs/decisions/2026-09-25-the-python-worker-runs-on-bare-worker.md).
1675
+ (#127)
1676
+
1677
+ - A bundle of the package root carries neither pyodide nor the vendored
1678
+ wheels. Only an entry that runs python pulls them in: the exec tool, or
1679
+ `@qvac/harness/docx` and `/office`. (#127)
1265
1680
  - `SandboxHook` no longer checks `packages`. The exec tool refuses an install
1266
1681
  the vendored wheels do not hold in full in sandbox mode, whether declared in
1267
1682
  `packages` or on a pip line, with the same message as before. (#127)
1268
1683
  - The vendored wheels are the `#pyodide-wheels` directory asset on Bare;
1269
1684
  `QVAC_PYTHON_WHEELS_DIR` still overrides it. (#127)
1270
1685
  - The python worker and the in-process deadline are spawned through
1271
- `worker_threads`, which the package maps to `bare-worker`;
1686
+ `worker_threads`, which the package maps to `bare-worker`.
1272
1687
  `#pyodide-worker-spawn` is gone. (#127)
1273
- - **Breaking:** `engines.bare` is `>=1.34.0`, so Bare refuses to load the
1274
- package on older runtimes. `bare-runtime` is pinned to 1.34.0 and
1275
- `bare-sidecar` to 0.5.7 (Bare 1.34.0) across the tree, `bare-supervisor`'s copy
1276
- included, with `bare-thread` at least 1.2.7 and `bare-module` 7.1.0 for
1277
- `bare-worker`'s copy. (#127)
1688
+ - **Breaking:** Bare refuses to load the package on runtimes older than 1.34.0:
1689
+ `engines.bare` is `>=1.34.0`. `bare-runtime` is pinned to 1.34.0 and
1690
+ `bare-sidecar` to 0.5.7 (Bare 1.34.0) across the tree, `bare-supervisor`'s
1691
+ copy included, with `bare-thread` at least 1.2.7 and `bare-module` 7.1.0 for
1692
+ `bare-worker`'s copy. A host upgrades its Bare to 1.34.0 or later. (#127)
1278
1693
  - `bare-module` is no longer a dependency or an override, and
1279
- `bare-module-traverse` is overridden to 2.5.8: earlier versions drop the
1694
+ `bare-module-traverse` is overridden to `~2.5.8`: earlier versions drop the
1280
1695
  `asset` condition on `bare-sidecar`'s binary, and a stowed harness then fails
1281
1696
  to boot on Bare 1.33 and later. (#127)
1282
1697
  - `skillModelsForAgent` rows carry `use`, `image` or `music`, so a caller can
1283
- tell which skill a model is for without looking the name up in the catalogs. (#141)
1284
- - `CapabilityInfo` has a required `mobile`, so a `HarnessContract` whose
1285
- `capability()` builds its own answer, a test stub included, returns it too. (#141)
1698
+ tell which skill a model is for without looking the name up in the catalogs.
1699
+ (#141)
1700
+ - `CapabilityInfo` has a required `mobile`. A `HarnessContract` whose
1701
+ `capability()` builds its own answer, a test stub included, returns it too.
1702
+
1703
+ ```js
1704
+ // before
1705
+ capability: async () => ({ capabilityProfile: 'mid', recommendedModelName: QWEN_35_4B })
1706
+
1707
+ // after
1708
+ capability: async () => ({
1709
+ capabilityProfile: 'mid',
1710
+ recommendedModelName: QWEN_35_4B,
1711
+ mobile: false
1712
+ })
1713
+ ```
1714
+
1715
+ (#141)
1286
1716
 
1287
1717
  ### Removed
1288
1718
 
1289
- - **Breaking:** `bareRuntime` is no longer exported from `./lib/tools/exec.ts`.
1290
- It is at `./lib/tools/exec/bare-runtime.ts`, so the package root no longer
1291
- loads the exec tool to reach it. (#127)
1292
- - **Breaking:** `QVAC_PYODIDE_TEST_LOADER`: tests point
1293
- `QVAC_PYODIDE_WORKER_ENTRY` at an entry that serves their fake interpreter. (#127)
1719
+ - **Breaking:** `bareRuntime` is no longer exported from `./lib/tools/exec.ts`,
1720
+ so the package root no longer loads the exec tool to reach it. It is at
1721
+ `./lib/tools/exec/bare-runtime.ts`.
1722
+
1723
+ ```js
1724
+ // before
1725
+ import { bareRuntime } from '@qvac/harness/lib/tools/exec.ts'
1726
+
1727
+ // after
1728
+ import { bareRuntime } from '@qvac/harness/lib/tools/exec/bare-runtime.ts'
1729
+ ```
1730
+
1731
+ (#127)
1732
+
1733
+ - **Breaking:** `QVAC_PYODIDE_TEST_LOADER` is gone. A test points
1734
+ `QVAC_PYODIDE_WORKER_ENTRY` at an entry that serves its fake interpreter.
1735
+
1736
+ ```sh
1737
+ # before
1738
+ QVAC_PYODIDE_TEST_LOADER=/path/to/fake-loader.js
1739
+ # after
1740
+ QVAC_PYODIDE_WORKER_ENTRY=/path/to/fake-worker-entry.js
1741
+ ```
1742
+
1743
+ (#127)
1294
1744
 
1295
1745
  ### Fixed
1296
1746
 
1297
- - Python runs start on Bare 1.34, whose threads cannot read a module off disk,
1298
- including in a stowed harness. The worker is spawned through `worker_threads`,
1299
- which the package maps to `bare-worker` on Bare, pyodide is handed its asm
1300
- module as `createPyodideModule`, and the files pyodide reads are named as
1301
- assets, so a bundler carries them beside the bundle. (#127)
1747
+ - Python runs start on Bare 1.34, including in a stowed harness. Threads there
1748
+ cannot read a module off disk, so the worker is spawned through
1749
+ `worker_threads`, which the package maps to `bare-worker` on Bare. Pyodide is
1750
+ handed its asm module as `createPyodideModule`, and the files pyodide reads
1751
+ are named as assets, so a bundler carries them beside the bundle. (#127)
1302
1752
 
1303
1753
  ## [0.6.0] - 2026-09-28
1304
1754
 
1305
1755
  ### Added
1306
1756
 
1307
- - `loadModel({ model, agent })` loads a downloaded chat, embedding, speech or
1308
- transcription model ahead of use, under the key a request for it would load
1309
- under, so the first request finds it loaded. `unloadModel({ model })` unloads
1310
- every copy of a model once the requests holding it finish, and says whether it
1311
- could. Image and music models load for each generation and are refused. A load
1312
- or an unload counts as a call in flight for `setModelIdleTimeout`, and one that
1313
- lands during an idle unload waits for it. Also on the wire as `load-model` and
1314
- `unload-model`. (#133)
1757
+ - A host can load a model before anyone asks for it, and unload it on demand.
1758
+ `loadModel({ model, agent })` loads a downloaded chat, embedding, speech or
1759
+ transcription model under the key a request for it would load under, so the
1760
+ first request finds it loaded. Pass the agent a chat model will run for: its
1761
+ context size and KV cache types are part of that key.
1762
+
1763
+ `unloadModel({ model })` unloads every copy of a model once the requests
1764
+ holding it finish, and says whether it could. Image and music models load for
1765
+ each generation and are refused.
1766
+
1767
+ A load or an unload counts as a call in flight for `setModelIdleTimeout`, and
1768
+ one that lands during an idle unload waits for it. Both are on the wire as
1769
+ `load-model` and `unload-model`. See
1770
+ [Load and unload a model](https://github.com/tetherto/qvac-harness/blob/v0.6.0/README.md#load-and-unload-a-model).
1315
1771
 
1316
1772
  ```js
1773
+ import { QWEN_35_4B } from '@qvac/harness'
1774
+
1317
1775
  const { loaded } = await harness.loadModel({ model: QWEN_35_4B, agent: { ctxSize: 8192 } })
1318
1776
  const { unloaded } = await harness.unloadModel({ model: QWEN_35_4B })
1319
1777
  ```
1320
1778
 
1321
- - A chat model loaded with `loadModel` is pinned: it does not count against
1322
- `completionModelCap`, so several stay loaded at once and a request for
1323
- another model leaves them in place. A manual load never unloads another model
1324
- to fit; it returns `{ loaded: false, reason: 'memory' }` when the SDK's
1325
- `assessModelFit` says it would not fit beside what is loaded. A request always
1326
- gets its model: pinned models no reply is using give way oldest first when it would not fit,
1327
- and a request or a manual load for a model under other settings replaces its idle copy. Image and
1328
- music generation and an idle unload still clear every idle chat model. (#134)
1779
+ (#133)
1780
+
1781
+ - Several chat models can stay loaded at once. A chat model loaded with
1782
+ `loadModel` is pinned: it does not count against `completionModelCap`, and a
1783
+ request for another model leaves it in place.
1784
+
1785
+ A manual load never unloads another model to fit. It returns
1786
+ `{ loaded: false, reason: 'memory' }` when the SDK's `assessModelFit` says it
1787
+ would not fit beside what is loaded, so the host unloads one first. A request
1788
+ always gets its model: when it would not fit, pinned models no reply is using
1789
+ give way oldest first. A request or a manual load for a model under other
1790
+ settings replaces its idle copy. Image and music generation and an idle
1791
+ unload still clear every idle chat model, pinned or not. See
1792
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.6.0/docs/decisions/2026-09-25-a-model-loaded-ahead-of-use-lands-where-its-request-looks.md).
1329
1793
 
1330
1794
  ```js
1795
+ import { QWEN_35_9B } from '@qvac/harness'
1796
+
1331
1797
  const { loaded, reason } = await harness.loadModel({ model: QWEN_35_9B })
1332
1798
  if (reason === 'memory') showNotice('Unload a model first')
1333
1799
  ```
1334
1800
 
1801
+ (#134)
1802
+
1335
1803
  ### Changed
1336
1804
 
1337
- - A model loading or unloading in any pool emits `model` with `catalogChanged`,
1338
- not only a chat model, so `list()` reports a fresh `isLoaded` for embedding,
1339
- speech and transcription models too. (#133)
1340
- - Speech, transcription and embedding requests key their pool entry by the
1341
- model's registry src however the caller names it, so a model named once by
1342
- its catalog name and once by its src is one copy in memory. (#133)
1805
+ - `list()` reports a fresh `isLoaded` for embedding, speech and transcription
1806
+ models, not only chat models. A model loading or unloading in any pool now
1807
+ emits `model` with `catalogChanged`. (#133)
1808
+ - A speech, transcription or embedding model named once by its catalog name and
1809
+ once by its src is one copy in memory. Those requests key their pool entry by
1810
+ the model's registry src however the caller names it. (#133)
1343
1811
 
1344
1812
  ### Fixed
1345
1813
 
1346
1814
  - A chat model loads when the host passes no `llmDevice`. 0.5.0 sent `device`,
1347
1815
  `gpu_layers`, `main-gpu` and `openclCacheDir` to the SDK as `undefined`,
1348
- which the SDK spreads over its defaults: with no device the load failed with
1816
+ which the SDK spreads over its defaults. With no device the load failed with
1349
1817
  "must specify a device: 'gpu' or 'cpu'", and with a device but no
1350
1818
  `llmGpuLayers` the default of 99 GPU layers was lost. Unset fields are left
1351
1819
  out again. (#137)
@@ -1354,25 +1822,39 @@ While the major version is `0`, a breaking change bumps the minor version.
1354
1822
 
1355
1823
  ### Added
1356
1824
 
1357
- - `setModelIdleTimeout(ms)` frees memory once the device has been idle that
1358
- long: with no `completion`, `invoke`, `embed`, `transcribe`, `speak`,
1825
+ - `setModelIdleTimeout(ms)` frees memory on a device that has sat idle that
1826
+ long. With no `completion`, `invoke`, `embed`, `transcribe`, `speak`,
1359
1827
  `speakStream` or `warmModel` call in flight, every idle resident model is
1360
- unloaded, including the image, music and translation runtimes. The next call
1361
- loads what it needs again. `0`, the default, is Never, and arms no timer. A
1362
- turn waiting on a tool or an approval between rounds counts as busy, so it
1363
- keeps its model. Also on the wire as `set-model-idle-timeout`. (#131)
1828
+ unloaded, including the image, music and translation runtimes, and the next
1829
+ call loads what it needs again.
1830
+
1831
+ The clock is device-wide: any call resets it, whichever model it uses. `0`,
1832
+ the default, is Never and arms no timer. A turn waiting on a tool or an
1833
+ approval between rounds counts as busy, so it keeps its model. The call is on
1834
+ an in-process `Harness`, on the `RemoteHarness` client, and on the wire as
1835
+ `set-model-idle-timeout`. See
1836
+ [Freeing memory when idle](https://github.com/tetherto/qvac-harness/blob/v0.5.0/README.md#freeing-memory-when-idle)
1837
+ and
1838
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.5.0/docs/decisions/2026-09-25-idle-unload-is-opt-in-and-device-wide.md).
1364
1839
 
1365
1840
  ```js
1366
- await harness.setModelIdleTimeout(30 * 60_000)
1841
+ await harness.setModelIdleTimeout(30 * 60_000) // 0 turns it off
1367
1842
  ```
1368
1843
 
1844
+ (#131)
1845
+
1369
1846
  - `setCustomModels` entries take an optional `label`, the name the user gave
1370
- the model, and `list()` rows carry it as `label`. The tool-call format is
1371
- matched against the label as well as the file name, so a custom model
1372
- registered under an opaque id still gets its family's format. (#124)
1847
+ the model, and `list()` rows carry it back as `label`.
1848
+
1849
+ The label also picks the tool-call format: the model family (Qwen, Gemma,
1850
+ LFM and so on) is matched against the label as well as the file name, with
1851
+ spaces read as hyphens, so a custom model registered under an opaque id
1852
+ still gets its family's format. (#124)
1373
1853
 
1374
1854
  - `setCustomModels` entries take an optional `contextLength`, the model's
1375
- trained window. (#124)
1855
+ trained window, which caps the context it loads with by default (see
1856
+ Changed). Pass the preview's `contextLength` straight through. See
1857
+ [Register the set](https://github.com/tetherto/qvac-harness/blob/v0.5.0/README.md#register-the-set).
1376
1858
 
1377
1859
  ```js
1378
1860
  await harness.setCustomModels([
@@ -1383,23 +1865,39 @@ While the major version is `0`, a breaking change bumps the minor version.
1383
1865
  contextLength: preview.contextLength
1384
1866
  }
1385
1867
  ])
1868
+
1869
+ const [row] = (await harness.list({ type: 'llm' })).filter(
1870
+ (model) => model.name === 'custom-7f3a'
1871
+ )
1872
+ row.label // 'Gemma 4 E4B'
1386
1873
  ```
1387
1874
 
1875
+ (#124)
1876
+
1388
1877
  ### Changed
1389
1878
 
1390
1879
  - A custom model loads with a context of the smaller of 51,200 tokens and its
1391
- trained `contextLength`, instead of the default. An asked-for context size
1880
+ trained `contextLength`, where it always took 51,200 before. A model trained
1881
+ on 40,960 tokens now loads with 40,960. A context size the caller asks for
1392
1882
  still wins. (#124)
1393
1883
 
1394
1884
  ### Fixed
1395
1885
 
1396
1886
  - `previewModelSource` takes a direct link to one shard of a split `.gguf` as
1397
- the whole set: `src` is the first part, `sizeBytes` adds up every part, and
1398
- the label names the count, as in `model.gguf (3 parts)`. A missing part
1399
- refuses with `not-found` or `unreachable`. (#124)
1400
-
1401
- - `isCached` reports a sharded custom download once every shard is on disk,
1402
- and `deleteModel` removes all of its shards. (#124)
1887
+ the whole set. `src` is the first part, which holds the metadata, and
1888
+ `sizeBytes` adds up every part, so `isCached` can match the finished
1889
+ download. Every part is checked with a `HEAD` request, and a missing part
1890
+ refuses with `not-found` or `unreachable`, naming the part. See
1891
+ [Preview a source before adding it](https://github.com/tetherto/qvac-harness/blob/v0.5.0/README.md#preview-a-source-before-adding-it).
1892
+ (#124)
1893
+
1894
+ - `isCached` reports a sharded custom download once every shard is on disk in
1895
+ the folder the SDK keeps them in; it always read false before. `deleteModel`
1896
+ removes all of its shards, where it left them behind. See
1897
+ [List them](https://github.com/tetherto/qvac-harness/blob/v0.5.0/README.md#list-them)
1898
+ and
1899
+ [Delete a download](https://github.com/tetherto/qvac-harness/blob/v0.5.0/README.md#delete-a-download).
1900
+ (#124)
1403
1901
 
1404
1902
  ## [0.4.0] - 2026-09-24
1405
1903
 
@@ -1408,27 +1906,48 @@ While the major version is `0`, a breaking change bumps the minor version.
1408
1906
  - `previewModelSource({ src, mmprojSrc })` checks a Hugging Face link, a direct
1409
1907
  `.gguf` link or a local path before a host adds it as a custom model. It
1410
1908
  reads the Hugging Face metadata and the file's GGUF header, never the whole
1411
- model. The answer is a file to register (`src`, `sizeBytes`,
1412
- `contextLength`, `architecture`, `sizeLabel`, `taskType`, `license`, `fit`
1413
- and `fitReasons`), a list of `files` to pick from for a repo that holds
1414
- several, or `ok: false` with a `refusal` code and a `reason` to show. It is
1415
- served on the `RemoteHarness` client and on an in-process `Harness`, and its
1416
- types are exported from the package root. (#121)
1909
+ model.
1910
+
1911
+ The answer is one of three:
1912
+
1913
+ - a file to register: `ok: true` with `src`, `sizeBytes`, `contextLength`,
1914
+ `architecture`, `sizeLabel`, `taskType`, `license`, `fit` and
1915
+ `fitReasons`;
1916
+ - a choice: `ok: true` with a list of `files` and no `src`, for a repo that
1917
+ holds several weights;
1918
+ - a refusal: `ok: false` with a `refusal` code and a `reason` to show.
1919
+
1920
+ It is served on the `RemoteHarness` client and on an in-process `Harness`,
1921
+ and its types (`ModelSourcePreview`, `ModelSourceFile`,
1922
+ `ModelSourceRefusal`, `ModelFitVerdict`, `PreviewModelSourceContext`) are
1923
+ exported from the package root. See
1924
+ [Preview a source before adding it](https://github.com/tetherto/qvac-harness/blob/v0.4.0/README.md#preview-a-source-before-adding-it)
1925
+ and
1926
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.4.0/docs/decisions/2026-09-22-a-model-source-is-previewed-before-it-is-added.md).
1417
1927
 
1418
1928
  ```js
1419
1929
  const preview = await harness.previewModelSource({ src: link })
1420
1930
 
1421
1931
  if (!preview.ok) return showError(preview.reason)
1422
- if (!preview.src) return pickOneOf(preview.files) // then preview files[i].src
1423
- if (preview.taskType !== 'llm') return showError('Only an llm runs as a custom model')
1932
+ if (!preview.src) return pickOneOf(preview.files) // preview the pick next
1933
+ if (preview.taskType !== 'llm') {
1934
+ return showError('Only an llm runs as a custom model')
1935
+ }
1424
1936
  ```
1425
1937
 
1426
- - `setCustomModels` entries take `taskType` and `expectedSize`, and `list()`
1427
- returns the registered custom models after the catalog rows, with
1428
- `registrySource: 'custom'`, `isLoaded`, and an `isCached` that is false
1429
- until every file is on disk and, when `expectedSize` is set, adds up to it.
1430
1938
  (#121)
1431
1939
 
1940
+ - `setCustomModels` entries take `taskType` and `expectedSize`, and `list()`
1941
+ returns the registered custom models after the catalog rows, under the same
1942
+ `type` and `cachedOnly` filters.
1943
+
1944
+ A custom row has `registrySource: 'custom'` and `isLoaded`. Its `isCached`
1945
+ is false until every file is on disk and, when `expectedSize` is set, their
1946
+ sizes add up to it, so a partial download is not cached. See
1947
+ [Register the set](https://github.com/tetherto/qvac-harness/blob/v0.4.0/README.md#register-the-set)
1948
+ and
1949
+ [List them](https://github.com/tetherto/qvac-harness/blob/v0.4.0/README.md#list-them).
1950
+
1432
1951
  ```js
1433
1952
  await harness.setCustomModels([
1434
1953
  {
@@ -1444,56 +1963,90 @@ While the major version is `0`, a breaking change bumps the minor version.
1444
1963
  const custom = models.filter((model) => model.registrySource === 'custom')
1445
1964
  ```
1446
1965
 
1966
+ (#121)
1967
+
1447
1968
  - A `modelsDir` Harness option says where downloads live, so `list()` and
1448
1969
  `deleteModel` can find a custom model's files. The spawned sidecar sets it
1449
- from its SDK storage; an in-process `Harness` has to pass it. (#121)
1970
+ from its SDK storage; an in-process `Harness` has to pass it. See
1971
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.4.0/docs/decisions/2026-09-24-a-custom-download-is-found-at-the-sdk-cache-path.md).
1450
1972
 
1451
1973
  ```js
1452
1974
  const harness = new Harness({ modelsDir })
1453
1975
  ```
1454
1976
 
1977
+ (#121)
1978
+
1455
1979
  ### Changed
1456
1980
 
1457
- - `deleteModel(name)` removes the weight and projection a custom model
1458
- downloaded, where it used to remove nothing. It never touches a local path
1459
- the user pointed at, and the model stays registered, listed as not cached.
1460
- (#121)
1981
+ - `deleteModel(name)` frees the disk a custom model's download took: it
1982
+ removes the weight and projection the model downloaded, where it used to
1983
+ remove nothing.
1984
+
1985
+ It never touches a local path the user pointed at, since those are the
1986
+ user's files. The model stays registered and lists as not cached, ready to
1987
+ download again. See
1988
+ [Delete a download](https://github.com/tetherto/qvac-harness/blob/v0.4.0/README.md#delete-a-download).
1461
1989
 
1462
1990
  ```js
1463
1991
  const { removed, freedBytes } = await harness.deleteModel('nanbeige-3b')
1464
1992
  ```
1465
1993
 
1994
+ (#121)
1995
+
1466
1996
  - A custom model name resolves only where an `llm` is loaded, never for
1467
- another task, and a `setCustomModels` entry whose `taskType` is anything
1468
- other than `llm` is not registered. An entry without `taskType` is an `llm`,
1469
- as before. (#121)
1997
+ another task. A `setCustomModels` entry whose `taskType` is anything other
1998
+ than `llm` is not registered. An entry without `taskType` is an `llm`, as
1999
+ before, so a host that registers only text models changes nothing. (#121)
1470
2000
 
1471
2001
  ### Fixed
1472
2002
 
1473
- - A turn that preloads a skill with `@skill`, or names an active skill in its
1474
- prompt, no longer caches the inlined SKILL.md body under the chat's KV key.
1475
- Each such turn left about 7k tokens stranded in the cache, until a later turn
1476
- overflowed the context window and failed. (#120)
2003
+ - A chat no longer fails with a context overflow after turns that load a
2004
+ skill up front. A turn that preloads a skill with `@skill`, or names an
2005
+ active skill in its prompt, used to cache the inlined SKILL.md body under
2006
+ the chat's KV key. Each such turn left about 7k tokens stranded in the
2007
+ cache, until a later turn overflowed the context window and failed. (#120)
1477
2008
 
1478
2009
  ## [0.3.3] - 2026-09-24
1479
2010
 
1480
2011
  ### Changed
1481
2012
 
1482
- - `@qvac/sdk` and `@qvac/inference` 0.20.0. Some addons now ship their
1483
- prebuilds as per-platform packages (`@qvac/<addon>-<os>-<cpu>`, for
1484
- `audiogen-ggml` 0.4 and `tts-ggml` 0.9), which the addon names in its
1485
- `#host-addon` import map, and `@qvac/model-fit` and `@qvac/fabric` join the
1486
- native graph as deferred addons. A host that packages the addons resolves
1487
- prebuilds through that map, and exempts the new package names from any
1488
- install age gate: bun skips a blocked optional dependency without a word,
1489
- and the prebuild goes missing. (#85)
2013
+ - `@qvac/sdk` and `@qvac/inference` 0.20.0. A host that packages the addons
2014
+ has packaging work to do.
2015
+
2016
+ Some addons now ship their prebuilds as per-platform packages
2017
+ (`@qvac/<addon>-<os>-<cpu>`, for `asr-ggml` 0.5, `audiogen-ggml` 0.4 and
2018
+ `tts-ggml` 0.9), which the addon names in its `#host-addon` import map, and
2019
+ `@qvac/model-fit` and `@qvac/fabric` join the native graph as deferred
2020
+ addons. The harness no longer pins `@qvac/asr-ggml` and lets the SDK resolve
2021
+ it.
2022
+
2023
+ A host that packages the addons resolves prebuilds through that map, and
2024
+ exempts the new package names from any install age gate: bun skips a blocked
2025
+ optional dependency without a word, and the prebuild goes missing. See
2026
+ [The published package](https://github.com/tetherto/qvac-harness/blob/v0.3.3/README.md#the-published-package).
2027
+
2028
+ ```toml
2029
+ # bunfig.toml, for each host the app ships to
2030
+ [install]
2031
+ minimumReleaseAgeExcludes = [
2032
+ "@qvac/model-fit",
2033
+ "@qvac/asr-ggml-darwin-arm64",
2034
+ "@qvac/audiogen-ggml-darwin-arm64",
2035
+ "@qvac/tts-ggml-darwin-arm64"
2036
+ ]
2037
+ ```
2038
+
2039
+ (#85)
2040
+
1490
2041
  - A user message with several images reaches the SDK as one turn again. The
1491
2042
  per-image split added for QVAC-24156 is gone, since SDK 0.20 carries the
1492
2043
  upstream fix (llama.cpp #27348) and equal-size still images no longer merge
1493
- as video frames and abort the encode. This release must not be paired with
1494
- SDK 0.19, where that crash comes back. `<key>-vision-history-v1` cache
1495
- directories left by the split are no longer read, and clearing all caches
1496
- removes them. (#116)
2044
+ as video frames and abort the encode.
2045
+
2046
+ This release must not be paired with SDK 0.19, where that crash comes back.
2047
+ `<key>-vision-history-v1` cache directories left by the split are no longer
2048
+ read, and clearing all caches removes them. (#116)
2049
+
1497
2050
  - `@qvac/skills` 0.1.9. The diagrams skill carries every recipe inline, so a 2B
1498
2051
  model no longer loops on loading a reference file it cannot name. The excel
1499
2052
  skill routes a chat image to create rather than edit, the Google OAuth routes
@@ -1511,16 +2064,21 @@ While the major version is `0`, a breaking change bumps the minor version.
1511
2064
 
1512
2065
  ### Changed
1513
2066
 
1514
- - A networked Python run's approval label leads with the hosts its source names
1515
- in a URL, as `python · network: www.youtube.com …`, or says
2067
+ - A person approving a networked Python run now sees where it will connect,
2068
+ and any other host is asked about as the run reaches it.
2069
+
2070
+ The approval label leads with the hosts the source names in a URL, as
2071
+ `python · network: www.youtube.com …`, or says
1516
2072
  `network: no host named in the code`. On an approved run those hosts, and
1517
- their `www.` form, are reached without asking; a subdomain is not. Any other
1518
- host, such as a CDN a library fans out to, a redirect or a URL built at
1519
- runtime, pauses the run and is asked about through the completion's
2073
+ their `www.` form, are reached without asking; a subdomain is not.
2074
+
2075
+ Any other host, such as a CDN a library fans out to, a redirect or a URL
2076
+ built at runtime, pauses the run and is asked about through the completion's
1520
2077
  `askUser` before its name is looked up. A host allowed once stays allowed
1521
2078
  for that run, and silence past a minute counts as a no. A host that does not
1522
2079
  wire `askUser` refuses every unnamed host, and a skip-all run asks nothing.
1523
- (#109)
2080
+ See
2081
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.2/docs/decisions/2026-09-22-python-reaches-the-network-through-the-guarded-fetch.md).
1524
2082
 
1525
2083
  ```js
1526
2084
  for await (const event of harness.completion({
@@ -1535,52 +2093,85 @@ While the major version is `0`, a breaking change bumps the minor version.
1535
2093
  }
1536
2094
  ```
1537
2095
 
2096
+ (#109)
2097
+
1538
2098
  ### Fixed
1539
2099
 
1540
- - A timed-out Python run spun at full CPU until the process was killed when
1541
- Pyodide had no worker thread, as for a stowed bundle whose host does not set
1542
- `QVAC_PYODIDE_WORKER_ENTRY`. It is now interrupted at the deadline, rejects
1543
- with `Command timed out after <ms>ms`, and the interpreter keeps its state. A
2100
+ - A timed-out Python run no longer spins at full CPU until the process is
2101
+ killed when Pyodide has no worker thread, as for a stowed bundle whose host
2102
+ does not set `QVAC_PYODIDE_WORKER_ENTRY`.
2103
+
2104
+ It is now interrupted at the deadline, rejects with
2105
+ `Command timed out after <ms>ms`, and the interpreter keeps its state. A
1544
2106
  blocking call such as a long `time.sleep` still sees the interrupt only once
1545
- it returns. (#104)
1546
- - A timed-out Python run on the worker thread could miss its SIGINT, so the
1547
- worker was killed after the grace window along with the interpreter's state.
1548
- The interrupt is resent every 100 ms until the run settles. (#112)
1549
- - A Python run that failed partway through a save attached the half-written
1550
- file, and each failing retry attached another copy under the same name. A
1551
- non-zero exit now attaches nothing and reports every declared output in
1552
- `missingOutputs`. (#110)
2107
+ it returns. See
2108
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.2/docs/decisions/2026-08-11-pyodide-worker-thread.md).
2109
+ (#104)
2110
+
2111
+ - A timed-out Python run on the worker thread keeps its interpreter state. It
2112
+ could miss its SIGINT, so the worker was killed after the grace window along
2113
+ with the interpreter's state. The interrupt is now resent every 100 ms until
2114
+ the run settles. (#112)
2115
+
2116
+ - A Python run that fails no longer attaches a broken file. A run that failed
2117
+ partway through a save attached the half-written file, and each failing
2118
+ retry attached another copy under the same name. A non-zero exit now
2119
+ attaches nothing and reports every declared output in `missingOutputs`, so
2120
+ the retry writes it again. (#110)
1553
2121
 
1554
2122
  ### Security
1555
2123
 
1556
2124
  - Python in `exec` reached the network whenever the runtime allowed it,
1557
2125
  including a call that auto-ran as a read with no approval prompt, so a
1558
2126
  document build that loads an image from a URL could reach the web without
1559
- anyone seeing it. The network now opens only to a call a person approved or
1560
- that skip-all let through, and sandbox mode stays offline. 0.3.1 is affected.
2127
+ anyone seeing it.
2128
+
2129
+ The network now opens only to a call a person approved or that skip-all let
2130
+ through, and sandbox mode stays offline. 0.3.1 is affected; upgrade from it.
2131
+ See
2132
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.2/docs/decisions/2026-09-22-python-reaches-the-network-through-the-guarded-fetch.md).
1561
2133
  (#108)
1562
2134
 
1563
2135
  ## [0.3.1] - 2026-09-23
1564
2136
 
1565
2137
  ### Added
1566
2138
 
1567
- - Python in `exec` reaches the network on Bare: `urllib`, `http.client` and
1568
- what is built on them, yt-dlp included, work unchanged, and `requests` works
1569
- through urllib3's emscripten backend. Every request goes through the guarded
1570
- fetch the web tools use, so each hop is checked before it is sent,
1571
- credentials do not follow a redirect to another origin, and a response is
1572
- capped at 100 MB. Where the global `fetch` is not the guarded one, as on
1573
- Node, Python stays offline, and sandbox mode keeps it offline everywhere. A
1574
- Python run may now declare `.mp4`, `.webm`, `.m4a` and `.mp3` outputs, each
1575
- checked by its file signature. (#94)
1576
- - `SkillOAuthConfig.verify`, parsed from a skill manifest's
1577
- `setup.routes[].oauth.verify` and carried over the wire, so a host can probe a
1578
- fresh token before saving it. A probe is an https `url` on the same site as
1579
- the route's `tokenUrl`, an optional `GET` or `POST` `method` and JSON `body`,
1580
- and `reject` rules. A rule matches a listed `status`, or a 2xx JSON body whose
1581
- `field` is not `notEqual`, and its `error` names the rejection. A probe that
1582
- breaks these rules is dropped and the route kept. `SkillOAuthVerify` and
1583
- `SkillOAuthVerifyRule` are exported. (#105)
2139
+ - Python in `exec` reaches the network on Bare. `urllib`, `http.client` and
2140
+ what is built on them, yt-dlp included, work unchanged, and `requests`
2141
+ works through urllib3's emscripten backend.
2142
+
2143
+ Every request goes through the guarded fetch the web tools use: each hop is
2144
+ checked before it is sent, credentials do not follow a redirect to another
2145
+ origin, and a response is capped at 100 MB. Where the global `fetch` is not
2146
+ the guarded one, as on Node, Python stays offline, and `sandboxMode` keeps
2147
+ it offline everywhere. A Python run may now declare `.mp4`, `.webm`, `.m4a`
2148
+ and `.mp3` outputs, each checked by its file signature. See
2149
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.1/docs/decisions/2026-09-22-python-reaches-the-network-through-the-guarded-fetch.md).
2150
+ (#94)
2151
+
2152
+ ```js
2153
+ // exec arguments a model can now send on Bare
2154
+ {
2155
+ language: 'python',
2156
+ command:
2157
+ "import urllib.request\n" +
2158
+ "urllib.request.urlretrieve('https://example.com/talk.mp3', 'talk.mp3')",
2159
+ outputs: ['talk.mp3']
2160
+ }
2161
+ ```
2162
+
2163
+ - A host can probe a fresh OAuth token before saving it.
2164
+ `SkillOAuthConfig.verify` is parsed from a skill manifest's
2165
+ `setup.routes[].oauth.verify` and carried over the wire;
2166
+ `SkillOAuthVerify` and `SkillOAuthVerifyRule` are exported. The harness
2167
+ only parses the probe; the host runs it.
2168
+
2169
+ A probe is an https `url` on the same site as the route's `tokenUrl`, an
2170
+ optional `GET` or `POST` `method` and JSON `body`, and `reject` rules. A
2171
+ rule matches a listed `status`, or a 2xx JSON body whose `field` is not
2172
+ `notEqual` (a rule with both needs both), and its `error` names the
2173
+ rejection. A probe that breaks these rules is dropped and the route kept.
2174
+ (#105)
1584
2175
 
1585
2176
  ```js
1586
2177
  const skills = await harness.skills()
@@ -1595,63 +2186,95 @@ While the major version is `0`, a breaking change bumps the minor version.
1595
2186
  ```
1596
2187
 
1597
2188
  - A skill operation may name `response.decode` to turn a provider's JSON body
1598
- into a compact shape before the model sees it, starting with
1599
- `gmail-message`: the ids and labels, the From, To, Subject, Date, Message-ID
1600
- and References headers, the snippet, and the body as text, capped at 4000
1601
- characters. A `gmail-get` request builder joins it. A manifest naming both
1602
- `pick` and `decode`, or a builder or decoder this harness does not have, is
1603
- rejected. (#69)
2189
+ into a compact shape before the model sees it. The first decoder is
2190
+ `gmail-message`: the ids and labels, the From, To, Subject, Date,
2191
+ Message-ID and References headers, the snippet, and the body as text,
2192
+ capped at 4000 characters. A `gmail-get` request builder goes with it.
2193
+
2194
+ A manifest naming both `pick` and `decode`, or a builder or decoder this
2195
+ harness does not have, is rejected. See
2196
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.1/docs/decisions/2026-09-01-skill-operation-manifests.md).
2197
+ (#69)
2198
+
2199
+ ```js
2200
+ // an operation in a skill's operations.json (gmail, @qvac/skills 0.1.7)
2201
+ {
2202
+ tool: 'gmail_get',
2203
+ request: {
2204
+ method: 'GET',
2205
+ url: 'https://gmail.googleapis.com/gmail/v1/users/me/messages/{id}',
2206
+ query: { metadataHeaders: 'Subject,From,To,Date,Message-ID,References' },
2207
+ builder: 'gmail-get'
2208
+ },
2209
+ response: { decode: 'gmail-message' }
2210
+ }
2211
+ ```
1604
2212
 
1605
2213
  ### Changed
1606
2214
 
1607
- - A compiled skill operation whose HTTP method is `GET`, `HEAD` or `OPTIONS` is
1608
- a read: it auto-runs without an approval prompt, like the same request through
1609
- `http_request`, and takes no `intent` argument. MCP operations and every other
1610
- method are still writes that ask. (#69)
1611
- - `@qvac/skills` 0.1.7, now pinned exactly: Gmail reads a message with
2215
+ - A compiled skill operation whose HTTP method is `GET`, `HEAD` or `OPTIONS`
2216
+ now runs without an approval prompt. It is a read, like the same request
2217
+ through `http_request`, and takes no `intent` argument. MCP operations and
2218
+ every other method are still writes that ask. (#69)
2219
+ - `@qvac/skills` 0.1.7, now pinned exactly. Gmail reads a message with
1612
2220
  `gmail_get` instead of telling the model to decode base64, which needs this
1613
2221
  release's decoder, and Asana rejects a non-MCP app at connect time through
1614
2222
  a `verify` probe. (#105)
1615
2223
 
1616
2224
  ### Fixed
1617
2225
 
1618
- - A malformed `<tool_call>` left its JSON arguments in the reply. The whole span
1619
- is now stripped, and an unclosed one is stripped to the end of the text.
1620
- (#100)
2226
+ - A malformed `<tool_call>` left its JSON arguments in the reply. The whole
2227
+ span is now stripped, and an unclosed one is stripped to the end of the
2228
+ text. (#100)
1621
2229
  - A misspelt, placeholder or repeated `skill` load returned an error the model
1622
2230
  retried until the turn ran out. A placeholder or the skill's own name now
1623
- reads the body, a near miss of one of its files loads that file, and a repeat
1624
- is acknowledged without re-reading it. (#101)
2231
+ reads the body, a near miss of one of its files loads that file, and a
2232
+ repeat is acknowledged without re-reading it. (#101)
1625
2233
  - When the model reached for `pip` or a video tool on the shell path, it was
1626
2234
  only told what the path is not, and retried the same call. Each refusal now
1627
2235
  names the call that works, such as `packages: ["requests"]` with the pin a
1628
- vendored package installs offline under. A missing import names the package
1629
- that provides it, and `python -c`, a heredoc or bare Python source runs as
1630
- Python instead of being sent back for a `language` argument. (#71)
2236
+ vendored package installs offline under.
2237
+
2238
+ A missing import names the package that provides it, and `python -c`, a
2239
+ heredoc or bare Python source runs as Python instead of being sent back for
2240
+ a `language` argument. See
2241
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.1/docs/decisions/2026-09-21-exec-names-the-call-that-works.md).
2242
+ (#71)
1631
2243
 
1632
2244
  ## [0.3.0] - 2026-09-23
1633
2245
 
1634
2246
  ### Added
1635
2247
 
1636
- - A `translate` capability for `invoke`: it translates text without loading an
1637
- LLM. The language pair picks the route before anything loads. English and
1638
- one of nine European languages go through the TranslatePsy-EuroNano packs,
1639
- the other 43 languages Bergamot serves go through their per-pair models
1640
- (pivoting through English when neither side is English), and 16 languages
1641
- Bergamot has no model for go through TranslatePsy-AfriSLM, named by ISO 639-1
1642
- or FLORES-200 code. An omitted `from` is detected from the text, except for
1643
- the AfriSLM languages, which need it named. The `tool-result` carries the
1644
- text, the pair and the `engine` that answered. (#76)
2248
+ - A `translate` capability for `invoke`: text translation without loading an
2249
+ LLM. The language pair picks the route before anything loads:
2250
+
2251
+ - English and one of nine European languages go through the
2252
+ TranslatePsy-EuroNano packs.
2253
+ - The other 43 languages Bergamot serves go through their per-pair models,
2254
+ pivoting through English when neither side is English.
2255
+ - 16 languages Bergamot has no model for go through TranslatePsy-AfriSLM,
2256
+ named by ISO 639-1 or FLORES-200 code.
2257
+
2258
+ An omitted `from` is detected from the text, except for the AfriSLM
2259
+ languages, which need it named. The `tool-result` carries the text, the pair
2260
+ and the `engine` that answered (`nmt`, `slm`, or `none` when the text is
2261
+ already in the target language). A pair no route serves, or a source that
2262
+ cannot be detected, comes back as `result.error`. See
2263
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.0/docs/decisions/2026-09-21-translation-pivots-through-english.md).
2264
+ (#76)
1645
2265
 
1646
2266
  ```js
1647
2267
  for await (const event of harness.invoke({
1648
2268
  capability: 'translate',
1649
2269
  args: { text: 'The weather is nice today.', to: 'de' }
1650
2270
  })) {
1651
- if (event.type === 'tool-result') show(event.result.text)
2271
+ if (event.type === 'tool-result') {
2272
+ if (event.result.error) showError(event.result.error)
2273
+ else show(event.result.text)
2274
+ }
1652
2275
  if (event.type === 'error') showError(event.message)
1653
2276
  }
1654
- // result: { text, from, to: 'de', engine: 'nmt', pivoted: false }
2277
+ // result: { text, from: 'en', to: 'de', engine: 'nmt', pivoted: false }
1655
2278
  ```
1656
2279
 
1657
2280
  - `translationPlanFor`, `NMT_TO_ENGLISH`, `NMT_FROM_ENGLISH`,
@@ -1668,18 +2291,23 @@ While the major version is `0`, a breaking change bumps the minor version.
1668
2291
  if ('error' in plan) showError(plan.error)
1669
2292
  ```
1670
2293
 
1671
- - `enhance: 'never' | 'auto'` on `invoke`. With `'auto'`, an image prompt is
1672
- rewritten by a model already resident on the device, and never triggers a
1673
- load: with nothing resident, or a rewrite that fails, the run goes direct.
2294
+ - `enhance: 'never' | 'auto'` on `invoke`, for the `image` capability. With
2295
+ `'auto'`, the prompt is rewritten by a model already resident on the
2296
+ device, and never triggers a load: with nothing resident, or a rewrite that
2297
+ fails, the run goes direct. Omitting `enhance` behaves as `'never'`, which
2298
+ passes the arguments through untouched.
2299
+
1674
2300
  `metrics` reports the `route` taken (`direct` or `enhanced`), the
1675
- `routeModel` used and the tokens the rewrite spent. Omitting `enhance`
1676
- behaves as `'never'`, which passes the arguments through untouched. (#77)
2301
+ `routeModel` used and the tokens the rewrite spent. See
2302
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.3.0/docs/decisions/2026-09-21-a-caller-states-constraints-not-mechanisms.md).
2303
+ (#77)
1677
2304
 
1678
2305
  ```js
1679
2306
  for await (const event of harness.invoke({
1680
2307
  capability: 'image',
1681
2308
  args: { prompt: 'funny meme' },
1682
- enhance: 'auto'
2309
+ enhance: 'auto',
2310
+ attach
1683
2311
  })) {
1684
2312
  if (event.type === 'metrics') log(event.route, event.routeModel)
1685
2313
  }
@@ -1687,33 +2315,56 @@ While the major version is `0`, a breaking change bumps the minor version.
1687
2315
 
1688
2316
  ### Changed
1689
2317
 
1690
- - The bundle defers `@qvac/translation-nmtcpp` like the other inference
1691
- addons, so `prebuilds-manifest.json` now names its prebuilds and a host that
1692
- assembles them beside the bundle has to include it. It is already a
1693
- dependency of `@qvac/sdk`. (#76)
2318
+ - A host that assembles the native prebuilds beside the bundle now has to
2319
+ include `@qvac/translation-nmtcpp`. The bundle defers it like the other
2320
+ inference addons, so `prebuilds-manifest.json` names its prebuilds. It is
2321
+ already a dependency of `@qvac/sdk`, so it is in the host's
2322
+ `node_modules`. See
2323
+ [The published package](https://github.com/tetherto/qvac-harness/blob/v0.3.0/README.md#the-published-package).
2324
+ (#76)
1694
2325
 
1695
2326
  ## [0.2.12] - 2026-09-22
1696
2327
 
2328
+ The first published release with the 0.2.11 changes (`invoke`,
2329
+ `detectLanguage`, `SkillOAuthConfig`), plus the fix below.
2330
+
1697
2331
  ### Fixed
1698
2332
 
1699
- - Sandbox mode refused every `exec` call that installs packages, which broke
1700
- the pdf, presentations, word and excel skills. A request whose packages are
1701
- all vendored now installs from the shipped wheels; one that would fall back
1702
- to PyPI is still refused. (#91)
2333
+ - The pdf, presentations, word and excel skills work again under
2334
+ `sandboxMode`. Sandbox mode refused every `exec` call that installs
2335
+ packages, including installs that never leave the device.
2336
+
2337
+ A request whose packages are all vendored, each pinned to the version the
2338
+ shipped wheels carry, now installs from those wheels. One unvendored
2339
+ package, an unpinned version, or a host that ships no wheels would fall
2340
+ back to PyPI, and is still refused. See
2341
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.2.12/docs/decisions/2026-09-21-sandbox-mode-no-network.md#consequences).
2342
+ (#91)
1703
2343
 
1704
2344
  ## [0.2.11] - 2026-09-22
1705
2345
 
1706
2346
  Tagged but never published to npm; these changes first shipped in 0.2.12.
2347
+ Install 0.2.12 or later to get them.
1707
2348
 
1708
2349
  ### Added
1709
2350
 
1710
2351
  - `invoke({ capability, args })` runs one capability on its own, with no
1711
2352
  model, no dispatch and no approval callback: the caller already decided.
1712
- `image` is the first capability. It is a frame on the existing `completion`
1713
- stream, so it takes the same `attach`, `progress` and abort signal and emits
1714
- the same `tool-call`, `tool-result`, `metrics`, `error` and `aborted` events.
1715
- `metrics` reports `totalTokens: 0`. It is on `Harness` and `RemoteHarness`
1716
- alike, and optional on `HarnessContract`. (#74)
2353
+ `image` is the first capability, and `CAPABILITIES` and `isCapability` list
2354
+ and check the names.
2355
+
2356
+ It is a frame on the existing `completion` stream, so it takes the same
2357
+ `attach`, `progress` and abort signal, and emits the same `tool-call`,
2358
+ `tool-result`, `metrics`, `error` and `aborted` events. `metrics` reports
2359
+ `totalTokens: 0`. An optional `agent` supplies the image defaults (model,
2360
+ steps, size). A failure inside the tool, such as a missing `attach`, comes
2361
+ back as `result.error` on the `tool-result`; the `error` event is for a
2362
+ capability the device lacks or a tool that threw.
2363
+
2364
+ It is on `Harness` and `RemoteHarness` alike, and optional on
2365
+ `HarnessContract`. See
2366
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.2.11/docs/decisions/2026-09-21-a-run-that-loads-no-model.md).
2367
+ (#74)
1717
2368
 
1718
2369
  ```js
1719
2370
  for await (const event of harness.invoke({
@@ -1723,14 +2374,20 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1723
2374
  progress,
1724
2375
  signal
1725
2376
  })) {
1726
- if (event.type === 'tool-result') showImage(event.result)
2377
+ if (event.type === 'tool-result') {
2378
+ // { attachmentId, fileName, byteLength, width, height } or { error }
2379
+ if (event.result.error) showError(event.result.error)
2380
+ else showImage(event.result.attachmentId)
2381
+ }
1727
2382
  if (event.type === 'error') showError(event.message)
1728
2383
  }
1729
2384
  ```
1730
2385
 
1731
- - `detectLanguage({ text, topK })`, served over hrpc as `detect-language` and
1732
- on `RemoteHarness`: language detection with no model to load. Without
1733
- `topK`, or with 1, it answers with the single best match and no
2386
+ - `detectLanguage({ text, topK })`: language detection with no model to load.
2387
+ It is on `Harness`, served over hrpc as `detect-language`, and on
2388
+ `RemoteHarness`.
2389
+
2390
+ Without `topK`, or with 1, it answers with the single best match and no
1734
2391
  probability. Above that it returns ranked candidates with their
1735
2392
  probabilities, best first, and may return fewer than asked. Text it cannot
1736
2393
  place answers `und`. (#75)
@@ -1743,15 +2400,31 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1743
2400
  // [{ code, language, probability }, ...]
1744
2401
  ```
1745
2402
 
1746
- - `SkillOAuthConfig` on `SkillSetupRoute.oauth`, parsed from a skill
1747
- manifest's `setup.routes[].oauth` and carried over the wire, so a host can
1748
- run a skill's OAuth setup from its manifest instead of its own provider
1749
- table. A route missing `stateKey`, `authUrl`, `tokenUrl` or `tokenAuth`
1750
- carries no `oauth`. (#88)
2403
+ - A host can run a skill's OAuth setup from its manifest instead of its own
2404
+ provider table. `SkillSetupRoute.oauth` carries a `SkillOAuthConfig` parsed
2405
+ from `setup.routes[].oauth` and sent over the wire, and `SkillOAuthConfig`
2406
+ is exported.
2407
+
2408
+ `stateKey`, an https `authUrl` and `tokenUrl`, and `tokenAuth`
2409
+ (`pkce-only`, `secret-in-body` or `secret-in-basic`) are required; an
2410
+ `oauth` route without a valid config is dropped. `extraAuthParams` may not
2411
+ override the parameters the flow owns, such as `redirect_uri` or `state`.
2412
+ (#88)
2413
+
2414
+ ```js
2415
+ const skills = await harness.skills()
2416
+ const route = skills
2417
+ .find((skill) => skill.name === 'spotify')
2418
+ ?.setup?.routes?.find((r) => r.kind === 'oauth')
2419
+
2420
+ // { stateKey, authUrl, tokenUrl, scopes, tokenAuth,
2421
+ // extraAuthParams?, registrationEndpoint?, port?, sharedIosSession? }
2422
+ const oauth = route?.oauth
2423
+ ```
1751
2424
 
1752
2425
  ### Changed
1753
2426
 
1754
- - `@qvac/skills` 0.1.6: the eight OAuth skills declare their setup routes'
2427
+ - `@qvac/skills` `^0.1.6`: the eight OAuth skills declare their setup routes'
1755
2428
  OAuth config, the Spotify skill always makes the play call after a search,
1756
2429
  and the weather skill looks the place up with `weather_lookup`. (#88)
1757
2430
 
@@ -1768,11 +2441,17 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1768
2441
 
1769
2442
  ### Added
1770
2443
 
1771
- - `sandboxMode` agent option: an agent with no network access. It withholds
1772
- every tool that reaches the network (the web search, HTTP request and MCP
1773
- toolsets, including skill operations over HTTP or MCP), not just web search.
2444
+ - `sandboxMode` agent option: an agent that cannot reach the network. Set it
2445
+ on the agent and every network tool is withheld before the model sees the
2446
+ catalog: the web search, HTTP request and MCP toolsets, including skill
2447
+ operations compiled over HTTP or MCP, not just web search.
2448
+
1774
2449
  `exec` stays, but refuses package installs and well-known network commands
1775
- such as `curl`, `git` and `npm`. That is a guard, not an OS-level sandbox.
2450
+ such as `curl`, `git` and `npm`. That is a name-list guard, not an OS-level
2451
+ sandbox: another binary, or Python calling `pyfetch`, can still open a
2452
+ socket. The six toolset switches stay independent; this is the one knob
2453
+ that means "no network". See
2454
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.2.10/docs/decisions/2026-09-21-sandbox-mode-no-network.md).
1776
2455
  (#73)
1777
2456
 
1778
2457
  ```js
@@ -1785,12 +2464,17 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1785
2464
  }
1786
2465
  ```
1787
2466
 
1788
- - `@qvac/harness/office`: XLSX and PPTX text extraction for Knowledge beside
1789
- DOCX, through the same bundled Python worker. It keeps sheet names, column
1790
- positions, cached formula values, slide text, grouped shapes and tables;
1791
- speaker notes, images and charts are left out. The format comes from the
1792
- file extension, with `mimeType` as the fallback. `@qvac/harness/docx` is
1793
- unchanged. (#83)
2467
+ - `@qvac/harness/office`: XLSX and PPTX text extraction for Knowledge, beside
2468
+ DOCX, through the same bundled Python worker. `extractOfficeText` picks the
2469
+ format from the file extension, with `mimeType` as the fallback.
2470
+
2471
+ XLSX keeps sheet names, column positions, cached formula values (formula
2472
+ text where there is no cached value). PPTX keeps slide text, grouped shapes
2473
+ and tables in slide order; speaker notes, images and charts are left out.
2474
+ Legacy XLS and PPT are not supported. `@qvac/harness/docx` is unchanged and
2475
+ shares the worker. See
2476
+ [Office extraction](https://github.com/tetherto/qvac-harness/blob/v0.2.10/README.md#office-extraction)
2477
+ for the cache and wheel paths a host sets. (#83)
1794
2478
 
1795
2479
  ```js
1796
2480
  import { extractOfficeText, closeOfficeWorker } from '@qvac/harness/office'
@@ -1802,43 +2486,57 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1802
2486
 
1803
2487
  ### Fixed
1804
2488
 
1805
- - A small model could loop on the same failing tool call, up to the round
1806
- cap. A call that already failed this turn with the same arguments is now
2489
+ - A small model no longer loops on the same failing tool call up to the round
2490
+ cap. A call that already failed this turn with the same arguments is
1807
2491
  answered from its first result without running again, until a later round
1808
- succeeds. Three such answers end the turn's tool rounds. A failure that may
1809
- pass on retry, such as a timeout, a 5xx, 408 or 429, still runs again, and
1810
- the tools that can fail that way now say so in a `code` or `status` field on
1811
- their result. (#78)
1812
- - A guessed `auth.tokenCredentialKey` on `http_request` or `mcp_call` was
1813
- refused with an error claiming the skill was not loaded. It now resolves to
1814
- the one connected credential allowed for that URL, and when none is
1815
- connected the error says so and tells the user to connect it in Skills.
1816
- (#72)
2492
+ succeeds. Three such answers end the turn's tool rounds; the tool set is
2493
+ never changed, so the prompt cache is kept.
2494
+
2495
+ A failure that may pass on retry, such as a timeout, a 5xx, 408 or 429,
2496
+ still runs again, and the tools that can fail that way now say so in a
2497
+ `code` or `status` field on their result. See
2498
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.2.10/docs/decisions/2026-09-21-a-failed-call-is-answered-from-its-own-result.md).
2499
+ (#78)
2500
+
2501
+ - A guessed `auth.tokenCredentialKey` on `http_request` or `mcp_call` now
2502
+ works instead of failing with an error claiming the skill was not loaded.
2503
+ It resolves to the one connected credential allowed for that URL. When
2504
+ none is connected, the error says so and tells the user to connect it in
2505
+ Skills. (#72)
1817
2506
 
1818
2507
  ## [0.2.9] - 2026-09-22
1819
2508
 
1820
2509
  ### Added
1821
2510
 
1822
- - `captureInferenceCalls` on a completion's context: each round then emits an
1823
- `inference-call` event with the exact payload it is about to send (model,
1824
- messages, tools, generation params, cache key and prompt prefix), and an
1825
- `inference-sent` event once it ends, with the tokens it spent, its `outcome`
1826
- (`completed`, `overflowed` or `failed`) and, on the bundled patched SDK, the
1827
- slice of `messages` the KV cache let through. An attempt the overflow ladder
1828
- rejected is still recorded, with its `droppedTurns`. Off unless asked for,
1829
- since every record carries a whole prompt. The flag and both events are new on
1830
- the hrpc wire, so the host and the spawned harness both need 0.2.9. (#51)
2511
+ - A host can record exactly what each inference round sent. Set
2512
+ `captureInferenceCalls` on a completion's context, and each round emits an
2513
+ `inference-call` event with the payload it is about to send: model,
2514
+ messages, tools, generation params, cache key and prompt prefix.
2515
+
2516
+ An `inference-sent` event follows once the round ends, with the tokens it
2517
+ spent, its `outcome` (`completed`, `overflowed` or `failed`) and, on the
2518
+ bundled patched SDK, the slice of `messages` the KV cache let through. An
2519
+ attempt the overflow ladder rejected is still recorded, with its
2520
+ `droppedTurns`. See
2521
+ [What actually gets sent](https://github.com/tetherto/qvac-harness/blob/v0.2.9/docs/kvcache-reference.md#what-actually-gets-sent).
2522
+
2523
+ Off unless asked for, since every record carries a whole prompt. The flag
2524
+ and both events are new on the hrpc wire, so the host and the spawned
2525
+ harness both need 0.2.9. (#51)
1831
2526
 
1832
2527
  ```js
1833
- for await (const event of harness.completion({ model, messages, captureInferenceCalls: true })) {
1834
- if (event.type === 'inference-call') record(event.call.round, event.call.messages)
1835
- if (event.type === 'inference-sent') settle(event.round, event.outcome, event.tokens)
2528
+ const context = { model, agent, messages, captureInferenceCalls: true }
2529
+ for await (const event of harness.completion(context)) {
2530
+ if (event.type === 'inference-call') record(event.call)
2531
+ if (event.type === 'inference-sent') settle(event.round, event.outcome)
1836
2532
  }
1837
2533
  ```
1838
2534
 
1839
- - The `metrics` event carries the last round's `stopReason`, and leaves it out
1840
- when the SDK reports none. A turn cut off by the context window ends cleanly
1841
- with `stopReason: 'length'`, so a host can tell it from a complete answer.
2535
+ - A host can tell a cut-off answer from a complete one. The `metrics` event
2536
+ carries the last round's `stopReason`, and leaves it out when the SDK
2537
+ reports none. A turn cut off by the context window ends cleanly with
2538
+ `stopReason: 'length'`. See
2539
+ [Compaction](https://github.com/tetherto/qvac-harness/blob/v0.2.9/docs/kvcache-reference.md#compaction).
1842
2540
  (#62)
1843
2541
 
1844
2542
  ```js
@@ -1855,15 +2553,21 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1855
2553
  ### Added
1856
2554
 
1857
2555
  - `weather_lookup`, a tool that looks weather up on wttr.in by `location` and
1858
- leads its report with the place the service actually resolved. When that
1859
- place disagrees with the country or state the user named, it refuses instead
1860
- of reporting the weather of wherever the geocoder landed: a nonexistent town
1861
- no longer gets a forecast, and a bare "Rome" the service places in Togo says
1862
- so. It is offered only once the weather skill is loaded, needs no approval,
1863
- and the `http-request` toolset switch turns it off. The spawned sidecar
1864
- registers it; an in-process host adds it to its tools. (#52)
2556
+ leads its report with the place the service actually resolved.
2557
+
2558
+ When that place disagrees with the country or state the user named, it
2559
+ refuses instead of reporting the weather of wherever the geocoder landed: a
2560
+ nonexistent town no longer gets a forecast, and a bare "Rome" the service
2561
+ places in Togo says so.
2562
+
2563
+ It is offered only once the weather skill is loaded, needs no approval, and
2564
+ the `http-request` toolset switch turns it off. The spawned sidecar registers
2565
+ it; an in-process host adds it to its tools. See
2566
+ [the decision record](https://github.com/tetherto/qvac-harness/blob/v0.2.8/docs/decisions/2026-09-16-a-lookup-reports-the-place-it-resolved.md).
2567
+ (#52)
1865
2568
 
1866
2569
  ```js
2570
+ import { Harness } from '@qvac/harness'
1867
2571
  import { createWeatherLookupTool } from '@qvac/harness/lib/tools/weather-lookup.ts'
1868
2572
 
1869
2573
  const harness = new Harness({ tools: [...tools, createWeatherLookupTool()] })
@@ -1878,20 +2582,25 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1878
2582
  the version. (#55)
1879
2583
 
1880
2584
  ```js
1881
- // 0.2.7
2585
+ // before
2586
+ import { currentReleaseLine } from '@qvac/harness/schema/release-tags'
1882
2587
  const line = currentReleaseLine(root) // '0.2'
1883
2588
 
1884
- // 0.2.8
2589
+ // after
2590
+ import { currentReleaseVersion } from '@qvac/harness/schema/release-tags'
1885
2591
  const version = currentReleaseVersion(root) // Version 0.2.8
1886
2592
  const line = `${version.major}.${version.minor}`
1887
2593
  ```
1888
2594
 
1889
- - `previousReleaseTags` from the same module now counts the newest shipped tag
1890
- on the line being built as a baseline, not only older lines, so a schema
1891
- change is checked against the build users are running. Only tags newer than
1892
- the package version are left out. A host that regenerates its `spec/`
1893
- against it re-derives hyperschema's version counters once, so expect one
1894
- regeneration commit after upgrading. (#55, #58)
2595
+ - A schema change is now checked against the build users are running.
2596
+ `previousReleaseTags` from the same module counts the newest shipped tag on
2597
+ the line being built as a baseline, not only older lines; only tags newer
2598
+ than the package version are left out.
2599
+
2600
+ A host that regenerates its `spec/` against it re-derives hyperschema's
2601
+ version counters once, so expect one regeneration commit after upgrading.
2602
+ (#55, #58)
2603
+
1895
2604
  - `@qvac/skills` 0.1.4: the Apple Notes create-note operation no longer
1896
2605
  renames a note after creating it, which failed on iCloud accounts and left
1897
2606
  duplicate notes behind. (#48)
@@ -1900,14 +2609,17 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1900
2609
 
1901
2610
  ### Added
1902
2611
 
1903
- - `@qvac/harness/docx`: `extractDocxText` pulls a DOCX file's text for
1904
- Knowledge with the bundled Python runtime, keeping paragraphs and tables in
1905
- document order, one row per line with cells joined by `' | '`. It takes up to
1906
- 20 MiB and only the shipped wheels, never a network install. Set
1907
- `QVAC_PYODIDE_CACHE_DIR` to a writable directory first, so the worker seeds
1908
- its cache from those wheels and works offline. A bundled host also sets
1909
- `QVAC_PYODIDE_WORKER_ENTRY` and `QVAC_PYTHON_WHEELS_DIR` to its staged
1910
- worker and wheels. (#46)
2612
+ - `@qvac/harness/docx`: `extractDocxText` gives Knowledge a DOCX file's text,
2613
+ pulled with the bundled Python runtime. Paragraphs and tables keep document
2614
+ order, one table row per line with cells joined by `' | '`.
2615
+
2616
+ It takes up to 20 MiB and only the shipped wheels, never a network install.
2617
+ Set `QVAC_PYODIDE_CACHE_DIR` to a writable directory first, so the worker
2618
+ seeds its cache from those wheels and works offline. A bundled host also
2619
+ sets `QVAC_PYODIDE_WORKER_ENTRY` and `QVAC_PYTHON_WHEELS_DIR` to its staged
2620
+ worker and wheels. See
2621
+ [DOCX extraction](https://github.com/tetherto/qvac-harness/blob/v0.2.7/README.md#docx-extraction).
2622
+ (#46)
1911
2623
 
1912
2624
  ```js
1913
2625
  import { extractDocxText, closeDocxWorker } from '@qvac/harness/docx'
@@ -1939,36 +2651,45 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1939
2651
  })
1940
2652
  ```
1941
2653
 
1942
- - `writeClient` and `writeCapabilities` from `@qvac/harness/schema/generate`
1943
- take an options argument whose `optionalRequests` names the request types a
1944
- caller may omit: the generated client sends `{}` for them and the generated
1945
- capability types mark the input optional. Left out, only `@assistant/empty`
1946
- is optional, as before. A set you pass replaces that default, so include it
1947
- if you still want it. `writeClient` still takes an export name as a string.
1948
- (#44)
2654
+ - A caller can declare which hrpc requests may be omitted. `writeClient` and
2655
+ `writeCapabilities` from `@qvac/harness/schema/generate` take an options
2656
+ argument whose `optionalRequests` names those request types: the generated
2657
+ client sends `{}` for them, and the generated capability types mark the input
2658
+ optional.
2659
+
2660
+ Left out, only `@assistant/empty` is optional, as before. A set you pass
2661
+ replaces that default, so include it if you still want it. `writeClient`
2662
+ still takes an export name as a string. (#44)
1949
2663
 
1950
2664
  ```js
1951
2665
  import { writeClient, writeCapabilities } from '@qvac/harness/schema/generate'
1952
2666
 
1953
2667
  const optionalRequests = new Set(['@assistant/empty', '@assistant/mesh-scope'])
1954
- writeClient(builder, 'spec/calls.js', { exportName: 'engineClient', optionalRequests })
2668
+ writeClient(builder, 'spec/calls.js', {
2669
+ exportName: 'engineClient',
2670
+ optionalRequests
2671
+ })
1955
2672
  writeCapabilities(builder, 'spec/capabilities.d.ts', { optionalRequests })
1956
2673
  ```
1957
2674
 
1958
2675
  ### Changed
1959
2676
 
1960
- - A completion that needs a different model no longer loads it beside one a
1961
- live run is holding. It waits for that run to release its model, for up to
1962
- five minutes, and then loads anyway rather than failing. A `warmModel` call
1963
- waits two seconds at most, and skips the warm if no room was made. (#41)
2677
+ - Switching models no longer stacks a second one in memory beside a live run.
2678
+ A completion that needs a different model waits for that run to release its
2679
+ model, for up to five minutes, and then loads anyway rather than failing.
2680
+
2681
+ A `warmModel` call waits two seconds at most, and skips the warm if no room
2682
+ was made. (#41)
1964
2683
 
1965
2684
  ## [0.2.5] - 2026-09-14
1966
2685
 
1967
2686
  ### Added
1968
2687
 
1969
- - A `gpuStats` option on `spawnHarness`, `harnessChild` and `HarnessOptions`.
1970
- A host that already has the GPU reading passes it, and the harness skips its
1971
- own probe. Left out, the harness probes for itself. (#36)
2688
+ - A host that already has the GPU reading can hand it over: a `gpuStats`
2689
+ option on `spawnHarness`, `harnessChild` and `HarnessOptions`, and the
2690
+ harness skips its own probe. Left out, the harness probes for itself. It
2691
+ takes the `bare-gpu-info` shape: `memory.totalBytes` and `gpu.devices`, each
2692
+ with a `name` and `videoMemoryBytes`. (#36)
1972
2693
 
1973
2694
  ```js
1974
2695
  import { spawnHarness } from '@qvac/harness/lib/spawn.ts'
@@ -1978,54 +2699,72 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
1978
2699
  sdkStorage,
1979
2700
  gpuStats: {
1980
2701
  memory: { totalBytes: os.totalmem() },
1981
- gpu: { devices: [{ name: 'NVIDIA RTX 4070', videoMemoryBytes: 12884901888 }] }
2702
+ gpu: {
2703
+ devices: [{ name: 'NVIDIA RTX 4070', videoMemoryBytes: 12884901888 }]
2704
+ }
1982
2705
  }
1983
2706
  })
1984
2707
  ```
1985
2708
 
1986
2709
  ### Fixed
1987
2710
 
1988
- - On a Linux snap the harness exited about a second after `open`, and the
1989
- supervisor respawned it in a loop: the boot-time capability probe created a
1990
- second GPU-info instance beside the SDK's own. On Linux and Windows under
1991
- Bare, GPUs are now enumerated in a short-lived child process, which gives up
1992
- after 5 seconds and reports no GPU. (#36)
1993
- - On Windows, asking for an image after a presentation left the chat stuck on
1994
- "Loading … into memory". Pyodide's boot opened the process streams from the
1995
- Python worker thread, which blocked the image-model loader's progress. Boot
1996
- now never touches them; a run's own output capture is unchanged. (#34)
2711
+ - The harness stays up on a Linux snap. It exited about a second after `open`,
2712
+ and the supervisor respawned it in a loop: the boot-time capability probe
2713
+ created a second GPU-info instance beside the SDK's own.
2714
+
2715
+ On Linux and Windows under Bare, GPUs are now enumerated in a short-lived
2716
+ child process, which gives up after 5 seconds and reports no GPU. (#36)
2717
+
2718
+ - On Windows, asking for an image after a presentation no longer leaves the
2719
+ chat stuck on "Loading … into memory". Pyodide's boot opened the process
2720
+ streams from the Python worker thread, which blocked the image-model loader's
2721
+ progress. Boot now never touches them; a run's own output capture is
2722
+ unchanged. (#34)
1997
2723
 
1998
2724
  ## [0.2.4] - 2026-09-12
1999
2725
 
2000
2726
  ### Added
2001
2727
 
2002
- - `@qvac/harness/worker/stow-entry.mjs`: the sidecar entry, published so a
2003
- host running from inside `node_modules` spawns the engine without the
2004
- prebuilt bundle. Every native addon then resolves beside the JS that calls
2005
- it, from one install. With the bundle, the addons come from the host's own
2006
- install, and a version skew there hangs the child on boot rather than
2007
- throwing: `@qvac/core` 0.1.2 shipped that way. The bundle stays published
2008
- for a host that relocates the code out of `node_modules`. (#31)
2728
+ - `@qvac/harness/worker/stow-entry.mjs`: a sidecar entry a host running from
2729
+ inside `node_modules` spawns directly, without the prebuilt bundle. Every
2730
+ native addon then resolves beside the JS that calls it, from one install.
2731
+
2732
+ With the bundle, the addons come from the host's own install, and a version
2733
+ skew there hangs the child on boot rather than throwing: `@qvac/core` 0.1.2
2734
+ shipped that way. The bundle stays published for a host that relocates the
2735
+ code out of `node_modules`. (#31)
2009
2736
 
2010
2737
  ```js
2011
2738
  import { harnessChild } from '@qvac/harness/lib/spawn.ts'
2012
2739
 
2013
2740
  const entry = new URL(import.meta.resolve('@qvac/harness/worker/stow-entry.mjs')).pathname
2014
- const spec = harnessChild(entry, { runner, skillsDir, wheelsDir, sdkStorage: storage.sdk })
2741
+ const spec = harnessChild(entry, {
2742
+ runner,
2743
+ skillsDir,
2744
+ wheelsDir,
2745
+ sdkStorage: storage.sdk
2746
+ })
2015
2747
  ```
2016
2748
 
2017
2749
  ## [0.2.3] - 2026-09-12
2018
2750
 
2019
2751
  ### Added
2020
2752
 
2021
- - `schema/generate` emits `writeStream` on the generated `HandlerFrames`, so a
2022
- duplex handler's frames type without a local widening. (#29)
2753
+ - A duplex handler's frames now type without a local widening:
2754
+ `schema/generate` emits `writeStream` on the generated `HandlerFrames`.
2755
+ (#29)
2756
+
2757
+ ```js
2758
+ // in a generated spec, a duplex handler can watch its write side close
2759
+ frames.writeStream?.on('close', onClose)
2760
+ ```
2023
2761
 
2024
2762
  ### Changed
2025
2763
 
2026
- - On Android and iOS, `resolveStorage` keeps models under the app's own
2027
- persistent root instead of the device HOME, which an app cannot write.
2028
- Desktop and Snap are unchanged, and `overrides.models` still wins. (#29)
2764
+ - Models download on Android and iOS. `resolveStorage` keeps them under the
2765
+ app's own persistent root there, instead of the device HOME, which an app
2766
+ cannot write. Desktop and Snap are unchanged, and `overrides.models` still
2767
+ wins. (#29)
2029
2768
 
2030
2769
  ```js
2031
2770
  import { resolveStorage } from '@qvac/harness/storage'
@@ -2037,37 +2776,41 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2037
2776
 
2038
2777
  ### Fixed
2039
2778
 
2040
- - Every `./lib/tools/*` subpath is published. The tarball listed only the ones
2041
- `qvac-core` imports, so the mobile worklet's file tools (`file-glob`, `grep`,
2042
- `read-files`, `create-documents`, `edit-documents`, `fs/scope`) failed with
2043
- `PACKAGE_PATH_NOT_EXPORTED`. 0.1.1 to 0.2.2 are affected. (#29)
2779
+ - The mobile worklet's file tools load again. Every `./lib/tools/*` subpath is
2780
+ published now; the tarball listed only the ones `qvac-core` imports, so
2781
+ `file-glob`, `grep`, `read-files`, `create-documents`, `edit-documents` and
2782
+ `fs/scope` failed with `PACKAGE_PATH_NOT_EXPORTED`. 0.1.1 to 0.2.2 are
2783
+ affected. (#29)
2044
2784
 
2045
2785
  ## [0.2.2] - 2026-09-11
2046
2786
 
2047
2787
  ### Fixed
2048
2788
 
2049
- - A stale lockfile entry gave `@qvac/sdk` its own nested `@qvac/inference`
2050
- 0.19.1, beside the patched 0.19.0 the harness pins. The bundle is built from
2051
- the pinned copy alone again. (#27)
2789
+ - The engine bundle runs on the patched `@qvac/inference` 0.19.0 the harness
2790
+ pins, and nothing else. A stale lockfile entry had given `@qvac/sdk` its own
2791
+ nested `@qvac/inference` 0.19.1 beside it. A packaging fix with no API
2792
+ change. (#27)
2052
2793
 
2053
2794
  ## [0.2.1] - 2026-09-11
2054
2795
 
2055
2796
  ### Fixed
2056
2797
 
2057
- - The generated wire spec in 0.2.0 stamped the fields it added (`downloaded`
2058
- on a download event and as a model status, and `kvCacheKey`) with schema
2059
- version 7, the version 0.1.2 already shipped. They are version 8 now, so the
2060
- spec matches the schema it is built from. (#25)
2798
+ - The generated wire spec matches the schema it is built from again. 0.2.0
2799
+ stamped the fields it added (`downloaded` on a download event and as a model
2800
+ status, and `kvCacheKey`) with schema version 7, the version 0.1.2 already
2801
+ shipped. They are version 8 now. Only the generated spec changed; no API
2802
+ change. (#25)
2061
2803
 
2062
2804
  ## [0.2.0] - 2026-09-11
2063
2805
 
2064
2806
  ### Added
2065
2807
 
2066
- - `deleteKvCache(kvCacheKey)` deletes one chat's KV cache, every file kept
2067
- under that key, where `clearKvCache()` deletes them all. It is safe on a key
2068
- still in use: the next turn under it primes from scratch. It rides a new
2069
- `delete-kv-cache` hrpc route, and resolves with `{ status }` like
2070
- `clearKvCache`. (#22)
2808
+ - `deleteKvCache(kvCacheKey)` deletes one chat's KV cache: every file kept
2809
+ under that key. `clearKvCache()` still deletes them all.
2810
+
2811
+ It is safe on a key still in use: the next turn under it primes from scratch.
2812
+ It rides a new `delete-kv-cache` hrpc route, and resolves with `{ status }`
2813
+ like `clearKvCache`. (#22)
2071
2814
 
2072
2815
  ```js
2073
2816
  // the cacheKey the chat's completions ran under
@@ -2075,11 +2818,13 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2075
2818
  if (result.status !== 'success') log(result.error)
2076
2819
  ```
2077
2820
 
2078
- - A download's `complete` event carries `downloaded`, `true` when bytes were
2079
- fetched and `false` when the model was already on disk. An image model's
2080
- `model` events report `loading` rather than `downloading` when it is cached,
2081
- and a new `downloaded` status once a fetched one has loaded, so a host that
2082
- switches over `status` has one more case. (#22)
2821
+ - A host can tell a fresh download from a model already on disk. A download's
2822
+ `complete` event carries `downloaded`: `true` when bytes were fetched,
2823
+ `false` when the model was already there.
2824
+
2825
+ An image model's `model` events report `loading` rather than `downloading`
2826
+ when it is cached, and a new `downloaded` status once a fetched one has
2827
+ loaded, so a host that switches over `status` has one more case. (#22)
2083
2828
 
2084
2829
  ```js
2085
2830
  for await (const event of harness.download({ model })) {
@@ -2091,28 +2836,63 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2091
2836
  })
2092
2837
  ```
2093
2838
 
2094
- - `ToolDefinition.prompt`: an optional compact `description` and `parameters`
2095
- the model is shown in place of the full ones, which still validate the call.
2096
- `exec` and `skill` ship one, so every turn spends less of the prompt on
2097
- their schemas. (#22)
2098
- - `CONTEXT_OVERFLOW_MESSAGE` is exported, the message a turn fails with when
2099
- it does not fit the model's context window, so a host can tell that failure
2100
- apart and compact the chat. (#22)
2839
+ - `ToolDefinition.prompt` lets a tool show the model a shorter schema: an
2840
+ optional compact `description` and `parameters` sent in place of the full
2841
+ ones, which still validate the call. `exec` and `skill` ship one, so every
2842
+ turn spends less of the prompt on their schemas. (#22)
2843
+
2844
+ ```js
2845
+ const lookup = {
2846
+ name: 'lookup',
2847
+ description: 'Look a record up by its id, and return ...',
2848
+ parameters: {
2849
+ type: 'object',
2850
+ properties: { id: { type: 'string', description: 'The record id ...' } },
2851
+ required: ['id']
2852
+ },
2853
+ // what the model sees; the full schema above still validates the call
2854
+ prompt: {
2855
+ description: 'Look a record up by id.',
2856
+ parameters: {
2857
+ type: 'object',
2858
+ properties: { id: { type: 'string' } },
2859
+ required: ['id']
2860
+ }
2861
+ },
2862
+ toolset: null,
2863
+ effect: () => 'read',
2864
+ execute: async ({ id }) => find(id)
2865
+ }
2866
+ ```
2867
+
2868
+ - `CONTEXT_OVERFLOW_MESSAGE` is exported: the message a turn fails with when it
2869
+ does not fit the model's context window. A host can tell that failure apart
2870
+ and compact the chat. (#22)
2101
2871
 
2102
2872
  ```js
2103
2873
  import { CONTEXT_OVERFLOW_MESSAGE } from '@qvac/harness'
2874
+
2875
+ if (event.type === 'error' && event.message === CONTEXT_OVERFLOW_MESSAGE) {
2876
+ compact(chat)
2877
+ }
2104
2878
  ```
2105
2879
 
2106
2880
  - With `QVAC_HARNESS_LOG=1`, each turn logs `sdk tool definitions`: the tool
2107
2881
  schemas it sent, largest first, with each one's size and the skill that
2108
2882
  granted it. (#22)
2109
2883
 
2884
+ ```sh
2885
+ QVAC_HARNESS_LOG=1 bare host.js
2886
+ ```
2887
+
2110
2888
  ### Changed
2111
2889
 
2112
2890
  - `@qvac/sdk` 0.19.0, pinned exactly. Under Bare the SDK is now served by
2113
2891
  `@qvac/inference` 0.19.0, through a new `#sdk` import alias.
2114
- `@qvac/audiogen-ggml` joins the deferred addons, so `prebuilds-manifest.json`
2115
- names it and the host provides it too. (#22)
2892
+
2893
+ `@qvac/audiogen-ggml` joins the deferred addons, so
2894
+ `prebuilds-manifest.json` names it and the host provides it too. (#22)
2895
+
2116
2896
  - Image and music generation schemas reach the model once their skill's
2117
2897
  instructions are loaded, not as soon as the skill is enabled. Loading the
2118
2898
  skill unlocks them within the same turn, at the cost of one cache re-prime
@@ -2127,10 +2907,11 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2127
2907
 
2128
2908
  ### Fixed
2129
2909
 
2130
- - `@qvac/harness/sdk-storage` and `@qvac/harness/sdk-config-loader` failed to
2131
- resolve under Bare with `MODULE_NOT_FOUND`: the tarball carried only the Node
2132
- loader behind `#sdk-config-loader`, so `configureSdkStorage()` could not run
2133
- on Bare. Both loaders ship now. 0.1.1 is affected. (#20)
2910
+ - `configureSdkStorage()` runs under Bare again.
2911
+ `@qvac/harness/sdk-storage` and `@qvac/harness/sdk-config-loader` failed to
2912
+ resolve there with `MODULE_NOT_FOUND`, because the tarball carried only the
2913
+ Node loader behind `#sdk-config-loader`. Both loaders ship now. 0.1.1 is
2914
+ affected. (#20)
2134
2915
 
2135
2916
  ```js
2136
2917
  // Bare: loads again, nothing else changes
@@ -2141,13 +2922,15 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2141
2922
 
2142
2923
  ### Added
2143
2924
 
2144
- - The library surface ships compiled: `dist-lib/` carries JavaScript and a
2145
- `.d.ts` for every export, so `@qvac/harness` and its subpaths import from
2146
- npm under plain Node or Bare, with no TypeScript source or type-stripping
2147
- loader. Export keys are unchanged, `.ts`-suffixed deep paths included, so a
2148
- host that took the library from the repository switches to the package
2149
- without editing a specifier. Of `./lib/tools/*`, only the paths `qvac-core`
2150
- imports are published. (#18)
2925
+ - `@qvac/harness` and its subpaths now import from npm under plain Node or
2926
+ Bare, with no TypeScript source or type-stripping loader. The library surface
2927
+ ships compiled: `dist-lib/` carries JavaScript and a `.d.ts` for every
2928
+ export.
2929
+
2930
+ Export keys are unchanged, `.ts`-suffixed deep paths included, so a host that
2931
+ took the library from the repository switches to the package without editing
2932
+ a specifier. Of `./lib/tools/*`, only the paths `qvac-core` imports are
2933
+ published. (#18)
2151
2934
 
2152
2935
  ```js
2153
2936
  import { harnessChild, spawnHarness } from '@qvac/harness/lib/spawn.ts'
@@ -2158,13 +2941,18 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2158
2941
 
2159
2942
  ### Added
2160
2943
 
2161
- - First release of the QVAC engine as `@qvac/harness`. The tarball is the
2162
- prebuilt `dist/harness.bundle`, one bundle for every platform, and the
2163
- generated `dist/harness.cjs` a host requires to spawn it as a bare-sidecar
2164
- process. It spawns and does not import: the export map points at library
2944
+ - First release of the QVAC engine as `@qvac/harness`. A host gets the
2945
+ prebuilt engine, `dist/harness.bundle` (one bundle for every platform), and
2946
+ the generated `dist/harness.cjs` it requires to spawn that bundle as a
2947
+ bare-sidecar process.
2948
+
2949
+ The package spawns; it does not import. Its export map points at library
2165
2950
  source the tarball leaves out, so a host takes `spawnHarness`,
2166
2951
  `harnessChild` and the transport from the repository until a compiled
2167
- surface ships. (#13)
2952
+ surface ships. See
2953
+ [The npm artifact spawns; it does not import](https://github.com/tetherto/qvac-harness/blob/v0.1.0/README.md#the-npm-artifact-spawns-it-does-not-import)
2954
+ and [Spawning](https://github.com/tetherto/qvac-harness/blob/v0.1.0/README.md#spawning).
2955
+ (#13)
2168
2956
 
2169
2957
  ```js
2170
2958
  const harness = require('@qvac/harness/dist/harness.cjs')
@@ -2172,17 +2960,24 @@ Tagged but never published to npm; these changes first shipped in 0.2.12.
2172
2960
  const { ipc, sidecar, exit } = await harness.start(args)
2173
2961
  ```
2174
2962
 
2175
- - `dist/prebuilds-manifest.json` names every native prebuild directory the
2176
- bundle defers, keyed by its path relative to the bundle. The host assembles
2177
- those beside the bundle from its own `node_modules`, and installs the
2178
- `@qvac` inference addons and `pyodide` alongside. (#13)
2963
+ - `dist/prebuilds-manifest.json` tells a host which native prebuilds to supply.
2964
+ It names every prebuild directory the bundle defers, keyed by its path
2965
+ relative to the bundle. The host assembles those beside the bundle from its
2966
+ own `node_modules`, and installs the `@qvac` inference addons and `pyodide`
2967
+ alongside. (#13)
2179
2968
  - Skills come from `@qvac/skills` 0.1.2, a content-addressed bundle the
2180
2969
  harness materializes at runtime. The Python wheels the tool runtime installs
2181
2970
  ship in `wheels/`, each pinned by hash in `wheels/manifest.json`. (#13, #15)
2182
- - GPU stats are read through `bare-gpu-info`, so every dependency installs from
2183
- the public npm registry. (#12)
2184
-
2185
- [Unreleased]: https://github.com/tetherto/qvac-harness/compare/v0.8.5...HEAD
2971
+ - Every dependency installs from the public npm registry: GPU stats are read
2972
+ through `bare-gpu-info`. (#12)
2973
+
2974
+ [Unreleased]: https://github.com/tetherto/qvac-harness/compare/v0.8.11...HEAD
2975
+ [0.8.11]: https://github.com/tetherto/qvac-harness/compare/v0.8.10...v0.8.11
2976
+ [0.8.10]: https://github.com/tetherto/qvac-harness/compare/v0.8.9...v0.8.10
2977
+ [0.8.9]: https://github.com/tetherto/qvac-harness/compare/v0.8.8...v0.8.9
2978
+ [0.8.8]: https://github.com/tetherto/qvac-harness/compare/v0.8.7...v0.8.8
2979
+ [0.8.7]: https://github.com/tetherto/qvac-harness/compare/v0.8.6...v0.8.7
2980
+ [0.8.6]: https://github.com/tetherto/qvac-harness/compare/v0.8.5...v0.8.6
2186
2981
  [0.8.5]: https://github.com/tetherto/qvac-harness/compare/v0.8.0...v0.8.5
2187
2982
  [0.8.0]: https://github.com/tetherto/qvac-harness/compare/v0.7.3...v0.8.0
2188
2983
  [0.7.3]: https://github.com/tetherto/qvac-harness/compare/v0.7.2...v0.7.3