@qvac/harness 0.2.10 → 0.3.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 (41) hide show
  1. package/dist/harness.bundle +13 -11
  2. package/dist-lib/index.d.ts +26 -1
  3. package/dist-lib/index.js +94 -3
  4. package/dist-lib/lib/capabilities/completion.d.ts +2 -0
  5. package/dist-lib/lib/capabilities/detect-language.d.ts +11 -0
  6. package/dist-lib/lib/capabilities/detect-language.js +13 -0
  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 +24 -0
  10. package/dist-lib/lib/capabilities/invoke.js +57 -0
  11. package/dist-lib/lib/connect.d.ts +4 -1
  12. package/dist-lib/lib/connect.js +50 -21
  13. package/dist-lib/lib/contract-types.d.ts +21 -0
  14. package/dist-lib/lib/helpers/clean-answer.d.ts +1 -0
  15. package/dist-lib/lib/helpers/clean-answer.js +16 -0
  16. package/dist-lib/lib/helpers/load-stall.d.ts +6 -0
  17. package/dist-lib/lib/helpers/load-stall.js +24 -0
  18. package/dist-lib/lib/hooks/built-in/sandbox.js +3 -1
  19. package/dist-lib/lib/models/model-pool.d.ts +6 -0
  20. package/dist-lib/lib/models/model-pool.js +12 -0
  21. package/dist-lib/lib/models/nmt-catalog.d.ts +34 -0
  22. package/dist-lib/lib/models/nmt-catalog.js +166 -0
  23. package/dist-lib/lib/serve.js +33 -4
  24. package/dist-lib/lib/tools/generate-image.js +2 -25
  25. package/dist-lib/lib/tools/http-request.js +1 -1
  26. package/dist-lib/lib/tools/skills/manifest-parse.d.ts +1 -0
  27. package/dist-lib/lib/tools/skills/manifest-parse.js +92 -1
  28. package/dist-lib/lib/tools/skills/manifest.d.ts +12 -0
  29. package/dist-lib/lib/tools/translate.d.ts +78 -0
  30. package/dist-lib/lib/tools/translate.js +228 -0
  31. package/dist-lib/lib/tools/web-fetch.js +12 -2
  32. package/dist-lib/schema/harness.js +53 -3
  33. package/dist-lib/spec/bind.js +3 -0
  34. package/dist-lib/spec/calls.js +1 -0
  35. package/dist-lib/spec/hrpc/hrpc.json +13 -0
  36. package/dist-lib/spec/hrpc/index.js +15 -3
  37. package/dist-lib/spec/hrpc/messages.js +206 -10
  38. package/dist-lib/spec/hyperschema/index.js +206 -10
  39. package/dist-lib/spec/hyperschema/schema.json +163 -1
  40. package/dist-lib/spec/hyperschema/types.d.ts +43 -2
  41. package/package.json +8 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 10,
2
+ "version": 12,
3
3
  "schema": [
4
4
  {
5
5
  "name": "empty",
@@ -307,6 +307,10 @@
307
307
  {
308
308
  "key": "drive-result",
309
309
  "version": 5
310
+ },
311
+ {
312
+ "key": "invoke",
313
+ "version": 11
310
314
  }
311
315
  ],
312
316
  "strings": true
@@ -456,6 +460,21 @@
456
460
  "name": "captureInferenceCalls",
457
461
  "type": "bool",
458
462
  "version": 9
463
+ },
464
+ {
465
+ "name": "capability",
466
+ "type": "string",
467
+ "version": 11
468
+ },
469
+ {
470
+ "name": "arguments",
471
+ "type": "json",
472
+ "version": 11
473
+ },
474
+ {
475
+ "name": "enhance",
476
+ "type": "string",
477
+ "version": 12
459
478
  }
460
479
  ]
461
480
  },
@@ -1786,6 +1805,11 @@
1786
1805
  "name": "satisfied",
1787
1806
  "type": "bool",
1788
1807
  "version": 1
1808
+ },
1809
+ {
1810
+ "name": "oauth",
1811
+ "type": "@harness/skill-oauth-config",
1812
+ "version": 11
1789
1813
  }
1790
1814
  ]
1791
1815
  },
@@ -2326,6 +2350,144 @@
2326
2350
  "version": 8
2327
2351
  }
2328
2352
  ]
