stitchkit 0.93.0 → 0.94.1

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 (1082) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/README.md +5 -2
  3. package/dist/agent-runtime/children-control.d.ts +6 -0
  4. package/dist/agent-runtime/children-control.d.ts.map +1 -0
  5. package/dist/agent-runtime/children-spawn.d.ts +6 -0
  6. package/dist/agent-runtime/children-spawn.d.ts.map +1 -0
  7. package/dist/agent-runtime/children-state.d.ts +46 -0
  8. package/dist/agent-runtime/children-state.d.ts.map +1 -0
  9. package/dist/agent-runtime/children-usage.d.ts +8 -0
  10. package/dist/agent-runtime/children-usage.d.ts.map +1 -0
  11. package/dist/agent-runtime/children.d.ts +11 -14
  12. package/dist/agent-runtime/children.d.ts.map +1 -1
  13. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  14. package/dist/agent-runtime/coding-tool-contract.d.ts +2 -1
  15. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  16. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  17. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  18. package/dist/agent-runtime/contained-darwin.d.ts +38 -0
  19. package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
  20. package/dist/agent-runtime/contained-files.d.ts +11 -26
  21. package/dist/agent-runtime/contained-files.d.ts.map +1 -1
  22. package/dist/agent-runtime/contained-scan.d.ts +21 -0
  23. package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
  24. package/dist/agent-runtime/contained-write.d.ts +9 -0
  25. package/dist/agent-runtime/contained-write.d.ts.map +1 -0
  26. package/dist/agent-runtime/deferred-tool-types.d.ts +4 -3
  27. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  28. package/dist/agent-runtime/events.d.ts +1 -1
  29. package/dist/agent-runtime/events.d.ts.map +1 -1
  30. package/dist/agent-runtime/harness-control.d.ts +0 -1
  31. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  32. package/dist/agent-runtime/harness.d.ts +0 -5
  33. package/dist/agent-runtime/harness.d.ts.map +1 -1
  34. package/dist/agent-runtime/managed-tools.d.ts +3 -2
  35. package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
  36. package/dist/agent-runtime/observability.d.ts +1 -1
  37. package/dist/agent-runtime/observability.d.ts.map +1 -1
  38. package/dist/agent-runtime/openrouter.d.ts +29 -0
  39. package/dist/agent-runtime/openrouter.d.ts.map +1 -0
  40. package/dist/agent-runtime/projections.d.ts +1 -1
  41. package/dist/agent-runtime/projections.d.ts.map +1 -1
  42. package/dist/agent-runtime/run-acquisition.d.ts +17 -0
  43. package/dist/agent-runtime/run-acquisition.d.ts.map +1 -0
  44. package/dist/agent-runtime/run-execution-state.d.ts +133 -0
  45. package/dist/agent-runtime/run-execution-state.d.ts.map +1 -0
  46. package/dist/agent-runtime/run-execution.d.ts +17 -33
  47. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  48. package/dist/agent-runtime/run-failure.d.ts +18 -0
  49. package/dist/agent-runtime/run-failure.d.ts.map +1 -0
  50. package/dist/agent-runtime/run-model-attempts.d.ts +6 -0
  51. package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -0
  52. package/dist/agent-runtime/run-prompt-history.d.ts +58 -0
  53. package/dist/agent-runtime/run-prompt-history.d.ts.map +1 -0
  54. package/dist/agent-runtime/run-provider-ledger.d.ts +26 -0
  55. package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -0
  56. package/dist/agent-runtime/run-stream-parts.d.ts +17 -0
  57. package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -0
  58. package/dist/agent-runtime/run-terminal.d.ts +11 -0
  59. package/dist/agent-runtime/run-terminal.d.ts.map +1 -0
  60. package/dist/agent-runtime/run-turn-preparation.d.ts +22 -0
  61. package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -0
  62. package/dist/agent-runtime/runtime-admission-gate.d.ts +29 -0
  63. package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -0
  64. package/dist/agent-runtime/runtime-control.d.ts +9 -0
  65. package/dist/agent-runtime/runtime-control.d.ts.map +1 -0
  66. package/dist/agent-runtime/runtime-recovery.d.ts +10 -0
  67. package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -0
  68. package/dist/agent-runtime/runtime-state.d.ts +36 -0
  69. package/dist/agent-runtime/runtime-state.d.ts.map +1 -0
  70. package/dist/agent-runtime/runtime-submit.d.ts +5 -0
  71. package/dist/agent-runtime/runtime-submit.d.ts.map +1 -0
  72. package/dist/agent-runtime/runtime.d.ts +10 -5
  73. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  74. package/dist/agent-runtime/schedule-records.d.ts +34 -0
  75. package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
  76. package/dist/agent-runtime/schedules.d.ts +34 -0
  77. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  78. package/dist/agent-runtime/sqlite-bun.d.ts +12 -0
  79. package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -0
  80. package/dist/agent-runtime/sqlite-events.d.ts +5 -0
  81. package/dist/agent-runtime/sqlite-events.d.ts.map +1 -0
  82. package/dist/agent-runtime/sqlite-history.d.ts +7 -0
  83. package/dist/agent-runtime/sqlite-history.d.ts.map +1 -0
  84. package/dist/agent-runtime/sqlite-ledger.d.ts +7 -0
  85. package/dist/agent-runtime/sqlite-ledger.d.ts.map +1 -0
  86. package/dist/agent-runtime/sqlite-node.d.ts +12 -0
  87. package/dist/agent-runtime/sqlite-node.d.ts.map +1 -0
  88. package/dist/agent-runtime/sqlite-reads.d.ts +14 -0
  89. package/dist/agent-runtime/sqlite-reads.d.ts.map +1 -0
  90. package/dist/agent-runtime/sqlite-rows.d.ts +178 -0
  91. package/dist/agent-runtime/sqlite-rows.d.ts.map +1 -0
  92. package/dist/agent-runtime/sqlite-schema.d.ts +7 -0
  93. package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -0
  94. package/dist/agent-runtime/sqlite-transactions.d.ts +25 -0
  95. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -0
  96. package/dist/agent-runtime/sqlite.d.ts +10 -6
  97. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  98. package/dist/agent-runtime/store-archive.d.ts +16 -0
  99. package/dist/agent-runtime/store-archive.d.ts.map +1 -0
  100. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
  101. package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
  102. package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
  103. package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
  104. package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
  105. package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
  106. package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
  107. package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
  108. package/dist/agent-runtime/store-conformance.d.ts +40 -0
  109. package/dist/agent-runtime/store-conformance.d.ts.map +1 -0
  110. package/dist/agent-runtime/store-create.d.ts +11 -0
  111. package/dist/agent-runtime/store-create.d.ts.map +1 -0
  112. package/dist/agent-runtime/store-driver-contract.d.ts +814 -0
  113. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -0
  114. package/dist/agent-runtime/store-events.d.ts +7 -89
  115. package/dist/agent-runtime/store-events.d.ts.map +1 -1
  116. package/dist/agent-runtime/store-memory.d.ts +4 -0
  117. package/dist/agent-runtime/store-memory.d.ts.map +1 -0
  118. package/dist/agent-runtime/store-mutate.d.ts +13 -0
  119. package/dist/agent-runtime/store-mutate.d.ts.map +1 -0
  120. package/dist/agent-runtime/store-purge.d.ts +1 -1
  121. package/dist/agent-runtime/store-purge.d.ts.map +1 -1
  122. package/dist/agent-runtime/store-reads.d.ts +29 -0
  123. package/dist/agent-runtime/store-reads.d.ts.map +1 -0
  124. package/dist/agent-runtime/store-reduce-history.d.ts +10 -0
  125. package/dist/agent-runtime/store-reduce-history.d.ts.map +1 -0
  126. package/dist/agent-runtime/store-reduce-run.d.ts +14 -0
  127. package/dist/agent-runtime/store-reduce-run.d.ts.map +1 -0
  128. package/dist/agent-runtime/store-reduce-shared.d.ts +76 -0
  129. package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -0
  130. package/dist/agent-runtime/store-reduce-terminal.d.ts +6 -0
  131. package/dist/agent-runtime/store-reduce-terminal.d.ts.map +1 -0
  132. package/dist/agent-runtime/store-reducer.d.ts +24 -0
  133. package/dist/agent-runtime/store-reducer.d.ts.map +1 -0
  134. package/dist/agent-runtime/store-snapshot.d.ts +19 -0
  135. package/dist/agent-runtime/store-snapshot.d.ts.map +1 -0
  136. package/dist/agent-runtime/store.d.ts +1 -1
  137. package/dist/agent-runtime/store.d.ts.map +1 -1
  138. package/dist/application/admission-rate.d.ts +21 -0
  139. package/dist/application/admission-rate.d.ts.map +1 -0
  140. package/dist/application/admission-run.d.ts +8 -0
  141. package/dist/application/admission-run.d.ts.map +1 -0
  142. package/dist/application/admission.d.ts +1 -1
  143. package/dist/application/admission.d.ts.map +1 -1
  144. package/dist/application/diagnostic-journal-lock.d.ts +9 -34
  145. package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
  146. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
  147. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
  148. package/dist/application/events.d.ts +1 -1
  149. package/dist/application/events.d.ts.map +1 -1
  150. package/dist/application/file-state-store.d.ts +23 -0
  151. package/dist/application/file-state-store.d.ts.map +1 -0
  152. package/dist/application/health.d.ts +1 -1
  153. package/dist/application/health.d.ts.map +1 -1
  154. package/dist/application/kernel-admission.d.ts +8 -0
  155. package/dist/application/kernel-admission.d.ts.map +1 -0
  156. package/dist/application/kernel-contract.d.ts +142 -0
  157. package/dist/application/kernel-contract.d.ts.map +1 -0
  158. package/dist/application/kernel-resource-context.d.ts +24 -0
  159. package/dist/application/kernel-resource-context.d.ts.map +1 -0
  160. package/dist/application/kernel-restart.d.ts +5 -0
  161. package/dist/application/kernel-restart.d.ts.map +1 -0
  162. package/dist/application/kernel-rollback.d.ts +4 -0
  163. package/dist/application/kernel-rollback.d.ts.map +1 -0
  164. package/dist/application/kernel-shutdown.d.ts +6 -0
  165. package/dist/application/kernel-shutdown.d.ts.map +1 -0
  166. package/dist/application/kernel-start.d.ts +20 -0
  167. package/dist/application/kernel-start.d.ts.map +1 -0
  168. package/dist/application/kernel-state.d.ts +116 -0
  169. package/dist/application/kernel-state.d.ts.map +1 -0
  170. package/dist/application/kernel.d.ts +9 -140
  171. package/dist/application/kernel.d.ts.map +1 -1
  172. package/dist/application/latest-sink.d.ts +1 -1
  173. package/dist/application/latest-sink.d.ts.map +1 -1
  174. package/dist/application/notification-outbox.d.ts.map +1 -1
  175. package/dist/application/opentelemetry.d.ts +1 -1
  176. package/dist/application/opentelemetry.d.ts.map +1 -1
  177. package/dist/application/schedule.d.ts +0 -1
  178. package/dist/application/schedule.d.ts.map +1 -1
  179. package/dist/application/watch-hub-core.d.ts +122 -0
  180. package/dist/application/watch-hub-core.d.ts.map +1 -0
  181. package/dist/application/watch-hub.d.ts +3 -3
  182. package/dist/application/watch-hub.d.ts.map +1 -1
  183. package/dist/browser/client-executors.d.ts +14 -0
  184. package/dist/browser/client-executors.d.ts.map +1 -0
  185. package/dist/browser/client-multipart.d.ts +1 -1
  186. package/dist/browser/client-multipart.d.ts.map +1 -1
  187. package/dist/browser/client-url.d.ts +1 -1
  188. package/dist/browser/client-url.d.ts.map +1 -1
  189. package/dist/browser/client.d.ts +3 -2
  190. package/dist/browser/client.d.ts.map +1 -1
  191. package/dist/browser/contract-stream.d.ts +1 -1
  192. package/dist/browser/contract-stream.d.ts.map +1 -1
  193. package/dist/browser/http-fetch.d.ts +22 -0
  194. package/dist/browser/http-fetch.d.ts.map +1 -0
  195. package/dist/browser/http.d.ts +2 -4
  196. package/dist/browser/http.d.ts.map +1 -1
  197. package/dist/browser/live-state-core.d.ts +63 -0
  198. package/dist/browser/live-state-core.d.ts.map +1 -0
  199. package/dist/browser/live-state.d.ts.map +1 -1
  200. package/dist/browser/realtime-client.d.ts +26 -0
  201. package/dist/browser/realtime-client.d.ts.map +1 -0
  202. package/dist/browser/resumable.d.ts +1 -28
  203. package/dist/browser/resumable.d.ts.map +1 -1
  204. package/dist/browser/retained.d.ts.map +1 -0
  205. package/dist/browser/socket-io-connection.d.ts +82 -0
  206. package/dist/browser/socket-io-connection.d.ts.map +1 -0
  207. package/dist/browser/socket-io-peer.d.ts +20 -0
  208. package/dist/browser/socket-io-peer.d.ts.map +1 -0
  209. package/dist/browser/socket-io-trace.d.ts +31 -0
  210. package/dist/browser/socket-io-trace.d.ts.map +1 -0
  211. package/dist/browser/socket-io.d.ts +24 -18
  212. package/dist/browser/socket-io.d.ts.map +1 -1
  213. package/dist/browser/stream.d.ts +14 -2
  214. package/dist/browser/stream.d.ts.map +1 -1
  215. package/dist/contract/client-types.d.ts +134 -0
  216. package/dist/contract/client-types.d.ts.map +1 -0
  217. package/dist/contract/define-validation.d.ts +30 -0
  218. package/dist/contract/define-validation.d.ts.map +1 -0
  219. package/dist/contract/define.d.ts +47 -394
  220. package/dist/contract/define.d.ts.map +1 -1
  221. package/dist/contract/normalize.d.ts +56 -0
  222. package/dist/contract/normalize.d.ts.map +1 -0
  223. package/dist/contract/runtime-context.d.ts +131 -0
  224. package/dist/contract/runtime-context.d.ts.map +1 -0
  225. package/dist/contract/tool-options.d.ts +105 -0
  226. package/dist/contract/tool-options.d.ts.map +1 -0
  227. package/dist/contract/tool-view.d.ts +148 -0
  228. package/dist/contract/tool-view.d.ts.map +1 -0
  229. package/dist/declaration/declaration.d.ts.map +1 -0
  230. package/dist/durability/contract.d.ts +259 -0
  231. package/dist/durability/contract.d.ts.map +1 -0
  232. package/dist/durability/effect.d.ts +24 -0
  233. package/dist/durability/effect.d.ts.map +1 -0
  234. package/dist/durability/engine.d.ts +14 -0
  235. package/dist/durability/engine.d.ts.map +1 -0
  236. package/dist/durability/events.d.ts +103 -0
  237. package/dist/durability/events.d.ts.map +1 -0
  238. package/dist/durability/json.d.ts +3 -0
  239. package/dist/durability/json.d.ts.map +1 -0
  240. package/dist/durability/ledger.d.ts +27 -0
  241. package/dist/durability/ledger.d.ts.map +1 -0
  242. package/dist/durability/parks.d.ts +22 -0
  243. package/dist/durability/parks.d.ts.map +1 -0
  244. package/dist/durability/scheduler.d.ts +30 -0
  245. package/dist/durability/scheduler.d.ts.map +1 -0
  246. package/dist/entrypoints/agent-runtime/browser.d.ts +5 -0
  247. package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -0
  248. package/dist/entrypoints/agent-runtime/browser.js +124 -0
  249. package/dist/entrypoints/agent-runtime/coding-tools.d.ts +2 -0
  250. package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -0
  251. package/dist/entrypoints/agent-runtime/coding-tools.js +22 -0
  252. package/dist/entrypoints/agent-runtime/harness.d.ts +2 -0
  253. package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -0
  254. package/dist/entrypoints/agent-runtime/harness.js +739 -0
  255. package/dist/entrypoints/agent-runtime/openrouter.d.ts +2 -0
  256. package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -0
  257. package/dist/entrypoints/agent-runtime/openrouter.js +270 -0
  258. package/dist/entrypoints/agent-runtime/sandbox.d.ts +5 -0
  259. package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -0
  260. package/dist/entrypoints/agent-runtime/sandbox.js +797 -0
  261. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts +2 -0
  262. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts.map +1 -0
  263. package/dist/entrypoints/agent-runtime/sqlite/bun.js +44 -0
  264. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts +2 -0
  265. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts.map +1 -0
  266. package/dist/entrypoints/agent-runtime/sqlite/node.js +46 -0
  267. package/dist/entrypoints/agent-runtime/testing.d.ts +4 -0
  268. package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -0
  269. package/dist/entrypoints/agent-runtime/testing.js +1116 -0
  270. package/dist/entrypoints/agent-runtime.d.ts +42 -0
  271. package/dist/entrypoints/agent-runtime.d.ts.map +1 -0
  272. package/dist/entrypoints/agent-runtime.js +2670 -0
  273. package/dist/entrypoints/application/diagnostic-journal.d.ts +21 -0
  274. package/dist/entrypoints/application/diagnostic-journal.d.ts.map +1 -0
  275. package/dist/entrypoints/application/diagnostic-journal.js +492 -0
  276. package/dist/entrypoints/application/grammy.d.ts +2 -0
  277. package/dist/entrypoints/application/grammy.d.ts.map +1 -0
  278. package/dist/entrypoints/application/grammy.js +169 -0
  279. package/dist/entrypoints/application/opentelemetry.d.ts +2 -0
  280. package/dist/entrypoints/application/opentelemetry.d.ts.map +1 -0
  281. package/dist/entrypoints/application/opentelemetry.js +250 -0
  282. package/dist/entrypoints/application/schemas.d.ts +15 -0
  283. package/dist/entrypoints/application/schemas.d.ts.map +1 -0
  284. package/dist/entrypoints/application/schemas.js +27 -0
  285. package/dist/entrypoints/application.d.ts +23 -0
  286. package/dist/entrypoints/application.d.ts.map +1 -0
  287. package/dist/entrypoints/application.js +2016 -0
  288. package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -0
  289. package/dist/entrypoints/bin/upgrade-cli.js +177 -0
  290. package/dist/entrypoints/cli.d.ts +44 -0
  291. package/dist/entrypoints/cli.d.ts.map +1 -0
  292. package/dist/entrypoints/cli.js +773 -0
  293. package/dist/entrypoints/contract.d.ts +12 -0
  294. package/dist/entrypoints/contract.d.ts.map +1 -0
  295. package/dist/entrypoints/contract.js +64 -0
  296. package/dist/entrypoints/declaration.d.ts +2 -0
  297. package/dist/entrypoints/declaration.d.ts.map +1 -0
  298. package/dist/entrypoints/declaration.js +183 -0
  299. package/dist/entrypoints/files.d.ts +5 -0
  300. package/dist/entrypoints/files.d.ts.map +1 -0
  301. package/dist/entrypoints/files.js +111 -0
  302. package/dist/entrypoints/geo.d.ts +3 -0
  303. package/dist/entrypoints/geo.d.ts.map +1 -0
  304. package/dist/entrypoints/geo.js +245 -0
  305. package/dist/entrypoints/google.d.ts +2 -0
  306. package/dist/entrypoints/google.d.ts.map +1 -0
  307. package/dist/entrypoints/google.js +175 -0
  308. package/dist/entrypoints/index.d.ts +17 -0
  309. package/dist/entrypoints/index.d.ts.map +1 -0
  310. package/dist/entrypoints/index.js +764 -0
  311. package/dist/entrypoints/live.d.ts +19 -0
  312. package/dist/entrypoints/live.d.ts.map +1 -0
  313. package/dist/entrypoints/live.js +302 -0
  314. package/dist/entrypoints/node.d.ts +19 -0
  315. package/dist/entrypoints/node.d.ts.map +1 -0
  316. package/dist/entrypoints/node.js +308 -0
  317. package/dist/entrypoints/oauth.d.ts +2 -0
  318. package/dist/entrypoints/oauth.d.ts.map +1 -0
  319. package/dist/entrypoints/oauth.js +170 -0
  320. package/dist/entrypoints/observability.d.ts +19 -0
  321. package/dist/entrypoints/observability.d.ts.map +1 -0
  322. package/dist/entrypoints/observability.js +567 -0
  323. package/dist/entrypoints/primitives.d.ts +3 -0
  324. package/dist/entrypoints/primitives.d.ts.map +1 -0
  325. package/dist/entrypoints/primitives.js +749 -0
  326. package/dist/entrypoints/react.d.ts +5 -0
  327. package/dist/entrypoints/react.d.ts.map +1 -0
  328. package/dist/entrypoints/react.js +403 -0
  329. package/dist/entrypoints/release.d.ts +15 -0
  330. package/dist/entrypoints/release.d.ts.map +1 -0
  331. package/dist/entrypoints/release.js +196 -0
  332. package/dist/entrypoints/remote.d.ts +9 -0
  333. package/dist/entrypoints/remote.d.ts.map +1 -0
  334. package/dist/entrypoints/remote.js +66 -0
  335. package/dist/entrypoints/server.d.ts +39 -0
  336. package/dist/entrypoints/server.d.ts.map +1 -0
  337. package/dist/entrypoints/server.js +2009 -0
  338. package/dist/entrypoints/telegram.d.ts +3 -0
  339. package/dist/entrypoints/telegram.d.ts.map +1 -0
  340. package/dist/entrypoints/telegram.js +224 -0
  341. package/dist/entrypoints/testing.d.ts +10 -0
  342. package/dist/entrypoints/testing.d.ts.map +1 -0
  343. package/dist/entrypoints/testing.js +1377 -0
  344. package/dist/entrypoints/tools/connections.d.ts +19 -0
  345. package/dist/entrypoints/tools/connections.d.ts.map +1 -0
  346. package/dist/entrypoints/tools/connections.js +1110 -0
  347. package/dist/entrypoints/tools/contract.d.ts +29 -0
  348. package/dist/entrypoints/tools/contract.d.ts.map +1 -0
  349. package/dist/entrypoints/tools/contract.js +24 -0
  350. package/dist/entrypoints/tools/invoker.d.ts +9 -0
  351. package/dist/entrypoints/tools/invoker.d.ts.map +1 -0
  352. package/dist/entrypoints/tools/invoker.js +20 -0
  353. package/dist/entrypoints/tools.d.ts +54 -0
  354. package/dist/entrypoints/tools.d.ts.map +1 -0
  355. package/dist/entrypoints/tools.js +3009 -0
  356. package/dist/entrypoints/tracking/server.d.ts +15 -0
  357. package/dist/entrypoints/tracking/server.d.ts.map +1 -0
  358. package/dist/entrypoints/tracking.d.ts +24 -0
  359. package/dist/entrypoints/tracking.d.ts.map +1 -0
  360. package/dist/entrypoints/tracking.js +1140 -0
  361. package/dist/files/boundary.d.ts.map +1 -1
  362. package/dist/files/file-io.d.ts +14 -0
  363. package/dist/files/file-io.d.ts.map +1 -0
  364. package/dist/google/google.d.ts.map +1 -0
  365. package/dist/index-0b1ess5e.js +38 -0
  366. package/dist/index-1j8pm5t0.js +412 -0
  367. package/dist/index-1zbbzgfh.js +89 -0
  368. package/dist/index-2bxbyab0.js +47 -0
  369. package/dist/index-2gxzjvyr.js +266 -0
  370. package/dist/index-35mh5bhj.js +177 -0
  371. package/dist/index-48ffdxgk.js +6 -0
  372. package/dist/index-4gcnakhx.js +82 -0
  373. package/dist/index-55hkhm67.js +343 -0
  374. package/dist/index-79z7m7dt.js +675 -0
  375. package/dist/index-7f68ghdn.js +3618 -0
  376. package/dist/index-7p1f0vp2.js +154 -0
  377. package/dist/index-83bdg97s.js +16 -0
  378. package/dist/index-863ea9jb.js +154 -0
  379. package/dist/index-8p52kd5p.js +242 -0
  380. package/dist/index-d9pk3td4.js +326 -0
  381. package/dist/index-dce5wxcq.js +63 -0
  382. package/dist/index-e01r054k.js +105 -0
  383. package/dist/index-ensd0r74.js +595 -0
  384. package/dist/index-eqqvgdb3.js +46 -0
  385. package/dist/index-gxrt5h6v.js +341 -0
  386. package/dist/index-h6eeys1v.js +211 -0
  387. package/dist/index-ham5sz8m.js +734 -0
  388. package/dist/index-het2he5g.js +1387 -0
  389. package/dist/index-hffjpmq9.js +30 -0
  390. package/dist/index-hmp4800j.js +51 -0
  391. package/dist/index-k30h66yd.js +317 -0
  392. package/dist/index-k5hsfc3j.js +31 -0
  393. package/dist/index-khtgb21r.js +92 -0
  394. package/dist/index-m9zn6cpq.js +51 -0
  395. package/dist/index-ndddxtyx.js +324 -0
  396. package/dist/index-ngfhvfpd.js +30 -0
  397. package/dist/index-np4m8hd3.js +1205 -0
  398. package/dist/index-p3vsv1fb.js +3493 -0
  399. package/dist/index-p5r7qpdd.js +85 -0
  400. package/dist/index-p9e0w8hs.js +1084 -0
  401. package/dist/index-p9sh0xx4.js +64 -0
  402. package/dist/index-paz6sgdp.js +371 -0
  403. package/dist/index-px2gm2jp.js +448 -0
  404. package/dist/index-qwhynv6x.js +103 -0
  405. package/dist/index-s812ycat.js +65 -0
  406. package/dist/index-sp1tzwnb.js +281 -0
  407. package/dist/index-t9rhjr9f.js +2306 -0
  408. package/dist/index-v260df89.js +342 -0
  409. package/dist/index-w906953s.js +946 -0
  410. package/dist/index-wdkt63w3.js +214 -0
  411. package/dist/index-wqgjfstn.js +18 -0
  412. package/dist/index-wsm5w4ee.js +1023 -0
  413. package/dist/index-xw3s75nj.js +100 -0
  414. package/dist/index-yw4fzmdz.js +268 -0
  415. package/dist/index-zfrhfn82.js +85 -0
  416. package/dist/index-znfs20ss.js +98 -0
  417. package/dist/internal/atomic-file.d.ts +23 -2
  418. package/dist/internal/atomic-file.d.ts.map +1 -1
  419. package/dist/internal/backoff.d.ts +29 -0
  420. package/dist/internal/backoff.d.ts.map +1 -0
  421. package/dist/internal/canonical-json.d.ts +21 -11
  422. package/dist/internal/canonical-json.d.ts.map +1 -1
  423. package/dist/internal/channel.d.ts.map +1 -0
  424. package/dist/internal/exclusive-lock.d.ts +51 -0
  425. package/dist/internal/exclusive-lock.d.ts.map +1 -0
  426. package/dist/internal/logger.d.ts.map +1 -0
  427. package/dist/internal/process-identity.d.ts +47 -0
  428. package/dist/internal/process-identity.d.ts.map +1 -0
  429. package/dist/internal/request.d.ts.map +1 -0
  430. package/dist/internal/stable-digest.d.ts +0 -43
  431. package/dist/internal/stable-digest.d.ts.map +1 -1
  432. package/dist/internal/typed.d.ts +0 -8
  433. package/dist/internal/typed.d.ts.map +1 -1
  434. package/dist/internal/with-exclusive-lock.d.ts +67 -0
  435. package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
  436. package/dist/internal/zod-issues.d.ts +38 -0
  437. package/dist/internal/zod-issues.d.ts.map +1 -0
  438. package/dist/json-schema/dialect.d.ts +17 -0
  439. package/dist/json-schema/dialect.d.ts.map +1 -0
  440. package/dist/json-schema/json-schema.d.ts.map +1 -0
  441. package/dist/live/watch-client.d.ts.map +1 -1
  442. package/dist/live/watch-delta.d.ts.map +1 -1
  443. package/dist/oauth/authorization-code.d.ts +57 -0
  444. package/dist/oauth/authorization-code.d.ts.map +1 -0
  445. package/dist/observability/audit.d.ts +3 -3
  446. package/dist/observability/audit.d.ts.map +1 -1
  447. package/dist/observability/bounded-logger.d.ts +1 -1
  448. package/dist/observability/bounded-logger.d.ts.map +1 -1
  449. package/dist/observability/bounded-sink.d.ts +81 -0
  450. package/dist/observability/bounded-sink.d.ts.map +1 -0
  451. package/dist/observability/context.d.ts +1 -1
  452. package/dist/observability/context.d.ts.map +1 -1
  453. package/dist/observability/event.d.ts +2 -1
  454. package/dist/observability/event.d.ts.map +1 -1
  455. package/dist/observability/work.d.ts +1 -1
  456. package/dist/observability/work.d.ts.map +1 -1
  457. package/dist/primitives/audit.d.ts +1 -1
  458. package/dist/primitives/audit.d.ts.map +1 -1
  459. package/dist/primitives/export-operation.d.ts +4 -2
  460. package/dist/primitives/export-operation.d.ts.map +1 -1
  461. package/dist/realtime/registry.d.ts +0 -5
  462. package/dist/realtime/registry.d.ts.map +1 -1
  463. package/dist/realtime/socket.d.ts +1 -1
  464. package/dist/realtime/socket.d.ts.map +1 -1
  465. package/dist/server/bun.d.ts +0 -1
  466. package/dist/server/bun.d.ts.map +1 -1
  467. package/dist/server/context-contribution.d.ts +1 -1
  468. package/dist/server/context-contribution.d.ts.map +1 -1
  469. package/dist/server/context.d.ts +2 -2
  470. package/dist/server/context.d.ts.map +1 -1
  471. package/dist/server/contract-method.d.ts +15 -0
  472. package/dist/server/contract-method.d.ts.map +1 -0
  473. package/dist/server/contract-stream.d.ts +1 -1
  474. package/dist/server/contract-stream.d.ts.map +1 -1
  475. package/dist/server/create.d.ts +8 -0
  476. package/dist/server/create.d.ts.map +1 -1
  477. package/dist/server/endpoint-dispatch.d.ts +10 -0
  478. package/dist/server/endpoint-dispatch.d.ts.map +1 -0
  479. package/dist/server/endpoint-response.d.ts +19 -0
  480. package/dist/server/endpoint-response.d.ts.map +1 -0
  481. package/dist/server/error-dispatch.d.ts +17 -1
  482. package/dist/server/error-dispatch.d.ts.map +1 -1
  483. package/dist/server/error-hook.d.ts +2 -2
  484. package/dist/server/error-hook.d.ts.map +1 -1
  485. package/dist/server/handler-state.d.ts +44 -0
  486. package/dist/server/handler-state.d.ts.map +1 -0
  487. package/dist/server/implement-registry.d.ts +54 -0
  488. package/dist/server/implement-registry.d.ts.map +1 -0
  489. package/dist/server/implement.d.ts +9 -55
  490. package/dist/server/implement.d.ts.map +1 -1
  491. package/dist/server/middleware/auth.d.ts +1 -31
  492. package/dist/server/middleware/auth.d.ts.map +1 -1
  493. package/dist/server/middleware/cors.d.ts +17 -0
  494. package/dist/server/middleware/cors.d.ts.map +1 -1
  495. package/dist/server/middleware/jwt.d.ts +31 -0
  496. package/dist/server/middleware/jwt.d.ts.map +1 -0
  497. package/dist/server/middleware/trust-fence.d.ts +1 -1
  498. package/dist/server/middleware/trust-fence.d.ts.map +1 -1
  499. package/dist/server/multipart-reader.d.ts +22 -0
  500. package/dist/server/multipart-reader.d.ts.map +1 -0
  501. package/dist/server/multipart.d.ts +1 -1
  502. package/dist/server/multipart.d.ts.map +1 -1
  503. package/dist/server/oauth/cimd.d.ts +88 -0
  504. package/dist/server/oauth/cimd.d.ts.map +1 -0
  505. package/dist/server/oauth/endpoints.d.ts +39 -0
  506. package/dist/server/oauth/endpoints.d.ts.map +1 -0
  507. package/dist/server/oauth/metadata.d.ts +28 -0
  508. package/dist/server/oauth/metadata.d.ts.map +1 -0
  509. package/dist/server/oauth/provider.d.ts +117 -0
  510. package/dist/server/oauth/provider.d.ts.map +1 -0
  511. package/dist/server/realtime.d.ts +1 -1
  512. package/dist/server/realtime.d.ts.map +1 -1
  513. package/dist/server/request-completion.d.ts +16 -0
  514. package/dist/server/request-completion.d.ts.map +1 -0
  515. package/dist/server/response-metadata.d.ts +1 -1
  516. package/dist/server/response-metadata.d.ts.map +1 -1
  517. package/dist/server/route-table.d.ts +9 -0
  518. package/dist/server/route-table.d.ts.map +1 -0
  519. package/dist/server/stream.d.ts +0 -13
  520. package/dist/server/stream.d.ts.map +1 -1
  521. package/dist/server/streaming-pump.d.ts +66 -0
  522. package/dist/server/streaming-pump.d.ts.map +1 -0
  523. package/dist/server/streaming-route.d.ts +12 -5
  524. package/dist/server/streaming-route.d.ts.map +1 -1
  525. package/dist/server/types.d.ts +10 -4
  526. package/dist/server/types.d.ts.map +1 -1
  527. package/dist/server/unix-client-bun.d.ts.map +1 -1
  528. package/dist/server/unix-client-http1.d.ts +76 -0
  529. package/dist/server/unix-client-http1.d.ts.map +1 -0
  530. package/dist/server/unix-client.d.ts.map +1 -1
  531. package/dist/testing/handler-clients.d.ts +32 -0
  532. package/dist/testing/handler-clients.d.ts.map +1 -0
  533. package/dist/testing/managed-resource-conformance-scenarios.d.ts.map +1 -1
  534. package/dist/testing/realtime-probe.d.ts +33 -0
  535. package/dist/testing/realtime-probe.d.ts.map +1 -0
  536. package/dist/testing/surface-conformance.d.ts +2 -32
  537. package/dist/testing/surface-conformance.d.ts.map +1 -1
  538. package/dist/testing/surface-manifest-digest.d.ts +44 -0
  539. package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
  540. package/dist/testing/surface-manifest.d.ts +30 -4
  541. package/dist/testing/surface-manifest.d.ts.map +1 -1
  542. package/dist/tools/agent.d.ts +1 -1
  543. package/dist/tools/agent.d.ts.map +1 -1
  544. package/dist/tools/cli/args-fields.d.ts +31 -0
  545. package/dist/tools/cli/args-fields.d.ts.map +1 -0
  546. package/dist/tools/cli/args-route.d.ts +42 -0
  547. package/dist/tools/cli/args-route.d.ts.map +1 -0
  548. package/dist/tools/cli/args-view.d.ts +32 -0
  549. package/dist/tools/cli/args-view.d.ts.map +1 -0
  550. package/dist/tools/cli/args.d.ts +80 -0
  551. package/dist/tools/cli/args.d.ts.map +1 -0
  552. package/dist/tools/cli/argument-error.d.ts +5 -0
  553. package/dist/tools/cli/argument-error.d.ts.map +1 -0
  554. package/dist/tools/cli/checkpoint.d.ts +24 -0
  555. package/dist/tools/cli/checkpoint.d.ts.map +1 -0
  556. package/dist/tools/cli/command.d.ts +70 -0
  557. package/dist/tools/cli/command.d.ts.map +1 -0
  558. package/dist/tools/cli/config.d.ts +90 -0
  559. package/dist/tools/cli/config.d.ts.map +1 -0
  560. package/dist/tools/cli/create-cli.d.ts +36 -0
  561. package/dist/tools/cli/create-cli.d.ts.map +1 -0
  562. package/dist/tools/cli/download.d.ts +8 -0
  563. package/dist/tools/cli/download.d.ts.map +1 -0
  564. package/dist/tools/cli/format.d.ts +50 -0
  565. package/dist/tools/cli/format.d.ts.map +1 -0
  566. package/dist/tools/cli/help.d.ts +24 -0
  567. package/dist/tools/cli/help.d.ts.map +1 -0
  568. package/dist/tools/cli/installer.d.ts +34 -0
  569. package/dist/tools/cli/installer.d.ts.map +1 -0
  570. package/dist/tools/cli/invoke.d.ts +144 -0
  571. package/dist/tools/cli/invoke.d.ts.map +1 -0
  572. package/dist/tools/cli/io.d.ts +10 -0
  573. package/dist/tools/cli/io.d.ts.map +1 -0
  574. package/dist/tools/cli/managed-surface.d.ts +30 -0
  575. package/dist/tools/cli/managed-surface.d.ts.map +1 -0
  576. package/dist/tools/cli/manifest.d.ts +80 -0
  577. package/dist/tools/cli/manifest.d.ts.map +1 -0
  578. package/dist/tools/cli/policy.d.ts +27 -0
  579. package/dist/tools/cli/policy.d.ts.map +1 -0
  580. package/dist/tools/cli/prepare.d.ts +14 -0
  581. package/dist/tools/cli/prepare.d.ts.map +1 -0
  582. package/dist/tools/cli/profile.d.ts +40 -0
  583. package/dist/tools/cli/profile.d.ts.map +1 -0
  584. package/dist/tools/cli/run-managed.d.ts +5 -0
  585. package/dist/tools/cli/run-managed.d.ts.map +1 -0
  586. package/dist/tools/cli/run-native.d.ts +9 -0
  587. package/dist/tools/cli/run-native.d.ts.map +1 -0
  588. package/dist/tools/cli/session.d.ts +40 -0
  589. package/dist/tools/cli/session.d.ts.map +1 -0
  590. package/dist/tools/cli/signature.d.ts +81 -0
  591. package/dist/tools/cli/signature.d.ts.map +1 -0
  592. package/dist/tools/cli/stream.d.ts +93 -0
  593. package/dist/tools/cli/stream.d.ts.map +1 -0
  594. package/dist/tools/cli/update.d.ts +145 -0
  595. package/dist/tools/cli/update.d.ts.map +1 -0
  596. package/dist/tools/cli/view.d.ts +12 -0
  597. package/dist/tools/cli/view.d.ts.map +1 -0
  598. package/dist/tools/cli/wait.d.ts +54 -0
  599. package/dist/tools/cli/wait.d.ts.map +1 -0
  600. package/dist/tools/connections/runtime.d.ts +1 -1
  601. package/dist/tools/connections/runtime.d.ts.map +1 -1
  602. package/dist/tools/connections/types.d.ts +3 -3
  603. package/dist/tools/connections/types.d.ts.map +1 -1
  604. package/dist/tools/durability-context.d.ts +1 -1
  605. package/dist/tools/durability-context.d.ts.map +1 -1
  606. package/dist/tools/execute-args.d.ts +23 -0
  607. package/dist/tools/execute-args.d.ts.map +1 -0
  608. package/dist/tools/execute-hooks.d.ts +146 -0
  609. package/dist/tools/execute-hooks.d.ts.map +1 -0
  610. package/dist/tools/execute-result.d.ts +40 -0
  611. package/dist/tools/execute-result.d.ts.map +1 -0
  612. package/dist/tools/execute.d.ts +31 -193
  613. package/dist/tools/execute.d.ts.map +1 -1
  614. package/dist/tools/internal/surface-projector.d.ts +9 -6
  615. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  616. package/dist/tools/internal/tool-view.d.ts +41 -0
  617. package/dist/tools/internal/tool-view.d.ts.map +1 -0
  618. package/dist/tools/invoker.d.ts +13 -4
  619. package/dist/tools/invoker.d.ts.map +1 -1
  620. package/dist/tools/lifecycle.d.ts +1 -1
  621. package/dist/tools/lifecycle.d.ts.map +1 -1
  622. package/dist/tools/list-names.d.ts +3 -3
  623. package/dist/tools/list-names.d.ts.map +1 -1
  624. package/dist/tools/manifest.d.ts +2 -2
  625. package/dist/tools/manifest.d.ts.map +1 -1
  626. package/dist/tools/mcp/app.d.ts +62 -0
  627. package/dist/tools/mcp/app.d.ts.map +1 -0
  628. package/dist/tools/mcp/catalog.d.ts +68 -0
  629. package/dist/tools/mcp/catalog.d.ts.map +1 -0
  630. package/dist/tools/mcp/handler.d.ts +46 -0
  631. package/dist/tools/mcp/handler.d.ts.map +1 -0
  632. package/dist/tools/mcp/mount.d.ts +152 -0
  633. package/dist/tools/mcp/mount.d.ts.map +1 -0
  634. package/dist/tools/mcp/prepare.d.ts +76 -0
  635. package/dist/tools/mcp/prepare.d.ts.map +1 -0
  636. package/dist/tools/mcp/progress.d.ts +46 -0
  637. package/dist/tools/mcp/progress.d.ts.map +1 -0
  638. package/dist/tools/mcp/register.d.ts +36 -0
  639. package/dist/tools/mcp/register.d.ts.map +1 -0
  640. package/dist/tools/mcp/round-context.d.ts +38 -0
  641. package/dist/tools/mcp/round-context.d.ts.map +1 -0
  642. package/dist/tools/mcp/round-policy.d.ts +33 -0
  643. package/dist/tools/mcp/round-policy.d.ts.map +1 -0
  644. package/dist/tools/mcp/round.d.ts +53 -0
  645. package/dist/tools/mcp/round.d.ts.map +1 -0
  646. package/dist/tools/mcp/runtime-tools.d.ts +25 -0
  647. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -0
  648. package/dist/tools/mcp/stdio-signals.d.ts +33 -0
  649. package/dist/tools/mcp/stdio-signals.d.ts.map +1 -0
  650. package/dist/tools/mcp/stdio.d.ts +20 -0
  651. package/dist/tools/mcp/stdio.d.ts.map +1 -0
  652. package/dist/tools/mcp/trace.d.ts +12 -0
  653. package/dist/tools/mcp/trace.d.ts.map +1 -0
  654. package/dist/tools/mount.d.ts +14 -7
  655. package/dist/tools/mount.d.ts.map +1 -1
  656. package/dist/tools/native-definition.d.ts +4 -3
  657. package/dist/tools/native-definition.d.ts.map +1 -1
  658. package/dist/tools/operations/async-operation-binding-types.d.ts +127 -0
  659. package/dist/tools/operations/async-operation-binding-types.d.ts.map +1 -0
  660. package/dist/tools/operations/async-operation-binding.d.ts +28 -0
  661. package/dist/tools/operations/async-operation-binding.d.ts.map +1 -0
  662. package/dist/tools/operations/async-operation-canonical-types.d.ts +110 -0
  663. package/dist/tools/operations/async-operation-canonical-types.d.ts.map +1 -0
  664. package/dist/tools/operations/async-operation-canonical.d.ts +7 -0
  665. package/dist/tools/operations/async-operation-canonical.d.ts.map +1 -0
  666. package/dist/tools/operations/async-operation-contract.d.ts.map +1 -0
  667. package/dist/tools/operations/async-operation-id.d.ts +23 -0
  668. package/dist/tools/operations/async-operation-id.d.ts.map +1 -0
  669. package/dist/tools/operations/async-operation-runtime-tools.d.ts +41 -0
  670. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -0
  671. package/dist/tools/operations/async-operation-runtime-types.d.ts +69 -0
  672. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -0
  673. package/dist/tools/operations/async-operation-runtime.d.ts +5 -0
  674. package/dist/tools/operations/async-operation-runtime.d.ts.map +1 -0
  675. package/dist/tools/operations/define-wait-tool.d.ts +22 -0
  676. package/dist/tools/operations/define-wait-tool.d.ts.map +1 -0
  677. package/dist/tools/operations/mount-wait.d.ts.map +1 -0
  678. package/dist/tools/operations/wait-core.d.ts.map +1 -0
  679. package/dist/tools/remote.d.ts +1 -1
  680. package/dist/tools/remote.d.ts.map +1 -1
  681. package/dist/tools/runtime-tool.d.ts +13 -4
  682. package/dist/tools/runtime-tool.d.ts.map +1 -1
  683. package/dist/tools/schema/coerce.d.ts.map +1 -0
  684. package/dist/tools/schema/flatten-join.d.ts.map +1 -0
  685. package/dist/tools/schema/flatten.d.ts.map +1 -0
  686. package/dist/tools/schema/portable-formats.d.ts.map +1 -0
  687. package/dist/tools/schema/presentation.d.ts +24 -0
  688. package/dist/tools/schema/presentation.d.ts.map +1 -0
  689. package/dist/tools/schema/schema.d.ts.map +1 -0
  690. package/dist/tools/schema/untyped-properties.d.ts.map +1 -0
  691. package/dist/tools/surface.d.ts +2 -3
  692. package/dist/tools/surface.d.ts.map +1 -1
  693. package/dist/tools/tool-logger.d.ts +1 -1
  694. package/dist/tools/tool-logger.d.ts.map +1 -1
  695. package/dist/tools/toolkit.d.ts +4 -4
  696. package/dist/tools/toolkit.d.ts.map +1 -1
  697. package/dist/tools/transfer/define-download-tool.d.ts +18 -0
  698. package/dist/tools/transfer/define-download-tool.d.ts.map +1 -0
  699. package/dist/tools/transfer/define-upload-tool.d.ts +16 -0
  700. package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -0
  701. package/dist/tools/transfer/define-view-file-tool.d.ts +10 -0
  702. package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -0
  703. package/dist/tools/transfer/download-core.d.ts +20 -0
  704. package/dist/tools/transfer/download-core.d.ts.map +1 -0
  705. package/dist/tools/transfer/managed-file-error.d.ts +6 -0
  706. package/dist/tools/transfer/managed-file-error.d.ts.map +1 -0
  707. package/dist/tools/transfer/mount-download.d.ts +41 -0
  708. package/dist/tools/transfer/mount-download.d.ts.map +1 -0
  709. package/dist/tools/transfer/mount-upload.d.ts +21 -0
  710. package/dist/tools/transfer/mount-upload.d.ts.map +1 -0
  711. package/dist/tools/transfer/native-result.d.ts.map +1 -0
  712. package/dist/tools/transfer/upload-core.d.ts +4 -0
  713. package/dist/tools/transfer/upload-core.d.ts.map +1 -0
  714. package/dist/tools/transfer/view-file-contract.d.ts.map +1 -0
  715. package/dist/tools/transfer/view-file.d.ts +62 -0
  716. package/dist/tools/transfer/view-file.d.ts.map +1 -0
  717. package/dist/tools/transports.d.ts +1 -1
  718. package/dist/tools/transports.d.ts.map +1 -1
  719. package/dist/tracking/client-listeners.d.ts +30 -0
  720. package/dist/tracking/client-listeners.d.ts.map +1 -0
  721. package/dist/tracking/client-visit.d.ts +61 -0
  722. package/dist/tracking/client-visit.d.ts.map +1 -0
  723. package/dist/tracking/client.d.ts +3 -2
  724. package/dist/tracking/client.d.ts.map +1 -1
  725. package/dist/tracking/contract.d.ts +1 -1
  726. package/dist/tracking/contract.d.ts.map +1 -1
  727. package/llms/agent-runtime-browser.txt +33 -0
  728. package/llms/agent-runtime-coding-tools.txt +58 -0
  729. package/llms/agent-runtime-harness.txt +45 -0
  730. package/llms/agent-runtime-openrouter.txt +22 -0
  731. package/llms/agent-runtime-sandbox.txt +159 -0
  732. package/llms/agent-runtime-sqlite-bun.txt +29 -0
  733. package/llms/agent-runtime-sqlite-node.txt +26 -0
  734. package/llms/agent-runtime-testing.txt +30 -0
  735. package/llms/agent-runtime.2.txt +550 -0
  736. package/llms/agent-runtime.3.txt +311 -0
  737. package/llms/agent-runtime.txt +893 -0
  738. package/llms/application-diagnostic-journal.txt +30 -0
  739. package/llms/application-grammy.txt +27 -0
  740. package/llms/application-opentelemetry.txt +27 -0
  741. package/llms/application-schemas.txt +42 -0
  742. package/llms/application.2.txt +487 -0
  743. package/llms/application.txt +886 -0
  744. package/llms/cli.2.txt +80 -0
  745. package/llms/cli.txt +948 -0
  746. package/llms/contract.txt +606 -0
  747. package/llms/declaration.txt +286 -0
  748. package/llms/files.txt +33 -0
  749. package/llms/geo.txt +114 -0
  750. package/llms/google.txt +27 -0
  751. package/llms/live.txt +471 -0
  752. package/llms/node.txt +43 -0
  753. package/llms/oauth.txt +136 -0
  754. package/llms/observability.txt +893 -0
  755. package/llms/primitives.txt +158 -0
  756. package/llms/react.txt +184 -0
  757. package/llms/release.txt +176 -0
  758. package/llms/remote.txt +25 -0
  759. package/llms/server.2.txt +361 -0
  760. package/llms/server.3.txt +1031 -0
  761. package/llms/server.4.txt +905 -0
  762. package/llms/server.5.txt +250 -0
  763. package/llms/server.txt +996 -0
  764. package/llms/stitchkit.2.txt +836 -0
  765. package/llms/stitchkit.3.txt +147 -0
  766. package/llms/stitchkit.txt +260 -0
  767. package/llms/telegram.txt +30 -0
  768. package/llms/testing.txt +676 -0
  769. package/llms/tools-connections.txt +45 -0
  770. package/llms/tools-contract.txt +9 -0
  771. package/llms/tools-invoker.txt +9 -0
  772. package/llms/tools.2.txt +647 -0
  773. package/llms/tools.3.txt +288 -0
  774. package/llms/tools.txt +966 -0
  775. package/llms/tracking-server.txt +32 -0
  776. package/llms/tracking.txt +263 -0
  777. package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
  778. package/llms/upgrading-0.53.0-0.67.0.txt +1174 -0
  779. package/llms/upgrading-0.68.0-0.94.0.txt +1159 -0
  780. package/llms/upgrading.txt +215 -0
  781. package/llms-full.txt +312 -77
  782. package/llms.txt +54 -5
  783. package/package.json +84 -83
  784. package/dist/agent-runtime/durability-contract.d.ts +0 -176
  785. package/dist/agent-runtime/durability-contract.d.ts.map +0 -1
  786. package/dist/agent-runtime/durability-json.d.ts +0 -3
  787. package/dist/agent-runtime/durability-json.d.ts.map +0 -1
  788. package/dist/agent-runtime/durability-ledger.d.ts +0 -16
  789. package/dist/agent-runtime/durability-ledger.d.ts.map +0 -1
  790. package/dist/agent-runtime/durability-scheduler.d.ts +0 -29
  791. package/dist/agent-runtime/durability-scheduler.d.ts.map +0 -1
  792. package/dist/agent-runtime/durability.d.ts +0 -14
  793. package/dist/agent-runtime/durability.d.ts.map +0 -1
  794. package/dist/agent-runtime/store-driver.d.ts +0 -814
  795. package/dist/agent-runtime/store-driver.d.ts.map +0 -1
  796. package/dist/agent-runtime-browser.d.ts +0 -5
  797. package/dist/agent-runtime-browser.d.ts.map +0 -1
  798. package/dist/agent-runtime-browser.js +0 -124
  799. package/dist/agent-runtime-coding-tools.d.ts +0 -2
  800. package/dist/agent-runtime-coding-tools.d.ts.map +0 -1
  801. package/dist/agent-runtime-coding-tools.js +0 -23
  802. package/dist/agent-runtime-harness.d.ts +0 -2
  803. package/dist/agent-runtime-harness.d.ts.map +0 -1
  804. package/dist/agent-runtime-harness.js +0 -729
  805. package/dist/agent-runtime-openrouter.d.ts +0 -29
  806. package/dist/agent-runtime-openrouter.d.ts.map +0 -1
  807. package/dist/agent-runtime-openrouter.js +0 -270
  808. package/dist/agent-runtime-sandbox.d.ts +0 -5
  809. package/dist/agent-runtime-sandbox.d.ts.map +0 -1
  810. package/dist/agent-runtime-sandbox.js +0 -798
  811. package/dist/agent-runtime-sqlite-bun.d.ts +0 -11
  812. package/dist/agent-runtime-sqlite-bun.d.ts.map +0 -1
  813. package/dist/agent-runtime-sqlite-bun.js +0 -42
  814. package/dist/agent-runtime-sqlite-node.d.ts +0 -11
  815. package/dist/agent-runtime-sqlite-node.d.ts.map +0 -1
  816. package/dist/agent-runtime-sqlite-node.js +0 -44
  817. package/dist/agent-runtime-testing.d.ts +0 -3
  818. package/dist/agent-runtime-testing.d.ts.map +0 -1
  819. package/dist/agent-runtime-testing.js +0 -156
  820. package/dist/agent-runtime.d.ts +0 -38
  821. package/dist/agent-runtime.d.ts.map +0 -1
  822. package/dist/agent-runtime.js +0 -2607
  823. package/dist/application/channel.d.ts.map +0 -1
  824. package/dist/application-diagnostic-journal.d.ts +0 -21
  825. package/dist/application-diagnostic-journal.d.ts.map +0 -1
  826. package/dist/application-diagnostic-journal.js +0 -632
  827. package/dist/application-grammy.d.ts +0 -2
  828. package/dist/application-grammy.d.ts.map +0 -1
  829. package/dist/application-grammy.js +0 -169
  830. package/dist/application-opentelemetry.d.ts +0 -2
  831. package/dist/application-opentelemetry.d.ts.map +0 -1
  832. package/dist/application-opentelemetry.js +0 -250
  833. package/dist/application-schemas.d.ts +0 -15
  834. package/dist/application-schemas.d.ts.map +0 -1
  835. package/dist/application-schemas.js +0 -27
  836. package/dist/application.d.ts +0 -22
  837. package/dist/application.d.ts.map +0 -1
  838. package/dist/application.js +0 -1977
  839. package/dist/cli.d.ts +0 -41
  840. package/dist/cli.d.ts.map +0 -1
  841. package/dist/cli.js +0 -753
  842. package/dist/contract/index.d.ts +0 -8
  843. package/dist/contract/index.d.ts.map +0 -1
  844. package/dist/contract/index.js +0 -55
  845. package/dist/declaration.d.ts.map +0 -1
  846. package/dist/declaration.js +0 -183
  847. package/dist/files.d.ts +0 -3
  848. package/dist/files.d.ts.map +0 -1
  849. package/dist/files.js +0 -15
  850. package/dist/geo.d.ts +0 -3
  851. package/dist/geo.d.ts.map +0 -1
  852. package/dist/geo.js +0 -245
  853. package/dist/google.d.ts.map +0 -1
  854. package/dist/google.js +0 -175
  855. package/dist/index-0a349c33.js +0 -470
  856. package/dist/index-0j3vcp5m.js +0 -28
  857. package/dist/index-2c2bjw3s.js +0 -51
  858. package/dist/index-2na0qrfn.js +0 -214
  859. package/dist/index-2qzskm8h.js +0 -63
  860. package/dist/index-3bmnp41g.js +0 -2169
  861. package/dist/index-3xwxfj4z.js +0 -334
  862. package/dist/index-4fpa9dy2.js +0 -51
  863. package/dist/index-6kyksz9y.js +0 -268
  864. package/dist/index-77fekveh.js +0 -44
  865. package/dist/index-7gnkny4z.js +0 -326
  866. package/dist/index-7zbps32p.js +0 -89
  867. package/dist/index-9f8ztey6.js +0 -588
  868. package/dist/index-a11g2kry.js +0 -866
  869. package/dist/index-a916km3r.js +0 -45
  870. package/dist/index-actkayzn.js +0 -367
  871. package/dist/index-bn2cjajt.js +0 -524
  872. package/dist/index-bx75zwt7.js +0 -63
  873. package/dist/index-cby4ar3v.js +0 -46
  874. package/dist/index-cnyk6te3.js +0 -77
  875. package/dist/index-cxqhvq21.js +0 -413
  876. package/dist/index-e0znv5gn.js +0 -176
  877. package/dist/index-e42wzzz5.js +0 -154
  878. package/dist/index-f477k430.js +0 -324
  879. package/dist/index-f9mb610r.js +0 -177
  880. package/dist/index-fadnxwna.js +0 -1046
  881. package/dist/index-fq77yfzc.js +0 -1303
  882. package/dist/index-h9etkkyk.js +0 -1126
  883. package/dist/index-hrbajay7.js +0 -1196
  884. package/dist/index-kw9t5ayn.js +0 -507
  885. package/dist/index-mzvgxp0n.js +0 -80
  886. package/dist/index-n0f51dfn.js +0 -3170
  887. package/dist/index-p13mwz16.js +0 -16
  888. package/dist/index-s8cnx02s.js +0 -90
  889. package/dist/index-sr93cwf9.js +0 -325
  890. package/dist/index-tmwcrptx.js +0 -85
  891. package/dist/index-v5573g1k.js +0 -142
  892. package/dist/index-vjpvjqpn.js +0 -86
  893. package/dist/index-vk3kq9sb.js +0 -3344
  894. package/dist/index-wc4x00bn.js +0 -103
  895. package/dist/index-wnfk50r0.js +0 -211
  896. package/dist/index-yewwh1w4.js +0 -647
  897. package/dist/index-yn8remb1.js +0 -290
  898. package/dist/index-ywd0y6m1.js +0 -394
  899. package/dist/index-zwkgfq1s.js +0 -345
  900. package/dist/index.d.ts +0 -14
  901. package/dist/index.d.ts.map +0 -1
  902. package/dist/index.js +0 -632
  903. package/dist/internal/errors.d.ts +0 -92
  904. package/dist/internal/errors.d.ts.map +0 -1
  905. package/dist/internal/observability-sink.d.ts +0 -81
  906. package/dist/internal/observability-sink.d.ts.map +0 -1
  907. package/dist/live.d.ts +0 -19
  908. package/dist/live.d.ts.map +0 -1
  909. package/dist/live.js +0 -282
  910. package/dist/logger.d.ts.map +0 -1
  911. package/dist/node.d.ts +0 -18
  912. package/dist/node.d.ts.map +0 -1
  913. package/dist/node.js +0 -303
  914. package/dist/oauth.d.ts +0 -57
  915. package/dist/oauth.d.ts.map +0 -1
  916. package/dist/oauth.js +0 -170
  917. package/dist/observability/index.d.ts +0 -19
  918. package/dist/observability/index.d.ts.map +0 -1
  919. package/dist/observability/index.js +0 -569
  920. package/dist/primitives.d.ts +0 -3
  921. package/dist/primitives.d.ts.map +0 -1
  922. package/dist/primitives.js +0 -754
  923. package/dist/react.d.ts +0 -5
  924. package/dist/react.d.ts.map +0 -1
  925. package/dist/react.js +0 -403
  926. package/dist/release.d.ts +0 -15
  927. package/dist/release.d.ts.map +0 -1
  928. package/dist/release.js +0 -196
  929. package/dist/remote.d.ts +0 -9
  930. package/dist/remote.d.ts.map +0 -1
  931. package/dist/remote.js +0 -88
  932. package/dist/retained.d.ts.map +0 -1
  933. package/dist/server/file-state-store.d.ts +0 -23
  934. package/dist/server/file-state-store.d.ts.map +0 -1
  935. package/dist/server/index.d.ts +0 -36
  936. package/dist/server/index.d.ts.map +0 -1
  937. package/dist/server/index.js +0 -1745
  938. package/dist/server/request.d.ts.map +0 -1
  939. package/dist/telegram.d.ts +0 -3
  940. package/dist/telegram.d.ts.map +0 -1
  941. package/dist/telegram.js +0 -224
  942. package/dist/testing/agent-store-conformance.d.ts +0 -40
  943. package/dist/testing/agent-store-conformance.d.ts.map +0 -1
  944. package/dist/testing.d.ts +0 -39
  945. package/dist/testing.d.ts.map +0 -1
  946. package/dist/testing.js +0 -2209
  947. package/dist/tool-invoker.d.ts +0 -9
  948. package/dist/tool-invoker.d.ts.map +0 -1
  949. package/dist/tool-invoker.js +0 -21
  950. package/dist/tools/async-operation-contract.d.ts.map +0 -1
  951. package/dist/tools/async-operation.d.ts +0 -332
  952. package/dist/tools/async-operation.d.ts.map +0 -1
  953. package/dist/tools/cli-args.d.ts +0 -143
  954. package/dist/tools/cli-args.d.ts.map +0 -1
  955. package/dist/tools/cli-checkpoint.d.ts +0 -24
  956. package/dist/tools/cli-checkpoint.d.ts.map +0 -1
  957. package/dist/tools/cli-command.d.ts +0 -70
  958. package/dist/tools/cli-command.d.ts.map +0 -1
  959. package/dist/tools/cli-format.d.ts +0 -49
  960. package/dist/tools/cli-format.d.ts.map +0 -1
  961. package/dist/tools/cli-installer.d.ts +0 -34
  962. package/dist/tools/cli-installer.d.ts.map +0 -1
  963. package/dist/tools/cli-invoke.d.ts +0 -143
  964. package/dist/tools/cli-invoke.d.ts.map +0 -1
  965. package/dist/tools/cli-manifest.d.ts +0 -80
  966. package/dist/tools/cli-manifest.d.ts.map +0 -1
  967. package/dist/tools/cli-policy.d.ts +0 -27
  968. package/dist/tools/cli-policy.d.ts.map +0 -1
  969. package/dist/tools/cli-profile.d.ts +0 -40
  970. package/dist/tools/cli-profile.d.ts.map +0 -1
  971. package/dist/tools/cli-signature.d.ts +0 -81
  972. package/dist/tools/cli-signature.d.ts.map +0 -1
  973. package/dist/tools/cli-stream.d.ts +0 -93
  974. package/dist/tools/cli-stream.d.ts.map +0 -1
  975. package/dist/tools/cli-update.d.ts +0 -126
  976. package/dist/tools/cli-update.d.ts.map +0 -1
  977. package/dist/tools/cli-view.d.ts +0 -12
  978. package/dist/tools/cli-view.d.ts.map +0 -1
  979. package/dist/tools/cli-wait.d.ts +0 -54
  980. package/dist/tools/cli-wait.d.ts.map +0 -1
  981. package/dist/tools/cli.d.ts +0 -94
  982. package/dist/tools/cli.d.ts.map +0 -1
  983. package/dist/tools/coerce.d.ts.map +0 -1
  984. package/dist/tools/connections/index.d.ts +0 -20
  985. package/dist/tools/connections/index.d.ts.map +0 -1
  986. package/dist/tools/connections/index.js +0 -1107
  987. package/dist/tools/define-download-tool.d.ts +0 -18
  988. package/dist/tools/define-download-tool.d.ts.map +0 -1
  989. package/dist/tools/define-upload-tool.d.ts +0 -16
  990. package/dist/tools/define-upload-tool.d.ts.map +0 -1
  991. package/dist/tools/define-view-file-tool.d.ts +0 -10
  992. package/dist/tools/define-view-file-tool.d.ts.map +0 -1
  993. package/dist/tools/define-wait-tool.d.ts +0 -22
  994. package/dist/tools/define-wait-tool.d.ts.map +0 -1
  995. package/dist/tools/download-core.d.ts +0 -20
  996. package/dist/tools/download-core.d.ts.map +0 -1
  997. package/dist/tools/flatten-join.d.ts.map +0 -1
  998. package/dist/tools/flatten.d.ts.map +0 -1
  999. package/dist/tools/json-schema-dialect.d.ts +0 -17
  1000. package/dist/tools/json-schema-dialect.d.ts.map +0 -1
  1001. package/dist/tools/json-schema.d.ts.map +0 -1
  1002. package/dist/tools/managed-file-error.d.ts +0 -6
  1003. package/dist/tools/managed-file-error.d.ts.map +0 -1
  1004. package/dist/tools/mcp-app.d.ts +0 -62
  1005. package/dist/tools/mcp-app.d.ts.map +0 -1
  1006. package/dist/tools/mcp-catalog.d.ts +0 -68
  1007. package/dist/tools/mcp-catalog.d.ts.map +0 -1
  1008. package/dist/tools/mcp-handler.d.ts +0 -46
  1009. package/dist/tools/mcp-handler.d.ts.map +0 -1
  1010. package/dist/tools/mcp-prepare.d.ts +0 -75
  1011. package/dist/tools/mcp-prepare.d.ts.map +0 -1
  1012. package/dist/tools/mcp-progress.d.ts +0 -46
  1013. package/dist/tools/mcp-progress.d.ts.map +0 -1
  1014. package/dist/tools/mcp-round-policy.d.ts +0 -33
  1015. package/dist/tools/mcp-round-policy.d.ts.map +0 -1
  1016. package/dist/tools/mcp-round.d.ts +0 -61
  1017. package/dist/tools/mcp-round.d.ts.map +0 -1
  1018. package/dist/tools/mcp-stdio-signals.d.ts +0 -33
  1019. package/dist/tools/mcp-stdio-signals.d.ts.map +0 -1
  1020. package/dist/tools/mcp-stdio.d.ts +0 -20
  1021. package/dist/tools/mcp-stdio.d.ts.map +0 -1
  1022. package/dist/tools/mcp-trace.d.ts +0 -12
  1023. package/dist/tools/mcp-trace.d.ts.map +0 -1
  1024. package/dist/tools/mcp.d.ts +0 -152
  1025. package/dist/tools/mcp.d.ts.map +0 -1
  1026. package/dist/tools/mount-download.d.ts +0 -41
  1027. package/dist/tools/mount-download.d.ts.map +0 -1
  1028. package/dist/tools/mount-upload.d.ts +0 -21
  1029. package/dist/tools/mount-upload.d.ts.map +0 -1
  1030. package/dist/tools/mount-wait.d.ts.map +0 -1
  1031. package/dist/tools/native-mcp.d.ts +0 -20
  1032. package/dist/tools/native-mcp.d.ts.map +0 -1
  1033. package/dist/tools/native-result.d.ts.map +0 -1
  1034. package/dist/tools/oauth-metadata.d.ts +0 -28
  1035. package/dist/tools/oauth-metadata.d.ts.map +0 -1
  1036. package/dist/tools/oauth-provider.d.ts +0 -184
  1037. package/dist/tools/oauth-provider.d.ts.map +0 -1
  1038. package/dist/tools/portable-formats.d.ts.map +0 -1
  1039. package/dist/tools/presentation.d.ts +0 -22
  1040. package/dist/tools/presentation.d.ts.map +0 -1
  1041. package/dist/tools/schema.d.ts.map +0 -1
  1042. package/dist/tools/untyped-properties.d.ts.map +0 -1
  1043. package/dist/tools/upload-core.d.ts +0 -4
  1044. package/dist/tools/upload-core.d.ts.map +0 -1
  1045. package/dist/tools/view-file-contract.d.ts.map +0 -1
  1046. package/dist/tools/view-file.d.ts +0 -62
  1047. package/dist/tools/view-file.d.ts.map +0 -1
  1048. package/dist/tools/wait-core.d.ts.map +0 -1
  1049. package/dist/tools-contract.d.ts +0 -29
  1050. package/dist/tools-contract.d.ts.map +0 -1
  1051. package/dist/tools-contract.js +0 -24
  1052. package/dist/tools.d.ts +0 -50
  1053. package/dist/tools.d.ts.map +0 -1
  1054. package/dist/tools.js +0 -2930
  1055. package/dist/tracking-server.d.ts +0 -15
  1056. package/dist/tracking-server.d.ts.map +0 -1
  1057. package/dist/tracking.d.ts +0 -24
  1058. package/dist/tracking.d.ts.map +0 -1
  1059. package/dist/tracking.js +0 -1092
  1060. package/dist/upgrade-cli.d.ts.map +0 -1
  1061. package/dist/upgrade-cli.js +0 -177
  1062. /package/dist/{retained.d.ts → browser/retained.d.ts} +0 -0
  1063. /package/dist/{declaration.d.ts → declaration/declaration.d.ts} +0 -0
  1064. /package/dist/{upgrade-cli.d.ts → entrypoints/bin/upgrade-cli.d.ts} +0 -0
  1065. /package/dist/{tracking-server.js → entrypoints/tracking/server.js} +0 -0
  1066. /package/dist/{google.d.ts → google/google.d.ts} +0 -0
  1067. /package/dist/{index-pq95qkbf.js → index-5jm36zv1.js} +0 -0
  1068. /package/dist/{application → internal}/channel.d.ts +0 -0
  1069. /package/dist/{logger.d.ts → internal/logger.d.ts} +0 -0
  1070. /package/dist/{server → internal}/request.d.ts +0 -0
  1071. /package/dist/{tools → json-schema}/json-schema.d.ts +0 -0
  1072. /package/dist/tools/{async-operation-contract.d.ts → operations/async-operation-contract.d.ts} +0 -0
  1073. /package/dist/tools/{mount-wait.d.ts → operations/mount-wait.d.ts} +0 -0
  1074. /package/dist/tools/{wait-core.d.ts → operations/wait-core.d.ts} +0 -0
  1075. /package/dist/tools/{coerce.d.ts → schema/coerce.d.ts} +0 -0
  1076. /package/dist/tools/{flatten-join.d.ts → schema/flatten-join.d.ts} +0 -0
  1077. /package/dist/tools/{flatten.d.ts → schema/flatten.d.ts} +0 -0
  1078. /package/dist/tools/{portable-formats.d.ts → schema/portable-formats.d.ts} +0 -0
  1079. /package/dist/tools/{schema.d.ts → schema/schema.d.ts} +0 -0
  1080. /package/dist/tools/{untyped-properties.d.ts → schema/untyped-properties.d.ts} +0 -0
  1081. /package/dist/tools/{native-result.d.ts → transfer/native-result.d.ts} +0 -0
  1082. /package/dist/tools/{view-file-contract.d.ts → transfer/view-file-contract.d.ts} +0 -0
