stitchkit 0.104.2 → 0.105.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 (430) hide show
  1. package/CHANGELOG.md +401 -13
  2. package/darwin-native.cjs +4 -2
  3. package/dist/agent-runtime/browser-control-contract.d.ts +32 -2
  4. package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -1
  5. package/dist/agent-runtime/browser-controller.d.ts +21 -3
  6. package/dist/agent-runtime/browser-controller.d.ts.map +1 -1
  7. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  8. package/dist/agent-runtime/coding-tool-refusals.d.ts +1 -0
  9. package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
  10. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
  11. package/dist/agent-runtime/compaction.d.ts.map +1 -1
  12. package/dist/agent-runtime/contained-write.d.ts.map +1 -1
  13. package/dist/agent-runtime/control-schema.d.ts +48 -1
  14. package/dist/agent-runtime/control-schema.d.ts.map +1 -1
  15. package/dist/agent-runtime/deferred-tool-search.d.ts +3 -2
  16. package/dist/agent-runtime/deferred-tool-search.d.ts.map +1 -1
  17. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  18. package/dist/agent-runtime/harness-realtime.d.ts +34 -4
  19. package/dist/agent-runtime/harness-realtime.d.ts.map +1 -1
  20. package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -1
  21. package/dist/agent-runtime/runtime-state.d.ts.map +1 -1
  22. package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -1
  23. package/dist/agent-runtime/sandbox-process-owner.d.ts +9 -1
  24. package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -1
  25. package/dist/agent-runtime/sandbox.d.ts +32 -1
  26. package/dist/agent-runtime/sandbox.d.ts.map +1 -1
  27. package/dist/agent-runtime/schedule-records.d.ts.map +1 -1
  28. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  29. package/dist/agent-runtime/store-events.d.ts +9 -4
  30. package/dist/agent-runtime/store-events.d.ts.map +1 -1
  31. package/dist/agent-runtime/testing.d.ts.map +1 -1
  32. package/dist/application/diagnostic-journal-contract.d.ts +50 -0
  33. package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
  34. package/dist/application/diagnostic-journal-generations.d.ts +24 -0
  35. package/dist/application/diagnostic-journal-generations.d.ts.map +1 -0
  36. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
  37. package/dist/application/diagnostic-journal-open.d.ts +10 -0
  38. package/dist/application/diagnostic-journal-open.d.ts.map +1 -0
  39. package/dist/application/diagnostic-journal-quarantine.d.ts +28 -0
  40. package/dist/application/diagnostic-journal-quarantine.d.ts.map +1 -0
  41. package/dist/application/diagnostic-journal-read-contract.d.ts +73 -3
  42. package/dist/application/diagnostic-journal-read-contract.d.ts.map +1 -1
  43. package/dist/application/diagnostic-journal-reader.d.ts +17 -2
  44. package/dist/application/diagnostic-journal-reader.d.ts.map +1 -1
  45. package/dist/application/diagnostic-journal-recovery.d.ts +18 -2
  46. package/dist/application/diagnostic-journal-recovery.d.ts.map +1 -1
  47. package/dist/application/diagnostic-journal-storage.d.ts +6 -2
  48. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
  49. package/dist/application/diagnostic-journal-tail.d.ts +12 -0
  50. package/dist/application/diagnostic-journal-tail.d.ts.map +1 -0
  51. package/dist/application/diagnostic-journal.d.ts +3 -0
  52. package/dist/application/diagnostic-journal.d.ts.map +1 -1
  53. package/dist/application/directory-inbox-accept.d.ts +3 -3
  54. package/dist/application/directory-inbox-accept.d.ts.map +1 -1
  55. package/dist/application/directory-inbox-contract.d.ts +38 -10
  56. package/dist/application/directory-inbox-contract.d.ts.map +1 -1
  57. package/dist/application/directory-inbox-delivery.d.ts +3 -3
  58. package/dist/application/directory-inbox-delivery.d.ts.map +1 -1
  59. package/dist/application/directory-inbox-files.d.ts +17 -2
  60. package/dist/application/directory-inbox-files.d.ts.map +1 -1
  61. package/dist/application/directory-inbox-state.d.ts +1 -1
  62. package/dist/application/directory-inbox-state.d.ts.map +1 -1
  63. package/dist/application/directory-inbox.d.ts +1 -1
  64. package/dist/application/directory-inbox.d.ts.map +1 -1
  65. package/dist/application/file-state-store.d.ts +21 -1
  66. package/dist/application/file-state-store.d.ts.map +1 -1
  67. package/dist/application/grammy.d.ts.map +1 -1
  68. package/dist/application/kernel-contract.d.ts.map +1 -1
  69. package/dist/application/revision-signal.d.ts.map +1 -1
  70. package/dist/application/state-store.d.ts +3 -0
  71. package/dist/application/state-store.d.ts.map +1 -1
  72. package/dist/browser/api-error.d.ts +38 -0
  73. package/dist/browser/api-error.d.ts.map +1 -0
  74. package/dist/browser/chunked-upload.d.ts.map +1 -1
  75. package/dist/browser/client-executors.d.ts.map +1 -1
  76. package/dist/browser/client-url.d.ts.map +1 -1
  77. package/dist/browser/contract-stream.d.ts.map +1 -1
  78. package/dist/browser/http.d.ts +0 -25
  79. package/dist/browser/http.d.ts.map +1 -1
  80. package/dist/browser/resumable.d.ts.map +1 -1
  81. package/dist/contract/define-validation.d.ts +0 -1
  82. package/dist/contract/define-validation.d.ts.map +1 -1
  83. package/dist/contract/define.d.ts.map +1 -1
  84. package/dist/contract/errors-factory.d.ts.map +1 -1
  85. package/dist/contract/errors.d.ts +15 -18
  86. package/dist/contract/errors.d.ts.map +1 -1
  87. package/dist/contract/normalize.d.ts.map +1 -1
  88. package/dist/durability/effect.d.ts.map +1 -1
  89. package/dist/durability/scheduler.d.ts.map +1 -1
  90. package/dist/entrypoints/agent-runtime/browser.js +29 -18
  91. package/dist/entrypoints/agent-runtime/coding-tools.js +8 -7
  92. package/dist/entrypoints/agent-runtime/harness.js +15 -14
  93. package/dist/entrypoints/agent-runtime/realtime.d.ts +1 -1
  94. package/dist/entrypoints/agent-runtime/realtime.d.ts.map +1 -1
  95. package/dist/entrypoints/agent-runtime/realtime.js +119 -54
  96. package/dist/entrypoints/agent-runtime/sandbox.js +23 -17
  97. package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -3
  98. package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -3
  99. package/dist/entrypoints/agent-runtime/testing.js +8 -6
  100. package/dist/entrypoints/agent-runtime.js +37 -38
  101. package/dist/entrypoints/application/diagnostic-journal.js +305 -111
  102. package/dist/entrypoints/application/directory-inbox.js +174 -77
  103. package/dist/entrypoints/application/grammy.js +5 -2
  104. package/dist/entrypoints/application/opentelemetry.js +2 -2
  105. package/dist/entrypoints/application.d.ts +2 -2
  106. package/dist/entrypoints/application.d.ts.map +1 -1
  107. package/dist/entrypoints/application.js +17 -8
  108. package/dist/entrypoints/cli/publish.d.ts +16 -0
  109. package/dist/entrypoints/cli/publish.d.ts.map +1 -0
  110. package/dist/entrypoints/cli/publish.js +527 -0
  111. package/dist/entrypoints/cli.d.ts +1 -2
  112. package/dist/entrypoints/cli.d.ts.map +1 -1
  113. package/dist/entrypoints/cli.js +59 -966
  114. package/dist/entrypoints/contract.js +3 -3
  115. package/dist/entrypoints/files/packaging.js +161 -66
  116. package/dist/entrypoints/files.d.ts +1 -0
  117. package/dist/entrypoints/files.d.ts.map +1 -1
  118. package/dist/entrypoints/files.js +17 -10
  119. package/dist/entrypoints/index.d.ts +2 -1
  120. package/dist/entrypoints/index.d.ts.map +1 -1
  121. package/dist/entrypoints/index.js +31 -60
  122. package/dist/entrypoints/node.js +8 -8
  123. package/dist/entrypoints/observability.js +3 -3
  124. package/dist/entrypoints/primitives.js +67 -83
  125. package/dist/entrypoints/process.d.ts +1 -1
  126. package/dist/entrypoints/process.d.ts.map +1 -1
  127. package/dist/entrypoints/process.js +2 -2
  128. package/dist/entrypoints/react.js +4 -2
  129. package/dist/entrypoints/remote.js +37 -13
  130. package/dist/entrypoints/server.js +18 -16
  131. package/dist/entrypoints/telegram/screens.js +5 -3
  132. package/dist/entrypoints/telegram.js +31 -46
  133. package/dist/entrypoints/testing.d.ts +1 -1
  134. package/dist/entrypoints/testing.d.ts.map +1 -1
  135. package/dist/entrypoints/testing.js +444 -448
  136. package/dist/entrypoints/tools/connections.js +268 -105
  137. package/dist/entrypoints/tools/contract.js +2 -2
  138. package/dist/entrypoints/tools/invoker.js +8 -7
  139. package/dist/entrypoints/tools/mcp.d.ts +2 -2
  140. package/dist/entrypoints/tools/mcp.d.ts.map +1 -1
  141. package/dist/entrypoints/tools/mcp.js +10 -9
  142. package/dist/entrypoints/tools.d.ts +0 -1
  143. package/dist/entrypoints/tools.d.ts.map +1 -1
  144. package/dist/entrypoints/tools.js +118 -53
  145. package/dist/entrypoints/tracking.js +2 -3
  146. package/dist/files/boundary.d.ts +2 -2
  147. package/dist/files/boundary.d.ts.map +1 -1
  148. package/dist/files/chunk-spool.d.ts.map +1 -1
  149. package/dist/files/file-io.d.ts +2 -2
  150. package/dist/files/file-io.d.ts.map +1 -1
  151. package/dist/files/native-packaging-layout.d.ts +50 -4
  152. package/dist/files/native-packaging-layout.d.ts.map +1 -1
  153. package/dist/files/native-packaging.d.ts +78 -17
  154. package/dist/files/native-packaging.d.ts.map +1 -1
  155. package/dist/{index-r5hsgkz5.js → index-0gs4ymfj.js} +6 -3
  156. package/dist/{index-zax7resm.js → index-0gxvns6s.js} +1 -13
  157. package/dist/index-0s4xebbg.js +8 -0
  158. package/dist/{index-r4r70zmh.js → index-12zsej7b.js} +5 -2
  159. package/dist/{index-269zqj8m.js → index-1ptj98e0.js} +28 -12
  160. package/dist/{index-kemm0ej5.js → index-1pwwan01.js} +65 -22
  161. package/dist/{index-vgkbcnkc.js → index-299sm5tr.js} +1 -1
  162. package/dist/{index-2vnh05w4.js → index-2k91mewf.js} +31 -74
  163. package/dist/{index-wh0ecvyk.js → index-37asdw3a.js} +1 -1
  164. package/dist/index-3h0ztg0z.js +285 -0
  165. package/dist/{index-g95fk660.js → index-4vsby8n8.js} +8 -15
  166. package/dist/index-556g5hsh.js +17 -0
  167. package/dist/{index-f330qqyg.js → index-5c26631f.js} +244 -67
  168. package/dist/{index-adhgd4pe.js → index-5p55xreg.js} +2 -2
  169. package/dist/index-5w6t91ze.js +47 -0
  170. package/dist/{index-9pw0a51a.js → index-6yxhe58g.js} +40 -7
  171. package/dist/{index-6d9xaxw1.js → index-8ks9b85e.js} +33 -5
  172. package/dist/{index-bhb950qs.js → index-916yh4e2.js} +25 -12
  173. package/dist/index-9tqbxv5p.js +44 -0
  174. package/dist/{index-5csmzesf.js → index-azx12jgv.js} +4 -3
  175. package/dist/{index-mbnnw3f2.js → index-b0kddvzw.js} +15 -5
  176. package/dist/{index-n5yqxd3d.js → index-b0w7rbpt.js} +23 -2
  177. package/dist/index-b56nnscm.js +132 -0
  178. package/dist/{index-0ndk4555.js → index-c0hffcmj.js} +2 -2
  179. package/dist/{index-pptyv13k.js → index-c17xcx4k.js} +42 -6
  180. package/dist/index-cazts87s.js +105 -0
  181. package/dist/{index-g2j7pnak.js → index-cmzvhhtd.js} +5 -2
  182. package/dist/{index-ssmd41kh.js → index-d2h99n7d.js} +1 -1
  183. package/dist/{index-z94wht4y.js → index-dky0dcmf.js} +34 -5
  184. package/dist/index-drs41arz.js +455 -0
  185. package/dist/{index-za6j7nwy.js → index-dsnjzb62.js} +104 -51
  186. package/dist/index-eemvahkc.js +21 -0
  187. package/dist/{index-fa4wg312.js → index-f199nfq5.js} +10 -6
  188. package/dist/{index-ck71tbcf.js → index-fsw1ybf3.js} +11 -15
  189. package/dist/{index-fk18k56k.js → index-gr5g3xfw.js} +11 -18
  190. package/dist/{index-jn9g8xdt.js → index-hjvje0pf.js} +6 -4
  191. package/dist/index-j4zh647a.js +59 -0
  192. package/dist/{index-x928baz2.js → index-j9gxbztg.js} +18 -14
  193. package/dist/index-kfjkb396.js +37 -0
  194. package/dist/{index-6drst9sg.js → index-ksfagmyz.js} +45 -345
  195. package/dist/index-m616f0yz.js +120 -0
  196. package/dist/{index-fm1c1a08.js → index-m6w6jtda.js} +40 -21
  197. package/dist/{index-bakgedh8.js → index-msfpyy2f.js} +2 -4
  198. package/dist/{index-ywppsaby.js → index-n1nszyk0.js} +23 -34
  199. package/dist/{index-v14qqmys.js → index-n4689krb.js} +1 -1
  200. package/dist/{index-a0zzh8ak.js → index-pz3y6b6g.js} +3 -3
  201. package/dist/{index-43p08g7t.js → index-pzb63z66.js} +12 -8
  202. package/dist/{index-h97tqqp1.js → index-qaet40b2.js} +5 -3
  203. package/dist/{index-t1sr4aks.js → index-qaqbdm7s.js} +52 -6
  204. package/dist/{index-77nxk6ay.js → index-r393tnfp.js} +16 -10
  205. package/dist/{index-kb8styz3.js → index-rpzewktb.js} +15 -5
  206. package/dist/{index-27a2pj09.js → index-sj28htvf.js} +1 -1
  207. package/dist/{index-hbd32c6a.js → index-w8etpm8j.js} +38 -89
  208. package/dist/{index-2hyavjjj.js → index-wbhdzxar.js} +3 -3
  209. package/dist/{index-4e0ah203.js → index-wdy68sh6.js} +47 -24
  210. package/dist/{index-hp9d77wk.js → index-x7w1z6pf.js} +15 -4
  211. package/dist/{index-ptn0g0gj.js → index-y7k2cdgv.js} +21 -20
  212. package/dist/{index-20yvtn9a.js → index-yt7gyg5x.js} +1 -1
  213. package/dist/{index-cvda079a.js → index-yvfk3y36.js} +12 -2
  214. package/dist/{index-5z6jn897.js → index-z23rfxhj.js} +1 -1
  215. package/dist/internal/abort-race.d.ts +8 -2
  216. package/dist/internal/abort-race.d.ts.map +1 -1
  217. package/dist/internal/atomic-file.d.ts +55 -9
  218. package/dist/internal/atomic-file.d.ts.map +1 -1
  219. package/dist/internal/atomic-publication.d.ts +39 -4
  220. package/dist/internal/atomic-publication.d.ts.map +1 -1
  221. package/dist/internal/atomic-staging.d.ts +47 -0
  222. package/dist/internal/atomic-staging.d.ts.map +1 -0
  223. package/dist/internal/bounded-file-read.d.ts +19 -11
  224. package/dist/internal/bounded-file-read.d.ts.map +1 -1
  225. package/dist/internal/bounded-lines.d.ts.map +1 -1
  226. package/dist/internal/close-after.d.ts +11 -0
  227. package/dist/internal/close-after.d.ts.map +1 -0
  228. package/dist/internal/deadline.d.ts +10 -0
  229. package/dist/internal/deadline.d.ts.map +1 -1
  230. package/dist/internal/exclusive-lock-read.d.ts +10 -12
  231. package/dist/internal/exclusive-lock-read.d.ts.map +1 -1
  232. package/dist/internal/exclusive-lock.d.ts +2 -2
  233. package/dist/internal/exclusive-lock.d.ts.map +1 -1
  234. package/dist/internal/file-observation.d.ts +14 -0
  235. package/dist/internal/file-observation.d.ts.map +1 -0
  236. package/dist/internal/json-data.d.ts +22 -5
  237. package/dist/internal/json-data.d.ts.map +1 -1
  238. package/dist/internal/positive-integer.d.ts +9 -0
  239. package/dist/internal/positive-integer.d.ts.map +1 -0
  240. package/dist/internal/process-instance.d.ts +35 -5
  241. package/dist/internal/process-instance.d.ts.map +1 -1
  242. package/dist/internal/secure-fetch.d.ts.map +1 -1
  243. package/dist/internal/timers.d.ts +11 -0
  244. package/dist/internal/timers.d.ts.map +1 -0
  245. package/dist/internal/with-exclusive-lock.d.ts +5 -4
  246. package/dist/internal/with-exclusive-lock.d.ts.map +1 -1
  247. package/dist/observability/bounded-sink.d.ts.map +1 -1
  248. package/dist/primitives/canonical-json.d.ts +23 -2
  249. package/dist/primitives/canonical-json.d.ts.map +1 -1
  250. package/dist/primitives/delivery.d.ts.map +1 -1
  251. package/dist/primitives/index.d.ts +1 -1
  252. package/dist/primitives/index.d.ts.map +1 -1
  253. package/dist/primitives/money.d.ts.map +1 -1
  254. package/dist/process/cleanup.d.ts +7 -2
  255. package/dist/process/cleanup.d.ts.map +1 -1
  256. package/dist/process/command-lifetime.d.ts +6 -1
  257. package/dist/process/command-lifetime.d.ts.map +1 -1
  258. package/dist/process/command-owner.d.ts +1 -0
  259. package/dist/process/command-owner.d.ts.map +1 -1
  260. package/dist/process/command.d.ts +4 -0
  261. package/dist/process/command.d.ts.map +1 -1
  262. package/dist/process/contract.d.ts +68 -2
  263. package/dist/process/contract.d.ts.map +1 -1
  264. package/dist/process/group.d.ts +42 -3
  265. package/dist/process/group.d.ts.map +1 -1
  266. package/dist/process/launch.d.ts +12 -1
  267. package/dist/process/launch.d.ts.map +1 -1
  268. package/dist/process/terminate.d.ts +40 -0
  269. package/dist/process/terminate.d.ts.map +1 -0
  270. package/dist/react/query-client.d.ts.map +1 -1
  271. package/dist/realtime/rejection.d.ts.map +1 -1
  272. package/dist/server/contract-stream.d.ts.map +1 -1
  273. package/dist/server/handler-state.d.ts.map +1 -1
  274. package/dist/server/implement.d.ts.map +1 -1
  275. package/dist/server/request-body.d.ts +0 -1
  276. package/dist/server/request-body.d.ts.map +1 -1
  277. package/dist/server/unix-client.d.ts.map +1 -1
  278. package/dist/telegram/broadcast-delivery.d.ts.map +1 -1
  279. package/dist/telegram/broadcast-failure.d.ts +10 -2
  280. package/dist/telegram/broadcast-failure.d.ts.map +1 -1
  281. package/dist/telegram/operator-channel.d.ts.map +1 -1
  282. package/dist/telegram/screens/outcome.d.ts.map +1 -1
  283. package/dist/testing/surface-conformance.d.ts +1 -1
  284. package/dist/testing/surface-conformance.d.ts.map +1 -1
  285. package/dist/testing/surface-manifest.d.ts +0 -6
  286. package/dist/testing/surface-manifest.d.ts.map +1 -1
  287. package/dist/tools/agent.d.ts +1 -1
  288. package/dist/tools/agent.d.ts.map +1 -1
  289. package/dist/tools/cli/args.d.ts +1 -1
  290. package/dist/tools/cli/args.d.ts.map +1 -1
  291. package/dist/tools/cli/help.d.ts.map +1 -1
  292. package/dist/tools/cli/invoke.d.ts +2 -2
  293. package/dist/tools/cli/invoke.d.ts.map +1 -1
  294. package/dist/tools/cli/profile.d.ts.map +1 -1
  295. package/dist/tools/cli/publication-assets.d.ts.map +1 -1
  296. package/dist/tools/cli/publication-contract.d.ts +8 -0
  297. package/dist/tools/cli/publication-contract.d.ts.map +1 -1
  298. package/dist/tools/cli/publication-control.d.ts.map +1 -1
  299. package/dist/tools/cli/publication-storage.d.ts +23 -2
  300. package/dist/tools/cli/publication-storage.d.ts.map +1 -1
  301. package/dist/tools/cli/publication.d.ts +8 -1
  302. package/dist/tools/cli/publication.d.ts.map +1 -1
  303. package/dist/tools/connections/errors.d.ts +18 -6
  304. package/dist/tools/connections/errors.d.ts.map +1 -1
  305. package/dist/tools/connections/limits.d.ts +8 -2
  306. package/dist/tools/connections/limits.d.ts.map +1 -1
  307. package/dist/tools/connections/mcp-client.d.ts.map +1 -1
  308. package/dist/tools/connections/mcp-envelope.d.ts.map +1 -1
  309. package/dist/tools/connections/openapi.d.ts.map +1 -1
  310. package/dist/tools/connections/schema-budget.d.ts +1 -1
  311. package/dist/tools/connections/schema-budget.d.ts.map +1 -1
  312. package/dist/tools/connections/sse-session.d.ts.map +1 -1
  313. package/dist/tools/execute-args.d.ts.map +1 -1
  314. package/dist/tools/execute-result.d.ts.map +1 -1
  315. package/dist/tools/internal/surface-projector.d.ts +17 -3
  316. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  317. package/dist/tools/internal/tool-error-projection.d.ts +16 -0
  318. package/dist/tools/internal/tool-error-projection.d.ts.map +1 -0
  319. package/dist/tools/internal/tool-view.d.ts.map +1 -1
  320. package/dist/tools/invoker.d.ts.map +1 -1
  321. package/dist/tools/list-names.d.ts +3 -2
  322. package/dist/tools/list-names.d.ts.map +1 -1
  323. package/dist/tools/manifest.d.ts +3 -2
  324. package/dist/tools/manifest.d.ts.map +1 -1
  325. package/dist/tools/mcp/handler.d.ts +7 -0
  326. package/dist/tools/mcp/handler.d.ts.map +1 -1
  327. package/dist/tools/mcp/mount.d.ts +18 -2
  328. package/dist/tools/mcp/mount.d.ts.map +1 -1
  329. package/dist/tools/mcp/prepare.d.ts +3 -3
  330. package/dist/tools/mcp/prepare.d.ts.map +1 -1
  331. package/dist/tools/mcp/register.d.ts.map +1 -1
  332. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  333. package/dist/tools/mcp/stdio-signals.d.ts +14 -0
  334. package/dist/tools/mcp/stdio-signals.d.ts.map +1 -1
  335. package/dist/tools/mcp/stdio.d.ts +7 -0
  336. package/dist/tools/mcp/stdio.d.ts.map +1 -1
  337. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
  338. package/dist/tools/operations/async-operation-runtime-types.d.ts +3 -3
  339. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
  340. package/dist/tools/operations/define-wait-tool.d.ts +1 -1
  341. package/dist/tools/operations/define-wait-tool.d.ts.map +1 -1
  342. package/dist/tools/operations/wait-core.d.ts +0 -6
  343. package/dist/tools/operations/wait-core.d.ts.map +1 -1
  344. package/dist/tools/registry.d.ts +1 -1
  345. package/dist/tools/registry.d.ts.map +1 -1
  346. package/dist/tools/remote.d.ts +1 -1
  347. package/dist/tools/remote.d.ts.map +1 -1
  348. package/dist/tools/{runtime-tool-execution.d.ts → runtime-tool-declaration.d.ts} +32 -9
  349. package/dist/tools/runtime-tool-declaration.d.ts.map +1 -0
  350. package/dist/tools/runtime-tool-mcp.d.ts +6 -15
  351. package/dist/tools/runtime-tool-mcp.d.ts.map +1 -1
  352. package/dist/tools/runtime-tool.d.ts +14 -12
  353. package/dist/tools/runtime-tool.d.ts.map +1 -1
  354. package/dist/tools/schema/coerce.d.ts +4 -0
  355. package/dist/tools/schema/coerce.d.ts.map +1 -1
  356. package/dist/tools/schema/flatten-join.d.ts.map +1 -1
  357. package/dist/tools/surface.d.ts +7 -11
  358. package/dist/tools/surface.d.ts.map +1 -1
  359. package/dist/tools/transfer/define-download-tool.d.ts +1 -1
  360. package/dist/tools/transfer/define-download-tool.d.ts.map +1 -1
  361. package/dist/tools/transfer/define-upload-tool.d.ts +1 -1
  362. package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -1
  363. package/dist/tools/transfer/define-view-file-tool.d.ts +1 -1
  364. package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -1
  365. package/dist/tools/transfer/managed-file-error.d.ts.map +1 -1
  366. package/dist/tools/transfer/view-file-contract.d.ts.map +1 -1
  367. package/dist/tools/transfer/view-file.d.ts +1 -1
  368. package/dist/tools/transfer/view-file.d.ts.map +1 -1
  369. package/dist/tools/transports.d.ts +3 -2
  370. package/dist/tools/transports.d.ts.map +1 -1
  371. package/llms/agent-runtime-browser.txt +10 -4
  372. package/llms/agent-runtime-harness.txt +32 -31
  373. package/llms/agent-runtime-react.txt +1 -1
  374. package/llms/agent-runtime-realtime.txt +14 -5
  375. package/llms/agent-runtime-sandbox.txt +3 -11
  376. package/llms/agent-runtime.3.txt +2 -2
  377. package/llms/agent-runtime.txt +0 -9
  378. package/llms/application.2.txt +3 -12
  379. package/llms/application.3.txt +7 -4
  380. package/llms/application.txt +44 -15
  381. package/llms/cli-publish.txt +29 -0
  382. package/llms/cli.2.txt +9 -11
  383. package/llms/cli.txt +26 -14
  384. package/llms/declaration.txt +0 -9
  385. package/llms/files-packaging.txt +18 -8
  386. package/llms/files.txt +4 -2
  387. package/llms/geo.txt +0 -9
  388. package/llms/live.txt +4 -13
  389. package/llms/observability.txt +31 -5
  390. package/llms/primitives.txt +38 -20
  391. package/llms/process.txt +324 -160
  392. package/llms/react-keyboard.txt +0 -9
  393. package/llms/react.txt +0 -18
  394. package/llms/server.4.txt +1 -1
  395. package/llms/server.5.txt +1 -1
  396. package/llms/server.txt +1 -1
  397. package/llms/stitchkit.txt +6 -7
  398. package/llms/telegram-screens.txt +2 -2
  399. package/llms/testing.txt +0 -1
  400. package/llms/tools-mcp.txt +2 -3
  401. package/llms/tools.2.txt +12 -0
  402. package/llms/tools.3.txt +5 -6
  403. package/llms/tools.txt +6 -4
  404. package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
  405. package/llms/{upgrading-0.44.0-0.61.0.txt → upgrading-0.53.0-0.67.0.txt} +576 -506
  406. package/llms/{upgrading-0.62.0-0.80.0.txt → upgrading-0.68.0-0.94.0.txt} +562 -576
  407. package/llms/{upgrading-0.81.0-0.104.0.txt → upgrading-0.95.0-0.105.0.txt} +452 -567
  408. package/llms/upgrading.txt +4 -4
  409. package/llms-full.txt +1068 -412
  410. package/llms.txt +24 -24
  411. package/native-assets.json +11 -3
  412. package/package.json +6 -6
  413. package/dist/agent-runtime/harness-tools.d.ts +0 -11
  414. package/dist/agent-runtime/harness-tools.d.ts.map +0 -1
  415. package/dist/entrypoints/agent-runtime/harness-tools.d.ts +0 -2
  416. package/dist/entrypoints/agent-runtime/harness-tools.d.ts.map +0 -1
  417. package/dist/entrypoints/agent-runtime/harness-tools.js +0 -32
  418. package/dist/index-1a6jtnd9.js +0 -88
  419. package/dist/index-8a9ksm91.js +0 -95
  420. package/dist/index-a3wma1hk.js +0 -48
  421. package/dist/index-jd470k6q.js +0 -109
  422. package/dist/index-n1dqr7gf.js +0 -20
  423. package/dist/index-nggfa2yn.js +0 -34
  424. package/dist/index-s4evrmp5.js +0 -98
  425. package/dist/index-ze1eph1k.js +0 -20
  426. package/dist/tools/connections/error-projection.d.ts +0 -4
  427. package/dist/tools/connections/error-projection.d.ts.map +0 -1
  428. package/dist/tools/runtime-tool-execution.d.ts.map +0 -1
  429. package/llms/agent-runtime-harness-tools.txt +0 -25
  430. package/llms/upgrading-0.37.0-0.44.0.txt +0 -444
