@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,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coherent publication from one versioned generation (EXT-24).
|
|
3
|
+
*
|
|
4
|
+
* EXT-24 forbids two observable states: an available tool WITHOUT its executable
|
|
5
|
+
* binding, and a new schema served by an old handler. The way to avoid both is to
|
|
6
|
+
* build the whole surface first, check it for internal consistency, and only then
|
|
7
|
+
* make it visible — staging plus a single switch, which is what the requirement
|
|
8
|
+
* asks for rather than an invented transactional registry API.
|
|
9
|
+
*
|
|
10
|
+
* The rules encoded here, each with a reason:
|
|
11
|
+
*
|
|
12
|
+
* - A tool is advertised only when a real implementation binding exists. A schema
|
|
13
|
+
* alone is a promise nothing can keep, and EXT-24 states that no contract is
|
|
14
|
+
* automatically callable merely because its schema is installed.
|
|
15
|
+
* - An ACTIVE package whose model is unprepared publishes readiness information and
|
|
16
|
+
* a preparation skill, but NOT a working inference tool. Advertising a callable
|
|
17
|
+
* tool that will fail on first use is worse than advertising nothing, because the
|
|
18
|
+
* caller has no way to tell the difference until it fails.
|
|
19
|
+
* - A usage skill appears only when every tool it requires is visible. A skill that
|
|
20
|
+
* instructs an agent to call a tool that is not there produces a confident
|
|
21
|
+
* failure.
|
|
22
|
+
* - Every skill carries its owning extension, so it can be withdrawn with that
|
|
23
|
+
* package rather than outliving it.
|
|
24
|
+
*
|
|
25
|
+
* @module @try-works/dsh-tool-mode/publication
|
|
26
|
+
*/
|
|
27
|
+
const CALLABLE_READINESS = new Set([
|
|
28
|
+
'prepared-cold',
|
|
29
|
+
'loading',
|
|
30
|
+
'ready',
|
|
31
|
+
'busy',
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Build a coherent surface from the candidates available now.
|
|
35
|
+
*
|
|
36
|
+
* Pure: it decides what MAY be published, and the caller makes the result visible.
|
|
37
|
+
* Keeping the decision separate from the switch is what allows a surface to be
|
|
38
|
+
* rejected before anything observes it.
|
|
39
|
+
* @param options - the candidates and the generation they belong to.
|
|
40
|
+
* @returns the complete surface, including what was withheld and why.
|
|
41
|
+
* @throws Error when the candidates are internally inconsistent in a way that
|
|
42
|
+
* cannot be resolved by withholding, such as two tools sharing a name.
|
|
43
|
+
*/
|
|
44
|
+
export function buildSurface(options) {
|
|
45
|
+
const tools = [];
|
|
46
|
+
const readiness = [];
|
|
47
|
+
const withheld = [];
|
|
48
|
+
// A duplicate tool name cannot be resolved by dropping one: the caller asked for
|
|
49
|
+
// a specific name and would get a different implementation than the catalog says.
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
for (const candidate of options.tools) {
|
|
52
|
+
if (seen.has(candidate.name)) {
|
|
53
|
+
throw new Error(`two contracts publish the tool name ${JSON.stringify(candidate.name)}; `
|
|
54
|
+
+ 'a name identifies one tool, so this cannot be resolved by withholding');
|
|
55
|
+
}
|
|
56
|
+
seen.add(candidate.name);
|
|
57
|
+
}
|
|
58
|
+
for (const candidate of options.tools) {
|
|
59
|
+
const runnable = candidate.implementations.filter(impl => impl.runnable);
|
|
60
|
+
for (const implementation of candidate.implementations) {
|
|
61
|
+
readiness.push({
|
|
62
|
+
extensionId: implementation.extensionId,
|
|
63
|
+
modelId: implementation.modelId,
|
|
64
|
+
readiness: implementation.readiness,
|
|
65
|
+
// Callable requires BOTH that the host can run it and that preparation
|
|
66
|
+
// says a call is possible. Residency states such as prepared-cold/loading
|
|
67
|
+
// affect admission, not publication (RES-04).
|
|
68
|
+
callable: implementation.runnable && CALLABLE_READINESS.has(implementation.readiness),
|
|
69
|
+
reason: !implementation.runnable
|
|
70
|
+
? 'this model cannot run on this host'
|
|
71
|
+
: CALLABLE_READINESS.has(implementation.readiness)
|
|
72
|
+
? `model is ${implementation.readiness}; prepared and callable`
|
|
73
|
+
: `model is ${implementation.readiness}; the tool is not advertised as working`,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const selected = candidate.implementations.find(impl => impl.modelId === candidate.selectedModelId);
|
|
77
|
+
if (selected === undefined || !selected.runnable) {
|
|
78
|
+
withheld.push({
|
|
79
|
+
code: 'no-implementation',
|
|
80
|
+
subject: candidate.name,
|
|
81
|
+
extensionId: selected?.extensionId ?? candidate.implementations[0]?.extensionId ?? 'unknown',
|
|
82
|
+
message: 'no runnable implementation is bound, so the tool is not published',
|
|
83
|
+
});
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (selected.readiness === 'failed') {
|
|
87
|
+
withheld.push({
|
|
88
|
+
code: 'model-failed',
|
|
89
|
+
subject: candidate.name,
|
|
90
|
+
extensionId: selected.extensionId,
|
|
91
|
+
message: 'the selected model deployment has failed and will not become ready by waiting',
|
|
92
|
+
});
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (!CALLABLE_READINESS.has(selected.readiness)) {
|
|
96
|
+
// EXT-24: an active package with an unprepared model may publish readiness
|
|
97
|
+
// and preparation guidance, but MUST NOT advertise working inference.
|
|
98
|
+
withheld.push({
|
|
99
|
+
code: 'needs-preparation',
|
|
100
|
+
subject: candidate.name,
|
|
101
|
+
extensionId: selected.extensionId,
|
|
102
|
+
message: `the selected model is ${selected.readiness}; readiness is published instead of a callable tool`,
|
|
103
|
+
});
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
tools.push({
|
|
107
|
+
name: candidate.name,
|
|
108
|
+
contractId: candidate.contractId,
|
|
109
|
+
extensionId: selected.extensionId,
|
|
110
|
+
modelId: selected.modelId,
|
|
111
|
+
readiness: selected.readiness,
|
|
112
|
+
alternatives: runnable.filter(impl => impl.modelId !== selected.modelId).map(impl => impl.modelId),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
const visible = new Set(tools.map(tool => tool.name));
|
|
116
|
+
const skills = [];
|
|
117
|
+
for (const candidate of options.skills) {
|
|
118
|
+
const purpose = candidate.purpose ?? 'usage';
|
|
119
|
+
const required = candidate.requiresTools ?? [];
|
|
120
|
+
if (purpose === 'usage') {
|
|
121
|
+
const missing = required.filter(name => !visible.has(name));
|
|
122
|
+
if (missing.length > 0) {
|
|
123
|
+
// A usage skill whose tool is absent would instruct an agent to call
|
|
124
|
+
// something that is not there, producing a confident failure.
|
|
125
|
+
withheld.push({
|
|
126
|
+
code: 'unregistered-contribution',
|
|
127
|
+
subject: candidate.name,
|
|
128
|
+
extensionId: candidate.extensionId,
|
|
129
|
+
message: `the required tool(s) ${missing.join(', ')} are not visible, so the usage skill is withheld`,
|
|
130
|
+
});
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
skills.push({ name: candidate.name, extensionId: candidate.extensionId, purpose, requiresTools: required });
|
|
135
|
+
}
|
|
136
|
+
return { generation: options.generation, tools, skills, readiness, withheld };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The published surface, swapped only as a whole (EXT-24).
|
|
140
|
+
*
|
|
141
|
+
* `publish` refuses a surface that would retire a tool without retiring the skill
|
|
142
|
+
* that teaches it, which is the "new schema with the old handler" failure seen from
|
|
143
|
+
* the other side.
|
|
144
|
+
*/
|
|
145
|
+
export class PublicationSurface {
|
|
146
|
+
#current;
|
|
147
|
+
#onSwap;
|
|
148
|
+
constructor(options = {}) {
|
|
149
|
+
this.#current = { generation: options.generation ?? 1, tools: [], skills: [], readiness: [], withheld: [] };
|
|
150
|
+
this.#onSwap = options.onSwap;
|
|
151
|
+
}
|
|
152
|
+
/** The generation currently visible. */
|
|
153
|
+
get current() {
|
|
154
|
+
return this.#current;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Replace the visible surface.
|
|
158
|
+
*
|
|
159
|
+
* The callback receives the whole change at once, so a consumer can update its
|
|
160
|
+
* declarations without ever seeing an intermediate state.
|
|
161
|
+
* @param next - the surface to make visible.
|
|
162
|
+
*/
|
|
163
|
+
publish(next) {
|
|
164
|
+
const previous = this.#current;
|
|
165
|
+
this.#current = next;
|
|
166
|
+
this.#onSwap?.(next, previous);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Skills that must be withdrawn because their owning extension is gone.
|
|
170
|
+
*
|
|
171
|
+
* EXT-24 requires the host to track skill provenance and remove a skill with the
|
|
172
|
+
* package or tool that owns it, rather than leaving orphaned guidance behind.
|
|
173
|
+
* @param liveExtensionIds - the extensions still installed and active.
|
|
174
|
+
* @returns the skills that should no longer be visible.
|
|
175
|
+
*/
|
|
176
|
+
orphanedSkills(liveExtensionIds) {
|
|
177
|
+
const live = new Set(liveExtensionIds);
|
|
178
|
+
return this.#current.skills.filter(skill => !live.has(skill.extensionId));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=publication.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-backed invocation-receipt store (EXT-35, recommendation slice 2).
|
|
3
|
+
*
|
|
4
|
+
* The host used to keep receipts only in a bounded in-memory ring, so a restart
|
|
5
|
+
* forgot every receipt. This store persists them next to the configured state
|
|
6
|
+
* file, bounded and atomically written, and it QUARANTINES malformed data rather
|
|
7
|
+
* than silently pretending the store was empty.
|
|
8
|
+
*
|
|
9
|
+
* Receipts are provenance, not content: the record shape is host-authored and
|
|
10
|
+
* never carries a request body, token, or full skill text (see receipt.ts).
|
|
11
|
+
*
|
|
12
|
+
* @module @try-works/dsh-tool-mode/receipt-store
|
|
13
|
+
*/
|
|
14
|
+
import { type InvocationReceipt } from './receipt.ts';
|
|
15
|
+
/** The on-disk document version, so a future shape can refuse incompatible files. */
|
|
16
|
+
export declare const RECEIPT_STORE_VERSION = 1;
|
|
17
|
+
/** Where the receipt store lives for a given state file. */
|
|
18
|
+
export declare function receiptStorePathFor(stateFile: string): string;
|
|
19
|
+
/** One malformed store that was moved aside instead of being trusted. */
|
|
20
|
+
export interface ReceiptQuarantine {
|
|
21
|
+
/** Where the offending bytes were moved. */
|
|
22
|
+
readonly quarantinePath: string;
|
|
23
|
+
/** Why the document was refused. Never contains receipt content. */
|
|
24
|
+
readonly reason: string;
|
|
25
|
+
}
|
|
26
|
+
/** What a receipt store exposes. */
|
|
27
|
+
export interface ReceiptStore {
|
|
28
|
+
/** The file path, or a synthetic path for the memory store. */
|
|
29
|
+
readonly path: string;
|
|
30
|
+
/** Where malformed data was moved, when this instance quarantined a file. */
|
|
31
|
+
readonly quarantinePath?: string | undefined;
|
|
32
|
+
/** The persisted receipts, oldest first, at most the configured limit. */
|
|
33
|
+
readonly records: readonly InvocationReceipt[];
|
|
34
|
+
/** Append one receipt, enforce the bound, and persist it. */
|
|
35
|
+
append(receipt: InvocationReceipt): void;
|
|
36
|
+
}
|
|
37
|
+
/** Store construction options. */
|
|
38
|
+
export interface ReceiptStoreOptions {
|
|
39
|
+
/** Retention bound; defaults to MAX_RETAINED_RECEIPTS. */
|
|
40
|
+
readonly limit?: number;
|
|
41
|
+
/** Called once for a malformed document, after it is moved aside. */
|
|
42
|
+
readonly onQuarantine?: (quarantine: ReceiptQuarantine) => void;
|
|
43
|
+
}
|
|
44
|
+
/** A file-backed store; the in-memory ring stays the host's read cache. */
|
|
45
|
+
export declare function createFileReceiptStore(path: string, options?: ReceiptStoreOptions): ReceiptStore;
|
|
46
|
+
/** The memory store used when persistence is disabled; same contract, no file. */
|
|
47
|
+
export declare function createMemoryReceiptStore(options?: ReceiptStoreOptions): ReceiptStore;
|
|
48
|
+
/**
|
|
49
|
+
* The highest receipt counter already used by `receipts`.
|
|
50
|
+
*
|
|
51
|
+
* Receipt ids are `rcpt_` plus a zero-padded base-36 counter. A new host continues
|
|
52
|
+
* from this floor so an id is never reused after a restart.
|
|
53
|
+
* @param receipts - the persisted receipts.
|
|
54
|
+
* @returns the highest counter, or 0 when none parse.
|
|
55
|
+
*/
|
|
56
|
+
export declare function receiptCounterFloor(receipts: readonly InvocationReceipt[]): number;
|
|
57
|
+
//# sourceMappingURL=receipt-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-store.d.ts","sourceRoot":"","sources":["../src/receipt-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE5E,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAEtC,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,oCAAoC;AACpC,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5C,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC9C,6DAA6D;IAC7D,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACzC;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,qEAAqE;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAChE;AA6CD,2EAA2E;AAC3E,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAuCpG;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAYxF;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAQlF"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File-backed invocation-receipt store (EXT-35, recommendation slice 2).
|
|
3
|
+
*
|
|
4
|
+
* The host used to keep receipts only in a bounded in-memory ring, so a restart
|
|
5
|
+
* forgot every receipt. This store persists them next to the configured state
|
|
6
|
+
* file, bounded and atomically written, and it QUARANTINES malformed data rather
|
|
7
|
+
* than silently pretending the store was empty.
|
|
8
|
+
*
|
|
9
|
+
* Receipts are provenance, not content: the record shape is host-authored and
|
|
10
|
+
* never carries a request body, token, or full skill text (see receipt.ts).
|
|
11
|
+
*
|
|
12
|
+
* @module @try-works/dsh-tool-mode/receipt-store
|
|
13
|
+
*/
|
|
14
|
+
/*
|
|
15
|
+
* This module IS the I/O boundary for a hand-editable file: parsing `unknown`
|
|
16
|
+
* JSON is its job, and the shape checks below are the parser. The generic
|
|
17
|
+
* anti-slop rules assume a typed caller, so they are disabled only for this
|
|
18
|
+
* parser, and any mismatch quarantines the file instead of trusting it.
|
|
19
|
+
*/
|
|
20
|
+
/* oxlint-disable anti-slop/no-unknown-parameters, anti-slop/no-runtime-typeof, anti-slop/no-unsafe-dictionary-type, anti-slop/require-safety-comment-for-type-assertion */
|
|
21
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
22
|
+
import { randomBytes } from 'node:crypto';
|
|
23
|
+
import { dirname } from 'node:path';
|
|
24
|
+
import { MAX_RETAINED_RECEIPTS } from "./receipt.js";
|
|
25
|
+
/** The on-disk document version, so a future shape can refuse incompatible files. */
|
|
26
|
+
export const RECEIPT_STORE_VERSION = 1;
|
|
27
|
+
/** Where the receipt store lives for a given state file. */
|
|
28
|
+
export function receiptStorePathFor(stateFile) {
|
|
29
|
+
return `${stateFile}.receipts.json`;
|
|
30
|
+
}
|
|
31
|
+
/** A receipt is shaped by the host, but a file may be hand-edited or truncated. */
|
|
32
|
+
function isReceipt(value) {
|
|
33
|
+
if (typeof value !== 'object' || value === null)
|
|
34
|
+
return false;
|
|
35
|
+
const record = value;
|
|
36
|
+
return typeof record['receiptId'] === 'string'
|
|
37
|
+
&& record['receiptId'].length > 0
|
|
38
|
+
&& typeof record['contract'] === 'string'
|
|
39
|
+
&& typeof record['implementationId'] === 'string'
|
|
40
|
+
&& typeof record['extension'] === 'string'
|
|
41
|
+
&& typeof record['modelIdentity'] === 'string'
|
|
42
|
+
&& typeof record['activationGeneration'] === 'number'
|
|
43
|
+
&& Array.isArray(record['warnings']);
|
|
44
|
+
}
|
|
45
|
+
/** Parse one document, distinguishing "absent" from "malformed". */
|
|
46
|
+
function parseDocument(text) {
|
|
47
|
+
let parsed;
|
|
48
|
+
try {
|
|
49
|
+
parsed = JSON.parse(text);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
return { ok: false, reason: `not valid JSON: ${error instanceof Error ? error.message : String(error)}` };
|
|
53
|
+
}
|
|
54
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
55
|
+
return { ok: false, reason: 'the document is not a JSON object' };
|
|
56
|
+
const document = parsed;
|
|
57
|
+
if (document.version !== RECEIPT_STORE_VERSION) {
|
|
58
|
+
return { ok: false, reason: `unsupported receipt store version ${String(document.version)}` };
|
|
59
|
+
}
|
|
60
|
+
if (!Array.isArray(document.receipts))
|
|
61
|
+
return { ok: false, reason: 'receipts is not an array' };
|
|
62
|
+
const invalid = document.receipts.find(receipt => !isReceipt(receipt));
|
|
63
|
+
if (invalid !== undefined)
|
|
64
|
+
return { ok: false, reason: 'the store contains a malformed receipt' };
|
|
65
|
+
return { ok: true, receipts: document.receipts };
|
|
66
|
+
}
|
|
67
|
+
/** Keep the newest `limit` receipts, never exceeding it. */
|
|
68
|
+
function bounded(receipts, limit) {
|
|
69
|
+
return receipts.length > limit ? receipts.slice(receipts.length - limit) : receipts;
|
|
70
|
+
}
|
|
71
|
+
/** A file-backed store; the in-memory ring stays the host's read cache. */
|
|
72
|
+
export function createFileReceiptStore(path, options = {}) {
|
|
73
|
+
const limit = options.limit ?? MAX_RETAINED_RECEIPTS;
|
|
74
|
+
let records = [];
|
|
75
|
+
let quarantinePath;
|
|
76
|
+
if (existsSync(path)) {
|
|
77
|
+
const text = readFileSync(path, 'utf8');
|
|
78
|
+
const parsed = parseDocument(text);
|
|
79
|
+
if (parsed.ok) {
|
|
80
|
+
records = bounded([...parsed.receipts], limit);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// QUARANTINE, never "start empty": overwriting the bytes would destroy the
|
|
84
|
+
// only evidence of what the store used to hold.
|
|
85
|
+
quarantinePath = `${path}.quarantined-${Date.now().toString(36)}-${randomBytes(4).toString('hex')}`;
|
|
86
|
+
renameSync(path, quarantinePath);
|
|
87
|
+
options.onQuarantine?.({ quarantinePath, reason: parsed.reason });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const persist = () => {
|
|
91
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
92
|
+
const temporary = `${path}.tmp-${process.pid.toString(36)}-${randomBytes(6).toString('hex')}`;
|
|
93
|
+
writeFileSync(temporary, `${JSON.stringify({ version: RECEIPT_STORE_VERSION, receipts: records }, null, 2)}\n`, { mode: 0o600 });
|
|
94
|
+
renameSync(temporary, path);
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
path,
|
|
98
|
+
get quarantinePath() {
|
|
99
|
+
return quarantinePath;
|
|
100
|
+
},
|
|
101
|
+
get records() {
|
|
102
|
+
return records;
|
|
103
|
+
},
|
|
104
|
+
append(receipt) {
|
|
105
|
+
records = bounded([...records, receipt], limit);
|
|
106
|
+
persist();
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** The memory store used when persistence is disabled; same contract, no file. */
|
|
111
|
+
export function createMemoryReceiptStore(options = {}) {
|
|
112
|
+
const limit = options.limit ?? MAX_RETAINED_RECEIPTS;
|
|
113
|
+
let records = [];
|
|
114
|
+
return {
|
|
115
|
+
path: '(memory)',
|
|
116
|
+
get records() {
|
|
117
|
+
return records;
|
|
118
|
+
},
|
|
119
|
+
append(receipt) {
|
|
120
|
+
records = bounded([...records, receipt], limit);
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The highest receipt counter already used by `receipts`.
|
|
126
|
+
*
|
|
127
|
+
* Receipt ids are `rcpt_` plus a zero-padded base-36 counter. A new host continues
|
|
128
|
+
* from this floor so an id is never reused after a restart.
|
|
129
|
+
* @param receipts - the persisted receipts.
|
|
130
|
+
* @returns the highest counter, or 0 when none parse.
|
|
131
|
+
*/
|
|
132
|
+
export function receiptCounterFloor(receipts) {
|
|
133
|
+
let floor = 0;
|
|
134
|
+
for (const receipt of receipts) {
|
|
135
|
+
if (!receipt.receiptId.startsWith('rcpt_'))
|
|
136
|
+
continue;
|
|
137
|
+
const value = Number.parseInt(receipt.receiptId.slice('rcpt_'.length), 36);
|
|
138
|
+
if (Number.isSafeInteger(value) && value > floor)
|
|
139
|
+
floor = value;
|
|
140
|
+
}
|
|
141
|
+
return floor;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=receipt-store.js.map
|
package/lib/receipt.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invocation receipts and lifecycle records (EXT-35).
|
|
3
|
+
*
|
|
4
|
+
* EXT-35 asks for two different things, recorded SEPARATELY, and the separation is
|
|
5
|
+
* the point:
|
|
6
|
+
*
|
|
7
|
+
* - An **invocation receipt** says what ran: the extension, its version and content
|
|
8
|
+
* digest, the model/recipe identity, and the activation generation. It travels
|
|
9
|
+
* with the result.
|
|
10
|
+
* - A **lifecycle record** says who changed the installation: install, activate,
|
|
11
|
+
* deactivate, update and uninstall outcomes together with the approving
|
|
12
|
+
* principal. It does not travel with a result, because it describes an operator
|
|
13
|
+
* action rather than a call.
|
|
14
|
+
*
|
|
15
|
+
* Mixing them would mean a caller reading a receipt learns about operator actions
|
|
16
|
+
* it has no business seeing, and an audit trail becomes indistinguishable from
|
|
17
|
+
* execution metadata.
|
|
18
|
+
*
|
|
19
|
+
* The metadata-only rule is enforced by CONSTRUCTION rather than by remembering to
|
|
20
|
+
* be careful. Nothing here accepts a request body, a token, or a full skill text,
|
|
21
|
+
* and a path is reduced before it can enter a receipt at all — so a future caller
|
|
22
|
+
* cannot leak one by passing it in.
|
|
23
|
+
*
|
|
24
|
+
* @module @try-works/dsh-tool-mode/receipt
|
|
25
|
+
*/
|
|
26
|
+
import type { ExecutionLocation } from '@try-works/tool-mode-contracts';
|
|
27
|
+
/** How many invocation receipts are retained (EXT-35), in memory and on disk. */
|
|
28
|
+
export declare const MAX_RETAINED_RECEIPTS = 200;
|
|
29
|
+
/** Provenance attached to one invocation. All fields are host-authored. */
|
|
30
|
+
export interface InvocationReceipt {
|
|
31
|
+
/** Opaque receipt identity, unique per call. */
|
|
32
|
+
readonly receiptId: string;
|
|
33
|
+
/** The contract that was invoked. */
|
|
34
|
+
readonly contract: string;
|
|
35
|
+
/** The contract version, so a receipt is interpretable after a schema change. */
|
|
36
|
+
readonly contractVersion: string;
|
|
37
|
+
/** The implementation selected by the host. */
|
|
38
|
+
readonly implementationId: string;
|
|
39
|
+
/** The extension package that provided it. */
|
|
40
|
+
readonly extension: string;
|
|
41
|
+
/** The extension package version. */
|
|
42
|
+
readonly extensionVersion: string;
|
|
43
|
+
/**
|
|
44
|
+
* The installed content digest of the extension.
|
|
45
|
+
*
|
|
46
|
+
* Recorded because a version alone does not identify bytes: a package can be
|
|
47
|
+
* replaced at the same version, and a receipt that only names the version could
|
|
48
|
+
* not distinguish the two runs.
|
|
49
|
+
*/
|
|
50
|
+
readonly extensionContentDigest: string | null;
|
|
51
|
+
/** The resolved dependency-lock digest, when the store recorded one. */
|
|
52
|
+
readonly dependencyLockDigest: string | null;
|
|
53
|
+
/** The model or recipe identity that actually ran. */
|
|
54
|
+
readonly modelIdentity: string;
|
|
55
|
+
/** The recipe version, which pins preprocessing and postprocessing. */
|
|
56
|
+
readonly recipeVersion: string | null;
|
|
57
|
+
/** The catalog generation this invocation was served from. */
|
|
58
|
+
readonly activationGeneration: number;
|
|
59
|
+
/**
|
|
60
|
+
* Where inference happened.
|
|
61
|
+
*
|
|
62
|
+
* The shared vocabulary from the contracts package, reused rather than restated:
|
|
63
|
+
* a second definition would drift, and a receipt whose location field disagreed
|
|
64
|
+
* with its own envelope's would be worse than one without the field.
|
|
65
|
+
*/
|
|
66
|
+
readonly executionLocation: ExecutionLocation;
|
|
67
|
+
/** Non-fatal notes, already free of caller content. */
|
|
68
|
+
readonly warnings: readonly string[];
|
|
69
|
+
/** Which provenance lane produced this receipt (OBS-01). */
|
|
70
|
+
readonly kind?: 'invocation' | 'nested' | 'auxiliary' | 'external';
|
|
71
|
+
/** The composition receipt a nested call belongs to. */
|
|
72
|
+
readonly parentReceiptId?: string | null;
|
|
73
|
+
/** Terminal outcome, when the producing lane knows it. */
|
|
74
|
+
readonly outcome?: 'ok' | 'failed' | 'cancelled' | 'policy-denied' | 'timed-out';
|
|
75
|
+
/** Token usage, or the honest unknown (never zero) for a lane that cannot measure it. */
|
|
76
|
+
readonly usage?: {
|
|
77
|
+
readonly inputTokens: number;
|
|
78
|
+
readonly outputTokens: number;
|
|
79
|
+
} | 'unknown';
|
|
80
|
+
/** Monetary cost, or the honest unknown. */
|
|
81
|
+
readonly cost?: {
|
|
82
|
+
readonly amount: number;
|
|
83
|
+
readonly currency: string;
|
|
84
|
+
} | 'unknown';
|
|
85
|
+
}
|
|
86
|
+
/** The lifecycle operations EXT-35 requires recorded. */
|
|
87
|
+
export type LifecycleOperation = 'install' | 'activate' | 'deactivate' | 'update' | 'uninstall' | 'prepare';
|
|
88
|
+
/** The outcome of a lifecycle operation. */
|
|
89
|
+
export type LifecycleOutcome = 'succeeded' | 'failed' | 'refused' | 'rolled-back';
|
|
90
|
+
/** Who approved an operator action. */
|
|
91
|
+
export type ApprovingPrincipal =
|
|
92
|
+
/** The interactive operator at the console. */
|
|
93
|
+
{
|
|
94
|
+
readonly kind: 'operator';
|
|
95
|
+
readonly identity: string;
|
|
96
|
+
}
|
|
97
|
+
/** A management grant presented by an external client. */
|
|
98
|
+
| {
|
|
99
|
+
readonly kind: 'client-grant';
|
|
100
|
+
readonly grantId: string;
|
|
101
|
+
}
|
|
102
|
+
/** An automated policy, named so it can be audited. */
|
|
103
|
+
| {
|
|
104
|
+
readonly kind: 'policy';
|
|
105
|
+
readonly policyId: string;
|
|
106
|
+
};
|
|
107
|
+
/** One operator action, recorded apart from execution metadata. */
|
|
108
|
+
export interface LifecycleRecord {
|
|
109
|
+
/** What was attempted. */
|
|
110
|
+
readonly operation: LifecycleOperation;
|
|
111
|
+
/** The extension it concerned. */
|
|
112
|
+
readonly extensionId: string;
|
|
113
|
+
/** The version, when the operation concerned one. */
|
|
114
|
+
readonly version: string | null;
|
|
115
|
+
/** The content digest, when known. */
|
|
116
|
+
readonly contentDigest: string | null;
|
|
117
|
+
/** The profile, for the profile-scoped operations. */
|
|
118
|
+
readonly profile: string | null;
|
|
119
|
+
/** What happened. */
|
|
120
|
+
readonly outcome: LifecycleOutcome;
|
|
121
|
+
/** Why it did not succeed, when it did not. */
|
|
122
|
+
readonly reason: string | null;
|
|
123
|
+
/** Who approved it. Never inferred from the request. */
|
|
124
|
+
readonly approvedBy: ApprovingPrincipal;
|
|
125
|
+
/** When it happened, ISO 8601. */
|
|
126
|
+
readonly at: string;
|
|
127
|
+
}
|
|
128
|
+
/** Raised when a value cannot be admitted to a receipt. */
|
|
129
|
+
export declare class ReceiptRedactionError extends Error {
|
|
130
|
+
readonly name = "ReceiptRedactionError";
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Reduce a caller-supplied path to something safe to record.
|
|
134
|
+
*
|
|
135
|
+
* EXT-35 forbids unrestricted file paths in default receipts, and the reason is
|
|
136
|
+
* that a path discloses the operator's layout: directory names, a username, a
|
|
137
|
+
* project name. The basename is enough to correlate a receipt with a call, and a
|
|
138
|
+
* short digest makes two references to the same path comparable without revealing
|
|
139
|
+
* where it is.
|
|
140
|
+
* @param path - the caller-supplied path.
|
|
141
|
+
* @returns the basename plus a short digest, or null.
|
|
142
|
+
*/
|
|
143
|
+
export declare function redactPath(path: string | undefined): string | null;
|
|
144
|
+
/**
|
|
145
|
+
* Redact anything token-shaped from a free-text note.
|
|
146
|
+
*
|
|
147
|
+
* Notes are authored by the host, but a note that embedded a value read from the
|
|
148
|
+
* environment would leak it. This is a guard against that, not a substitute for
|
|
149
|
+
* not putting secrets in notes.
|
|
150
|
+
* @param text - the note.
|
|
151
|
+
* @returns the note with credential-shaped spans removed.
|
|
152
|
+
*/
|
|
153
|
+
export declare function redactText(text: string): string;
|
|
154
|
+
/**
|
|
155
|
+
* Build the invocation receipt for one call.
|
|
156
|
+
*
|
|
157
|
+
* Takes only host-resolved inputs. There is no parameter for a request body, a
|
|
158
|
+
* token or a skill text, so those cannot reach a receipt through this function at
|
|
159
|
+
* all — which is a stronger guarantee than remembering to omit them.
|
|
160
|
+
* @param input - the resolved provenance.
|
|
161
|
+
* @returns the receipt.
|
|
162
|
+
*/
|
|
163
|
+
export declare function buildInvocationReceipt(input: {
|
|
164
|
+
readonly receiptId: string;
|
|
165
|
+
readonly contract: string;
|
|
166
|
+
readonly contractVersion: string;
|
|
167
|
+
readonly implementationId: string;
|
|
168
|
+
readonly extension: string;
|
|
169
|
+
readonly extensionVersion: string;
|
|
170
|
+
readonly extensionContentDigest?: string | null;
|
|
171
|
+
readonly dependencyLockDigest?: string | null;
|
|
172
|
+
readonly modelIdentity: string;
|
|
173
|
+
readonly recipeVersion?: string | null;
|
|
174
|
+
readonly activationGeneration: number;
|
|
175
|
+
readonly executionLocation: InvocationReceipt['executionLocation'];
|
|
176
|
+
readonly warnings?: readonly string[];
|
|
177
|
+
readonly kind?: InvocationReceipt['kind'];
|
|
178
|
+
readonly parentReceiptId?: string | null;
|
|
179
|
+
readonly outcome?: InvocationReceipt['outcome'];
|
|
180
|
+
readonly usage?: InvocationReceipt['usage'];
|
|
181
|
+
readonly cost?: InvocationReceipt['cost'];
|
|
182
|
+
}): InvocationReceipt;
|
|
183
|
+
/**
|
|
184
|
+
* Record one operator action, separately from execution metadata.
|
|
185
|
+
* @param input - the action, its outcome and its approving principal.
|
|
186
|
+
* @returns the lifecycle record.
|
|
187
|
+
*/
|
|
188
|
+
export declare function buildLifecycleRecord(input: {
|
|
189
|
+
readonly operation: LifecycleOperation;
|
|
190
|
+
readonly extensionId: string;
|
|
191
|
+
readonly version?: string | null;
|
|
192
|
+
readonly contentDigest?: string | null;
|
|
193
|
+
readonly profile?: string | null;
|
|
194
|
+
readonly outcome: LifecycleOutcome;
|
|
195
|
+
readonly reason?: string | null;
|
|
196
|
+
readonly approvedBy: ApprovingPrincipal;
|
|
197
|
+
readonly at?: string;
|
|
198
|
+
}): LifecycleRecord;
|
|
199
|
+
/**
|
|
200
|
+
* The bounded-logging policy an extension's diagnostics run under (EXT-35).
|
|
201
|
+
*
|
|
202
|
+
* Extension logging is bounded and host-policy controlled, and extension-declared
|
|
203
|
+
* telemetry or network behaviour must be disclosed rather than assumed. This
|
|
204
|
+
* applies the policy; it does not infer one.
|
|
205
|
+
*/
|
|
206
|
+
export interface ExtensionLogPolicy {
|
|
207
|
+
/** Maximum records retained per extension. */
|
|
208
|
+
readonly maxRecords: number;
|
|
209
|
+
/** Levels admitted. A disabled level is dropped, not rewritten. */
|
|
210
|
+
readonly levels: readonly ('debug' | 'info' | 'warn' | 'error')[];
|
|
211
|
+
/** Whether the extension declared telemetry, which the operator must approve. */
|
|
212
|
+
readonly telemetryApproved: boolean;
|
|
213
|
+
/** Origins the extension declared, which must all be approved. */
|
|
214
|
+
readonly approvedOrigins: readonly string[];
|
|
215
|
+
}
|
|
216
|
+
/** The default policy: quiet, metadata-only, and telemetry off unless approved. */
|
|
217
|
+
export declare const DEFAULT_LOG_POLICY: ExtensionLogPolicy;
|
|
218
|
+
/**
|
|
219
|
+
* Apply a logging policy to one extension record.
|
|
220
|
+
*
|
|
221
|
+
* A dropped record is dropped rather than summarised, because a summarised
|
|
222
|
+
* diagnostic is a diagnostic an operator will misread.
|
|
223
|
+
* @param policy - the policy in force.
|
|
224
|
+
* @param record - the proposed record.
|
|
225
|
+
* @returns whether to retain it.
|
|
226
|
+
*/
|
|
227
|
+
export declare function admitsLogRecord(policy: ExtensionLogPolicy, record: {
|
|
228
|
+
readonly level: 'debug' | 'info' | 'warn' | 'error';
|
|
229
|
+
readonly declaredOrigin?: string;
|
|
230
|
+
}): boolean;
|
|
231
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../src/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,MAAM,CAAA;AAExC,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,iFAAiF;IACjF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qCAAq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