@qvac/core 0.7.3 → 0.7.4
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 +83 -1
- package/README.md +4 -3
- package/dist-lib/lib/api/device-routes.d.ts +11 -0
- package/dist-lib/lib/api/device-routes.js +124 -0
- package/dist-lib/lib/assistant.js +8 -2
- package/dist-lib/lib/core/agent.js +6 -2
- package/dist-lib/lib/core/device-control.d.ts +23 -0
- package/dist-lib/lib/core/device-control.js +92 -0
- package/dist-lib/lib/core/mesh.d.ts +14 -0
- package/dist-lib/lib/core/mesh.js +100 -4
- package/dist-lib/lib/core/peer-duplex.d.ts +2 -0
- package/dist-lib/lib/core/peer-duplex.js +11 -2
- package/dist-lib/lib/core/tool-configs.js +1 -1
- package/dist-lib/lib/core.d.ts +3 -0
- package/dist-lib/lib/core.js +41 -1
- package/dist-lib/lib/log.js +4 -1
- package/dist-lib/schema/build.js +1 -0
- package/dist-lib/schema/engine.js +45 -15
- package/dist-lib/spec/capabilities.d.ts +6 -6
- package/dist-lib/spec/hrpc/hrpc.json +3 -3
- package/dist-lib/spec/hrpc/index.js +3 -3
- package/dist-lib/spec/hrpc/messages.js +105 -20
- package/dist-lib/spec/hyperschema/index.js +105 -20
- package/dist-lib/spec/hyperschema/schema.json +81 -8
- package/dist-lib/spec/hyperschema/types.d.ts +17 -0
- package/package.json +2 -1
- package/tui/README.md +8 -4
- package/tui/app.mjs +273 -66
- package/tui/boot.mjs +46 -3
- package/tui/index.mjs +5 -1
- package/tui/lib/device-target.mjs +64 -0
|
@@ -48,15 +48,25 @@ const encoding1 = {
|
|
|
48
48
|
const encoding2 = {
|
|
49
49
|
preencode(state, m) {
|
|
50
50
|
c.string.preencode(state, m.key)
|
|
51
|
+
state.end++ // max flag is 1 so always one byte
|
|
52
|
+
|
|
53
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
51
54
|
},
|
|
52
55
|
encode(state, m) {
|
|
56
|
+
const flags = m.deviceId ? 1 : 0
|
|
57
|
+
|
|
53
58
|
c.string.encode(state, m.key)
|
|
59
|
+
c.uint.encode(state, flags)
|
|
60
|
+
|
|
61
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
54
62
|
},
|
|
55
63
|
decode(state) {
|
|
56
64
|
const r0 = c.string.decode(state)
|
|
65
|
+
const flags = c.uint.decode(state)
|
|
57
66
|
|
|
58
67
|
return {
|
|
59
|
-
key: r0
|
|
68
|
+
key: r0,
|
|
69
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
60
70
|
}
|
|
61
71
|
}
|
|
62
72
|
}
|
|
@@ -89,18 +99,28 @@ const encoding4 = {
|
|
|
89
99
|
preencode(state, m) {
|
|
90
100
|
c.string.preencode(state, m.key)
|
|
91
101
|
c.json.preencode(state, m.value)
|
|
102
|
+
state.end++ // max flag is 1 so always one byte
|
|
103
|
+
|
|
104
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
92
105
|
},
|
|
93
106
|
encode(state, m) {
|
|
107
|
+
const flags = m.deviceId ? 1 : 0
|
|
108
|
+
|
|
94
109
|
c.string.encode(state, m.key)
|
|
95
110
|
c.json.encode(state, m.value)
|
|
111
|
+
c.uint.encode(state, flags)
|
|
112
|
+
|
|
113
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
96
114
|
},
|
|
97
115
|
decode(state) {
|
|
98
116
|
const r0 = c.string.decode(state)
|
|
99
117
|
const r1 = c.json.decode(state)
|
|
118
|
+
const flags = c.uint.decode(state)
|
|
100
119
|
|
|
101
120
|
return {
|
|
102
121
|
key: r0,
|
|
103
|
-
value: r1
|
|
122
|
+
value: r1,
|
|
123
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
104
124
|
}
|
|
105
125
|
}
|
|
106
126
|
}
|
|
@@ -5871,10 +5891,11 @@ const encoding153 = {
|
|
|
5871
5891
|
// @assistant/list-models-request
|
|
5872
5892
|
const encoding154 = {
|
|
5873
5893
|
preencode(state, m) {
|
|
5874
|
-
state.end++ // max flag is
|
|
5894
|
+
state.end++ // max flag is 32 so always one byte
|
|
5875
5895
|
|
|
5876
5896
|
if (m.type) c.string.preencode(state, m.type)
|
|
5877
5897
|
if (m.taskType) encoding153.preencode(state, m.taskType)
|
|
5898
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
5878
5899
|
},
|
|
5879
5900
|
encode(state, m) {
|
|
5880
5901
|
const flags =
|
|
@@ -5882,12 +5903,14 @@ const encoding154 = {
|
|
|
5882
5903
|
(m.cachedOnly ? 2 : 0) |
|
|
5883
5904
|
(m.fullRegistry ? 4 : 0) |
|
|
5884
5905
|
(m.taskType ? 8 : 0) |
|
|
5885
|
-
(m.excludeCustom ? 16 : 0)
|
|
5906
|
+
(m.excludeCustom ? 16 : 0) |
|
|
5907
|
+
(m.deviceId ? 32 : 0)
|
|
5886
5908
|
|
|
5887
5909
|
c.uint.encode(state, flags)
|
|
5888
5910
|
|
|
5889
5911
|
if (m.type) c.string.encode(state, m.type)
|
|
5890
5912
|
if (m.taskType) encoding153.encode(state, m.taskType)
|
|
5913
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
5891
5914
|
},
|
|
5892
5915
|
decode(state) {
|
|
5893
5916
|
const flags = c.uint.decode(state)
|
|
@@ -5897,7 +5920,8 @@ const encoding154 = {
|
|
|
5897
5920
|
cachedOnly: (flags & 2) !== 0,
|
|
5898
5921
|
fullRegistry: (flags & 4) !== 0,
|
|
5899
5922
|
taskType: (flags & 8) !== 0 ? encoding153.decode(state) : null,
|
|
5900
|
-
excludeCustom: (flags & 16) !== 0
|
|
5923
|
+
excludeCustom: (flags & 16) !== 0,
|
|
5924
|
+
deviceId: (flags & 32) !== 0 ? c.fixed32.decode(state) : null
|
|
5901
5925
|
}
|
|
5902
5926
|
}
|
|
5903
5927
|
}
|
|
@@ -5991,7 +6015,31 @@ const encoding156 = {
|
|
|
5991
6015
|
}
|
|
5992
6016
|
|
|
5993
6017
|
// @assistant/delete-model-request
|
|
5994
|
-
const encoding157 =
|
|
6018
|
+
const encoding157 = {
|
|
6019
|
+
preencode(state, m) {
|
|
6020
|
+
c.string.preencode(state, m.name)
|
|
6021
|
+
state.end++ // max flag is 1 so always one byte
|
|
6022
|
+
|
|
6023
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6024
|
+
},
|
|
6025
|
+
encode(state, m) {
|
|
6026
|
+
const flags = m.deviceId ? 1 : 0
|
|
6027
|
+
|
|
6028
|
+
c.string.encode(state, m.name)
|
|
6029
|
+
c.uint.encode(state, flags)
|
|
6030
|
+
|
|
6031
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6032
|
+
},
|
|
6033
|
+
decode(state) {
|
|
6034
|
+
const r0 = c.string.decode(state)
|
|
6035
|
+
const flags = c.uint.decode(state)
|
|
6036
|
+
|
|
6037
|
+
return {
|
|
6038
|
+
name: r0,
|
|
6039
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
5995
6043
|
|
|
5996
6044
|
// @assistant/delete-model-response
|
|
5997
6045
|
const encoding158 = {
|
|
@@ -6333,13 +6381,17 @@ const encoding169 = {
|
|
|
6333
6381
|
const encoding170 = {
|
|
6334
6382
|
preencode(state, m) {
|
|
6335
6383
|
c.string.preencode(state, m.name)
|
|
6336
|
-
state.end++ // max flag is
|
|
6384
|
+
state.end++ // max flag is 2 so always one byte
|
|
6385
|
+
|
|
6386
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6337
6387
|
},
|
|
6338
6388
|
encode(state, m) {
|
|
6339
|
-
const flags = m.paused ? 1 : 0
|
|
6389
|
+
const flags = (m.paused ? 1 : 0) | (m.deviceId ? 2 : 0)
|
|
6340
6390
|
|
|
6341
6391
|
c.string.encode(state, m.name)
|
|
6342
6392
|
c.uint.encode(state, flags)
|
|
6393
|
+
|
|
6394
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6343
6395
|
},
|
|
6344
6396
|
decode(state) {
|
|
6345
6397
|
const r0 = c.string.decode(state)
|
|
@@ -6347,7 +6399,8 @@ const encoding170 = {
|
|
|
6347
6399
|
|
|
6348
6400
|
return {
|
|
6349
6401
|
name: r0,
|
|
6350
|
-
paused: (flags & 1) !== 0
|
|
6402
|
+
paused: (flags & 1) !== 0,
|
|
6403
|
+
deviceId: (flags & 2) !== 0 ? c.fixed32.decode(state) : null
|
|
6351
6404
|
}
|
|
6352
6405
|
}
|
|
6353
6406
|
}
|
|
@@ -6555,7 +6608,7 @@ const encoding176 = {
|
|
|
6555
6608
|
}
|
|
6556
6609
|
|
|
6557
6610
|
// @assistant/clear-model-download-request
|
|
6558
|
-
const encoding177 =
|
|
6611
|
+
const encoding177 = encoding157
|
|
6559
6612
|
|
|
6560
6613
|
// @assistant/custom-model
|
|
6561
6614
|
const encoding178 = {
|
|
@@ -6660,10 +6713,11 @@ const encoding180 = {
|
|
|
6660
6713
|
preencode(state, m) {
|
|
6661
6714
|
c.string.preencode(state, m.label)
|
|
6662
6715
|
c.string.preencode(state, m.src)
|
|
6663
|
-
state.end++ // max flag is
|
|
6716
|
+
state.end++ // max flag is 32 so always one byte
|
|
6664
6717
|
|
|
6665
6718
|
if (m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
6666
6719
|
if (m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
6720
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6667
6721
|
},
|
|
6668
6722
|
encode(state, m) {
|
|
6669
6723
|
const flags =
|
|
@@ -6671,7 +6725,8 @@ const encoding180 = {
|
|
|
6671
6725
|
(m.supportsTools ? 2 : 0) |
|
|
6672
6726
|
(m.supportsThinking ? 4 : 0) |
|
|
6673
6727
|
(m.supportsVision ? 8 : 0) |
|
|
6674
|
-
(m.expectedSize ? 16 : 0)
|
|
6728
|
+
(m.expectedSize ? 16 : 0) |
|
|
6729
|
+
(m.deviceId ? 32 : 0)
|
|
6675
6730
|
|
|
6676
6731
|
c.string.encode(state, m.label)
|
|
6677
6732
|
c.string.encode(state, m.src)
|
|
@@ -6679,6 +6734,7 @@ const encoding180 = {
|
|
|
6679
6734
|
|
|
6680
6735
|
if (m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
6681
6736
|
if (m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
6737
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6682
6738
|
},
|
|
6683
6739
|
decode(state) {
|
|
6684
6740
|
const r0 = c.string.decode(state)
|
|
@@ -6692,7 +6748,8 @@ const encoding180 = {
|
|
|
6692
6748
|
supportsTools: (flags & 2) !== 0,
|
|
6693
6749
|
supportsThinking: (flags & 4) !== 0,
|
|
6694
6750
|
supportsVision: (flags & 8) !== 0,
|
|
6695
|
-
expectedSize: (flags & 16) !== 0 ? c.uint.decode(state) : 0
|
|
6751
|
+
expectedSize: (flags & 16) !== 0 ? c.uint.decode(state) : 0,
|
|
6752
|
+
deviceId: (flags & 32) !== 0 ? c.fixed32.decode(state) : null
|
|
6696
6753
|
}
|
|
6697
6754
|
}
|
|
6698
6755
|
}
|
|
@@ -6701,23 +6758,25 @@ const encoding180 = {
|
|
|
6701
6758
|
const encoding181 = encoding98
|
|
6702
6759
|
|
|
6703
6760
|
// @assistant/remove-custom-model-request
|
|
6704
|
-
const encoding182 =
|
|
6761
|
+
const encoding182 = encoding157
|
|
6705
6762
|
|
|
6706
6763
|
// @assistant/preview-custom-model-request
|
|
6707
6764
|
const encoding183 = {
|
|
6708
6765
|
preencode(state, m) {
|
|
6709
6766
|
c.string.preencode(state, m.src)
|
|
6710
|
-
state.end++ // max flag is
|
|
6767
|
+
state.end++ // max flag is 2 so always one byte
|
|
6711
6768
|
|
|
6712
6769
|
if (m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
6770
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6713
6771
|
},
|
|
6714
6772
|
encode(state, m) {
|
|
6715
|
-
const flags = m.mmprojSrc ? 1 : 0
|
|
6773
|
+
const flags = (m.mmprojSrc ? 1 : 0) | (m.deviceId ? 2 : 0)
|
|
6716
6774
|
|
|
6717
6775
|
c.string.encode(state, m.src)
|
|
6718
6776
|
c.uint.encode(state, flags)
|
|
6719
6777
|
|
|
6720
6778
|
if (m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
6779
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6721
6780
|
},
|
|
6722
6781
|
decode(state) {
|
|
6723
6782
|
const r0 = c.string.decode(state)
|
|
@@ -6725,7 +6784,8 @@ const encoding183 = {
|
|
|
6725
6784
|
|
|
6726
6785
|
return {
|
|
6727
6786
|
src: r0,
|
|
6728
|
-
mmprojSrc: (flags & 1) !== 0 ? c.string.decode(state) : null
|
|
6787
|
+
mmprojSrc: (flags & 1) !== 0 ? c.string.decode(state) : null,
|
|
6788
|
+
deviceId: (flags & 2) !== 0 ? c.fixed32.decode(state) : null
|
|
6729
6789
|
}
|
|
6730
6790
|
}
|
|
6731
6791
|
}
|
|
@@ -10167,7 +10227,7 @@ const encoding292 = {
|
|
|
10167
10227
|
}
|
|
10168
10228
|
|
|
10169
10229
|
// @assistant/load-model-request
|
|
10170
|
-
const encoding293 =
|
|
10230
|
+
const encoding293 = encoding157
|
|
10171
10231
|
|
|
10172
10232
|
// @assistant/load-model-response
|
|
10173
10233
|
const encoding294 = {
|
|
@@ -10194,7 +10254,7 @@ const encoding294 = {
|
|
|
10194
10254
|
}
|
|
10195
10255
|
|
|
10196
10256
|
// @assistant/unload-model-request
|
|
10197
|
-
const encoding295 =
|
|
10257
|
+
const encoding295 = encoding157
|
|
10198
10258
|
|
|
10199
10259
|
// @assistant/unload-model-response
|
|
10200
10260
|
const encoding296 = {
|
|
@@ -10255,7 +10315,7 @@ const encoding297 = {
|
|
|
10255
10315
|
}
|
|
10256
10316
|
|
|
10257
10317
|
// @assistant/model-users-request
|
|
10258
|
-
const encoding298 =
|
|
10318
|
+
const encoding298 = encoding157
|
|
10259
10319
|
|
|
10260
10320
|
// @assistant/model-user
|
|
10261
10321
|
const encoding299 = {
|
|
@@ -10382,6 +10442,29 @@ const encoding302 = {
|
|
|
10382
10442
|
}
|
|
10383
10443
|
}
|
|
10384
10444
|
|
|
10445
|
+
// @assistant/device-scope
|
|
10446
|
+
const encoding303 = {
|
|
10447
|
+
preencode(state, m) {
|
|
10448
|
+
state.end++ // max flag is 1 so always one byte
|
|
10449
|
+
|
|
10450
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
10451
|
+
},
|
|
10452
|
+
encode(state, m) {
|
|
10453
|
+
const flags = m.deviceId ? 1 : 0
|
|
10454
|
+
|
|
10455
|
+
c.uint.encode(state, flags)
|
|
10456
|
+
|
|
10457
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
10458
|
+
},
|
|
10459
|
+
decode(state) {
|
|
10460
|
+
const flags = c.uint.decode(state)
|
|
10461
|
+
|
|
10462
|
+
return {
|
|
10463
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
10464
|
+
}
|
|
10465
|
+
}
|
|
10466
|
+
}
|
|
10467
|
+
|
|
10385
10468
|
// @assistant/model-info-list.memory, deferred due to recusive use
|
|
10386
10469
|
const encoding156_1 = c.frame(encoding302)
|
|
10387
10470
|
|
|
@@ -11088,6 +11171,8 @@ function getEncoding(name) {
|
|
|
11088
11171
|
return encoding301
|
|
11089
11172
|
case '@assistant/model-memory':
|
|
11090
11173
|
return encoding302
|
|
11174
|
+
case '@assistant/device-scope':
|
|
11175
|
+
return encoding303
|
|
11091
11176
|
default:
|
|
11092
11177
|
throw new Error('Encoder not found ' + name)
|
|
11093
11178
|
}
|
|
@@ -48,15 +48,25 @@ const encoding1 = {
|
|
|
48
48
|
const encoding2 = {
|
|
49
49
|
preencode(state, m) {
|
|
50
50
|
c.string.preencode(state, m.key)
|
|
51
|
+
state.end++ // max flag is 1 so always one byte
|
|
52
|
+
|
|
53
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
51
54
|
},
|
|
52
55
|
encode(state, m) {
|
|
56
|
+
const flags = m.deviceId ? 1 : 0
|
|
57
|
+
|
|
53
58
|
c.string.encode(state, m.key)
|
|
59
|
+
c.uint.encode(state, flags)
|
|
60
|
+
|
|
61
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
54
62
|
},
|
|
55
63
|
decode(state) {
|
|
56
64
|
const r0 = c.string.decode(state)
|
|
65
|
+
const flags = c.uint.decode(state)
|
|
57
66
|
|
|
58
67
|
return {
|
|
59
|
-
key: r0
|
|
68
|
+
key: r0,
|
|
69
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
60
70
|
}
|
|
61
71
|
}
|
|
62
72
|
}
|
|
@@ -89,18 +99,28 @@ const encoding4 = {
|
|
|
89
99
|
preencode(state, m) {
|
|
90
100
|
c.string.preencode(state, m.key)
|
|
91
101
|
c.json.preencode(state, m.value)
|
|
102
|
+
state.end++ // max flag is 1 so always one byte
|
|
103
|
+
|
|
104
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
92
105
|
},
|
|
93
106
|
encode(state, m) {
|
|
107
|
+
const flags = m.deviceId ? 1 : 0
|
|
108
|
+
|
|
94
109
|
c.string.encode(state, m.key)
|
|
95
110
|
c.json.encode(state, m.value)
|
|
111
|
+
c.uint.encode(state, flags)
|
|
112
|
+
|
|
113
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
96
114
|
},
|
|
97
115
|
decode(state) {
|
|
98
116
|
const r0 = c.string.decode(state)
|
|
99
117
|
const r1 = c.json.decode(state)
|
|
118
|
+
const flags = c.uint.decode(state)
|
|
100
119
|
|
|
101
120
|
return {
|
|
102
121
|
key: r0,
|
|
103
|
-
value: r1
|
|
122
|
+
value: r1,
|
|
123
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
104
124
|
}
|
|
105
125
|
}
|
|
106
126
|
}
|
|
@@ -5871,10 +5891,11 @@ const encoding153 = {
|
|
|
5871
5891
|
// @assistant/list-models-request
|
|
5872
5892
|
const encoding154 = {
|
|
5873
5893
|
preencode(state, m) {
|
|
5874
|
-
state.end++ // max flag is
|
|
5894
|
+
state.end++ // max flag is 32 so always one byte
|
|
5875
5895
|
|
|
5876
5896
|
if (m.type) c.string.preencode(state, m.type)
|
|
5877
5897
|
if (m.taskType) encoding153.preencode(state, m.taskType)
|
|
5898
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
5878
5899
|
},
|
|
5879
5900
|
encode(state, m) {
|
|
5880
5901
|
const flags =
|
|
@@ -5882,12 +5903,14 @@ const encoding154 = {
|
|
|
5882
5903
|
(m.cachedOnly ? 2 : 0) |
|
|
5883
5904
|
(m.fullRegistry ? 4 : 0) |
|
|
5884
5905
|
(m.taskType ? 8 : 0) |
|
|
5885
|
-
(m.excludeCustom ? 16 : 0)
|
|
5906
|
+
(m.excludeCustom ? 16 : 0) |
|
|
5907
|
+
(m.deviceId ? 32 : 0)
|
|
5886
5908
|
|
|
5887
5909
|
c.uint.encode(state, flags)
|
|
5888
5910
|
|
|
5889
5911
|
if (m.type) c.string.encode(state, m.type)
|
|
5890
5912
|
if (m.taskType) encoding153.encode(state, m.taskType)
|
|
5913
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
5891
5914
|
},
|
|
5892
5915
|
decode(state) {
|
|
5893
5916
|
const flags = c.uint.decode(state)
|
|
@@ -5897,7 +5920,8 @@ const encoding154 = {
|
|
|
5897
5920
|
cachedOnly: (flags & 2) !== 0,
|
|
5898
5921
|
fullRegistry: (flags & 4) !== 0,
|
|
5899
5922
|
taskType: (flags & 8) !== 0 ? encoding153.decode(state) : null,
|
|
5900
|
-
excludeCustom: (flags & 16) !== 0
|
|
5923
|
+
excludeCustom: (flags & 16) !== 0,
|
|
5924
|
+
deviceId: (flags & 32) !== 0 ? c.fixed32.decode(state) : null
|
|
5901
5925
|
}
|
|
5902
5926
|
}
|
|
5903
5927
|
}
|
|
@@ -5991,7 +6015,31 @@ const encoding156 = {
|
|
|
5991
6015
|
}
|
|
5992
6016
|
|
|
5993
6017
|
// @assistant/delete-model-request
|
|
5994
|
-
const encoding157 =
|
|
6018
|
+
const encoding157 = {
|
|
6019
|
+
preencode(state, m) {
|
|
6020
|
+
c.string.preencode(state, m.name)
|
|
6021
|
+
state.end++ // max flag is 1 so always one byte
|
|
6022
|
+
|
|
6023
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6024
|
+
},
|
|
6025
|
+
encode(state, m) {
|
|
6026
|
+
const flags = m.deviceId ? 1 : 0
|
|
6027
|
+
|
|
6028
|
+
c.string.encode(state, m.name)
|
|
6029
|
+
c.uint.encode(state, flags)
|
|
6030
|
+
|
|
6031
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6032
|
+
},
|
|
6033
|
+
decode(state) {
|
|
6034
|
+
const r0 = c.string.decode(state)
|
|
6035
|
+
const flags = c.uint.decode(state)
|
|
6036
|
+
|
|
6037
|
+
return {
|
|
6038
|
+
name: r0,
|
|
6039
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
5995
6043
|
|
|
5996
6044
|
// @assistant/delete-model-response
|
|
5997
6045
|
const encoding158 = {
|
|
@@ -6333,13 +6381,17 @@ const encoding169 = {
|
|
|
6333
6381
|
const encoding170 = {
|
|
6334
6382
|
preencode(state, m) {
|
|
6335
6383
|
c.string.preencode(state, m.name)
|
|
6336
|
-
state.end++ // max flag is
|
|
6384
|
+
state.end++ // max flag is 2 so always one byte
|
|
6385
|
+
|
|
6386
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6337
6387
|
},
|
|
6338
6388
|
encode(state, m) {
|
|
6339
|
-
const flags = m.paused ? 1 : 0
|
|
6389
|
+
const flags = (m.paused ? 1 : 0) | (m.deviceId ? 2 : 0)
|
|
6340
6390
|
|
|
6341
6391
|
c.string.encode(state, m.name)
|
|
6342
6392
|
c.uint.encode(state, flags)
|
|
6393
|
+
|
|
6394
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6343
6395
|
},
|
|
6344
6396
|
decode(state) {
|
|
6345
6397
|
const r0 = c.string.decode(state)
|
|
@@ -6347,7 +6399,8 @@ const encoding170 = {
|
|
|
6347
6399
|
|
|
6348
6400
|
return {
|
|
6349
6401
|
name: r0,
|
|
6350
|
-
paused: (flags & 1) !== 0
|
|
6402
|
+
paused: (flags & 1) !== 0,
|
|
6403
|
+
deviceId: (flags & 2) !== 0 ? c.fixed32.decode(state) : null
|
|
6351
6404
|
}
|
|
6352
6405
|
}
|
|
6353
6406
|
}
|
|
@@ -6555,7 +6608,7 @@ const encoding176 = {
|
|
|
6555
6608
|
}
|
|
6556
6609
|
|
|
6557
6610
|
// @assistant/clear-model-download-request
|
|
6558
|
-
const encoding177 =
|
|
6611
|
+
const encoding177 = encoding157
|
|
6559
6612
|
|
|
6560
6613
|
// @assistant/custom-model
|
|
6561
6614
|
const encoding178 = {
|
|
@@ -6660,10 +6713,11 @@ const encoding180 = {
|
|
|
6660
6713
|
preencode(state, m) {
|
|
6661
6714
|
c.string.preencode(state, m.label)
|
|
6662
6715
|
c.string.preencode(state, m.src)
|
|
6663
|
-
state.end++ // max flag is
|
|
6716
|
+
state.end++ // max flag is 32 so always one byte
|
|
6664
6717
|
|
|
6665
6718
|
if (m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
6666
6719
|
if (m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
6720
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6667
6721
|
},
|
|
6668
6722
|
encode(state, m) {
|
|
6669
6723
|
const flags =
|
|
@@ -6671,7 +6725,8 @@ const encoding180 = {
|
|
|
6671
6725
|
(m.supportsTools ? 2 : 0) |
|
|
6672
6726
|
(m.supportsThinking ? 4 : 0) |
|
|
6673
6727
|
(m.supportsVision ? 8 : 0) |
|
|
6674
|
-
(m.expectedSize ? 16 : 0)
|
|
6728
|
+
(m.expectedSize ? 16 : 0) |
|
|
6729
|
+
(m.deviceId ? 32 : 0)
|
|
6675
6730
|
|
|
6676
6731
|
c.string.encode(state, m.label)
|
|
6677
6732
|
c.string.encode(state, m.src)
|
|
@@ -6679,6 +6734,7 @@ const encoding180 = {
|
|
|
6679
6734
|
|
|
6680
6735
|
if (m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
6681
6736
|
if (m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
6737
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6682
6738
|
},
|
|
6683
6739
|
decode(state) {
|
|
6684
6740
|
const r0 = c.string.decode(state)
|
|
@@ -6692,7 +6748,8 @@ const encoding180 = {
|
|
|
6692
6748
|
supportsTools: (flags & 2) !== 0,
|
|
6693
6749
|
supportsThinking: (flags & 4) !== 0,
|
|
6694
6750
|
supportsVision: (flags & 8) !== 0,
|
|
6695
|
-
expectedSize: (flags & 16) !== 0 ? c.uint.decode(state) : 0
|
|
6751
|
+
expectedSize: (flags & 16) !== 0 ? c.uint.decode(state) : 0,
|
|
6752
|
+
deviceId: (flags & 32) !== 0 ? c.fixed32.decode(state) : null
|
|
6696
6753
|
}
|
|
6697
6754
|
}
|
|
6698
6755
|
}
|
|
@@ -6701,23 +6758,25 @@ const encoding180 = {
|
|
|
6701
6758
|
const encoding181 = encoding98
|
|
6702
6759
|
|
|
6703
6760
|
// @assistant/remove-custom-model-request
|
|
6704
|
-
const encoding182 =
|
|
6761
|
+
const encoding182 = encoding157
|
|
6705
6762
|
|
|
6706
6763
|
// @assistant/preview-custom-model-request
|
|
6707
6764
|
const encoding183 = {
|
|
6708
6765
|
preencode(state, m) {
|
|
6709
6766
|
c.string.preencode(state, m.src)
|
|
6710
|
-
state.end++ // max flag is
|
|
6767
|
+
state.end++ // max flag is 2 so always one byte
|
|
6711
6768
|
|
|
6712
6769
|
if (m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
6770
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
6713
6771
|
},
|
|
6714
6772
|
encode(state, m) {
|
|
6715
|
-
const flags = m.mmprojSrc ? 1 : 0
|
|
6773
|
+
const flags = (m.mmprojSrc ? 1 : 0) | (m.deviceId ? 2 : 0)
|
|
6716
6774
|
|
|
6717
6775
|
c.string.encode(state, m.src)
|
|
6718
6776
|
c.uint.encode(state, flags)
|
|
6719
6777
|
|
|
6720
6778
|
if (m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
6779
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
6721
6780
|
},
|
|
6722
6781
|
decode(state) {
|
|
6723
6782
|
const r0 = c.string.decode(state)
|
|
@@ -6725,7 +6784,8 @@ const encoding183 = {
|
|
|
6725
6784
|
|
|
6726
6785
|
return {
|
|
6727
6786
|
src: r0,
|
|
6728
|
-
mmprojSrc: (flags & 1) !== 0 ? c.string.decode(state) : null
|
|
6787
|
+
mmprojSrc: (flags & 1) !== 0 ? c.string.decode(state) : null,
|
|
6788
|
+
deviceId: (flags & 2) !== 0 ? c.fixed32.decode(state) : null
|
|
6729
6789
|
}
|
|
6730
6790
|
}
|
|
6731
6791
|
}
|
|
@@ -10167,7 +10227,7 @@ const encoding292 = {
|
|
|
10167
10227
|
}
|
|
10168
10228
|
|
|
10169
10229
|
// @assistant/load-model-request
|
|
10170
|
-
const encoding293 =
|
|
10230
|
+
const encoding293 = encoding157
|
|
10171
10231
|
|
|
10172
10232
|
// @assistant/load-model-response
|
|
10173
10233
|
const encoding294 = {
|
|
@@ -10194,7 +10254,7 @@ const encoding294 = {
|
|
|
10194
10254
|
}
|
|
10195
10255
|
|
|
10196
10256
|
// @assistant/unload-model-request
|
|
10197
|
-
const encoding295 =
|
|
10257
|
+
const encoding295 = encoding157
|
|
10198
10258
|
|
|
10199
10259
|
// @assistant/unload-model-response
|
|
10200
10260
|
const encoding296 = {
|
|
@@ -10255,7 +10315,7 @@ const encoding297 = {
|
|
|
10255
10315
|
}
|
|
10256
10316
|
|
|
10257
10317
|
// @assistant/model-users-request
|
|
10258
|
-
const encoding298 =
|
|
10318
|
+
const encoding298 = encoding157
|
|
10259
10319
|
|
|
10260
10320
|
// @assistant/model-user
|
|
10261
10321
|
const encoding299 = {
|
|
@@ -10382,6 +10442,29 @@ const encoding302 = {
|
|
|
10382
10442
|
}
|
|
10383
10443
|
}
|
|
10384
10444
|
|
|
10445
|
+
// @assistant/device-scope
|
|
10446
|
+
const encoding303 = {
|
|
10447
|
+
preencode(state, m) {
|
|
10448
|
+
state.end++ // max flag is 1 so always one byte
|
|
10449
|
+
|
|
10450
|
+
if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
|
|
10451
|
+
},
|
|
10452
|
+
encode(state, m) {
|
|
10453
|
+
const flags = m.deviceId ? 1 : 0
|
|
10454
|
+
|
|
10455
|
+
c.uint.encode(state, flags)
|
|
10456
|
+
|
|
10457
|
+
if (m.deviceId) c.fixed32.encode(state, m.deviceId)
|
|
10458
|
+
},
|
|
10459
|
+
decode(state) {
|
|
10460
|
+
const flags = c.uint.decode(state)
|
|
10461
|
+
|
|
10462
|
+
return {
|
|
10463
|
+
deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null
|
|
10464
|
+
}
|
|
10465
|
+
}
|
|
10466
|
+
}
|
|
10467
|
+
|
|
10385
10468
|
// @assistant/model-info-list.memory, deferred due to recusive use
|
|
10386
10469
|
const encoding156_1 = c.frame(encoding302)
|
|
10387
10470
|
|
|
@@ -11088,6 +11171,8 @@ function getEncoding(name) {
|
|
|
11088
11171
|
return encoding301
|
|
11089
11172
|
case '@assistant/model-memory':
|
|
11090
11173
|
return encoding302
|
|
11174
|
+
case '@assistant/device-scope':
|
|
11175
|
+
return encoding303
|
|
11091
11176
|
default:
|
|
11092
11177
|
throw new Error('Encoder not found ' + name)
|
|
11093
11178
|
}
|