2353
+ },
2354
+ {
2355
+ "name": "detect-language-request",
2356
+ "namespace": "harness",
2357
+ "compact": false,
2358
+ "flagsPosition": 1,
2359
+ "fields": [
2360
+ {
2361
+ "name": "text",
2362
+ "required": true,
2363
+ "type": "string",
2364
+ "version": 11
2365
+ },
2366
+ {
2367
+ "name": "topK",
2368
+ "type": "uint",
2369
+ "version": 11
2370
+ }
2371
+ ]
2372
+ },
2373
+ {
2374
+ "name": "detected-language",
2375
+ "namespace": "harness",
2376
+ "compact": false,
2377
+ "flagsPosition": 2,
2378
+ "fields": [
2379
+ {
2380
+ "name": "code",
2381
+ "required": true,
2382
+ "type": "string",
2383
+ "version": 11
2384
+ },
2385
+ {
2386
+ "name": "language",
2387
+ "required": true,
2388
+ "type": "string",
2389
+ "version": 11
2390
+ },
2391
+ {
2392
+ "name": "probability",
2393
+ "type": "float64",
2394
+ "version": 11
2395
+ }
2396
+ ]
2397
+ },
2398
+ {
2399
+ "name": "detect-language-response",
2400
+ "namespace": "harness",
2401
+ "compact": false,
2402
+ "flagsPosition": -1,
2403
+ "fields": [
2404
+ {
2405
+ "name": "languages",
2406
+ "required": true,
2407
+ "array": true,
2408
+ "type": "@harness/detected-language",
2409
+ "version": 11
2410
+ }
2411
+ ]
2412
+ },
2413
+ {
2414
+ "name": "skill-oauth-param",
2415
+ "namespace": "harness",
2416
+ "compact": false,
2417
+ "flagsPosition": -1,
2418
+ "fields": [
2419
+ {
2420
+ "name": "key",
2421
+ "required": true,
2422
+ "type": "string",
2423
+ "version": 11
2424
+ },
2425
+ {
2426
+ "name": "value",
2427
+ "required": true,
2428
+ "type": "string",
2429
+ "version": 11
2430
+ }
2431
+ ]
2432
+ },
2433
+ {
2434
+ "name": "skill-oauth-config",
2435
+ "namespace": "harness",
2436
+ "compact": false,
2437
+ "flagsPosition": 4,
2438
+ "fields": [
2439
+ {
2440
+ "name": "stateKey",
2441
+ "required": true,
2442
+ "type": "string",
2443
+ "version": 11
2444
+ },
2445
+ {
2446
+ "name": "authUrl",
2447
+ "required": true,
2448
+ "type": "string",
2449
+ "version": 11
2450
+ },
2451
+ {
2452
+ "name": "tokenUrl",
2453
+ "required": true,
2454
+ "type": "string",
2455
+ "version": 11
2456
+ },
2457
+ {
2458
+ "name": "tokenAuth",
2459
+ "required": true,
2460
+ "type": "string",
2461
+ "version": 11
2462
+ },
2463
+ {
2464
+ "name": "scopes",
2465
+ "array": true,
2466
+ "type": "string",
2467
+ "version": 11
2468
+ },
2469
+ {
2470
+ "name": "extraAuthParams",
2471
+ "array": true,
2472
+ "type": "@harness/skill-oauth-param",
2473
+ "version": 11
2474
+ },
2475
+ {
2476
+ "name": "registrationEndpoint",
2477
+ "type": "string",
2478
+ "version": 11
2479
+ },
2480
+ {
2481
+ "name": "port",
2482
+ "type": "uint",
2483
+ "version": 11
2484
+ },
2485
+ {
2486
+ "name": "sharedIosSession",
2487
+ "type": "bool",
2488
+ "version": 11
2489
+ }
2490
+ ]
2329
2491
  }
2330
2492
  ]
2331
2493
  }
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 10
2
+ // Schema version: 12
3
3
  // Do not edit manually.
4
4
 
