@qvac/harness 0.2.12 → 0.3.1

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