@try-works/dsh-model-as-tool 0.1.3 → 0.4.0
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 +614 -0
- package/client/index.js +1717 -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 +325 -0
- package/lib/extension-dependencies.d.ts.map +1 -0
- package/lib/extension-dependencies.js +858 -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 +221 -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 +367 -0
- package/lib/extensions-service.d.ts.map +1 -0
- package/lib/extensions-service.js +1527 -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 +271 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2644 -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/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/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.map +1 -1
- package/node_modules/@try-works/tool-mode-contracts/lib/dsh.js +69 -55
- package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts +4 -1
- package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts.map +1 -1
- package/node_modules/@try-works/tool-mode-contracts/lib/index.js +26 -2
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts +28 -2
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts.map +1 -1
- package/node_modules/@try-works/tool-mode-contracts/lib/registry.js +93 -10
- package/node_modules/@try-works/tool-mode-contracts/package.json +0 -1
- 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 +32 -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 +32 -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 +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/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 +243 -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 +43 -15
- package/remote/spec.mjs +462 -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,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@try-works/tool-mode-extension-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Author-facing SDK for Tool Mode extensions: TMX manifest schema, validation, lifecycle state and management errors",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/try-works/dsh-model-as-tool.git",
|
|
13
|
+
"directory": "packages/tool-mode-extension-sdk"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "lib/index.js",
|
|
17
|
+
"types": "lib/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./schema/extension-manifest-1.1.0.schema.json": "./schema/extension-manifest-1.1.0.schema.json",
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./lib/index.d.ts",
|
|
22
|
+
"default": "./lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib/**/*.js",
|
|
28
|
+
"lib/**/*.d.ts",
|
|
29
|
+
"lib/**/*.d.ts.map",
|
|
30
|
+
"bin/*.mjs",
|
|
31
|
+
"schema/*.json",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"ajv": "^8.20.0",
|
|
36
|
+
"adm-zip": "^0.5.18"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.build.json",
|
|
40
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
41
|
+
"test": "tsx --test tests/*.test.ts",
|
|
42
|
+
"prepack": "tsc -p tsconfig.build.json",
|
|
43
|
+
"prepare": "tsc -p tsconfig.build.json"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^24.0.0",
|
|
47
|
+
"typescript": "^5.9.0",
|
|
48
|
+
"@types/adm-zip": "^0.5.8"
|
|
49
|
+
},
|
|
50
|
+
"bin": {
|
|
51
|
+
"dsh-tool-mode": "./bin/dsh-tool-mode.mjs"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/node_modules/@try-works/tool-mode-extension-sdk/schema/extension-manifest-1.1.0.schema.json
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://try-works.dev/tool-mode/extension-manifest-1.1.0.schema.json",
|
|
4
|
+
"title": "Tool Mode extension manifest",
|
|
5
|
+
"description": "The manifest an extension package ships and the host validates before importing any extension code (EXT-14). Schemas referenced from here are offline package files: a remote $ref is not fetched and an executable schema generator is never run during discovery.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["protocolVersion", "id", "version", "displayName", "description", "compatibility", "execution", "permissions"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"protocolVersion": {
|
|
11
|
+
"description": "TMX protocol version. Minor versions are additive; a different major requires reviewed migration (EXT-16).",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^1\\.(0|1)\\.\\d+$"
|
|
14
|
+
},
|
|
15
|
+
"id": {
|
|
16
|
+
"description": "Extension identity. MUST equal the package name exactly (EXT-14).",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 3,
|
|
19
|
+
"maxLength": 214
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"description": "Package version. MUST equal package.json version exactly (EXT-14).",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
|
|
25
|
+
},
|
|
26
|
+
"displayName": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
27
|
+
"description": { "type": "string", "minLength": 10, "maxLength": 2000 },
|
|
28
|
+
"license": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
29
|
+
"activation": {
|
|
30
|
+
"description": "How activation behaves. A built-in is a first-party package following the identical protocol, not an exception embedded in the host (EXT-03).",
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["policy"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"policy": { "type": "string", "enum": ["operator", "bundled-default"] },
|
|
36
|
+
"deactivatable": { "type": "boolean", "default": true }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"runtimeApi": {
|
|
40
|
+
"description": "Module runtime API major this extension implements. 1.0 and 1.1 manifests both use major 1 (EXT-16).",
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"const": 1
|
|
43
|
+
},
|
|
44
|
+
"compatibility": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["hostApi"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"hostApi": { "type": "string", "pattern": "^[\\^~]?\\d+\\.\\d+\\.\\d+$" },
|
|
50
|
+
"requiredFeatures": {
|
|
51
|
+
"description": "Features the host must provide. An unknown required feature blocks activation rather than degrading silently (EXT-14).",
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
54
|
+
"uniqueItems": true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"execution": {
|
|
59
|
+
"description": "How extension code runs. Assertion of isolation is not proof of sandboxing (EXT-20).",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["kind"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"kind": { "type": "string", "enum": ["module", "declarative"] },
|
|
65
|
+
"entry": { "type": "string", "pattern": "^\\./" },
|
|
66
|
+
"isolation": { "type": "string", "enum": ["managed-process", "host-inline"] }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"configurationSchema": { "type": "string", "pattern": "^\\./" },
|
|
70
|
+
"licenses": {
|
|
71
|
+
"description": "Per-layer licences (LIC-01). An adapter's licence says nothing about the weights it loads, so each layer is declared separately and a MISSING layer is reported as a gap rather than defaulted.",
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["layer", "name", "url", "openSource", "redistribution", "attributionRequired"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"layer": { "enum": ["code", "engine", "weights", "conversion-artifacts", "sdk"] },
|
|
79
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
80
|
+
"url": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
81
|
+
"openSource": {
|
|
82
|
+
"description": "Whether the licence is OSI-approved open source. Source-available is NOT open source (LIC-02).",
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"redistribution": {
|
|
86
|
+
"description": "Whether these bytes may be redistributed inside a package. `unclear` is treated as NOT permitted.",
|
|
87
|
+
"enum": ["permitted", "not-permitted", "unclear"]
|
|
88
|
+
},
|
|
89
|
+
"attributionRequired": { "type": "boolean" },
|
|
90
|
+
"attributionText": { "type": "string", "maxLength": 500 },
|
|
91
|
+
"obligations": { "type": "array", "items": { "type": "string", "maxLength": 500 } }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"network": {
|
|
96
|
+
"description": "Declared network behaviour (LIC-04). Declared rather than assumed, because an implementation that must report telemetry cannot be described as network-free.",
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["requiredTelemetry", "otherNetworkUse"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"requiredTelemetry": { "type": "boolean" },
|
|
102
|
+
"otherNetworkUse": { "type": "boolean" },
|
|
103
|
+
"telemetryContent": { "type": "array", "items": { "type": "string", "maxLength": 300 } }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"permissions": {
|
|
107
|
+
"description": "Requests privileges; it does not grant them (EXT-14). The host applies its own export policy on top (EXT-23).",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": ["networkOrigins", "inputFiles", "storage", "secrets", "nativeCode"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"networkOrigins": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
113
|
+
"inputFiles": { "type": "boolean" },
|
|
114
|
+
"storage": { "type": "string", "enum": ["none", "extension-private"] },
|
|
115
|
+
"secrets": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
116
|
+
"nativeCode": {
|
|
117
|
+
"description": "An explicit review signal, not permission to run arbitrary operator commands.",
|
|
118
|
+
"type": "boolean"
|
|
119
|
+
},
|
|
120
|
+
"harnessModel": {
|
|
121
|
+
"description": "Declared harness-model capability request (§19.3): a capability request, not an authorization grant. The actual provider's network use is governed by the host executor profile.",
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": ["inputModalities", "outputModalities"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"inputModalities": {
|
|
127
|
+
"type": "array",
|
|
128
|
+
"minItems": 1,
|
|
129
|
+
"uniqueItems": true,
|
|
130
|
+
"items": { "type": "string", "enum": ["text", "image", "audio", "video"] }
|
|
131
|
+
},
|
|
132
|
+
"outputModalities": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"minItems": 1,
|
|
135
|
+
"uniqueItems": true,
|
|
136
|
+
"items": { "type": "string", "enum": ["text", "image", "audio", "video"] }
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"models": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"required": ["id", "assetSet", "assetLock", "platforms"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
150
|
+
"assetSet": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
151
|
+
"assetLock": { "type": "string", "pattern": "^\\./" },
|
|
152
|
+
"platforms": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"minItems": 1,
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": ["os", "arch"],
|
|
159
|
+
"properties": {
|
|
160
|
+
"os": { "type": "string", "enum": ["win32", "darwin", "linux"] },
|
|
161
|
+
"arch": { "type": "string", "enum": ["x64", "arm64"] },
|
|
162
|
+
"accelerator": { "type": "string", "enum": ["cpu", "gpu", "npu"] }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"tools": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["id", "name", "contractId", "contractVersion", "description", "inputSchema", "outputSchema"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "maxLength": 120 },
|
|
177
|
+
"name": {
|
|
178
|
+
"description": "The caller-facing tool name. A custom contribution owns it; an implementation of a standard contract must use the contract's name (EXT-21, EXT-22).",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^[a-z][a-z0-9_]*$",
|
|
181
|
+
"maxLength": 64
|
|
182
|
+
},
|
|
183
|
+
"contractId": { "type": "string", "minLength": 3, "maxLength": 214 },
|
|
184
|
+
"contractVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
185
|
+
"description": { "type": "string", "minLength": 10, "maxLength": 2000 },
|
|
186
|
+
"inputSchema": { "type": "string", "pattern": "^\\./" },
|
|
187
|
+
"outputSchema": { "type": "string", "pattern": "^\\./" }
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"implementations": {
|
|
192
|
+
"description": "Model/recipe bindings. Two closed shapes: the module form (modelId references a declared model) and the spec §19.3 harness-model form (kind + recipe path, no modelId).",
|
|
193
|
+
"type": "array",
|
|
194
|
+
"items": {
|
|
195
|
+
"oneOf": [
|
|
196
|
+
{
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": ["id", "contractId", "contractVersion", "recipeVersion"],
|
|
200
|
+
"properties": {
|
|
201
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "maxLength": 120 },
|
|
202
|
+
"contractId": { "type": "string", "minLength": 3, "maxLength": 214 },
|
|
203
|
+
"contractVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
204
|
+
"modelId": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
205
|
+
"recipeVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "object",
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"required": ["id", "kind", "contractId", "contractVersion", "recipeVersion", "recipe"],
|
|
212
|
+
"properties": {
|
|
213
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "maxLength": 120 },
|
|
214
|
+
"kind": { "type": "string", "const": "harness-model" },
|
|
215
|
+
"contractId": { "type": "string", "minLength": 3, "maxLength": 214 },
|
|
216
|
+
"contractVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
217
|
+
"recipeVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
218
|
+
"recipe": {
|
|
219
|
+
"description": "The package-relative recipe file the host interprets through the controlled recipe path (RCP-01, §19.3).",
|
|
220
|
+
"type": "string",
|
|
221
|
+
"pattern": "^\\./"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"skills": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["id", "name", "description", "path"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "maxLength": 120 },
|
|
236
|
+
"name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 64 },
|
|
237
|
+
"description": { "type": "string", "minLength": 10, "maxLength": 1000 },
|
|
238
|
+
"path": { "type": "string", "pattern": "^\\./" },
|
|
239
|
+
"requiresTools": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
242
|
+
"uniqueItems": true
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"patternProperties": {
|
|
249
|
+
"^x-[a-z0-9-]+$": {
|
|
250
|
+
"description": "The only extension point for vendor data. Any other unknown top-level field is rejected (EXT-14)."
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `tool-mode-recipe` — the recipe authoring CLI (RCP-08).
|
|
4
|
+
*
|
|
5
|
+
* A thin argv/stdio wrapper over the compiled library, so the packed artifact
|
|
6
|
+
* works under plain Node with no TypeScript loader.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { runRecipeCli } from '../lib/cli.js'
|
|
10
|
+
|
|
11
|
+
const exit = await runRecipeCli(process.argv.slice(2), {
|
|
12
|
+
out: line => process.stdout.write(`${line}\n`),
|
|
13
|
+
err: line => process.stderr.write(`${line}\n`),
|
|
14
|
+
})
|
|
15
|
+
process.exitCode = exit
|