@qvac/harness 0.3.0 → 0.3.2

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 (68) hide show
  1. package/CHANGELOG.md +262 -0
  2. package/dist/harness.bundle +15 -11
  3. package/dist-lib/index.d.ts +1 -1
  4. package/dist-lib/lib/capabilities/completion.d.ts +5 -1
  5. package/dist-lib/lib/capabilities/completion.js +20 -8
  6. package/dist-lib/lib/helpers/tool-call-markup.js +15 -7
  7. package/dist-lib/lib/no-redirect-fetch-impl.d.ts +3 -2
  8. package/dist-lib/lib/no-redirect-fetch-impl.js +4 -1
  9. package/dist-lib/lib/tools/exec/adapters/adapter.d.ts +5 -1
  10. package/dist-lib/lib/tools/exec/adapters/python/distributions.d.ts +1 -0
  11. package/dist-lib/lib/tools/exec/adapters/python/distributions.js +4 -0
  12. package/dist-lib/lib/tools/exec/adapters/python/guarded-fetch.d.ts +72 -0
  13. package/dist-lib/lib/tools/exec/adapters/python/guarded-fetch.js +222 -0
  14. package/dist-lib/lib/tools/exec/adapters/python/interrupt-timer.d.ts +5 -0
  15. package/dist-lib/lib/tools/exec/adapters/python/interrupt-timer.js +29 -0
  16. package/dist-lib/lib/tools/exec/adapters/python/loader.js +2 -1
  17. package/dist-lib/lib/tools/exec/adapters/python/module-distributions.d.ts +1 -0
  18. package/dist-lib/lib/tools/exec/adapters/python/module-distributions.js +52 -0
  19. package/dist-lib/lib/tools/exec/adapters/python/named-hosts.d.ts +2 -0
  20. package/dist-lib/lib/tools/exec/adapters/python/named-hosts.js +15 -0
  21. package/dist-lib/lib/tools/exec/adapters/python/net-shim.d.ts +2 -0
  22. package/dist-lib/lib/tools/exec/adapters/python/net-shim.js +148 -0
  23. package/dist-lib/lib/tools/exec/adapters/python/output-policy.js +13 -1
  24. package/dist-lib/lib/tools/exec/adapters/python/pyodide.d.ts +4 -1
  25. package/dist-lib/lib/tools/exec/adapters/python/pyodide.js +42 -7
  26. package/dist-lib/lib/tools/exec/adapters/python/python-adapter.d.ts +9 -3
  27. package/dist-lib/lib/tools/exec/adapters/python/python-adapter.js +137 -21
  28. package/dist-lib/lib/tools/exec/adapters/python/run-session.d.ts +5 -0
  29. package/dist-lib/lib/tools/exec/adapters/python/run-session.js +33 -8
  30. package/dist-lib/lib/tools/exec/adapters/python/wheels.d.ts +6 -0
  31. package/dist-lib/lib/tools/exec/adapters/python/wheels.js +17 -3
  32. package/dist-lib/lib/tools/exec/adapters/python/worker/client.d.ts +2 -1
  33. package/dist-lib/lib/tools/exec/adapters/python/worker/client.js +16 -3
  34. package/dist-lib/lib/tools/exec/adapters/python/worker/entry.js +15 -2
  35. package/dist-lib/lib/tools/exec/adapters/python/worker/protocol.d.ts +6 -0
  36. package/dist-lib/lib/tools/exec/adapters/python/worker/protocol.js +6 -2
  37. package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-bare.d.ts +1 -0
  38. package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-bare.js +8 -0
  39. package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-node.d.ts +1 -0
  40. package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-node.js +8 -0
  41. package/dist-lib/lib/tools/exec/adapters/shell/shell-adapter.js +7 -1
  42. package/dist-lib/lib/tools/exec/shell-guidance.d.ts +10 -0
  43. package/dist-lib/lib/tools/exec/shell-guidance.js +123 -0
  44. package/dist-lib/lib/tools/exec/video-tools.d.ts +5 -0
  45. package/dist-lib/lib/tools/exec/video-tools.js +40 -0
  46. package/dist-lib/lib/tools/exec.d.ts +2 -1
  47. package/dist-lib/lib/tools/exec.js +93 -33
  48. package/dist-lib/lib/tools/http-request/truncate-response.d.ts +1 -0
  49. package/dist-lib/lib/tools/http-request/truncate-response.js +1 -1
  50. package/dist-lib/lib/tools/http-request.js +4 -1
  51. package/dist-lib/lib/tools/operations/builders.d.ts +1 -1
  52. package/dist-lib/lib/tools/operations/builders.js +9 -0
  53. package/dist-lib/lib/tools/operations/compile.js +41 -18
  54. package/dist-lib/lib/tools/operations/decoders.d.ts +6 -0
  55. package/dist-lib/lib/tools/operations/decoders.js +82 -0
  56. package/dist-lib/lib/tools/operations/manifest.d.ts +16 -2
  57. package/dist-lib/lib/tools/operations/manifest.js +6 -1
  58. package/dist-lib/lib/tools/skill.d.ts +3 -0
  59. package/dist-lib/lib/tools/skill.js +38 -5
  60. package/dist-lib/lib/tools/skills/manifest-parse.js +43 -1
  61. package/dist-lib/lib/tools/skills/manifest.d.ts +13 -0
  62. package/dist-lib/schema/harness.js +20 -1
  63. package/dist-lib/spec/hrpc/messages.js +93 -5
  64. package/dist-lib/spec/hyperschema/index.js +93 -5
  65. package/dist-lib/spec/hyperschema/schema.json +66 -1
  66. package/dist-lib/spec/hyperschema/types.d.ts +18 -1
  67. package/package.json +40 -2
  68. package/wheels/manifest.json +15 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,262 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@qvac/harness` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+ While the major version is `0`, a breaking change bumps the minor version.
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [0.3.2] - 2026-09-23
12
+
13
+ ### Changed
14
+
15
+ - A networked python run's approval prompt lists every host its source names in
16
+ a URL, or says it names none. On an approved run those hosts (and their `www.`
17
+ form) are reached without asking. Any other host is asked about through
18
+ `askUser` before it is resolved, and silence past a minute counts as a no. A
19
+ host that does not wire `askUser` refuses every unnamed host. (#109)
20
+
21
+ ### Fixed
22
+
23
+ - A python call reached the network whenever the runtime allowed it, so an
24
+ auto-run read call, such as a document build that loads an image from a URL,
25
+ could reach the web without anyone approving it. The network now opens only to
26
+ a call a person approved or that skip-all allowed. (#108)
27
+ - A timed-out python run on a host with no worker thread spun forever. It is now
28
+ interrupted at the deadline. (#104)
29
+ - A timed-out python run on the worker could miss its SIGINT, which killed the
30
+ worker along with the interpreter's state. The interrupt is resent until the
31
+ run settles. (#112)
32
+ - A python run that failed partway through a save attached the half-written
33
+ file. A non-zero exit now attaches nothing and reports every declared output in
34
+ `missingOutputs`. (#110)
35
+
36
+ ## [0.3.1] - 2026-09-23
37
+
38
+ ### Added
39
+
40
+ - Python in `exec` reaches the network on Bare: `urllib`, `http.client` and
41
+ `requests` go through the host's guarded fetch. (#94)
42
+ - `SkillOAuthConfig.verify`: an optional probe a skill manifest declares, so a
43
+ host can check a fresh token before saving it. It is carried over the wire.
44
+ (#105)
45
+ - A skill operation may name `response.decode` to turn a provider response into
46
+ a compact shape, starting with `gmail-message`. (#69)
47
+
48
+ ### Fixed
49
+
50
+ - A malformed `<tool_call>` left its JSON arguments in the reply. The whole span
51
+ is now stripped. (#100)
52
+ - A misspelt, placeholder or repeated `skill` load returned an error the model
53
+ retried. It now resolves to the file that was meant, or to the already-loaded
54
+ body. (#101)
55
+ - When the model reached for `pip` or a video tool on the shell path, the
56
+ redirect it got now names the call that works. (#71)
57
+
58
+ ## [0.3.0] - 2026-09-23
59
+
60
+ ### Added
61
+
62
+ - `translate` capability: translates text without loading an LLM. The language
63
+ pair picks the route before anything loads: the TranslatePsy-EuroNano packs for
64
+ English and nine European languages, per-pair Bergamot models for the other 43,
65
+ and TranslatePsy-AfriSLM for 16 languages Bergamot has no model for, named by
66
+ ISO 639-1 or FLORES-200 code. An omitted `from` is detected from the text. (#76)
67
+ - `translationPlanFor`, `NMT_TO_ENGLISH`, `NMT_FROM_ENGLISH`, `EURONANO_LANGUAGES`,
68
+ `SLM_LANGUAGE_CODES` and `SLM_LANGUAGE_NAMES` exports, so a host can show a
69
+ language picker or preview a route without a registry lookup (#76)
70
+ - `enhance: 'never' | 'auto'` on `invoke`. With `'auto'`, an image prompt is
71
+ rewritten by a model already resident on the device and never triggers a load;
72
+ `metrics` reports the `route` taken, the model used and the tokens the rewrite
73
+ spent. Omitting `enhance` behaves as `'never'`. (#77)
74
+
75
+ ## [0.2.12] - 2026-09-22
76
+
77
+ ### Fixed
78
+
79
+ - Sandbox mode refused every `exec` call that installs packages, which broke the
80
+ pdf, presentations, word and excel skills. Packages the harness vendors now
81
+ install; one that would fall back to PyPI is still refused. (#91)
82
+
83
+ ## [0.2.11] - 2026-09-22
84
+
85
+ Tagged but never published to npm; these changes first shipped in 0.2.12.
86
+
87
+ ### Added
88
+
89
+ - `Harness#invoke({ capability, args })` runs one capability on its own, with no
90
+ model, dispatch or approval callback. It is a frame on the existing
91
+ `completion` stream, with the same callbacks and events. (#74)
92
+ - `Harness#detectLanguage({ text, topK })`, the `detect-language` hrpc method and
93
+ its `RemoteHarness` client: language detection with no model to load (#75)
94
+ - `SkillOAuthConfig` on `SkillSetupRoute.oauth`, parsed from a skill manifest's
95
+ `setup.routes[].oauth` (#88)
96
+
97
+ ### Fixed
98
+
99
+ - `web_fetch` offers file downloads (PDF, Office documents, images) in its
100
+ description, and `attachDocument` returns the `attachmentId`, `fileName` and
101
+ `byteLength` it creates, so a downloaded file survives a history fold (#89)
102
+
103
+ ## [0.2.10] - 2026-09-22
104
+
105
+ ### Added
106
+
107
+ - `sandboxMode` agent option: an agent with no network access. It withholds
108
+ every tool that reaches the network, not just web search. (#73)
109
+ - `@qvac/harness/office`: XLSX and PPTX text extraction for Knowledge beside the
110
+ existing DOCX support, keeping sheets, column positions, cached formula values,
111
+ slide text, grouped shapes and tables (#83)
112
+
113
+ ### Fixed
114
+
115
+ - A tool call that already failed this turn with the same arguments is answered
116
+ from its first result instead of running again, so a small model can no longer
117
+ loop on the same failure (#78)
118
+ - A guessed `auth.tokenCredentialKey` is resolved by URL instead of being refused
119
+ with an error claiming the skill was not loaded (#72)
120
+
121
+ ## [0.2.9] - 2026-09-22
122
+
123
+ ### Added
124
+
125
+ - `captureInferenceCalls` harness option: emits `inference-call` and
126
+ `inference-sent` events carrying the exact payload of every inference call (#51)
127
+ - The `metrics` event carries the last round's `stopReason`, so a turn cut off by
128
+ the context window is distinguishable from a complete one (#62)
129
+
130
+ ### Changed
131
+
132
+ - The published tarball no longer includes docs, agent files or eval output (#79)
133
+
134
+ ## [0.2.8] - 2026-09-17
135
+
136
+ ### Added
137
+
138
+ - `weather_lookup` tool: looks weather up and leads with the place the service
139
+ actually resolved, refusing when it disagrees with the country or state asked
140
+ for, instead of reporting the weather of wherever a nonexistent place landed
141
+ (#52)
142
+
143
+ ### Fixed
144
+
145
+ - `@qvac/skills` 0.1.4: Apple Notes create-note no longer renames a note after
146
+ creating it, which failed on iCloud accounts and left duplicates (#48)
147
+
148
+ ## [0.2.7] - 2026-09-16
149
+
150
+ ### Added
151
+
152
+ - `@qvac/harness/docx`: DOCX text extraction with the bundled Python runtime,
153
+ preserving paragraph and table order (#46)
154
+
155
+ ## [0.2.6] - 2026-09-15
156
+
157
+ ### Added
158
+
159
+ - `completionModelCap` harness option, default 1: a completion model waits for a
160
+ live run to release its model instead of loading beside it (#41)
161
+ - `writeClient` and `writeCapabilities` take a `CallSiteOptions` argument whose
162
+ `optionalRequests` names the requests the generated client may omit (#44)
163
+
164
+ ## [0.2.5] - 2026-09-14
165
+
166
+ ### Added
167
+
168
+ - `HarnessOptions.gpuStats`: a host that already has the GPU reading can pass it
169
+ and skip the probe (#36)
170
+
171
+ ### Fixed
172
+
173
+ - On a Linux snap the harness exited about a second after `open`, in a loop. GPUs
174
+ are now enumerated in a short-lived child process. (#36)
175
+ - On Windows, an image request after a presentation stuck on "Loading … into
176
+ memory": Pyodide's boot no longer touches the process streams (#34)
177
+
178
+ ## [0.2.4] - 2026-09-12
179
+
180
+ ### Added
181
+
182
+ - The sidecar entry is published, so a host can spawn the engine without the
183
+ prebuilt bundle and with its native addons resolved at matching versions (#31)
184
+
185
+ ## [0.2.3] - 2026-09-12
186
+
187
+ ### Fixed
188
+
189
+ - Every `./lib/tools/*` subpath is published. Only the 12 that `qvac-core` used
190
+ were, so the mobile worklet's file tools could not resolve. (#29)
191
+
192
+ ## [0.2.2] - 2026-09-11
193
+
194
+ ### Fixed
195
+
196
+ - The lockfile no longer resolves a stale nested `@qvac/inference` (#27)
197
+
198
+ ## [0.2.1] - 2026-09-11
199
+
200
+ ### Fixed
201
+
202
+ - The generated wire spec matches the schema it is built from (#25)
203
+
204
+ ## [0.2.0] - 2026-09-11
205
+
206
+ ### Added
207
+
208
+ - Chat compaction when the context window fills (#22)
209
+ - Per-chat KV cache invalidation and reclaim (#22)
210
+ - Notifications delivered from device-local state (#22)
211
+ - A log of the tool prompt, and cheaper model-facing tool schemas (#22)
212
+ - The target sample rate threaded through the Bare audio decoder (#22)
213
+
214
+ ### Changed
215
+
216
+ - QVAC SDK 0.19: `@qvac/inference` serves the Bare condition behind a new `#sdk`
217
+ import alias (#22)
218
+ - `bare-http1` is pinned to 4.5.9 (#24)
219
+
220
+ ## [0.1.2] - 2026-09-11
221
+
222
+ ### Fixed
223
+
224
+ - `@qvac/harness/sdk-storage` and `#sdk-config-loader` failed to resolve under
225
+ Bare: the tarball carried only the Node loader (#20)
226
+
227
+ ## [0.1.1] - 2026-09-10
228
+
229
+ ### Added
230
+
231
+ - A compiled library surface (`dist-lib/`, JavaScript and declarations), so the
232
+ package's exports import without shipping TypeScript source (#18)
233
+
234
+ ## [0.1.0] - 2026-09-10
235
+
236
+ ### Added
237
+
238
+ - First release of the QVAC engine as `@qvac/harness`: the prebuilt
239
+ `harness.bundle` a host spawns, its runtime content (skills from `@qvac/skills`
240
+ and the hash-pinned Python wheels), and `prebuilds-manifest.json` naming the
241
+ native addons it defers (#13, #15)
242
+
243
+ [Unreleased]: https://github.com/tetherto/qvac-harness/compare/v0.3.2...HEAD
244
+ [0.3.2]: https://github.com/tetherto/qvac-harness/compare/v0.3.1...v0.3.2
245
+ [0.3.1]: https://github.com/tetherto/qvac-harness/compare/v0.3.0...v0.3.1
246
+ [0.3.0]: https://github.com/tetherto/qvac-harness/compare/v0.2.12...v0.3.0
247
+ [0.2.12]: https://github.com/tetherto/qvac-harness/compare/v0.2.11...v0.2.12
248
+ [0.2.11]: https://github.com/tetherto/qvac-harness/compare/v0.2.10...v0.2.11
249
+ [0.2.10]: https://github.com/tetherto/qvac-harness/compare/v0.2.9...v0.2.10
250
+ [0.2.9]: https://github.com/tetherto/qvac-harness/compare/v0.2.8...v0.2.9
251
+ [0.2.8]: https://github.com/tetherto/qvac-harness/compare/v0.2.7...v0.2.8
252
+ [0.2.7]: https://github.com/tetherto/qvac-harness/compare/v0.2.6...v0.2.7
253
+ [0.2.6]: https://github.com/tetherto/qvac-harness/compare/v0.2.5...v0.2.6
254
+ [0.2.5]: https://github.com/tetherto/qvac-harness/compare/v0.2.4...v0.2.5
255
+ [0.2.4]: https://github.com/tetherto/qvac-harness/compare/v0.2.3...v0.2.4
256
+ [0.2.3]: https://github.com/tetherto/qvac-harness/compare/v0.2.2...v0.2.3
257
+ [0.2.2]: https://github.com/tetherto/qvac-harness/compare/v0.2.1...v0.2.2
258
+ [0.2.1]: https://github.com/tetherto/qvac-harness/compare/v0.2.0...v0.2.1
259
+ [0.2.0]: https://github.com/tetherto/qvac-harness/compare/v0.1.2...v0.2.0
260
+ [0.1.2]: https://github.com/tetherto/qvac-harness/compare/v0.1.1...v0.1.2
261
+ [0.1.1]: https://github.com/tetherto/qvac-harness/compare/v0.1.0...v0.1.1
262
+ [0.1.0]: https://github.com/tetherto/qvac-harness/releases/tag/v0.1.0