@@ -9,15 +9,6 @@ Contains: Guide: Keyboard layers and list zones (docs/guide/keyboard.md) · API
9
9
  # Guide: Keyboard layers and list zones (docs/guide/keyboard.md)
10
10
  ==============================================================================
11
11
 
12
- ---
13
- title: Keyboard layers and list zones
14
- description: One listener decides which part of a screen gets a key; lists move real focus with the arrows
15
- type: guide
16
- status: active
17
- created: 2026-09-29
18
- updated: 2026-09-29
19
- ---
20
-
21
12
  # Keyboard layers and list zones
22
13
 
23
14
  `stitchkit/react/keyboard` answers one question for a React screen: **who gets
package/llms/react.txt CHANGED
@@ -12,15 +12,6 @@ Also read:
12
12
  # Guide: Frontend integrations (docs/guide/frontend-integrations.md)
13
13
  ==============================================================================
14
14
 
15
- ---
16
- title: Frontend integrations
17
- description: Compose Stitchkit with Next.js, React Router or a separate Vite development server
18
- type: architecture
19
- status: active
20
- created: 2026-08-08
21
- updated: 2026-08-08
22
- ---
23
-
24
15
  # Frontend integrations
25
16
 
26
17
  The official `bun create stitchkit` application uses Next.js with a separate
