@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.
Files changed (42) hide show
  1. package/README.md +15 -7
  2. package/dist/harness.bundle +7 -59
  3. package/dist/prebuilds-manifest.json +0 -8
  4. package/dist-lib/lib/capabilities/completion.d.ts +1 -0
  5. package/dist-lib/lib/capabilities/completion.js +66 -9
  6. package/dist-lib/lib/connect.js +2 -1
  7. package/dist-lib/lib/contract-types.d.ts +1 -0
  8. package/dist-lib/lib/docx/index.js +4 -27
  9. package/dist-lib/lib/hooks/built-in/index.d.ts +1 -0
  10. package/dist-lib/lib/hooks/built-in/index.js +1 -0
  11. package/dist-lib/lib/hooks/built-in/sandbox.d.ts +5 -0
  12. package/dist-lib/lib/hooks/built-in/sandbox.js +43 -0
  13. package/dist-lib/lib/hooks/built-in/skill-catalog.js +7 -2
  14. package/dist-lib/lib/hooks/registry.js +2 -1
  15. package/dist-lib/lib/hooks/types.d.ts +1 -0
  16. package/dist-lib/lib/office/index.d.ts +6 -0
  17. package/dist-lib/lib/office/index.js +38 -0
  18. package/dist-lib/lib/office/pptx.d.ts +1 -0
  19. package/dist-lib/lib/office/pptx.js +26 -0
  20. package/dist-lib/lib/office/python.d.ts +7 -0
  21. package/dist-lib/lib/office/python.js +32 -0
  22. package/dist-lib/lib/office/xlsx.d.ts +1 -0
  23. package/dist-lib/lib/office/xlsx.js +26 -0
  24. package/dist-lib/lib/tools/edit-image.js +1 -1
  25. package/dist-lib/lib/tools/generate-image.js +1 -1
  26. package/dist-lib/lib/tools/generate-music.js +1 -1
  27. package/dist-lib/lib/tools/http-request.js +3 -3
  28. package/dist-lib/lib/tools/mcp-call.js +3 -3
  29. package/dist-lib/lib/tools/skill.js +4 -2
  30. package/dist-lib/lib/tools/skills/auth-resolver.d.ts +1 -0
  31. package/dist-lib/lib/tools/skills/auth-resolver.js +59 -29
  32. package/dist-lib/lib/tools/toolsets.d.ts +1 -0
  33. package/dist-lib/lib/tools/toolsets.js +1 -0
  34. package/dist-lib/lib/tools/weather-lookup.js +9 -3
  35. package/dist-lib/lib/tools/web-fetch.js +6 -3
  36. package/dist-lib/lib/tools/web-search.js +5 -2
  37. package/dist-lib/schema/harness.js +2 -1
  38. package/dist-lib/spec/hrpc/messages.js +8 -5
  39. package/dist-lib/spec/hyperschema/index.js +8 -5
  40. package/dist-lib/spec/hyperschema/schema.json +6 -1
  41. package/dist-lib/spec/hyperschema/types.d.ts +2 -1
  42. 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
- ## DOCX extraction
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 { extractDocxText, closeDocxWorker } from '@qvac/harness/docx'
60
+ import { extractOfficeText, closeOfficeWorker } from '@qvac/harness/office'
61
61
 
62
- const text = await extractDocxText(bytes, 'notes.docx', { signal })
62
+ const text = await extractOfficeText(bytes, 'report.xlsx', { signal, mimeType })
63
63
  // At host shutdown, after outstanding extractions have settled:
64
- await closeDocxWorker()
64
+ await closeOfficeWorker()
65
65
  ```
66
66
 
67
- The extractor preserves paragraph and table order, accepts up to 20 MiB, and
68
- requires the shipped Python wheels. With the cache configured, extraction uses
69
- those wheels offline. Bundled hosts also set `QVAC_PYODIDE_WORKER_ENTRY` and
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
  ```