@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,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version":
|
|
2
|
+
"version": 15,
|
|
3
3
|
"schema": [
|
|
4
4
|
{
|
|
5
5
|
"name": "empty",
|
|
@@ -1336,6 +1336,11 @@
|
|
|
1336
1336
|
"name": "actualSize",
|
|
1337
1337
|
"type": "uint",
|
|
1338
1338
|
"version": 1
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"name": "label",
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"version": 15
|
|
1339
1344
|
}
|
|
1340
1345
|
]
|
|
1341
1346
|
},
|
|
@@ -2129,6 +2134,26 @@
|
|
|
2129
2134
|
"name": "projectionSrc",
|
|
2130
2135
|
"type": "string",
|
|
2131
2136
|
"version": 5
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"name": "taskType",
|
|
2140
|
+
"type": "string",
|
|
2141
|
+
"version": 14
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
"name": "expectedSize",
|
|
2145
|
+
"type": "uint",
|
|
2146
|
+
"version": 14
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"name": "label",
|
|
2150
|
+
"type": "string",
|
|
2151
|
+
"version": 15
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"name": "contextLength",
|
|
2155
|
+
"type": "uint",
|
|
2156
|
+
"version": 15
|
|
2132
2157
|
}
|
|
2133
2158
|
]
|
|
2134
2159
|
},
|
|
@@ -2553,6 +2578,145 @@
|
|
|
2553
2578
|
"version": 13
|
|
2554
2579
|
}
|
|
2555
2580
|
]
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
"name": "preview-model-source-request",
|
|
2584
|
+
"namespace": "harness",
|
|
2585
|
+
"compact": false,
|
|
2586
|
+
"flagsPosition": 1,
|
|
2587
|
+
"fields": [
|
|
2588
|
+
{
|
|
2589
|
+
"name": "src",
|
|
2590
|
+
"required": true,
|
|
2591
|
+
"type": "string",
|
|
2592
|
+
"version": 14
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
"name": "mmprojSrc",
|
|
2596
|
+
"type": "string",
|
|
2597
|
+
"version": 14
|
|
2598
|
+
}
|
|
2599
|
+
]
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"name": "model-source-file",
|
|
2603
|
+
"namespace": "harness",
|
|
2604
|
+
"compact": false,
|
|
2605
|
+
"flagsPosition": 2,
|
|
2606
|
+
"fields": [
|
|
2607
|
+
{
|
|
2608
|
+
"name": "src",
|
|
2609
|
+
"required": true,
|
|
2610
|
+
"type": "string",
|
|
2611
|
+
"version": 14
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"name": "label",
|
|
2615
|
+
"required": true,
|
|
2616
|
+
"type": "string",
|
|
2617
|
+
"version": 14
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
"name": "sizeBytes",
|
|
2621
|
+
"type": "uint",
|
|
2622
|
+
"version": 14
|
|
2623
|
+
}
|
|
2624
|
+
]
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"name": "preview-model-source-response",
|
|
2628
|
+
"namespace": "harness",
|
|
2629
|
+
"compact": false,
|
|
2630
|
+
"flagsPosition": 0,
|
|
2631
|
+
"fields": [
|
|
2632
|
+
{
|
|
2633
|
+
"name": "ok",
|
|
2634
|
+
"required": false,
|
|
2635
|
+
"type": "bool",
|
|
2636
|
+
"version": 14
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"name": "refusal",
|
|
2640
|
+
"type": "string",
|
|
2641
|
+
"version": 14
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
"name": "reason",
|
|
2645
|
+
"type": "string",
|
|
2646
|
+
"version": 14
|
|
2647
|
+
},
|
|
2648
|
+
{
|
|
2649
|
+
"name": "src",
|
|
2650
|
+
"type": "string",
|
|
2651
|
+
"version": 14
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
"name": "files",
|
|
2655
|
+
"array": true,
|
|
2656
|
+
"type": "@harness/model-source-file",
|
|
2657
|
+
"version": 14
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"name": "sizeBytes",
|
|
2661
|
+
"type": "uint",
|
|
2662
|
+
"version": 14
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
"name": "contextLength",
|
|
2666
|
+
"type": "uint",
|
|
2667
|
+
"version": 14
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
"name": "architecture",
|
|
2671
|
+
"type": "string",
|
|
2672
|
+
"version": 14
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"name": "sizeLabel",
|
|
2676
|
+
"type": "string",
|
|
2677
|
+
"version": 14
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
"name": "taskType",
|
|
2681
|
+
"type": "string",
|
|
2682
|
+
"version": 14
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
"name": "license",
|
|
2686
|
+
"type": "string",
|
|
2687
|
+
"version": 14
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
"name": "fit",
|
|
2691
|
+
"type": "string",
|
|
2692
|
+
"version": 14
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
"name": "fitReasons",
|
|
2696
|
+
"array": true,
|
|
2697
|
+
"type": "string",
|
|
2698
|
+
"version": 14
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
"name": "mmprojSrc",
|
|
2702
|
+
"type": "string",
|
|
2703
|
+
"version": 14
|
|
2704
|
+
}
|
|
2705
|
+
]
|
|
2706
|
+
},
|
|
2707
|
+
{
|
|
2708
|
+
"name": "set-model-idle-timeout-request",
|
|
2709
|
+
"namespace": "harness",
|
|
2710
|
+
"compact": false,
|
|
2711
|
+
"flagsPosition": -1,
|
|
2712
|
+
"fields": [
|
|
2713
|
+
{
|
|
2714
|
+
"name": "ms",
|
|
2715
|
+
"required": true,
|
|
2716
|
+
"type": "uint",
|
|
2717
|
+
"version": 15
|
|
2718
|
+
}
|
|
2719
|
+
]
|
|
2556
2720
|
}
|
|
2557
2721
|
]
|
|
2558
2722
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is autogenerated by hyperschema-ts
|
|
2
|
-
// Schema version:
|
|
2
|
+
// Schema version: 15
|
|
3
3
|
// Do not edit manually.
|
|
4
4
|
|
|
5
5
|
export interface HarnessEmpty {
|
|
@@ -256,6 +256,7 @@ export interface HarnessModelInfo {
|
|
|
256
256
|
supportsImages?: boolean
|
|
257
257
|
expectedSize: number
|
|
258
258
|
actualSize?: number
|
|
259
|
+
label?: string | null
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
export interface HarnessListModelsRequest {
|
|
@@ -425,6 +426,10 @@ export interface HarnessCustomModel {
|
|
|
425
426
|
name: string
|
|
426
427
|
src: string
|
|
427
428
|
projectionSrc?: string | null
|
|
429
|
+
taskType?: string | null
|
|
430
|
+
expectedSize?: number
|
|
431
|
+
label?: string | null
|
|
432
|
+
contextLength?: number
|
|
428
433
|
}
|
|
429
434
|
|
|
430
435
|
export interface HarnessSetCustomModelsRequest {
|
|
@@ -531,6 +536,38 @@ export interface HarnessSkillOauthVerify {
|
|
|
531
536
|
reject?: HarnessSkillOauthVerifyRule[] | null
|
|
532
537
|
}
|
|
533
538
|
|
|
539
|
+
export interface HarnessPreviewModelSourceRequest {
|
|
540
|
+
src: string
|
|
541
|
+
mmprojSrc?: string | null
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export interface HarnessModelSourceFile {
|
|
545
|
+
src: string
|
|
546
|
+
label: string
|
|
547
|
+
sizeBytes?: number
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface HarnessPreviewModelSourceResponse {
|
|
551
|
+
ok?: boolean
|
|
552
|
+
refusal?: string | null
|
|
553
|
+
reason?: string | null
|
|
554
|
+
src?: string | null
|
|
555
|
+
files?: HarnessModelSourceFile[] | null
|
|
556
|
+
sizeBytes?: number
|
|
557
|
+
contextLength?: number
|
|
558
|
+
architecture?: string | null
|
|
559
|
+
sizeLabel?: string | null
|
|
560
|
+
taskType?: string | null
|
|
561
|
+
license?: string | null
|
|
562
|
+
fit?: string | null
|
|
563
|
+
fitReasons?: string[] | null
|
|
564
|
+
mmprojSrc?: string | null
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export interface HarnessSetModelIdleTimeoutRequest {
|
|
568
|
+
ms: number
|
|
569
|
+
}
|
|
570
|
+
|
|
534
571
|
export interface SchemaTypes {
|
|
535
572
|
"@harness/empty": HarnessEmpty
|
|
536
573
|
"@harness/ok-response": HarnessOkResponse
|
|
@@ -617,4 +654,8 @@ export interface SchemaTypes {
|
|
|
617
654
|
"@harness/skill-oauth-config": HarnessSkillOauthConfig
|
|
618
655
|
"@harness/skill-oauth-verify-rule": HarnessSkillOauthVerifyRule
|
|
619
656
|
"@harness/skill-oauth-verify": HarnessSkillOauthVerify
|
|
657
|
+
"@harness/preview-model-source-request": HarnessPreviewModelSourceRequest
|
|
658
|
+
"@harness/model-source-file": HarnessModelSourceFile
|
|
659
|
+
"@harness/preview-model-source-response": HarnessPreviewModelSourceResponse
|
|
660
|
+
"@harness/set-model-idle-timeout-request": HarnessSetModelIdleTimeoutRequest
|
|
620
661
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qvac/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "An AI harness implementing generate(context) via @qvac/sdk. Knows nothing about workbench, hyperdb, or chunks — just inference in, events out.",
|
|
6
6
|
"exports": {
|
|
@@ -420,17 +420,17 @@
|
|
|
420
420
|
"types": "./dist-lib/lib/tools/http-request/encode-fields.d.ts",
|
|
421
421
|
"default": "./dist-lib/lib/tools/http-request/encode-fields.js"
|
|
422
422
|
},
|
|
423
|
+
"./lib/tools/http-request/request.ts": {
|
|
424
|
+
"types": "./dist-lib/lib/tools/http-request/request.d.ts",
|
|
425
|
+
"default": "./dist-lib/lib/tools/http-request/request.js"
|
|
426
|
+
},
|
|
423
427
|
"./lib/tools/http-request/truncate-response.ts": {
|
|
424
428
|
"types": "./dist-lib/lib/tools/http-request/truncate-response.d.ts",
|
|
425
429
|
"default": "./dist-lib/lib/tools/http-request/truncate-response.js"
|
|
426
430
|
},
|
|
427
|
-
"./lib/tools/
|
|
428
|
-
"types": "./dist-lib/lib/tools/
|
|
429
|
-
"default": "./dist-lib/lib/tools/
|
|
430
|
-
},
|
|
431
|
-
"./lib/tools/mcp/utils.ts": {
|
|
432
|
-
"types": "./dist-lib/lib/tools/mcp/utils.d.ts",
|
|
433
|
-
"default": "./dist-lib/lib/tools/mcp/utils.js"
|
|
431
|
+
"./lib/tools/mcp/protocol.ts": {
|
|
432
|
+
"types": "./dist-lib/lib/tools/mcp/protocol.d.ts",
|
|
433
|
+
"default": "./dist-lib/lib/tools/mcp/protocol.js"
|
|
434
434
|
},
|
|
435
435
|
"./lib/tools/model-args.ts": {
|
|
436
436
|
"types": "./dist-lib/lib/tools/model-args.d.ts",
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
"scripts": {
|
|
601
601
|
"build:schema": "bare schema/build.ts",
|
|
602
602
|
"test": "npm run vendor:wheels && npm run test:bare && npm run test:addons",
|
|
603
|
-
"test:bare": "QVAC_NO_SKILL_BIN_PROBE=1
|
|
603
|
+
"test:bare": "QVAC_NO_SKILL_BIN_PROBE=1 brittle-jobs 'test/{,!(helpers)/}*.ts'",
|
|
604
604
|
"format": "prettier . --write",
|
|
605
605
|
"lint": "prettier . --check && lunte && tsc --noEmit",
|
|
606
606
|
"build:bundle": "node scripts/build-bundle.mjs",
|
|
@@ -699,7 +699,7 @@
|
|
|
699
699
|
"@qvac/sdk": "0.20.0",
|
|
700
700
|
"@qvac/skills": "0.1.9",
|
|
701
701
|
"asenion": "^0.1.0",
|
|
702
|
-
"b4a": "^1.
|
|
702
|
+
"b4a": "^1.9.0",
|
|
703
703
|
"bare-abort-controller": "^1.1.2",
|
|
704
704
|
"bare-buffer": "^3.6.1",
|
|
705
705
|
"bare-channel": "^5.2.4",
|
|
@@ -747,21 +747,21 @@
|
|
|
747
747
|
"zod": "^4.3.6"
|
|
748
748
|
},
|
|
749
749
|
"devDependencies": {
|
|
750
|
-
"@types/b4a": "^1.6.5",
|
|
751
750
|
"bare-bundle": "^1.10.0",
|
|
752
751
|
"bare-module-lexer": "^1.6.3",
|
|
753
752
|
"bare-runtime": "^1.30.0",
|
|
754
753
|
"bare-semver": "^1.1.0",
|
|
755
754
|
"brittle": "^4.0.2",
|
|
755
|
+
"brittle-jobs": "^0.2.1",
|
|
756
756
|
"corestore": "^7.11.0",
|
|
757
757
|
"holepunch-types": "^0.2.1",
|
|
758
758
|
"hyperdrive": "^13.3.3",
|
|
759
759
|
"jsdom": "~30.0.1",
|
|
760
|
-
"lunte": "^1.8.
|
|
760
|
+
"lunte": "^1.8.4",
|
|
761
|
+
"lunte-plugin-qvac": "^0.1.0",
|
|
761
762
|
"mermaid": "~11.16.1",
|
|
762
763
|
"prettier": "^3.6.2",
|
|
763
764
|
"prettier-config-holepunch": "^2.0.0",
|
|
764
|
-
"prettytap": "^0.2.0",
|
|
765
765
|
"terser": "^5.51.2",
|
|
766
766
|
"typescript": "^7.0.2"
|
|
767
767
|
},
|
|
@@ -771,7 +771,6 @@
|
|
|
771
771
|
"localwatch@1.4.3": "patches/localwatch@1.4.3.patch",
|
|
772
772
|
"hypercore-blob-server@1.15.0": "patches/hypercore-blob-server@1.15.0.patch",
|
|
773
773
|
"bare-stow@0.1.5": "patches/bare-stow@0.1.5.patch",
|
|
774
|
-
"brittle@4.1.0": "patches/brittle@4.1.0.patch",
|
|
775
774
|
"@qvac/inference@0.20.0": "patches/@qvac%2Finference@0.20.0.patch"
|
|
776
775
|
},
|
|
777
776
|
"repository": {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
// bare-stow entry:
|
|
2
|
-
// argv (empty = absent): [2] skillsDir, [3] SDK storage JSON (required: the fs deny list fences it), [4] embedding config JSON,
|
|
3
|
-
// [5] imageModel JSON, [6] imageClamps JSON,
|
|
4
|
-
// [7] '1' to enable harness logging (written to `harness.log`, beside assistant.log),
|
|
5
|
-
// [8] llm config JSON (llmDevice/llmGpuLayers/contextSize/kvCacheK/kvCacheV/completionModelCap),
|
|
6
|
-
// [9] musicModel JSON, [10] musicClamps JSON, [11] vendored python wheels dir,
|
|
7
|
-
// [12] host-supplied GPU stats JSON.
|
|
1
|
+
// bare-stow entry: argv slots are the ones spawnHarness forwards in lib/spawn.ts; empty is absent
|
|
8
2
|
import '../dist-lib/lib/hardware/gpu-probe-entry.js'
|
|
9
3
|
import FileLog from 'bare-file-logger'
|
|
10
4
|
import fs from 'fs'
|
|
@@ -41,10 +35,7 @@ const SCOPE = '[harness]'
|
|
|
41
35
|
// when the file will not open, everything still has somewhere to go that is not the pipe
|
|
42
36
|
const DISCARD = { info() {}, debug() {}, warn() {}, error() {} }
|
|
43
37
|
|
|
44
|
-
//
|
|
45
|
-
// Bare thread with it: the event loop stops, nothing raises, and a download never produces
|
|
46
|
-
// a byte. Elsewhere the same write only queues in memory (measured), which is why it only
|
|
47
|
-
// showed up there. Every line goes to a file instead, via the FileLog the assistant uses.
|
|
38
|
+
// on Windows unread stdout past the OS buffer silently halts the Bare thread, so log to a file
|
|
48
39
|
function openHarnessLog(path) {
|
|
49
40
|
try {
|
|
50
41
|
fs.mkdirSync(dirname(path), { recursive: true })
|
|
@@ -54,8 +45,7 @@ function openHarnessLog(path) {
|
|
|
54
45
|
}
|
|
55
46
|
}
|
|
56
47
|
|
|
57
|
-
//
|
|
58
|
-
// chatty dependency must not be able to wedge this process.
|
|
48
|
+
// ungated by the log flag: the SDK and addons log via console, and chatter must not wedge us
|
|
59
49
|
function captureConsole(log) {
|
|
60
50
|
console.log = console.info = (...args) => log.info(SCOPE, ...args)
|
|
61
51
|
console.debug = (...args) => log.debug(SCOPE, ...args)
|
|
@@ -73,17 +63,16 @@ async function alignSdkConsoleWithHost(hostWantsLogs) {
|
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
|
|
66
|
+
// lunte-disable-next-line qvac/no-default-export -- the stow entry calls this module's default
|
|
76
67
|
export default async function start(ipc, ready) {
|
|
77
68
|
let harness
|
|
78
69
|
let dying = false
|
|
79
|
-
// close() cancels in-flight SDK
|
|
80
|
-
// parked behind a multi-GB load; a wedged native call still ends at the host's
|
|
81
|
-
// kill deadline (bare-supervisor/stow reap)
|
|
70
|
+
// close() cancels in-flight SDK loads so exit is not parked; the host's kill deadline backstops
|
|
82
71
|
const die = () => {
|
|
83
72
|
if (dying) return
|
|
84
73
|
dying = true
|
|
85
74
|
Promise.resolve(harness?.close())
|
|
86
|
-
.catch(
|
|
75
|
+
.catch(noop)
|
|
87
76
|
.then(() => Bare.exit(0))
|
|
88
77
|
}
|
|
89
78
|
Bare.IPC.on('end', die).on('close', die)
|
|
@@ -92,9 +81,7 @@ export default async function start(ipc, ready) {
|
|
|
92
81
|
const deniedRoots = deniedRootsFor(sdkStorage.home)
|
|
93
82
|
const hostWantsLogs = Bare.argv[7] === '1'
|
|
94
83
|
setHarnessLog(hostWantsLogs)
|
|
95
|
-
// before the first await
|
|
96
|
-
// the storage root, which is where the host writes assistant.log — harness.log
|
|
97
|
-
// belongs next to it.
|
|
84
|
+
// before the first await so nothing logs ahead of the sink; the host writes assistant.log beside it
|
|
98
85
|
const log = openHarnessLog(join(dirname(sdkStorage.home), 'harness.log')) ?? DISCARD
|
|
99
86
|
setHarnessLogSink((line) => log.info(SCOPE, line))
|
|
100
87
|
captureConsole(log)
|
|
@@ -109,7 +96,9 @@ export default async function start(ipc, ready) {
|
|
|
109
96
|
const musicClamps = Bare.argv[10] ? JSON.parse(Bare.argv[10]) : undefined
|
|
110
97
|
const gpuStats = Bare.argv[12] ? JSON.parse(Bare.argv[12]) : undefined
|
|
111
98
|
// Only the host knows where the shipped wheels landed.
|
|
112
|
-
if (Bare.argv[11])
|
|
99
|
+
if (Bare.argv[11]) {
|
|
100
|
+
process.env.QVAC_PYTHON_WHEELS_DIR = Bare.argv[11]
|
|
101
|
+
}
|
|
113
102
|
|
|
114
103
|
configureSdkStorage(sdkStorage)
|
|
115
104
|
process.env.QVAC_PYODIDE_CACHE_DIR = `${sdkStorage.home}/pyodide-cache`
|
|
@@ -148,18 +137,21 @@ export default async function start(ipc, ready) {
|
|
|
148
137
|
if (skillCatalog) {
|
|
149
138
|
tools.push(...compileOperationTools(skillCatalog, { httpRequestTool, mcpCallTool }))
|
|
150
139
|
}
|
|
140
|
+
|
|
151
141
|
if (skillsDir) {
|
|
152
142
|
tools.push(
|
|
153
143
|
createSkillTool({
|
|
154
144
|
skillsDir,
|
|
155
|
-
|
|
145
|
+
credentialStore: credentialed?.credentialStore
|
|
156
146
|
})
|
|
157
147
|
)
|
|
158
148
|
}
|
|
149
|
+
|
|
159
150
|
harness = new Harness({
|
|
160
151
|
gpuStats,
|
|
161
152
|
tools,
|
|
162
153
|
skillsDir,
|
|
154
|
+
modelsDir: sdkStorage.models,
|
|
163
155
|
imageModel,
|
|
164
156
|
imageClamps,
|
|
165
157
|
musicModel,
|
|
@@ -179,3 +171,5 @@ export default async function start(ipc, ready) {
|
|
|
179
171
|
|
|
180
172
|
return () => {}
|
|
181
173
|
}
|
|
174
|
+
|
|
175
|
+
function noop() {}
|
package/worker/stow-entry.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* global Bare */
|
|
2
|
-
// bare-stow's generated
|
|
3
|
-
// sidecar can be spawned without stowing one.
|
|
2
|
+
// bare-stow's generated shim (lib/shim.js) as a plain file, so the sidecar spawns unstowed
|
|
4
3
|
import '../dist-lib/lib/hardware/gpu-probe-entry.js'
|
|
5
4
|
import protocol from 'bare-stow/protocol'
|
|
6
5
|
|
|
@@ -22,12 +21,16 @@ async function shutdown(code, err = null) {
|
|
|
22
21
|
exited = true
|
|
23
22
|
|
|
24
23
|
try {
|
|
25
|
-
if (stop)
|
|
24
|
+
if (stop) {
|
|
25
|
+
await stop()
|
|
26
|
+
}
|
|
26
27
|
} catch (e) {
|
|
27
28
|
err = err || e
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
if (err)
|
|
31
|
+
if (err) {
|
|
32
|
+
ipc.send('error', { message: err.message, stack: err.stack })
|
|
33
|
+
}
|
|
31
34
|
|
|
32
35
|
await ipc.send('exit', { code })
|
|
33
36
|
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
-
import type { ToolExecuteContext } from '../../capabilities/completion.ts';
|
|
3
|
-
import { type FetchInit } from '../http-request/utils.ts';
|
|
4
|
-
export declare const MCP_PROTOCOL_VERSION = "2025-03-26";
|
|
5
|
-
export declare const TIMEOUT_MS = 30000;
|
|
6
|
-
export type McpFetchFn = (url: URL, init: FetchInit) => Promise<{
|
|
7
|
-
status: number;
|
|
8
|
-
statusText?: string;
|
|
9
|
-
headers: {
|
|
10
|
-
get(name: string): string | null;
|
|
11
|
-
};
|
|
12
|
-
text(): Promise<string> | string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function isNotification(method: string): boolean;
|
|
15
|
-
export declare function isMetadataMethod(method: unknown): boolean;
|
|
16
|
-
export declare function normalizeMethod(method: string, params: Record<string, unknown> | undefined): {
|
|
17
|
-
method: string;
|
|
18
|
-
params: Record<string, unknown> | undefined;
|
|
19
|
-
};
|
|
20
|
-
export declare function flattenMcpResponse(body: string): {
|
|
21
|
-
error: string;
|
|
22
|
-
} | {
|
|
23
|
-
body: string;
|
|
24
|
-
};
|
|
25
|
-
export declare function sessionKey(url: string, ctx: ToolExecuteContext | undefined, credentialKey?: string): string;
|
|
26
|
-
export declare function getSession(key: string): string;
|
|
27
|
-
export declare function deleteSession(key: string): void;
|
|
28
|
-
export declare function cacheSession(key: string, sessionId: string): void;
|
|
29
|
-
export declare function post(fetch: McpFetchFn, url: URL, method: string, params: Record<string, unknown> | undefined, authHeader: string | null, sessionId: string | undefined, signal: BareAbortSignal): Promise<{
|
|
30
|
-
status: number;
|
|
31
|
-
statusText?: string;
|
|
32
|
-
headers: {
|
|
33
|
-
get(name: string): string | null;
|
|
34
|
-
};
|
|
35
|
-
text(): Promise<string> | string;
|
|
36
|
-
}>;
|
|
37
|
-
export declare function readBody(response: {
|
|
38
|
-
text(): Promise<string> | string;
|
|
39
|
-
headers: {
|
|
40
|
-
get(name: string): string | null;
|
|
41
|
-
};
|
|
42
|
-
}): Promise<string>;
|
|
43
|
-
export declare function needsSession(status: number, cached: string): boolean;
|
|
44
|
-
export declare function establishSession(fetch: McpFetchFn, url: URL, authHeader: string | null, signal: BareAbortSignal): Promise<string | {
|
|
45
|
-
error: string;
|
|
46
|
-
stateless?: true;
|
|
47
|
-
}>;
|
|
File without changes
|