@@ -81,15 +72,6 @@ shared contract remains the only transport schema source.
81
72
  # Guide: React Query policy (docs/guide/react.md)
82
73
  ==============================================================================
83
74
 
84
- ---
85
- title: React Query policy
86
- description: One request-local server client, one browser singleton and explicit retry rules for Stitchkit API errors
87
- type: guide
88
- status: active
89
- created: 2026-09-06
90
- updated: 2026-09-06
91
- ---
92
-
93
75
  # React Query policy
94
76
 
95
77
  `stitchkit/react` contains policy adapters for TanStack Query. It does not own
package/llms/server.4.txt CHANGED
@@ -684,7 +684,7 @@ whether the code declares `details`:
684
684
 
685
685
  The model-facing envelope is `{ error, retryable, details?, _hint? }`; for a code with no
686
686
  details schema the framework fills `details` with `{ message }`, so declaring a
687
- message changes what the model reads there — it used to be the code itself. Put
687
+ message changes what the model reads there; without one it is the code itself. Put
688
688
  anything the model must reliably read in `details` or `hint`, not in `message`.
689
689
 
690
690
  With no `details` schema, the options object forbids `details`. A required
package/llms/server.5.txt CHANGED
@@ -168,7 +168,7 @@ Also re-exports the error helpers from `stitchkit/contract`.
168
168
  ### Primitives
