@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.
Files changed (260) hide show
  1. package/bin/dsh-tool-mode-credentials.mjs +20 -0
  2. package/bin/dsh-tool-mode.mjs +202 -0
  3. package/catalog/desert-ant-models.json +693 -693
  4. package/client/client.model-tools.js +614 -0
  5. package/client/index.js +1717 -0
  6. package/lib/adapters/index.d.ts.map +1 -1
  7. package/lib/adapters/index.js +4 -4
  8. package/lib/bindings.d.ts.map +1 -1
  9. package/lib/bindings.js +26 -25
  10. package/lib/capability.d.ts.map +1 -1
  11. package/lib/capability.js +17 -0
  12. package/lib/capture-path.d.ts +97 -0
  13. package/lib/capture-path.d.ts.map +1 -0
  14. package/lib/capture-path.js +152 -0
  15. package/lib/diagnostics.d.ts +166 -0
  16. package/lib/diagnostics.d.ts.map +1 -0
  17. package/lib/diagnostics.js +135 -0
  18. package/lib/extension-dependencies.d.ts +325 -0
  19. package/lib/extension-dependencies.d.ts.map +1 -0
  20. package/lib/extension-dependencies.js +858 -0
  21. package/lib/extension-dispatch.d.ts +117 -0
  22. package/lib/extension-dispatch.d.ts.map +1 -0
  23. package/lib/extension-dispatch.js +124 -0
  24. package/lib/extension-registrar.d.ts +100 -0
  25. package/lib/extension-registrar.d.ts.map +1 -0
  26. package/lib/extension-registrar.js +134 -0
  27. package/lib/extensions-api.d.ts +221 -0
  28. package/lib/extensions-api.d.ts.map +1 -0
  29. package/lib/extensions-api.js +17 -0
  30. package/lib/extensions-remote.d.ts +54 -0
  31. package/lib/extensions-remote.d.ts.map +1 -0
  32. package/lib/extensions-remote.js +66 -0
  33. package/lib/extensions-service.d.ts +367 -0
  34. package/lib/extensions-service.d.ts.map +1 -0
  35. package/lib/extensions-service.js +1527 -0
  36. package/lib/harness-llm.d.ts +138 -0
  37. package/lib/harness-llm.d.ts.map +1 -0
  38. package/lib/harness-llm.js +218 -0
  39. package/lib/harness-serving.d.ts +95 -0
  40. package/lib/harness-serving.d.ts.map +1 -0
  41. package/lib/harness-serving.js +157 -0
  42. package/lib/headless.d.ts +97 -0
  43. package/lib/headless.d.ts.map +1 -0
  44. package/lib/headless.js +349 -0
  45. package/lib/http-acquisition.d.ts +27 -0
  46. package/lib/http-acquisition.d.ts.map +1 -0
  47. package/lib/http-acquisition.js +136 -0
  48. package/lib/index.d.ts +271 -7
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +2644 -70
  51. package/lib/invocation-accounting.d.ts +169 -0
  52. package/lib/invocation-accounting.d.ts.map +1 -0
  53. package/lib/invocation-accounting.js +148 -0
  54. package/lib/legacy-migration.d.ts +95 -0
  55. package/lib/legacy-migration.d.ts.map +1 -0
  56. package/lib/legacy-migration.js +429 -0
  57. package/lib/managed-workers.d.ts +151 -0
  58. package/lib/managed-workers.d.ts.map +1 -0
  59. package/lib/managed-workers.js +249 -0
  60. package/lib/mcp/client-grant.d.ts +74 -0
  61. package/lib/mcp/client-grant.d.ts.map +1 -0
  62. package/lib/mcp/client-grant.js +60 -0
  63. package/lib/mcp/credential-cli.d.ts +38 -0
  64. package/lib/mcp/credential-cli.d.ts.map +1 -0
  65. package/lib/mcp/credential-cli.js +148 -0
  66. package/lib/mcp/credential-store.d.ts +143 -0
  67. package/lib/mcp/credential-store.d.ts.map +1 -0
  68. package/lib/mcp/credential-store.js +454 -0
  69. package/lib/mcp/host-binding.d.ts +25 -0
  70. package/lib/mcp/host-binding.d.ts.map +1 -1
  71. package/lib/mcp/host-binding.js +107 -14
  72. package/lib/mcp/http.d.ts +68 -18
  73. package/lib/mcp/http.d.ts.map +1 -1
  74. package/lib/mcp/http.js +390 -62
  75. package/lib/mcp/oauth.d.ts +149 -0
  76. package/lib/mcp/oauth.d.ts.map +1 -0
  77. package/lib/mcp/oauth.js +396 -0
  78. package/lib/mcp/protocol.d.ts +46 -7
  79. package/lib/mcp/protocol.d.ts.map +1 -1
  80. package/lib/mcp/protocol.js +63 -16
  81. package/lib/mcp/rate-limit.d.ts +68 -0
  82. package/lib/mcp/rate-limit.d.ts.map +1 -0
  83. package/lib/mcp/rate-limit.js +114 -0
  84. package/lib/mcp/sdk-v2.d.ts +17 -0
  85. package/lib/mcp/sdk-v2.d.ts.map +1 -0
  86. package/lib/mcp/sdk-v2.js +181 -0
  87. package/lib/mcp/server.d.ts +11 -1
  88. package/lib/mcp/server.d.ts.map +1 -1
  89. package/lib/mcp/server.js +80 -13
  90. package/lib/mcp/stdio.d.ts.map +1 -1
  91. package/lib/mcp/stdio.js +9 -1
  92. package/lib/mcp/subscriptions.d.ts +43 -1
  93. package/lib/mcp/subscriptions.d.ts.map +1 -1
  94. package/lib/mcp/subscriptions.js +90 -9
  95. package/lib/model-qualification.d.ts +192 -0
  96. package/lib/model-qualification.d.ts.map +1 -0
  97. package/lib/model-qualification.js +178 -0
  98. package/lib/planning.d.ts +246 -0
  99. package/lib/planning.d.ts.map +1 -0
  100. package/lib/planning.js +457 -0
  101. package/lib/prepared-assets.d.ts +178 -0
  102. package/lib/prepared-assets.d.ts.map +1 -0
  103. package/lib/prepared-assets.js +286 -0
  104. package/lib/provider-bridge.d.ts +37 -0
  105. package/lib/provider-bridge.d.ts.map +1 -1
  106. package/lib/provider-bridge.js +189 -12
  107. package/lib/ptc-authority.d.ts +140 -0
  108. package/lib/ptc-authority.d.ts.map +1 -0
  109. package/lib/ptc-authority.js +216 -0
  110. package/lib/ptc-runtime.d.ts +156 -0
  111. package/lib/ptc-runtime.d.ts.map +1 -0
  112. package/lib/ptc-runtime.js +191 -0
  113. package/lib/publication.d.ts +2 -1
  114. package/lib/publication.d.ts.map +1 -1
  115. package/lib/publication.js +13 -5
  116. package/lib/receipt.d.ts.map +1 -1
  117. package/lib/receipt.js +8 -0
  118. package/lib/title-proposal.d.ts +194 -0
  119. package/lib/title-proposal.d.ts.map +1 -0
  120. package/lib/title-proposal.js +244 -0
  121. package/lib/tool-mode-run.d.ts +235 -0
  122. package/lib/tool-mode-run.d.ts.map +1 -0
  123. package/lib/tool-mode-run.js +283 -0
  124. package/lib/types.d.ts +3 -1
  125. package/lib/types.d.ts.map +1 -1
  126. package/lib/update-surface.d.ts +79 -0
  127. package/lib/update-surface.d.ts.map +1 -0
  128. package/lib/update-surface.js +224 -0
  129. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts +38 -0
  130. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.d.ts.map +1 -0
  131. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/standard.js +445 -0
  132. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts +14 -0
  133. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.d.ts.map +1 -0
  134. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-embed.js +63 -0
  135. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts +14 -0
  136. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.d.ts.map +1 -0
  137. package/node_modules/@try-works/tool-mode-contracts/lib/contracts/text-rerank.js +76 -0
  138. package/node_modules/@try-works/tool-mode-contracts/lib/dsh.d.ts.map +1 -1
  139. package/node_modules/@try-works/tool-mode-contracts/lib/dsh.js +69 -55
  140. package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts +4 -1
  141. package/node_modules/@try-works/tool-mode-contracts/lib/index.d.ts.map +1 -1
  142. package/node_modules/@try-works/tool-mode-contracts/lib/index.js +26 -2
  143. package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts +28 -2
  144. package/node_modules/@try-works/tool-mode-contracts/lib/registry.d.ts.map +1 -1
  145. package/node_modules/@try-works/tool-mode-contracts/lib/registry.js +93 -10
  146. package/node_modules/@try-works/tool-mode-contracts/package.json +0 -1
  147. package/node_modules/@try-works/tool-mode-extension-sdk/bin/dsh-tool-mode.mjs +20 -0
  148. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts +80 -0
  149. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.d.ts.map +1 -0
  150. package/node_modules/@try-works/tool-mode-extension-sdk/lib/cli.js +533 -0
  151. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts +83 -0
  152. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.d.ts.map +1 -0
  153. package/node_modules/@try-works/tool-mode-extension-sdk/lib/declarative-recipes.js +125 -0
  154. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts +70 -0
  155. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.d.ts.map +1 -0
  156. package/node_modules/@try-works/tool-mode-extension-sdk/lib/discovery.js +201 -0
  157. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts +57 -0
  158. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.d.ts.map +1 -0
  159. package/node_modules/@try-works/tool-mode-extension-sdk/lib/errors.js +83 -0
  160. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts +32 -0
  161. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.d.ts.map +1 -0
  162. package/node_modules/@try-works/tool-mode-extension-sdk/lib/index.js +32 -0
  163. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts +86 -0
  164. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.d.ts.map +1 -0
  165. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/archive.js +191 -0
  166. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts +126 -0
  167. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.d.ts.map +1 -0
  168. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/dependencies.js +297 -0
  169. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts +216 -0
  170. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.d.ts.map +1 -0
  171. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/lifecycle.js +800 -0
  172. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts +210 -0
  173. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.d.ts.map +1 -0
  174. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/migration.js +368 -0
  175. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts +63 -0
  176. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.d.ts.map +1 -0
  177. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/runtime-link.js +149 -0
  178. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts +35 -0
  179. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.d.ts.map +1 -0
  180. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/source-directory.js +179 -0
  181. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts +179 -0
  182. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.d.ts.map +1 -0
  183. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/staged.js +235 -0
  184. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts +367 -0
  185. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.d.ts.map +1 -0
  186. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/store.js +807 -0
  187. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts +44 -0
  188. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.d.ts.map +1 -0
  189. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/tar-gzip-source.js +243 -0
  190. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts +185 -0
  191. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.d.ts.map +1 -0
  192. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/update-flow.js +504 -0
  193. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts +17 -0
  194. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.d.ts.map +1 -0
  195. package/node_modules/@try-works/tool-mode-extension-sdk/lib/install/zip-source.js +80 -0
  196. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts +52 -0
  197. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.d.ts.map +1 -0
  198. package/node_modules/@try-works/tool-mode-extension-sdk/lib/load.js +102 -0
  199. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts +171 -0
  200. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.d.ts.map +1 -0
  201. package/node_modules/@try-works/tool-mode-extension-sdk/lib/manifest.js +271 -0
  202. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts +242 -0
  203. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.d.ts.map +1 -0
  204. package/node_modules/@try-works/tool-mode-extension-sdk/lib/runtime.js +58 -0
  205. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts +118 -0
  206. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.d.ts.map +1 -0
  207. package/node_modules/@try-works/tool-mode-extension-sdk/lib/state.js +113 -0
  208. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts +2 -0
  209. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.d.ts.map +1 -0
  210. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker/worker-child.js +351 -0
  211. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts +150 -0
  212. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.d.ts.map +1 -0
  213. package/node_modules/@try-works/tool-mode-extension-sdk/lib/worker.js +670 -0
  214. package/node_modules/@try-works/tool-mode-extension-sdk/package.json +53 -0
  215. package/node_modules/@try-works/tool-mode-extension-sdk/schema/extension-manifest-1.1.0.schema.json +253 -0
  216. package/node_modules/@try-works/tool-mode-recipes/bin/tool-mode-recipe.mjs +15 -0
  217. package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts +427 -0
  218. package/node_modules/@try-works/tool-mode-recipes/lib/broker.d.ts.map +1 -0
  219. package/node_modules/@try-works/tool-mode-recipes/lib/broker.js +592 -0
  220. package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts +60 -0
  221. package/node_modules/@try-works/tool-mode-recipes/lib/cli.d.ts.map +1 -0
  222. package/node_modules/@try-works/tool-mode-recipes/lib/cli.js +936 -0
  223. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts +237 -0
  224. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.d.ts.map +1 -0
  225. package/node_modules/@try-works/tool-mode-recipes/lib/dsh-adapter.js +200 -0
  226. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts +85 -0
  227. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.d.ts.map +1 -0
  228. package/node_modules/@try-works/tool-mode-recipes/lib/fixture-provider.js +176 -0
  229. package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts +105 -0
  230. package/node_modules/@try-works/tool-mode-recipes/lib/images.d.ts.map +1 -0
  231. package/node_modules/@try-works/tool-mode-recipes/lib/images.js +129 -0
  232. package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts +25 -0
  233. package/node_modules/@try-works/tool-mode-recipes/lib/index.d.ts.map +1 -0
  234. package/node_modules/@try-works/tool-mode-recipes/lib/index.js +25 -0
  235. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts +325 -0
  236. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.d.ts.map +1 -0
  237. package/node_modules/@try-works/tool-mode-recipes/lib/recipe-format.js +1310 -0
  238. package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts +51 -0
  239. package/node_modules/@try-works/tool-mode-recipes/lib/templates.d.ts.map +1 -0
  240. package/node_modules/@try-works/tool-mode-recipes/lib/templates.js +310 -0
  241. package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts +227 -0
  242. package/node_modules/@try-works/tool-mode-recipes/lib/titles.d.ts.map +1 -0
  243. package/node_modules/@try-works/tool-mode-recipes/lib/titles.js +407 -0
  244. package/node_modules/@try-works/tool-mode-recipes/package.json +56 -0
  245. package/node_modules/@try-works/tool-mode-recipes/recipes/describe-image.json +38 -0
  246. package/node_modules/@try-works/tool-mode-recipes/recipes/text-title.json +45 -0
  247. package/node_modules/@try-works/tool-mode-recipes/schema/harness-model-recipe.schema.json +273 -0
  248. package/package.json +43 -15
  249. package/remote/spec.mjs +462 -0
  250. package/remote/typert.host.mjs +14 -0
  251. package/remote/typert.remote-client.mjs +16 -0
  252. package/lib/adapters/tongue.d.ts +0 -31
  253. package/lib/adapters/tongue.d.ts.map +0 -1
  254. package/lib/adapters/tongue.js +0 -93
  255. package/lib/adapters/voz.d.ts +0 -28
  256. package/lib/adapters/voz.d.ts.map +0 -1
  257. package/lib/adapters/voz.js +0 -102
  258. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts +0 -0
  259. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.d.ts.map +0 -0
  260. /package/{lib → node_modules/@try-works/tool-mode-extension-sdk/lib}/licensing.js +0 -0
