@qvac/harness 0.8.5 → 0.8.7
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/CHANGELOG.md +1278 -472
- package/README.md +49 -0
- package/dist-lib/index.d.ts +42 -2
- package/dist-lib/index.js +447 -58
- package/dist-lib/lib/audio-transcode-bare.d.ts +1 -1
- package/dist-lib/lib/audio-transcode-bare.js +22 -25
- package/dist-lib/lib/audio-transcode-node.d.ts +1 -1
- package/dist-lib/lib/audio-transcode-node.js +1 -3
- package/dist-lib/lib/capabilities/audio-resample.d.ts +1 -1
- package/dist-lib/lib/capabilities/audio-resample.js +7 -8
- package/dist-lib/lib/capabilities/completion.d.ts +6 -3
- package/dist-lib/lib/capabilities/completion.js +96 -49
- package/dist-lib/lib/capabilities/download.d.ts +3 -1
- package/dist-lib/lib/capabilities/download.js +1 -1
- package/dist-lib/lib/capabilities/preview-model-source.d.ts +1 -0
- package/dist-lib/lib/capabilities/preview-model-source.js +1 -0
- package/dist-lib/lib/capabilities/tool-selection.d.ts +1 -3
- package/dist-lib/lib/capabilities/tool-selection.js +2 -4
- package/dist-lib/lib/capabilities/tool-turns.d.ts +0 -1
- package/dist-lib/lib/capabilities/tool-turns.js +0 -6
- package/dist-lib/lib/capabilities/usage-breakdown.js +4 -1
- package/dist-lib/lib/capabilities/voice.d.ts +5 -1
- package/dist-lib/lib/capabilities/voice.js +94 -26
- package/dist-lib/lib/connect.d.ts +4 -1
- package/dist-lib/lib/connect.js +16 -1
- package/dist-lib/lib/contract-types.d.ts +12 -0
- package/dist-lib/lib/helpers/tool-call-markup.d.ts +1 -0
- package/dist-lib/lib/helpers/tool-call-markup.js +3 -0
- package/dist-lib/lib/models/context-choice.d.ts +15 -0
- package/dist-lib/lib/models/context-choice.js +55 -0
- package/dist-lib/lib/models/download-gate.d.ts +20 -0
- package/dist-lib/lib/models/download-gate.js +73 -0
- package/dist-lib/lib/models/memory-cap.d.ts +13 -0
- package/dist-lib/lib/models/memory-cap.js +21 -0
- package/dist-lib/lib/models/model-catalog-constants.d.ts +3 -1
- package/dist-lib/lib/models/model-catalog-constants.js +9 -1
- package/dist-lib/lib/models/model-catalog.d.ts +6 -2
- package/dist-lib/lib/models/model-catalog.js +35 -3
- package/dist-lib/lib/models/model-handle.d.ts +8 -1
- package/dist-lib/lib/models/model-handle.js +20 -2
- package/dist-lib/lib/models/model-list.d.ts +8 -1
- package/dist-lib/lib/models/model-list.js +23 -0
- package/dist-lib/lib/models/model-pool.d.ts +35 -5
- package/dist-lib/lib/models/model-pool.js +97 -32
- package/dist-lib/lib/models/sdk-faults.d.ts +1 -0
- package/dist-lib/lib/models/sdk-faults.js +6 -0
- package/dist-lib/lib/office/engine/pptx/picture-area.d.ts +23 -0
- package/dist-lib/lib/office/engine/pptx/picture-area.js +84 -0
- package/dist-lib/lib/office/engine/pptx/presentation.d.ts +2 -0
- package/dist-lib/lib/office/engine/pptx/presentation.js +55 -17
- package/dist-lib/lib/office/engine/pptx/types.d.ts +1 -0
- package/dist-lib/lib/office/engine/xlsx/workbook.d.ts +1 -0
- package/dist-lib/lib/office/engine/xlsx/workbook.js +34 -3
- package/dist-lib/lib/serve.js +23 -3
- package/dist-lib/lib/spawn.js +4 -10
- package/dist-lib/lib/tools/exec.d.ts +4 -1
- package/dist-lib/lib/tools/exec.js +55 -11
- package/dist-lib/lib/tools/generate-image.d.ts +4 -2
- package/dist-lib/lib/tools/generate-image.js +5 -2
- package/dist-lib/lib/tools/generate-music.d.ts +4 -2
- package/dist-lib/lib/tools/generate-music.js +5 -2
- package/dist-lib/lib/tools/office/ops.js +1 -1
- package/dist-lib/lib/tools/office.js +29 -6
- package/dist-lib/lib/tools/skills/catalog.d.ts +1 -0
- package/dist-lib/lib/tools/skills/catalog.js +2 -0
- package/dist-lib/lib/tools/skills/cli-schema-check.d.ts +1 -0
- package/dist-lib/lib/tools/skills/cli-schema-check.js +3 -0
- package/dist-lib/lib/tools/skills/cli-schema-load.js +10 -0
- package/dist-lib/lib/tools/skills/cli-schema-types.d.ts +2 -0
- package/dist-lib/lib/tools/skills/cli-schema.js +6 -3
- package/dist-lib/lib/tools/skills/frontmatter-parser.d.ts +1 -0
- package/dist-lib/lib/tools/skills/manifest-parse.d.ts +1 -0
- package/dist-lib/lib/tools/skills/manifest-parse.js +12 -0
- package/dist-lib/lib/tools/skills/mention.d.ts +0 -1
- package/dist-lib/lib/tools/skills/mention.js +0 -3
- package/dist-lib/lib/tools/translate.d.ts +3 -1
- package/dist-lib/lib/tools/translate.js +6 -1
- package/dist-lib/schema/harness.js +43 -4
- package/dist-lib/spec/bind.js +9 -0
- package/dist-lib/spec/calls.js +3 -0
- package/dist-lib/spec/hrpc/hrpc.json +39 -0
- package/dist-lib/spec/hrpc/index.js +39 -3
- package/dist-lib/spec/hrpc/messages.js +101 -13
- package/dist-lib/spec/hyperschema/index.js +101 -13
- package/dist-lib/spec/hyperschema/schema.json +62 -1
- package/dist-lib/spec/hyperschema/types.d.ts +20 -2
- package/package.json +8 -10
- package/worker/harness-sidecar.mjs +2 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 20
|
|
3
3
|
/* eslint-disable camelcase */
|
|
4
4
|
/* eslint-disable quotes */
|
|
5
5
|
/* eslint-disable space-before-function-paren */
|
|
6
6
|
|
|
7
7
|
import { c } from 'hyperschema/runtime'
|
|
8
8
|
|
|
9
|
-
const VERSION =
|
|
9
|
+
const VERSION = 20
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -491,7 +491,8 @@ const encoding11 = {
|
|
|
491
491
|
((version >= 9 && m.captureInferenceCalls) ? 33554432 : 0) |
|
|
492
492
|
((version >= 11 && m.capability) ? 67108864 : 0) |
|
|
493
493
|
((version >= 11 && m.arguments) ? 134217728 : 0) |
|
|
494
|
-
((version >= 12 && m.enhance) ? 268435456 : 0)
|
|
494
|
+
((version >= 12 && m.enhance) ? 268435456 : 0) |
|
|
495
|
+
((version >= 20 && m.session) ? 536870912 : 0)
|
|
495
496
|
|
|
496
497
|
encoding10.preencode(state, m.type)
|
|
497
498
|
c.uint.preencode(state, flags)
|
|
@@ -522,6 +523,7 @@ const encoding11 = {
|
|
|
522
523
|
if (version >= 11 && m.capability) c.string.preencode(state, m.capability)
|
|
523
524
|
if (version >= 11 && m.arguments) c.json.preencode(state, m.arguments)
|
|
524
525
|
if (version >= 12 && m.enhance) c.string.preencode(state, m.enhance)
|
|
526
|
+
if (version >= 20 && m.session) c.string.preencode(state, m.session)
|
|
525
527
|
},
|
|
526
528
|
encode(state, m) {
|
|
527
529
|
const flags =
|
|
@@ -553,7 +555,8 @@ const encoding11 = {
|
|
|
553
555
|
((version >= 9 && m.captureInferenceCalls) ? 33554432 : 0) |
|
|
554
556
|
((version >= 11 && m.capability) ? 67108864 : 0) |
|
|
555
557
|
((version >= 11 && m.arguments) ? 134217728 : 0) |
|
|
556
|
-
((version >= 12 && m.enhance) ? 268435456 : 0)
|
|
558
|
+
((version >= 12 && m.enhance) ? 268435456 : 0) |
|
|
559
|
+
((version >= 20 && m.session) ? 536870912 : 0)
|
|
557
560
|
|
|
558
561
|
encoding10.encode(state, m.type)
|
|
559
562
|
c.uint.encode(state, flags)
|
|
@@ -584,6 +587,7 @@ const encoding11 = {
|
|
|
584
587
|
if (version >= 11 && m.capability) c.string.encode(state, m.capability)
|
|
585
588
|
if (version >= 11 && m.arguments) c.json.encode(state, m.arguments)
|
|
586
589
|
if (version >= 12 && m.enhance) c.string.encode(state, m.enhance)
|
|
590
|
+
if (version >= 20 && m.session) c.string.encode(state, m.session)
|
|
587
591
|
},
|
|
588
592
|
decode(state) {
|
|
589
593
|
const r0 = encoding10.decode(state)
|
|
@@ -619,7 +623,8 @@ const encoding11 = {
|
|
|
619
623
|
captureInferenceCalls: (version >= 9 && (flags & 33554432) !== 0),
|
|
620
624
|
capability: (version >= 11 && (flags & 67108864) !== 0) ? c.string.decode(state) : null,
|
|
621
625
|
arguments: (version >= 11 && (flags & 134217728) !== 0) ? c.json.decode(state) : null,
|
|
622
|
-
enhance: (version >= 12 && (flags & 268435456) !== 0) ? c.string.decode(state) : null
|
|
626
|
+
enhance: (version >= 12 && (flags & 268435456) !== 0) ? c.string.decode(state) : null,
|
|
627
|
+
session: (version >= 20 && (flags & 536870912) !== 0) ? c.string.decode(state) : null
|
|
623
628
|
}
|
|
624
629
|
}
|
|
625
630
|
}
|
|
@@ -918,13 +923,14 @@ const encoding14_enum = {
|
|
|
918
923
|
error: 'error',
|
|
919
924
|
unloading: 'unloading',
|
|
920
925
|
unloaded: 'unloaded',
|
|
921
|
-
downloaded: 'downloaded'
|
|
926
|
+
downloaded: 'downloaded',
|
|
927
|
+
held: 'held'
|
|
922
928
|
}
|
|
923
929
|
|
|
924
930
|
// @harness/model-event-status enum
|
|
925
931
|
const encoding14 = {
|
|
926
932
|
preencode (state, m) {
|
|
927
|
-
state.end++ // max enum is
|
|
933
|
+
state.end++ // max enum is 8 so always one byte
|
|
928
934
|
},
|
|
929
935
|
encode (state, m) {
|
|
930
936
|
switch (m) {
|
|
@@ -949,6 +955,9 @@ const encoding14 = {
|
|
|
949
955
|
case 'downloaded':
|
|
950
956
|
c.uint.encode(state, 7)
|
|
951
957
|
break
|
|
958
|
+
case 'held':
|
|
959
|
+
c.uint.encode(state, 8)
|
|
960
|
+
break
|
|
952
961
|
default:
|
|
953
962
|
throw new Error('Unknown enum')
|
|
954
963
|
}
|
|
@@ -969,6 +978,8 @@ const encoding14 = {
|
|
|
969
978
|
return 'unloaded'
|
|
970
979
|
case 7:
|
|
971
980
|
return 'downloaded'
|
|
981
|
+
case 8:
|
|
982
|
+
return 'held'
|
|
972
983
|
default: return null
|
|
973
984
|
}
|
|
974
985
|
}
|
|
@@ -1001,8 +1012,18 @@ const encoding16_4 = c.array(c.frame(encoding15))
|
|
|
1001
1012
|
// @harness/model-event
|
|
1002
1013
|
const encoding16 = {
|
|
1003
1014
|
preencode(state, m) {
|
|
1015
|
+
const flags =
|
|
1016
|
+
(m.model ? 1 : 0) |
|
|
1017
|
+
(m.percentage ? 2 : 0) |
|
|
1018
|
+
(m.message ? 4 : 0) |
|
|
1019
|
+
(m.loaded ? 8 : 0) |
|
|
1020
|
+
(m.catalogChanged ? 16 : 0) |
|
|
1021
|
+
((version >= 5 && m.downloaded) ? 32 : 0) |
|
|
1022
|
+
((version >= 5 && m.total) ? 64 : 0) |
|
|
1023
|
+
((version >= 19 && m.addon) ? 128 : 0)
|
|
1024
|
+
|
|
1004
1025
|
encoding14.preencode(state, m.status)
|
|
1005
|
-
state
|
|
1026
|
+
c.uint.preencode(state, flags)
|
|
1006
1027
|
|
|
1007
1028
|
if (m.model) c.string.preencode(state, m.model)
|
|
1008
1029
|
if (m.percentage) c.uint.preencode(state, m.percentage)
|
|
@@ -1010,6 +1031,7 @@ const encoding16 = {
|
|
|
1010
1031
|
if (m.loaded) encoding16_4.preencode(state, m.loaded)
|
|
1011
1032
|
if (version >= 5 && m.downloaded) c.uint.preencode(state, m.downloaded)
|
|
1012
1033
|
if (version >= 5 && m.total) c.uint.preencode(state, m.total)
|
|
1034
|
+
if (version >= 19 && m.addon) c.string.preencode(state, m.addon)
|
|
1013
1035
|
},
|
|
1014
1036
|
encode(state, m) {
|
|
1015
1037
|
const flags =
|
|
@@ -1019,7 +1041,8 @@ const encoding16 = {
|
|
|
1019
1041
|
(m.loaded ? 8 : 0) |
|
|
1020
1042
|
(m.catalogChanged ? 16 : 0) |
|
|
1021
1043
|
((version >= 5 && m.downloaded) ? 32 : 0) |
|
|
1022
|
-
((version >= 5 && m.total) ? 64 : 0)
|
|
1044
|
+
((version >= 5 && m.total) ? 64 : 0) |
|
|
1045
|
+
((version >= 19 && m.addon) ? 128 : 0)
|
|
1023
1046
|
|
|
1024
1047
|
encoding14.encode(state, m.status)
|
|
1025
1048
|
c.uint.encode(state, flags)
|
|
@@ -1030,6 +1053,7 @@ const encoding16 = {
|
|
|
1030
1053
|
if (m.loaded) encoding16_4.encode(state, m.loaded)
|
|
1031
1054
|
if (version >= 5 && m.downloaded) c.uint.encode(state, m.downloaded)
|
|
1032
1055
|
if (version >= 5 && m.total) c.uint.encode(state, m.total)
|
|
1056
|
+
if (version >= 19 && m.addon) c.string.encode(state, m.addon)
|
|
1033
1057
|
},
|
|
1034
1058
|
decode(state) {
|
|
1035
1059
|
const r0 = encoding14.decode(state)
|
|
@@ -1043,7 +1067,8 @@ const encoding16 = {
|
|
|
1043
1067
|
loaded: (flags & 8) !== 0 ? encoding16_4.decode(state) : null,
|
|
1044
1068
|
catalogChanged: (flags & 16) !== 0,
|
|
1045
1069
|
downloaded: (version >= 5 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
1046
|
-
total: (version >= 5 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
|
|
1070
|
+
total: (version >= 5 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
1071
|
+
addon: (version >= 19 && (flags & 128) !== 0) ? c.string.decode(state) : null
|
|
1047
1072
|
}
|
|
1048
1073
|
}
|
|
1049
1074
|
}
|
|
@@ -1610,11 +1635,12 @@ const encoding31 = {
|
|
|
1610
1635
|
c.string.preencode(state, m.type)
|
|
1611
1636
|
c.string.preencode(state, m.registryPath)
|
|
1612
1637
|
c.string.preencode(state, m.registrySource)
|
|
1613
|
-
state.end++ // max flag is
|
|
1638
|
+
state.end++ // max flag is 64 so always one byte
|
|
1614
1639
|
c.uint.preencode(state, m.expectedSize)
|
|
1615
1640
|
|
|
1616
1641
|
if (m.actualSize) c.uint.preencode(state, m.actualSize)
|
|
1617
1642
|
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
1643
|
+
if (version >= 19 && m.memoryBytes) c.uint.preencode(state, m.memoryBytes)
|
|
1618
1644
|
},
|
|
1619
1645
|
encode(state, m) {
|
|
1620
1646
|
const flags =
|
|
@@ -1623,7 +1649,8 @@ const encoding31 = {
|
|
|
1623
1649
|
(m.supportsImages ? 4 : 0) |
|
|
1624
1650
|
(m.actualSize ? 8 : 0) |
|
|
1625
1651
|
((version >= 15 && m.label) ? 16 : 0) |
|
|
1626
|
-
((version >= 18 && m.isLoading) ? 32 : 0)
|
|
1652
|
+
((version >= 18 && m.isLoading) ? 32 : 0) |
|
|
1653
|
+
((version >= 19 && m.memoryBytes) ? 64 : 0)
|
|
1627
1654
|
|
|
1628
1655
|
c.string.encode(state, m.name)
|
|
1629
1656
|
c.string.encode(state, m.type)
|
|
@@ -1634,6 +1661,7 @@ const encoding31 = {
|
|
|
1634
1661
|
|
|
1635
1662
|
if (m.actualSize) c.uint.encode(state, m.actualSize)
|
|
1636
1663
|
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
1664
|
+
if (version >= 19 && m.memoryBytes) c.uint.encode(state, m.memoryBytes)
|
|
1637
1665
|
},
|
|
1638
1666
|
decode(state) {
|
|
1639
1667
|
const r0 = c.string.decode(state)
|
|
@@ -1653,7 +1681,8 @@ const encoding31 = {
|
|
|
1653
1681
|
expectedSize: c.uint.decode(state),
|
|
1654
1682
|
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
|
|
1655
1683
|
label: (version >= 15 && (flags & 16) !== 0) ? c.string.decode(state) : null,
|
|
1656
|
-
isLoading: (version >= 18 && (flags & 32) !== 0)
|
|
1684
|
+
isLoading: (version >= 18 && (flags & 32) !== 0),
|
|
1685
|
+
memoryBytes: (version >= 19 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
|
|
1657
1686
|
}
|
|
1658
1687
|
}
|
|
1659
1688
|
}
|
|
@@ -3428,6 +3457,59 @@ const encoding91 = {
|
|
|
3428
3457
|
}
|
|
3429
3458
|
}
|
|
3430
3459
|
|
|
3460
|
+
// @harness/set-model-memory-cap-request
|
|
3461
|
+
const encoding92 = {
|
|
3462
|
+
preencode(state, m) {
|
|
3463
|
+
c.uint.preencode(state, m.percent)
|
|
3464
|
+
},
|
|
3465
|
+
encode(state, m) {
|
|
3466
|
+
c.uint.encode(state, m.percent)
|
|
3467
|
+
},
|
|
3468
|
+
decode(state) {
|
|
3469
|
+
const r0 = c.uint.decode(state)
|
|
3470
|
+
|
|
3471
|
+
return {
|
|
3472
|
+
percent: r0
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
// @harness/memory-usage
|
|
3478
|
+
const encoding93 = {
|
|
3479
|
+
preencode(state, m) {
|
|
3480
|
+
c.uint.preencode(state, m.usedBytes)
|
|
3481
|
+
},
|
|
3482
|
+
encode(state, m) {
|
|
3483
|
+
c.uint.encode(state, m.usedBytes)
|
|
3484
|
+
},
|
|
3485
|
+
decode(state) {
|
|
3486
|
+
const r0 = c.uint.decode(state)
|
|
3487
|
+
|
|
3488
|
+
return {
|
|
3489
|
+
usedBytes: r0
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
// @harness/set-downloads-allowed-request
|
|
3495
|
+
const encoding94 = {
|
|
3496
|
+
preencode(state, m) {
|
|
3497
|
+
state.end++ // max flag is 1 so always one byte
|
|
3498
|
+
},
|
|
3499
|
+
encode(state, m) {
|
|
3500
|
+
const flags = (version >= 19 && m.allowed) ? 1 : 0
|
|
3501
|
+
|
|
3502
|
+
c.uint.encode(state, flags)
|
|
3503
|
+
},
|
|
3504
|
+
decode(state) {
|
|
3505
|
+
const flags = c.uint.decode(state)
|
|
3506
|
+
|
|
3507
|
+
return {
|
|
3508
|
+
allowed: (version >= 19 && (flags & 1) !== 0)
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3431
3513
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3432
3514
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3433
3515
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3674,6 +3756,12 @@ function getEncoding(name) {
|
|
|
3674
3756
|
return encoding90
|
|
3675
3757
|
case '@harness/unload-model-response':
|
|
3676
3758
|
return encoding91
|
|
3759
|
+
case '@harness/set-model-memory-cap-request':
|
|
3760
|
+
return encoding92
|
|
3761
|
+
case '@harness/memory-usage':
|
|
3762
|
+
return encoding93
|
|
3763
|
+
case '@harness/set-downloads-allowed-request':
|
|
3764
|
+
return encoding94
|
|
3677
3765
|
default:
|
|
3678
3766
|
throw new Error('Encoder not found ' + name)
|
|
3679
3767
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 20
|
|
3
3
|
/* eslint-disable camelcase */
|
|
4
4
|
/* eslint-disable quotes */
|
|
5
5
|
/* eslint-disable space-before-function-paren */
|
|
6
6
|
|
|
7
7
|
import { c } from 'hyperschema/runtime'
|
|
8
8
|
|
|
9
|
-
const VERSION =
|
|
9
|
+
const VERSION = 20
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -491,7 +491,8 @@ const encoding11 = {
|
|
|
491
491
|
((version >= 9 && m.captureInferenceCalls) ? 33554432 : 0) |
|
|
492
492
|
((version >= 11 && m.capability) ? 67108864 : 0) |
|
|
493
493
|
((version >= 11 && m.arguments) ? 134217728 : 0) |
|
|
494
|
-
((version >= 12 && m.enhance) ? 268435456 : 0)
|
|
494
|
+
((version >= 12 && m.enhance) ? 268435456 : 0) |
|
|
495
|
+
((version >= 20 && m.session) ? 536870912 : 0)
|
|
495
496
|
|
|
496
497
|
encoding10.preencode(state, m.type)
|
|
497
498
|
c.uint.preencode(state, flags)
|
|
@@ -522,6 +523,7 @@ const encoding11 = {
|
|
|
522
523
|
if (version >= 11 && m.capability) c.string.preencode(state, m.capability)
|
|
523
524
|
if (version >= 11 && m.arguments) c.json.preencode(state, m.arguments)
|
|
524
525
|
if (version >= 12 && m.enhance) c.string.preencode(state, m.enhance)
|
|
526
|
+
if (version >= 20 && m.session) c.string.preencode(state, m.session)
|
|
525
527
|
},
|
|
526
528
|
encode(state, m) {
|
|
527
529
|
const flags =
|
|
@@ -553,7 +555,8 @@ const encoding11 = {
|
|
|
553
555
|
((version >= 9 && m.captureInferenceCalls) ? 33554432 : 0) |
|
|
554
556
|
((version >= 11 && m.capability) ? 67108864 : 0) |
|
|
555
557
|
((version >= 11 && m.arguments) ? 134217728 : 0) |
|
|
556
|
-
((version >= 12 && m.enhance) ? 268435456 : 0)
|
|
558
|
+
((version >= 12 && m.enhance) ? 268435456 : 0) |
|
|
559
|
+
((version >= 20 && m.session) ? 536870912 : 0)
|
|
557
560
|
|
|
558
561
|
encoding10.encode(state, m.type)
|
|
559
562
|
c.uint.encode(state, flags)
|
|
@@ -584,6 +587,7 @@ const encoding11 = {
|
|
|
584
587
|
if (version >= 11 && m.capability) c.string.encode(state, m.capability)
|
|
585
588
|
if (version >= 11 && m.arguments) c.json.encode(state, m.arguments)
|
|
586
589
|
if (version >= 12 && m.enhance) c.string.encode(state, m.enhance)
|
|
590
|
+
if (version >= 20 && m.session) c.string.encode(state, m.session)
|
|
587
591
|
},
|
|
588
592
|
decode(state) {
|
|
589
593
|
const r0 = encoding10.decode(state)
|
|
@@ -619,7 +623,8 @@ const encoding11 = {
|
|
|
619
623
|
captureInferenceCalls: (version >= 9 && (flags & 33554432) !== 0),
|
|
620
624
|
capability: (version >= 11 && (flags & 67108864) !== 0) ? c.string.decode(state) : null,
|
|
621
625
|
arguments: (version >= 11 && (flags & 134217728) !== 0) ? c.json.decode(state) : null,
|
|
622
|
-
enhance: (version >= 12 && (flags & 268435456) !== 0) ? c.string.decode(state) : null
|
|
626
|
+
enhance: (version >= 12 && (flags & 268435456) !== 0) ? c.string.decode(state) : null,
|
|
627
|
+
session: (version >= 20 && (flags & 536870912) !== 0) ? c.string.decode(state) : null
|
|
623
628
|
}
|
|
624
629
|
}
|
|
625
630
|
}
|
|
@@ -918,13 +923,14 @@ const encoding14_enum = {
|
|
|
918
923
|
error: 'error',
|
|
919
924
|
unloading: 'unloading',
|
|
920
925
|
unloaded: 'unloaded',
|
|
921
|
-
downloaded: 'downloaded'
|
|
926
|
+
downloaded: 'downloaded',
|
|
927
|
+
held: 'held'
|
|
922
928
|
}
|
|
923
929
|
|
|
924
930
|
// @harness/model-event-status enum
|
|
925
931
|
const encoding14 = {
|
|
926
932
|
preencode (state, m) {
|
|
927
|
-
state.end++ // max enum is
|
|
933
|
+
state.end++ // max enum is 8 so always one byte
|
|
928
934
|
},
|
|
929
935
|
encode (state, m) {
|
|
930
936
|
switch (m) {
|
|
@@ -949,6 +955,9 @@ const encoding14 = {
|
|
|
949
955
|
case 'downloaded':
|
|
950
956
|
c.uint.encode(state, 7)
|
|
951
957
|
break
|
|
958
|
+
case 'held':
|
|
959
|
+
c.uint.encode(state, 8)
|
|
960
|
+
break
|
|
952
961
|
default:
|
|
953
962
|
throw new Error('Unknown enum')
|
|
954
963
|
}
|
|
@@ -969,6 +978,8 @@ const encoding14 = {
|
|
|
969
978
|
return 'unloaded'
|
|
970
979
|
case 7:
|
|
971
980
|
return 'downloaded'
|
|
981
|
+
case 8:
|
|
982
|
+
return 'held'
|
|
972
983
|
default: return null
|
|
973
984
|
}
|
|
974
985
|
}
|
|
@@ -1001,8 +1012,18 @@ const encoding16_4 = c.array(c.frame(encoding15))
|
|
|
1001
1012
|
// @harness/model-event
|
|
1002
1013
|
const encoding16 = {
|
|
1003
1014
|
preencode(state, m) {
|
|
1015
|
+
const flags =
|
|
1016
|
+
(m.model ? 1 : 0) |
|
|
1017
|
+
(m.percentage ? 2 : 0) |
|
|
1018
|
+
(m.message ? 4 : 0) |
|
|
1019
|
+
(m.loaded ? 8 : 0) |
|
|
1020
|
+
(m.catalogChanged ? 16 : 0) |
|
|
1021
|
+
((version >= 5 && m.downloaded) ? 32 : 0) |
|
|
1022
|
+
((version >= 5 && m.total) ? 64 : 0) |
|
|
1023
|
+
((version >= 19 && m.addon) ? 128 : 0)
|
|
1024
|
+
|
|
1004
1025
|
encoding14.preencode(state, m.status)
|
|
1005
|
-
state
|
|
1026
|
+
c.uint.preencode(state, flags)
|
|
1006
1027
|
|
|
1007
1028
|
if (m.model) c.string.preencode(state, m.model)
|
|
1008
1029
|
if (m.percentage) c.uint.preencode(state, m.percentage)
|
|
@@ -1010,6 +1031,7 @@ const encoding16 = {
|
|
|
1010
1031
|
if (m.loaded) encoding16_4.preencode(state, m.loaded)
|
|
1011
1032
|
if (version >= 5 && m.downloaded) c.uint.preencode(state, m.downloaded)
|
|
1012
1033
|
if (version >= 5 && m.total) c.uint.preencode(state, m.total)
|
|
1034
|
+
if (version >= 19 && m.addon) c.string.preencode(state, m.addon)
|
|
1013
1035
|
},
|
|
1014
1036
|
encode(state, m) {
|
|
1015
1037
|
const flags =
|
|
@@ -1019,7 +1041,8 @@ const encoding16 = {
|
|
|
1019
1041
|
(m.loaded ? 8 : 0) |
|
|
1020
1042
|
(m.catalogChanged ? 16 : 0) |
|
|
1021
1043
|
((version >= 5 && m.downloaded) ? 32 : 0) |
|
|
1022
|
-
((version >= 5 && m.total) ? 64 : 0)
|
|
1044
|
+
((version >= 5 && m.total) ? 64 : 0) |
|
|
1045
|
+
((version >= 19 && m.addon) ? 128 : 0)
|
|
1023
1046
|
|
|
1024
1047
|
encoding14.encode(state, m.status)
|
|
1025
1048
|
c.uint.encode(state, flags)
|
|
@@ -1030,6 +1053,7 @@ const encoding16 = {
|
|
|
1030
1053
|
if (m.loaded) encoding16_4.encode(state, m.loaded)
|
|
1031
1054
|
if (version >= 5 && m.downloaded) c.uint.encode(state, m.downloaded)
|
|
1032
1055
|
if (version >= 5 && m.total) c.uint.encode(state, m.total)
|
|
1056
|
+
if (version >= 19 && m.addon) c.string.encode(state, m.addon)
|
|
1033
1057
|
},
|
|
1034
1058
|
decode(state) {
|
|
1035
1059
|
const r0 = encoding14.decode(state)
|
|
@@ -1043,7 +1067,8 @@ const encoding16 = {
|
|
|
1043
1067
|
loaded: (flags & 8) !== 0 ? encoding16_4.decode(state) : null,
|
|
1044
1068
|
catalogChanged: (flags & 16) !== 0,
|
|
1045
1069
|
downloaded: (version >= 5 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
1046
|
-
total: (version >= 5 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
|
|
1070
|
+
total: (version >= 5 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
1071
|
+
addon: (version >= 19 && (flags & 128) !== 0) ? c.string.decode(state) : null
|
|
1047
1072
|
}
|
|
1048
1073
|
}
|
|
1049
1074
|
}
|
|
@@ -1610,11 +1635,12 @@ const encoding31 = {
|
|
|
1610
1635
|
c.string.preencode(state, m.type)
|
|
1611
1636
|
c.string.preencode(state, m.registryPath)
|
|
1612
1637
|
c.string.preencode(state, m.registrySource)
|
|
1613
|
-
state.end++ // max flag is
|
|
1638
|
+
state.end++ // max flag is 64 so always one byte
|
|
1614
1639
|
c.uint.preencode(state, m.expectedSize)
|
|
1615
1640
|
|
|
1616
1641
|
if (m.actualSize) c.uint.preencode(state, m.actualSize)
|
|
1617
1642
|
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
1643
|
+
if (version >= 19 && m.memoryBytes) c.uint.preencode(state, m.memoryBytes)
|
|
1618
1644
|
},
|
|
1619
1645
|
encode(state, m) {
|
|
1620
1646
|
const flags =
|
|
@@ -1623,7 +1649,8 @@ const encoding31 = {
|
|
|
1623
1649
|
(m.supportsImages ? 4 : 0) |
|
|
1624
1650
|
(m.actualSize ? 8 : 0) |
|
|
1625
1651
|
((version >= 15 && m.label) ? 16 : 0) |
|
|
1626
|
-
((version >= 18 && m.isLoading) ? 32 : 0)
|
|
1652
|
+
((version >= 18 && m.isLoading) ? 32 : 0) |
|
|
1653
|
+
((version >= 19 && m.memoryBytes) ? 64 : 0)
|
|
1627
1654
|
|
|
1628
1655
|
c.string.encode(state, m.name)
|
|
1629
1656
|
c.string.encode(state, m.type)
|
|
@@ -1634,6 +1661,7 @@ const encoding31 = {
|
|
|
1634
1661
|
|
|
1635
1662
|
if (m.actualSize) c.uint.encode(state, m.actualSize)
|
|
1636
1663
|
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
1664
|
+
if (version >= 19 && m.memoryBytes) c.uint.encode(state, m.memoryBytes)
|
|
1637
1665
|
},
|
|
1638
1666
|
decode(state) {
|
|
1639
1667
|
const r0 = c.string.decode(state)
|
|
@@ -1653,7 +1681,8 @@ const encoding31 = {
|
|
|
1653
1681
|
expectedSize: c.uint.decode(state),
|
|
1654
1682
|
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
|
|
1655
1683
|
label: (version >= 15 && (flags & 16) !== 0) ? c.string.decode(state) : null,
|
|
1656
|
-
isLoading: (version >= 18 && (flags & 32) !== 0)
|
|
1684
|
+
isLoading: (version >= 18 && (flags & 32) !== 0),
|
|
1685
|
+
memoryBytes: (version >= 19 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
|
|
1657
1686
|
}
|
|
1658
1687
|
}
|
|
1659
1688
|
}
|
|
@@ -3428,6 +3457,59 @@ const encoding91 = {
|
|
|
3428
3457
|
}
|
|
3429
3458
|
}
|
|
3430
3459
|
|
|
3460
|
+
// @harness/set-model-memory-cap-request
|
|
3461
|
+
const encoding92 = {
|
|
3462
|
+
preencode(state, m) {
|
|
3463
|
+
c.uint.preencode(state, m.percent)
|
|
3464
|
+
},
|
|
3465
|
+
encode(state, m) {
|
|
3466
|
+
c.uint.encode(state, m.percent)
|
|
3467
|
+
},
|
|
3468
|
+
decode(state) {
|
|
3469
|
+
const r0 = c.uint.decode(state)
|
|
3470
|
+
|
|
3471
|
+
return {
|
|
3472
|
+
percent: r0
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
// @harness/memory-usage
|
|
3478
|
+
const encoding93 = {
|
|
3479
|
+
preencode(state, m) {
|
|
3480
|
+
c.uint.preencode(state, m.usedBytes)
|
|
3481
|
+
},
|
|
3482
|
+
encode(state, m) {
|
|
3483
|
+
c.uint.encode(state, m.usedBytes)
|
|
3484
|
+
},
|
|
3485
|
+
decode(state) {
|
|
3486
|
+
const r0 = c.uint.decode(state)
|
|
3487
|
+
|
|
3488
|
+
return {
|
|
3489
|
+
usedBytes: r0
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
// @harness/set-downloads-allowed-request
|
|
3495
|
+
const encoding94 = {
|
|
3496
|
+
preencode(state, m) {
|
|
3497
|
+
state.end++ // max flag is 1 so always one byte
|
|
3498
|
+
},
|
|
3499
|
+
encode(state, m) {
|
|
3500
|
+
const flags = (version >= 19 && m.allowed) ? 1 : 0
|
|
3501
|
+
|
|
3502
|
+
c.uint.encode(state, flags)
|
|
3503
|
+
},
|
|
3504
|
+
decode(state) {
|
|
3505
|
+
const flags = c.uint.decode(state)
|
|
3506
|
+
|
|
3507
|
+
return {
|
|
3508
|
+
allowed: (version >= 19 && (flags & 1) !== 0)
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3431
3513
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3432
3514
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3433
3515
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3674,6 +3756,12 @@ function getEncoding(name) {
|
|
|
3674
3756
|
return encoding90
|
|
3675
3757
|
case '@harness/unload-model-response':
|
|
3676
3758
|
return encoding91
|
|
3759
|
+
case '@harness/set-model-memory-cap-request':
|
|
3760
|
+
return encoding92
|
|
3761
|
+
case '@harness/memory-usage':
|
|
3762
|
+
return encoding93
|
|
3763
|
+
case '@harness/set-downloads-allowed-request':
|
|
3764
|
+
return encoding94
|
|
3677
3765
|
default:
|
|
3678
3766
|
throw new Error('Encoder not found ' + name)
|
|
3679
3767
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 20,
|
|
3
3
|
"schema": [
|
|
4
4
|
{
|
|
5
5
|
"name": "empty",
|
|
@@ -475,6 +475,11 @@
|
|
|
475
475
|
"name": "enhance",
|
|
476
476
|
"type": "string",
|
|
477
477
|
"version": 12
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "session",
|
|
481
|
+
"type": "string",
|
|
482
|
+
"version": 20
|
|
478
483
|
}
|
|
479
484
|
]
|
|
480
485
|
},
|
|
@@ -739,6 +744,10 @@
|
|
|
739
744
|
{
|
|
740
745
|
"key": "downloaded",
|
|
741
746
|
"version": 8
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"key": "held",
|
|
750
|
+
"version": 19
|
|
742
751
|
}
|
|
743
752
|
],
|
|
744
753
|
"strings": true
|
|
@@ -810,6 +819,11 @@
|
|
|
810
819
|
"name": "total",
|
|
811
820
|
"type": "uint",
|
|
812
821
|
"version": 5
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"name": "addon",
|
|
825
|
+
"type": "string",
|
|
826
|
+
"version": 19
|
|
813
827
|
}
|
|
814
828
|
]
|
|
815
829
|
},
|
|
@@ -1346,6 +1360,11 @@
|
|
|
1346
1360
|
"name": "isLoading",
|
|
1347
1361
|
"type": "bool",
|
|
1348
1362
|
"version": 18
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"name": "memoryBytes",
|
|
1366
|
+
"type": "uint",
|
|
1367
|
+
"version": 19
|
|
1349
1368
|
}
|
|
1350
1369
|
]
|
|
1351
1370
|
},
|
|
@@ -2774,6 +2793,48 @@
|
|
|
2774
2793
|
"version": 16
|
|
2775
2794
|
}
|
|
2776
2795
|
]
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
"name": "set-model-memory-cap-request",
|
|
2799
|
+
"namespace": "harness",
|
|
2800
|
+
"compact": false,
|
|
2801
|
+
"flagsPosition": -1,
|
|
2802
|
+
"fields": [
|
|
2803
|
+
{
|
|
2804
|
+
"name": "percent",
|
|
2805
|
+
"required": true,
|
|
2806
|
+
"type": "uint",
|
|
2807
|
+
"version": 19
|
|
2808
|
+
}
|
|
2809
|
+
]
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
"name": "memory-usage",
|
|
2813
|
+
"namespace": "harness",
|
|
2814
|
+
"compact": false,
|
|
2815
|
+
"flagsPosition": -1,
|
|
2816
|
+
"fields": [
|
|
2817
|
+
{
|
|
2818
|
+
"name": "usedBytes",
|
|
2819
|
+
"required": true,
|
|
2820
|
+
"type": "uint",
|
|
2821
|
+
"version": 19
|
|
2822
|
+
}
|
|
2823
|
+
]
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
"name": "set-downloads-allowed-request",
|
|
2827
|
+
"namespace": "harness",
|
|
2828
|
+
"compact": false,
|
|
2829
|
+
"flagsPosition": 0,
|
|
2830
|
+
"fields": [
|
|
2831
|
+
{
|
|
2832
|
+
"name": "allowed",
|
|
2833
|
+
"required": false,
|
|
2834
|
+
"type": "bool",
|
|
2835
|
+
"version": 19
|
|
2836
|
+
}
|
|
2837
|
+
]
|
|
2777
2838
|
}
|
|
2778
2839
|
]
|
|
2779
2840
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is autogenerated by hyperschema-ts
|
|
2
|
-
// Schema version:
|
|
2
|
+
// Schema version: 20
|
|
3
3
|
// Do not edit manually.
|
|
4
4
|
|
|
5
5
|
export interface HarnessEmpty {
|
|
@@ -91,6 +91,7 @@ export interface HarnessCompletionFrame {
|
|
|
91
91
|
capability?: string | null
|
|
92
92
|
arguments?: unknown | null
|
|
93
93
|
enhance?: string | null
|
|
94
|
+
session?: string | null
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
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"
|
|
@@ -126,7 +127,7 @@ export interface HarnessCompletionEvent {
|
|
|
126
127
|
rawCall?: string | null
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
export type HarnessModelEventStatus = "loading" | "downloading" | "ready" | "error" | "unloading" | "unloaded" | "downloaded"
|
|
130
|
+
export type HarnessModelEventStatus = "loading" | "downloading" | "ready" | "error" | "unloading" | "unloaded" | "downloaded" | "held"
|
|
130
131
|
|
|
131
132
|
export interface HarnessLoadedModel {
|
|
132
133
|
model: string
|
|
@@ -142,6 +143,7 @@ export interface HarnessModelEvent {
|
|
|
142
143
|
catalogChanged?: boolean
|
|
143
144
|
downloaded?: number
|
|
144
145
|
total?: number
|
|
146
|
+
addon?: string | null
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
export interface HarnessDownloadRequest {
|
|
@@ -258,6 +260,7 @@ export interface HarnessModelInfo {
|
|
|
258
260
|
actualSize?: number
|
|
259
261
|
label?: string | null
|
|
260
262
|
isLoading?: boolean
|
|
263
|
+
memoryBytes?: number
|
|
261
264
|
}
|
|
262
265
|
|
|
263
266
|
export interface HarnessListModelsRequest {
|
|
@@ -583,6 +586,18 @@ export interface HarnessUnloadModelResponse {
|
|
|
583
586
|
unloaded?: boolean
|
|
584
587
|
}
|
|
585
588
|
|
|
589
|
+
export interface HarnessSetModelMemoryCapRequest {
|
|
590
|
+
percent: number
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export interface HarnessMemoryUsage {
|
|
594
|
+
usedBytes: number
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface HarnessSetDownloadsAllowedRequest {
|
|
598
|
+
allowed?: boolean
|
|
599
|
+
}
|
|
600
|
+
|
|
586
601
|
export interface SchemaTypes {
|
|
587
602
|
"@harness/empty": HarnessEmpty
|
|
588
603
|
"@harness/ok-response": HarnessOkResponse
|
|
@@ -676,4 +691,7 @@ export interface SchemaTypes {
|
|
|
676
691
|
"@harness/load-model-response": HarnessLoadModelResponse
|
|
677
692
|
"@harness/unload-model-request": HarnessUnloadModelRequest
|
|
678
693
|
"@harness/unload-model-response": HarnessUnloadModelResponse
|
|
694
|
+
"@harness/set-model-memory-cap-request": HarnessSetModelMemoryCapRequest
|
|
695
|
+
"@harness/memory-usage": HarnessMemoryUsage
|
|
696
|
+
"@harness/set-downloads-allowed-request": HarnessSetDownloadsAllowedRequest
|
|
679
697
|
}
|