@try-works/dsh-model-as-tool 0.1.2 → 0.3.6
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/bin/dsh-tool-mode-credentials.mjs +20 -0
- package/bin/dsh-tool-mode.mjs +202 -0
- package/catalog/desert-ant-models.json +693 -693
- package/client/client.model-tools.js +592 -0
- package/client/index.js +1679 -0
- package/lib/adapters/index.d.ts.map +1 -1
- package/lib/adapters/index.js +4 -4
- package/lib/bindings.d.ts.map +1 -1
- package/lib/bindings.js +26 -25
- package/lib/capability.d.ts.map +1 -1
- package/lib/capability.js +17 -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/diagnostics.d.ts +166 -0
- package/lib/diagnostics.d.ts.map +1 -0
- package/lib/diagnostics.js +135 -0
- package/lib/extension-dependencies.d.ts +197 -0
- package/lib/extension-dependencies.d.ts.map +1 -0
- package/lib/extension-dependencies.js +369 -0
- package/lib/extension-dispatch.d.ts +117 -0
- package/lib/extension-dispatch.d.ts.map +1 -0
- package/lib/extension-dispatch.js +124 -0
- package/lib/extension-registrar.d.ts +100 -0
- package/lib/extension-registrar.d.ts.map +1 -0
- package/lib/extension-registrar.js +134 -0
- package/lib/extensions-api.d.ts +217 -0
- package/lib/extensions-api.d.ts.map +1 -0
- package/lib/extensions-api.js +17 -0
- package/lib/extensions-remote.d.ts +54 -0
- package/lib/extensions-remote.d.ts.map +1 -0
- package/lib/extensions-remote.js +66 -0
- package/lib/extensions-service.d.ts +334 -0
- package/lib/extensions-service.d.ts.map +1 -0
- package/lib/extensions-service.js +1351 -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 +95 -0
- package/lib/harness-serving.d.ts.map +1 -0
- package/lib/harness-serving.js +157 -0
- package/lib/headless.d.ts +97 -0
- package/lib/headless.d.ts.map +1 -0
- package/lib/headless.js +349 -0
- package/lib/http-acquisition.d.ts +27 -0
- package/lib/http-acquisition.d.ts.map +1 -0
- package/lib/http-acquisition.js +136 -0
- package/lib/index.d.ts +250 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2625 -70
- 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/legacy-migration.d.ts +95 -0
- package/lib/legacy-migration.d.ts.map +1 -0
- package/lib/legacy-migration.js +429 -0
- package/lib/managed-workers.d.ts +151 -0
- package/lib/managed-workers.d.ts.map +1 -0
- package/lib/managed-workers.js +249 -0
- package/lib/mcp/client-grant.d.ts +74 -0
- package/lib/mcp/client-grant.d.ts.map +1 -0
- package/lib/mcp/client-grant.js +60 -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 +454 -0
- package/lib/mcp/host-binding.d.ts +25 -0
- package/lib/mcp/host-binding.d.ts.map +1 -1
- package/lib/mcp/host-binding.js +107 -14
- package/lib/mcp/http.d.ts +68 -18
- package/lib/mcp/http.d.ts.map +1 -1
- package/lib/mcp/http.js +390 -62
- 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 +46 -7
- package/lib/mcp/protocol.d.ts.map +1 -1
- package/lib/mcp/protocol.js +63 -16
- 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 +181 -0
- package/lib/mcp/server.d.ts +11 -1
- package/lib/mcp/server.d.ts.map +1 -1
- package/lib/mcp/server.js +80 -13
- package/lib/mcp/stdio.d.ts.map +1 -1
- package/lib/mcp/stdio.js +9 -1
- package/lib/mcp/subscriptions.d.ts +43 -1
- package/lib/mcp/subscriptions.d.ts.map +1 -1
- package/lib/mcp/subscriptions.js +90 -9
- 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 +246 -0
- package/lib/planning.d.ts.map +1 -0
- package/lib/planning.js +457 -0
- package/lib/prepared-assets.d.ts +178 -0
- package/lib/prepared-assets.d.ts.map +1 -0
- package/lib/prepared-assets.js +286 -0
- package/lib/provider-bridge.d.ts +37 -0
- package/lib/provider-bridge.d.ts.map +1 -1
- package/lib/provider-bridge.js +189 -12
- package/lib/ptc-authority.d.ts +140 -0
- package/lib/ptc-authority.d.ts.map +1 -0
- package/lib/ptc-authority.js +216 -0
- package/lib/ptc-runtime.d.ts +156 -0
- package/lib/ptc-runtime.d.ts.map +1 -0
- package/lib/ptc-runtime.js +191 -0
- package/lib/publication.d.ts +2 -1
- package/lib/publication.d.ts.map +1 -1
- package/lib/publication.js +13 -5
- package/lib/receipt.d.ts.map +1 -1
- package/lib/receipt.js +8 -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-mode-run.d.ts +235 -0
- package/lib/tool-mode-run.d.ts.map +1 -0
- package/lib/tool-mode-run.js +283 -0
- package/lib/types.d.ts +3 -1
- package/lib/types.d.ts.map +1 -1
- 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/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 +85 -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 +48 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/meta.d.ts +104 -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 +55 -0
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts +107 -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 +34 -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 +83 -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 +125 -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 +31 -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 +31 -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 +185 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts +126 -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 +297 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts +216 -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 +800 -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 +235 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts +367 -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 +807 -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/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 +118 -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/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 +150 -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 +670 -0
- package/node_modules/@try-works/tool-mode-extension-sdk/package.json +53 -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 +427 -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 +592 -0
- package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts +60 -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 +936 -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 +200 -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 +105 -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 +129 -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 +325 -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 +1310 -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 +227 -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 +407 -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 +50 -17
- package/remote/spec.mjs +439 -0
- package/remote/typert.host.mjs +14 -0
- package/remote/typert.remote-client.mjs +16 -0
- package/lib/adapters/tongue.d.ts +0 -31
- package/lib/adapters/tongue.d.ts.map +0 -1
- package/lib/adapters/tongue.js +0 -93
- package/lib/adapters/voz.d.ts +0 -28
- package/lib/adapters/voz.d.ts.map +0 -1
- package/lib/adapters/voz.js +0 -102
- /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts +0 -0
- /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts.map +0 -0
- /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.js +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://try-works.dev/tool-mode/harness-model-recipe.schema.json",
|
|
4
|
+
"$comment": "Published vocabulary for RCP-02: the harness-model recipe document the declarative broker loads. AUTHORITY: the code validator in packages/tool-mode-recipes/src/recipe-format.ts is the normative implementation; this schema mirrors it and the parity test (tests/schema-parity.test.ts) fails if they drift. TWO VOCABULARIES NORMALIZE TO ONE FROZEN RECIPE: the CANONICAL RCP-02 shape (schemaVersion/kind/modelSelection/instructions/inputBindings/response/limits/context) and the LEGACY shape (id/version/description/tool/inputs/promptTemplate/maxOutputTokens/imageInputs/policy), a documented deprecated alias (normalizeRecipeDocument in recipe-format.ts maps canonical->legacy before the field checks). Code-only checks a JSON Schema cannot express: (1) forbidden keys refused BY NAME with a 'data, not a program' reason — the schema refuses them structurally (closed objects) but cannot reproduce the named refusal; (2) reserved prototype keys — same; (3) non-finite numbers, functions, class instances and non-plain objects — not JSON data, so a schema over parsed JSON cannot see them; (4) description TRIMMED to at least 10 characters — the schema's minLength 10 is the sound approximation, trim semantics are code-only; (5) default must be one of the declared enum values — 2020-12 cannot reference a sibling enum; (6) promptTemplate/instructions placeholder-to-input correspondence and unbalanced-brace refusal — cross-field, code-only; (7) imageInputs.max/limits.maxImages vs declared image-input count — cross-field, code-only; (8) the load-time identity-claim refusal (expectedToolName/expectedContractId) — an option of parseRecipe, not a document property; (9) modelSelection.requires consistency with the declared bindings (image binding needs 'image' in inputModalities) — cross-field, code-only; (10) deep-freeze at parse — runtime behavior, not schema. BINDING-TIME checks (validateRecipeInputs) apply to caller arguments, not to the recipe document, and are out of scope for this schema.",
|
|
5
|
+
"title": "harness-model-recipe",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"title": "Canonical RCP-02 recipe",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": ["id", "version", "description", "tool", "instructions", "inputBindings", "modelSelection", "limits"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": {
|
|
14
|
+
"description": "The vocabulary version, accepted and pinned ('1.0.0').",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
},
|
|
18
|
+
"kind": {
|
|
19
|
+
"description": "The recipe kind; only 'harness-model' exists in this vocabulary.",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"const": "harness-model"
|
|
22
|
+
},
|
|
23
|
+
"id": {
|
|
24
|
+
"description": "Recipe identity. Pattern from recipe-format.ts — letters, digits, dot, dash, underscore, slash or a leading scope, no whitespace.",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"pattern": "^[A-Za-z0-9@][A-Za-z0-9._@/-]*$"
|
|
28
|
+
},
|
|
29
|
+
"version": {
|
|
30
|
+
"description": "Semantic version (RCP-06: a prompt change is a version change).",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"description": "A real sentence describing what the recipe does.",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 10,
|
|
38
|
+
"maxLength": 2000
|
|
39
|
+
},
|
|
40
|
+
"tool": {
|
|
41
|
+
"description": "The tool identity the recipe implements (RCP-06).",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["name", "contractId"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
47
|
+
"contractId": { "type": "string", "minLength": 3, "maxLength": 214 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"modelSelection": {
|
|
51
|
+
"description": "Static versus per-call authority (RCP-05). 'caller-model' is the default strategy; 'approved-profile' references a logical profile name the operator explicitly binds.",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["strategy", "requires"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"strategy": { "type": "string", "enum": ["caller-model", "approved-profile"] },
|
|
57
|
+
"profile": {
|
|
58
|
+
"description": "Required with 'approved-profile'; the host binding resolves it.",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
61
|
+
},
|
|
62
|
+
"requires": {
|
|
63
|
+
"description": "The capability request this recipe needs (HLM-04). Unknown is not supported.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["inputModalities", "outputModalities"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"inputModalities": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"minItems": 1,
|
|
71
|
+
"uniqueItems": true,
|
|
72
|
+
"items": { "type": "string", "enum": ["text", "image", "audio", "video"] }
|
|
73
|
+
},
|
|
74
|
+
"outputModalities": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"minItems": 1,
|
|
77
|
+
"uniqueItems": true,
|
|
78
|
+
"items": { "type": "string", "enum": ["text", "image", "audio", "video"] }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"instructions": {
|
|
85
|
+
"description": "The static instruction text with {{name}} binding placeholders. Static data only: no template expressions, eval, shell, dynamic imports or remote prompt downloads (RCP-02).",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 65536
|
|
89
|
+
},
|
|
90
|
+
"inputBindings": {
|
|
91
|
+
"description": "Validated JSON Pointers into the detached, schema-validated argument object (RCP-03). Simple name segments only; reserved characters, prototype keys and escapes are refused. The optional constraint fields are re-emitted by the canonical serializer so the canonical round trip is LOSSLESS.",
|
|
92
|
+
"type": "array",
|
|
93
|
+
"minItems": 1,
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["kind", "pointer", "required"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"kind": { "type": "string", "enum": ["text", "image", "json"] },
|
|
100
|
+
"pointer": { "type": "string", "pattern": "^(/[A-Za-z0-9_-]+)+$" },
|
|
101
|
+
"required": { "type": "boolean" },
|
|
102
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
103
|
+
"minLength": { "type": "integer", "minimum": 0 },
|
|
104
|
+
"maxLength": { "type": "integer", "minimum": 1 },
|
|
105
|
+
"minimum": { "type": "number" },
|
|
106
|
+
"maximum": { "type": "number" },
|
|
107
|
+
"enum": { "type": "array", "minItems": 1 },
|
|
108
|
+
"default": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] },
|
|
109
|
+
"mediaTypes": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"minItems": 1,
|
|
112
|
+
"items": { "type": "string", "pattern": "^image/" }
|
|
113
|
+
},
|
|
114
|
+
"maxBytes": { "type": "integer", "minimum": 1 }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"response": {
|
|
119
|
+
"description": "RCP-04: 'text' maps into one named payload string field; 'json' is prompt-enforced and locally validated in this build (no provider structured-output negotiation) — the describe metadata discloses the difference.",
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": ["mode", "field"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"mode": { "type": "string", "enum": ["text", "json"] },
|
|
125
|
+
"field": { "type": "string", "minLength": 1, "maxLength": 120 }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"limits": {
|
|
129
|
+
"description": "The recipe's own bounds (HLM-07). maxOutputTokens and maxImages are enforced; timeoutMs/maxInputTextBytes/maxAttempts/repairAttempts are validated and recorded as the author's request (the caller owns the deadline).",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["maxOutputTokens"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"timeoutMs": { "type": "integer", "minimum": 1 },
|
|
135
|
+
"maxInputTextBytes": { "type": "integer", "minimum": 1 },
|
|
136
|
+
"maxImages": { "type": "integer", "minimum": 0 },
|
|
137
|
+
"maxOutputTokens": { "type": "integer", "minimum": 1 },
|
|
138
|
+
"maxAttempts": { "type": "integer", "minimum": 1 },
|
|
139
|
+
"repairAttempts": { "type": "integer", "minimum": 0 }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"context": {
|
|
143
|
+
"description": "HLM-05's frozen invariants: only {inheritConversation:false, includeTools:false} is supported in this release; anything else is refused, not ignored.",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": ["inheritConversation", "includeTools"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"inheritConversation": { "type": "boolean", "const": false },
|
|
149
|
+
"includeTools": { "type": "boolean", "const": false }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"title": "Legacy recipe (deprecated alias)",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": ["id", "version", "description", "tool", "inputs", "promptTemplate", "maxOutputTokens", "imageInputs", "policy"],
|
|
159
|
+
"properties": {
|
|
160
|
+
"id": {
|
|
161
|
+
"description": "Recipe identity. Pattern from recipe-format.ts:619 — letters, digits, dot, dash, underscore, slash or a leading scope, no whitespace.",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1,
|
|
164
|
+
"pattern": "^[A-Za-z0-9@][A-Za-z0-9._@/-]*$"
|
|
165
|
+
},
|
|
166
|
+
"version": {
|
|
167
|
+
"description": "Semantic version (RCP-06: a prompt change is a version change).",
|
|
168
|
+
"type": "string",
|
|
169
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
170
|
+
},
|
|
171
|
+
"description": {
|
|
172
|
+
"description": "A real sentence describing what the recipe does.",
|
|
173
|
+
"type": "string",
|
|
174
|
+
"minLength": 10,
|
|
175
|
+
"maxLength": 2000
|
|
176
|
+
},
|
|
177
|
+
"tool": {
|
|
178
|
+
"description": "The tool identity the recipe implements (RCP-06).",
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"required": ["name", "contractId"],
|
|
182
|
+
"properties": {
|
|
183
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$", "maxLength": 64 },
|
|
184
|
+
"contractId": { "type": "string", "minLength": 3, "maxLength": 214, "pattern": "^[a-z][a-z0-9@._/-]*$" }
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"inputs": {
|
|
188
|
+
"description": "The declared inputs, keyed by input name, in declaration order. Names that reach into the object model or the parent context are refused by name, like the code validator refuses them.",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"minProperties": 1,
|
|
191
|
+
"propertyNames": {
|
|
192
|
+
"not": {
|
|
193
|
+
"enum": ["tools", "tool_calls", "toolCalls", "messages", "history", "conversation", "attachments", "memory", "skills", "systemPrompt", "inheritConversation", "includeTools", "__proto__", "constructor", "prototype"]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": ["type", "required"],
|
|
200
|
+
"properties": {
|
|
201
|
+
"type": { "type": "string", "enum": ["string", "integer", "number", "boolean", "image"] },
|
|
202
|
+
"required": { "type": "boolean" },
|
|
203
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 2000 },
|
|
204
|
+
"minLength": { "type": "integer", "minimum": 0 },
|
|
205
|
+
"maxLength": { "type": "integer", "minimum": 1 },
|
|
206
|
+
"minimum": { "type": "number" },
|
|
207
|
+
"maximum": { "type": "number" },
|
|
208
|
+
"enum": { "type": "array", "minItems": 1 },
|
|
209
|
+
"default": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] },
|
|
210
|
+
"mediaTypes": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"minItems": 1,
|
|
213
|
+
"items": { "type": "string", "pattern": "^image/" }
|
|
214
|
+
},
|
|
215
|
+
"maxBytes": { "type": "integer", "minimum": 1 },
|
|
216
|
+
"jsonSerialized": { "type": "boolean", "const": true }
|
|
217
|
+
},
|
|
218
|
+
"allOf": [
|
|
219
|
+
{
|
|
220
|
+
"if": { "properties": { "type": { "const": "image" } }, "required": ["type"] },
|
|
221
|
+
"then": { "properties": { "default": false, "minLength": false, "maxLength": false, "minimum": false, "maximum": false, "enum": false, "jsonSerialized": false } }
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"if": { "properties": { "type": { "const": "string" } }, "required": ["type"] },
|
|
225
|
+
"then": { "properties": { "minimum": false, "maximum": false, "mediaTypes": false, "maxBytes": false } }
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"if": { "properties": { "type": { "enum": ["integer", "number"] } }, "required": ["type"] },
|
|
229
|
+
"then": { "properties": { "minLength": false, "maxLength": false, "mediaTypes": false, "maxBytes": false, "jsonSerialized": false } }
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"if": { "properties": { "type": { "const": "boolean" } }, "required": ["type"] },
|
|
233
|
+
"then": { "properties": { "minLength": false, "maxLength": false, "minimum": false, "maximum": false, "mediaTypes": false, "maxBytes": false, "jsonSerialized": false } }
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"promptTemplate": {
|
|
239
|
+
"description": "The static instruction text, with {{name}} binding placeholders. Template-expression syntax is refused, like the code validator refuses it.",
|
|
240
|
+
"type": "string",
|
|
241
|
+
"minLength": 1,
|
|
242
|
+
"maxLength": 65536,
|
|
243
|
+
"not": { "anyOf": [{ "pattern": "\\$\\{" }, { "pattern": "<%" }, { "pattern": "%>" }] }
|
|
244
|
+
},
|
|
245
|
+
"maxOutputTokens": {
|
|
246
|
+
"description": "The recipe's own output-token ceiling (RES-10 initial maximum).",
|
|
247
|
+
"type": "integer",
|
|
248
|
+
"minimum": 1,
|
|
249
|
+
"maximum": 1024
|
|
250
|
+
},
|
|
251
|
+
"imageInputs": {
|
|
252
|
+
"description": "The image inputs this recipe permits (RES-10 initial maximum).",
|
|
253
|
+
"type": "object",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"required": ["max"],
|
|
256
|
+
"properties": {
|
|
257
|
+
"max": { "type": "integer", "minimum": 0, "maximum": 2 }
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"policy": {
|
|
261
|
+
"description": "Recording and destination declarations (HLM-09).",
|
|
262
|
+
"type": "object",
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"required": ["record", "allowRemote"],
|
|
265
|
+
"properties": {
|
|
266
|
+
"record": { "type": "boolean" },
|
|
267
|
+
"allowRemote": { "type": "boolean" }
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@try-works/dsh-model-as-tool",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Install Desert Ant Labs on-device models as DSH tools and skills, with per-platform capability gating",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -32,11 +32,13 @@
|
|
|
32
32
|
"types": "./lib/index.d.ts",
|
|
33
33
|
"default": "./lib/index.js"
|
|
34
34
|
},
|
|
35
|
+
"./client": "./client/index.js",
|
|
36
|
+
"./typert": "./remote/typert.host.mjs",
|
|
37
|
+
"./remote": "./remote/typert.remote-client.mjs",
|
|
35
38
|
"./catalog": {
|
|
36
39
|
"types": "./lib/catalog.d.ts",
|
|
37
40
|
"default": "./lib/catalog.js"
|
|
38
41
|
},
|
|
39
|
-
"./src/*": "./src/*",
|
|
40
42
|
"./catalog/desert-ant-models.json": "./catalog/desert-ant-models.json",
|
|
41
43
|
"./catalog/playbooks.json": "./catalog/playbooks.json",
|
|
42
44
|
"./package.json": "./package.json"
|
|
@@ -45,6 +47,9 @@
|
|
|
45
47
|
"lib/**/*.js",
|
|
46
48
|
"lib/**/*.d.ts",
|
|
47
49
|
"lib/**/*.d.ts.map",
|
|
50
|
+
"client/index.js",
|
|
51
|
+
"client/client.model-tools.js",
|
|
52
|
+
"remote/*.mjs",
|
|
48
53
|
"catalog/desert-ant-models.json",
|
|
49
54
|
"catalog/playbooks.json",
|
|
50
55
|
"cordis.patch.yml",
|
|
@@ -54,39 +59,67 @@
|
|
|
54
59
|
"dsh": {
|
|
55
60
|
"bundle": {
|
|
56
61
|
"patch": "./cordis.patch.yml"
|
|
62
|
+
},
|
|
63
|
+
"client": {
|
|
64
|
+
"platform": "web",
|
|
65
|
+
"inject": [
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
67
|
+
],
|
|
68
|
+
"external": []
|
|
57
69
|
}
|
|
58
70
|
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=24.0.0"
|
|
73
|
+
},
|
|
59
74
|
"peerDependencies": {
|
|
60
|
-
"@deepseek-ai/cordis": ">=0.2.0-rc.2",
|
|
61
|
-
"@deepseek-ai/dsh-skill": ">=0.2.0-rc.2",
|
|
62
|
-
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2"
|
|
63
|
-
"@deepseek-ai/schemastery": ">=0.2.0-rc.2"
|
|
75
|
+
"@deepseek-ai/cordis": ">=0.2.0-rc.2 || >=0.2.1-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-skill": ">=0.2.0-rc.2 || >=0.2.1-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 || >=0.2.1-rc.1"
|
|
64
78
|
},
|
|
65
79
|
"peerDependenciesMeta": {
|
|
66
80
|
"@deepseek-ai/dsh-skill": {
|
|
67
81
|
"optional": true
|
|
68
82
|
}
|
|
69
83
|
},
|
|
70
|
-
"optionalDependencies": {
|
|
71
|
-
"@desert-ant-labs/tongue": "^3.6.0",
|
|
72
|
-
"@desert-ant-labs/voz": "^3.6.0",
|
|
73
|
-
"onnxruntime-node": "^1.20.0"
|
|
74
|
-
},
|
|
75
84
|
"scripts": {
|
|
76
|
-
"build": "tsc -p tsconfig.build.json",
|
|
85
|
+
"build": "node scripts/clean-lib.mjs && tsc -p tsconfig.build.json && node scripts/gen-client-catalog.mjs",
|
|
86
|
+
"build:client": "node scripts/gen-client-catalog.mjs",
|
|
87
|
+
"build:remote": "node scripts/gen-remote-artifacts.mjs",
|
|
88
|
+
"check:remote": "node scripts/gen-remote-artifacts.mjs --check",
|
|
77
89
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
78
90
|
"test": "tsx --test tests/*.test.ts",
|
|
79
|
-
"prepack": "
|
|
80
|
-
"prepare": "tsc -p tsconfig.build.json"
|
|
91
|
+
"prepack": "node scripts/stage-bundle.mjs && npm run build",
|
|
92
|
+
"prepare": "tsc -p tsconfig.build.json",
|
|
93
|
+
"postpack": "node scripts/stage-bundle.mjs --clean"
|
|
81
94
|
},
|
|
82
95
|
"devDependencies": {
|
|
96
|
+
"@modelcontextprotocol/client": "2.3.1",
|
|
83
97
|
"@types/node": "^24.0.0",
|
|
84
98
|
"typescript": "^5.9.0"
|
|
85
99
|
},
|
|
86
100
|
"dependencies": {
|
|
87
|
-
"@
|
|
101
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
102
|
+
"@modelcontextprotocol/node": "2.1.1",
|
|
103
|
+
"@modelcontextprotocol/server": "2.3.1",
|
|
104
|
+
"@try-works/tool-mode-contracts": "^0.1.0",
|
|
105
|
+
"@try-works/tool-mode-extension-sdk": "^0.1.0",
|
|
106
|
+
"ajv": "^8.20.0",
|
|
107
|
+
"adm-zip": "^0.5.18",
|
|
108
|
+
"@try-works/tool-mode-recipes": "^0.1.0"
|
|
88
109
|
},
|
|
89
110
|
"bin": {
|
|
90
|
-
"dsh-tool-mode
|
|
91
|
-
|
|
111
|
+
"dsh-tool-mode": "./bin/dsh-tool-mode.mjs",
|
|
112
|
+
"dsh-tool-mode-mcp-stdio": "./bin/dsh-tool-mode-mcp-stdio.mjs",
|
|
113
|
+
"dsh-tool-mode-credentials": "./bin/dsh-tool-mode-credentials.mjs"
|
|
114
|
+
},
|
|
115
|
+
"bundledDependencies": [
|
|
116
|
+
"@try-works/tool-mode-contracts",
|
|
117
|
+
"@try-works/tool-mode-extension-sdk",
|
|
118
|
+
"@try-works/tool-mode-recipes"
|
|
119
|
+
],
|
|
120
|
+
"bundleDependencies": [
|
|
121
|
+
"@try-works/tool-mode-contracts",
|
|
122
|
+
"@try-works/tool-mode-extension-sdk",
|
|
123
|
+
"@try-works/tool-mode-recipes"
|
|
124
|
+
]
|
|
92
125
|
}
|