@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.
- package/CHANGELOG.md +56 -1
- package/README.md +134 -0
- package/dist/harness.bundle +304 -175
- package/dist-lib/index.d.ts +6 -1
- package/dist-lib/index.js +29 -4
- package/dist-lib/lib/capabilities/completion.js +2 -5
- package/dist-lib/lib/capabilities/preview-model-source.d.ts +67 -0
- package/dist-lib/lib/capabilities/preview-model-source.js +387 -0
- package/dist-lib/lib/connect.d.ts +4 -5
- package/dist-lib/lib/connect.js +9 -0
- package/dist-lib/lib/contract-types.d.ts +4 -5
- package/dist-lib/lib/models/custom-model-cache.d.ts +4 -0
- package/dist-lib/lib/models/custom-model-cache.js +42 -0
- package/dist-lib/lib/models/gguf-header.d.ts +30 -0
- package/dist-lib/lib/models/gguf-header.js +208 -0
- package/dist-lib/lib/models/model-catalog.d.ts +6 -1
- package/dist-lib/lib/models/model-catalog.js +7 -2
- package/dist-lib/lib/models/model-delete.d.ts +4 -1
- package/dist-lib/lib/models/model-delete.js +19 -14
- package/dist-lib/lib/models/model-list.d.ts +6 -0
- package/dist-lib/lib/models/model-list.js +23 -1
- package/dist-lib/lib/models/model-source.js +1 -1
- package/dist-lib/lib/serve.js +21 -5
- package/dist-lib/schema/harness.js +42 -1
- package/dist-lib/spec/bind.js +3 -0
- package/dist-lib/spec/calls.js +1 -0
- package/dist-lib/spec/hrpc/hrpc.json +13 -0
- package/dist-lib/spec/hrpc/index.js +15 -3
- package/dist-lib/spec/hrpc/messages.js +173 -5
- package/dist-lib/spec/hyperschema/index.js +173 -5
- package/dist-lib/spec/hyperschema/schema.json +136 -1
- package/dist-lib/spec/hyperschema/types.d.ts +34 -1
- package/package.json +6 -7
- package/worker/harness-sidecar.mjs +1 -0
- package/dist-lib/lib/capabilities/vision-history.d.ts +0 -3
- package/dist-lib/lib/capabilities/vision-history.js +0 -21
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 14
|
|
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 = 14
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -2635,18 +2635,25 @@ const encoding65 = {
|
|
|
2635
2635
|
preencode(state, m) {
|
|
2636
2636
|
c.string.preencode(state, m.name)
|
|
2637
2637
|
c.string.preencode(state, m.src)
|
|
2638
|
-
state.end++ // max flag is
|
|
2638
|
+
state.end++ // max flag is 4 so always one byte
|
|
2639
2639
|
|
|
2640
2640
|
if (version >= 5 && m.projectionSrc) c.string.preencode(state, m.projectionSrc)
|
|
2641
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
2642
|
+
if (version >= 14 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
2641
2643
|
},
|
|
2642
2644
|
encode(state, m) {
|
|
2643
|
-
const flags =
|
|
2645
|
+
const flags =
|
|
2646
|
+
((version >= 5 && m.projectionSrc) ? 1 : 0) |
|
|
2647
|
+
((version >= 14 && m.taskType) ? 2 : 0) |
|
|
2648
|
+
((version >= 14 && m.expectedSize) ? 4 : 0)
|
|
2644
2649
|
|
|
2645
2650
|
c.string.encode(state, m.name)
|
|
2646
2651
|
c.string.encode(state, m.src)
|
|
2647
2652
|
c.uint.encode(state, flags)
|
|
2648
2653
|
|
|
2649
2654
|
if (version >= 5 && m.projectionSrc) c.string.encode(state, m.projectionSrc)
|
|
2655
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
2656
|
+
if (version >= 14 && m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
2650
2657
|
},
|
|
2651
2658
|
decode(state) {
|
|
2652
2659
|
const r0 = c.string.decode(state)
|
|
@@ -2656,7 +2663,9 @@ const encoding65 = {
|
|
|
2656
2663
|
return {
|
|
2657
2664
|
name: r0,
|
|
2658
2665
|
src: r1,
|
|
2659
|
-
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
2666
|
+
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null,
|
|
2667
|
+
taskType: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
2668
|
+
expectedSize: (version >= 14 && (flags & 4) !== 0) ? c.uint.decode(state) : 0
|
|
2660
2669
|
}
|
|
2661
2670
|
}
|
|
2662
2671
|
}
|
|
@@ -3174,6 +3183,159 @@ const encoding84 = {
|
|
|
3174
3183
|
}
|
|
3175
3184
|
}
|
|
3176
3185
|
|
|
3186
|
+
// @harness/preview-model-source-request
|
|
3187
|
+
const encoding85 = {
|
|
3188
|
+
preencode(state, m) {
|
|
3189
|
+
c.string.preencode(state, m.src)
|
|
3190
|
+
state.end++ // max flag is 1 so always one byte
|
|
3191
|
+
|
|
3192
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3193
|
+
},
|
|
3194
|
+
encode(state, m) {
|
|
3195
|
+
const flags = (version >= 14 && m.mmprojSrc) ? 1 : 0
|
|
3196
|
+
|
|
3197
|
+
c.string.encode(state, m.src)
|
|
3198
|
+
c.uint.encode(state, flags)
|
|
3199
|
+
|
|
3200
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3201
|
+
},
|
|
3202
|
+
decode(state) {
|
|
3203
|
+
const r0 = c.string.decode(state)
|
|
3204
|
+
const flags = c.uint.decode(state)
|
|
3205
|
+
|
|
3206
|
+
return {
|
|
3207
|
+
src: r0,
|
|
3208
|
+
mmprojSrc: (version >= 14 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
// @harness/model-source-file
|
|
3214
|
+
const encoding86 = {
|
|
3215
|
+
preencode(state, m) {
|
|
3216
|
+
c.string.preencode(state, m.src)
|
|
3217
|
+
c.string.preencode(state, m.label)
|
|
3218
|
+
state.end++ // max flag is 1 so always one byte
|
|
3219
|
+
|
|
3220
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3221
|
+
},
|
|
3222
|
+
encode(state, m) {
|
|
3223
|
+
const flags = (version >= 14 && m.sizeBytes) ? 1 : 0
|
|
3224
|
+
|
|
3225
|
+
c.string.encode(state, m.src)
|
|
3226
|
+
c.string.encode(state, m.label)
|
|
3227
|
+
c.uint.encode(state, flags)
|
|
3228
|
+
|
|
3229
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3230
|
+
},
|
|
3231
|
+
decode(state) {
|
|
3232
|
+
const r0 = c.string.decode(state)
|
|
3233
|
+
const r1 = c.string.decode(state)
|
|
3234
|
+
const flags = c.uint.decode(state)
|
|
3235
|
+
|
|
3236
|
+
return {
|
|
3237
|
+
src: r0,
|
|
3238
|
+
label: r1,
|
|
3239
|
+
sizeBytes: (version >= 14 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
// @harness/preview-model-source-response.files
|
|
3245
|
+
const encoding87_4 = c.array(c.frame(encoding86))
|
|
3246
|
+
// @harness/preview-model-source-response.fitReasons
|
|
3247
|
+
const encoding87_12 = encoding4_4
|
|
3248
|
+
|
|
3249
|
+
// @harness/preview-model-source-response
|
|
3250
|
+
const encoding87 = {
|
|
3251
|
+
preencode(state, m) {
|
|
3252
|
+
const flags =
|
|
3253
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3254
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3255
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3256
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3257
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3258
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3259
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3260
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3261
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3262
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3263
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3264
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3265
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3266
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3267
|
+
|
|
3268
|
+
c.uint.preencode(state, flags)
|
|
3269
|
+
|
|
3270
|
+
if (version >= 14 && m.refusal) c.string.preencode(state, m.refusal)
|
|
3271
|
+
if (version >= 14 && m.reason) c.string.preencode(state, m.reason)
|
|
3272
|
+
if (version >= 14 && m.src) c.string.preencode(state, m.src)
|
|
3273
|
+
if (version >= 14 && m.files) encoding87_4.preencode(state, m.files)
|
|
3274
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3275
|
+
if (version >= 14 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
3276
|
+
if (version >= 14 && m.architecture) c.string.preencode(state, m.architecture)
|
|
3277
|
+
if (version >= 14 && m.sizeLabel) c.string.preencode(state, m.sizeLabel)
|
|
3278
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
3279
|
+
if (version >= 14 && m.license) c.string.preencode(state, m.license)
|
|
3280
|
+
if (version >= 14 && m.fit) c.string.preencode(state, m.fit)
|
|
3281
|
+
if (version >= 14 && m.fitReasons) encoding87_12.preencode(state, m.fitReasons)
|
|
3282
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3283
|
+
},
|
|
3284
|
+
encode(state, m) {
|
|
3285
|
+
const flags =
|
|
3286
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3287
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3288
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3289
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3290
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3291
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3292
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3293
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3294
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3295
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3296
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3297
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3298
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3299
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3300
|
+
|
|
3301
|
+
c.uint.encode(state, flags)
|
|
3302
|
+
|
|
3303
|
+
if (version >= 14 && m.refusal) c.string.encode(state, m.refusal)
|
|
3304
|
+
if (version >= 14 && m.reason) c.string.encode(state, m.reason)
|
|
3305
|
+
if (version >= 14 && m.src) c.string.encode(state, m.src)
|
|
3306
|
+
if (version >= 14 && m.files) encoding87_4.encode(state, m.files)
|
|
3307
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3308
|
+
if (version >= 14 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
3309
|
+
if (version >= 14 && m.architecture) c.string.encode(state, m.architecture)
|
|
3310
|
+
if (version >= 14 && m.sizeLabel) c.string.encode(state, m.sizeLabel)
|
|
3311
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
3312
|
+
if (version >= 14 && m.license) c.string.encode(state, m.license)
|
|
3313
|
+
if (version >= 14 && m.fit) c.string.encode(state, m.fit)
|
|
3314
|
+
if (version >= 14 && m.fitReasons) encoding87_12.encode(state, m.fitReasons)
|
|
3315
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3316
|
+
},
|
|
3317
|
+
decode(state) {
|
|
3318
|
+
const flags = c.uint.decode(state)
|
|
3319
|
+
|
|
3320
|
+
return {
|
|
3321
|
+
ok: (version >= 14 && (flags & 1) !== 0),
|
|
3322
|
+
refusal: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
3323
|
+
reason: (version >= 14 && (flags & 4) !== 0) ? c.string.decode(state) : null,
|
|
3324
|
+
src: (version >= 14 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
3325
|
+
files: (version >= 14 && (flags & 16) !== 0) ? encoding87_4.decode(state) : null,
|
|
3326
|
+
sizeBytes: (version >= 14 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
3327
|
+
contextLength: (version >= 14 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
3328
|
+
architecture: (version >= 14 && (flags & 128) !== 0) ? c.string.decode(state) : null,
|
|
3329
|
+
sizeLabel: (version >= 14 && (flags & 256) !== 0) ? c.string.decode(state) : null,
|
|
3330
|
+
taskType: (version >= 14 && (flags & 512) !== 0) ? c.string.decode(state) : null,
|
|
3331
|
+
license: (version >= 14 && (flags & 1024) !== 0) ? c.string.decode(state) : null,
|
|
3332
|
+
fit: (version >= 14 && (flags & 2048) !== 0) ? c.string.decode(state) : null,
|
|
3333
|
+
fitReasons: (version >= 14 && (flags & 4096) !== 0) ? encoding87_12.decode(state) : null,
|
|
3334
|
+
mmprojSrc: (version >= 14 && (flags & 8192) !== 0) ? c.string.decode(state) : null
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3177
3339
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3178
3340
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3179
3341
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3406,6 +3568,12 @@ function getEncoding(name) {
|
|
|
3406
3568
|
return encoding83
|
|
3407
3569
|
case '@harness/skill-oauth-verify':
|
|
3408
3570
|
return encoding84
|
|
3571
|
+
case '@harness/preview-model-source-request':
|
|
3572
|
+
return encoding85
|
|
3573
|
+
case '@harness/model-source-file':
|
|
3574
|
+
return encoding86
|
|
3575
|
+
case '@harness/preview-model-source-response':
|
|
3576
|
+
return encoding87
|
|
3409
3577
|
default:
|
|
3410
3578
|
throw new Error('Encoder not found ' + name)
|
|
3411
3579
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 14
|
|
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 = 14
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -2635,18 +2635,25 @@ const encoding65 = {
|
|
|
2635
2635
|
preencode(state, m) {
|
|
2636
2636
|
c.string.preencode(state, m.name)
|
|
2637
2637
|
c.string.preencode(state, m.src)
|
|
2638
|
-
state.end++ // max flag is
|
|
2638
|
+
state.end++ // max flag is 4 so always one byte
|
|
2639
2639
|
|
|
2640
2640
|
if (version >= 5 && m.projectionSrc) c.string.preencode(state, m.projectionSrc)
|
|
2641
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
2642
|
+
if (version >= 14 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
2641
2643
|
},
|
|
2642
2644
|
encode(state, m) {
|
|
2643
|
-
const flags =
|
|
2645
|
+
const flags =
|
|
2646
|
+
((version >= 5 && m.projectionSrc) ? 1 : 0) |
|
|
2647
|
+
((version >= 14 && m.taskType) ? 2 : 0) |
|
|
2648
|
+
((version >= 14 && m.expectedSize) ? 4 : 0)
|
|
2644
2649
|
|
|
2645
2650
|
c.string.encode(state, m.name)
|
|
2646
2651
|
c.string.encode(state, m.src)
|
|
2647
2652
|
c.uint.encode(state, flags)
|
|
2648
2653
|
|
|
2649
2654
|
if (version >= 5 && m.projectionSrc) c.string.encode(state, m.projectionSrc)
|
|
2655
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
2656
|
+
if (version >= 14 && m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
2650
2657
|
},
|
|
2651
2658
|
decode(state) {
|
|
2652
2659
|
const r0 = c.string.decode(state)
|
|
@@ -2656,7 +2663,9 @@ const encoding65 = {
|
|
|
2656
2663
|
return {
|
|
2657
2664
|
name: r0,
|
|
2658
2665
|
src: r1,
|
|
2659
|
-
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
2666
|
+
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null,
|
|
2667
|
+
taskType: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
2668
|
+
expectedSize: (version >= 14 && (flags & 4) !== 0) ? c.uint.decode(state) : 0
|
|
2660
2669
|
}
|
|
2661
2670
|
}
|
|
2662
2671
|
}
|
|
@@ -3174,6 +3183,159 @@ const encoding84 = {
|
|
|
3174
3183
|
}
|
|
3175
3184
|
}
|
|
3176
3185
|
|
|
3186
|
+
// @harness/preview-model-source-request
|
|
3187
|
+
const encoding85 = {
|
|
3188
|
+
preencode(state, m) {
|
|
3189
|
+
c.string.preencode(state, m.src)
|
|
3190
|
+
state.end++ // max flag is 1 so always one byte
|
|
3191
|
+
|
|
3192
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3193
|
+
},
|
|
3194
|
+
encode(state, m) {
|
|
3195
|
+
const flags = (version >= 14 && m.mmprojSrc) ? 1 : 0
|
|
3196
|
+
|
|
3197
|
+
c.string.encode(state, m.src)
|
|
3198
|
+
c.uint.encode(state, flags)
|
|
3199
|
+
|
|
3200
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3201
|
+
},
|
|
3202
|
+
decode(state) {
|
|
3203
|
+
const r0 = c.string.decode(state)
|
|
3204
|
+
const flags = c.uint.decode(state)
|
|
3205
|
+
|
|
3206
|
+
return {
|
|
3207
|
+
src: r0,
|
|
3208
|
+
mmprojSrc: (version >= 14 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
// @harness/model-source-file
|
|
3214
|
+
const encoding86 = {
|
|
3215
|
+
preencode(state, m) {
|
|
3216
|
+
c.string.preencode(state, m.src)
|
|
3217
|
+
c.string.preencode(state, m.label)
|
|
3218
|
+
state.end++ // max flag is 1 so always one byte
|
|
3219
|
+
|
|
3220
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3221
|
+
},
|
|
3222
|
+
encode(state, m) {
|
|
3223
|
+
const flags = (version >= 14 && m.sizeBytes) ? 1 : 0
|
|
3224
|
+
|
|
3225
|
+
c.string.encode(state, m.src)
|
|
3226
|
+
c.string.encode(state, m.label)
|
|
3227
|
+
c.uint.encode(state, flags)
|
|
3228
|
+
|
|
3229
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3230
|
+
},
|
|
3231
|
+
decode(state) {
|
|
3232
|
+
const r0 = c.string.decode(state)
|
|
3233
|
+
const r1 = c.string.decode(state)
|
|
3234
|
+
const flags = c.uint.decode(state)
|
|
3235
|
+
|
|
3236
|
+
return {
|
|
3237
|
+
src: r0,
|
|
3238
|
+
label: r1,
|
|
3239
|
+
sizeBytes: (version >= 14 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
// @harness/preview-model-source-response.files
|
|
3245
|
+
const encoding87_4 = c.array(c.frame(encoding86))
|
|
3246
|
+
// @harness/preview-model-source-response.fitReasons
|
|
3247
|
+
const encoding87_12 = encoding4_4
|
|
3248
|
+
|
|
3249
|
+
// @harness/preview-model-source-response
|
|
3250
|
+
const encoding87 = {
|
|
3251
|
+
preencode(state, m) {
|
|
3252
|
+
const flags =
|
|
3253
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3254
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3255
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3256
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3257
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3258
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3259
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3260
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3261
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3262
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3263
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3264
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3265
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3266
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3267
|
+
|
|
3268
|
+
c.uint.preencode(state, flags)
|
|
3269
|
+
|
|
3270
|
+
if (version >= 14 && m.refusal) c.string.preencode(state, m.refusal)
|
|
3271
|
+
if (version >= 14 && m.reason) c.string.preencode(state, m.reason)
|
|
3272
|
+
if (version >= 14 && m.src) c.string.preencode(state, m.src)
|
|
3273
|
+
if (version >= 14 && m.files) encoding87_4.preencode(state, m.files)
|
|
3274
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3275
|
+
if (version >= 14 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
3276
|
+
if (version >= 14 && m.architecture) c.string.preencode(state, m.architecture)
|
|
3277
|
+
if (version >= 14 && m.sizeLabel) c.string.preencode(state, m.sizeLabel)
|
|
3278
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
3279
|
+
if (version >= 14 && m.license) c.string.preencode(state, m.license)
|
|
3280
|
+
if (version >= 14 && m.fit) c.string.preencode(state, m.fit)
|
|
3281
|
+
if (version >= 14 && m.fitReasons) encoding87_12.preencode(state, m.fitReasons)
|
|
3282
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3283
|
+
},
|
|
3284
|
+
encode(state, m) {
|
|
3285
|
+
const flags =
|
|
3286
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3287
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3288
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3289
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3290
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3291
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3292
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3293
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3294
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3295
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3296
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3297
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3298
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3299
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3300
|
+
|
|
3301
|
+
c.uint.encode(state, flags)
|
|
3302
|
+
|
|
3303
|
+
if (version >= 14 && m.refusal) c.string.encode(state, m.refusal)
|
|
3304
|
+
if (version >= 14 && m.reason) c.string.encode(state, m.reason)
|
|
3305
|
+
if (version >= 14 && m.src) c.string.encode(state, m.src)
|
|
3306
|
+
if (version >= 14 && m.files) encoding87_4.encode(state, m.files)
|
|
3307
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3308
|
+
if (version >= 14 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
3309
|
+
if (version >= 14 && m.architecture) c.string.encode(state, m.architecture)
|
|
3310
|
+
if (version >= 14 && m.sizeLabel) c.string.encode(state, m.sizeLabel)
|
|
3311
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
3312
|
+
if (version >= 14 && m.license) c.string.encode(state, m.license)
|
|
3313
|
+
if (version >= 14 && m.fit) c.string.encode(state, m.fit)
|
|
3314
|
+
if (version >= 14 && m.fitReasons) encoding87_12.encode(state, m.fitReasons)
|
|
3315
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3316
|
+
},
|
|
3317
|
+
decode(state) {
|
|
3318
|
+
const flags = c.uint.decode(state)
|
|
3319
|
+
|
|
3320
|
+
return {
|
|
3321
|
+
ok: (version >= 14 && (flags & 1) !== 0),
|
|
3322
|
+
refusal: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
3323
|
+
reason: (version >= 14 && (flags & 4) !== 0) ? c.string.decode(state) : null,
|
|
3324
|
+
src: (version >= 14 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
3325
|
+
files: (version >= 14 && (flags & 16) !== 0) ? encoding87_4.decode(state) : null,
|
|
3326
|
+
sizeBytes: (version >= 14 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
3327
|
+
contextLength: (version >= 14 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
3328
|
+
architecture: (version >= 14 && (flags & 128) !== 0) ? c.string.decode(state) : null,
|
|
3329
|
+
sizeLabel: (version >= 14 && (flags & 256) !== 0) ? c.string.decode(state) : null,
|
|
3330
|
+
taskType: (version >= 14 && (flags & 512) !== 0) ? c.string.decode(state) : null,
|
|
3331
|
+
license: (version >= 14 && (flags & 1024) !== 0) ? c.string.decode(state) : null,
|
|
3332
|
+
fit: (version >= 14 && (flags & 2048) !== 0) ? c.string.decode(state) : null,
|
|
3333
|
+
fitReasons: (version >= 14 && (flags & 4096) !== 0) ? encoding87_12.decode(state) : null,
|
|
3334
|
+
mmprojSrc: (version >= 14 && (flags & 8192) !== 0) ? c.string.decode(state) : null
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3177
3339
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3178
3340
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3179
3341
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3406,6 +3568,12 @@ function getEncoding(name) {
|
|
|
3406
3568
|
return encoding83
|
|
3407
3569
|
case '@harness/skill-oauth-verify':
|
|
3408
3570
|
return encoding84
|
|
3571
|
+
case '@harness/preview-model-source-request':
|
|
3572
|
+
return encoding85
|
|
3573
|
+
case '@harness/model-source-file':
|
|
3574
|
+
return encoding86
|
|
3575
|
+
case '@harness/preview-model-source-response':
|
|
3576
|
+
return encoding87
|
|
3409
3577
|
default:
|
|
3410
3578
|
throw new Error('Encoder not found ' + name)
|
|
3411
3579
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 14,
|
|
3
3
|
"schema": [
|
|
4
4
|
{
|
|
5
5
|
"name": "empty",
|
|
@@ -2129,6 +2129,16 @@
|
|
|
2129
2129
|
"name": "projectionSrc",
|
|
2130
2130
|
"type": "string",
|
|
2131
2131
|
"version": 5
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"name": "taskType",
|
|
2135
|
+
"type": "string",
|
|
2136
|
+
"version": 14
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"name": "expectedSize",
|
|
2140
|
+
"type": "uint",
|
|
2141
|
+
"version": 14
|
|
2132
2142
|
}
|
|
2133
2143
|
]
|
|
2134
2144
|
},
|
|
@@ -2553,6 +2563,131 @@
|
|
|
2553
2563
|
"version": 13
|
|
2554
2564
|
}
|
|
2555
2565
|
]
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"name": "preview-model-source-request",
|
|
2569
|
+
"namespace": "harness",
|
|
2570
|
+
"compact": false,
|
|
2571
|
+
"flagsPosition": 1,
|
|
2572
|
+
"fields": [
|
|
2573
|
+
{
|
|
2574
|
+
"name": "src",
|
|
2575
|
+
"required": true,
|
|
2576
|
+
"type": "string",
|
|
2577
|
+
"version": 14
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
"name": "mmprojSrc",
|
|
2581
|
+
"type": "string",
|
|
2582
|
+
"version": 14
|
|
2583
|
+
}
|
|
2584
|
+
]
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"name": "model-source-file",
|
|
2588
|
+
"namespace": "harness",
|
|
2589
|
+
"compact": false,
|
|
2590
|
+
"flagsPosition": 2,
|
|
2591
|
+
"fields": [
|
|
2592
|
+
{
|
|
2593
|
+
"name": "src",
|
|
2594
|
+
"required": true,
|
|
2595
|
+
"type": "string",
|
|
2596
|
+
"version": 14
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
"name": "label",
|
|
2600
|
+
"required": true,
|
|
2601
|
+
"type": "string",
|
|
2602
|
+
"version": 14
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
"name": "sizeBytes",
|
|
2606
|
+
"type": "uint",
|
|
2607
|
+
"version": 14
|
|
2608
|
+
}
|
|
2609
|
+
]
|
|
2610
|
+
},
|
|
2611
|
+
{
|
|
2612
|
+
"name": "preview-model-source-response",
|
|
2613
|
+
"namespace": "harness",
|
|
2614
|
+
"compact": false,
|
|
2615
|
+
"flagsPosition": 0,
|
|
2616
|
+
"fields": [
|
|
2617
|
+
{
|
|
2618
|
+
"name": "ok",
|
|
2619
|
+
"required": false,
|
|
2620
|
+
"type": "bool",
|
|
2621
|
+
"version": 14
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"name": "refusal",
|
|
2625
|
+
"type": "string",
|
|
2626
|
+
"version": 14
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
"name": "reason",
|
|
2630
|
+
"type": "string",
|
|
2631
|
+
"version": 14
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
"name": "src",
|
|
2635
|
+
"type": "string",
|
|
2636
|
+
"version": 14
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"name": "files",
|
|
2640
|
+
"array": true,
|
|
2641
|
+
"type": "@harness/model-source-file",
|
|
2642
|
+
"version": 14
|
|
2643
|
+
},
|
|
2644
|
+
{
|
|
2645
|
+
"name": "sizeBytes",
|
|
2646
|
+
"type": "uint",
|
|
2647
|
+
"version": 14
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
"name": "contextLength",
|
|
2651
|
+
"type": "uint",
|
|
2652
|
+
"version": 14
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
"name": "architecture",
|
|
2656
|
+
"type": "string",
|
|
2657
|
+
"version": 14
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"name": "sizeLabel",
|
|
2661
|
+
"type": "string",
|
|
2662
|
+
"version": 14
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
"name": "taskType",
|
|
2666
|
+
"type": "string",
|
|
2667
|
+
"version": 14
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
"name": "license",
|
|
2671
|
+
"type": "string",
|
|
2672
|
+
"version": 14
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"name": "fit",
|
|
2676
|
+
"type": "string",
|
|
2677
|
+
"version": 14
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
"name": "fitReasons",
|
|
2681
|
+
"array": true,
|
|
2682
|
+
"type": "string",
|
|
2683
|
+
"version": 14
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
"name": "mmprojSrc",
|
|
2687
|
+
"type": "string",
|
|
2688
|
+
"version": 14
|
|
2689
|
+
}
|
|
2690
|
+
]
|
|
2556
2691
|
}
|
|
2557
2692
|
]
|
|
2558
2693
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is autogenerated by hyperschema-ts
|
|
2
|
-
// Schema version:
|
|
2
|
+
// Schema version: 14
|
|
3
3
|
// Do not edit manually.
|
|
4
4
|
|
|
5
5
|
export interface HarnessEmpty {
|
|
@@ -425,6 +425,8 @@ export interface HarnessCustomModel {
|
|
|
425
425
|
name: string
|
|
426
426
|
src: string
|
|
427
427
|
projectionSrc?: string | null
|
|
428
|
+
taskType?: string | null
|
|
429
|
+
expectedSize?: number
|
|
428
430
|
}
|
|
429
431
|
|
|
430
432
|
export interface HarnessSetCustomModelsRequest {
|
|
@@ -531,6 +533,34 @@ export interface HarnessSkillOauthVerify {
|
|
|
531
533
|
reject?: HarnessSkillOauthVerifyRule[] | null
|
|
532
534
|
}
|
|
533
535
|
|
|
536
|
+
export interface HarnessPreviewModelSourceRequest {
|
|
537
|
+
src: string
|
|
538
|
+
mmprojSrc?: string | null
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface HarnessModelSourceFile {
|
|
542
|
+
src: string
|
|
543
|
+
label: string
|
|
544
|
+
sizeBytes?: number
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface HarnessPreviewModelSourceResponse {
|
|
548
|
+
ok?: boolean
|
|
549
|
+
refusal?: string | null
|
|
550
|
+
reason?: string | null
|
|
551
|
+
src?: string | null
|
|
552
|
+
files?: HarnessModelSourceFile[] | null
|
|
553
|
+
sizeBytes?: number
|
|
554
|
+
contextLength?: number
|
|
555
|
+
architecture?: string | null
|
|
556
|
+
sizeLabel?: string | null
|
|
557
|
+
taskType?: string | null
|
|
558
|
+
license?: string | null
|
|
559
|
+
fit?: string | null
|
|
560
|
+
fitReasons?: string[] | null
|
|
561
|
+
mmprojSrc?: string | null
|
|
562
|
+
}
|
|
563
|
+
|
|
534
564
|
export interface SchemaTypes {
|
|
535
565
|
"@harness/empty": HarnessEmpty
|
|
536
566
|
"@harness/ok-response": HarnessOkResponse
|
|
@@ -617,4 +647,7 @@ export interface SchemaTypes {
|
|
|
617
647
|
"@harness/skill-oauth-config": HarnessSkillOauthConfig
|
|
618
648
|
"@harness/skill-oauth-verify-rule": HarnessSkillOauthVerifyRule
|
|
619
649
|
"@harness/skill-oauth-verify": HarnessSkillOauthVerify
|
|
650
|
+
"@harness/preview-model-source-request": HarnessPreviewModelSourceRequest
|
|
651
|
+
"@harness/model-source-file": HarnessModelSourceFile
|
|
652
|
+
"@harness/preview-model-source-response": HarnessPreviewModelSourceResponse
|
|
620
653
|
}
|