@try-works/dsh-tool-mode 0.0.0-stage → 0.5.44
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/README.md +299 -2
- package/bin/dsh-tool-mode-credentials.mjs +20 -0
- package/bin/dsh-tool-mode-mcp-stdio.mjs +80 -0
- package/bin/dsh-tool-mode.mjs +211 -0
- package/builtins.lock.json +26 -0
- package/catalog/desert-ant-models.json +693 -0
- package/catalog/playbooks.json +531 -0
- package/client/client.model-tools.js +1910 -0
- package/client/index.js +4039 -0
- package/cordis.patch.yml +39 -0
- package/lib/adapters/index.d.ts +61 -0
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/index.js +82 -0
- package/lib/adapters/types.d.ts +106 -0
- package/lib/adapters/types.d.ts.map +1 -0
- package/lib/adapters/types.js +85 -0
- package/lib/approval.d.ts +189 -0
- package/lib/approval.d.ts.map +1 -0
- package/lib/approval.js +510 -0
- package/lib/asset-acquisition.d.ts +149 -0
- package/lib/asset-acquisition.d.ts.map +1 -0
- package/lib/asset-acquisition.js +175 -0
- package/lib/authority.d.ts +185 -0
- package/lib/authority.d.ts.map +1 -0
- package/lib/authority.js +223 -0
- package/lib/bindings.d.ts +144 -0
- package/lib/bindings.d.ts.map +1 -0
- package/lib/bindings.js +314 -0
- package/lib/builtins.d.ts +27 -0
- package/lib/builtins.d.ts.map +1 -0
- package/lib/builtins.js +37 -0
- package/lib/capability.d.ts +58 -0
- package/lib/capability.d.ts.map +1 -0
- package/lib/capability.js +192 -0
- package/lib/capture-path.d.ts +97 -0
- package/lib/capture-path.d.ts.map +1 -0
- package/lib/capture-path.js +152 -0
- package/lib/catalog.d.ts +37 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/catalog.js +274 -0
- package/lib/contract-payload.d.ts +39 -0
- package/lib/contract-payload.d.ts.map +1 -0
- package/lib/contract-payload.js +56 -0
- package/lib/custom-tools/compile.d.ts +25 -0
- package/lib/custom-tools/compile.d.ts.map +1 -0
- package/lib/custom-tools/compile.js +61 -0
- package/lib/custom-tools/composite-executor.d.ts +42 -0
- package/lib/custom-tools/composite-executor.d.ts.map +1 -0
- package/lib/custom-tools/composite-executor.js +113 -0
- package/lib/custom-tools/dispatch.d.ts +28 -0
- package/lib/custom-tools/dispatch.d.ts.map +1 -0
- package/lib/custom-tools/dispatch.js +34 -0
- package/lib/custom-tools/http-executor.d.ts +48 -0
- package/lib/custom-tools/http-executor.d.ts.map +1 -0
- package/lib/custom-tools/http-executor.js +241 -0
- package/lib/custom-tools/index.d.ts +12 -0
- package/lib/custom-tools/index.d.ts.map +1 -0
- package/lib/custom-tools/index.js +12 -0
- package/lib/custom-tools/mcp-surface.d.ts +14 -0
- package/lib/custom-tools/mcp-surface.d.ts.map +1 -0
- package/lib/custom-tools/mcp-surface.js +41 -0
- package/lib/custom-tools/prompt-executor.d.ts +39 -0
- package/lib/custom-tools/prompt-executor.d.ts.map +1 -0
- package/lib/custom-tools/prompt-executor.js +59 -0
- package/lib/custom-tools/registry.d.ts +69 -0
- package/lib/custom-tools/registry.d.ts.map +1 -0
- package/lib/custom-tools/registry.js +130 -0
- package/lib/custom-tools/schema.d.ts +26 -0
- package/lib/custom-tools/schema.d.ts.map +1 -0
- package/lib/custom-tools/schema.js +375 -0
- package/lib/custom-tools/service.d.ts +90 -0
- package/lib/custom-tools/service.d.ts.map +1 -0
- package/lib/custom-tools/service.js +203 -0
- package/lib/custom-tools/store.d.ts +61 -0
- package/lib/custom-tools/store.d.ts.map +1 -0
- package/lib/custom-tools/store.js +240 -0
- package/lib/custom-tools/types.d.ts +131 -0
- package/lib/custom-tools/types.d.ts.map +1 -0
- package/lib/custom-tools/types.js +11 -0
- package/lib/decision-combine.d.ts +113 -0
- package/lib/decision-combine.d.ts.map +1 -0
- package/lib/decision-combine.js +156 -0
- package/lib/decision-evaluate.d.ts +185 -0
- package/lib/decision-evaluate.d.ts.map +1 -0
- package/lib/decision-evaluate.js +227 -0
- package/lib/deployment-coordinator.d.ts +213 -0
- package/lib/deployment-coordinator.d.ts.map +1 -0
- package/lib/deployment-coordinator.js +274 -0
- package/lib/diagnostics.d.ts +169 -0
- package/lib/diagnostics.d.ts.map +1 -0
- package/lib/diagnostics.js +136 -0
- package/lib/discovery-contracts.d.ts +14 -0
- package/lib/discovery-contracts.d.ts.map +1 -0
- package/lib/discovery-contracts.js +90 -0
- package/lib/discovery-describe.d.ts +35 -0
- package/lib/discovery-describe.d.ts.map +1 -0
- package/lib/discovery-describe.js +99 -0
- package/lib/embedding-index.d.ts +55 -0
- package/lib/embedding-index.d.ts.map +1 -0
- package/lib/embedding-index.js +126 -0
- package/lib/extension-dependencies.d.ts +355 -0
- package/lib/extension-dependencies.d.ts.map +1 -0
- package/lib/extension-dependencies.js +987 -0
- package/lib/extension-dispatch.d.ts +150 -0
- package/lib/extension-dispatch.d.ts.map +1 -0
- package/lib/extension-dispatch.js +178 -0
- package/lib/extension-page-state.d.ts +69 -0
- package/lib/extension-page-state.d.ts.map +1 -0
- package/lib/extension-page-state.js +82 -0
- package/lib/extension-registrar.d.ts +116 -0
- package/lib/extension-registrar.d.ts.map +1 -0
- package/lib/extension-registrar.js +144 -0
- package/lib/extensions-api.d.ts +346 -0
- package/lib/extensions-api.d.ts.map +1 -0
- package/lib/extensions-api.js +17 -0
- package/lib/extensions-remote.d.ts +57 -0
- package/lib/extensions-remote.d.ts.map +1 -0
- package/lib/extensions-remote.js +69 -0
- package/lib/extensions-service.d.ts +568 -0
- package/lib/extensions-service.d.ts.map +1 -0
- package/lib/extensions-service.js +2507 -0
- package/lib/harness-budgets.d.ts +158 -0
- package/lib/harness-budgets.d.ts.map +1 -0
- package/lib/harness-budgets.js +152 -0
- package/lib/harness-llm.d.ts +138 -0
- package/lib/harness-llm.d.ts.map +1 -0
- package/lib/harness-llm.js +218 -0
- package/lib/harness-serving.d.ts +115 -0
- package/lib/harness-serving.d.ts.map +1 -0
- package/lib/harness-serving.js +176 -0
- package/lib/headless.d.ts +97 -0
- package/lib/headless.d.ts.map +1 -0
- package/lib/headless.js +407 -0
- package/lib/http-acquisition.d.ts +27 -0
- package/lib/http-acquisition.d.ts.map +1 -0
- package/lib/http-acquisition.js +140 -0
- package/lib/index.d.ts +546 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5197 -0
- package/lib/invocation-accounting.d.ts +169 -0
- package/lib/invocation-accounting.d.ts.map +1 -0
- package/lib/invocation-accounting.js +148 -0
- package/lib/jev.d.ts +218 -0
- package/lib/jev.d.ts.map +1 -0
- package/lib/jev.js +366 -0
- package/lib/legacy-migration.d.ts +95 -0
- package/lib/legacy-migration.d.ts.map +1 -0
- package/lib/legacy-migration.js +429 -0
- package/lib/license-basis.d.ts +29 -0
- package/lib/license-basis.d.ts.map +1 -0
- package/lib/license-basis.js +58 -0
- package/lib/managed-workers.d.ts +158 -0
- package/lib/managed-workers.d.ts.map +1 -0
- package/lib/managed-workers.js +269 -0
- package/lib/mcp/auth-selection.d.ts +35 -0
- package/lib/mcp/auth-selection.d.ts.map +1 -0
- package/lib/mcp/auth-selection.js +64 -0
- package/lib/mcp/client-grant.d.ts +89 -0
- package/lib/mcp/client-grant.d.ts.map +1 -0
- package/lib/mcp/client-grant.js +63 -0
- package/lib/mcp/credential-cli.d.ts +38 -0
- package/lib/mcp/credential-cli.d.ts.map +1 -0
- package/lib/mcp/credential-cli.js +148 -0
- package/lib/mcp/credential-store.d.ts +143 -0
- package/lib/mcp/credential-store.d.ts.map +1 -0
- package/lib/mcp/credential-store.js +461 -0
- package/lib/mcp/export-policy.d.ts +25 -0
- package/lib/mcp/export-policy.d.ts.map +1 -0
- package/lib/mcp/export-policy.js +31 -0
- package/lib/mcp/host-binding.d.ts +144 -0
- package/lib/mcp/host-binding.d.ts.map +1 -0
- package/lib/mcp/host-binding.js +280 -0
- package/lib/mcp/http.d.ts +180 -0
- package/lib/mcp/http.d.ts.map +1 -0
- package/lib/mcp/http.js +602 -0
- package/lib/mcp/oauth.d.ts +149 -0
- package/lib/mcp/oauth.d.ts.map +1 -0
- package/lib/mcp/oauth.js +396 -0
- package/lib/mcp/protocol.d.ts +329 -0
- package/lib/mcp/protocol.d.ts.map +1 -0
- package/lib/mcp/protocol.js +459 -0
- package/lib/mcp/rate-limit.d.ts +68 -0
- package/lib/mcp/rate-limit.d.ts.map +1 -0
- package/lib/mcp/rate-limit.js +114 -0
- package/lib/mcp/sdk-v2.d.ts +17 -0
- package/lib/mcp/sdk-v2.d.ts.map +1 -0
- package/lib/mcp/sdk-v2.js +204 -0
- package/lib/mcp/server.d.ts +149 -0
- package/lib/mcp/server.d.ts.map +1 -0
- package/lib/mcp/server.js +302 -0
- package/lib/mcp/stdio.d.ts +80 -0
- package/lib/mcp/stdio.d.ts.map +1 -0
- package/lib/mcp/stdio.js +184 -0
- package/lib/mcp/subscriptions.d.ts +177 -0
- package/lib/mcp/subscriptions.d.ts.map +1 -0
- package/lib/mcp/subscriptions.js +288 -0
- package/lib/mcp-status.d.ts +96 -0
- package/lib/mcp-status.d.ts.map +1 -0
- package/lib/mcp-status.js +70 -0
- package/lib/mcp-usage.d.ts +110 -0
- package/lib/mcp-usage.d.ts.map +1 -0
- package/lib/mcp-usage.js +189 -0
- package/lib/model-qualification.d.ts +192 -0
- package/lib/model-qualification.d.ts.map +1 -0
- package/lib/model-qualification.js +178 -0
- package/lib/planning.d.ts +256 -0
- package/lib/planning.d.ts.map +1 -0
- package/lib/planning.js +471 -0
- package/lib/playbook.d.ts +42 -0
- package/lib/playbook.d.ts.map +1 -0
- package/lib/playbook.js +65 -0
- package/lib/prepared-assets.d.ts +269 -0
- package/lib/prepared-assets.d.ts.map +1 -0
- package/lib/prepared-assets.js +471 -0
- package/lib/provider-bridge.d.ts +107 -0
- package/lib/provider-bridge.d.ts.map +1 -0
- package/lib/provider-bridge.js +423 -0
- package/lib/ptc-authority.d.ts +154 -0
- package/lib/ptc-authority.d.ts.map +1 -0
- package/lib/ptc-authority.js +242 -0
- package/lib/ptc-confinement.d.ts +60 -0
- package/lib/ptc-confinement.d.ts.map +1 -0
- package/lib/ptc-confinement.js +212 -0
- package/lib/ptc-runtime.d.ts +166 -0
- package/lib/ptc-runtime.d.ts.map +1 -0
- package/lib/ptc-runtime.js +231 -0
- package/lib/publication.d.ts +161 -0
- package/lib/publication.d.ts.map +1 -0
- package/lib/publication.js +181 -0
- package/lib/receipt-store.d.ts +57 -0
- package/lib/receipt-store.d.ts.map +1 -0
- package/lib/receipt-store.js +143 -0
- package/lib/receipt.d.ts +231 -0
- package/lib/receipt.d.ts.map +1 -0
- package/lib/receipt.js +165 -0
- package/lib/registrar.d.ts +75 -0
- package/lib/registrar.d.ts.map +1 -0
- package/lib/registrar.js +152 -0
- package/lib/resource-governance.d.ts +204 -0
- package/lib/resource-governance.d.ts.map +1 -0
- package/lib/resource-governance.js +213 -0
- package/lib/server-lifecycle.d.ts +175 -0
- package/lib/server-lifecycle.d.ts.map +1 -0
- package/lib/server-lifecycle.js +269 -0
- package/lib/skills.d.ts +31 -0
- package/lib/skills.d.ts.map +1 -0
- package/lib/skills.js +170 -0
- package/lib/speech-bridge.d.ts +74 -0
- package/lib/speech-bridge.d.ts.map +1 -0
- package/lib/speech-bridge.js +115 -0
- package/lib/state.d.ts +100 -0
- package/lib/state.d.ts.map +1 -0
- package/lib/state.js +160 -0
- package/lib/title-proposal.d.ts +194 -0
- package/lib/title-proposal.d.ts.map +1 -0
- package/lib/title-proposal.js +244 -0
- package/lib/tool-inventory.d.ts +90 -0
- package/lib/tool-inventory.d.ts.map +1 -0
- package/lib/tool-inventory.js +102 -0
- package/lib/tool-mode-run.d.ts +310 -0
- package/lib/tool-mode-run.d.ts.map +1 -0
- package/lib/tool-mode-run.js +411 -0
- package/lib/tool-sources.d.ts +80 -0
- package/lib/tool-sources.d.ts.map +1 -0
- package/lib/tool-sources.js +123 -0
- package/lib/tool-usage-projection.d.ts +390 -0
- package/lib/tool-usage-projection.d.ts.map +1 -0
- package/lib/tool-usage-projection.js +1038 -0
- package/lib/tool-usage-report.d.ts +153 -0
- package/lib/tool-usage-report.d.ts.map +1 -0
- package/lib/tool-usage-report.js +274 -0
- package/lib/transport.d.ts +158 -0
- package/lib/transport.d.ts.map +1 -0
- package/lib/transport.js +332 -0
- package/lib/types.d.ts +134 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +8 -0
- package/lib/update-surface.d.ts +79 -0
- package/lib/update-surface.d.ts.map +1 -0
- package/lib/update-surface.js +224 -0
- package/lib/version.d.ts +3 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +27 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contract-metadata.d.ts +13 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contract-metadata.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contract-metadata.js +85 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/lang-detect.d.ts +16 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/lang-detect.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/lang-detect.js +87 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts +38 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.js +445 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/stt-transcribe.d.ts +20 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/stt-transcribe.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/stt-transcribe.js +112 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts +14 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.js +63 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts +14 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.js +76 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/dsh.d.ts +82 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/dsh.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/dsh.js +274 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts +26 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/index.js +53 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/meta.d.ts +133 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/meta.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/meta.js +64 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts +121 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.js +246 -0
- package/node_modules/@try-works/tool-mode-contracts/package.json +35 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/bin/dsh-tool-mode.mjs +20 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts +80 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.js +533 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts +86 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.js +145 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts +70 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.js +201 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts +57 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.js +83 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts +33 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.js +33 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts +86 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.js +191 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts +137 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.js +349 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts +274 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.js +932 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts +210 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.js +368 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts +63 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.js +149 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts +35 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.js +179 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts +179 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.js +299 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts +395 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.js +839 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts +44 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.js +255 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts +185 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.js +504 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts +17 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.js +80 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/licensing.d.ts +221 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/licensing.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/licensing.js +188 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts +52 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.js +102 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts +171 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.js +271 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts +242 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.js +58 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts +128 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.js +113 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/test-host.d.ts +41 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/test-host.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/test-host.js +52 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts +2 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.js +351 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts +157 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.js +688 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/package.json +54 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/schema/extension-manifest-1.1.0.schema.json +253 -0
- package/node_modules/@try-works/tool-mode-recipes/bin/tool-mode-recipe.mjs +15 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts +460 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/broker.js +647 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts +61 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/cli.js +1106 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts +237 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.js +205 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts +85 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.js +176 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts +119 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/images.js +201 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts +25 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/index.js +25 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts +345 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.js +1465 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts +51 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/templates.js +310 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts +231 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts.map +1 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/titles.js +435 -0
- package/node_modules/@try-works/tool-mode-recipes/package.json +56 -0
- package/node_modules/@try-works/tool-mode-recipes/recipes/describe-image.json +38 -0
- package/node_modules/@try-works/tool-mode-recipes/recipes/text-title.json +45 -0
- package/node_modules/@try-works/tool-mode-recipes/schema/harness-model-recipe.schema.json +273 -0
- package/package.json +127 -4
- package/remote/spec.mjs +993 -0
- package/remote/typert.host.mjs +14 -0
- package/remote/typert.remote-client.mjs +16 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP 2026-07-28 wire core.
|
|
3
|
+
*
|
|
4
|
+
* The published `@modelcontextprotocol/sdk` (1.32.1) declares
|
|
5
|
+
* `LATEST_PROTOCOL_VERSION = 2025-11-25` and does not list `2026-07-28` among its
|
|
6
|
+
* supported revisions, so this is the "separately reviewed, schema-conformant
|
|
7
|
+
* adaptation" MCP-01 permits where SDK support is incomplete. It is written
|
|
8
|
+
* against the revision's own requirements rather than by changing a version string
|
|
9
|
+
* on legacy behaviour, which MCP-01 explicitly says does not satisfy the
|
|
10
|
+
* requirement.
|
|
11
|
+
*
|
|
12
|
+
* What makes this revision different, and what this module exists to enforce:
|
|
13
|
+
*
|
|
14
|
+
* - **No handshake.** `tools/list` and `tools/call` must work as the FIRST
|
|
15
|
+
* application request. There is no `initialize`, no
|
|
16
|
+
* `notifications/initialized`, no prior discovery call and no `Mcp-Session-Id`
|
|
17
|
+
* (P26-01). So there is no session state here to get wrong.
|
|
18
|
+
* - **Per-request metadata.** Version and capabilities travel in `params._meta` on
|
|
19
|
+
* EVERY request, and are never inferred from an earlier one (P26-02). That is
|
|
20
|
+
* why `_meta` is parsed per request and not cached.
|
|
21
|
+
* - **Server identity in results.** Every result envelope carries `resultType`,
|
|
22
|
+
* and the revision's guidance puts `serverInfo` in result metadata.
|
|
23
|
+
* - **Errors stay in their lanes** (P26-04): a malformed protocol request is a
|
|
24
|
+
* JSON-RPC error, while an application tool failure is a tool-error RESULT. A
|
|
25
|
+
* failure wrapped as a successful payload is the specific mistake this prevents.
|
|
26
|
+
*
|
|
27
|
+
* @module @try-works/dsh-tool-mode/mcp/protocol
|
|
28
|
+
*/
|
|
29
|
+
/** The revision this server speaks. */
|
|
30
|
+
export declare const PROTOCOL_VERSION = "2026-07-28";
|
|
31
|
+
/**
|
|
32
|
+
* Revisions this server can also serve.
|
|
33
|
+
*
|
|
34
|
+
* Kept explicit and short. P26-03 requires an unsupported version to be answered
|
|
35
|
+
* with the supported list, so the list must be a fact rather than a guess.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
38
|
+
/** The `_meta` keys the revision defines. */
|
|
39
|
+
export declare const META_KEYS: {
|
|
40
|
+
readonly protocolVersion: "io.modelcontextprotocol/protocolVersion";
|
|
41
|
+
readonly clientInfo: "io.modelcontextprotocol/clientInfo";
|
|
42
|
+
readonly clientCapabilities: "io.modelcontextprotocol/clientCapabilities";
|
|
43
|
+
readonly serverInfo: "io.modelcontextprotocol/serverInfo";
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Error codes.
|
|
47
|
+
*
|
|
48
|
+
* The reserved range belongs to the protocol. P26-03 is explicit that custom
|
|
49
|
+
* errors must not be allocated there, and the pinned revision partitions the
|
|
50
|
+
* bands: `-32768..-32000` is JSON-RPC's own predefined-error allocation,
|
|
51
|
+
* `-32020..-32099` is reserved for MCP-defined codes (allocated sequentially,
|
|
52
|
+
* and this module declares exactly those the revision defines), while
|
|
53
|
+
* `-32000..-32019` is the IMPLEMENTATION-DEFINED sub-range — the specification
|
|
54
|
+
* will never define codes there, and receivers must not assume cross-
|
|
55
|
+
* implementation semantics. `rateLimited` lives in that sub-range deliberately:
|
|
56
|
+
* it is a documented implementation allocation, never a minted code in the
|
|
57
|
+
* reserved band.
|
|
58
|
+
*/
|
|
59
|
+
export declare const ERROR_CODES: {
|
|
60
|
+
/** Standard JSON-RPC. */
|
|
61
|
+
readonly parseError: -32700;
|
|
62
|
+
readonly invalidRequest: -32600;
|
|
63
|
+
readonly methodNotFound: -32601;
|
|
64
|
+
readonly invalidParams: -32602;
|
|
65
|
+
readonly internalError: -32603;
|
|
66
|
+
/** MCP-reserved. */
|
|
67
|
+
readonly headerMismatch: -32020;
|
|
68
|
+
readonly unsupportedClientCapability: -32021;
|
|
69
|
+
readonly unsupportedProtocolVersion: -32022;
|
|
70
|
+
/**
|
|
71
|
+
* Implementation-defined (-32000..-32019, never allocated by the specification).
|
|
72
|
+
*
|
|
73
|
+
* The revision defines NO rate-limit error, so a refusal uses this documented
|
|
74
|
+
* implementation code rather than pretending the request was invalid (-32600) or
|
|
75
|
+
* minting a code in the MCP-reserved band. The HTTP 429 status carries the
|
|
76
|
+
* semantics; receivers that do not know this code still get a conformant
|
|
77
|
+
* `JSONRPCErrorResponse` envelope and a `Retry-After` header.
|
|
78
|
+
*/
|
|
79
|
+
readonly rateLimited: -32001;
|
|
80
|
+
};
|
|
81
|
+
/** The convention for a tool that ran and returned a domain failure (P26-04). */
|
|
82
|
+
export interface ToolErrorPayload {
|
|
83
|
+
/** Always true: an application failure, not a protocol failure. */
|
|
84
|
+
readonly isError: true;
|
|
85
|
+
/** A bounded, model-readable explanation. */
|
|
86
|
+
readonly content: readonly {
|
|
87
|
+
readonly type: 'text';
|
|
88
|
+
readonly text: string;
|
|
89
|
+
}[];
|
|
90
|
+
}
|
|
91
|
+
/** A JSON-RPC request as this server receives it. */
|
|
92
|
+
export interface WireRequest {
|
|
93
|
+
readonly jsonrpc: '2.0';
|
|
94
|
+
readonly id?: string | number | null;
|
|
95
|
+
readonly method: string;
|
|
96
|
+
readonly params?: Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/** Per-request metadata, parsed fresh on every request (P26-02). */
|
|
99
|
+
export interface RequestMetadata {
|
|
100
|
+
readonly protocolVersion: string;
|
|
101
|
+
readonly clientInfo: {
|
|
102
|
+
readonly name: string;
|
|
103
|
+
readonly version: string;
|
|
104
|
+
};
|
|
105
|
+
readonly clientCapabilities: Readonly<Record<string, unknown>>;
|
|
106
|
+
}
|
|
107
|
+
/** Raised for a request that must be answered with a JSON-RPC error. */
|
|
108
|
+
export declare class WireError extends Error {
|
|
109
|
+
readonly name = "WireError";
|
|
110
|
+
readonly code: number;
|
|
111
|
+
/** Structured detail, as the revision's schema defines for the code. */
|
|
112
|
+
readonly data?: Record<string, unknown>;
|
|
113
|
+
constructor(code: number, message: string, data?: Record<string, unknown>);
|
|
114
|
+
}
|
|
115
|
+
/** Whether a numeric code lies in the range reserved for the protocol. */
|
|
116
|
+
export declare function isReservedErrorCode(code: number): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Parse `params._meta` from a request (P26-02).
|
|
119
|
+
*
|
|
120
|
+
* Missing required metadata is `invalid params`, not a defaulted value: inferring
|
|
121
|
+
* a version or a capability from a preceding request is exactly what P26-02
|
|
122
|
+
* forbids, and defaulting is inference with extra steps.
|
|
123
|
+
*
|
|
124
|
+
* The REQUIRED set is taken from the pinned revision schema's `RequestMetaObject`,
|
|
125
|
+
* which requires `clientCapabilities` and `protocolVersion` — and NOT `clientInfo`.
|
|
126
|
+
* Requiring `clientInfo` here would reject a request the schema admits, which is a
|
|
127
|
+
* conformance failure in the opposite direction from accepting too much.
|
|
128
|
+
*
|
|
129
|
+
* @param params - the request parameters.
|
|
130
|
+
* @returns the parsed metadata.
|
|
131
|
+
* @throws WireError `-32602` when a required key is absent or malformed.
|
|
132
|
+
*/
|
|
133
|
+
export declare function parseRequestMetadata(params: Record<string, unknown> | undefined): RequestMetadata;
|
|
134
|
+
/**
|
|
135
|
+
* Negotiate the protocol version for one request (P26-03).
|
|
136
|
+
*
|
|
137
|
+
* @param metadata - the request metadata.
|
|
138
|
+
* @returns the negotiated version.
|
|
139
|
+
* @throws WireError `-32022` carrying the official `supported` and `requested` data.
|
|
140
|
+
*/
|
|
141
|
+
export declare function negotiateVersion(metadata: RequestMetadata): string;
|
|
142
|
+
/** A feature this server advertises, and whether it is implemented. */
|
|
143
|
+
export interface FeatureDeclaration {
|
|
144
|
+
readonly feature: string;
|
|
145
|
+
readonly implemented: boolean;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The advertised-feature matrix (P26-12).
|
|
149
|
+
*
|
|
150
|
+
* P26-12 forbids advertising Tasks, sampling, resource subscriptions, prompts or
|
|
151
|
+
* UI extensions merely because an SDK exports their types. Declaring the matrix as
|
|
152
|
+
* data — with `implemented: false` where that is the truth — means the server
|
|
153
|
+
* cannot advertise a feature it does not have by accident.
|
|
154
|
+
*/
|
|
155
|
+
export declare const ADVERTISED_FEATURES: readonly FeatureDeclaration[];
|
|
156
|
+
/**
|
|
157
|
+
* What the server may advertise, given what is ACTUALLY WIRED (P26-12).
|
|
158
|
+
*
|
|
159
|
+
* The static matrix declared `subscriptions/listen` as implemented unconditionally — while
|
|
160
|
+
* the only production transport never received a registry and therefore answered `-32601`
|
|
161
|
+
* for it. An advertised feature that no client can obtain is worse than an absent one: a
|
|
162
|
+
* client plans around it and fails later.
|
|
163
|
+
*
|
|
164
|
+
* The feature is now conditional on the wiring, and the DEFAULT is `false` because that is
|
|
165
|
+
* the production reality. A caller that has genuinely composed a subscription registry says
|
|
166
|
+
* so; nothing else can make the claim true by declaring it.
|
|
167
|
+
*
|
|
168
|
+
* @param wiring - which optional surfaces are composed.
|
|
169
|
+
* @returns the advertised-feature matrix for this deployment.
|
|
170
|
+
*/
|
|
171
|
+
export declare function advertisedFeatures(wiring?: {
|
|
172
|
+
readonly subscriptions?: boolean;
|
|
173
|
+
}): readonly FeatureDeclaration[];
|
|
174
|
+
/**
|
|
175
|
+
* The capabilities object this server may advertise.
|
|
176
|
+
*
|
|
177
|
+
* Derived from the matrix rather than written twice, so the two cannot disagree.
|
|
178
|
+
* @param wiring - which optional surfaces are composed.
|
|
179
|
+
* @returns the capability names that are genuinely implemented HERE.
|
|
180
|
+
*/
|
|
181
|
+
export declare function implementedCapabilities(wiring?: {
|
|
182
|
+
readonly subscriptions?: boolean;
|
|
183
|
+
}): string[];
|
|
184
|
+
/**
|
|
185
|
+
* Whether a client's REQUIRED capability is one this server supports (P26-03).
|
|
186
|
+
*
|
|
187
|
+
* @param required - capability names the client declared as required.
|
|
188
|
+
* @returns the unsupported names, empty when all are supported.
|
|
189
|
+
*/
|
|
190
|
+
export declare function unsupportedRequiredCapabilities(required: readonly string[], wiring?: {
|
|
191
|
+
readonly subscriptions?: boolean;
|
|
192
|
+
}): string[];
|
|
193
|
+
/**
|
|
194
|
+
* The cache scope a catalog result may declare (P26-14).
|
|
195
|
+
*
|
|
196
|
+
* `tools/list` and `server/discover` are AUTHORIZATION-FILTERED: the tool list is the
|
|
197
|
+
* caller's granted set, so a shared/public cache keyed on tool names would leak one
|
|
198
|
+
* caller's permitted set to another. `private` is therefore the only admitted scope.
|
|
199
|
+
*/
|
|
200
|
+
export type CatalogCacheScope = 'private';
|
|
201
|
+
/** The catalog caching policy applied to `tools/list` and `server/discover`. */
|
|
202
|
+
export interface CatalogCachePolicy {
|
|
203
|
+
readonly cacheScope: CatalogCacheScope;
|
|
204
|
+
/** Time-to-live in milliseconds. Zero means "do not cache". */
|
|
205
|
+
readonly ttlMs: number;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Validate and normalize an operator-configured catalog cache policy (P26-14).
|
|
209
|
+
*
|
|
210
|
+
* The default is the unchanged safe behavior: `{ cacheScope: 'private', ttlMs: 0 }`.
|
|
211
|
+
* Invalid configuration is REFUSED with a named error rather than silently rewritten:
|
|
212
|
+
* emitting a non-private scope would understate the authorization boundary, and a
|
|
213
|
+
* negative/non-finite TTL is not a cache policy at all.
|
|
214
|
+
* @param policy - the configured TTL/scope, both optional.
|
|
215
|
+
* @returns the validated policy.
|
|
216
|
+
* @throws Error named `INVALID_CATALOG_CACHE_TTL` or `INVALID_CATALOG_CACHE_SCOPE`.
|
|
217
|
+
*/
|
|
218
|
+
export declare function normalizeCachePolicy(policy?: {
|
|
219
|
+
readonly ttlMs?: number;
|
|
220
|
+
readonly cacheScope?: string;
|
|
221
|
+
}): CatalogCachePolicy;
|
|
222
|
+
/**
|
|
223
|
+
* The caching fields every cacheable result must carry (P26-14).
|
|
224
|
+
*
|
|
225
|
+
* Taken from the pinned schema's `CacheableResult`, which REQUIRES `cacheScope` and
|
|
226
|
+
* `ttlMs` on `DiscoverResult` and `ListToolsResult` alike. The policy defaults to
|
|
227
|
+
* private/0 and can carry an operator-configured non-zero TTL; the scope itself is
|
|
228
|
+
* validated to stay `private` ({@link normalizeCachePolicy}).
|
|
229
|
+
* @param policy - the catalog cache policy, or undefined for private/0.
|
|
230
|
+
* @returns the caching fields.
|
|
231
|
+
*/
|
|
232
|
+
export declare function cacheableResultFields(policy?: {
|
|
233
|
+
readonly ttlMs?: number;
|
|
234
|
+
readonly cacheScope?: string;
|
|
235
|
+
}): CatalogCachePolicy;
|
|
236
|
+
/**
|
|
237
|
+
* Build a successful result envelope (P26-04).
|
|
238
|
+
*
|
|
239
|
+
* Every modern result carries `resultType`, and `serverInfo` rides in result
|
|
240
|
+
* metadata per the revision's guidance — `ResultMetaObject` admits exactly that
|
|
241
|
+
* one key, which is what this writes.
|
|
242
|
+
* @param result - the method-specific fields.
|
|
243
|
+
* @param serverInfo - this server's identity.
|
|
244
|
+
* @returns the result object, including `resultType` and `_meta`.
|
|
245
|
+
*/
|
|
246
|
+
export declare function successResult(result: Record<string, unknown>, serverInfo: {
|
|
247
|
+
readonly name: string;
|
|
248
|
+
readonly version: string;
|
|
249
|
+
}): Record<string, unknown>;
|
|
250
|
+
/**
|
|
251
|
+
* Build a tool-error RESULT (P26-04).
|
|
252
|
+
*
|
|
253
|
+
* The distinction this preserves is the whole point: an application failure is a
|
|
254
|
+
* successful protocol exchange carrying `isError`, while a malformed request is a
|
|
255
|
+
* JSON-RPC error. Wrapping a domain failure as protocol success, or an
|
|
256
|
+
* infrastructure failure as a successful domain payload, are both forbidden.
|
|
257
|
+
* @param message - a bounded, model-readable explanation.
|
|
258
|
+
* @returns the tool-error result.
|
|
259
|
+
*/
|
|
260
|
+
export declare function toolErrorResult(message: string): ToolErrorPayload;
|
|
261
|
+
/**
|
|
262
|
+
* Build a JSON-RPC error response.
|
|
263
|
+
*
|
|
264
|
+
* When the request id is UNKNOWN the `id` member is omitted rather than set to
|
|
265
|
+
* `null`. JSON-RPC 2.0 conventionally allows `id: null` for an undeterminable id,
|
|
266
|
+
* but the pinned revision schema types `RequestId` as `string | integer` and does
|
|
267
|
+
* not admit null — while `id` itself is optional. Omitting it is therefore the
|
|
268
|
+
* conformant way to say "unknown", and the independent probe caught this by
|
|
269
|
+
* rejecting a captured 401 whose id was null.
|
|
270
|
+
*
|
|
271
|
+
* @param id - the request id, or null when it could not be determined.
|
|
272
|
+
* @param error - the failure.
|
|
273
|
+
* @returns the response envelope.
|
|
274
|
+
*/
|
|
275
|
+
export declare function errorResponse(id: string | number | null, error: WireError | {
|
|
276
|
+
code: number;
|
|
277
|
+
message: string;
|
|
278
|
+
data?: Record<string, unknown>;
|
|
279
|
+
}): Record<string, unknown>;
|
|
280
|
+
/** A parsed HTTP request's relevant fields. */
|
|
281
|
+
export interface HeaderInput {
|
|
282
|
+
/** The `MCP-Protocol-Version` header, if present. */
|
|
283
|
+
readonly protocolVersion?: string;
|
|
284
|
+
/** The `Mcp-Method` header, if present. */
|
|
285
|
+
readonly method?: string;
|
|
286
|
+
/** The `Mcp-Name` header, if present. */
|
|
287
|
+
readonly name?: string;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Decode the revision's Base64 sentinel encoding (P26-05).
|
|
291
|
+
*
|
|
292
|
+
* A header value may be encoded with the official `=?base64?…?=` sentinel, and it
|
|
293
|
+
* must be decoded BEFORE comparison. Comparing the encoded form would let a client
|
|
294
|
+
* present a value that decodes to something else entirely.
|
|
295
|
+
* @param value - the raw header value.
|
|
296
|
+
* @returns the decoded value.
|
|
297
|
+
*/
|
|
298
|
+
export declare function decodeHeaderValue(value: string): string;
|
|
299
|
+
/**
|
|
300
|
+
* Check the required headers against the body (P26-05).
|
|
301
|
+
*
|
|
302
|
+
* Headers are checked against BODY FIELDS, so a request cannot claim one method in
|
|
303
|
+
* a header and another in its body. Every mismatch is `HeaderMismatch` (-32020),
|
|
304
|
+
* which the HTTP layer reports as 400.
|
|
305
|
+
* @param headers - the relevant request headers.
|
|
306
|
+
* @param body - the parsed request.
|
|
307
|
+
* @returns nothing when the headers agree.
|
|
308
|
+
* @throws WireError `-32020` naming the first disagreement.
|
|
309
|
+
*/
|
|
310
|
+
export declare function assertHeadersMatch(headers: HeaderInput, body: WireRequest): void;
|
|
311
|
+
/**
|
|
312
|
+
* Parse a newline-delimited stdio frame (P26-08).
|
|
313
|
+
*
|
|
314
|
+
* Stdio carries protocol traffic on stdout and diagnostics on stderr, so a line
|
|
315
|
+
* that is not a JSON object is a protocol error rather than something to log and
|
|
316
|
+
* skip: silently dropping it would leave a client waiting for a response that
|
|
317
|
+
* never comes.
|
|
318
|
+
* @param line - one line of input.
|
|
319
|
+
* @returns the parsed request, or undefined for a blank line.
|
|
320
|
+
* @throws WireError `-32700` when the line is not a JSON object.
|
|
321
|
+
*/
|
|
322
|
+
export declare function parseStdioLine(line: string): WireRequest | undefined;
|
|
323
|
+
/**
|
|
324
|
+
* Serialize one stdio frame.
|
|
325
|
+
* @param message - the response or notification.
|
|
326
|
+
* @returns the line, newline-terminated.
|
|
327
|
+
*/
|
|
328
|
+
export declare function serializeStdioFrame(message: unknown): string;
|
|
329
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/mcp/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAAuB,CAAA;AAEhF,6CAA6C;AAC7C,eAAO,MAAM,SAAS;;;;;CAKZ,CAAA;AAEV;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW;IACtB,yBAAyB;;;;;;IAMzB,oBAAoB;;;;IAIpB;;;;;;;;OAQG;;CAEK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