package/llms/tools.txt ADDED
@@ -0,0 +1,966 @@
1
+ # stitchkit/tools — stitchkit docs slice, part 1 of 3
2
+
3
+ > Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
4
+ > `llms.txt` in this package.
5
+ > Continues in `llms/tools.2.txt`.
6
+
7
+ Parts of this slice:
8
+ - `llms/tools.txt`: Guide: MCP & agents (docs/guide/mcp-and-agents.md)
9
+ - `llms/tools.2.txt`: Guide: MCP & agents (docs/guide/mcp-and-agents.md)
10
+ - `llms/tools.3.txt`: API reference: `stitchkit/tools` (docs/api/reference.md)
11
+
12
+ ==============================================================================
13
+ # Guide: MCP & agents (docs/guide/mcp-and-agents.md)
14
+ ==============================================================================
15
+
16
+ # MCP & AI agents
17
+
18
+ The application generated by `bun create stitchkit` includes a working
19
+ stateless MCP endpoint and a separate `bun run tools` manifest command. Both
20
+ are assembled from the same implemented project contracts as HTTP and CLI, so
21
+ the generated project is the canonical end-to-end example for this chapter.
22
+
23
+ The same contract that drives the HTTP API also drives AI tooling. An endpoint
24
+ exposed on `MCP` becomes a [Model Context Protocol](https://modelcontextprotocol.io)
25
+ tool — callable from Claude, Cursor and other MCP clients. An endpoint exposed on
26
+ `AGENT` becomes a [Vercel AI SDK](https://sdk.vercel.ai) tool — callable from an
27
+ agent loop. Contract operations are never re-described by hand; pathless
28
+ runtime operations use one framework definition shared by both tool transports.
29
+
30
+ ## Which endpoints become tools
31
+
32
+ By default every endpoint is a tool on every transport. `expose` narrows it:
33
+
34
+ ```ts
35
+ { method: 'GET', path: '/search', desc: 'Search the catalog' } // HTTP + MCP + AGENT
36
+ { method: 'POST', path: '/sync', desc: 'Internal sync', expose: ['HTTP'] } // HTTP only
37
+ { method: 'GET', path: '/lookup', desc: 'Look up a price', expose: ['MCP'] } // MCP tool only
38
+ ```
39
+
40
+ Four kinds of endpoint are **never** tools, whatever `expose` says: a
41
+ `multipart` upload (not a tool call), a `rawBody` endpoint (HTTP-only by
42
+ construction), a [`responseMeta`](./server.md#typed-json-response-metadata)
43
+ endpoint (outbound HTTP headers mean nothing on a tool call), and a
44
+ [`rawResponse`](./server.md#raw-response-endpoints) endpoint (its answer is
45
+ bytes — a tool result cannot carry them, and it would reach the model as `{}`).
46
+ Pin the full list with `listToolNames` in a snapshot test.
47
+
48
+ `desc` is the tool description the model reads — write it for the model, not
49
+ just for a human. The tool name defaults
50
+ to a verb-aware name from the method + prefix (`list` → `list_widgets`, `get` →
51
+ `get_widget`); set `tool.name` for an explicit one. Derivation normalises **per half**
52
+ (→ ADR 0035): the service half turns everything outside `[a-zA-Z0-9_]` into `_`,
53
+ hyphen included (`bot-status` ⇒ `get_bot_status`), while the method half keeps
54
+ its hyphen (`get-user` ⇒ `get-user_notes`) because such a name has always been
55
+ legal and may already be pinned in a client config. A name is *accepted* if it
56
+ matches `[a-zA-Z0-9_-]`. A name that
57
+ still cannot be delivered (illegal explicit `tool.name`, over 64 characters, or a
58
+ prefix with no usable character) throws at mount rather than at the first model
59
+ call —
60
+ → [ADR 0035](../decisions/0035-tool-name-derivation-and-validation.md). See
61
+ [Contracts → transports](./contracts.md#transports).
62
+
63
+ ### Pinning tool names — `listToolNames`
64
+
65
+ Derived tool names are part of your public surface — an MCP client config or an
66
+ agent prompt refers to them by string. `listToolNames({ services, runtimeTools })`
67
+ resolves the complete mixed surface (the exact resolver the mounts use), with
68
+ its origin, `(service, method)` identity and transports, sorted — a stable shape
69
+ to snapshot:
70
+
71
+ ```ts
72
+ import { listToolNames } from 'stitchkit/tools'
73
+
74
+ test('tool names have not drifted', () => {
75
+ expect(listToolNames({ services, runtimeTools })).toMatchSnapshot()
76
+ })
77
+ ```
78
+
79
+ A stitchkit upgrade (or a contract refactor) that would shift a derived name
80
+ now fails this test instead of silently breaking the clients that call the
81
+ tool. It is also the mechanical diff when migrating a service: run it before
82
+ and after, compare.
83
+
84
+ > **This is also the guard against a forgotten `expose`.** An endpoint that
85
+ > declares none is a tool on MCP **and** AGENT — the default is fail-open, and
86
+ > there is no contract-level `expose` to set once (→
87
+ > [ADR 0036](../decisions/0036-contract-level-meta.md)). A snapshot of
88
+ > `listToolNames` fails the build the moment an endpoint you meant to keep
89
+ > HTTP-only shows up in the list, which is the one check that catches it however
90
+ > many places the line was forgotten.
91
+
92
+ ## In-process calls — `createToolInvoker`
93
+
94
+ When one application operation dispatches to a contract tool, do not mount an
95
+ AI SDK `ToolSet` and call its transport adapter manually. Compile an in-process
96
+ invoker once and call the shared framework runner directly:
97
+
98
+ ```ts
99
+ import { createToolInvoker } from 'stitchkit/tools/invoker'
100
+
101
+ const invoker = createToolInvoker(services, {
102
+ transport: 'AGENT', // required exposure policy
103
+ })
104
+
105
+ const result = await invoker.invoke('update_entity', args, {
106
+ source: 'internal', // default; audit names the real call source
107
+ context: { identity },
108
+ lifecycle,
109
+ hooks,
110
+ })
111
+
112
+ // Composition path: validated data or the exact normalized AppError.
113
+ const data = await invoker.invokeOrThrow('update_entity', args, {
114
+ context: { identity },
115
+ lifecycle,
116
+ hooks,
117
+ })
118
+ ```
119
+
120
+ `transport` is required and uses the exact existing `MCP`, `AGENT` or `CLI`
121
+ exposure rules; there is no internal bypass mode. The immutable name lookup is
122
+ compiled once. Call-specific identity, context, lifecycle and hooks are passed
123
+ to `invoke` / `invokeOrThrow`, so one registry can safely serve parallel and
124
+ recursive calls without retaining request state. Every invocation gets a fresh
125
+ tool-call context and runs the same extension resolution, input/output
126
+ validation, lifecycle, hooks and output-strip reporter as mounted tools.
127
+
128
+ The dedicated entrypoint needs only the normal `stitchkit`/`zod` install. Use
129
+ the broader `stitchkit/tools` barrel when the same program also mounts MCP or AI
130
+ adapters and has installed their optional peers. Both imports reach the same
131
+ runner; this is dependency isolation, not a second execution implementation.
132
+
133
+ `invoke` returns the canonical discriminated `ToolResult`, not an AI SDK or MCP
134
+ presentation envelope. `invokeOrThrow` returns validated data and throws the
135
+ runner's normalized `AppError` on failure, preserving an application error's
136
+ code, status, message, details and hint without reconstructing it from the
137
+ model-safe envelope. Unexpected throws remain scrubbed. An unknown name throws
138
+ `AppError('NOT_FOUND')` before the runner because there is no operation identity
139
+ against which hooks could run. Duplicate and provider-invalid names fail when
140
+ the invoker is created.
141
+
142
+ The invoker's caller is code, so it gets an endpoint's full answer even where a
143
+ [tool view](#a-different-answer-for-tools--withtoolview) is declared. When the
144
+ invoker backs a transport a model reads, pass `toolSurface: true`: calls then
145
+ get the view's defaults and projected answer, which is what `collectTools` and
146
+ `buildToolManifest` advertise.
147
+
148
+ ## MCP — `createMcpHandler`
149
+
150
+ `createMcpHandler` builds a complete stateless Streamable-HTTP MCP endpoint on
151
+ the official TypeScript SDK v2 server package. It owns server creation,
152
+ protocol-era negotiation and shutdown; application code does not import the SDK
153
+ to mount a normal endpoint.
154
+
155
+ ```ts
156
+ import { createMcpHandler, createMcpHttpRoute } from 'stitchkit/tools'
157
+ import { createServer } from 'stitchkit/server'
158
+
159
+ const mcp = createMcpHandler({
160
+ serverInfo: { name: 'my-app', version: '1.0.0' },
161
+ auth: (req) => resolveApiKey(req), // → an identity, or null for 401
162
+ services: [usersService, catalogService],
163
+ })
164
+
165
+ createServer({
166
+ services,
167
+ rawRoutes: [createMcpHttpRoute({ path: '/mcp', handler: mcp })],
168
+ })
169
+
170
+ // During graceful shutdown:
171
+ await mcp.close()
172
+ ```
173
+
174
+ ### `McpHandlerConfig`
175
+
176
+ | Field | Purpose |
177
+ |-------|---------|
178
+ | `serverInfo` | MCP server identity — `{ name, version }` |
179
+ | `auth` | `(req) => identity \| null` — `null` rejects with 401 |
180
+ | `services` | the services to expose — an array, or `(auth) => ServiceDef[]` |
181
+ | `runtimeTools` | managed pathless operations — an array, or `(auth) => RuntimeToolDefinition[]` |
182
+ | `surfaces` | finite `{ key: { services, runtimeTools } }` registry prepared eagerly |
183
+ | `selectSurface` | `(auth) => declaredKey` — required with `surfaces` |
184
+ | `context` | `(auth) => {…}` — values merged into every tool handler's `ctx` |
185
+ | `lifecycle` | `beforeHandle` / `afterHandle` — the tool-side auth gate (see below) |
186
+ | `multiRound` | Typed MRTR state policy for guarded multi-round tool calls |
187
+ | `hooks` | tool-call observability hooks — `afterToolCall` fires on every result |
188
+ | `extend` | extra advertised arguments resolved into handler context |
189
+ | `schemaValidation` | compatibility policy, typed-property guard and portable-format guard |
190
+ | `logger` | a `StitchLogger` for the `'warn'` policy |
191
+ | `rawTools` | `(server, auth) => …` — explicit SDK registration without framework guarantees |
192
+ | `resources` | MCP Apps `ui://` resources mounted on every server |
193
+ | `instructions` | a short host-facing usage hint, surfaced to MCP tool-search |
194
+ | `coerceJsonArgs` | coerce JSON-stringified object/array arguments (default `true`) |
195
+ | `flattenUnionInput` | advertise discriminated unions as one object (default `false`) |
196
+ | `errorHint` | add a project-owned hint to failed tool results |
197
+ | `onOutputStrip` | observe output keys removed by contract validation |
198
+ | `protectedResource` | RFC 9728 metadata used by HTTP `401` responses |
199
+ | `legacy` | `'serve'` (default) or `'reject'` for pre-2026 clients |
200
+ | `security` | optional Host/Origin allowlists at the Fetch boundary |
201
+ | `onTransportRejected` | observe HTTP/protocol rejections without entering lifecycle or tool hooks |
202
+ | `cache` | explicit operation cache hints; omitted means zero/private |
203
+
204
+ Direct `services` / `runtimeTools` factories, `context`, `selectSurface` and
205
+ `rawTools` receive the resolved identity, so a tenant can be shown only its own
206
+ tools and every handler can read `ctx.tenantId`.
207
+
208
+ Use direct factories only when the definitions are genuinely arbitrary per
209
+ identity. For a bounded role/plan set, declare a finite registry instead:
210
+
211
+ ```ts
212
+ const handleMcp = createMcpHandler({
213
+ serverInfo,
214
+ auth,
215
+ surfaces: {
216
+ admin: { services: allServices, runtimeTools: [renderPreview] },
217
+ member: { services: memberServices, runtimeTools: [renderPreview] },
218
+ },
219
+ selectSurface: (identity) => identity.isAdmin ? 'admin' : 'member',
220
+ context: (identity) => ({ identity }),
221
+ })
222
+ ```
223
+
224
+ Every declared entry is schema-validated and prepared once when the handler is
225
+ constructed. The selected immutable descriptors are shared; the SDK server,
226
+ transport, auth-derived context, lifecycle runner and tool-call context are
227
+ fresh for every request. Unknown keys
228
+ fail before the server connects. The registry never retains auth values.
229
+
230
+ ### Stateless transport and protocol eras
231
+
232
+ Every request gets a fresh SDK server, resolved auth/context and tool-call
233
+ runner. Static direct and finite registry schemas are still prepared once when
234
+ the handler is constructed. There is no session map, event store,
235
+ `Mcp-Session-Id` or resumable cross-request SSE state. Process replacement and
236
+ load balancing therefore cannot strand a client on an in-memory session.
237
+
238
+ The default `legacy: 'serve'` lets the official SDK negotiate either modern
239
+ `2026-07-28` or the supported legacy stateless opening on this same endpoint.
240
+ Set `legacy: 'reject'` when every host is modern. Legacy support is protocol
241
+ translation inside the SDK, not a second Stitchkit transport or compatibility
242
+ API. Stateful MCP and subscriptions are intentionally outside this layer.
243
+
244
+ `createMcpHttpRoute` is the framework-owned raw-route adapter. It registers
245
+ `ALL` because Streamable HTTP uses multiple HTTP methods, delegates only to
246
+ `handler.fetch`, and leaves lifecycle ownership with the returned handler.
247
+
248
+ By default, a present `Host` header must match the request URL and a present
249
+ browser `Origin` must be same-origin. Non-browser hosts may omit `Origin`. Behind
250
+ a trusted reverse proxy, reconstruct the public request URL before calling the
251
+ handler or configure exact `security.allowedHosts` / `allowedOrigins`; never
252
+ copy arbitrary forwarded headers into the trusted URL. If a browser calls MCP
253
+ cross-origin, its HTTP server or gateway must also answer CORS preflight and
254
+ expose the protocol headers. `onTransportRejected` is the audit boundary for
255
+ HTTP/security rejections; it is deliberately separate from tool lifecycle and
256
+ must not be used as authorization input.
257
+
258
+ ### Modern discovery, routing and cache hints
259
+
260
+ Stitchkit forwards the negotiated protocol era and validated MCP request data
261
+ to both `RequestEvent.mcp` and the current managed call's typed `context.mcp`;
262
+ untrusted routing headers never become application identity. The SDK validates
263
+ `MCP-Protocol-Version`, JSON-RPC shape and routing
264
+ metadata before lifecycle or tool handlers run. Framework-owned tool and
265
+ resource registration preserves declaration order across HTTP and stdio. Tool
266
+ manifests preserve mount order; `listToolNames` is a sorted diagnostics view.
267
+ Consumer-owned raw SDK registrations are outside this guarantee.
268
+
269
+ Caching is opt-in. `cache.operations` maps directly to SDK v2 operation cache
270
+ hints, while each `McpResourceDef` may declare its own `cacheHint`. Omission
271
+ means zero/private: neither a prepared surface nor a deterministic response is
272
+ silently treated as public. Unbounded auth-selected surface factories are
273
+ always forced to zero/private even when an operation policy is present; use a
274
+ finite `surfaces` registry when identities share a provably immutable surface.
275
+ Stitchkit never advertises list-change or subscription capabilities
276
+ without an implementation.
277
+
278
+ ### Knowing your catalog is stale — the catalog stamp
279
+
280
+ A client lists the tools once and keeps that list. If the server's contract
281
+ moves afterwards, the client's copy is wrong and *nothing tells it so*: calls
282
+ are refused, and from inside the client a refusal looks like a broken server.
283
+ This is the most expensive shape a contract disagreement takes, because the
284
+ party able to fix it is the one with no evidence.
285
+
286
+ Every advertised tool and every tool result therefore carries the fingerprint of
287
+ the catalog it came from:
288
+
289
+ ```ts
290
+ import { readMcpCatalogStamp } from 'stitchkit/tools';
291
+
292
+ const listed = await client.listTools();
293
+ let known = readMcpCatalogStamp(listed.tools[0]?._meta); // { digest, tools }
294
+
295
+ const result = await client.callTool({ name: 'record_journal', arguments });
296
+ const live = readMcpCatalogStamp(result._meta);
297
+ if (live && known && live.digest !== known.digest) {
298
+ // The catalog moved under us. Re-list before blaming the result.
299
+ known = readMcpCatalogStamp((await client.listTools()).tools[0]?._meta);
300
+ }
301
+ ```
302
+
303
+ The comparison costs nothing and runs on a response you were already receiving —
304
+ including a refusal, which is exactly when a stale catalog is the likeliest
305
+ explanation. `notifications/tools/list_changed` is the push-shaped answer to the
306
+ same problem and `createMcpHandler` cannot send it: it is stateless by
307
+ construction, so there is no retained session to push down.
308
+
309
+ The digest covers each advertised tool's name, description, input schema, output
310
+ schema and annotations, and nothing else — it moves when the contract moves and
311
+ not when a handler does. Raw SDK registrations stay consumer-owned and are
312
+ outside it.
313
+
314
+ ### Shaping arguments before validation — `beforeToolCall`
315
+
316
+ `beforeToolCall` sees the arguments as they arrived and may **replace** them:
317
+
318
+ ```ts
319
+ hooks: {
320
+ beforeToolCall: async ({ args }) =>
321
+ typeof args.id === 'string' && args.id.startsWith('@')
322
+ ? { ...args, id: await resolveReference(args.id) }
323
+ : undefined, // undefined / null / nothing → unchanged
324
+ }
325
+ ```
326
+
327
+ The replacement is validated by the contract schema like any other input, so this
328
+ shapes a call and never bypasses the schema — a hook returning something the
329
+ contract refuses produces an ordinary `VALIDATION_ERROR`. It runs before the
330
+ params/input split, before argument coercion and before both schemas, which is
331
+ why a field declared `z.string()` can receive a reference and still be a string by
332
+ the time it is checked. `lifecycle.beforeHandle` is too late for this: the schemas
333
+ have already answered.
334
+
335
+ The audit trail is unaffected. `afterToolCall` reports what the caller sent as
336
+ `args` and the replacement separately as `effectiveArgs`, so a rewrite is visible
337
+ as a rewrite rather than by overwriting the evidence.
338
+
339
+ ### Knowing the outcome of a call — `afterToolCall` and `toolCallId`
340
+
341
+ `afterToolCall` receives the whole `ToolResult` — `{ok: true, data}` or
342
+ `{ok: false, code, …}` — on every exit, including a validation failure that never
343
+ reached the handler, and on all three transports. It is the answer to "did this
344
+ call fail"; deriving that from the serialized error text instead is the mistake
345
+ this section exists to prevent, and it is a mistake that does not announce itself:
346
+ one consumer had five places asking the question and getting five answers.
347
+
348
+ To correlate an outcome with the call the model made, read `context.toolCallId`:
349
+
350
+ ```ts
351
+ hooks: {
352
+ afterToolCall: ({ context, result }) => {
353
+ loop.record(context.toolCallId, result.ok ? 'ok' : result.code);
354
+ },
355
+ }
356
+ ```
357
+
358
+ Two exits are deliberately **not** reported: a runtime tool presenter that throws
359
+ on the agent surface (the AI SDK calls it after `execute` has already returned)
360
+ and `ToolExecutionControlError`, which is a run being stopped rather than a tool
361
+ failing — check it with `isToolExecutionControlError`.
362
+
363
+ ### Restartable tool bodies — `durability`
364
+
365
+ A tool that starts slow work and must report exactly once, including after a host
366
+ restart, can keep that bookkeeping **inside** the tool:
367
+
368
+ ```ts
369
+ mountAgent(services, {
370
+ durability: (toolCallId, signal) => myLedgerFor(toolCallId, signal),
371
+ });
372
+
373
+ // in the handler
374
+ const asset = await ctx.step('render', () => renderAsset(ctx.input));
375
+ await ctx.waitFor({ event: 'render-done', id: assetId });
376
+ ```
377
+
378
+ `ToolDurability` is the port a tool body sees — `step`, `sleep`, `waitFor`. You
379
+ do not have to implement it: the engine ships from `stitchkit/tools`, and it needs
380
+ a ledger of two methods over storage you already have:
381
+
382
+ ```ts
383
+ import { createLocalStepDurability, type StepDurabilityLedger } from 'stitchkit/tools';
384
+
385
+ const ledger: StepDurabilityLedger = {
386
+ appendEvent: (event) => db.durabilityEvents.insert(event), // returns the row with `seq`
387
+ readEvents: ({ conversationId, fromSeq, toSeq }) => db.durabilityEvents.page(…),
388
+ };
389
+
390
+ mountAgent(services, {
391
+ durability: (toolCallId, signal) =>
392
+ createLocalStepDurability({ store: ledger, conversationId, runId: toolCallId, signal }),
393
+ });
394
+ ```
395
+
396
+ That gives replay, absolute deadlines and decode refusal without writing them.
397
+ The port is there for an application that already has its own ledger engine.
398
+
399
+ One thing the port deliberately leaves out: **delivery**. `waitFor` parks until
400
+ `{ event, id }` arrives, and a tool body has no business delivering to itself —
401
+ so `deliver` lives on the engine object you constructed, not in the handler
402
+ context. Whatever produces the event (a webhook, a queue consumer, a cron) calls
403
+ `engine.deliver({ event, id, payload })` against the same ledger; the parked
404
+ `waitFor` resolves, and a `waitFor` that starts after the delivery returns at
405
+ once. Taking `agent-runtime` is not required and nothing of the runtime proper
406
+ enters the `stitchkit/tools` graph. An application that *does* run on
407
+ `agent-runtime` gets durability through the run context and needs no option;
408
+ where both exist the runtime's wins, because the run is recorded in its ledger.
409
+
410
+ #### An effect in another system — `effect`, at most once
411
+
412
+ `step` records its result **after** the body, so a body cut short by a crash
413
+ runs again. For sending a message or starting a turn at a provider, a repeat is
414
+ worse than a loss. The engine's `effect` records the intent **before** it runs:
415
+
416
+ ```ts
417
+ const sent = await engine.effect('reply', {
418
+ run: () => chat.send({ clientId, text }), // → { messageId }
419
+ reconcile: (signal) => chat.findByClientId(clientId, { signal }), // → { messageId } | null
420
+ })
421
+ if (sent.outcome === 'uncertain') reportPossiblyLost(clientId)
422
+ ```
423
+
424
+ A later call — the same process or a restarted one — that finds the intent with
425
+ no outcome calls `reconcile`, never `run`. Found is `accepted` with the proof;
426
+ not found is `uncertain`. Both are recorded and final: `run` is never called for
427
+ that name again, and `uncertain` is not asked again — it is the honest third
428
+ answer, and retrying it is the caller's decision under a new name. A `run` that
429
+ throws, or a `reconcile` that throws or overruns `reconcileTimeoutMs` (default
430
+ 30 s), rejects with `EffectUnresolvedError` and leaves the intent for the next
431
+ call. The proof is JSON of at most 64 KiB — the identity the recipient assigned,
432
+ not a payload. → [ADR 0200](../decisions/0200-an-effect-is-recorded-before-it-runs.md)
433
+
434
+ ### Typed MCP call metadata
435
+
436
+ Contract handlers, runtime-tool handlers/factories, lifecycle and tool hooks all
437
+ see the same optional `McpCallContext` for the current invocation:
438
+
439
+ ```ts
440
+ const sourceLabel = context.mcp?.clientInfo?.name ?? context.source
441
+
442
+ context.mcp?.era // 'modern' | 'legacy'
443
+ context.mcp?.method // validated MCP method
444
+ context.mcp?.toolName // resolved framework tool name
445
+ context.mcp?.protocolVersion // when supplied by a modern host
446
+ context.mcp?.clientInfo // { name, version } when validated
447
+ context.mcp?.outcome // multi-round attempt outcome
448
+ context.mcp?.round // multi-round attempt number
449
+ ```
450
+
451
+ The field is absent on HTTP, Agent, CLI and bring-your-own transports. A legacy
452
+ MCP call exposes `era: 'legacy'` but does not invent modern client information.
453
+ `clientInfo` is the host's self-description: use it for labels or analytics,
454
+ never for authentication, RBAC, tenant selection or rate limiting. Verified
455
+ identity still comes from `auth`; the `context(auth)` callback remains the
456
+ application-context factory and receives no protocol metadata.
457
+
458
+ ### Telling the host what a long call is doing — `ctx.reportProgress`
459
+
460
+ A tool that takes ten minutes tells a text host nothing: the call is made, and
461
+ the next thing the host shows is the answer. The protocol has a channel for
462
+ this — the host sends a `progressToken` with the call, the server relates
463
+ progress notifications to it — and a handler reaches it through
464
+ `ctx.reportProgress`:
465
+
466
+ ```ts
467
+ render: async (ctx) => {
468
+ await ctx.reportProgress?.({ message: 'queued' })
469
+ const job = await jobs.start(ctx.input)
470
+ await ctx.reportProgress?.({ message: 'rendering', progress: 1, total: 3 })
471
+ return await jobs.finish(job)
472
+ }
473
+ ```
474
+
475
+ `reportProgress` is present on every **tool** call — MCP, agent and CLI — so a
476
+ handler never branches on transport, and it does nothing wherever nobody is
477
+ listening. It is absent on the HTTP transport, which has no channel for it, so a
478
+ handler that also serves HTTP writes `ctx.reportProgress?.(…)`. It never throws and never
479
+ rejects: a message about work must not be able to kill the work it describes, so
480
+ a refused notification leaves the host exactly where a host that never asked for
481
+ progress already is.
482
+
483
+ `progress` is a number the protocol requires and a handler often does not have —
484
+ there is a stage to name and no scale to name it on. Omit it and the ordinal of
485
+ the update is sent, with no `total`, so the host shows a counter rather than a
486
+ bar stuck at 3%. That is a fact about what happened; a synthesised percentage
487
+ would be a claim nobody measured.
488
+
489
+ The framework sends nothing on its own. Progress is meaningful only where an
490
+ operation has observable stages, and manufacturing one per call would be
491
+ inventing a second transport beside the one the protocol already provides. The
492
+ one exception is the managed wait tool (`mountWait`), which already polls and
493
+ therefore already knows: when the host asked for progress it reports each poll
494
+ and the phase it last saw, which is the tool whose silence raised the question
495
+ in the first place.
496
+
497
+ The token itself is on `ctx.mcp.progressToken` when a caller wants to know
498
+ whether anyone is listening.
499
+
500
+ ### Multi-round tool input (`input_required`)
501
+
502
+ An MCP-only operation can require typed user input before its final side effect:
503
+
504
+ ```ts
505
+ const DeleteConfirmationSchema = z.object({ confirmed: z.boolean() })
506
+
507
+ deleteProject: {
508
+ method: 'DELETE',
509
+ path: '/projects/:id',
510
+ expose: ['MCP'],
511
+ input: DeleteProjectSchema,
512
+ output: DeleteProjectResultSchema,
513
+ tool: {
514
+ mcp: {
515
+ inputRequired: [
516
+ {
517
+ key: 'confirmation',
518
+ schema: DeleteConfirmationSchema,
519
+ message: 'Confirm permanent deletion',
520
+ },
521
+ {
522
+ key: 'reason',
523
+ schema: z.object({ value: z.string().min(3) }),
524
+ message: 'Record the reason',
525
+ },
526
+ ],
527
+ },
528
+ },
529
+ }
530
+ ```
531
+
532
+ Each continuation accepts exactly the currently requested item. Only after the
533
+ ordered sequence completes does the handler receive the exact aggregate as
534
+ `ctx.mcpInput.confirmation` and `ctx.mcpInput.reason`; before then the framework
535
+ returns `input_required` without calling it. Set
536
+ `multiRound.serving.maxRounds` to the maximum declaration size you accept
537
+ (default `10`); empty sequences, duplicate keys and overflow fail first. State
538
+ is bound to principal, full operation identity, current round, accepted
539
+ aggregate and canonical original-argument digest and is
540
+ expiry-checked. Tampered, expired, cross-user or cross-tool state fails before
541
+ the side effect. Output validation applies only to the final result.
542
+
543
+ Every attempt re-runs auth/lifecycle and emits its own tool hooks; audit metadata
544
+ contains the attempt's `mcp.outcome` and `mcp.round`. Stitchkit does not merge
545
+ separate HTTP attempts into one logical trace. Parallel
546
+ rounds have isolated context. HTTP/stdio modern hosts and the supported legacy
547
+ stdio bridge may use this declaration; Agent, CLI and ordinary HTTP invocation
548
+ remain single-round and unchanged. Hosts without the capability receive an
549
+ ordinary unsupported result rather than a falsely advertised round. Signed
550
+ state is tamper-resistant, not an exactly-once replay store; destructive
551
+ handlers must still be idempotent where retries matter.
552
+
553
+ #### Questions chosen from the arguments
554
+
555
+ The list above is fixed when the contract is written, which is right when the
556
+ questions belong to the operation. It is not enough when they belong to the
557
+ **arguments** — one model takes `aspect_ratio`, another `duration`, a third an
558
+ input image — and there a declared list can only be empty. `inputRequired` also
559
+ accepts a function of the parsed call:
560
+
561
+ ```ts
562
+ tool: {
563
+ mcp: {
564
+ inputRequired: async ({ input }) => {
565
+ const model = await catalog.get(input.model)
566
+ return model.needsRatio
567
+ ? [{ key: 'ratio', schema: RatioSchema, message: 'Which aspect ratio?' }]
568
+ : []
569
+ },
570
+ },
571
+ }
572
+ ```
573
+
574
+ It receives the same `params` / `input` the handler receives — parsed, so
575
+ defaults and coercions are already applied. Returning an empty array means this
576
+ call needs nothing and runs straight through. Everything else is unchanged: the
577
+ state is still signed and bound to principal, operation and argument digest, the
578
+ rounds are still counted against `maxRounds`, and a resolved list with duplicate
579
+ keys or more rounds than allowed is refused.
580
+
581
+ **The plan is fingerprinted, and that matters more than it looks.** Between two
582
+ rounds there is a full round trip to the host, and a resolver that reads
583
+ anything outside its arguments — a model catalog, a feature flag — can answer
584
+ differently the second time. Every other check would still pass: same principal,
585
+ same operation, same arguments, round still in range. Round 2's question would
586
+ be asked under round 1's key, and if the schemas happened to be compatible the
587
+ user's answer would be accepted for a question nobody asked. So the resolved
588
+ list is fingerprinted into the signed state and re-checked every round; a plan
589
+ that moved is refused, not asked. A resolver that reads only its arguments never
590
+ sees this.
591
+
592
+ **What a dynamic declaration costs.** One extra pass through the contract
593
+ pipeline per round — `lifecycle.beforeHandle` runs once more and one more
594
+ `toolPhase: 'input-round'` audit row is written. That is the price of ordering:
595
+ the resolver is your code and may reach a network, so it runs **after**
596
+ authorisation, never before, and the only thing that can authorise is a pipeline
597
+ pass. Resolving itself is free — the arguments are parsed by the same pure
598
+ function the call parses with, not by a second run of anything. A fixed list
599
+ pays none of this; its call sequence is unchanged.
600
+
601
+ One thing does change for a fixed list: the signed round state now carries a
602
+ fingerprint of the question plan, and it is checked on every round. A
603
+ conversation already in flight when you deploy this has no fingerprint in its
604
+ state and is refused once with `INVALID_REQUEST_STATE`; the host re-asks and the
605
+ retry succeeds.
606
+
607
+ ### Guarding tools — `lifecycle`
608
+
609
+ A tool call runs the same handler an HTTP request would. `lifecycle` makes it
610
+ run the same gate: a `beforeHandle` (throw to reject) and an `afterHandle`
611
+ (transform the result). Pass the **same**
612
+ [`createAuthHook`](./auth-and-errors.md#createauthhook) result used as the HTTP
613
+ server's `authorize` hook and tool calls are scope-checked by identical rules:
614
+
615
+ ```ts
616
+ createMcpHandler({ serverInfo, auth, services, lifecycle: { beforeHandle: authHook } })
617
+ ```
618
+
619
+ Without it, a tool call bypasses the HTTP `authorize` gate — the contract's
620
+ `scope` is not enforced on the MCP / agent surface. `mountMcp`, `mountAgent` and
621
+ `buildMcpServer` take `lifecycle` too.
622
+
623
+ The observability `hooks` are symmetric with the HTTP side too: `beforeToolCall`
624
+ and `afterToolCall` receive the resolved **`MethodDef`** as `endpoint` —
625
+ the tool-side twin of `afterHandle(ctx, result, endpoint)`. Read
626
+ `endpoint.serviceName` / `.key` / `.meta` directly for an audit row; you do not
627
+ need to rebuild a `toolName → identity` map:
628
+
629
+ ```ts
630
+ hooks: {
631
+ afterToolCall: ({ result, durationMs, endpoint }) => {
632
+ audit({
633
+ service: endpoint.serviceName,
634
+ action: endpoint.key,
635
+ ok: result.ok,
636
+ ms: durationMs,
637
+ })
638
+ },
639
+ }
640
+ ```
641
+
642
+ > **Tool-path identity.** A tool call has no `req`, so `createAuthHook` resolves
643
+ > identity through `resolveFromContext`, not `resolve`. Set it (read the
644
+ > identity your `auth` / `context` injected) — without it a scoped tool call
645
+ > has no identity and **fails closed**. See
646
+ > [Auth on the tool surface](./auth-and-errors.md#auth-on-the-tool-surface--resolvefromcontext).
647
+
648
+ ### MCP schema validation profile
649
+
650
+ A contract schema that JSON Schema cannot represent (a `z.date()`, a `z.map()`)
651
+ cannot become a tool. `schemaValidation.policy` decides what happens:
652
+
653
+ - `'throw'` (default) — fail the build, listing every offending tool. A static
654
+ `services` array is checked when `createMcpHandler` is constructed, so a bad
655
+ schema fails the deploy, not the first request. Better than a tool that
656
+ silently vanishes from the surface.
657
+ - `'warn'` — log through `logger` and drop the tool.
658
+ - `'skip'` — drop the tool silently.
659
+
660
+ `validateMcpSchemas({ services })` runs the same check on its own — useful in a
661
+ startup assertion or a test.
662
+
663
+ For a static `services` array, collection, schema conversion and every enabled
664
+ validation guard run once when the handler is created. Each HTTP request still
665
+ receives a fresh `McpServer`, runner, context and native registration over that
666
+ immutable prepared surface. A `services(auth)` factory
667
+ is deliberately prepared after resolving each identity because its tool set may
668
+ change by tenant.
669
+
670
+ #### Is every property actually usable by a model?
671
+
672
+ A tool schema is the only instruction a model gets about the shape of its
673
+ arguments. A property that carries a `description` and no `type` / `enum` /
674
+ `anyOf` / `$ref` tells it nothing — and nothing fails: the schema converts, the
675
+ mount succeeds, the tool is advertised, and the model then guesses, retrying the
676
+ same wrong guess because the error does not say what the right one would be.
677
+
678
+ ```ts
679
+ validateMcpSchemas({
680
+ services,
681
+ policy: 'throw',
682
+ logger,
683
+ extend,
684
+ flattenUnionInput: true,
685
+ requireTypedProperties: true,
686
+ requirePortableFormats: true,
687
+ allowFormats: [],
688
+ })
689
+ ```
690
+
691
+ For an arbitrary **JSON value**, declare `z.json()`: its recursive JSON Schema
692
+ describes strings, numbers, booleans, null, arrays and objects, so strict schema
693
+ validation needs no exception. `z.unknown()` means an unknown runtime value —
694
+ including values JSON cannot represent — and therefore gives a model no usable
695
+ shape. The guard is off by default for existing contracts. `allowUntyped` takes
696
+ dotted `tool.property` paths and is reserved for a presentation value that is
697
+ genuinely impossible to represent as JSON Schema. On `createMcpHandler`, put the policy under
698
+ `schemaValidation`; the handler supplies its real `extend` and
699
+ `flattenUnionInput`, so the check cannot vet a different document from the one
700
+ advertised.
701
+
702
+ `requirePortableFormats` rejects custom `format` values common MCP/AJV clients
703
+ do not know, such as the `cuid2` emitted by `z.cuid2()`. Use a portable
704
+ schema/pattern, or list it in `allowFormats` only when every client supports it.
705
+ stitchkit never removes or rewrites the keyword.
706
+
707
+ `findUntypedProperties(jsonSchema)` is the same walk, exported on its own if you
708
+ want to assert on a schema you built elsewhere.
709
+
710
+ ### Discriminated unions for weaker models — `flattenUnionInput`
711
+
712
+ A discriminated union in a tool's input becomes a JSON Schema `oneOf` / `anyOf`.
713
+ Capable models (Claude, Gemini, GPT) handle that; weaker / cheaper ones can drop
714
+ the field or mangle its strings. Set `flattenUnionInput: true` (on
715
+ `createMcpHandler` / `mountMcp` / `mountAgent`) to advertise each discriminated
716
+ union as a **single flat object** instead — the discriminator becomes an enum and
717
+ each variant's fields become optional with a `Required if <disc> = …` hint.
718
+
719
+ **A field several variants declare keeps its type.** Flattening puts every
720
+ variant's fields side by side, so a key two variants share has to be advertised
721
+ as one thing. Where they agree, that is what you get; where they disagree — a
722
+ `.refine()` only one of them carries, two different bounds on the same number, an
723
+ enum against a free string — the *constraint* is dropped and the **type** is not.
724
+ A field that is a number in every variant is advertised as a number, not as a
725
+ bare description. When the kinds genuinely differ, the flat projection keeps
726
+ every provable kind in a deterministic JSON Schema type array — for example
727
+ `type: ['string', 'array']` — while dropping constraints that are not sound for
728
+ all branches. Nested `oneOf` / `anyOf` values still contribute their provable
729
+ base kinds without reintroducing union keywords. Only a branch whose kind is
730
+ actually unknowable, such as a free-form schema or unresolved reference, leaves
731
+ the collision unconstrained. → ADRs [0044](../decisions/0044-a-collided-field-keeps-its-type.md)
732
+ and [0065](../decisions/0065-flat-collisions-preserve-every-known-kind.md)
733
+
734
+ It is **deep** because the projection walks the generated JSON Schema document,
735
+ including objects, arrays, tuples and schema-definition nodes. Structurally
736
+ identifiable discriminated object unions are flattened wherever they occur.
737
+ Plain unions and unions hidden behind unresolved external references remain
738
+ unions because Stitchkit cannot soundly invent a discriminator.
739
+
740
+ Use the default `flattenUnionInput: false` when the model must see the exact
741
+ relationship between a discriminator and each branch. The flat type array is a
742
+ sound set of possible JSON kinds, not a reconstruction of those correlations.
743
+
744
+ The flattened form is **lossy but never executable**. Per-variant refinements
745
+ and incompatible constraints are widened in the presentation document; the
746
+ original Zod contract enforces them exactly once inside `executeToolMethod`.
747
+ MCP and AI adapters forward the raw argument object unchanged, so defaults,
748
+ coercions and transforms cannot run before Stitchkit. Strict violations return
749
+ the normal `VALIDATION_ERROR` tool envelope and fire `beforeToolCall` /
750
+ `afterToolCall`. → [ADR 0050](../decisions/0050-presentation-schema-is-not-a-parser.md).
751
+
752
+ ## `mountMcp`
753
+
754
+ If you already run an `McpServer` from the SDK, `mountMcp` adds contract tools
755
+ to it instead of owning the lifecycle:
756
+
757
+ ```ts
758
+ import { mountMcp } from 'stitchkit/tools'
759
+
760
+ mountMcp(mcpServer, [usersService], { context: { source: 'mcp' } })
761
+ ```
762
+
763
+ `createMcpHandler` is the batteries-included path; `mountMcp` is the building
764
+ block under it.
765
+
766
+ ## MCP over stdio — `createStdioMcpServer`
767
+
768
+ `createMcpHandler` serves MCP over HTTP. `createStdioMcpServer` serves the same
769
+ contract tools over **stdio** — the server runs as a subprocess of the MCP
770
+ client (Claude Desktop, Claude Code, Cursor, Codex), on the user's machine, so
771
+ it can reach the local filesystem.
772
+
773
+ ```ts
774
+ import { bindStdioProcessSignals, createStdioMcpServer } from 'stitchkit/tools'
775
+
776
+ const stdio = await createStdioMcpServer({
777
+ serverInfo: { name: 'my-app', version: '1.0.0' },
778
+ auth: resolveIdentity(), // resolved once at startup, not per request
779
+ services: [usersService],
780
+ })
781
+
782
+ const signals = bindStdioProcessSignals(stdio, {
783
+ onClose: () => stopWorkers(),
784
+ onComplete: () => { process.exitCode = 0 },
785
+ onError: (_phase, error) => {
786
+ console.error(error) // stderr only — stdout is JSON-RPC
787
+ process.exitCode = 1
788
+ },
789
+ })
790
+
791
+ await signals.promise
792
+ ```
793
+
794
+ A stdio server is a single process serving one client, so `auth` is a value (or
795
+ a promise of one) resolved once at startup — typically from an env var — rather
796
+ than a per-request `(req) => …`. Keep all logging on **stderr**: stdout is the
797
+ JSON-RPC channel.
798
+
799
+ The default `legacy: 'serve'` negotiates the modern or supported legacy opening
800
+ through the official stdio adapter. Use `legacy: 'reject'` for a modern-only
801
+ binary. Each invocation builds a fresh server; the returned handle owns
802
+ transport shutdown.
803
+
804
+ Signal binding is explicit: `createStdioMcpServer` installs no global process
805
+ listeners by itself. The first `SIGINT`/`SIGTERM` starts exactly one official
806
+ `close()` chain. Stdio has no force primitive, so a later signal restores the
807
+ OS default disposition instead of reporting a fictional forced result.
808
+ `signals.close()` removes an idle binding; the framework never calls
809
+ `process.exit()` or chooses the exit code. See
810
+ [deployment lifecycle](./testing-and-deployment.md#stdio-process-signals).
811
+
812
+ Both transports build the server through the shared `buildMcpServer` — same
813
+ contract/runtime pipeline, same surface selection, context, hooks, raw escape
814
+ hatch and instructions.
815
+
816
+ ## OAuth 2.1 — a native remote connector
817
+
818
+ A remote MCP server is connectable from Claude (Desktop / web "custom
819
+ connector") only through the MCP authorization spec: OAuth 2.1 with PKCE, plus
820
+ the discovery documents (RFC 9728 / 8414), Client ID Metadata Documents (CIMD)
821
+ and resource indicators (RFC 8707). A Bearer-only server returns a
822
+ bare `401` and the connector never establishes.
823
+
824
+ stitchkit ships the OAuth **protocol mechanics**; the app supplies only
825
+ **identity and storage**. Three pieces wire it together:
826
+
827
+ ```ts
828
+ import { createMcpHandler, createMcpHttpRoute, mountOAuthProvider, oauthProtectedResourceRoute } from 'stitchkit/tools'
829
+ import { createServer } from 'stitchkit/server'
830
+
831
+ const resource = 'https://api.example.com/mcp'
832
+ const issuer = 'https://api.example.com'
833
+
834
+ // 1. Resource server — the 401 now points at the metadata.
835
+ const mcp = createMcpHandler({
836
+ serverInfo: { name: 'my-app', version: '1.0.0' },
837
+ auth: resolveOAuthToken, // validate the Bearer JWT (verifyJwt + audience)
838
+ services,
839
+ protectedResource: { resource, authorizationServers: [issuer] },
840
+ })
841
+
842
+ // 2. Authorization server — CIMD, /authorize (PKCE), /token.
843
+ const oauthRoutes = mountOAuthProvider({
844
+ issuer,
845
+ resource,
846
+ signingSecret: env.OAUTH_SECRET,
847
+ clientRegistration: {
848
+ preRegistered: { get: getFirstPartyClient },
849
+ // CIMD is enabled with secure defaults; DCR remains disabled.
850
+ },
851
+ codes, refreshTokens, // your stores (DB or in-memory)
852
+ authorizeUser, // → { userId, approvedScopes } | Response
853
+ })
854
+
855
+ createServer({
856
+ services,
857
+ rawRoutes: [
858
+ createMcpHttpRoute({ path: '/mcp', handler: mcp }),
859
+ oauthProtectedResourceRoute({ resource, authorizationServers: [issuer] }),
860
+ ...oauthRoutes,
861
+ ],
862
+ })
863
+ ```
864
+
865
+ Access tokens are signed HS256 JWTs (`signJwt`) whose `aud` is the resource and
866
+ whose `iss` is the issuer — validate both in `auth` with
867
+ `verifyJwt(token, secret, { audience: resource, issuer })`. `authorizeUser` is
868
+ where the app authenticates the user (reuse an existing session) and records
869
+ consent; return `{ userId, approvedScopes }`, where approved scopes are a subset
870
+ of the requested/supported values, or a `Response` to redirect the browser to a
871
+ login page first. The AS and resource server can co-locate or live
872
+ on separate origins. See
873
+ [ADR 0015](../decisions/0015-oauth-resource-server.md).
874
+
875
+ Client resolution is deterministic: exact pre-registered client, then an HTTPS
876
+ URL client id resolved as CIMD, then explicitly enabled DCR. CIMD is on by
877
+ default; DCR is off unless `clientRegistration.dcr` supplies both `register` and
878
+ `get`. A CIMD-only deployment therefore exposes neither `/register` nor a
879
+ `registration_endpoint`. The metadata document must declare a `client_id` that
880
+ exactly equals its URL, explicit redirect URIs and
881
+ `token_endpoint_auth_method: 'none'`.
882
+
883
+ The production fetcher rejects credentials, fragments, non-HTTPS URLs and
884
+ private/reserved targets. Every redirect is DNS-resolved and IP-pinned again;
885
+ timeouts, redirect count and body size are bounded. Its bounded cache respects
886
+ `Cache-Control` (including `no-store`/`no-cache`), `Age`, `Expires`, `ETag` and
887
+ `Last-Modified`, coalesces concurrent misses and reports sanitized cache events;
888
+ invalid or unavailable identity receives only a short fail-closed cache entry.
889
+
890
+ Resolution itself is rate-limited on two levels (`CimdCachePolicy`):
891
+ `maxResolutionsPerClient` (default 10) bounds ONE `client_id` per
892
+ `resolutionWindowMs` window (default 60 s) — a client whose document disables
893
+ caching burns its own budget, not the server's — while `maxResolutions`
894
+ (default 120) caps the server-wide outbound rate as the flood backstop.
895
+ Positive and negative cache entries keep separate pools of `maxEntries` each,
896
+ so a flood of unresolvable ids cannot evict warmed clients and a burst of
897
+ successes cannot reset a failing client's backoff.
898
+
899
+ ### Authorization hardening (MCP 2026-07-28)
900
+
901
+ - **`iss` on every authorization response (RFC 9207, SEP-2468).** Success *and*
902
+ error redirects carry `iss`, and the AS metadata advertises
903
+ `authorization_response_iss_parameter_supported: true`. A client that talks to
904
+ several authorization servers validates `iss` before redeeming the code, which
905
+ closes the **mix-up attack** — an attacker's server cannot pass its response
906
+ off as this issuer's. Additive on the wire: a client that ignores `iss` is
907
+ unaffected.
908
+ - **`application_type` on registration (SEP-837).** A client may declare
909
+ `"native"` (desktop / CLI) or `"web"` in its DCR body. A **native** client may
910
+ register an `http` loopback redirect (`http://127.0.0.1:…`, RFC 8252 §7.3); a
911
+ **web** client is held to `https` only — that mismatch is the usual cause of
912
+ the `redirect_uri` rejection CLI clients hit. Omit the field and registration
913
+ behaves exactly as before (loopback allowed); an unknown value is rejected
914
+ rather than silently defaulted.
915
+
916
+ > Dynamic Client Registration is an explicit interoperability mode, not the
917
+ > default. Enabling it changes public discovery and adds `/register`; keep it off
918
+ > unless a client that cannot publish CIMD requires it.
919
+
920
+ ## Proxying a remote API — `implementRemote`
921
+
922
+ `implement` binds a contract to local handlers. `implementRemote` binds it to a
923
+ remote HTTP API instead — every handler forwards the call to a deployed server
924
+ through the contract's typed client:
925
+
926
+ ```ts
927
+ import { createHttpClient } from 'stitchkit'
928
+ import { implementRemote } from 'stitchkit/remote'
929
+ import { createStdioMcpServer } from 'stitchkit/tools'
930
+
931
+ const http = createHttpClient({
932
+ baseUrl: 'https://api.example.com',
933
+ headers: () => ({ Authorization: `Bearer ${apiKey}` }),
934
+ })
935
+
936
+ const stdio = await createStdioMcpServer({
937
+ serverInfo: { name: 'my-app', version: '1.0.0' },
938
+ auth: null,
939
+ services: contracts.map((c) => implementRemote(c, http)),
940
+ })
941
+
942
+ // During graceful shutdown:
943
+ await stdio.close()
944
+ ```
945
+
946
+ This is how you ship a thin **local** MCP server for an API that already runs in
947
+ the cloud: the local process owns only the transport and any filesystem-facing
948
+ native tools, while every contract tool proxies to the remote API. One contract,
949
+ no duplicated business logic.
950
+
951
+ `implementRemote(contract, http, { transformArgs })` takes an optional
952
+ `transformArgs` hook that rewrites a call's arguments before they are forwarded
953
+ — e.g. to upload a local file referenced in the args and swap in its URL.
954
+
955
+ ## Structured output
956
+
957
+ When a contract endpoint or runtime tool declares `output`, its MCP tool
958
+ registers that exact schema as `outputSchema` and returns the validated value as
959
+ `structuredContent` alongside a JSON text block. Every JSON root type is kept
960
+ unchanged: object, array, string, number, boolean and `null`. Stitchkit does not
961
+ wrap non-object values in `{ result }`; protocol-era adaptation belongs to the
962
+ official SDK.
963
+
964
+ A tool without an output contract advertises no `outputSchema` and returns no
965
+ invented structured value. Its successful MCP result has an empty `content`
966
+ list.