@qvac/harness 0.2.9 → 0.2.10
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.
- package/README.md +15 -7
- package/dist/harness.bundle +7 -59
- package/dist/prebuilds-manifest.json +0 -8
- package/dist-lib/lib/capabilities/completion.d.ts +1 -0
- package/dist-lib/lib/capabilities/completion.js +66 -9
- package/dist-lib/lib/connect.js +2 -1
- package/dist-lib/lib/contract-types.d.ts +1 -0
- package/dist-lib/lib/docx/index.js +4 -27
- package/dist-lib/lib/hooks/built-in/index.d.ts +1 -0
- package/dist-lib/lib/hooks/built-in/index.js +1 -0
- package/dist-lib/lib/hooks/built-in/sandbox.d.ts +5 -0
- package/dist-lib/lib/hooks/built-in/sandbox.js +43 -0
- package/dist-lib/lib/hooks/built-in/skill-catalog.js +7 -2
- package/dist-lib/lib/hooks/registry.js +2 -1
- package/dist-lib/lib/hooks/types.d.ts +1 -0
- package/dist-lib/lib/office/index.d.ts +6 -0
- package/dist-lib/lib/office/index.js +38 -0
- package/dist-lib/lib/office/pptx.d.ts +1 -0
- package/dist-lib/lib/office/pptx.js +26 -0
- package/dist-lib/lib/office/python.d.ts +7 -0
- package/dist-lib/lib/office/python.js +32 -0
- package/dist-lib/lib/office/xlsx.d.ts +1 -0
- package/dist-lib/lib/office/xlsx.js +26 -0
- package/dist-lib/lib/tools/edit-image.js +1 -1
- package/dist-lib/lib/tools/generate-image.js +1 -1
- package/dist-lib/lib/tools/generate-music.js +1 -1
- package/dist-lib/lib/tools/http-request.js +3 -3
- package/dist-lib/lib/tools/mcp-call.js +3 -3
- package/dist-lib/lib/tools/skill.js +4 -2
- package/dist-lib/lib/tools/skills/auth-resolver.d.ts +1 -0
- package/dist-lib/lib/tools/skills/auth-resolver.js +59 -29
- package/dist-lib/lib/tools/toolsets.d.ts +1 -0
- package/dist-lib/lib/tools/toolsets.js +1 -0
- package/dist-lib/lib/tools/weather-lookup.js +9 -3
- package/dist-lib/lib/tools/web-fetch.js +6 -3
- package/dist-lib/lib/tools/web-search.js +5 -2
- package/dist-lib/schema/harness.js +2 -1
- package/dist-lib/spec/hrpc/messages.js +8 -5
- package/dist-lib/spec/hyperschema/index.js +8 -5
- package/dist-lib/spec/hyperschema/schema.json +6 -1
- package/dist-lib/spec/hyperschema/types.d.ts +2 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ dir, ...) are the ones `worker/harness-sidecar.mjs` documents in this repo. The
|
|
|
48
48
|
in-house hosts don't call this directly — they use the repo's library surface
|
|
49
49
|
(`harnessChild` under bare-supervisor), which owns that argv contract.
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Office extraction
|
|
52
52
|
|
|
53
53
|
Hosts can supply the bundled Python extractor to their document pipeline:
|
|
54
54
|
|
|
@@ -57,19 +57,27 @@ including from source and compiled-package consumers. The worker seeds this
|
|
|
57
57
|
cache from shipped wheels; without it, Pyodide can try downloading packages.
|
|
58
58
|
|
|
59
59
|
```js
|
|
60
|
-
import {
|
|
60
|
+
import { extractOfficeText, closeOfficeWorker } from '@qvac/harness/office'
|
|
61
61
|
|
|
62
|
-
const text = await
|
|
62
|
+
const text = await extractOfficeText(bytes, 'report.xlsx', { signal, mimeType })
|
|
63
63
|
// At host shutdown, after outstanding extractions have settled:
|
|
64
|
-
await
|
|
64
|
+
await closeOfficeWorker()
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
DOCX preserves paragraph and table order. XLSX includes sheet names, nonempty rows,
|
|
68
|
+
cached formula results and formula text when no cached result exists. PPTX includes
|
|
69
|
+
slide text, grouped shapes and tables in slide order; speaker notes, images and charts
|
|
70
|
+
are not extracted. Legacy XLS/PPT formats are unsupported. File extensions select the
|
|
71
|
+
format, with `mimeType` as a fallback when the name has no recognized Office extension.
|
|
72
|
+
|
|
73
|
+
The extractor accepts up to 20 MiB and requires the shipped Python wheels. With the
|
|
74
|
+
cache configured, extraction uses those wheels offline. Bundled hosts also set `QVAC_PYODIDE_WORKER_ENTRY` and
|
|
70
75
|
`QVAC_PYTHON_WHEELS_DIR` to their staged worker and wheels paths.
|
|
71
76
|
Source checkouts prepare wheels with `bun run vendor:wheels`.
|
|
72
77
|
|
|
78
|
+
The existing `extractDocxText` and `closeDocxWorker` exports from `@qvac/harness/docx`
|
|
79
|
+
remain available. Both entry points share the same Python worker and cache.
|
|
80
|
+
|
|
73
81
|
## Development
|
|
74
82
|
|
|
75
83
|
```
|