@qvac/harness 0.3.2 → 0.4.0

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 (36) hide show
  1. package/CHANGELOG.md +56 -1
  2. package/README.md +134 -0
  3. package/dist/harness.bundle +304 -175
  4. package/dist-lib/index.d.ts +6 -1
  5. package/dist-lib/index.js +29 -4
  6. package/dist-lib/lib/capabilities/completion.js +2 -5
  7. package/dist-lib/lib/capabilities/preview-model-source.d.ts +67 -0
  8. package/dist-lib/lib/capabilities/preview-model-source.js +387 -0
  9. package/dist-lib/lib/connect.d.ts +4 -5
  10. package/dist-lib/lib/connect.js +9 -0
  11. package/dist-lib/lib/contract-types.d.ts +4 -5
  12. package/dist-lib/lib/models/custom-model-cache.d.ts +4 -0
  13. package/dist-lib/lib/models/custom-model-cache.js +42 -0
  14. package/dist-lib/lib/models/gguf-header.d.ts +30 -0
  15. package/dist-lib/lib/models/gguf-header.js +208 -0
  16. package/dist-lib/lib/models/model-catalog.d.ts +6 -1
  17. package/dist-lib/lib/models/model-catalog.js +7 -2
  18. package/dist-lib/lib/models/model-delete.d.ts +4 -1
  19. package/dist-lib/lib/models/model-delete.js +19 -14
  20. package/dist-lib/lib/models/model-list.d.ts +6 -0
  21. package/dist-lib/lib/models/model-list.js +23 -1
  22. package/dist-lib/lib/models/model-source.js +1 -1
  23. package/dist-lib/lib/serve.js +21 -5
  24. package/dist-lib/schema/harness.js +42 -1
  25. package/dist-lib/spec/bind.js +3 -0
  26. package/dist-lib/spec/calls.js +1 -0
  27. package/dist-lib/spec/hrpc/hrpc.json +13 -0
  28. package/dist-lib/spec/hrpc/index.js +15 -3
  29. package/dist-lib/spec/hrpc/messages.js +173 -5
  30. package/dist-lib/spec/hyperschema/index.js +173 -5
  31. package/dist-lib/spec/hyperschema/schema.json +136 -1
  32. package/dist-lib/spec/hyperschema/types.d.ts +34 -1
  33. package/package.json +6 -7
  34. package/worker/harness-sidecar.mjs +1 -0
  35. package/dist-lib/lib/capabilities/vision-history.d.ts +0 -3
  36. package/dist-lib/lib/capabilities/vision-history.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/harness",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "An AI harness implementing generate(context) via @qvac/sdk. Knows nothing about workbench, hyperdb, or chunks — just inference in, events out.",
6
6
  "exports": {
@@ -694,10 +694,10 @@
694
694
  }
695
695
  },
696
696
  "dependencies": {
697
- "@qvac/inference": "0.19.0",
697
+ "@qvac/inference": "0.20.0",
698
698
  "@qvac/langdetect-text": "0.1.2",
699
- "@qvac/sdk": "0.19.0",
700
- "@qvac/skills": "0.1.7",
699
+ "@qvac/sdk": "0.20.0",
700
+ "@qvac/skills": "0.1.9",
701
701
  "asenion": "^0.1.0",
702
702
  "b4a": "^1.8.1",
703
703
  "bare-abort-controller": "^1.1.2",
@@ -771,8 +771,8 @@
771
771
  "localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
772
772
  "hypercore-blob-server@1.15.0": "patches/hypercore-blob-server@1.15.0.patch",
773
773
  "bare-stow@0.1.5": "patches/bare-stow@0.1.5.patch",
774
- "@qvac/inference@0.19.0": "patches/@qvac%2Finference@0.19.0.patch",
775
- "brittle@4.1.0": "patches/brittle@4.1.0.patch"
774
+ "brittle@4.1.0": "patches/brittle@4.1.0.patch",
775
+ "@qvac/inference@0.20.0": "patches/@qvac%2Finference@0.20.0.patch"
776
776
  },
777
777
  "repository": {
778
778
  "type": "git",
@@ -785,7 +785,6 @@
785
785
  },
786
786
  "homepage": "https://github.com/tetherto/qvac-harness",
787
787
  "overrides": {
788
- "@qvac/asr-ggml": "0.4.2",
789
788
  "bare-runtime": "^1.30.0",
790
789
  "bare-module": "6.4.0",
791
790
  "bare-process": "4.4.1",
@@ -160,6 +160,7 @@ export default async function start(ipc, ready) {
160
160
  gpuStats,
161
161
  tools,
162
162
  skillsDir,
163
+ modelsDir: sdkStorage.models,
163
164
  imageModel,
164
165
  imageClamps,
165
166
  musicModel,
@@ -1,3 +0,0 @@
1
- import type { Message } from './completion.ts';
2
- export declare function projectVisionHistory(history: ReadonlyArray<Message>): Message[];
3
- export declare function visionHistoryCacheKey(cacheKey: string | undefined, history: ReadonlyArray<Message>): string | undefined;
@@ -1,21 +0,0 @@
1
- const CACHE_VERSION = 'vision-history-v1';
2
- export function projectVisionHistory(history) {
3
- return history.flatMap((message) => {
4
- const attachments = message.attachments;
5
- if (message.role !== 'user' || !attachments || attachments.length < 2)
6
- return [message];
7
- return attachments.map((attachment, index) => ({
8
- ...message,
9
- content: index === attachments.length - 1 ? message.content : '\n',
10
- attachments: [attachment]
11
- }));
12
- });
13
- }
14
- export function visionHistoryCacheKey(cacheKey, history) {
15
- if (!cacheKey || !history.some(hasMultipleImages))
16
- return cacheKey;
17
- return `${cacheKey}-${CACHE_VERSION}`;
18
- }
19
- function hasMultipleImages(message) {
20
- return message.role === 'user' && (message.attachments?.length ?? 0) > 1;
21
- }