@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,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `text.language_detect` — the language-identification contract (TOOL-03).
|
|
3
|
+
*
|
|
4
|
+
* TOOL-03 requires three things a naive wrapper loses: ambiguity must survive to
|
|
5
|
+
* the caller, empty input has a defined answer rather than an exception, and the
|
|
6
|
+
* score's MEANING is declared. It also forbids a specific mistake worth naming in
|
|
7
|
+
* the schema: a text language detector is not evidence about the language spoken
|
|
8
|
+
* in audio it never processed, so the contract says so instead of leaving a
|
|
9
|
+
* caller to infer capability from a similar-looking tool.
|
|
10
|
+
*
|
|
11
|
+
* @module @try-works/tool-mode-contracts/contracts/lang-detect
|
|
12
|
+
*/
|
|
13
|
+
import { withMeta } from "../meta.js";
|
|
14
|
+
/** The `text.language_detect` contract at version 1.0.0. */
|
|
15
|
+
export const langDetect = {
|
|
16
|
+
contract: 'text.language_detect',
|
|
17
|
+
version: '1.0.0',
|
|
18
|
+
toolName: 'lang_detect',
|
|
19
|
+
description: 'Identify the language of a short piece of text. Returns the best language, a reliability '
|
|
20
|
+
+ 'verdict and ranked alternatives, because short text is often genuinely ambiguous between '
|
|
21
|
+
+ 'related languages and collapsing that to one answer would overstate the result.',
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
required: ['text'],
|
|
26
|
+
properties: {
|
|
27
|
+
text: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
minLength: 1,
|
|
30
|
+
maxLength: 4096,
|
|
31
|
+
description: 'The text to identify. Only the leading portion is examined.',
|
|
32
|
+
},
|
|
33
|
+
top: {
|
|
34
|
+
type: 'integer',
|
|
35
|
+
minimum: 1,
|
|
36
|
+
maximum: 20,
|
|
37
|
+
default: 3,
|
|
38
|
+
description: 'How many ranked alternatives to return.',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
outputSchema: withMeta({
|
|
43
|
+
language: { type: ['string', 'null'], description: 'Best candidate, or null when input had no language signal.' },
|
|
44
|
+
reliability: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
enum: ['confident', 'likely', 'tentative', 'unknown'],
|
|
47
|
+
description: 'Vendor-reported verdict. Not a calibrated probability.',
|
|
48
|
+
},
|
|
49
|
+
tooCloseToCall: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
description: 'True when the leading candidates are within the implementation\'s declared tie margin.',
|
|
52
|
+
},
|
|
53
|
+
candidates: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
required: ['language', 'probability'],
|
|
59
|
+
properties: {
|
|
60
|
+
language: { type: 'string' },
|
|
61
|
+
probability: { type: 'number', minimum: 0, maximum: 1 },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}, ['reliability', 'tooCloseToCall', 'candidates']),
|
|
66
|
+
semantics: {
|
|
67
|
+
scoreKind: 'vendor-reported-probability',
|
|
68
|
+
calibrated: false,
|
|
69
|
+
ambiguityPreserved: true,
|
|
70
|
+
emptyInputMeaning: 'null-language-with-empty-candidates',
|
|
71
|
+
appliesTo: 'written-text-only',
|
|
72
|
+
},
|
|
73
|
+
limits: {
|
|
74
|
+
maxInputCharacters: 4096,
|
|
75
|
+
examinedCharacters: 512,
|
|
76
|
+
maxCandidates: 20,
|
|
77
|
+
},
|
|
78
|
+
unsupported: [
|
|
79
|
+
'Spoken language: this reads written text only. It is not evidence about the language spoken in audio it has not processed (TOOL-03).',
|
|
80
|
+
'Translation or transliteration.',
|
|
81
|
+
'Confident single answers for one or two words: those are frequently ambiguous and are reported as such.',
|
|
82
|
+
'Documents beyond the examined prefix: only the leading characters are considered.',
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=lang-detect.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The remaining standard tool contracts (EXT-21, task-69).
|
|
3
|
+
*
|
|
4
|
+
* These descriptors are SCHEMAS AND SEMANTICS ONLY — no model bindings, no
|
|
5
|
+
* weights, no host code (EXT-17). Each is a closed schema with honest
|
|
6
|
+
* `semantics`, `limits` and `unsupported` records, matching the vocabulary the
|
|
7
|
+
* host registers and the extension packages implement against.
|
|
8
|
+
*
|
|
9
|
+
* @module @try-works/tool-mode-contracts/contracts/standard
|
|
10
|
+
*/
|
|
11
|
+
import type { ToolContract } from '../registry.ts';
|
|
12
|
+
/** The `text.title` contract at version 1.0.0 (RCP-12). */
|
|
13
|
+
export declare const textTitle: ToolContract;
|
|
14
|
+
/** The `image.describe` contract at version 1.0.0 (HLM-12). */
|
|
15
|
+
export declare const imageDescribe: ToolContract;
|
|
16
|
+
/** The `embed.multimodal` contract at version 1.0.0 (EmbeddingGemma family). */
|
|
17
|
+
export declare const multimodalEmbed: ToolContract;
|
|
18
|
+
/** The `semantic.similarity` contract at version 1.0.0. */
|
|
19
|
+
export declare const semanticSimilarity: ToolContract;
|
|
20
|
+
/** The `semantic.rank` contract at version 1.0.0. */
|
|
21
|
+
export declare const semanticRank: ToolContract;
|
|
22
|
+
/** The `semantic.classify` contract at version 1.0.0. */
|
|
23
|
+
export declare const semanticClassify: ToolContract;
|
|
24
|
+
/** The `semantic.deduplicate` contract at version 1.0.0. */
|
|
25
|
+
export declare const semanticDeduplicate: ToolContract;
|
|
26
|
+
/** The `media.find_moments` contract at version 1.0.0. */
|
|
27
|
+
export declare const mediaFindMoments: ToolContract;
|
|
28
|
+
/** The `decision.choose` contract at version 1.0.0 (Laya family). */
|
|
29
|
+
export declare const decisionChoose: ToolContract;
|
|
30
|
+
/** The `decision.test` contract at version 1.0.0. */
|
|
31
|
+
export declare const decisionTest: ToolContract;
|
|
32
|
+
/** The `decision.score` contract at version 1.0.0. */
|
|
33
|
+
export declare const decisionScore: ToolContract;
|
|
34
|
+
/** The `structured.extract` contract at version 1.0.0 (Needle family). */
|
|
35
|
+
export declare const structuredExtract: ToolContract;
|
|
36
|
+
/** The `plan.tools` contract at version 1.0.0 (Needle family). */
|
|
37
|
+
export declare const toolsPlan: ToolContract;
|
|
38
|
+
//# sourceMappingURL=standard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../src/contracts/standard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,2DAA2D;AAC3D,eAAO,MAAM,SAAS,EAAE,YAuCvB,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,YAmC3B,CAAA;AAGD,gFAAgF;AAChF,eAAO,MAAM,eAAe,EAAE,YAwC7B,CAAA;AAED,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,EAAE,YA0BhC,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,YAAY,EAAE,YAuC1B,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,YA8B9B,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,YAmCjC,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,YAwC9B,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,cAAc,EAAE,YA8B5B,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,YAAY,EAAE,YA8B1B,CAAA;AAED,sDAAsD;AACtD,eAAO,MAAM,aAAa,EAAE,YAoC3B,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,EAAE,YA4B/B,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,SAAS,EAAE,YAwCvB,CAAA"}
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The remaining standard tool contracts (EXT-21, task-69).
|
|
3
|
+
*
|
|
4
|
+
* These descriptors are SCHEMAS AND SEMANTICS ONLY — no model bindings, no
|
|
5
|
+
* weights, no host code (EXT-17). Each is a closed schema with honest
|
|
6
|
+
* `semantics`, `limits` and `unsupported` records, matching the vocabulary the
|
|
7
|
+
* host registers and the extension packages implement against.
|
|
8
|
+
*
|
|
9
|
+
* @module @try-works/tool-mode-contracts/contracts/standard
|
|
10
|
+
*/
|
|
11
|
+
import { withMeta } from "../meta.js";
|
|
12
|
+
/** The `text.title` contract at version 1.0.0 (RCP-12). */
|
|
13
|
+
export const textTitle = {
|
|
14
|
+
contract: 'text.title',
|
|
15
|
+
version: '1.0.0',
|
|
16
|
+
toolName: 'text_title',
|
|
17
|
+
description: 'Propose a bounded title and one-sentence description for supplied text through an authorized harness model.',
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
required: ['text'],
|
|
22
|
+
properties: {
|
|
23
|
+
text: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
24
|
+
kind: { type: 'string', enum: ['section', 'page', 'document'], default: 'section' },
|
|
25
|
+
repairFeedback: { type: 'string', minLength: 1, maxLength: 512 },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
outputSchema: withMeta({
|
|
29
|
+
title: { type: 'string', minLength: 1, maxLength: 80 },
|
|
30
|
+
description: { type: 'string', minLength: 1, maxLength: 240 },
|
|
31
|
+
}, ['title', 'description']),
|
|
32
|
+
semantics: {
|
|
33
|
+
scoreKind: 'none',
|
|
34
|
+
calibrated: false,
|
|
35
|
+
emptyInputMeaning: 'binding-error',
|
|
36
|
+
appliesTo: 'written-text-only',
|
|
37
|
+
},
|
|
38
|
+
limits: {
|
|
39
|
+
maxInputCharacters: 32768,
|
|
40
|
+
maxTitleCharacters: 80,
|
|
41
|
+
maxDescriptionCharacters: 240,
|
|
42
|
+
maxRepairs: 1,
|
|
43
|
+
},
|
|
44
|
+
unsupported: [
|
|
45
|
+
'Invented facts: the title must state only what the text supports.',
|
|
46
|
+
'Empty titles and descriptions.',
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
/** The `image.describe` contract at version 1.0.0 (HLM-12). */
|
|
50
|
+
export const imageDescribe = {
|
|
51
|
+
contract: 'image.describe',
|
|
52
|
+
version: '1.0.0',
|
|
53
|
+
toolName: 'describe_image',
|
|
54
|
+
description: 'Describe the visible content of an approved image through an authorized harness model, with honest uncertainty.',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
required: ['image_path'],
|
|
59
|
+
properties: {
|
|
60
|
+
image_path: { type: 'string', minLength: 1, description: 'An approved image resolved by the host.' },
|
|
61
|
+
focus: { type: 'string', minLength: 1, maxLength: 500 },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
outputSchema: withMeta({
|
|
65
|
+
description: { type: 'string', minLength: 1 },
|
|
66
|
+
}, ['description']),
|
|
67
|
+
semantics: {
|
|
68
|
+
scoreKind: 'none',
|
|
69
|
+
calibrated: false,
|
|
70
|
+
emptyInputMeaning: 'binding-error',
|
|
71
|
+
appliesTo: 'visible-image-content',
|
|
72
|
+
},
|
|
73
|
+
limits: {
|
|
74
|
+
maxImages: 1,
|
|
75
|
+
maxFocusCharacters: 500,
|
|
76
|
+
},
|
|
77
|
+
unsupported: [
|
|
78
|
+
'Invented hidden facts, exact OCR or full transcription claims.',
|
|
79
|
+
'Treating text drawn in the image as instructions.',
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
/** The `embed.multimodal` contract at version 1.0.0 (EmbeddingGemma family). */
|
|
83
|
+
export const multimodalEmbed = {
|
|
84
|
+
contract: 'embed.multimodal',
|
|
85
|
+
version: '1.0.0',
|
|
86
|
+
toolName: 'multimodal_embed',
|
|
87
|
+
description: 'Embed a text, image or audio input into a shared vector space.',
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
additionalProperties: false,
|
|
91
|
+
required: ['input'],
|
|
92
|
+
properties: {
|
|
93
|
+
input: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
additionalProperties: false,
|
|
96
|
+
required: ['kind'],
|
|
97
|
+
properties: {
|
|
98
|
+
kind: { type: 'string', enum: ['text', 'image', 'audio'] },
|
|
99
|
+
text: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
100
|
+
media: { type: 'string', description: 'An approved media reference resolved by the host.' },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
outputSchema: withMeta({
|
|
106
|
+
embedding: { type: 'array', items: { type: 'number' }, minItems: 1 },
|
|
107
|
+
dimensions: { type: 'integer', minimum: 1 },
|
|
108
|
+
}, ['embedding', 'dimensions']),
|
|
109
|
+
semantics: {
|
|
110
|
+
scoreKind: 'none',
|
|
111
|
+
calibrated: false,
|
|
112
|
+
emptyInputMeaning: 'binding-error',
|
|
113
|
+
appliesTo: 'text-image-audio',
|
|
114
|
+
},
|
|
115
|
+
limits: {
|
|
116
|
+
maxInputCharacters: 32768,
|
|
117
|
+
maxMediaBytes: 8388608,
|
|
118
|
+
},
|
|
119
|
+
unsupported: ['Video frames beyond the declared sampler.'],
|
|
120
|
+
};
|
|
121
|
+
/** The `semantic.similarity` contract at version 1.0.0. */
|
|
122
|
+
export const semanticSimilarity = {
|
|
123
|
+
contract: 'semantic.similarity',
|
|
124
|
+
version: '1.0.0',
|
|
125
|
+
toolName: 'semantic_similarity',
|
|
126
|
+
description: 'Score the similarity of two bounded texts.',
|
|
127
|
+
inputSchema: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
additionalProperties: false,
|
|
130
|
+
required: ['left', 'right'],
|
|
131
|
+
properties: {
|
|
132
|
+
left: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
133
|
+
right: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
outputSchema: withMeta({ score: { type: 'number' } }, ['score']),
|
|
137
|
+
semantics: {
|
|
138
|
+
scoreKind: 'cosine-similarity',
|
|
139
|
+
calibrated: false,
|
|
140
|
+
emptyInputMeaning: 'binding-error',
|
|
141
|
+
appliesTo: 'written-text-only',
|
|
142
|
+
},
|
|
143
|
+
limits: { maxInputCharacters: 32768 },
|
|
144
|
+
unsupported: ['Calibrated probabilities.'],
|
|
145
|
+
};
|
|
146
|
+
/** The `semantic.rank` contract at version 1.0.0. */
|
|
147
|
+
export const semanticRank = {
|
|
148
|
+
contract: 'semantic.rank',
|
|
149
|
+
version: '1.0.0',
|
|
150
|
+
toolName: 'semantic_rank',
|
|
151
|
+
description: 'Rank candidates by semantic distance to a query.',
|
|
152
|
+
inputSchema: {
|
|
153
|
+
type: 'object',
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
required: ['query', 'candidates'],
|
|
156
|
+
properties: {
|
|
157
|
+
query: { type: 'string', minLength: 1, maxLength: 4096 },
|
|
158
|
+
candidates: {
|
|
159
|
+
type: 'array', minItems: 1, maxItems: 100,
|
|
160
|
+
items: { type: 'string', minLength: 1, maxLength: 8192 },
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
outputSchema: withMeta({
|
|
165
|
+
ranked: {
|
|
166
|
+
type: 'array',
|
|
167
|
+
items: {
|
|
168
|
+
type: 'object',
|
|
169
|
+
additionalProperties: false,
|
|
170
|
+
required: ['index', 'score'],
|
|
171
|
+
properties: { index: { type: 'integer', minimum: 0 }, score: { type: 'number' } },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
}, ['ranked']),
|
|
175
|
+
semantics: {
|
|
176
|
+
scoreKind: 'cosine-similarity',
|
|
177
|
+
calibrated: false,
|
|
178
|
+
emptyInputMeaning: 'binding-error',
|
|
179
|
+
appliesTo: 'written-text-only',
|
|
180
|
+
},
|
|
181
|
+
limits: { maxCandidates: 100 },
|
|
182
|
+
unsupported: ['Calibrated probabilities.'],
|
|
183
|
+
};
|
|
184
|
+
/** The `semantic.classify` contract at version 1.0.0. */
|
|
185
|
+
export const semanticClassify = {
|
|
186
|
+
contract: 'semantic.classify',
|
|
187
|
+
version: '1.0.0',
|
|
188
|
+
toolName: 'semantic_classify',
|
|
189
|
+
description: 'Classify a text into the closest of the supplied labels, with the ability to abstain.',
|
|
190
|
+
inputSchema: {
|
|
191
|
+
type: 'object',
|
|
192
|
+
additionalProperties: false,
|
|
193
|
+
required: ['text', 'labels'],
|
|
194
|
+
properties: {
|
|
195
|
+
text: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
196
|
+
labels: { type: 'array', minItems: 1, maxItems: 64, items: { type: 'string', minLength: 1, maxLength: 200 } },
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
outputSchema: withMeta({
|
|
200
|
+
label: { type: ['string', 'null'] },
|
|
201
|
+
abstained: { type: 'boolean' },
|
|
202
|
+
scores: { type: 'array', items: { type: 'number' } },
|
|
203
|
+
}, ['label', 'abstained', 'scores']),
|
|
204
|
+
semantics: {
|
|
205
|
+
scoreKind: 'cosine-similarity',
|
|
206
|
+
calibrated: false,
|
|
207
|
+
emptyInputMeaning: 'binding-error',
|
|
208
|
+
appliesTo: 'written-text-only',
|
|
209
|
+
},
|
|
210
|
+
limits: { maxLabels: 64 },
|
|
211
|
+
unsupported: ['Forcing a label when every score is below the abstain margin.'],
|
|
212
|
+
};
|
|
213
|
+
/** The `semantic.deduplicate` contract at version 1.0.0. */
|
|
214
|
+
export const semanticDeduplicate = {
|
|
215
|
+
contract: 'semantic.deduplicate',
|
|
216
|
+
version: '1.0.0',
|
|
217
|
+
toolName: 'semantic_deduplicate',
|
|
218
|
+
description: 'Group near-duplicate texts into greedy clusters around their representatives.',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
additionalProperties: false,
|
|
222
|
+
required: ['texts'],
|
|
223
|
+
properties: {
|
|
224
|
+
texts: { type: 'array', minItems: 1, maxItems: 1000, items: { type: 'string', minLength: 1, maxLength: 8192 } },
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
outputSchema: withMeta({
|
|
228
|
+
groups: {
|
|
229
|
+
type: 'array',
|
|
230
|
+
items: {
|
|
231
|
+
type: 'object',
|
|
232
|
+
additionalProperties: false,
|
|
233
|
+
required: ['members'],
|
|
234
|
+
properties: { members: { type: 'array', items: { type: 'integer', minimum: 0 } } },
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
}, ['groups']),
|
|
238
|
+
semantics: {
|
|
239
|
+
scoreKind: 'cosine-similarity',
|
|
240
|
+
calibrated: false,
|
|
241
|
+
emptyInputMeaning: 'binding-error',
|
|
242
|
+
appliesTo: 'written-text-only',
|
|
243
|
+
},
|
|
244
|
+
limits: { maxTexts: 1000 },
|
|
245
|
+
unsupported: ['Transitive-closure equivalence: clustering is greedy, not global.'],
|
|
246
|
+
};
|
|
247
|
+
/** The `media.find_moments` contract at version 1.0.0. */
|
|
248
|
+
export const mediaFindMoments = {
|
|
249
|
+
contract: 'media.find_moments',
|
|
250
|
+
version: '1.0.0',
|
|
251
|
+
toolName: 'media_find_moments',
|
|
252
|
+
description: 'Find the media windows most relevant to a query within approved media.',
|
|
253
|
+
inputSchema: {
|
|
254
|
+
type: 'object',
|
|
255
|
+
additionalProperties: false,
|
|
256
|
+
required: ['media', 'query'],
|
|
257
|
+
properties: {
|
|
258
|
+
media: { type: 'string', description: 'An approved media reference resolved by the host.' },
|
|
259
|
+
query: { type: 'string', minLength: 1, maxLength: 4096 },
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
outputSchema: withMeta({
|
|
263
|
+
windows: {
|
|
264
|
+
type: 'array',
|
|
265
|
+
items: {
|
|
266
|
+
type: 'object',
|
|
267
|
+
additionalProperties: false,
|
|
268
|
+
required: ['startMs', 'endMs', 'score'],
|
|
269
|
+
properties: {
|
|
270
|
+
startMs: { type: 'number', minimum: 0 },
|
|
271
|
+
endMs: { type: 'number', minimum: 0 },
|
|
272
|
+
score: { type: 'number' },
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
}, ['windows']),
|
|
277
|
+
semantics: {
|
|
278
|
+
scoreKind: 'cosine-similarity',
|
|
279
|
+
calibrated: false,
|
|
280
|
+
emptyInputMeaning: 'binding-error',
|
|
281
|
+
appliesTo: 'approved-media',
|
|
282
|
+
},
|
|
283
|
+
limits: { maxWindows: 32, maxQueryCharacters: 4096 },
|
|
284
|
+
unsupported: ['Windows outside the approved media bounds.'],
|
|
285
|
+
};
|
|
286
|
+
/** The `decision.choose` contract at version 1.0.0 (Laya family). */
|
|
287
|
+
export const decisionChoose = {
|
|
288
|
+
contract: 'decision.choose',
|
|
289
|
+
version: '1.0.0',
|
|
290
|
+
toolName: 'decision_choose',
|
|
291
|
+
description: 'Choose one option from a bounded set for a stated decision, with a confidence verdict.',
|
|
292
|
+
inputSchema: {
|
|
293
|
+
type: 'object',
|
|
294
|
+
additionalProperties: false,
|
|
295
|
+
required: ['decision', 'options'],
|
|
296
|
+
properties: {
|
|
297
|
+
decision: { type: 'string', minLength: 1, maxLength: 4096 },
|
|
298
|
+
options: { type: 'array', minItems: 2, maxItems: 16, items: { type: 'string', minLength: 1, maxLength: 400 } },
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
outputSchema: withMeta({
|
|
302
|
+
chosen: { type: 'integer', minimum: 0 },
|
|
303
|
+
confidence: { type: 'string', enum: ['confident', 'likely', 'tentative'] },
|
|
304
|
+
reason: { type: 'string', minLength: 1 },
|
|
305
|
+
}, ['chosen', 'confidence', 'reason']),
|
|
306
|
+
semantics: {
|
|
307
|
+
scoreKind: 'vendor-reported-confidence',
|
|
308
|
+
calibrated: false,
|
|
309
|
+
emptyInputMeaning: 'binding-error',
|
|
310
|
+
appliesTo: 'stated-decision',
|
|
311
|
+
},
|
|
312
|
+
limits: { maxOptions: 16 },
|
|
313
|
+
unsupported: ['Open-ended generation: this contract chooses, it does not compose.'],
|
|
314
|
+
};
|
|
315
|
+
/** The `decision.test` contract at version 1.0.0. */
|
|
316
|
+
export const decisionTest = {
|
|
317
|
+
contract: 'decision.test',
|
|
318
|
+
version: '1.0.0',
|
|
319
|
+
toolName: 'decision_test',
|
|
320
|
+
description: 'Test a binary predicate against supplied text and report the verdict with evidence.',
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: 'object',
|
|
323
|
+
additionalProperties: false,
|
|
324
|
+
required: ['text', 'predicate'],
|
|
325
|
+
properties: {
|
|
326
|
+
text: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
327
|
+
predicate: { type: 'string', minLength: 1, maxLength: 1000 },
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
outputSchema: withMeta({
|
|
331
|
+
verdict: { type: 'boolean' },
|
|
332
|
+
confidence: { type: 'string', enum: ['confident', 'likely', 'tentative'] },
|
|
333
|
+
evidence: { type: 'string', minLength: 1 },
|
|
334
|
+
}, ['verdict', 'confidence', 'evidence']),
|
|
335
|
+
semantics: {
|
|
336
|
+
scoreKind: 'vendor-reported-confidence',
|
|
337
|
+
calibrated: false,
|
|
338
|
+
emptyInputMeaning: 'binding-error',
|
|
339
|
+
appliesTo: 'written-text-only',
|
|
340
|
+
},
|
|
341
|
+
limits: { maxInputCharacters: 32768 },
|
|
342
|
+
unsupported: ['Testing predicates about content outside the supplied text.'],
|
|
343
|
+
};
|
|
344
|
+
/** The `decision.score` contract at version 1.0.0. */
|
|
345
|
+
export const decisionScore = {
|
|
346
|
+
contract: 'decision.score',
|
|
347
|
+
version: '1.0.0',
|
|
348
|
+
toolName: 'decision_score',
|
|
349
|
+
description: 'Score supplied options against one criterion on a declared bounded scale.',
|
|
350
|
+
inputSchema: {
|
|
351
|
+
type: 'object',
|
|
352
|
+
additionalProperties: false,
|
|
353
|
+
required: ['criterion', 'options'],
|
|
354
|
+
properties: {
|
|
355
|
+
criterion: { type: 'string', minLength: 1, maxLength: 2000 },
|
|
356
|
+
options: { type: 'array', minItems: 1, maxItems: 16, items: { type: 'string', minLength: 1, maxLength: 400 } },
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
outputSchema: withMeta({
|
|
360
|
+
scores: {
|
|
361
|
+
type: 'array',
|
|
362
|
+
items: {
|
|
363
|
+
type: 'object',
|
|
364
|
+
additionalProperties: false,
|
|
365
|
+
required: ['index', 'score'],
|
|
366
|
+
properties: { index: { type: 'integer', minimum: 0 }, score: { type: 'number', minimum: 0, maximum: 10 } },
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
}, ['scores']),
|
|
370
|
+
semantics: {
|
|
371
|
+
scoreKind: 'bounded-scale-0-10',
|
|
372
|
+
calibrated: false,
|
|
373
|
+
emptyInputMeaning: 'binding-error',
|
|
374
|
+
appliesTo: 'stated-criterion',
|
|
375
|
+
},
|
|
376
|
+
limits: { maxOptions: 16 },
|
|
377
|
+
unsupported: ['Scores outside the declared 0-10 scale.'],
|
|
378
|
+
};
|
|
379
|
+
/** The `structured.extract` contract at version 1.0.0 (Needle family). */
|
|
380
|
+
export const structuredExtract = {
|
|
381
|
+
contract: 'structured.extract',
|
|
382
|
+
version: '1.0.0',
|
|
383
|
+
toolName: 'structured_extract',
|
|
384
|
+
description: 'Extract typed fields from supplied text against the caller-declared, host-approved schema snapshot.',
|
|
385
|
+
inputSchema: {
|
|
386
|
+
type: 'object',
|
|
387
|
+
additionalProperties: false,
|
|
388
|
+
required: ['text', 'schema'],
|
|
389
|
+
properties: {
|
|
390
|
+
text: { type: 'string', minLength: 1, maxLength: 32768 },
|
|
391
|
+
schema: { type: 'object', description: 'The host-approved extraction schema snapshot (NDL-02).' },
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
outputSchema: withMeta({
|
|
395
|
+
extracted: { type: 'object', description: 'The typed extraction payload.' },
|
|
396
|
+
}, ['extracted']),
|
|
397
|
+
semantics: {
|
|
398
|
+
scoreKind: 'none',
|
|
399
|
+
calibrated: false,
|
|
400
|
+
emptyInputMeaning: 'binding-error',
|
|
401
|
+
appliesTo: 'written-text-only',
|
|
402
|
+
},
|
|
403
|
+
limits: { maxInputCharacters: 32768 },
|
|
404
|
+
unsupported: ['Executing a caller-supplied schema that the host has not approved.'],
|
|
405
|
+
};
|
|
406
|
+
/** The `plan.tools` contract at version 1.0.0 (Needle family). */
|
|
407
|
+
export const toolsPlan = {
|
|
408
|
+
contract: 'plan.tools',
|
|
409
|
+
version: '1.0.0',
|
|
410
|
+
toolName: 'tools_plan',
|
|
411
|
+
description: 'Propose a read-only tool plan against the host-frozen authorized tool snapshot (NDL-02).',
|
|
412
|
+
inputSchema: {
|
|
413
|
+
type: 'object',
|
|
414
|
+
additionalProperties: false,
|
|
415
|
+
required: ['objective'],
|
|
416
|
+
properties: {
|
|
417
|
+
objective: { type: 'string', minLength: 1, maxLength: 4096 },
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
outputSchema: withMeta({
|
|
421
|
+
proposal: {
|
|
422
|
+
type: 'array',
|
|
423
|
+
items: {
|
|
424
|
+
type: 'object',
|
|
425
|
+
additionalProperties: false,
|
|
426
|
+
required: ['tool', 'arguments'],
|
|
427
|
+
properties: {
|
|
428
|
+
tool: { type: 'string', minLength: 1 },
|
|
429
|
+
arguments: { type: 'object' },
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
}, ['proposal']),
|
|
434
|
+
semantics: {
|
|
435
|
+
scoreKind: 'none',
|
|
436
|
+
calibrated: false,
|
|
437
|
+
emptyInputMeaning: 'binding-error',
|
|
438
|
+
appliesTo: 'proposal-only',
|
|
439
|
+
},
|
|
440
|
+
limits: { maxObjectiveCharacters: 4096 },
|
|
441
|
+
unsupported: [
|
|
442
|
+
'Executing the proposal: this contract proposes; the host re-checks authorization before any dispatch (NDL-03).',
|
|
443
|
+
],
|
|
444
|
+
};
|
|
445
|
+
//# sourceMappingURL=standard.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `stt.transcribe` — the canonical transcription contract (TOOL-01).
|
|
3
|
+
*
|
|
4
|
+
* This contract is model-free on purpose. Any conforming implementation binds to
|
|
5
|
+
* it, so a caller addresses `stt_transcribe` once and the host decides which
|
|
6
|
+
* model runs (BASE-02). Adding a second transcription model must not add a
|
|
7
|
+
* second tool.
|
|
8
|
+
*
|
|
9
|
+
* The semantics block is the part a schema cannot express and the part the spec
|
|
10
|
+
* insists on (DECL-01, TOOL-01): whether this transcribes or translates, what
|
|
11
|
+
* the timestamps mean, and what an empty result means.
|
|
12
|
+
*
|
|
13
|
+
* @module @try-works/tool-mode-contracts/contracts/stt-transcribe
|
|
14
|
+
*/
|
|
15
|
+
import type { ToolContract } from '../registry.ts';
|
|
16
|
+
/** Accepted audio container/codec combinations for the bounded decoder. */
|
|
17
|
+
export declare const STT_ADMITTED_FORMATS: readonly ["wav-pcm16"];
|
|
18
|
+
/** The `stt.transcribe` contract at version 1.0.0. */
|
|
19
|
+
export declare const sttTranscribe: ToolContract;
|
|
20
|
+
//# sourceMappingURL=stt-transcribe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stt-transcribe.d.ts","sourceRoot":"","sources":["../../src/contracts/stt-transcribe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,wBAAyB,CAAA;AAE1D,sDAAsD;AACtD,eAAO,MAAM,aAAa,EAAE,YAqG3B,CAAA"}
|