@try-works/dsh-tool-mode 0.0.0-stage → 0.5.45
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/LICENSE +205 -0
- package/README.md +303 -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 +4158 -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 +2552 -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 +5273 -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/model-runtime-lane.d.ts +69 -0
- package/lib/model-runtime-lane.d.ts.map +1 -0
- package/lib/model-runtime-lane.js +122 -0
- package/lib/model-runtime-recipe.d.ts +132 -0
- package/lib/model-runtime-recipe.d.ts.map +1 -0
- package/lib/model-runtime-recipe.js +291 -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,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability resolution: decide whether a catalog model can actually run in
|
|
3
|
+
* this DSH process, and by which route.
|
|
4
|
+
*
|
|
5
|
+
* The rule this module enforces is that a model becomes a tool only when an
|
|
6
|
+
* adapter can really invoke it. Every other model stays catalogued and
|
|
7
|
+
* reportable, so `model_tools` can explain what is missing instead of the agent
|
|
8
|
+
* discovering a broken tool at call time.
|
|
9
|
+
*
|
|
10
|
+
* @module @try-works/dsh-tool-mode/capability
|
|
11
|
+
*/
|
|
12
|
+
import { createRequire } from 'node:module';
|
|
13
|
+
import { DEFAULT_CLI_COMMAND } from "./transport.js";
|
|
14
|
+
/**
|
|
15
|
+
* Node resolution context for this plugin.
|
|
16
|
+
*
|
|
17
|
+
* The plugin must resolve model packages from the DSH installation that is
|
|
18
|
+
* hosting it, not from its own nested `node_modules`, so that an operator who
|
|
19
|
+
* installs `@desert-ant-labs/tongue` into the profile gets a working tool.
|
|
20
|
+
*/
|
|
21
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
22
|
+
/**
|
|
23
|
+
* Whether a package specifier resolves from this plugin's installation.
|
|
24
|
+
*
|
|
25
|
+
* Resolution deliberately does not load the module: importing a model package
|
|
26
|
+
* pulls in a WASM or native runtime, and capability probing must stay cheap
|
|
27
|
+
* enough to run at plugin load.
|
|
28
|
+
* @param specifier - package name, optionally with a subpath.
|
|
29
|
+
* @returns whether Node can resolve the specifier.
|
|
30
|
+
*/
|
|
31
|
+
export function canResolve(specifier) {
|
|
32
|
+
try {
|
|
33
|
+
requireFromHere.resolve(specifier);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Join a package and its documented subpath into one specifier. */
|
|
41
|
+
export function packageSpecifier(pkg, subpath) {
|
|
42
|
+
return subpath === null ? pkg : `${pkg}${subpath}`;
|
|
43
|
+
}
|
|
44
|
+
/** Reason text for a model that has no runnable route on any platform. */
|
|
45
|
+
function unavailableReason(entry) {
|
|
46
|
+
if (entry.closedBeta) {
|
|
47
|
+
return `${entry.name} is in closed beta: the weights are published at ${entry.hfRepo} but no SDK ships them yet, so it cannot be installed as a tool.`;
|
|
48
|
+
}
|
|
49
|
+
if (entry.appleOnly) {
|
|
50
|
+
return `${entry.name} is Apple-only (Core ML/MLX through the Swift package); there is no JavaScript SDK, so it cannot run in a Node process. Point \`remote.endpoint\` at a bridge on an Apple machine to reach it.`;
|
|
51
|
+
}
|
|
52
|
+
if (entry.npmPackage === null && entry.cliVerb === null) {
|
|
53
|
+
return `${entry.name} has no npm package and no CLI verb, so no transport can reach it.`;
|
|
54
|
+
}
|
|
55
|
+
if (entry.npmPackage === null) {
|
|
56
|
+
return `${entry.name} has no npm package; run it through the Desert Ant CLI (macOS/Linux) with \`cli.enabled\`, or through a bridge with \`remote.endpoint\`.`;
|
|
57
|
+
}
|
|
58
|
+
return `${entry.name} has no runtime available to this process.`;
|
|
59
|
+
}
|
|
60
|
+
/** Whether the CLI can carry this model at all. */
|
|
61
|
+
function cliCapable(entry) {
|
|
62
|
+
return entry.cliVerb !== null && !entry.closedBeta;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Resolve how (and whether) one model can run here.
|
|
66
|
+
*
|
|
67
|
+
* Transport preference is deliberate: an in-process package is fastest and
|
|
68
|
+
* needs no external service, so it wins; the CLI is local but out-of-process;
|
|
69
|
+
* the bridge is last because it depends on another machine. A user who would
|
|
70
|
+
* rather route everything through a bridge can disable the other two.
|
|
71
|
+
* @param entry - the catalog entry to resolve.
|
|
72
|
+
* @param options - overrides for testing; `resolve`, `platform` and the transport switches replace the process facts.
|
|
73
|
+
* @returns the verdict, including the reason for every negative one.
|
|
74
|
+
*/
|
|
75
|
+
export function resolveCapability(entry, options = {}) {
|
|
76
|
+
const resolve = options.resolve ?? canResolve;
|
|
77
|
+
const platform = options.platform ?? process.platform;
|
|
78
|
+
const allowNpm = options.allowNpm ?? true;
|
|
79
|
+
const remoteEndpoint = options.remoteEndpoint;
|
|
80
|
+
// A bridge is checked first among the fallbacks because it is the only route
|
|
81
|
+
// for Apple-only models, which have neither a package nor (for some) a verb.
|
|
82
|
+
const bridgeUsable = remoteEndpoint !== undefined && remoteEndpoint.length > 0 && !entry.closedBeta;
|
|
83
|
+
if (entry.provider !== undefined && !entry.closedBeta) {
|
|
84
|
+
const extensionManifest = `${entry.provider.extension}/package.json`;
|
|
85
|
+
if (resolve(extensionManifest)) {
|
|
86
|
+
return {
|
|
87
|
+
runnable: true,
|
|
88
|
+
route: 'extension',
|
|
89
|
+
reason: `${entry.name} is implemented by the Tool Mode extension ${entry.provider.extension}; provider readiness is checked through that extension before publication and again for discovery.`,
|
|
90
|
+
resolved: [extensionManifest],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
runnable: false,
|
|
95
|
+
route: 'unavailable',
|
|
96
|
+
reason: `${entry.name} declares the Tool Mode extension ${entry.provider.extension}, which is not installed or not resolvable from this host. Install and activate that extension, or correct the catalog binding.`,
|
|
97
|
+
missing: [extensionManifest],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const pkg = entry.npmPackage;
|
|
101
|
+
// Why the in-process route did not pan out. Kept so the final verdict can name
|
|
102
|
+
// the exact missing piece ("install onnxruntime-node") instead of falling back
|
|
103
|
+
// to a generic sentence once the CLI and bridge have also been ruled out.
|
|
104
|
+
let npmMiss;
|
|
105
|
+
if (pkg !== null && allowNpm) {
|
|
106
|
+
const missingRuntimes = entry.requiresRuntime.filter(name => !resolve(name));
|
|
107
|
+
if (missingRuntimes.length > 0) {
|
|
108
|
+
npmMiss = {
|
|
109
|
+
reason: `${entry.name} needs ${missingRuntimes.join(', ')} to run here; install it beside the plugin (npm i ${missingRuntimes.join(' ')}).`,
|
|
110
|
+
missing: missingRuntimes,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const native = packageSpecifier(pkg, entry.npmSubpath);
|
|
115
|
+
const onnx = entry.requiresRuntime.length > 0;
|
|
116
|
+
// A declared ONNX runtime wins over the package's own default entry: for
|
|
117
|
+
// these packages the default import is the browser build, which refuses
|
|
118
|
+
// to initialize in Node.
|
|
119
|
+
if (onnx) {
|
|
120
|
+
if (resolve(pkg)) {
|
|
121
|
+
return {
|
|
122
|
+
runnable: true,
|
|
123
|
+
route: 'npm-onnxruntime',
|
|
124
|
+
reason: `${entry.name} runs through ${entry.requiresRuntime.join(', ')}.`,
|
|
125
|
+
resolved: [...entry.requiresRuntime, pkg],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
npmMiss = {
|
|
129
|
+
reason: `${entry.name} requires the ${pkg} package, which is not installed.`,
|
|
130
|
+
missing: [pkg],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
else if (platform === 'win32' && entry.windowsSupport === 'browser-only') {
|
|
134
|
+
npmMiss = {
|
|
135
|
+
reason: `${entry.name} has no prebuilt native build for win32-${process.arch}: ${native} supports linux-x64, linux-arm64 and darwin-arm64 only.`,
|
|
136
|
+
missing: [native],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
else if (resolve(native)) {
|
|
140
|
+
return {
|
|
141
|
+
runnable: true,
|
|
142
|
+
route: 'npm-native',
|
|
143
|
+
reason: `${entry.name} resolves ${native} for this platform.`,
|
|
144
|
+
resolved: [native],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
npmMiss = {
|
|
149
|
+
reason: `${entry.name} requires the ${native} package, which is not installed.`,
|
|
150
|
+
missing: [native],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// The CLI runs every shipping model on macOS and Linux, so it is checked
|
|
156
|
+
// before giving up — including for models whose npm prebuild is missing here.
|
|
157
|
+
if (cliCapable(entry) && (options.cliAvailable ?? false)) {
|
|
158
|
+
return {
|
|
159
|
+
runnable: true,
|
|
160
|
+
route: 'cli',
|
|
161
|
+
reason: `${entry.name} runs through the Desert Ant CLI (\`${DEFAULT_CLI_COMMAND} ${entry.cliVerb}\`).`,
|
|
162
|
+
resolved: [DEFAULT_CLI_COMMAND],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (bridgeUsable) {
|
|
166
|
+
return {
|
|
167
|
+
runnable: true,
|
|
168
|
+
route: 'remote',
|
|
169
|
+
reason: `${entry.name} is reached through the bridge at ${remoteEndpoint}.`,
|
|
170
|
+
resolved: [remoteEndpoint],
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
if (npmMiss !== undefined && !entry.closedBeta && !entry.appleOnly) {
|
|
174
|
+
return {
|
|
175
|
+
runnable: false,
|
|
176
|
+
route: 'unavailable',
|
|
177
|
+
reason: npmMiss.reason,
|
|
178
|
+
missing: npmMiss.missing,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return { runnable: false, route: 'unavailable', reason: unavailableReason(entry) };
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Resolve every catalog entry.
|
|
185
|
+
* @param entries - validated catalog entries.
|
|
186
|
+
* @param options - resolution overrides, forwarded to {@link resolveCapability}.
|
|
187
|
+
* @returns one record per entry, in catalog order.
|
|
188
|
+
*/
|
|
189
|
+
export function resolveCatalog(entries, options = {}) {
|
|
190
|
+
return entries.map(entry => ({ entry, verdict: resolveCapability(entry, options) }));
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=capability.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full capture path, and the metadata-only profile (OBS-03).
|
|
3
|
+
*
|
|
4
|
+
* THE PREMISE OBS-03 STARTS FROM, and it is the uncomfortable one: **this plugin's defaults
|
|
5
|
+
* cannot guarantee privacy.** A body that is never written by us may still be captured by
|
|
6
|
+
* ANOTHER DSH logging plugin, because DSH's LLM service requires model-visible inputs to be
|
|
7
|
+
* reconstructable — so a harness call's prompt necessarily passes through a surface a sibling
|
|
8
|
+
* plugin can observe. Nothing this plugin does can close that.
|
|
9
|
+
*
|
|
10
|
+
* What this plugin CAN do is be honest about it, which is what the requirement asks for in three
|
|
11
|
+
* parts:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Document the full capture path** — every place a body can come to rest, including the
|
|
14
|
+
* ones outside this plugin's control. A privacy claim that names only our own writes is
|
|
15
|
+
* misleading precisely because the reader will assume it is complete.
|
|
16
|
+
* 2. **Provide and TEST a metadata-only profile** for the headless local-specialist case, where
|
|
17
|
+
* an operator wants the tools without any body retention.
|
|
18
|
+
* 3. **REFUSE rather than silently log** where a no-retention policy cannot be honoured
|
|
19
|
+
* alongside DSH's reconstructability contract. `harnessExecutionDecision` in
|
|
20
|
+
* `diagnostics.ts` makes that decision; this module says which profile it applies to.
|
|
21
|
+
*
|
|
22
|
+
* @module @try-works/dsh-tool-mode/capture-path
|
|
23
|
+
*/
|
|
24
|
+
/** Where a request or response body can come to rest. */
|
|
25
|
+
export interface CaptureSurface {
|
|
26
|
+
/** A stable name for the surface. */
|
|
27
|
+
readonly surface: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether THIS plugin writes bodies there.
|
|
30
|
+
*
|
|
31
|
+
* `false` does not mean the surface is safe — it means this plugin is not the author. That
|
|
32
|
+
* distinction is the whole reason the field exists: a reader must not mistake "we do not
|
|
33
|
+
* write here" for "nothing is written here".
|
|
34
|
+
*/
|
|
35
|
+
readonly writtenByThisPlugin: boolean;
|
|
36
|
+
/** What actually lands there. */
|
|
37
|
+
readonly contents: string;
|
|
38
|
+
/** What an operator can do about it. */
|
|
39
|
+
readonly control: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The FULL capture path, including surfaces outside this plugin's control.
|
|
43
|
+
*
|
|
44
|
+
* Ordered from what this plugin owns to what it does not, so a reader sees the boundary
|
|
45
|
+
* explicitly rather than inferring it from a list of our own writes.
|
|
46
|
+
*/
|
|
47
|
+
export declare const CAPTURE_PATH: readonly CaptureSurface[];
|
|
48
|
+
/** Which capture policy a deployment runs under (OBS-03). */
|
|
49
|
+
export type CaptureProfile =
|
|
50
|
+
/** Ordinary operation: receipts and accounting, bodies owned by the surfaces above. */
|
|
51
|
+
'standard'
|
|
52
|
+
/**
|
|
53
|
+
* Headless local-specialist: METADATA ONLY.
|
|
54
|
+
*
|
|
55
|
+
* Composed by an operator who wants the tools without any body retention at all. Everything
|
|
56
|
+
* this plugin writes is metadata; the profile additionally forbids the one path where this
|
|
57
|
+
* plugin could be the author of a body, and refuses harness-backed execution when the
|
|
58
|
+
* deployment's policy cannot satisfy DSH's reconstructability contract.
|
|
59
|
+
*/
|
|
60
|
+
| 'metadata-only';
|
|
61
|
+
/** What a profile permits. */
|
|
62
|
+
export interface ProfilePolicy {
|
|
63
|
+
readonly profile: CaptureProfile;
|
|
64
|
+
/** Whether this profile may serve harness-backed (model-calling) tools at all. */
|
|
65
|
+
readonly permitsHarnessExecution: boolean;
|
|
66
|
+
/** Whether this plugin writes any request or response BODY. */
|
|
67
|
+
readonly writesBodies: boolean;
|
|
68
|
+
/** Surfaces this profile does not close, so a reader sees the residual risk. */
|
|
69
|
+
readonly residualSurfaces: readonly string[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Describe a profile's policy.
|
|
73
|
+
*
|
|
74
|
+
* @param profile - the profile to describe.
|
|
75
|
+
* @param policy - the deployment's retention facts.
|
|
76
|
+
* @returns what the profile permits, and what it does not close.
|
|
77
|
+
*/
|
|
78
|
+
export declare function profilePolicy(profile: CaptureProfile, policy: {
|
|
79
|
+
readonly retainsBodies: boolean;
|
|
80
|
+
readonly requiresReconstructableInputs: boolean;
|
|
81
|
+
}): ProfilePolicy;
|
|
82
|
+
/**
|
|
83
|
+
* Whether a profile may serve one tool.
|
|
84
|
+
*
|
|
85
|
+
* @param profile - the active profile.
|
|
86
|
+
* @param policy - the deployment's retention facts.
|
|
87
|
+
* @param harnessBacked - whether the tool calls a model.
|
|
88
|
+
* @returns the decision, with the reason when it refuses.
|
|
89
|
+
*/
|
|
90
|
+
export declare function admitsTool(profile: CaptureProfile, policy: {
|
|
91
|
+
readonly retainsBodies: boolean;
|
|
92
|
+
readonly requiresReconstructableInputs: boolean;
|
|
93
|
+
}, harnessBacked: boolean): {
|
|
94
|
+
readonly admitted: boolean;
|
|
95
|
+
readonly reason?: string;
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=capture-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture-path.d.ts","sourceRoot":"","sources":["../src/capture-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAA;IACrC,iCAAiC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,cAAc,EAuEjD,CAAA;AAED,6DAA6D;AAC7D,MAAM,MAAM,cAAc;AACxB,uFAAuF;AACrF,UAAU;AACZ;;;;;;;GAOG;GACD,eAAe,CAAA;AAEnB,8BAA8B;AAC9B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;IAChC,kFAAkF;IAClF,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAA;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE;IAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,CAAA;CAAE,GAC3F,aAAa,CA+Bf;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE;IAAE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,6BAA6B,EAAE,OAAO,CAAA;CAAE,EAC5F,aAAa,EAAE,OAAO,GACrB;IAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAiB1D"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full capture path, and the metadata-only profile (OBS-03).
|
|
3
|
+
*
|
|
4
|
+
* THE PREMISE OBS-03 STARTS FROM, and it is the uncomfortable one: **this plugin's defaults
|
|
5
|
+
* cannot guarantee privacy.** A body that is never written by us may still be captured by
|
|
6
|
+
* ANOTHER DSH logging plugin, because DSH's LLM service requires model-visible inputs to be
|
|
7
|
+
* reconstructable — so a harness call's prompt necessarily passes through a surface a sibling
|
|
8
|
+
* plugin can observe. Nothing this plugin does can close that.
|
|
9
|
+
*
|
|
10
|
+
* What this plugin CAN do is be honest about it, which is what the requirement asks for in three
|
|
11
|
+
* parts:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Document the full capture path** — every place a body can come to rest, including the
|
|
14
|
+
* ones outside this plugin's control. A privacy claim that names only our own writes is
|
|
15
|
+
* misleading precisely because the reader will assume it is complete.
|
|
16
|
+
* 2. **Provide and TEST a metadata-only profile** for the headless local-specialist case, where
|
|
17
|
+
* an operator wants the tools without any body retention.
|
|
18
|
+
* 3. **REFUSE rather than silently log** where a no-retention policy cannot be honoured
|
|
19
|
+
* alongside DSH's reconstructability contract. `harnessExecutionDecision` in
|
|
20
|
+
* `diagnostics.ts` makes that decision; this module says which profile it applies to.
|
|
21
|
+
*
|
|
22
|
+
* @module @try-works/dsh-tool-mode/capture-path
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The FULL capture path, including surfaces outside this plugin's control.
|
|
26
|
+
*
|
|
27
|
+
* Ordered from what this plugin owns to what it does not, so a reader sees the boundary
|
|
28
|
+
* explicitly rather than inferring it from a list of our own writes.
|
|
29
|
+
*/
|
|
30
|
+
export const CAPTURE_PATH = [
|
|
31
|
+
{
|
|
32
|
+
surface: 'tool invocation arguments',
|
|
33
|
+
writtenByThisPlugin: false,
|
|
34
|
+
contents: 'The arguments a caller passes to a tool. They reach the implementation, and for a '
|
|
35
|
+
+ 'harness-backed tool they become part of the rendered prompt.',
|
|
36
|
+
control: 'The caller decides what to pass. This plugin adds nothing to the arguments and copies '
|
|
37
|
+
+ 'them nowhere.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
surface: 'managed-worker stdout/stderr',
|
|
41
|
+
writtenByThisPlugin: false,
|
|
42
|
+
contents: 'Whatever an extension process prints. An extension that logs its own inputs puts bodies '
|
|
43
|
+
+ 'into a stream this plugin does not author or read.',
|
|
44
|
+
control: 'Extension authors control their own logging. The isolation mode is declared in the '
|
|
45
|
+
+ 'manifest, and the diagnostics surface reports it.',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
surface: 'DSH LLM service',
|
|
49
|
+
writtenByThisPlugin: false,
|
|
50
|
+
contents: 'THE SURFACE THIS PLUGIN CANNOT CLOSE. DSH requires model-visible inputs to be '
|
|
51
|
+
+ 'reconstructable, so a harness call\'s prompt passes through the LLM service by design.',
|
|
52
|
+
control: 'An operator-level policy, not a plugin setting. Where no-retention conflicts with '
|
|
53
|
+
+ 'reconstructability, the correct response is to REFUSE harness-backed execution — which '
|
|
54
|
+
+ 'this plugin does rather than logging bodies or bypassing DSH.',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
surface: 'another DSH logging plugin',
|
|
58
|
+
writtenByThisPlugin: false,
|
|
59
|
+
contents: 'Any body a sibling plugin observes through a DSH hook. This plugin neither knows what '
|
|
60
|
+
+ 'they capture nor can it prevent them.',
|
|
61
|
+
control: 'Operator configuration of the OTHER plugin. This is the specific case OBS-03 names, and '
|
|
62
|
+
+ 'it is why the plugin defaults cannot be presented as a privacy guarantee.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
surface: 'the auxiliary-call journal (section 19)',
|
|
66
|
+
writtenByThisPlugin: true,
|
|
67
|
+
contents: 'Harness-backed auxiliary calls, recorded under a SEPARATE authorization from ordinary '
|
|
68
|
+
+ 'tool receipts. The broker refuses to construct without a journal sink, so a '
|
|
69
|
+
+ 'harness-backed run that records nothing cannot exist.',
|
|
70
|
+
control: 'A deployment composes the sink or the broker refuses. The journal is the mechanism that '
|
|
71
|
+
+ 'makes a harness call auditable without putting its body in an ordinary log.',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
surface: 'invocation accounting',
|
|
75
|
+
writtenByThisPlugin: true,
|
|
76
|
+
contents: 'Timings, outcome class and byte SIZES. The record has no field that can hold a payload, '
|
|
77
|
+
+ 'which is asserted structurally rather than promised.',
|
|
78
|
+
control: 'Always on. There is nothing to configure because there is nothing sensitive in it.',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
surface: 'tool receipts',
|
|
82
|
+
writtenByThisPlugin: true,
|
|
83
|
+
contents: 'Identity and provenance — contract, implementation, extension version, content digest, '
|
|
84
|
+
+ 'activation generation, caller scope. No credentials and no bodies.',
|
|
85
|
+
control: 'Disabled by an explicit configuration flag, which is visible on the diagnostics surface.',
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
/**
|
|
89
|
+
* Describe a profile's policy.
|
|
90
|
+
*
|
|
91
|
+
* @param profile - the profile to describe.
|
|
92
|
+
* @param policy - the deployment's retention facts.
|
|
93
|
+
* @returns what the profile permits, and what it does not close.
|
|
94
|
+
*/
|
|
95
|
+
export function profilePolicy(profile, policy) {
|
|
96
|
+
/**
|
|
97
|
+
* The surfaces no profile can close, listed for BOTH profiles because the difference between
|
|
98
|
+
* them is what THIS plugin writes — not what a sibling plugin does.
|
|
99
|
+
*/
|
|
100
|
+
const residualSurfaces = CAPTURE_PATH
|
|
101
|
+
.filter(surface => !surface.writtenByThisPlugin)
|
|
102
|
+
.map(surface => surface.surface);
|
|
103
|
+
if (profile === 'standard') {
|
|
104
|
+
return {
|
|
105
|
+
profile,
|
|
106
|
+
permitsHarnessExecution: true,
|
|
107
|
+
writesBodies: false,
|
|
108
|
+
residualSurfaces,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* METADATA ONLY. The plugin still writes no bodies — it never did — and the profile adds the
|
|
113
|
+
* REFUSAL: where a no-retention policy conflicts with DSH's reconstructability requirement,
|
|
114
|
+
* harness-backed execution is not served at all. Logging bodies against the policy and
|
|
115
|
+
* bypassing DSH are both forbidden, which leaves refusing.
|
|
116
|
+
*/
|
|
117
|
+
const conflict = !policy.retainsBodies && policy.requiresReconstructableInputs;
|
|
118
|
+
return {
|
|
119
|
+
profile,
|
|
120
|
+
permitsHarnessExecution: !conflict,
|
|
121
|
+
writesBodies: false,
|
|
122
|
+
residualSurfaces,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Whether a profile may serve one tool.
|
|
127
|
+
*
|
|
128
|
+
* @param profile - the active profile.
|
|
129
|
+
* @param policy - the deployment's retention facts.
|
|
130
|
+
* @param harnessBacked - whether the tool calls a model.
|
|
131
|
+
* @returns the decision, with the reason when it refuses.
|
|
132
|
+
*/
|
|
133
|
+
export function admitsTool(profile, policy, harnessBacked) {
|
|
134
|
+
const described = profilePolicy(profile, policy);
|
|
135
|
+
/**
|
|
136
|
+
* A NON-harness tool is admitted under every profile: it calls no model, so there is no body
|
|
137
|
+
* for the reconstructability contract to be about, and refusing it would remove working
|
|
138
|
+
* functionality for no privacy gain.
|
|
139
|
+
*/
|
|
140
|
+
if (!harnessBacked)
|
|
141
|
+
return { admitted: true };
|
|
142
|
+
if (described.permitsHarnessExecution)
|
|
143
|
+
return { admitted: true };
|
|
144
|
+
return {
|
|
145
|
+
admitted: false,
|
|
146
|
+
reason: 'the metadata-only profile refuses harness-backed execution because the deployment does '
|
|
147
|
+
+ 'not retain bodies while DSH requires model-visible inputs to be reconstructable. '
|
|
148
|
+
+ 'Logging bodies against the policy and bypassing DSH are both forbidden, so the tool is '
|
|
149
|
+
+ 'not served.',
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=capture-path.js.map
|
package/lib/catalog.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads and validates the Desert Ant Labs model catalog.
|
|
3
|
+
*
|
|
4
|
+
* The catalog is plain JSON shipped beside the plugin so that a deployment can
|
|
5
|
+
* inspect or override it without rebuilding: `catalogFile` points at another
|
|
6
|
+
* document with the same shape.
|
|
7
|
+
*
|
|
8
|
+
* @module @try-works/dsh-tool-mode/catalog
|
|
9
|
+
*/
|
|
10
|
+
import type { ModelCatalogEntry } from './types.ts';
|
|
11
|
+
/** Absolute path of the catalog document shipped with this package. */
|
|
12
|
+
export declare const DEFAULT_CATALOG_FILE: string;
|
|
13
|
+
/** Raised when the catalog document is missing, unparseable, or malformed. */
|
|
14
|
+
export declare class CatalogError extends Error {
|
|
15
|
+
readonly name = "CatalogError";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse and validate one catalog entry. Validation is strict on purpose: every
|
|
19
|
+
* downstream decision (which tool to register, whether it can run, what the
|
|
20
|
+
* model sees) reads these fields, so a malformed entry must fail at load rather
|
|
21
|
+
* than become a silently missing tool.
|
|
22
|
+
* @param raw - one decoded JSON object.
|
|
23
|
+
* @param source - description of where the document came from, for messages.
|
|
24
|
+
* @param index - position in the array, for entries with no usable id.
|
|
25
|
+
* @returns the validated entry.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseCatalogEntry(raw: unknown, source: string, index: number): ModelCatalogEntry;
|
|
28
|
+
/**
|
|
29
|
+
* Load the catalog from a JSON document.
|
|
30
|
+
* @param file - absolute path of the catalog document.
|
|
31
|
+
* @returns every validated entry, in document order.
|
|
32
|
+
* @throws CatalogError when the file cannot be read, is not valid JSON, is not an array, or holds a malformed entry.
|
|
33
|
+
*/
|
|
34
|
+
export declare function loadCatalog(file?: string): ModelCatalogEntry[];
|
|
35
|
+
/** Index a catalog by model id. */
|
|
36
|
+
export declare function indexCatalog(entries: readonly ModelCatalogEntry[]): Map<string, ModelCatalogEntry>;
|
|
37
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAA0D,MAAM,YAAY,CAAA;AAE3G,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,QAEhC,CAAA;AAWD,8EAA8E;AAC9E,qBAAa,YAAa,SAAQ,KAAK;IACrC,SAAkB,IAAI,kBAAiB;CACxC;AAyGD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAuGhG;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAA6B,GAAG,iBAAiB,EAAE,CA6BpF;AAED,mCAAmC;AACnC,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAElG"}
|