@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,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `toolModeUsage` session projection (Tool Insights plan §3.1).
|
|
3
|
+
*
|
|
4
|
+
* A pure fold over DSH session events. The projection STATE is the host-only detail
|
|
5
|
+
* (exact per-tool matrix, 16-bucket duration histogram, error codes); the projection
|
|
6
|
+
* WIRE is the compact value that rides every `session.list` row. Splitting them this
|
|
7
|
+
* way keeps the session list small while the report channel can still answer exact
|
|
8
|
+
* range questions from the detail.
|
|
9
|
+
*
|
|
10
|
+
* Truthfulness rules the fold enforces:
|
|
11
|
+
*
|
|
12
|
+
* - A call is counted when it is DISPATCHED (`tool/call`, `tool/ptc-dispatch-start`),
|
|
13
|
+
* and its duration is added only when a result settles it. A call whose result never
|
|
14
|
+
* lands is `unsettled` — never a fabricated success, and never in a percentile.
|
|
15
|
+
* - `callId` is provider-minted, so pairing uses `Object.hasOwn`: a result naming
|
|
16
|
+
* `constructor`/`toString` must read as unmatched, not as an inherited function.
|
|
17
|
+
* - Model attribution comes from the step's assistant message, then the request-header
|
|
18
|
+
* route in force, then the explicit `unattributed` bucket. Code Mode sub-calls
|
|
19
|
+
* inherit the parent program's model.
|
|
20
|
+
* - Every bound is explicit and loses information LOUDLY (`unsettled`, `toolsTruncated`
|
|
21
|
+
* / `modelsTruncated`) rather than silently.
|
|
22
|
+
* - All state is plain JSON: the projection cache persists it.
|
|
23
|
+
*
|
|
24
|
+
* @module @try-works/dsh-tool-mode/tool-usage-projection
|
|
25
|
+
*/
|
|
26
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
27
|
+
/** The projection key the client reads as `projectionValues.toolModeUsage`. */
|
|
28
|
+
export declare const TOOL_USAGE_KEY = "toolModeUsage";
|
|
29
|
+
/** The persisted-state version; a stale cache row is re-folded instead of trusted. */
|
|
30
|
+
export declare const TOOL_USAGE_STATE_VERSION = 1;
|
|
31
|
+
/** The explicit bucket for calls with no readable model. */
|
|
32
|
+
export declare const UNATTRIBUTED_MODEL = "unattributed";
|
|
33
|
+
/** The explicit per-tool bucket once the distinct-tool bound is reached. */
|
|
34
|
+
export declare const TOOLS_OVERFLOW = "(overflow)";
|
|
35
|
+
/**
|
|
36
|
+
* Duration histogram upper edges, in milliseconds (16 buckets).
|
|
37
|
+
*
|
|
38
|
+
* Log-scale because tool latencies span four orders of magnitude; the last bucket is
|
|
39
|
+
* open-ended. Percentiles are derived from this histogram, while `maxMs` stays exact.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DURATION_BUCKETS_MS: readonly number[];
|
|
42
|
+
/** Hard bounds. The wire caps and the fold caps come from one table. */
|
|
43
|
+
export declare const TOOL_USAGE_CAPS: Readonly<{
|
|
44
|
+
/** In-flight (call dispatched, result not yet seen) records retained. */
|
|
45
|
+
pending: 100;
|
|
46
|
+
/** Recent calls retained in the detail state; the wire carries {@link TOOL_USAGE_CAPS.wireRecent}. */
|
|
47
|
+
recent: 200;
|
|
48
|
+
/** Recent calls the compact wire carries. */
|
|
49
|
+
wireRecent: 20;
|
|
50
|
+
/** Distinct tool performance rows per session. */
|
|
51
|
+
tools: 100;
|
|
52
|
+
/** Distinct models per session. */
|
|
53
|
+
models: 20;
|
|
54
|
+
/** Distinct tool names tracked per model. */
|
|
55
|
+
modelTools: 100;
|
|
56
|
+
/** Retained local-time days. */
|
|
57
|
+
days: 60;
|
|
58
|
+
/** Duration buckets per tool. */
|
|
59
|
+
buckets: 16;
|
|
60
|
+
/** Top tools the compact wire carries. */
|
|
61
|
+
topTools: 5;
|
|
62
|
+
}>;
|
|
63
|
+
/** One tool/day counter. */
|
|
64
|
+
export interface ToolDayCount {
|
|
65
|
+
calls: number;
|
|
66
|
+
errors: number;
|
|
67
|
+
/** Settled duration for this tool on this day, ms. */
|
|
68
|
+
ms: number;
|
|
69
|
+
/** Exact maximum settled duration for this tool on this day, ms. */
|
|
70
|
+
maxMs: number;
|
|
71
|
+
/** Calls of this tool on this day whose result never landed. */
|
|
72
|
+
unsettled: number;
|
|
73
|
+
/** Calls of this tool on this day dispatched from a Code Mode program. */
|
|
74
|
+
codeCalls: number;
|
|
75
|
+
}
|
|
76
|
+
/** One tool's performance detail. */
|
|
77
|
+
export interface ToolUsageBucket {
|
|
78
|
+
calls: number;
|
|
79
|
+
errors: number;
|
|
80
|
+
unsettled: number;
|
|
81
|
+
/** Calls dispatched from inside a Code Mode program. */
|
|
82
|
+
codeCalls: number;
|
|
83
|
+
/** Calls requested directly by the model. */
|
|
84
|
+
directCalls: number;
|
|
85
|
+
totalMs: number;
|
|
86
|
+
maxMs: number;
|
|
87
|
+
argsBytes: number;
|
|
88
|
+
resultBytes: number;
|
|
89
|
+
firstUsed: number | null;
|
|
90
|
+
lastUsed: number | null;
|
|
91
|
+
/** 16 log-scale buckets over settled durations. */
|
|
92
|
+
histogram: number[];
|
|
93
|
+
byDay: Record<string, ToolDayCount>;
|
|
94
|
+
}
|
|
95
|
+
/** One model/day counter. */
|
|
96
|
+
export interface ModelDayCount {
|
|
97
|
+
calls: number;
|
|
98
|
+
errors: number;
|
|
99
|
+
ms: number;
|
|
100
|
+
maxMs: number;
|
|
101
|
+
}
|
|
102
|
+
/** One model's usage. */
|
|
103
|
+
export interface ModelUsage {
|
|
104
|
+
calls: number;
|
|
105
|
+
errors: number;
|
|
106
|
+
ms: number;
|
|
107
|
+
/** Distinct tool names this model used, bounded by {@link TOOL_USAGE_CAPS.modelTools}. */
|
|
108
|
+
tools: string[];
|
|
109
|
+
/** 16 log-scale buckets over this model's settled durations. */
|
|
110
|
+
histogram: number[];
|
|
111
|
+
byDay: Record<string, ModelDayCount>;
|
|
112
|
+
}
|
|
113
|
+
/** One owner/day counter. */
|
|
114
|
+
export interface OwnerDayCount {
|
|
115
|
+
calls: number;
|
|
116
|
+
errors: number;
|
|
117
|
+
ms: number;
|
|
118
|
+
}
|
|
119
|
+
/** One owner's usage. */
|
|
120
|
+
export interface OwnerUsage {
|
|
121
|
+
calls: number;
|
|
122
|
+
errors: number;
|
|
123
|
+
ms: number;
|
|
124
|
+
byDay: Record<string, OwnerDayCount>;
|
|
125
|
+
}
|
|
126
|
+
/** One day's usage, host-local time. */
|
|
127
|
+
export interface DayUsage {
|
|
128
|
+
calls: number;
|
|
129
|
+
errors: number;
|
|
130
|
+
ms: number;
|
|
131
|
+
unsettled: number;
|
|
132
|
+
/** Class-level error-code counts for this day. */
|
|
133
|
+
byCode: Record<string, number>;
|
|
134
|
+
}
|
|
135
|
+
/** One retained recent call (detail state). */
|
|
136
|
+
export interface RecentCall {
|
|
137
|
+
/** The call start time (ms). */
|
|
138
|
+
time: number;
|
|
139
|
+
name: string;
|
|
140
|
+
model: string;
|
|
141
|
+
kind: 'direct' | 'code';
|
|
142
|
+
/** The direct `callId` or the PTC `subCallId`. */
|
|
143
|
+
callId: string;
|
|
144
|
+
/** PTC linkage to the `tool_mode_run` parent. */
|
|
145
|
+
parentCallId?: string;
|
|
146
|
+
rootCallId?: string;
|
|
147
|
+
/** Settled duration; null while the call is in flight or after it went unsettled. */
|
|
148
|
+
ms: number | null;
|
|
149
|
+
/** true/false when settled; null when unsettled. */
|
|
150
|
+
ok: boolean | null;
|
|
151
|
+
/** Class-level error code when the result carried one. */
|
|
152
|
+
code: string | null;
|
|
153
|
+
}
|
|
154
|
+
/** One in-flight call (detail state). */
|
|
155
|
+
export interface PendingCall {
|
|
156
|
+
name: string;
|
|
157
|
+
time: number;
|
|
158
|
+
kind: 'direct' | 'code';
|
|
159
|
+
model: string;
|
|
160
|
+
parentCallId?: string;
|
|
161
|
+
rootCallId?: string;
|
|
162
|
+
}
|
|
163
|
+
/** The projection state: plain JSON, persisted by the projection cache. */
|
|
164
|
+
export interface ToolUsageState {
|
|
165
|
+
stateVersion: 1;
|
|
166
|
+
calls: number;
|
|
167
|
+
errors: number;
|
|
168
|
+
unsettled: number;
|
|
169
|
+
/** Summed settled durations, ms. */
|
|
170
|
+
toolMs: number;
|
|
171
|
+
/** Distinct tool names actually tracked (bounded). */
|
|
172
|
+
uniqueTools: number;
|
|
173
|
+
byTool: Record<string, ToolUsageBucket>;
|
|
174
|
+
byModel: Record<string, ModelUsage>;
|
|
175
|
+
byOwner: Record<string, OwnerUsage>;
|
|
176
|
+
byDay: Record<string, DayUsage>;
|
|
177
|
+
byErrorCode: Record<string, number>;
|
|
178
|
+
recent: RecentCall[];
|
|
179
|
+
pending: Record<string, PendingCall>;
|
|
180
|
+
/** The route in force from the latest request/header. */
|
|
181
|
+
route: {
|
|
182
|
+
provider: string;
|
|
183
|
+
model: string;
|
|
184
|
+
} | null;
|
|
185
|
+
/** The model of the latest assistant message, scoped to its step. */
|
|
186
|
+
stepModel: {
|
|
187
|
+
turn: number;
|
|
188
|
+
step: number;
|
|
189
|
+
model: string;
|
|
190
|
+
} | null;
|
|
191
|
+
lastTurn: number | null;
|
|
192
|
+
/** Distinct tools that did not fit {@link TOOL_USAGE_CAPS.tools}. */
|
|
193
|
+
toolsTruncated: number;
|
|
194
|
+
/** Models that did not fit {@link TOOL_USAGE_CAPS.models}. */
|
|
195
|
+
modelsTruncated: number;
|
|
196
|
+
}
|
|
197
|
+
/** The compact value the client reads from `projectionValues`. */
|
|
198
|
+
export interface ToolUsageWire {
|
|
199
|
+
stateVersion: 1;
|
|
200
|
+
calls: number;
|
|
201
|
+
errors: number;
|
|
202
|
+
unsettled: number;
|
|
203
|
+
toolMs: number;
|
|
204
|
+
uniqueTools: number;
|
|
205
|
+
byOwner: Record<string, {
|
|
206
|
+
calls: number;
|
|
207
|
+
errors: number;
|
|
208
|
+
ms: number;
|
|
209
|
+
}>;
|
|
210
|
+
byModel: Record<string, {
|
|
211
|
+
calls: number;
|
|
212
|
+
errors: number;
|
|
213
|
+
tools: number;
|
|
214
|
+
ms: number;
|
|
215
|
+
}>;
|
|
216
|
+
byDay: Record<string, {
|
|
217
|
+
calls: number;
|
|
218
|
+
errors: number;
|
|
219
|
+
ms: number;
|
|
220
|
+
unsettled: number;
|
|
221
|
+
}>;
|
|
222
|
+
recent: Array<{
|
|
223
|
+
time: number;
|
|
224
|
+
name: string;
|
|
225
|
+
model: string;
|
|
226
|
+
ms: number | null;
|
|
227
|
+
ok: boolean | null;
|
|
228
|
+
kind: 'direct' | 'code';
|
|
229
|
+
code: string | null;
|
|
230
|
+
}>;
|
|
231
|
+
topTools: Array<{
|
|
232
|
+
name: string;
|
|
233
|
+
calls: number;
|
|
234
|
+
ms: number;
|
|
235
|
+
}>;
|
|
236
|
+
}
|
|
237
|
+
/** The structural event subset this fold consumes (so tests can synthesize logs). */
|
|
238
|
+
export type ToolUsageEvent = {
|
|
239
|
+
readonly type: 'request/header';
|
|
240
|
+
readonly time: number;
|
|
241
|
+
readonly data: {
|
|
242
|
+
readonly header: {
|
|
243
|
+
readonly config: {
|
|
244
|
+
readonly provider?: string;
|
|
245
|
+
readonly model?: string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
} | {
|
|
250
|
+
readonly type: 'assistant/message';
|
|
251
|
+
readonly time: number;
|
|
252
|
+
readonly data: {
|
|
253
|
+
readonly turn: number;
|
|
254
|
+
readonly step: number;
|
|
255
|
+
readonly message: {
|
|
256
|
+
readonly source: {
|
|
257
|
+
readonly model?: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
} | {
|
|
262
|
+
readonly type: 'tool/call';
|
|
263
|
+
readonly time: number;
|
|
264
|
+
readonly data: {
|
|
265
|
+
readonly turn: number;
|
|
266
|
+
readonly step: number;
|
|
267
|
+
readonly callId: string;
|
|
268
|
+
readonly name: string;
|
|
269
|
+
readonly arguments: string;
|
|
270
|
+
};
|
|
271
|
+
} | {
|
|
272
|
+
readonly type: 'tool/result';
|
|
273
|
+
readonly time: number;
|
|
274
|
+
readonly data: {
|
|
275
|
+
readonly turn: number;
|
|
276
|
+
readonly step: number;
|
|
277
|
+
readonly message: {
|
|
278
|
+
readonly source: {
|
|
279
|
+
readonly callId: string;
|
|
280
|
+
};
|
|
281
|
+
readonly isError?: boolean;
|
|
282
|
+
readonly content?: unknown;
|
|
283
|
+
};
|
|
284
|
+
readonly error?: {
|
|
285
|
+
readonly code?: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
} | {
|
|
289
|
+
readonly type: 'tool/ptc-dispatch-start';
|
|
290
|
+
readonly time: number;
|
|
291
|
+
readonly data: {
|
|
292
|
+
readonly rootCallId: string;
|
|
293
|
+
readonly parentCallId: string;
|
|
294
|
+
readonly subCallId: string;
|
|
295
|
+
readonly name: string;
|
|
296
|
+
readonly arguments?: unknown;
|
|
297
|
+
};
|
|
298
|
+
} | {
|
|
299
|
+
readonly type: 'tool/ptc-dispatch';
|
|
300
|
+
readonly time: number;
|
|
301
|
+
readonly data: {
|
|
302
|
+
readonly rootCallId: string;
|
|
303
|
+
readonly parentCallId: string;
|
|
304
|
+
readonly subCallId: string;
|
|
305
|
+
readonly name: string;
|
|
306
|
+
readonly arguments?: unknown;
|
|
307
|
+
readonly isError?: boolean;
|
|
308
|
+
readonly content?: unknown;
|
|
309
|
+
readonly error?: {
|
|
310
|
+
readonly code?: string;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: 'turn/end';
|
|
315
|
+
readonly time: number;
|
|
316
|
+
readonly data: {
|
|
317
|
+
readonly turn: number;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
/** A fresh empty state. */
|
|
321
|
+
export declare function initToolUsageState(): ToolUsageState;
|
|
322
|
+
/** The host-local `YYYY-MM-DD` day key for one timestamp (shared with the report). */
|
|
323
|
+
export declare function toolUsageDayKey(time: number): string;
|
|
324
|
+
/** Fold one event into the state. Uninteresting events return the same reference. */
|
|
325
|
+
export declare function foldToolUsageEvent(state: ToolUsageState, event: ToolUsageEvent): ToolUsageState;
|
|
326
|
+
/** The compact wire value, derived only from the detail state. */
|
|
327
|
+
export declare function toolUsageWire(state: ToolUsageState): ToolUsageWire;
|
|
328
|
+
/**
|
|
329
|
+
* A strict schema boundary.
|
|
330
|
+
*
|
|
331
|
+
* The projection contract types its schemas as `ZodType`, but the registry's only
|
|
332
|
+
* runtime use is `parse(value)`. Hand-written validators implement exactly that and
|
|
333
|
+
* keep this plugin from depending on a SECOND zod installation: the harness checkout
|
|
334
|
+
* and this workspace resolve different zod copies, and a structural same-shape object
|
|
335
|
+
* is not assignable between them. The validators are strict — an unknown field is a
|
|
336
|
+
* parse failure — so a stale cache row or a corrupt wire value is rejected, never
|
|
337
|
+
* rendered as zeros.
|
|
338
|
+
*/
|
|
339
|
+
export interface ProjectionSchema<T> {
|
|
340
|
+
parse(value: unknown): T;
|
|
341
|
+
safeParse(value: unknown): {
|
|
342
|
+
readonly success: true;
|
|
343
|
+
readonly data: T;
|
|
344
|
+
} | {
|
|
345
|
+
readonly success: false;
|
|
346
|
+
readonly error: Error;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
/** One validation failure, named with the path that failed. */
|
|
350
|
+
export declare class ToolUsageSchemaError extends Error {
|
|
351
|
+
readonly name = "ToolUsageSchemaError";
|
|
352
|
+
}
|
|
353
|
+
/** The strict persisted-state schema (the projection cache's input boundary). */
|
|
354
|
+
export declare const toolUsageStateSchema: ProjectionSchema<ToolUsageState>;
|
|
355
|
+
/** The compact wire's strict shape (the host's outbound boundary). */
|
|
356
|
+
export declare const toolUsageWireSchema: ProjectionSchema<ToolUsageWire>;
|
|
357
|
+
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
358
|
+
interface SessionProjectionStateMap {
|
|
359
|
+
toolModeUsage: ToolUsageState;
|
|
360
|
+
}
|
|
361
|
+
interface SessionProjectionMap {
|
|
362
|
+
toolModeUsage: ToolUsageWire;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The projection unit this module registers, typed locally.
|
|
367
|
+
*
|
|
368
|
+
* The harness contract types the schemas as `ZodType`; this plugin deliberately keeps
|
|
369
|
+
* its own zod-free schema surface (see {@link ProjectionSchema}) and the host casts
|
|
370
|
+
* once at registration, where the projection contract is the authority.
|
|
371
|
+
*/
|
|
372
|
+
export interface ToolUsageProjectionDefinition {
|
|
373
|
+
readonly key: typeof TOOL_USAGE_KEY;
|
|
374
|
+
readonly stateVersion: number;
|
|
375
|
+
readonly stateSchema: ProjectionSchema<ToolUsageState>;
|
|
376
|
+
init(): ToolUsageState;
|
|
377
|
+
apply(state: ToolUsageState, event: SessionEvent): ToolUsageState;
|
|
378
|
+
readonly wire: {
|
|
379
|
+
readonly viewSchema: ProjectionSchema<ToolUsageWire>;
|
|
380
|
+
view(state: ToolUsageState): ToolUsageWire;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The registered unit. Its STATE is the detail; its WIRE is the compact value.
|
|
385
|
+
*
|
|
386
|
+
* `apply` receives a full `SessionEvent`; the fold reads only the seven event types
|
|
387
|
+
* declared by {@link ToolUsageEvent} and returns the state unchanged otherwise.
|
|
388
|
+
*/
|
|
389
|
+
export declare const toolUsageProjectionDefinition: ToolUsageProjectionDefinition;
|
|
390
|
+
//# sourceMappingURL=tool-usage-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-usage-projection.d.ts","sourceRoot":"","sources":["../src/tool-usage-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,+EAA+E;AAC/E,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAE7C,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAEhD,4EAA4E;AAC5E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C;;;;;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