@@ -0,0 +1,427 @@
1
+ /**
2
+ * The DSH LLM broker: one provider-neutral harness executor for declarative recipes
3
+ * (HLM-01, HLM-02, HLM-05, HLM-06, HLM-07, HLM-09, HLM-10, HLM-11).
4
+ *
5
+ * The broker's whole job is to build ONE request that contains nothing but the recipe's
6
+ * instructions and the validated bound inputs, and then to report honestly what came
7
+ * back. Every invariant here is a way the request could stop being that request, or the
8
+ * result stop being the result:
9
+ *
10
+ * - **The request is isolated by construction.** It is built from the recipe and the
11
+ * bound values alone. There is no parameter through which parent history, a parent
12
+ * system prompt, a tool catalog, skills, attachments or memory could arrive, and the
13
+ * shape is frozen so nothing can be added to it after validation (HLM-05, AT-68).
14
+ * - **Images are typed media, or the call is refused.** An image recipe on a provider
15
+ * whose capabilities do not cover images fails with `IMAGE_INPUT_UNAVAILABLE`. It does
16
+ * not quietly degrade to a text-only call that "describes" an image the model never
17
+ * received — that fallback produces a fluent invention, which is worse than an error
18
+ * (HLM-11).
19
+ * - **An unknown capability is not permission.** A provider that has not reported its
20
+ * image support fails with `EXECUTOR_CAPABILITY_UNKNOWN` rather than being assumed
21
+ * capable (MODEL-06's three-state rule, reused here).
22
+ * - **Remote is a policy decision, not an implementation detail.** `permitsDestination`
23
+ * is mirrored from RES-10 so a local-only profile refuses a remote provider however
24
+ * the tool was built.
25
+ * - **Cancellation is reported as cancellation.** An aborted signal can never produce a
26
+ * success, and never an empty one: an empty success is exactly what a caller writes
27
+ * into a document (HLM-10).
28
+ * - **Refusal, truncation, an empty completion and a stray tool call are errors, each
29
+ * with its own code.** HLM-07 requires them to be distinct failures, because a caller
30
+ * that cannot tell "the model refused" from "the model was cut off" cannot respond
31
+ * correctly to either (RCP-11).
32
+ * - **Recording is a precondition, not a side effect.** A recipe that declines recording
33
+ * under a host that requires it is refused with `CAPTURE_POLICY_CONFLICT` BEFORE the
34
+ * provider is called, because refusing after the call would report a refusal for work
35
+ * that has already been billed (HLM-09).
36
+ *
37
+ * @module @try-works/tool-mode-recipes/broker
38
+ */
39
+ import { type RecipeManifest, type RecipeValue } from './recipe-format.ts';
40
+ /** Where a provider runs. RES-10's destination rule is stated in these terms. */
41
+ export type ProviderDestination = 'local' | 'remote';
42
+ /**
43
+ * What a provider knows about a capability (MODEL-06).
44
+ *
45
+ * Three states, not two. `unsupported` is a fact the provider reported; `unknown` is the
46
+ * ABSENCE of a fact, and treating it as `unsupported` reports an unevaluated capability
47
+ * as a known absence while treating it as `supported` dispatches work that may fail
48
+ * silently. Both collapse a state the requirement says to keep separate.
49
+ */
50
+ export type CapabilityState = 'supported' | 'unsupported' | 'unknown';
51
+ /** What a provider reports about itself. */
52
+ export interface ProviderCapabilities {
53
+ /**
54
+ * Whether images are accepted. A plain boolean is accepted for convenience and
55
+ * normalised to `supported`/`unsupported`; `unknown` is the honest third state.
56
+ */
57
+ readonly images: CapabilityState | boolean;
58
+ /** The provider's own output-token ceiling for one call. */
59
+ readonly maxOutputTokens: number;
60
+ }
61
+ /** One typed image, as the transport carries it. */
62
+ export interface BrokerImage {
63
+ /** The image's media type, e.g. `image/png`. */
64
+ readonly mediaType: string;
65
+ /** The image's actual bytes. */
66
+ readonly bytes: Uint8Array;
67
+ }
68
+ /**
69
+ * The ONLY request a recipe execution can produce.
70
+ *
71
+ * The optional `system` member exists in the transport shape and is never populated by
72
+ * this broker: this slice's recipe format has no system field, and inheriting the parent
73
+ * agent's system prompt is forbidden (HLM-05). The tests assert its absence rather than
74
+ * trusting this comment.
75
+ */
76
+ export interface BrokerRequest {
77
+ /** Never set by this broker. Present so a future authorized context input has a home. */
78
+ readonly system?: string;
79
+ /** The rendered recipe instructions plus the bound inputs. */
80
+ readonly prompt: string;
81
+ /** The typed image inputs, when the recipe declares them and the caller supplied them. */
82
+ readonly images?: readonly BrokerImage[];
83
+ /** The effective ceiling after the recipe, host and provider limits are intersected. */
84
+ readonly maxOutputTokens: number;
85
+ /** The caller's cancellation channel, passed through unchanged. */
86
+ readonly signal: AbortSignal;
87
+ }
88
+ /** What a provider reported about consumption. */
89
+ export type LlmUsage = {
90
+ readonly known: true;
91
+ readonly inputTokens: number;
92
+ readonly outputTokens: number;
93
+ }
94
+ /**
95
+ * The provider reported no usage.
96
+ *
97
+ * Distinct from zero, for the same reason RES-10 keeps an unknown cost distinct from a
98
+ * free one: recording "0 tokens" for an unreported call invents a measurement.
99
+ */
100
+ | {
101
+ readonly known: false;
102
+ readonly reason: string;
103
+ };
104
+ /** How one provider call ended. */
105
+ export type LlmCompletion =
106
+ /** Text was produced. */
107
+ {
108
+ readonly kind: 'text';
109
+ readonly text: string;
110
+ readonly usage?: LlmUsage;
111
+ }
112
+ /** The provider declined. An error, never an empty result. */
113
+ | {
114
+ readonly kind: 'refused';
115
+ readonly reason: string;
116
+ }
117
+ /** Generation was cut short. An error, never a short result. */
118
+ | {
119
+ readonly kind: 'truncated';
120
+ readonly text: string;
121
+ }
122
+ /** The provider emitted a tool call, which must not be executed (HLM-06). */
123
+ | {
124
+ readonly kind: 'tool_call';
125
+ readonly toolName: string;
126
+ };
127
+ /**
128
+ * A provider of harness model calls.
129
+ *
130
+ * Deliberately tiny and vendor-free: no HTTP, no credentials, no vendor types. A
131
+ * recipe cannot reach any of the things this interface does not express (HLM-01).
132
+ */
133
+ export interface LlmProvider {
134
+ /** Stable provider identity, for receipts and the journal. */
135
+ readonly id: string;
136
+ /**
137
+ * The adapter generation.
138
+ *
139
+ * An authorization is issued for a generation, not for a name: a provider that has
140
+ * reloaded is a different endpoint, and combining the old capabilities with the new
141
+ * endpoint is what HLM-02 forbids.
142
+ */
143
+ readonly generation: number;
144
+ /** Where this provider runs. Checked against RES-10's destination rule. */
145
+ readonly destination: ProviderDestination;
146
+ /** What it can do, read ONCE per invocation. */
147
+ capabilities(): ProviderCapabilities;
148
+ /** Perform one isolated call. */
149
+ complete(request: BrokerRequest): Promise<LlmCompletion>;
150
+ }
151
+ /** Codes carried by a failed invocation. RCP-11's vocabulary plus three local additions. */
152
+ export type BrokerErrorCode =
153
+ /** No authorized executor, or the authorization is for another generation. */
154
+ 'EXECUTOR_NOT_CONFIGURED'
155
+ /** The provider has not reported whether it accepts images. */
156
+ | 'EXECUTOR_CAPABILITY_UNKNOWN'
157
+ /** A binding used a modality the recipe does not admit. */
158
+ | 'UNSUPPORTED_MODALITY'
159
+ /** The recipe needs images and the provider cannot accept them (HLM-11). */
160
+ | 'IMAGE_INPUT_UNAVAILABLE'
161
+ /** Mandatory recording conflicts with policy, so the call is refused (HLM-09). */
162
+ | 'CAPTURE_POLICY_CONFLICT'
163
+ /** The provider declined. */
164
+ | 'MODEL_REFUSED'
165
+ /** Generation was truncated. */
166
+ | 'MODEL_OUTPUT_TRUNCATED'
167
+ /** The output could not be used as a result, an empty one included. */
168
+ | 'INVALID_MODEL_OUTPUT'
169
+ /** The provider emitted a tool call, which is never executed (HLM-06). */
170
+ | 'UNEXPECTED_MODEL_TOOL_CALL'
171
+ /** A budget RES-10 states was exceeded. */
172
+ | 'MODEL_BUDGET_EXCEEDED'
173
+ /** The supplied arguments do not satisfy the recipe. */
174
+ | 'RECIPE_BINDING_ERROR'
175
+ /** The invocation was cancelled, by the caller or by its deadline. */
176
+ | 'CANCELLED'
177
+ /** The provider failed to complete. */
178
+ | 'PROVIDER_FAILED'
179
+ /** The mandatory recording could not be written, so the call did not run. */
180
+ | 'RECORDING_FAILED';
181
+ /** The host's invocation policy. Mirrors the parts of RES-10 this broker enforces. */
182
+ export interface BrokerHostPolicy {
183
+ /**
184
+ * Whether the host requires the prepared request to be journaled (HLM-09).
185
+ *
186
+ * When true, a recipe declaring `record: false` is refused rather than run unrecorded,
187
+ * and the broker refuses to be constructed without a journal sink.
188
+ */
189
+ readonly requireRecording: boolean;
190
+ /** Whether a remote destination may be reached at all (RES-10). */
191
+ readonly remoteDestinations: boolean;
192
+ /** The host's output-token ceiling. */
193
+ readonly outputTokens: number;
194
+ /** The host's image-input ceiling. */
195
+ readonly imageInputs: number;
196
+ }
197
+ /**
198
+ * The initial policy: RES-10's initial per-leaf maxima, with recording required.
199
+ *
200
+ * Recording defaults to REQUIRED because HLM-09 makes reconstructability a DSH
201
+ * requirement, and a default of "off" is how a harness call ends up unrecorded without
202
+ * anyone deciding that.
203
+ */
204
+ export declare const INITIAL_HOST_POLICY: BrokerHostPolicy;
205
+ /** A local-only policy, which forbids remote destinations however the tool was built. */
206
+ export declare const LOCAL_ONLY_HOST_POLICY: BrokerHostPolicy;
207
+ /**
208
+ * Whether a policy permits reaching a destination (RES-10).
209
+ *
210
+ * Mirrored from the host's `harness-budgets.permitsDestination`: a local-only profile
211
+ * prohibits remote destinations INDEPENDENTLY of how the tool was implemented, so this
212
+ * asks the policy rather than the implementation. `local` is always permitted.
213
+ * @param policy - the policy in force.
214
+ * @param destination - the destination being considered.
215
+ * @returns whether it is permitted.
216
+ */
217
+ export declare function permitsDestination(policy: BrokerHostPolicy, destination: ProviderDestination): boolean;
218
+ /**
219
+ * Narrow a policy by a requested reduction (RES-10, HLM-07).
220
+ *
221
+ * Every figure takes the MINIMUM, so a request can only lower a limit; that direction is
222
+ * the point, since a caller asking for more than the profile permits must get the
223
+ * profile's figure. `requireRecording` is an OR: a request can demand recording where
224
+ * the base was silent, and can never switch it off.
225
+ * @param base - the policy in force.
226
+ * @param requested - what the caller asked for.
227
+ * @returns the effective policy.
228
+ */
229
+ export declare function narrowBrokerPolicy(base: BrokerHostPolicy, requested: Partial<BrokerHostPolicy>): BrokerHostPolicy;
230
+ /** The journal entry for one auxiliary call (HLM-09). */
231
+ export interface BrokerRecord {
232
+ /** The record kind, so a journal can hold more than one thing. */
233
+ readonly kind: 'harness-model-auxiliary-call';
234
+ /** The tool invocation this call belongs to. */
235
+ readonly toolName: string;
236
+ /** The contract identity, so the record ties to a versioned contract. */
237
+ readonly contractId: string;
238
+ /** The recipe identity and version, pinned for reconstructability. */
239
+ readonly recipeId: string;
240
+ /** The recipe version. */
241
+ readonly recipeVersion: string;
242
+ /** The provider that will run the call. */
243
+ readonly providerId: string;
244
+ /** The provider generation that was authorized. */
245
+ readonly providerGeneration: number;
246
+ /** Where the call goes. */
247
+ readonly destination: ProviderDestination;
248
+ /** The effective token ceiling. */
249
+ readonly maxOutputTokens: number;
250
+ /** How many image inputs the request carries. */
251
+ readonly imageCount: number;
252
+ /** The EXACT prepared prompt (HLM-09: the model-visible input must be reconstructable). */
253
+ readonly prompt: string;
254
+ /**
255
+ * What context the request carries.
256
+ *
257
+ * Recorded as a value rather than left implicit, so a journal entry states that the
258
+ * request was recipe-only instead of leaving a reader to infer it from the absence of
259
+ * fields.
260
+ */
261
+ readonly context: 'recipe-only';
262
+ }
263
+ /**
264
+ * Where journal entries go.
265
+ *
266
+ * The broker never writes a file itself: retention, access control and the operator's
267
+ * policy are the host's, and a broker that decided them would be deciding them outside
268
+ * the policy that governs them (HLM-09).
269
+ */
270
+ export type BrokerRecordSink = (record: BrokerRecord) => void | Promise<void>;
271
+ /** Identity attached to a completed invocation. */
272
+ export interface ProviderIdentity {
273
+ /** The provider id. */
274
+ readonly id: string;
275
+ /** The generation the broker RESOLVED for this invocation. */
276
+ readonly generation: number;
277
+ /** Where it ran. */
278
+ readonly destination: ProviderDestination;
279
+ }
280
+ /** The recipe identity a completed invocation ran. */
281
+ export interface RecipeIdentity {
282
+ /** The recipe id. */
283
+ readonly id: string;
284
+ /** The recipe version. */
285
+ readonly version: string;
286
+ /** The tool the recipe implements. */
287
+ readonly toolName: string;
288
+ /** The contract the tool implements. */
289
+ readonly contractId: string;
290
+ }
291
+ /** What one recipe invocation produced. */
292
+ export type BrokerOutcome = {
293
+ readonly kind: 'completed';
294
+ /** The model's text. Never empty: an empty completion fails instead. */
295
+ readonly text: string;
296
+ /** What the provider reported, or an honest unknown. */
297
+ readonly usage: LlmUsage;
298
+ /** Whether the prepared request was journaled. */
299
+ readonly recorded: boolean;
300
+ /** Which provider generation served the call. */
301
+ readonly provider: ProviderIdentity;
302
+ /** Which recipe was run. */
303
+ readonly recipe: RecipeIdentity;
304
+ } | {
305
+ readonly kind: 'failed';
306
+ readonly code: BrokerErrorCode;
307
+ readonly reason: string;
308
+ } | {
309
+ readonly kind: 'cancelled';
310
+ readonly reason: string;
311
+ };
312
+ /** A completed invocation. */
313
+ export type BrokerCompletion = Extract<BrokerOutcome, {
314
+ kind: 'completed';
315
+ }>;
316
+ /** Raised by {@link HarnessBroker.runOrThrow}. */
317
+ export declare class BrokerError extends Error {
318
+ readonly name = "BrokerError";
319
+ /** The failure code. */
320
+ readonly code: BrokerErrorCode;
321
+ constructor(code: BrokerErrorCode, message: string);
322
+ }
323
+ /** An authorization for one tool, captured with the provider's generation. */
324
+ export interface ProviderGrant {
325
+ /** The tool the authorization covers. */
326
+ readonly toolName: string;
327
+ /** The authorized provider. */
328
+ readonly provider: LlmProvider;
329
+ /** The generation observed when the authorization was issued. */
330
+ readonly generation: number;
331
+ }
332
+ /** Options for a broker. */
333
+ export interface BrokerOptions {
334
+ /** The host policy. Defaults to {@link INITIAL_HOST_POLICY}. */
335
+ readonly policy?: BrokerHostPolicy;
336
+ /** The journal sink. Required when the policy requires recording (HLM-09). */
337
+ readonly record?: BrokerRecordSink;
338
+ }
339
+ /** Options for one invocation. */
340
+ export interface RunOptions {
341
+ /** The caller's cancellation channel. */
342
+ readonly signal?: AbortSignal;
343
+ /**
344
+ * A wall-clock deadline for this invocation, in milliseconds (RES-10's 60 s figure is
345
+ * the caller's to pass).
346
+ *
347
+ * Implemented by aborting the same internal controller the caller's signal aborts, so
348
+ * there is exactly one cancellation path and a deadline cannot report itself as a
349
+ * success.
350
+ */
351
+ readonly deadlineMs?: number;
352
+ }
353
+ /**
354
+ * Build the ONE request a recipe can produce (HLM-05).
355
+ *
356
+ * Exported because the isolation property deserves to be checkable without a provider:
357
+ * the request object's key set IS the claim that nothing else is sent.
358
+ * @param recipe - the recipe being run.
359
+ * @param values - validated bindings.
360
+ * @param maxOutputTokens - the effective ceiling.
361
+ * @param signal - the cancellation channel.
362
+ * @returns the frozen request.
363
+ */
364
+ export declare function buildIsolatedRequest(recipe: RecipeManifest, values: Readonly<Record<string, RecipeValue>>, maxOutputTokens: number, signal: AbortSignal): BrokerRequest;
365
+ /**
366
+ * The harness broker.
367
+ *
368
+ * One instance holds the authorizations (which tool may use which provider generation)
369
+ * and the host policy. It is deliberately not a registry of tools: nothing here switches
370
+ * on a tool name, which is what RCP-12 forbids and what the tests assert by running two
371
+ * different recipes through the same code path.
372
+ */
373
+ export declare class HarnessBroker {
374
+ #private;
375
+ constructor(options?: BrokerOptions);
376
+ /** The host policy in force. */
377
+ get policy(): BrokerHostPolicy;
378
+ /**
379
+ * Authorize a provider generation for one tool (HLM-02).
380
+ *
381
+ * The generation is CAPTURED here rather than read at dispatch time, so a provider that
382
+ * reloads between authorization and dispatch stops being authorized instead of being
383
+ * silently used under the old decision.
384
+ * @param toolName - the tool this authorization covers.
385
+ * @param provider - the provider.
386
+ */
387
+ authorize(toolName: string, provider: LlmProvider): ProviderGrant;
388
+ /**
389
+ * Revoke a tool's authorization.
390
+ * @param toolName - the tool to revoke.
391
+ * @returns whether an authorization existed.
392
+ */
393
+ revoke(toolName: string): boolean;
394
+ /**
395
+ * The live authorization for a tool, or `undefined`.
396
+ *
397
+ * `undefined` covers both "never authorized" and "authorized for a generation this
398
+ * provider no longer is", because from a caller's point of view both mean the same
399
+ * thing: this invocation has no authorized executor. {@link resolveGrant} keeps the
400
+ * two apart for the error message.
401
+ * @param toolName - the tool to look up.
402
+ * @returns the grant, when it is still valid.
403
+ */
404
+ grantFor(toolName: string): ProviderGrant | undefined;
405
+ /**
406
+ * Run one recipe invocation.
407
+ *
408
+ * Cancellation, policy refusals and provider failures all come back as outcomes rather
409
+ * than exceptions, so a caller that must report a result cannot lose one to an
410
+ * unhandled rejection. Use {@link runOrThrow} where an exception is the right shape.
411
+ * @param recipe - the recipe to run.
412
+ * @param args - the caller's arguments, validated against the recipe's inputs.
413
+ * @param options - the cancellation channel and deadline.
414
+ * @returns the outcome: never a success that carries no text.
415
+ */
416
+ run(recipe: RecipeManifest, args: unknown, options?: RunOptions): Promise<BrokerOutcome>;
417
+ /**
418
+ * Run one recipe invocation, throwing on failure or cancellation.
419
+ * @param recipe - the recipe to run.
420
+ * @param args - the caller's arguments.
421
+ * @param options - the cancellation channel and deadline.
422
+ * @returns the completed outcome.
423
+ * @throws BrokerError on any failure, including cancellation.
424
+ */
425
+ runOrThrow(recipe: RecipeManifest, args: unknown, options?: RunOptions): Promise<BrokerCompletion>;
426
+ }
427
+ //# sourceMappingURL=broker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker.d.ts","sourceRoot":"","sources":["../src/broker.ts"],"names":[],"mappings":"AAAA;;;;;;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