5
5
  export interface HarnessEmpty {
@@ -58,7 +58,7 @@ export interface HarnessAttachmentRecord {
58
58
  byteLength: number
59
59
  }
60
60
 
61
- export type HarnessCompletionFrameType = "start" | "decision" | "attach-result" | "fetch-result" | "rag-result" | "question-result" | "drive-result"
61
+ export type HarnessCompletionFrameType = "start" | "decision" | "attach-result" | "fetch-result" | "rag-result" | "question-result" | "drive-result" | "invoke"
62
62
 
63
63
  export interface HarnessCompletionFrame {
64
64
  type: HarnessCompletionFrameType
@@ -88,6 +88,9 @@ export interface HarnessCompletionFrame {
88
88
  payload?: unknown | null
89
89
  grantedWriteDirs?: string[] | null
90
90
  captureInferenceCalls?: boolean
91
+ capability?: string | null
92
+ arguments?: unknown | null
93
+ enhance?: string | null
91
94
  }
92
95
 
93
96
  export type HarnessCompletionEventType = "content" | "thinking" | "tool-call" | "tool-result" | "approval-ask" | "metrics" | "error" | "aborted" | "attach-ask" | "fetch-ask" | "progress" | "rag-ask" | "question-ask" | "done" | "tool-activity" | "drive-ask" | "inference-call" | "inference-sent"
@@ -357,6 +360,7 @@ export interface HarnessSkillSetupRouteV2 {
357
360
  configSteps?: string[] | null
358
361
  fields?: HarnessSkillSetupField[] | null
359
362
  satisfied?: boolean
363
+ oauth?: HarnessSkillOauthConfig | null
360
364
  }
361
365
 
362
366
  export interface HarnessSkillSetupV2 {
@@ -480,6 +484,38 @@ export interface HarnessKvCacheDeleteRequest {
480
484
  kvCacheKey: string
481
485
  }
482
486
 
487
+ export interface HarnessDetectLanguageRequest {
488
+ text: string
489
+ topK?: number
490
+ }
491
+
492
+ export interface HarnessDetectedLanguage {
493
+ code: string
494
+ language: string
495
+ probability?: number
496
+ }
497
+
498
+ export interface HarnessDetectLanguageResponse {
499
+ languages: HarnessDetectedLanguage[]
500
+ }
501
+
502
+ export interface HarnessSkillOauthParam {
503
+ key: string
504
+ value: string
505
+ }
506
+
507
+ export interface HarnessSkillOauthConfig {
508
+ stateKey: string
509
+ authUrl: string
510
+ tokenUrl: string
511
+ tokenAuth: string
512
+ scopes?: string[] | null
513
+ extraAuthParams?: HarnessSkillOauthParam[] | null
514
+ registrationEndpoint?: string | null
515
+ port?: number
516
+ sharedIosSession?: boolean
517
+ }
518
+
483
519
  export interface SchemaTypes {
484
520
  "@harness/empty": HarnessEmpty
485
521
  "@harness/ok-response": HarnessOkResponse
@@ -559,4 +595,9 @@ export interface SchemaTypes {
559
595
  "@harness/copy-skill-response": HarnessCopySkillResponse
560
596
  "@harness/delete-skill-response": HarnessDeleteSkillResponse
561
597
  "@harness/kv-cache-delete-request": HarnessKvCacheDeleteRequest
598
+ "@harness/detect-language-request": HarnessDetectLanguageRequest
599
+ "@harness/detected-language": HarnessDetectedLanguage
600
+ "@harness/detect-language-response": HarnessDetectLanguageResponse
601
+ "@harness/skill-oauth-param": HarnessSkillOauthParam
602
+ "@harness/skill-oauth-config": HarnessSkillOauthConfig
562
603
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/harness",
3
- "version": "0.2.10",
3
+ "version": "0.3.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": {
@@ -540,6 +540,10 @@
540
540
  "types": "./dist-lib/lib/tools/skills/tool-grants.d.ts",
541
541
  "default": "./dist-lib/lib/tools/skills/tool-grants.js"
542
542
  },
543
+ "./lib/tools/translate.ts": {
544
+ "types": "./dist-lib/lib/tools/translate.d.ts",
545
+ "default": "./dist-lib/lib/tools/translate.js"
546
+ },
543
547
  "./lib/tools/url-guard.ts": {
544
548
  "types": "./dist-lib/lib/tools/url-guard.d.ts",
545
549
  "default": "./dist-lib/lib/tools/url-guard.js"
@@ -565,6 +569,7 @@
565
569
  "lint": "prettier . --check && lunte && tsc --noEmit",
566
570
  "build:bundle": "node scripts/build-bundle.mjs",
567
571
  "skill-eval": "bare examples/skill-eval/run.ts",
572
+ "translate-eval": "bare examples/translate-eval/run.ts",
568
573
  "prepack": "node scripts/vendor-python-wheels.mjs && node scripts/build-lib.mjs && node scripts/build-bundle.mjs --minify",
569
574
  "vendor:wheels": "node scripts/vendor-python-wheels.mjs",
570
575
  "build:lib": "node scripts/build-lib.mjs",
@@ -654,8 +659,9 @@
654
659
  },
655
660
  "dependencies": {
656
661
  "@qvac/inference": "0.19.0",
662
+ "@qvac/langdetect-text": "0.1.2",
657
663
  "@qvac/sdk": "0.19.0",
658
- "@qvac/skills": "^0.1.4",
664
+ "@qvac/skills": "^0.1.6",
659
665
  "asenion": "^0.1.0",
660
666
  "b4a": "^1.8.1",
661
667
  "bare-abort-controller": "^1.1.2",