169
169
 
170
170
  | `createFileStateStore` | function | cross-process locked atomic JSON state updates over one Zod schema |
171
- | `FileStateStoreCorruption` / `FileStateStoreOptions` | _type_ | explicit corrupt-state report/policy and lock timing configuration |
171
+ | `FileStateStoreCorruption` / `FileStateStoreOptions` | _type_ | explicit corrupt-state report/policy, lock timing and the state read cap `maxBytes`; a transition whose resulting state encodes to the bytes it started from writes nothing |
172
172
  | Export | Kind | Summary |
173
173
  |--------|------|---------|
174
174
  | `streamSSE` | function | an async generator → SSE `Response` — [guide](../guide/server.md#sse-streaming) |
package/llms/server.txt CHANGED
@@ -108,7 +108,7 @@ Three boundaries worth knowing:
108
108
 
109
109
  - A field of another scope is not a compile error on access — `RuntimeContext`
110
110
  keeps its `[key: string]: unknown` index signature (transports write through
111
- it). It degrades to `unknown`, so it can no longer pose as a `string`; using it
111
+ it). It degrades to `unknown`, so it cannot pose as a `string`; using it
112
112
  in a typed position fails.
113
113
  - The map states what **your** `beforeHandle` / `createAuthHook.inject` puts on
