@qvac/harness 0.3.3 → 0.5.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 +700 -126
- package/README.md +156 -0
- package/dist/harness.bundle +71 -103
- package/dist/prebuilds-manifest.json +0 -8
- package/dist-lib/index.d.ts +42 -40
- package/dist-lib/index.js +307 -117
- package/dist-lib/lib/audio-transcode-bare.d.ts +2 -2
- package/dist-lib/lib/audio-transcode-bare.js +28 -18
- package/dist-lib/lib/audio-transcode-node.d.ts +2 -2
- package/dist-lib/lib/capabilities/audio-resample.d.ts +7 -6
- package/dist-lib/lib/capabilities/audio-resample.js +30 -18
- package/dist-lib/lib/capabilities/completion.d.ts +20 -19
- package/dist-lib/lib/capabilities/completion.js +194 -135
- package/dist-lib/lib/capabilities/download.d.ts +6 -6
- package/dist-lib/lib/capabilities/download.js +15 -8
- package/dist-lib/lib/capabilities/embed.js +2 -1
- package/dist-lib/lib/capabilities/enhance.d.ts +6 -1
- package/dist-lib/lib/capabilities/enhance.js +7 -4
- package/dist-lib/lib/capabilities/invoke.js +7 -4
- package/dist-lib/lib/capabilities/kv-cache.js +2 -1
- package/dist-lib/lib/capabilities/preview-model-source.d.ts +69 -0
- package/dist-lib/lib/capabilities/preview-model-source.js +439 -0
- package/dist-lib/lib/capabilities/speech-text.js +5 -4
- package/dist-lib/lib/capabilities/tool-selection.js +10 -9
- package/dist-lib/lib/capabilities/tool-turns.js +30 -16
- package/dist-lib/lib/capabilities/usage-breakdown.js +2 -1
- package/dist-lib/lib/capabilities/voice.d.ts +5 -1
- package/dist-lib/lib/capabilities/voice.js +22 -12
- package/dist-lib/lib/connect.d.ts +15 -37
- package/dist-lib/lib/connect.js +161 -112
- package/dist-lib/lib/context-window.js +25 -21
- package/dist-lib/lib/contract-types.d.ts +26 -20
- package/dist-lib/lib/diagram-repair.d.ts +4 -4
- package/dist-lib/lib/diagram-repair.js +6 -3
- package/dist-lib/lib/docx/index.d.ts +3 -2
- package/dist-lib/lib/{error-fields.d.ts → guards.d.ts} +1 -0
- package/dist-lib/lib/{error-fields.js → guards.js} +3 -0
- package/dist-lib/lib/hardware/capability-probe.js +20 -10
- package/dist-lib/lib/hardware/gpu-classify.js +6 -3
- package/dist-lib/lib/hardware/gpu-probe-addon.js +8 -4
- package/dist-lib/lib/hardware/gpu-probe.js +4 -2
- package/dist-lib/lib/hardware/gpu-stats.native.cjs +8 -9
- package/dist-lib/lib/hardware/parsers.js +8 -4
- package/dist-lib/lib/helpers/buffer-burst.js +4 -2
- package/dist-lib/lib/helpers/control-tokens.js +4 -2
- package/dist-lib/lib/helpers/join-guard.d.ts +2 -2
- package/dist-lib/lib/helpers/join-guard.js +4 -2
- package/dist-lib/lib/helpers/load-stall.js +4 -2
- package/dist-lib/lib/helpers/markup-stream-filter.d.ts +2 -2
- package/dist-lib/lib/helpers/markup-stream-filter.js +6 -3
- package/dist-lib/lib/helpers/race-abort.js +2 -1
- package/dist-lib/lib/helpers/race-timeout.d.ts +5 -0
- package/dist-lib/lib/helpers/race-timeout.js +14 -0
- package/dist-lib/lib/helpers/run-outcome.d.ts +6 -8
- package/dist-lib/lib/helpers/run-outcome.js +36 -20
- package/dist-lib/lib/helpers/spawn-path.js +6 -3
- package/dist-lib/lib/helpers/text-coalescer.js +6 -3
- package/dist-lib/lib/helpers/thinking.js +38 -45
- package/dist-lib/lib/helpers/tool-call-markup.d.ts +9 -7
- package/dist-lib/lib/helpers/tool-call-markup.js +36 -20
- package/dist-lib/lib/helpers/tool-intent.d.ts +3 -2
- package/dist-lib/lib/helpers/tool-intent.js +4 -2
- package/dist-lib/lib/helpers/tool-label.js +18 -9
- package/dist-lib/lib/hooks/built-in/arg-repair.js +23 -13
- package/dist-lib/lib/hooks/built-in/egress.js +2 -1
- package/dist-lib/lib/hooks/built-in/skill-catalog.js +2 -1
- package/dist-lib/lib/hooks/pipeline.d.ts +5 -4
- package/dist-lib/lib/hooks/pipeline.js +6 -3
- package/dist-lib/lib/hooks/run.js +12 -8
- package/dist-lib/lib/model-download-progress.js +10 -8
- package/dist-lib/lib/models/context.d.ts +1 -1
- package/dist-lib/lib/models/context.js +5 -1
- package/dist-lib/lib/models/custom-model-cache.d.ts +13 -0
- package/dist-lib/lib/models/custom-model-cache.js +70 -0
- package/dist-lib/lib/models/gguf-header.d.ts +31 -0
- package/dist-lib/lib/models/gguf-header.js +230 -0
- package/dist-lib/lib/models/idle-unload.d.ts +14 -0
- package/dist-lib/lib/models/idle-unload.js +51 -0
- package/dist-lib/lib/models/kv-cache.d.ts +3 -2
- package/dist-lib/lib/models/kv-cache.js +4 -3
- package/dist-lib/lib/models/llm-presets.d.ts +2 -2
- package/dist-lib/lib/models/llm-presets.js +4 -2
- package/dist-lib/lib/models/model-catalog-constants.js +3 -2
- package/dist-lib/lib/models/model-catalog.d.ts +19 -21
- package/dist-lib/lib/models/model-catalog.js +66 -33
- package/dist-lib/lib/models/model-delete.d.ts +4 -1
- package/dist-lib/lib/models/model-delete.js +30 -15
- package/dist-lib/lib/models/model-handle.js +2 -1
- package/dist-lib/lib/models/model-list.d.ts +14 -3
- package/dist-lib/lib/models/model-list.js +33 -6
- package/dist-lib/lib/models/model-pool.d.ts +44 -10
- package/dist-lib/lib/models/model-pool.js +47 -42
- package/dist-lib/lib/models/model-source.js +11 -6
- package/dist-lib/lib/models/music-catalog.d.ts +2 -2
- package/dist-lib/lib/models/nmt-catalog.d.ts +4 -3
- package/dist-lib/lib/models/nmt-catalog.js +10 -5
- package/dist-lib/lib/models/opencl-cache.d.ts +6 -1
- package/dist-lib/lib/models/opencl-cache.js +5 -3
- package/dist-lib/lib/models/sdk-faults.d.ts +11 -8
- package/dist-lib/lib/models/sdk-faults.js +9 -6
- package/dist-lib/lib/models/shards.d.ts +11 -0
- package/dist-lib/lib/models/shards.js +15 -0
- package/dist-lib/lib/models/tool-dialect.js +10 -5
- package/dist-lib/lib/no-redirect-fetch-bare.d.ts +3 -3
- package/dist-lib/lib/no-redirect-fetch-bare.js +1 -1
- package/dist-lib/lib/no-redirect-fetch-impl.js +6 -3
- package/dist-lib/lib/no-redirect-fetch-node.d.ts +1 -1
- package/dist-lib/lib/no-redirect-fetch-node.js +9 -9
- package/dist-lib/lib/office/index.d.ts +3 -2
- package/dist-lib/lib/office/python.d.ts +3 -2
- package/dist-lib/lib/office/python.js +2 -1
- package/dist-lib/lib/prompt.d.ts +5 -4
- package/dist-lib/lib/prompt.js +8 -4
- package/dist-lib/lib/queue.js +10 -5
- package/dist-lib/lib/resolution-detector.js +21 -11
- package/dist-lib/lib/rpc-session.js +2 -1
- package/dist-lib/lib/sdk-loader.js +2 -1
- package/dist-lib/lib/sdk-storage.js +4 -2
- package/dist-lib/lib/serve.js +128 -68
- package/dist-lib/lib/spawn.js +7 -4
- package/dist-lib/lib/tmp-path.d.ts +7 -6
- package/dist-lib/lib/tool-call-display.d.ts +2 -2
- package/dist-lib/lib/tools/create-documents.js +18 -10
- package/dist-lib/lib/tools/edit-documents.js +23 -13
- package/dist-lib/lib/tools/edit-image.d.ts +2 -2
- package/dist-lib/lib/tools/edit-image.js +60 -36
- package/dist-lib/lib/tools/exec/adapters/adapter.d.ts +10 -10
- package/dist-lib/lib/tools/exec/adapters/python/attachments.d.ts +17 -11
- package/dist-lib/lib/tools/exec/adapters/python/attachments.js +53 -40
- package/dist-lib/lib/tools/exec/adapters/python/create-effect.d.ts +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/create-effect.js +60 -32
- package/dist-lib/lib/tools/exec/adapters/python/guarded-fetch.d.ts +33 -22
- package/dist-lib/lib/tools/exec/adapters/python/guarded-fetch.js +58 -29
- package/dist-lib/lib/tools/exec/adapters/python/interrupt-timer.d.ts +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/loader.js +23 -12
- package/dist-lib/lib/tools/exec/adapters/python/memfs.d.ts +13 -11
- package/dist-lib/lib/tools/exec/adapters/python/memfs.js +10 -5
- package/dist-lib/lib/tools/exec/adapters/python/net-shim.js +3 -1
- package/dist-lib/lib/tools/exec/adapters/python/output-policy.d.ts +6 -4
- package/dist-lib/lib/tools/exec/adapters/python/output-policy.js +20 -10
- package/dist-lib/lib/tools/exec/adapters/python/pyodide.d.ts +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/pyodide.js +14 -7
- package/dist-lib/lib/tools/exec/adapters/python/python-adapter.d.ts +41 -34
- package/dist-lib/lib/tools/exec/adapters/python/python-adapter.js +316 -166
- package/dist-lib/lib/tools/exec/adapters/python/run-session.d.ts +9 -8
- package/dist-lib/lib/tools/exec/adapters/python/run-session.js +56 -28
- package/dist-lib/lib/tools/exec/adapters/python/wheels.d.ts +8 -10
- package/dist-lib/lib/tools/exec/adapters/python/wheels.js +22 -11
- package/dist-lib/lib/tools/exec/adapters/python/worker/client.d.ts +3 -2
- package/dist-lib/lib/tools/exec/adapters/python/worker/client.js +41 -26
- package/dist-lib/lib/tools/exec/adapters/python/worker/entry.js +27 -18
- package/dist-lib/lib/tools/exec/adapters/python/worker/protocol.d.ts +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/worker/protocol.js +14 -13
- package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-node.d.ts +4 -4
- package/dist-lib/lib/tools/exec/adapters/python/worker/spawn-node.js +10 -5
- package/dist-lib/lib/tools/exec/adapters/shell/shell-adapter.d.ts +4 -4
- package/dist-lib/lib/tools/exec/adapters/shell/shell-adapter.js +2 -1
- package/dist-lib/lib/tools/exec/obsidian/cli-process.d.ts +6 -1
- package/dist-lib/lib/tools/exec/obsidian/cli-process.js +8 -5
- package/dist-lib/lib/tools/exec/obsidian/cli.d.ts +6 -6
- package/dist-lib/lib/tools/exec/obsidian/cli.js +4 -4
- package/dist-lib/lib/tools/exec/obsidian/command.d.ts +3 -2
- package/dist-lib/lib/tools/exec/obsidian/command.js +6 -3
- package/dist-lib/lib/tools/exec/obsidian/output.js +2 -1
- package/dist-lib/lib/tools/exec/obsidian/route.d.ts +4 -6
- package/dist-lib/lib/tools/exec/obsidian/route.js +17 -11
- package/dist-lib/lib/tools/exec/obsidian/safe-path.js +2 -1
- package/dist-lib/lib/tools/exec/obsidian/vault-create.js +15 -7
- package/dist-lib/lib/tools/exec/obsidian/vault-paths.d.ts +2 -2
- package/dist-lib/lib/tools/exec/obsidian/vault-paths.js +20 -10
- package/dist-lib/lib/tools/exec/obsidian/vault-read.js +20 -13
- package/dist-lib/lib/tools/exec/obsidian/vault-write.js +24 -12
- package/dist-lib/lib/tools/exec/runner.d.ts +14 -14
- package/dist-lib/lib/tools/exec/runner.js +5 -3
- package/dist-lib/lib/tools/exec/scope.js +52 -28
- package/dist-lib/lib/tools/exec/shell-argv.js +31 -18
- package/dist-lib/lib/tools/exec/shell-guidance.d.ts +6 -1
- package/dist-lib/lib/tools/exec/shell-guidance.js +35 -20
- package/dist-lib/lib/tools/exec/video-tools.js +2 -2
- package/dist-lib/lib/tools/exec.d.ts +6 -8
- package/dist-lib/lib/tools/exec.js +113 -54
- package/dist-lib/lib/tools/file-glob.d.ts +4 -5
- package/dist-lib/lib/tools/file-glob.js +16 -11
- package/dist-lib/lib/tools/fs/glob.js +13 -18
- package/dist-lib/lib/tools/fs/remote-protocol.d.ts +10 -10
- package/dist-lib/lib/tools/fs/remote.d.ts +3 -2
- package/dist-lib/lib/tools/fs/remote.js +13 -7
- package/dist-lib/lib/tools/fs/scope.d.ts +8 -3
- package/dist-lib/lib/tools/fs/scope.js +20 -12
- package/dist-lib/lib/tools/fs/walk.js +6 -3
- package/dist-lib/lib/tools/fs/write.d.ts +3 -2
- package/dist-lib/lib/tools/generate-image.d.ts +11 -9
- package/dist-lib/lib/tools/generate-image.js +73 -37
- package/dist-lib/lib/tools/generate-music.d.ts +22 -11
- package/dist-lib/lib/tools/generate-music.js +79 -48
- package/dist-lib/lib/tools/grep.js +66 -41
- package/dist-lib/lib/tools/http-request/encode-fields.js +18 -9
- package/dist-lib/lib/tools/http-request/{utils.js → request.js} +20 -11
- package/dist-lib/lib/tools/http-request/truncate-response.js +57 -46
- package/dist-lib/lib/tools/http-request.d.ts +1 -1
- package/dist-lib/lib/tools/http-request.js +33 -18
- package/dist-lib/lib/tools/mcp/protocol.d.ts +53 -0
- package/dist-lib/lib/tools/mcp/{utils.js → protocol.js} +45 -23
- package/dist-lib/lib/tools/mcp-call.d.ts +1 -1
- package/dist-lib/lib/tools/mcp-call.js +37 -16
- package/dist-lib/lib/tools/operations/builders.js +10 -6
- package/dist-lib/lib/tools/operations/compile.js +20 -10
- package/dist-lib/lib/tools/operations/decoders.js +12 -6
- package/dist-lib/lib/tools/operations/gmail-message.js +3 -2
- package/dist-lib/lib/tools/outbound-guard.d.ts +4 -3
- package/dist-lib/lib/tools/outbound-guard.js +14 -8
- package/dist-lib/lib/tools/private-ip.js +8 -7
- package/dist-lib/lib/tools/rag-search.js +14 -7
- package/dist-lib/lib/tools/read-files.js +23 -20
- package/dist-lib/lib/tools/skill.js +19 -10
- package/dist-lib/lib/tools/skills/auth-resolver.d.ts +11 -18
- package/dist-lib/lib/tools/skills/auth-resolver.js +30 -18
- package/dist-lib/lib/tools/skills/bin-check.d.ts +3 -2
- package/dist-lib/lib/tools/skills/bin-check.js +10 -3
- package/dist-lib/lib/tools/skills/bundled-dir.js +20 -10
- package/dist-lib/lib/tools/skills/bundled-hash.d.ts +3 -2
- package/dist-lib/lib/tools/skills/bundled-hash.js +6 -1
- package/dist-lib/lib/tools/skills/catalog.d.ts +3 -2
- package/dist-lib/lib/tools/skills/catalog.js +33 -28
- package/dist-lib/lib/tools/skills/cli-argv.d.ts +3 -2
- package/dist-lib/lib/tools/skills/cli-argv.js +55 -52
- package/dist-lib/lib/tools/skills/cli-schema-check.js +21 -10
- package/dist-lib/lib/tools/skills/cli-schema-load.js +28 -20
- package/dist-lib/lib/tools/skills/cli-schema-types.d.ts +6 -6
- package/dist-lib/lib/tools/skills/cli-schema.js +2 -1
- package/dist-lib/lib/tools/skills/credential-check.d.ts +6 -3
- package/dist-lib/lib/tools/skills/credential-check.js +24 -12
- package/dist-lib/lib/tools/skills/credential-grants.js +1 -6
- package/dist-lib/lib/tools/skills/credential-health.d.ts +5 -1
- package/dist-lib/lib/tools/skills/credential-health.js +5 -3
- package/dist-lib/lib/tools/skills/frontmatter-parser.js +10 -5
- package/dist-lib/lib/tools/skills/manifest-parse.js +84 -64
- package/dist-lib/lib/tools/skills/mention.js +7 -6
- package/dist-lib/lib/tools/skills/obsidian-readiness.d.ts +2 -2
- package/dist-lib/lib/tools/skills/obsidian-readiness.js +11 -3
- package/dist-lib/lib/tools/skills/overlay-crud.d.ts +6 -4
- package/dist-lib/lib/tools/skills/overlay-crud.js +12 -6
- package/dist-lib/lib/tools/skills/overlay-dir.js +4 -2
- package/dist-lib/lib/tools/skills/overlay-watch.d.ts +3 -2
- package/dist-lib/lib/tools/skills/overlay-watch.js +8 -4
- package/dist-lib/lib/tools/skills/setup-routes.js +1 -3
- package/dist-lib/lib/tools/skills/skill-settings.js +4 -1
- package/dist-lib/lib/tools/skills/skill-state.d.ts +6 -11
- package/dist-lib/lib/tools/skills/skill-state.js +48 -29
- package/dist-lib/lib/tools/skills/tool-grants.js +6 -3
- package/dist-lib/lib/tools/toolsets.js +2 -1
- package/dist-lib/lib/tools/translate.d.ts +4 -5
- package/dist-lib/lib/tools/translate.js +31 -14
- package/dist-lib/lib/tools/url-guard.js +2 -1
- package/dist-lib/lib/tools/weather-lookup/place.js +8 -4
- package/dist-lib/lib/tools/weather-lookup/report.d.ts +7 -1
- package/dist-lib/lib/tools/weather-lookup/report.js +46 -9
- package/dist-lib/lib/tools/weather-lookup.js +18 -12
- package/dist-lib/lib/tools/web-fetch.js +47 -24
- package/dist-lib/lib/tools/web-search.js +8 -3
- package/dist-lib/lib/validating-lookup.d.ts +4 -4
- package/dist-lib/lib/wav-encode.d.ts +1 -1
- package/dist-lib/lib/wav-encode.js +11 -10
- package/dist-lib/lib/web-fetch/embedded-state.js +24 -12
- package/dist-lib/lib/web-fetch/extract.js +4 -2
- package/dist-lib/lib/web-fetch/images.js +8 -4
- package/dist-lib/lib/web-fetch/video.d.ts +2 -2
- package/dist-lib/lib/web-fetch/video.js +8 -4
- package/dist-lib/lib/web-search/engine-registry.d.ts +2 -2
- package/dist-lib/lib/web-search/engines/aol.js +1 -1
- package/dist-lib/lib/web-search/engines/bing.js +1 -1
- package/dist-lib/lib/web-search/engines/brave.js +4 -1
- package/dist-lib/lib/web-search/engines/duckduckgo.js +3 -2
- package/dist-lib/lib/web-search/engines/google.js +7 -3
- package/dist-lib/lib/web-search/engines/wikipedia.js +5 -4
- package/dist-lib/lib/web-search/engines/yahoo.js +1 -1
- package/dist-lib/lib/web-search/fetch-html.d.ts +5 -4
- package/dist-lib/lib/web-search/fetch-html.js +13 -7
- package/dist-lib/lib/web-search/orchestrator.d.ts +9 -5
- package/dist-lib/lib/web-search/orchestrator.js +3 -3
- package/dist-lib/lib/wire.d.ts +3 -2
- package/dist-lib/lib/wire.js +23 -15
- package/dist-lib/schema/baseline.js +10 -5
- package/dist-lib/schema/build.js +2 -1
- package/dist-lib/schema/harness.d.ts +15 -2
- package/dist-lib/schema/harness.js +55 -2
- package/dist-lib/schema/release-tags.d.ts +3 -2
- package/dist-lib/schema/release-tags.js +6 -3
- package/dist-lib/spec/bind.js +6 -0
- package/dist-lib/spec/calls.js +2 -0
- package/dist-lib/spec/hrpc/hrpc.json +26 -0
- package/dist-lib/spec/hrpc/index.js +27 -3
- package/dist-lib/spec/hrpc/messages.js +207 -8
- package/dist-lib/spec/hyperschema/index.js +207 -8
- package/dist-lib/spec/hyperschema/schema.json +165 -1
- package/dist-lib/spec/hyperschema/types.d.ts +42 -1
- package/package.json +13 -14
- package/worker/harness-sidecar.mjs +16 -22
- package/worker/stow-entry.mjs +7 -4
- package/dist-lib/lib/tools/mcp/utils.d.ts +0 -47
- /package/dist-lib/lib/tools/http-request/{utils.d.ts → request.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 15
|
|
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 = 15
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -1610,17 +1610,19 @@ const encoding31 = {
|
|
|
1610
1610
|
c.string.preencode(state, m.type)
|
|
1611
1611
|
c.string.preencode(state, m.registryPath)
|
|
1612
1612
|
c.string.preencode(state, m.registrySource)
|
|
1613
|
-
state.end++ // max flag is
|
|
1613
|
+
state.end++ // max flag is 16 so always one byte
|
|
1614
1614
|
c.uint.preencode(state, m.expectedSize)
|
|
1615
1615
|
|
|
1616
1616
|
if (m.actualSize) c.uint.preencode(state, m.actualSize)
|
|
1617
|
+
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
1617
1618
|
},
|
|
1618
1619
|
encode(state, m) {
|
|
1619
1620
|
const flags =
|
|
1620
1621
|
(m.isCached ? 1 : 0) |
|
|
1621
1622
|
(m.isLoaded ? 2 : 0) |
|
|
1622
1623
|
(m.supportsImages ? 4 : 0) |
|
|
1623
|
-
(m.actualSize ? 8 : 0)
|
|
1624
|
+
(m.actualSize ? 8 : 0) |
|
|
1625
|
+
((version >= 15 && m.label) ? 16 : 0)
|
|
1624
1626
|
|
|
1625
1627
|
c.string.encode(state, m.name)
|
|
1626
1628
|
c.string.encode(state, m.type)
|
|
@@ -1630,6 +1632,7 @@ const encoding31 = {
|
|
|
1630
1632
|
c.uint.encode(state, m.expectedSize)
|
|
1631
1633
|
|
|
1632
1634
|
if (m.actualSize) c.uint.encode(state, m.actualSize)
|
|
1635
|
+
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
1633
1636
|
},
|
|
1634
1637
|
decode(state) {
|
|
1635
1638
|
const r0 = c.string.decode(state)
|
|
@@ -1647,7 +1650,8 @@ const encoding31 = {
|
|
|
1647
1650
|
isLoaded: (flags & 2) !== 0,
|
|
1648
1651
|
supportsImages: (flags & 4) !== 0,
|
|
1649
1652
|
expectedSize: c.uint.decode(state),
|
|
1650
|
-
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0
|
|
1653
|
+
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
|
|
1654
|
+
label: (version >= 15 && (flags & 16) !== 0) ? c.string.decode(state) : null
|
|
1651
1655
|
}
|
|
1652
1656
|
}
|
|
1653
1657
|
}
|
|
@@ -2635,18 +2639,31 @@ const encoding65 = {
|
|
|
2635
2639
|
preencode(state, m) {
|
|
2636
2640
|
c.string.preencode(state, m.name)
|
|
2637
2641
|
c.string.preencode(state, m.src)
|
|
2638
|
-
state.end++ // max flag is
|
|
2642
|
+
state.end++ // max flag is 16 so always one byte
|
|
2639
2643
|
|
|
2640
2644
|
if (version >= 5 && m.projectionSrc) c.string.preencode(state, m.projectionSrc)
|
|
2645
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
2646
|
+
if (version >= 14 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
2647
|
+
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
2648
|
+
if (version >= 15 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
2641
2649
|
},
|
|
2642
2650
|
encode(state, m) {
|
|
2643
|
-
const flags =
|
|
2651
|
+
const flags =
|
|
2652
|
+
((version >= 5 && m.projectionSrc) ? 1 : 0) |
|
|
2653
|
+
((version >= 14 && m.taskType) ? 2 : 0) |
|
|
2654
|
+
((version >= 14 && m.expectedSize) ? 4 : 0) |
|
|
2655
|
+
((version >= 15 && m.label) ? 8 : 0) |
|
|
2656
|
+
((version >= 15 && m.contextLength) ? 16 : 0)
|
|
2644
2657
|
|
|
2645
2658
|
c.string.encode(state, m.name)
|
|
2646
2659
|
c.string.encode(state, m.src)
|
|
2647
2660
|
c.uint.encode(state, flags)
|
|
2648
2661
|
|
|
2649
2662
|
if (version >= 5 && m.projectionSrc) c.string.encode(state, m.projectionSrc)
|
|
2663
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
2664
|
+
if (version >= 14 && m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
2665
|
+
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
2666
|
+
if (version >= 15 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
2650
2667
|
},
|
|
2651
2668
|
decode(state) {
|
|
2652
2669
|
const r0 = c.string.decode(state)
|
|
@@ -2656,7 +2673,11 @@ const encoding65 = {
|
|
|
2656
2673
|
return {
|
|
2657
2674
|
name: r0,
|
|
2658
2675
|
src: r1,
|
|
2659
|
-
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
2676
|
+
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null,
|
|
2677
|
+
taskType: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
2678
|
+
expectedSize: (version >= 14 && (flags & 4) !== 0) ? c.uint.decode(state) : 0,
|
|
2679
|
+
label: (version >= 15 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
2680
|
+
contextLength: (version >= 15 && (flags & 16) !== 0) ? c.uint.decode(state) : 0
|
|
2660
2681
|
}
|
|
2661
2682
|
}
|
|
2662
2683
|
}
|
|
@@ -3174,6 +3195,176 @@ const encoding84 = {
|
|
|
3174
3195
|
}
|
|
3175
3196
|
}
|
|
3176
3197
|
|
|
3198
|
+
// @harness/preview-model-source-request
|
|
3199
|
+
const encoding85 = {
|
|
3200
|
+
preencode(state, m) {
|
|
3201
|
+
c.string.preencode(state, m.src)
|
|
3202
|
+
state.end++ // max flag is 1 so always one byte
|
|
3203
|
+
|
|
3204
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3205
|
+
},
|
|
3206
|
+
encode(state, m) {
|
|
3207
|
+
const flags = (version >= 14 && m.mmprojSrc) ? 1 : 0
|
|
3208
|
+
|
|
3209
|
+
c.string.encode(state, m.src)
|
|
3210
|
+
c.uint.encode(state, flags)
|
|
3211
|
+
|
|
3212
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3213
|
+
},
|
|
3214
|
+
decode(state) {
|
|
3215
|
+
const r0 = c.string.decode(state)
|
|
3216
|
+
const flags = c.uint.decode(state)
|
|
3217
|
+
|
|
3218
|
+
return {
|
|
3219
|
+
src: r0,
|
|
3220
|
+
mmprojSrc: (version >= 14 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
// @harness/model-source-file
|
|
3226
|
+
const encoding86 = {
|
|
3227
|
+
preencode(state, m) {
|
|
3228
|
+
c.string.preencode(state, m.src)
|
|
3229
|
+
c.string.preencode(state, m.label)
|
|
3230
|
+
state.end++ // max flag is 1 so always one byte
|
|
3231
|
+
|
|
3232
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3233
|
+
},
|
|
3234
|
+
encode(state, m) {
|
|
3235
|
+
const flags = (version >= 14 && m.sizeBytes) ? 1 : 0
|
|
3236
|
+
|
|
3237
|
+
c.string.encode(state, m.src)
|
|
3238
|
+
c.string.encode(state, m.label)
|
|
3239
|
+
c.uint.encode(state, flags)
|
|
3240
|
+
|
|
3241
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3242
|
+
},
|
|
3243
|
+
decode(state) {
|
|
3244
|
+
const r0 = c.string.decode(state)
|
|
3245
|
+
const r1 = c.string.decode(state)
|
|
3246
|
+
const flags = c.uint.decode(state)
|
|
3247
|
+
|
|
3248
|
+
return {
|
|
3249
|
+
src: r0,
|
|
3250
|
+
label: r1,
|
|
3251
|
+
sizeBytes: (version >= 14 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
// @harness/preview-model-source-response.files
|
|
3257
|
+
const encoding87_4 = c.array(c.frame(encoding86))
|
|
3258
|
+
// @harness/preview-model-source-response.fitReasons
|
|
3259
|
+
const encoding87_12 = encoding4_4
|
|
3260
|
+
|
|
3261
|
+
// @harness/preview-model-source-response
|
|
3262
|
+
const encoding87 = {
|
|
3263
|
+
preencode(state, m) {
|
|
3264
|
+
const flags =
|
|
3265
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3266
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3267
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3268
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3269
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3270
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3271
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3272
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3273
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3274
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3275
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3276
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3277
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3278
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3279
|
+
|
|
3280
|
+
c.uint.preencode(state, flags)
|
|
3281
|
+
|
|
3282
|
+
if (version >= 14 && m.refusal) c.string.preencode(state, m.refusal)
|
|
3283
|
+
if (version >= 14 && m.reason) c.string.preencode(state, m.reason)
|
|
3284
|
+
if (version >= 14 && m.src) c.string.preencode(state, m.src)
|
|
3285
|
+
if (version >= 14 && m.files) encoding87_4.preencode(state, m.files)
|
|
3286
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3287
|
+
if (version >= 14 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
3288
|
+
if (version >= 14 && m.architecture) c.string.preencode(state, m.architecture)
|
|
3289
|
+
if (version >= 14 && m.sizeLabel) c.string.preencode(state, m.sizeLabel)
|
|
3290
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
3291
|
+
if (version >= 14 && m.license) c.string.preencode(state, m.license)
|
|
3292
|
+
if (version >= 14 && m.fit) c.string.preencode(state, m.fit)
|
|
3293
|
+
if (version >= 14 && m.fitReasons) encoding87_12.preencode(state, m.fitReasons)
|
|
3294
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3295
|
+
},
|
|
3296
|
+
encode(state, m) {
|
|
3297
|
+
const flags =
|
|
3298
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3299
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3300
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3301
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3302
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3303
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3304
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3305
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3306
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3307
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3308
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3309
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3310
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3311
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3312
|
+
|
|
3313
|
+
c.uint.encode(state, flags)
|
|
3314
|
+
|
|
3315
|
+
if (version >= 14 && m.refusal) c.string.encode(state, m.refusal)
|
|
3316
|
+
if (version >= 14 && m.reason) c.string.encode(state, m.reason)
|
|
3317
|
+
if (version >= 14 && m.src) c.string.encode(state, m.src)
|
|
3318
|
+
if (version >= 14 && m.files) encoding87_4.encode(state, m.files)
|
|
3319
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3320
|
+
if (version >= 14 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
3321
|
+
if (version >= 14 && m.architecture) c.string.encode(state, m.architecture)
|
|
3322
|
+
if (version >= 14 && m.sizeLabel) c.string.encode(state, m.sizeLabel)
|
|
3323
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
3324
|
+
if (version >= 14 && m.license) c.string.encode(state, m.license)
|
|
3325
|
+
if (version >= 14 && m.fit) c.string.encode(state, m.fit)
|
|
3326
|
+
if (version >= 14 && m.fitReasons) encoding87_12.encode(state, m.fitReasons)
|
|
3327
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3328
|
+
},
|
|
3329
|
+
decode(state) {
|
|
3330
|
+
const flags = c.uint.decode(state)
|
|
3331
|
+
|
|
3332
|
+
return {
|
|
3333
|
+
ok: (version >= 14 && (flags & 1) !== 0),
|
|
3334
|
+
refusal: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
3335
|
+
reason: (version >= 14 && (flags & 4) !== 0) ? c.string.decode(state) : null,
|
|
3336
|
+
src: (version >= 14 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
3337
|
+
files: (version >= 14 && (flags & 16) !== 0) ? encoding87_4.decode(state) : null,
|
|
3338
|
+
sizeBytes: (version >= 14 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
3339
|
+
contextLength: (version >= 14 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
3340
|
+
architecture: (version >= 14 && (flags & 128) !== 0) ? c.string.decode(state) : null,
|
|
3341
|
+
sizeLabel: (version >= 14 && (flags & 256) !== 0) ? c.string.decode(state) : null,
|
|
3342
|
+
taskType: (version >= 14 && (flags & 512) !== 0) ? c.string.decode(state) : null,
|
|
3343
|
+
license: (version >= 14 && (flags & 1024) !== 0) ? c.string.decode(state) : null,
|
|
3344
|
+
fit: (version >= 14 && (flags & 2048) !== 0) ? c.string.decode(state) : null,
|
|
3345
|
+
fitReasons: (version >= 14 && (flags & 4096) !== 0) ? encoding87_12.decode(state) : null,
|
|
3346
|
+
mmprojSrc: (version >= 14 && (flags & 8192) !== 0) ? c.string.decode(state) : null
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
// @harness/set-model-idle-timeout-request
|
|
3352
|
+
const encoding88 = {
|
|
3353
|
+
preencode(state, m) {
|
|
3354
|
+
c.uint.preencode(state, m.ms)
|
|
3355
|
+
},
|
|
3356
|
+
encode(state, m) {
|
|
3357
|
+
c.uint.encode(state, m.ms)
|
|
3358
|
+
},
|
|
3359
|
+
decode(state) {
|
|
3360
|
+
const r0 = c.uint.decode(state)
|
|
3361
|
+
|
|
3362
|
+
return {
|
|
3363
|
+
ms: r0
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3177
3368
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3178
3369
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3179
3370
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3406,6 +3597,14 @@ function getEncoding(name) {
|
|
|
3406
3597
|
return encoding83
|
|
3407
3598
|
case '@harness/skill-oauth-verify':
|
|
3408
3599
|
return encoding84
|
|
3600
|
+
case '@harness/preview-model-source-request':
|
|
3601
|
+
return encoding85
|
|
3602
|
+
case '@harness/model-source-file':
|
|
3603
|
+
return encoding86
|
|
3604
|
+
case '@harness/preview-model-source-response':
|
|
3605
|
+
return encoding87
|
|
3606
|
+
case '@harness/set-model-idle-timeout-request':
|
|
3607
|
+
return encoding88
|
|
3409
3608
|
default:
|
|
3410
3609
|
throw new Error('Encoder not found ' + name)
|
|
3411
3610
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// This file is autogenerated by the hyperschema compiler
|
|
2
|
-
// Schema Version:
|
|
2
|
+
// Schema Version: 15
|
|
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 = 15
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line no-unused-vars
|
|
12
12
|
let version = VERSION
|
|
@@ -1610,17 +1610,19 @@ const encoding31 = {
|
|
|
1610
1610
|
c.string.preencode(state, m.type)
|
|
1611
1611
|
c.string.preencode(state, m.registryPath)
|
|
1612
1612
|
c.string.preencode(state, m.registrySource)
|
|
1613
|
-
state.end++ // max flag is
|
|
1613
|
+
state.end++ // max flag is 16 so always one byte
|
|
1614
1614
|
c.uint.preencode(state, m.expectedSize)
|
|
1615
1615
|
|
|
1616
1616
|
if (m.actualSize) c.uint.preencode(state, m.actualSize)
|
|
1617
|
+
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
1617
1618
|
},
|
|
1618
1619
|
encode(state, m) {
|
|
1619
1620
|
const flags =
|
|
1620
1621
|
(m.isCached ? 1 : 0) |
|
|
1621
1622
|
(m.isLoaded ? 2 : 0) |
|
|
1622
1623
|
(m.supportsImages ? 4 : 0) |
|
|
1623
|
-
(m.actualSize ? 8 : 0)
|
|
1624
|
+
(m.actualSize ? 8 : 0) |
|
|
1625
|
+
((version >= 15 && m.label) ? 16 : 0)
|
|
1624
1626
|
|
|
1625
1627
|
c.string.encode(state, m.name)
|
|
1626
1628
|
c.string.encode(state, m.type)
|
|
@@ -1630,6 +1632,7 @@ const encoding31 = {
|
|
|
1630
1632
|
c.uint.encode(state, m.expectedSize)
|
|
1631
1633
|
|
|
1632
1634
|
if (m.actualSize) c.uint.encode(state, m.actualSize)
|
|
1635
|
+
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
1633
1636
|
},
|
|
1634
1637
|
decode(state) {
|
|
1635
1638
|
const r0 = c.string.decode(state)
|
|
@@ -1647,7 +1650,8 @@ const encoding31 = {
|
|
|
1647
1650
|
isLoaded: (flags & 2) !== 0,
|
|
1648
1651
|
supportsImages: (flags & 4) !== 0,
|
|
1649
1652
|
expectedSize: c.uint.decode(state),
|
|
1650
|
-
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0
|
|
1653
|
+
actualSize: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
|
|
1654
|
+
label: (version >= 15 && (flags & 16) !== 0) ? c.string.decode(state) : null
|
|
1651
1655
|
}
|
|
1652
1656
|
}
|
|
1653
1657
|
}
|
|
@@ -2635,18 +2639,31 @@ const encoding65 = {
|
|
|
2635
2639
|
preencode(state, m) {
|
|
2636
2640
|
c.string.preencode(state, m.name)
|
|
2637
2641
|
c.string.preencode(state, m.src)
|
|
2638
|
-
state.end++ // max flag is
|
|
2642
|
+
state.end++ // max flag is 16 so always one byte
|
|
2639
2643
|
|
|
2640
2644
|
if (version >= 5 && m.projectionSrc) c.string.preencode(state, m.projectionSrc)
|
|
2645
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
2646
|
+
if (version >= 14 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
|
|
2647
|
+
if (version >= 15 && m.label) c.string.preencode(state, m.label)
|
|
2648
|
+
if (version >= 15 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
2641
2649
|
},
|
|
2642
2650
|
encode(state, m) {
|
|
2643
|
-
const flags =
|
|
2651
|
+
const flags =
|
|
2652
|
+
((version >= 5 && m.projectionSrc) ? 1 : 0) |
|
|
2653
|
+
((version >= 14 && m.taskType) ? 2 : 0) |
|
|
2654
|
+
((version >= 14 && m.expectedSize) ? 4 : 0) |
|
|
2655
|
+
((version >= 15 && m.label) ? 8 : 0) |
|
|
2656
|
+
((version >= 15 && m.contextLength) ? 16 : 0)
|
|
2644
2657
|
|
|
2645
2658
|
c.string.encode(state, m.name)
|
|
2646
2659
|
c.string.encode(state, m.src)
|
|
2647
2660
|
c.uint.encode(state, flags)
|
|
2648
2661
|
|
|
2649
2662
|
if (version >= 5 && m.projectionSrc) c.string.encode(state, m.projectionSrc)
|
|
2663
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
2664
|
+
if (version >= 14 && m.expectedSize) c.uint.encode(state, m.expectedSize)
|
|
2665
|
+
if (version >= 15 && m.label) c.string.encode(state, m.label)
|
|
2666
|
+
if (version >= 15 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
2650
2667
|
},
|
|
2651
2668
|
decode(state) {
|
|
2652
2669
|
const r0 = c.string.decode(state)
|
|
@@ -2656,7 +2673,11 @@ const encoding65 = {
|
|
|
2656
2673
|
return {
|
|
2657
2674
|
name: r0,
|
|
2658
2675
|
src: r1,
|
|
2659
|
-
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
2676
|
+
projectionSrc: (version >= 5 && (flags & 1) !== 0) ? c.string.decode(state) : null,
|
|
2677
|
+
taskType: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
2678
|
+
expectedSize: (version >= 14 && (flags & 4) !== 0) ? c.uint.decode(state) : 0,
|
|
2679
|
+
label: (version >= 15 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
2680
|
+
contextLength: (version >= 15 && (flags & 16) !== 0) ? c.uint.decode(state) : 0
|
|
2660
2681
|
}
|
|
2661
2682
|
}
|
|
2662
2683
|
}
|
|
@@ -3174,6 +3195,176 @@ const encoding84 = {
|
|
|
3174
3195
|
}
|
|
3175
3196
|
}
|
|
3176
3197
|
|
|
3198
|
+
// @harness/preview-model-source-request
|
|
3199
|
+
const encoding85 = {
|
|
3200
|
+
preencode(state, m) {
|
|
3201
|
+
c.string.preencode(state, m.src)
|
|
3202
|
+
state.end++ // max flag is 1 so always one byte
|
|
3203
|
+
|
|
3204
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3205
|
+
},
|
|
3206
|
+
encode(state, m) {
|
|
3207
|
+
const flags = (version >= 14 && m.mmprojSrc) ? 1 : 0
|
|
3208
|
+
|
|
3209
|
+
c.string.encode(state, m.src)
|
|
3210
|
+
c.uint.encode(state, flags)
|
|
3211
|
+
|
|
3212
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3213
|
+
},
|
|
3214
|
+
decode(state) {
|
|
3215
|
+
const r0 = c.string.decode(state)
|
|
3216
|
+
const flags = c.uint.decode(state)
|
|
3217
|
+
|
|
3218
|
+
return {
|
|
3219
|
+
src: r0,
|
|
3220
|
+
mmprojSrc: (version >= 14 && (flags & 1) !== 0) ? c.string.decode(state) : null
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
// @harness/model-source-file
|
|
3226
|
+
const encoding86 = {
|
|
3227
|
+
preencode(state, m) {
|
|
3228
|
+
c.string.preencode(state, m.src)
|
|
3229
|
+
c.string.preencode(state, m.label)
|
|
3230
|
+
state.end++ // max flag is 1 so always one byte
|
|
3231
|
+
|
|
3232
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3233
|
+
},
|
|
3234
|
+
encode(state, m) {
|
|
3235
|
+
const flags = (version >= 14 && m.sizeBytes) ? 1 : 0
|
|
3236
|
+
|
|
3237
|
+
c.string.encode(state, m.src)
|
|
3238
|
+
c.string.encode(state, m.label)
|
|
3239
|
+
c.uint.encode(state, flags)
|
|
3240
|
+
|
|
3241
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3242
|
+
},
|
|
3243
|
+
decode(state) {
|
|
3244
|
+
const r0 = c.string.decode(state)
|
|
3245
|
+
const r1 = c.string.decode(state)
|
|
3246
|
+
const flags = c.uint.decode(state)
|
|
3247
|
+
|
|
3248
|
+
return {
|
|
3249
|
+
src: r0,
|
|
3250
|
+
label: r1,
|
|
3251
|
+
sizeBytes: (version >= 14 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
// @harness/preview-model-source-response.files
|
|
3257
|
+
const encoding87_4 = c.array(c.frame(encoding86))
|
|
3258
|
+
// @harness/preview-model-source-response.fitReasons
|
|
3259
|
+
const encoding87_12 = encoding4_4
|
|
3260
|
+
|
|
3261
|
+
// @harness/preview-model-source-response
|
|
3262
|
+
const encoding87 = {
|
|
3263
|
+
preencode(state, m) {
|
|
3264
|
+
const flags =
|
|
3265
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3266
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3267
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3268
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3269
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3270
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3271
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3272
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3273
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3274
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3275
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3276
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3277
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3278
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3279
|
+
|
|
3280
|
+
c.uint.preencode(state, flags)
|
|
3281
|
+
|
|
3282
|
+
if (version >= 14 && m.refusal) c.string.preencode(state, m.refusal)
|
|
3283
|
+
if (version >= 14 && m.reason) c.string.preencode(state, m.reason)
|
|
3284
|
+
if (version >= 14 && m.src) c.string.preencode(state, m.src)
|
|
3285
|
+
if (version >= 14 && m.files) encoding87_4.preencode(state, m.files)
|
|
3286
|
+
if (version >= 14 && m.sizeBytes) c.uint.preencode(state, m.sizeBytes)
|
|
3287
|
+
if (version >= 14 && m.contextLength) c.uint.preencode(state, m.contextLength)
|
|
3288
|
+
if (version >= 14 && m.architecture) c.string.preencode(state, m.architecture)
|
|
3289
|
+
if (version >= 14 && m.sizeLabel) c.string.preencode(state, m.sizeLabel)
|
|
3290
|
+
if (version >= 14 && m.taskType) c.string.preencode(state, m.taskType)
|
|
3291
|
+
if (version >= 14 && m.license) c.string.preencode(state, m.license)
|
|
3292
|
+
if (version >= 14 && m.fit) c.string.preencode(state, m.fit)
|
|
3293
|
+
if (version >= 14 && m.fitReasons) encoding87_12.preencode(state, m.fitReasons)
|
|
3294
|
+
if (version >= 14 && m.mmprojSrc) c.string.preencode(state, m.mmprojSrc)
|
|
3295
|
+
},
|
|
3296
|
+
encode(state, m) {
|
|
3297
|
+
const flags =
|
|
3298
|
+
((version >= 14 && m.ok) ? 1 : 0) |
|
|
3299
|
+
((version >= 14 && m.refusal) ? 2 : 0) |
|
|
3300
|
+
((version >= 14 && m.reason) ? 4 : 0) |
|
|
3301
|
+
((version >= 14 && m.src) ? 8 : 0) |
|
|
3302
|
+
((version >= 14 && m.files) ? 16 : 0) |
|
|
3303
|
+
((version >= 14 && m.sizeBytes) ? 32 : 0) |
|
|
3304
|
+
((version >= 14 && m.contextLength) ? 64 : 0) |
|
|
3305
|
+
((version >= 14 && m.architecture) ? 128 : 0) |
|
|
3306
|
+
((version >= 14 && m.sizeLabel) ? 256 : 0) |
|
|
3307
|
+
((version >= 14 && m.taskType) ? 512 : 0) |
|
|
3308
|
+
((version >= 14 && m.license) ? 1024 : 0) |
|
|
3309
|
+
((version >= 14 && m.fit) ? 2048 : 0) |
|
|
3310
|
+
((version >= 14 && m.fitReasons) ? 4096 : 0) |
|
|
3311
|
+
((version >= 14 && m.mmprojSrc) ? 8192 : 0)
|
|
3312
|
+
|
|
3313
|
+
c.uint.encode(state, flags)
|
|
3314
|
+
|
|
3315
|
+
if (version >= 14 && m.refusal) c.string.encode(state, m.refusal)
|
|
3316
|
+
if (version >= 14 && m.reason) c.string.encode(state, m.reason)
|
|
3317
|
+
if (version >= 14 && m.src) c.string.encode(state, m.src)
|
|
3318
|
+
if (version >= 14 && m.files) encoding87_4.encode(state, m.files)
|
|
3319
|
+
if (version >= 14 && m.sizeBytes) c.uint.encode(state, m.sizeBytes)
|
|
3320
|
+
if (version >= 14 && m.contextLength) c.uint.encode(state, m.contextLength)
|
|
3321
|
+
if (version >= 14 && m.architecture) c.string.encode(state, m.architecture)
|
|
3322
|
+
if (version >= 14 && m.sizeLabel) c.string.encode(state, m.sizeLabel)
|
|
3323
|
+
if (version >= 14 && m.taskType) c.string.encode(state, m.taskType)
|
|
3324
|
+
if (version >= 14 && m.license) c.string.encode(state, m.license)
|
|
3325
|
+
if (version >= 14 && m.fit) c.string.encode(state, m.fit)
|
|
3326
|
+
if (version >= 14 && m.fitReasons) encoding87_12.encode(state, m.fitReasons)
|
|
3327
|
+
if (version >= 14 && m.mmprojSrc) c.string.encode(state, m.mmprojSrc)
|
|
3328
|
+
},
|
|
3329
|
+
decode(state) {
|
|
3330
|
+
const flags = c.uint.decode(state)
|
|
3331
|
+
|
|
3332
|
+
return {
|
|
3333
|
+
ok: (version >= 14 && (flags & 1) !== 0),
|
|
3334
|
+
refusal: (version >= 14 && (flags & 2) !== 0) ? c.string.decode(state) : null,
|
|
3335
|
+
reason: (version >= 14 && (flags & 4) !== 0) ? c.string.decode(state) : null,
|
|
3336
|
+
src: (version >= 14 && (flags & 8) !== 0) ? c.string.decode(state) : null,
|
|
3337
|
+
files: (version >= 14 && (flags & 16) !== 0) ? encoding87_4.decode(state) : null,
|
|
3338
|
+
sizeBytes: (version >= 14 && (flags & 32) !== 0) ? c.uint.decode(state) : 0,
|
|
3339
|
+
contextLength: (version >= 14 && (flags & 64) !== 0) ? c.uint.decode(state) : 0,
|
|
3340
|
+
architecture: (version >= 14 && (flags & 128) !== 0) ? c.string.decode(state) : null,
|
|
3341
|
+
sizeLabel: (version >= 14 && (flags & 256) !== 0) ? c.string.decode(state) : null,
|
|
3342
|
+
taskType: (version >= 14 && (flags & 512) !== 0) ? c.string.decode(state) : null,
|
|
3343
|
+
license: (version >= 14 && (flags & 1024) !== 0) ? c.string.decode(state) : null,
|
|
3344
|
+
fit: (version >= 14 && (flags & 2048) !== 0) ? c.string.decode(state) : null,
|
|
3345
|
+
fitReasons: (version >= 14 && (flags & 4096) !== 0) ? encoding87_12.decode(state) : null,
|
|
3346
|
+
mmprojSrc: (version >= 14 && (flags & 8192) !== 0) ? c.string.decode(state) : null
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
// @harness/set-model-idle-timeout-request
|
|
3352
|
+
const encoding88 = {
|
|
3353
|
+
preencode(state, m) {
|
|
3354
|
+
c.uint.preencode(state, m.ms)
|
|
3355
|
+
},
|
|
3356
|
+
encode(state, m) {
|
|
3357
|
+
c.uint.encode(state, m.ms)
|
|
3358
|
+
},
|
|
3359
|
+
decode(state) {
|
|
3360
|
+
const r0 = c.uint.decode(state)
|
|
3361
|
+
|
|
3362
|
+
return {
|
|
3363
|
+
ms: r0
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3177
3368
|
// @harness/completion-frame.grantedDrives, deferred due to recusive use
|
|
3178
3369
|
const encoding11_23 = c.array(c.frame(encoding60))
|
|
3179
3370
|
// @harness/skill.setupV2, deferred due to recusive use
|
|
@@ -3406,6 +3597,14 @@ function getEncoding(name) {
|
|
|
3406
3597
|
return encoding83
|
|
3407
3598
|
case '@harness/skill-oauth-verify':
|
|
3408
3599
|
return encoding84
|
|
3600
|
+
case '@harness/preview-model-source-request':
|
|
3601
|
+
return encoding85
|
|
3602
|
+
case '@harness/model-source-file':
|
|
3603
|
+
return encoding86
|
|
3604
|
+
case '@harness/preview-model-source-response':
|
|
3605
|
+
return encoding87
|
|
3606
|
+
case '@harness/set-model-idle-timeout-request':
|
|
3607
|
+
return encoding88
|
|
3409
3608
|
default:
|
|
3410
3609
|
throw new Error('Encoder not found ' + name)
|
|
3411
3610
|
}
|