114
114
  the context. The framework does not verify a hand-written claim (→ ADR 0075) —
@@ -68,6 +68,7 @@ own, recorded as an ADR.
68
68
  | `stitchkit/tools/invoker` | server | stable | peer-free `createToolInvoker` over the canonical contract tool runner |
69
69
  | `stitchkit/tools/connections` | server (Bun or Node) | evolving | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
70
70
  | `stitchkit/cli` | server | stable | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
71
+ | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
71
72
  | `stitchkit/remote` | browser **and** server | stable | peer-free `implementRemote` for thin HTTP proxy processes |
72
73
  | `stitchkit/process` | server (Bun or Node, POSIX) | evolving | finite native commands, byte sinks, bounded capture and process-group cancellation |
73
74
  | `stitchkit/files/packaging` | build time (Bun or Node) | evolving | installed native asset graph, integrity and Bun packaging plugin; no runtime install policy |
@@ -82,25 +83,24 @@ own, recorded as an ADR.
82
83
  | `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
83
84
  | `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
84
85
  | `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
85
- | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 49 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
86
+ | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 50 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
86
87
  | `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, plus the managed-resource conformance kit |
87
88
  | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
88
89
  | `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
89
90
  | `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
90
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 22 of the 49 minors since 0.56.2, most recently 0.97.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
91
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 23 of the 50 minors since 0.56.2, most recently 0.105.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
91
92
  | `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
92
93
  | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
93
94
  | `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
94
95
  | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
95
96
  | `stitchkit/agent-runtime/openrouter` | server | evolving | isolated OpenRouter language-model adapter |
96
97
  | `stitchkit/agent-runtime/browser` | browser + server | evolving | canonical agent records, events, reconnect cursor and optional conversation controller |
97
- | `stitchkit/agent-runtime/harness-tools` | server | evolving | full mountAgent configuration with the current run fence |
98
- | `stitchkit/agent-runtime/react` | browser + server | evolving | React subscription to an application-owned agent controller |
99
- | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving | authorized agent control over the existing Socket.IO server |
98
+ | `stitchkit/agent-runtime/react` | browser + server | evolving, experimental: no committed consumer | React subscription to an application-owned agent controller |
99
+ | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving, experimental: no committed consumer | authorized agent control over the existing Socket.IO server |
100
100
  | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
101
101
  | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
102
102
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
103
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 12 of the 49 minors since 0.56.2, most recently 0.104.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
103
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 13 of the 50 minors since 0.56.2, most recently 0.105.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
104
104
  | `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
105
105
  | `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
106
106
  | `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
@@ -206,7 +206,6 @@ map — feature → packages:
206
206
  | MCP / agent adapters (`stitchkit/tools`) | `@modelcontextprotocol/server` `ai` |
207
207
  | Agent application runtime (`stitchkit/agent-runtime`) | `ai` |
208
208
  | Headless Agent harness (`stitchkit/agent-runtime/harness`) | `ai` |
209
- | Harness tools (`stitchkit/agent-runtime/harness-tools`) | `ai` `@modelcontextprotocol/server` (tool declarations) |
210
209
  | Agent coding tools (`stitchkit/agent-runtime/coding-tools`) | — |
211
210
  | OpenRouter runtime adapter (`stitchkit/agent-runtime/openrouter`) | `ai` `@openrouter/ai-sdk-provider` |
212
211
  | SQLite agent store (`stitchkit/agent-runtime/sqlite/bun` or `/node`) | — (runtime built-in) |
@@ -215,8 +215,8 @@ the press was forged (a client can send any bytes) and goes to `onStale`.
215
215
 
216
216
  A press on a message the record does not know — an older menu higher up — is
217
217
  answered in place: a one-message view takes that message over, a longer view is
218
- sent below it and the pressed message is deleted. Either way the previously
219
- recorded view is removed: one live menu per chat.
218
+ sent below it and the pressed message is deleted. Either way the recorded
219
+ view is removed: one live menu per chat.
220
220
 
221
221
  For a message the screens do not own — a notification from the backend —
222
222
  `screens.button(link('🔑 Refresh token', refreshToken, { botId }))` makes a
package/llms/testing.txt CHANGED
@@ -671,6 +671,5 @@ handler pipeline without opening a TCP port.
671
671
  | `McpSchemaValidationConfig` / `IncompatibleSchemaPolicy` | _type_ | canonical MCP schema-preparation policy used by real mounts and manifests |
672
672
  | `SurfaceRealtimeSchemaPairSchema` | schema | input/output digest pair for args or acknowledgements |
673
673
  | `SurfaceSchemaDigestsSchema` | schema | params/input/output/multipart digest object |
674
- | `serializeSurfaceValue` | function | canonical versioned serialization used for deterministic digests |
675
674
 
676
675
  ---
@@ -23,7 +23,6 @@ behavior and names. See [MCP guide](../guide/mcp-and-agents.md#mcp--createmcphan
23
23
  |--------|------|---------|
24
24
  | `createMcpHandler` / `createMcpHttpRoute` / `buildMcpServer` / `mountMcp` | function | the shared authenticated HTTP handler, raw-route adapter, SDK server and contract mount |
25
25
  | `createStdioMcpServer` / `bindStdioProcessSignals` | function | the shared stdio server and bounded process cleanup |
26
- | `RuntimeMcpToolDefinitionWithOutput` | _type_ | schema-aware MCP-only construction with concrete handler output and presenter input |
27
- | `RuntimeMcpToolDefinition` | _type_ | heterogeneous MCP registration; the canonical runner validates input/output before invocation |
26
+ | `RuntimeToolDefinitionWithOutput` / `RuntimeToolDefinitionWithoutOutput` | _type_ | the one neutral construction, shared with `stitchkit/cli` and `stitchkit/tools`; MCP-only presenters are its fourth type argument, `RuntimeMcpToolPresenters<z.output<typeof output>>` |
27
+ | `RuntimeToolDefinition` | _type_ | heterogeneous registration; the canonical runner validates input/output before invocation |
28
28
  | `RuntimeMcpToolPresenters` / `RuntimeMcpPresentation` | _type_ | official SDK content without framework-owned `structuredContent` or `isError`; one presenter owner shared with the full SDK surface |
29
- | `RuntimeToolDefinitionWithoutOutput` | _type_ | the shared neutral void definition |
package/llms/tools.2.txt CHANGED
@@ -59,6 +59,18 @@ An explicit `AppError.retryable` boolean also survives this remote hop. `false`
59
59
  `true` on409 remain the application's recommendation through HTTP, CLI, MCP and AI tools.
60
60
  Absent metadata keeps the previous defaults and does not alter HTTP transport retries.
61
61
 
62
+ A remote failure that carries no stitchkit error envelope — an HTML `503` from a proxy
63
+ during a deploy, a `429` from a rate limiter, a `404` page, a refused connection — keeps
64
+ what the caller can act on and drops what it must not see. A response with a status
65
+ becomes `HTTP_ERROR` with that status and a fixed message; a failure with no response
66
+ becomes `CONNECTION_REQUEST_FAILED` (`502`). Neither carries `details`: the upstream
67
+ body, URL and credentials stay in the raw cause that `onToolError` and `AgentToolError.cause`
68
+ expose in-process. One rule decides `retryable` for every origin: the declared value wins,
69
+ otherwise the status decides (`408`, `429`, `502`, `503`, `504` are retryable, as for any
70
+ local tool). A call the caller cancelled (`REQUEST_ABORTED`) declares `retryable: false`;
71
+ a deadline the remote client hit (`REQUEST_TIMEOUT`, `408`) follows the status like a
72
+ `408` from a local handler.
73
+
62
74
  ## Structured output
63
75
 
64
76
  When a contract endpoint or runtime tool declares `output`, its MCP tool
package/llms/tools.3.txt CHANGED
@@ -65,10 +65,10 @@ payload.
65
65
  | `McpMountConfig` | _type_ | config for `mountMcp` |
66
66
  | `McpSchemaValidationConfig` | _type_ | shared `{ policy, requireTypedProperties, allowUntyped, requirePortableFormats, allowFormats }` profile |
67
67
  | `ValidateMcpSchemasConfig` | _type_ | standalone validation profile plus `services`, `extend`, flattening and logger |
68
- | `RuntimeToolDefinition` | _type_ | transport-neutral pathless operation with identity, schemas, handler and optional presenters |
68
+ | `RuntimeToolDefinition` | _type_ | heterogeneous registration of pathless operations in `runtimeTools: [...]`; an inline handler is contextually typed by the parsed object, a definition constructed with its own schema registers unchanged, and the runner validates input before the handler |
69
69
  | `RuntimeToolDefinitionBase` | _type_ | common name, identity, input, exposure and MCP metadata fields |
70
- | `RuntimeToolDefinitionWithOutput` | _type_ | runtime definition whose handler and presenters share a validated output type |
71
- | `RuntimeToolDefinitionWithoutOutput` | _type_ | runtime definition with a void handler and no presentation callbacks |
70
+ | `RuntimeToolDefinitionWithOutput` | _type_ | the one neutral construction: identity, schemas and a handler typed from them; the fourth type argument names the adapter's `present` extension (`RuntimeToolPresenters<…>` here, `RuntimeMcpToolPresenters<…>` on `stitchkit/tools/mcp`, none by default) |
71
+ | `RuntimeToolDefinitionWithoutOutput` | _type_ | the same construction with a void handler and no presentation callbacks |
72
72
  | `RuntimeToolFactory` | _type_ | identity/context-bound runtime-tool definition factory |
73
73
  | `RuntimeToolFactoryConfig` | _type_ | factory service identity and context schema |
74
74
  | `RuntimeToolFactoryDefinitionWithOutput` | _type_ | factory-authored runtime tool with a validated output schema |
@@ -277,10 +277,9 @@ Advanced building blocks — the shared machinery the mounts are built on.
277
277
  | `ToolCallRecord` | _type_ | the structured record `createToolLogger` passes to `onRecord` |
278
278
  | `TransportSummary` | _type_ | `{ contractServices, runtimeTools, totals, sources }` from `summarizeTransports` |
279
279
  | `TransportCounts` | _type_ | per-transport counts (`{ HTTP, MCP, AGENT, CLI }`) |
280
- | `ToolSurfaceDefinition` | _type_ | shared object-shaped `{ services?, runtimeTools? }` introspection surface |
281
- | `ToolSurfaceProjection` | _type_ | one readonly services/runtime container shared by full and MCP-only surfaces; executable mounts specialize the runtime definition without pulling in another adapter's peers |
280
+ | `ToolSurfaceProjection` | _type_ | the one readonly `{ services?, runtimeTools? }` container shared by full, MCP-only and introspection surfaces (`buildToolManifest`, `listToolNames`, `summarizeTransports` take `ToolSurfaceProjection<RuntimeToolDefinition>`) |
282
281
  | `ToolManifestConfig` | _type_ | mixed surface plus required model-facing `transport` and presentation options |
283
- | `coerceJsonArgs` | function | coerce JSON-stringified array/object tool arguments |
282
+ | `coerceJsonArgs` | function | coerce JSON-stringified array/object tool arguments; throws a `ZodError` naming the field when a union that keeps a string member receives a string that parses to an array its array member accepts |
284
283
  | `flattenToolJsonSchema` | function | project structurally identifiable discriminated unions into conservative object joins; scalar collisions retain provable types, object/array collisions retain structural alternatives, and field descriptions retain discriminator labels plus availability/requiredness hints; the projection never executes validation |
285
284
  | `ToolPresentationSchema` | _type_ | immutable model-facing JSON Schema document shared by tool transports |
286
285
  | `MountableTool` | _type_ | one operation with separate executable CLI argument schema and model-facing presentation schema |
package/llms/tools.txt CHANGED
@@ -749,15 +749,17 @@ For example, an optional object `value` in `single` and a required array `value`
749
749
  in `group` advertise:
750
750
 
751
751
  ```text
752
- When kind = group: Two to ten references.
753
752
  When kind = single: One reference.
754
- Available if kind = group | single. Required if kind = group
753
+ When kind = group: Two to ten references.
754
+ Available if kind = single | group. Required if kind = group
755
755
  ```
756
756
 
757
757
  A third branch without `value` is absent from those labels. The object and array
758
758
  retain their separate shapes; the array's minimum length does not apply to the object.
759
- Discriminator values, branch explanation labels and joined property order are
760
- deterministic under branch reordering. → ADR [0221](../decisions/0221-flat-field-explanations-retain-branch-meaning.md).
759
+ Discriminator values, branch explanation labels, enum values and joined
760
+ properties keep the order of their first appearance across the variants, so the
761
+ order you declare is the order the model reads. Alternatives of different kinds
762
+ keep one canonical order, so one declaration always yields one document. → ADR [0221](../decisions/0221-flat-field-explanations-retain-branch-meaning.md).
761
763
 
762
764
  **A field several variants declare keeps its type.** Flattening puts every
763
765
  variant's fields side by side, so a key two variants share has to be advertised