stitchkit 0.135.0 → 0.136.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/README.md +25 -11
  3. package/dist/agent-executor/acp/v1-session-build.d.ts +51 -0
  4. package/dist/agent-executor/acp/v1-session-build.d.ts.map +1 -0
  5. package/dist/agent-executor/acp/v1-session.d.ts +1 -1
  6. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  7. package/dist/agent-executor/claude/classify.d.ts +1 -1
  8. package/dist/agent-executor/claude/classify.d.ts.map +1 -1
  9. package/dist/agent-executor/claude/events-wire.d.ts +13 -0
  10. package/dist/agent-executor/claude/events-wire.d.ts.map +1 -0
  11. package/dist/agent-executor/claude/events.d.ts +1 -11
  12. package/dist/agent-executor/claude/events.d.ts.map +1 -1
  13. package/dist/agent-executor/codex/protocol.d.ts +0 -143
  14. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  15. package/dist/agent-executor/codex/request-answers.d.ts +1 -1
  16. package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
  17. package/dist/agent-executor/codex/server-requests.d.ts +150 -0
  18. package/dist/agent-executor/codex/server-requests.d.ts.map +1 -0
  19. package/dist/agent-executor/image-input.d.ts +10 -3
  20. package/dist/agent-executor/image-input.d.ts.map +1 -1
  21. package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -1
  22. package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
  23. package/dist/agent-runtime/browser/browser-control-contract.d.ts +4 -0
  24. package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
  25. package/dist/agent-runtime/browser/control-schema.d.ts +4 -0
  26. package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -1
  27. package/dist/agent-runtime/browser/control-view.d.ts.map +1 -1
  28. package/dist/agent-runtime/event-schema.d.ts +16 -3
  29. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  30. package/dist/agent-runtime/loop/deferred-tools.d.ts.map +1 -1
  31. package/dist/agent-runtime/loop/invocation-payload.d.ts.map +1 -1
  32. package/dist/agent-runtime/loop/invocation-stream.d.ts +9 -1
  33. package/dist/agent-runtime/loop/invocation-stream.d.ts.map +1 -1
  34. package/dist/agent-runtime/loop/provider-stream-parts.d.ts +6 -0
  35. package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -1
  36. package/dist/agent-runtime/loop/provider-stream-segments.d.ts +1 -1
  37. package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -1
  38. package/dist/agent-runtime/loop/run-acquisition.d.ts.map +1 -1
  39. package/dist/agent-runtime/loop/run-approval-signature.d.ts +34 -0
  40. package/dist/agent-runtime/loop/run-approval-signature.d.ts.map +1 -0
  41. package/dist/agent-runtime/loop/run-approval.d.ts +0 -28
  42. package/dist/agent-runtime/loop/run-approval.d.ts.map +1 -1
  43. package/dist/agent-runtime/loop/run-complete-port.d.ts +24 -0
  44. package/dist/agent-runtime/loop/run-complete-port.d.ts.map +1 -0
  45. package/dist/agent-runtime/loop/run-complete-stream.d.ts +7 -2
  46. package/dist/agent-runtime/loop/run-complete-stream.d.ts.map +1 -1
  47. package/dist/agent-runtime/loop/run-complete-types.d.ts +14 -1
  48. package/dist/agent-runtime/loop/run-complete-types.d.ts.map +1 -1
  49. package/dist/agent-runtime/loop/run-complete.d.ts +2 -2
  50. package/dist/agent-runtime/loop/run-complete.d.ts.map +1 -1
  51. package/dist/agent-runtime/loop/run-execution-state.d.ts +8 -0
  52. package/dist/agent-runtime/loop/run-execution-state.d.ts.map +1 -1
  53. package/dist/agent-runtime/loop/run-model-call.d.ts +44 -0
  54. package/dist/agent-runtime/loop/run-model-call.d.ts.map +1 -0
  55. package/dist/agent-runtime/loop/run-model-step.d.ts +25 -28
  56. package/dist/agent-runtime/loop/run-model-step.d.ts.map +1 -1
  57. package/dist/agent-runtime/loop/run-model-steps.d.ts +6 -0
  58. package/dist/agent-runtime/loop/run-model-steps.d.ts.map +1 -0
  59. package/dist/agent-runtime/loop/run-model-stream.d.ts +3 -1
  60. package/dist/agent-runtime/loop/run-model-stream.d.ts.map +1 -1
  61. package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts +0 -2
  62. package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts.map +1 -1
  63. package/dist/agent-runtime/loop/run-step-loop.d.ts +19 -0
  64. package/dist/agent-runtime/loop/run-step-loop.d.ts.map +1 -0
  65. package/dist/agent-runtime/loop/run-step-port.d.ts +175 -0
  66. package/dist/agent-runtime/loop/run-step-port.d.ts.map +1 -0
  67. package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -1
  68. package/dist/agent-runtime/loop/run-stream-step-text.d.ts.map +1 -1
  69. package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts +2 -1
  70. package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts.map +1 -1
  71. package/dist/agent-runtime/loop/run-tool-call-input.d.ts +39 -0
  72. package/dist/agent-runtime/loop/run-tool-call-input.d.ts.map +1 -0
  73. package/dist/agent-runtime/loop/run-tool-call.d.ts +2 -31
  74. package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -1
  75. package/dist/agent-runtime/loop/run-tool-errors.d.ts +5 -0
  76. package/dist/agent-runtime/loop/run-tool-errors.d.ts.map +1 -1
  77. package/dist/agent-runtime/loop/run-tool-executor.d.ts +1 -1
  78. package/dist/agent-runtime/loop/run-tool-executor.d.ts.map +1 -1
  79. package/dist/agent-runtime/loop/run-tool-slots.d.ts +2 -1
  80. package/dist/agent-runtime/loop/run-tool-slots.d.ts.map +1 -1
  81. package/dist/agent-runtime/loop/runtime-state.d.ts.map +1 -1
  82. package/dist/agent-runtime/loop/runtime.d.ts +0 -5
  83. package/dist/agent-runtime/loop/runtime.d.ts.map +1 -1
  84. package/dist/agent-runtime/providers/ai-sdk-convert.d.ts +1 -5
  85. package/dist/agent-runtime/providers/ai-sdk-convert.d.ts.map +1 -1
  86. package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts +11 -0
  87. package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts.map +1 -0
  88. package/dist/agent-runtime/providers/ai-sdk-tools.d.ts +11 -0
  89. package/dist/agent-runtime/providers/ai-sdk-tools.d.ts.map +1 -0
  90. package/dist/agent-runtime/providers/ai-sdk.d.ts +1 -9
  91. package/dist/agent-runtime/providers/ai-sdk.d.ts.map +1 -1
  92. package/dist/agent-runtime/providers/anthropic-sse.d.ts.map +1 -1
  93. package/dist/agent-runtime/providers/openrouter-admission.d.ts.map +1 -1
  94. package/dist/agent-runtime/providers/openrouter-audio.d.ts +164 -0
  95. package/dist/agent-runtime/providers/openrouter-audio.d.ts.map +1 -0
  96. package/dist/agent-runtime/providers/openrouter-catalog-cache.d.ts.map +1 -1
  97. package/dist/agent-runtime/providers/openrouter-catalog-query.d.ts.map +1 -1
  98. package/dist/agent-runtime/providers/openrouter-catalog.d.ts +4 -2
  99. package/dist/agent-runtime/providers/openrouter-catalog.d.ts.map +1 -1
  100. package/dist/agent-runtime/providers/openrouter-client.d.ts +37 -0
  101. package/dist/agent-runtime/providers/openrouter-client.d.ts.map +1 -0
  102. package/dist/agent-runtime/providers/openrouter-http.d.ts +120 -0
  103. package/dist/agent-runtime/providers/openrouter-http.d.ts.map +1 -0
  104. package/dist/agent-runtime/providers/openrouter-media.d.ts +174 -0
  105. package/dist/agent-runtime/providers/openrouter-media.d.ts.map +1 -0
  106. package/dist/agent-runtime/providers/openrouter-models.d.ts +2 -23
  107. package/dist/agent-runtime/providers/openrouter-models.d.ts.map +1 -1
  108. package/dist/agent-runtime/providers/openrouter-options.d.ts +4 -0
  109. package/dist/agent-runtime/providers/openrouter-options.d.ts.map +1 -1
  110. package/dist/agent-runtime/providers/openrouter-request.d.ts +23 -0
  111. package/dist/agent-runtime/providers/openrouter-request.d.ts.map +1 -0
  112. package/dist/agent-runtime/providers/openrouter-response.d.ts.map +1 -1
  113. package/dist/agent-runtime/providers/openrouter-retrieval.d.ts +145 -0
  114. package/dist/agent-runtime/providers/openrouter-retrieval.d.ts.map +1 -0
  115. package/dist/agent-runtime/providers/openrouter-speech.d.ts +90 -0
  116. package/dist/agent-runtime/providers/openrouter-speech.d.ts.map +1 -0
  117. package/dist/agent-runtime/providers/openrouter-spend.d.ts +7 -3
  118. package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -1
  119. package/dist/agent-runtime/providers/openrouter-stream.d.ts +29 -0
  120. package/dist/agent-runtime/providers/openrouter-stream.d.ts.map +1 -0
  121. package/dist/agent-runtime/providers/openrouter-systemone.d.ts +137 -0
  122. package/dist/agent-runtime/providers/openrouter-systemone.d.ts.map +1 -0
  123. package/dist/agent-runtime/providers/openrouter-url.d.ts +19 -0
  124. package/dist/agent-runtime/providers/openrouter-url.d.ts.map +1 -0
  125. package/dist/agent-runtime/providers/openrouter-wire.d.ts +45 -0
  126. package/dist/agent-runtime/providers/openrouter-wire.d.ts.map +1 -0
  127. package/dist/agent-runtime/providers/openrouter.d.ts +5 -4
  128. package/dist/agent-runtime/providers/openrouter.d.ts.map +1 -1
  129. package/dist/agent-runtime/providers/provider-http.d.ts +29 -3
  130. package/dist/agent-runtime/providers/provider-http.d.ts.map +1 -1
  131. package/dist/agent-runtime/providers/provider-json-schema-strip.d.ts.map +1 -1
  132. package/dist/agent-runtime/providers/provider-json-schema.d.ts.map +1 -1
  133. package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts.map +1 -1
  134. package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts +42 -0
  135. package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts.map +1 -0
  136. package/dist/agent-runtime/providers/provider-usage.d.ts +9 -0
  137. package/dist/agent-runtime/providers/provider-usage.d.ts.map +1 -1
  138. package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts +9 -0
  139. package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts.map +1 -1
  140. package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts +6 -0
  141. package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts.map +1 -1
  142. package/dist/agent-runtime/sandbox/sandbox-contract.d.ts.map +1 -1
  143. package/dist/agent-runtime/sandbox/sandbox-process-linux.d.ts.map +1 -1
  144. package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts +5 -1
  145. package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts.map +1 -1
  146. package/dist/agent-runtime/sandbox/sandbox-process-wrapper.d.ts.map +1 -1
  147. package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
  148. package/dist/agent-runtime/stores/sql-rows.d.ts +10 -10
  149. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  150. package/dist/agent-runtime/testing/fault-bench.d.ts +5 -1
  151. package/dist/agent-runtime/testing/fault-bench.d.ts.map +1 -1
  152. package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
  153. package/dist/browser/client-executors.d.ts.map +1 -1
  154. package/dist/browser/client-url.d.ts.map +1 -1
  155. package/dist/contract/define.d.ts +3 -7
  156. package/dist/contract/define.d.ts.map +1 -1
  157. package/dist/contract/normalize.d.ts +17 -5
  158. package/dist/contract/normalize.d.ts.map +1 -1
  159. package/dist/entrypoints/agent-executor/acp.js +4 -2
  160. package/dist/entrypoints/agent-executor/claude-sdk.js +20 -20
  161. package/dist/entrypoints/agent-executor/claude.js +7 -7
  162. package/dist/entrypoints/agent-executor/codex.d.ts +2 -1
  163. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  164. package/dist/entrypoints/agent-executor/codex.js +129 -35
  165. package/dist/entrypoints/agent-executor/testing/claude-sdk.js +2 -2
  166. package/dist/entrypoints/agent-executor/testing.js +17 -13
  167. package/dist/entrypoints/agent-executor.js +1 -1
  168. package/dist/entrypoints/agent-runtime/ai-sdk.d.ts +2 -1
  169. package/dist/entrypoints/agent-runtime/ai-sdk.d.ts.map +1 -1
  170. package/dist/entrypoints/agent-runtime/ai-sdk.js +10 -12
  171. package/dist/entrypoints/agent-runtime/anthropic.js +13 -10
  172. package/dist/entrypoints/agent-runtime/browser.js +8 -4
  173. package/dist/entrypoints/agent-runtime/harness.js +18 -19
  174. package/dist/entrypoints/agent-runtime/openai.js +5 -5
  175. package/dist/entrypoints/agent-runtime/openrouter.d.ts +11 -2
  176. package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
  177. package/dist/entrypoints/agent-runtime/openrouter.js +1940 -496
  178. package/dist/entrypoints/agent-runtime/postgres.js +2 -2
  179. package/dist/entrypoints/agent-runtime/realtime.js +5 -5
  180. package/dist/entrypoints/agent-runtime/sandbox.js +167 -139
  181. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  182. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  183. package/dist/entrypoints/agent-runtime/testing.js +3 -3
  184. package/dist/entrypoints/agent-runtime.js +246 -360
  185. package/dist/entrypoints/application.js +2 -2
  186. package/dist/entrypoints/cli.js +36 -15
  187. package/dist/entrypoints/contract.js +12 -10
  188. package/dist/entrypoints/geo.js +1 -1
  189. package/dist/entrypoints/handler.js +5 -6
  190. package/dist/entrypoints/http.d.ts +2 -0
  191. package/dist/entrypoints/http.d.ts.map +1 -1
  192. package/dist/entrypoints/http.js +16 -4
  193. package/dist/entrypoints/index.js +26 -35
  194. package/dist/entrypoints/live.js +3 -3
  195. package/dist/entrypoints/node.js +7 -7
  196. package/dist/entrypoints/observability.js +9 -7
  197. package/dist/entrypoints/process.js +3 -3
  198. package/dist/entrypoints/remote.js +5 -5
  199. package/dist/entrypoints/server.js +29 -16
  200. package/dist/entrypoints/telegram/grammy.d.ts +1 -1
  201. package/dist/entrypoints/telegram/grammy.d.ts.map +1 -1
  202. package/dist/entrypoints/telegram/grammy.js +39 -5
  203. package/dist/entrypoints/telegram/screens.js +3 -0
  204. package/dist/entrypoints/telegram.d.ts +1 -1
  205. package/dist/entrypoints/telegram.d.ts.map +1 -1
  206. package/dist/entrypoints/telegram.js +19 -6
  207. package/dist/entrypoints/testing.js +10 -11
  208. package/dist/entrypoints/tools/agent.js +8 -9
  209. package/dist/entrypoints/tools/connections.js +27 -57
  210. package/dist/entrypoints/tools/contract.js +4 -4
  211. package/dist/entrypoints/tools/invoker.js +7 -8
  212. package/dist/entrypoints/tools/mcp.js +9 -10
  213. package/dist/entrypoints/tools/toolkit.js +11 -12
  214. package/dist/entrypoints/tools.js +20 -20
  215. package/dist/entrypoints/tracking/contract.js +1 -1
  216. package/dist/entrypoints/tracking/performance.js +1 -1
  217. package/dist/entrypoints/tracking.js +1 -1
  218. package/dist/{index-3czc3ykr.js → index-08a3qfr8.js} +1 -1
  219. package/dist/{index-grhhsrd5.js → index-1en7k3q5.js} +2 -1
  220. package/dist/{index-pdcbjd6a.js → index-1yky29qg.js} +6 -3
  221. package/dist/{index-b4c9dpzm.js → index-252den5a.js} +10 -11
  222. package/dist/{index-xtby8rj3.js → index-28kbdn63.js} +5 -47
  223. package/dist/{index-57sbckhv.js → index-36mtj8xm.js} +2 -2
  224. package/dist/{index-dm84tsd5.js → index-3kb8dw48.js} +1 -1
  225. package/dist/index-3tb82xr7.js +11 -0
  226. package/dist/{index-c24bj2r1.js → index-4243301z.js} +2 -2
  227. package/dist/{index-nr4fhfn4.js → index-4p2zx593.js} +2 -0
  228. package/dist/{index-q86qnzzf.js → index-54wp467c.js} +4 -4
  229. package/dist/{index-mcv7b2n0.js → index-63ctzjp4.js} +497 -495
  230. package/dist/{index-y0a4gt1s.js → index-65p8v81y.js} +3 -2
  231. package/dist/{index-z72vazf5.js → index-6y3eae97.js} +27 -83
  232. package/dist/{index-5awtbyns.js → index-9vj869rx.js} +1 -1
  233. package/dist/{index-5q0qpw3v.js → index-aqm7e864.js} +23 -8
  234. package/dist/{index-d4at0q09.js → index-b9mj31q7.js} +90 -88
  235. package/dist/{index-baba8ehy.js → index-bjrcbcn2.js} +2 -2
  236. package/dist/{index-fsw9wxk9.js → index-c9j8441q.js} +1 -103
  237. package/dist/{index-wdb5jhas.js → index-d1pdv8qc.js} +1 -1
  238. package/dist/{index-73wq9abg.js → index-df5xr2f9.js} +13 -59
  239. package/dist/{index-n9358ydy.js → index-dm50x3by.js} +1 -1
  240. package/dist/{index-zyyerdny.js → index-dmrx8xma.js} +3 -0
  241. package/dist/{index-78da4g74.js → index-dwq6a6sq.js} +17 -13
  242. package/dist/{index-9be3tf6r.js → index-e413q2cj.js} +49 -22
  243. package/dist/{index-g4gstmp1.js → index-ednf2cxs.js} +1 -1
  244. package/dist/{index-84tp547a.js → index-edpkm3k7.js} +29 -97
  245. package/dist/{index-gs0jw0hy.js → index-efbzm2se.js} +3 -3
  246. package/dist/{index-de7b0kvz.js → index-epwvp88y.js} +1 -1
  247. package/dist/{index-asnd4h2k.js → index-f0dzyskg.js} +27 -4
  248. package/dist/{index-xbb8ysmq.js → index-fatke81t.js} +2 -2
  249. package/dist/{index-6nzzj7qr.js → index-gq35s3bm.js} +1 -1
  250. package/dist/index-gvgtmt7a.js +102 -0
  251. package/dist/{index-m2b49tvc.js → index-h08xqfw9.js} +20 -21
  252. package/dist/{index-gk6dq9ay.js → index-ha1tv70k.js} +3 -26
  253. package/dist/{index-wsv11dhg.js → index-hberxns4.js} +1 -1
  254. package/dist/{index-rkphknhx.js → index-hpzhz1vm.js} +1 -1
  255. package/dist/{index-npfdymav.js → index-j5vzhj3d.js} +1 -1
  256. package/dist/{index-d3s070eh.js → index-jperyn0c.js} +1 -1
  257. package/dist/{index-yhwx4fwk.js → index-kzsetgh9.js} +1 -1
  258. package/dist/{index-x6sp5vpa.js → index-q4tr9vnf.js} +1 -1
  259. package/dist/{index-hce3hbdg.js → index-qj0sq69b.js} +6 -2
  260. package/dist/{index-v0j22shs.js → index-rg08syp1.js} +9 -6
  261. package/dist/{index-8vzh5wpv.js → index-rw1caff2.js} +14 -26
  262. package/dist/index-s8af9jqw.js +6 -0
  263. package/dist/{index-bgj9hbm3.js → index-sdppfbrh.js} +30 -16
  264. package/dist/{index-y0mwkgkf.js → index-shte29pg.js} +1086 -1055
  265. package/dist/{index-fec05c9k.js → index-ta0e2daw.js} +9 -7
  266. package/dist/{index-zfrysr1e.js → index-tb36xawm.js} +110 -75
  267. package/dist/{index-c0yym4a0.js → index-w7e402wx.js} +11 -105
  268. package/dist/{index-bvpevwt6.js → index-xnqab06h.js} +207 -202
  269. package/dist/index-xrbrvn15.js +147 -0
  270. package/dist/{index-ac3rfec5.js → index-y6wzzk2e.js} +21 -1
  271. package/dist/{index-3d2c45jn.js → index-yjx5jna7.js} +2 -2
  272. package/dist/internal/loopback-host.d.ts +8 -0
  273. package/dist/internal/loopback-host.d.ts.map +1 -0
  274. package/dist/internal/own-member.d.ts +7 -0
  275. package/dist/internal/own-member.d.ts.map +1 -0
  276. package/dist/internal/request.d.ts +17 -8
  277. package/dist/internal/request.d.ts.map +1 -1
  278. package/dist/internal/secret-shapes.d.ts +33 -4
  279. package/dist/internal/secret-shapes.d.ts.map +1 -1
  280. package/dist/json-schema/dialect.d.ts.map +1 -1
  281. package/dist/json-schema/keywords.d.ts +25 -6
  282. package/dist/json-schema/keywords.d.ts.map +1 -1
  283. package/dist/json-schema/string-format.d.ts.map +1 -1
  284. package/dist/live/events.d.ts.map +1 -1
  285. package/dist/live/watch-client.d.ts.map +1 -1
  286. package/dist/live/watch-delta.d.ts.map +1 -1
  287. package/dist/observability/context.d.ts +4 -3
  288. package/dist/observability/context.d.ts.map +1 -1
  289. package/dist/observability/sanitize.d.ts.map +1 -1
  290. package/dist/observability/secret-values.d.ts +0 -9
  291. package/dist/observability/secret-values.d.ts.map +1 -1
  292. package/dist/server/context.d.ts +3 -2
  293. package/dist/server/context.d.ts.map +1 -1
  294. package/dist/server/error-hook.d.ts +4 -3
  295. package/dist/server/error-hook.d.ts.map +1 -1
  296. package/dist/server/event-bus.d.ts.map +1 -1
  297. package/dist/server/file.d.ts +11 -3
  298. package/dist/server/file.d.ts.map +1 -1
  299. package/dist/server/handler-state.d.ts +2 -2
  300. package/dist/server/handler-state.d.ts.map +1 -1
  301. package/dist/server/middleware/jwt.d.ts +12 -1
  302. package/dist/server/middleware/jwt.d.ts.map +1 -1
  303. package/dist/server/middleware/trust-fence.d.ts +4 -0
  304. package/dist/server/middleware/trust-fence.d.ts.map +1 -1
  305. package/dist/server/multipart.d.ts +2 -3
  306. package/dist/server/multipart.d.ts.map +1 -1
  307. package/dist/server/raw.d.ts.map +1 -1
  308. package/dist/server/request-body.d.ts +12 -1
  309. package/dist/server/request-body.d.ts.map +1 -1
  310. package/dist/server/request-completion.d.ts.map +1 -1
  311. package/dist/server/types.d.ts +14 -9
  312. package/dist/server/types.d.ts.map +1 -1
  313. package/dist/telegram/crypto.d.ts.map +1 -1
  314. package/dist/telegram/init-data.d.ts +4 -4
  315. package/dist/telegram/init-data.d.ts.map +1 -1
  316. package/dist/telegram/outbound-cost.d.ts.map +1 -1
  317. package/dist/telegram/screens/test-chat.d.ts.map +1 -1
  318. package/dist/telegram/widget-api.d.ts +85 -13
  319. package/dist/telegram/widget-api.d.ts.map +1 -1
  320. package/dist/telegram/widget.d.ts +46 -2
  321. package/dist/telegram/widget.d.ts.map +1 -1
  322. package/dist/tools/cli/args-classify.d.ts +4 -74
  323. package/dist/tools/cli/args-classify.d.ts.map +1 -1
  324. package/dist/tools/cli/args-framework.d.ts +79 -0
  325. package/dist/tools/cli/args-framework.d.ts.map +1 -0
  326. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  327. package/dist/tools/cli/args-tokens.d.ts.map +1 -1
  328. package/dist/tools/cli/checkpoint.d.ts +5 -0
  329. package/dist/tools/cli/checkpoint.d.ts.map +1 -1
  330. package/dist/tools/cli/stream.d.ts.map +1 -1
  331. package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -1
  332. package/dist/tools/connections/openapi.d.ts.map +1 -1
  333. package/dist/tools/connections/runtime.d.ts.map +1 -1
  334. package/dist/tools/execute-handler.d.ts +24 -0
  335. package/dist/tools/execute-handler.d.ts.map +1 -0
  336. package/dist/tools/execute.d.ts.map +1 -1
  337. package/dist/tools/mcp/round.d.ts.map +1 -1
  338. package/dist/tools/schema/coerce.d.ts.map +1 -1
  339. package/dist/tools/schema/flatten.d.ts.map +1 -1
  340. package/dist/tools/schema/inline-references.d.ts.map +1 -1
  341. package/dist/tools/schema/nesting-limit.d.ts.map +1 -1
  342. package/dist/tools/schema/presentation.d.ts.map +1 -1
  343. package/dist/tracking/privacy.d.ts.map +1 -1
  344. package/llms/agent-runtime-openrouter.txt +14 -5
  345. package/llms/agent-runtime-sandbox.txt +50 -11
  346. package/llms/agent-runtime-testing.txt +1 -1
  347. package/llms/agent-runtime.2.txt +342 -230
  348. package/llms/agent-runtime.3.txt +225 -380
  349. package/llms/agent-runtime.4.txt +387 -158
  350. package/llms/agent-runtime.5.txt +157 -152
  351. package/llms/agent-runtime.6.txt +164 -0
  352. package/llms/agent-runtime.txt +307 -362
  353. package/llms/application.txt +3 -1
  354. package/llms/http.txt +1 -1
  355. package/llms/live.txt +3 -1
  356. package/llms/observability.txt +16 -9
  357. package/llms/server.2.txt +13 -8
  358. package/llms/server.4.txt +23 -11
  359. package/llms/server.5.txt +5 -5
  360. package/llms/server.txt +54 -1
  361. package/llms/spend.txt +18 -1
  362. package/llms/stitchkit.2.txt +4 -2
  363. package/llms/stitchkit.txt +113 -93
  364. package/llms/telegram-grammy.txt +3 -2
  365. package/llms/telegram.2.txt +3 -1
  366. package/llms/telegram.txt +35 -10
  367. package/llms/upgrading-0.128.0-0.129.0.txt +175 -0
  368. package/llms/{upgrading-0.128.0-0.135.0.txt → upgrading-0.130.0-0.136.0.txt} +353 -169
  369. package/llms/upgrading.txt +2 -1
  370. package/llms-full.txt +1035 -208
  371. package/llms.txt +14 -13
  372. package/package.json +6 -6
  373. package/dist/agent-runtime/loop/deferred-tools-internal.d.ts +0 -19
  374. package/dist/agent-runtime/loop/deferred-tools-internal.d.ts.map +0 -1
  375. package/dist/agent-runtime/loop/run-complete-retry.d.ts +0 -24
  376. package/dist/agent-runtime/loop/run-complete-retry.d.ts.map +0 -1
  377. package/dist/agent-runtime/loop/run-model-attempts.d.ts +0 -6
  378. package/dist/agent-runtime/loop/run-model-attempts.d.ts.map +0 -1
  379. package/dist/index-sznqf8fx.js +0 -20
  380. /package/dist/{index-fthw8dwa.js → index-4gbybjg6.js} +0 -0
@@ -56,87 +56,87 @@ own, recorded as an ADR.
56
56
 
57
57
  | Import | Use in | Maturity | Holds |
58
58
  |--------|--------|----------|-------|
59
- | `stitchkit` | browser **and** server | stable<br>_redefined in 6 of the 42 minors since 0.94.0, most recently 0.135.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
60
- | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.135.0_ | typed HTTP client factories and `ApiError`, without optional realtime peers |
61
- | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
62
- | `stitchkit/device-relay` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free User Device Relay over realtime — `createDeviceRelayHub`, `createDeviceRelayAgent`, `createMemoryRelayBroker`, `deviceRelayRealtimeContract`, Fetch-compatible unary RPC and credit-paced cursor streams |
63
- | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.127.0_ | the contract layer alone — `defineContract`, errors, pagination |
64
- | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
65
- | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
66
- | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
67
- | `stitchkit/server` | server (Bun) | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.127.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
68
- | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
69
- | `stitchkit/tools` | server | stable<br>_redefined in 12 of the 42 minors since 0.94.0, most recently 0.135.0_ | the transport-neutral tool layer — `mountAgentTools`, `defineAgentTool`, registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
70
- | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
71
- | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.134.0_ | `mountAgent` — thin AI SDK `ToolSet` adapter over `mountAgentTools` for apps driving their own SDK loop; only Zod and the `ai` peer |
72
- | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.135.0_ | `createToolkit` — context-pinned MCP, peer-free agent (`mountAgentTools`), and CLI mounts; only the MCP server SDK peer (no `ai` peer) |
73
- | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
74
- | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
75
- | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
76
- | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 42 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
77
- | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
78
- | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
79
- | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 4 of the 42 minors since 0.94.0, most recently 0.133.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
80
- | `stitchkit/process/bootstrap` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | narrow bootstrap that keeps the process runner lazy while carrying the package's own invocations — the owner-loss guard and the process root of launched work — in a single-file bundle |
81
- | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 4 of the 42 minors since 0.94.0, most recently 0.133.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed file; a typed client built into a proven npm package with several entries, declarations and external peers; no runtime install policy |
82
- | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 5 of the 42 minors since 0.94.0, most recently 0.133.0_ | peer-free managed local-file boundary |
83
- | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
84
- | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
85
- | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
86
- | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
87
- | `stitchkit/service-host/work` | server (Bun or Node; Linux with systemd ≥ 254, or a process root on Linux and macOS) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | peer-free launch of work in its own boundary with a declared owner — a transient systemd scope or a recorded process root, the typed owner record, the one inherited variable that names the boundary, and the membership check that asks the boundary; see [native I/O](native-io.md#work-in-its-own-boundary) |
88
- | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 8 of the 42 minors since 0.94.0, most recently 0.127.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
89
- | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
90
- | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
91
- | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
92
- | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
93
- | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
94
- | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
95
- | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
96
- | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
97
- | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
98
- | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
99
- | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.132.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
100
- | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
101
- | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
102
- | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
103
- | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
104
- | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
105
- | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
106
- | `stitchkit/observability` | server | stable<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
107
- | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
108
- | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
109
- | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
110
- | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
111
- | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
112
- | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 11 of the 42 minors since 0.94.0, most recently 0.135.0_ | peer-free durable conversation/run loop over `AgentModelDriver`, stateless `completeText`/`completeObject`, driver composition, history, models, prompts, fencing and events |
113
- | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | optional Linux Bubblewrap sessions, long-lived OS process sandboxes (`createProcessSandbox`, `probeProcessSandbox`, `buildSeatbeltProfile`), durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
114
- | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.134.0_ | peer-free `createScriptedModelDriver`, credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
115
- | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.134.0_ | peer-free resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
116
- | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
117
- | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.135.0_ | peer-free native OpenRouter Chat Completions SSE driver, catalog, admission, route pinning and spend reconciliation |
118
- | `stitchkit/agent-runtime/openai` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free native OpenAI Responses API (`POST /v1/responses`) driver, policy schemas and provenance-aware usage normalization |
119
- | `stitchkit/agent-runtime/anthropic` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | peer-free native Anthropic Messages API (`POST /v1/messages`) driver, thinking/cache policy schemas and provenance-aware usage normalization |
120
- | `stitchkit/agent-runtime/ai-sdk` | server | evolving<br>_redefined in 0 of the 2 minors since 0.134.0_ | thin optional-peer adapter (`fromAiSdkModel`, `fromAiSdkTools`) bridging AI SDK (`LanguageModelV4` from `ai@7`) models and `ToolSet`s onto `AgentModelDriver` and `AgentToolSet`; requires `ai` |
121
- | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor, interactive approval/input/permission-mode/host-status state (`deriveAgentConversationActivity`, `deriveAgentConversationState`, `delivery: 'unknown'` reconciliation) and optional conversation controller |
122
- | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | React subscription to an application-owned agent controller |
123
- | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 42 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
124
- | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 4 of the 9 minors since 0.127.0, most recently 0.133.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary (including `ExecutorPlanDelta`) over the shared message parts, thread leases with a fence, turn phases and their reports |
125
- | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
126
- | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.131.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
127
- | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, tool metadata (`title`/`kind`/`locations`), meaningful `tool_call_update` progress updates, typed `plan` deltas, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
128
- | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 3 of the 9 minors since 0.127.0, most recently 0.133.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
129
- | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 1 of the 9 minors since 0.127.0, most recently 0.133.0_ | the engine conformance kit, deterministic replay driver, portable fake Codex app-server, fail-loud consumer stub factories, and schema-validated test fixtures; no optional peer |
130
- | `stitchkit/agent-executor/testing/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 3 minors since 0.133.0_ | the multi-turn fake Claude SDK query harness and the Claude SDK session stub, typed by the optional peer `@anthropic-ai/claude-agent-sdk` |
131
- | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 9 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
132
- | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
133
- | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 42 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
59
+ | `stitchkit` | browser **and** server | stable<br>_redefined in 6 of the 43 minors since 0.94.0, most recently 0.135.0_ | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
60
+ | `stitchkit/http` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.135.0_ | typed HTTP client factories, `ApiError`, `readContractIdentity` and the stream line errors, without optional realtime peers |
61
+ | `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | typed realtime clients, binding to an existing socket and retained topics with a required explicit Socket.IO peer loader |
62
+ | `stitchkit/device-relay` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 0 of the 3 minors since 0.134.0_ | peer-free User Device Relay over realtime — `createDeviceRelayHub`, `createDeviceRelayAgent`, `createMemoryRelayBroker`, `deviceRelayRealtimeContract`, Fetch-compatible unary RPC and credit-paced cursor streams |
63
+ | `stitchkit/contract` | browser **and** server | stable<br>_redefined in 6 of the 43 minors since 0.94.0, most recently 0.136.0_ | the contract layer alone — `defineContract`, errors, pagination |
64
+ | `stitchkit/live` | browser **and** server | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.127.0_ | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
65
+ | `stitchkit/primitives` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | generic values and declarations for lifecycle, access, audit, delivery and exports, exact money and rounding tables |
66
+ | `stitchkit/handler` | browser, React Native/Hermes **and** server | evolving<br>_redefined in 1 of the 10 minors since 0.127.0, most recently 0.136.0_ | portable `createHandler`, `implement`, errors and `serveBridge` over a string `postMessage` port, with no Node built-ins |
67
+ | `stitchkit/server` | server (Bun) | stable<br>_redefined in 6 of the 43 minors since 0.94.0, most recently 0.136.0_ | `createServer`, `implement`, hooks, auth, Socket.IO server, server primitives |
68
+ | `stitchkit/node` | server (Node ≥ 22.3) | stable<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.136.0_ | `serveNode` + the runtime-agnostic core — the Node mirror of `/server` |
69
+ | `stitchkit/tools` | server | stable<br>_redefined in 13 of the 43 minors since 0.94.0, most recently 0.136.0_ | the transport-neutral tool layer — `mountAgentTools`, `defineAgentTool`, registry, tool names and manifest, runtime tools, native tools, the OAuth provider, the durability engine; loads no optional peer at runtime |
70
+ | `stitchkit/tools/mcp` | server (Bun or Node) | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | the canonical MCP HTTP/stdio server, schemas and typed MCP presenters; only Zod and the MCP server SDK peers |
71
+ | `stitchkit/tools/agent` | server (Bun or Node) | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.134.0_ | `mountAgent` — thin AI SDK `ToolSet` adapter over `mountAgentTools` for apps driving their own SDK loop; only Zod and the `ai` peer |
72
+ | `stitchkit/tools/toolkit` | server (Bun or Node) | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.135.0_ | `createToolkit` — context-pinned MCP, peer-free agent (`mountAgentTools`), and CLI mounts; only the MCP server SDK peer (no `ai` peer) |
73
+ | `stitchkit/tools/contract` | browser + server | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.124.0_ | the shapes a tool surface speaks — async-operation contract, snapshot and cancel schemas, view-file input/output — without the runtime that serves them |
74
+ | `stitchkit/tools/invoker` | server | stable<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | peer-free `createToolInvoker` over the canonical contract tool runner |
75
+ | `stitchkit/tools/connections` | server (Bun or Node) | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | consume external MCP servers and a bounded OpenAPI subset — typed reauthorization, a per-request host fence and per-call credentials |
76
+ | `stitchkit/cli` | server | stable<br>_redefined in 12 of the 43 minors since 0.94.0, most recently 0.128.0_ | `createCli` / `createCliInvoker` — runtime and strict NodeNext declarations without MCP SDK / `ai` |
77
+ | `stitchkit/cli/publish` | build and release tooling (Bun or Node, POSIX) | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | `publishCli` — commit a verified CLI distribution and move its public manifest last; see [CLI guide](cli.md#publishing-a-complete-version) |
78
+ | `stitchkit/remote` | browser **and** server | stable<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.104.0_ | peer-free `implementRemote` for thin HTTP proxy processes |
79
+ | `stitchkit/process` | server (Bun or Node, POSIX) | evolving<br>_redefined in 4 of the 43 minors since 0.94.0, most recently 0.133.0_ | finite native commands, byte sinks, bounded capture, process-group cancellation and opt-in Linux/Darwin owner-loss cleanup; contract operations executed in one-call child processes |
80
+ | `stitchkit/process/bootstrap` | bundled server entry (Bun, POSIX) | evolving<br>_redefined in 0 of the 4 minors since 0.133.0_ | narrow bootstrap that keeps the process runner lazy while carrying the package's own invocations — the owner-loss guard and the process root of launched work — in a single-file bundle |
81
+ | `stitchkit/files/packaging` | build time (Bun or Node) | evolving<br>_redefined in 4 of the 43 minors since 0.94.0, most recently 0.133.0_ | installed native asset graph, integrity, Bun packaging plugin and the artifact loader check; a client bundled into one self-contained, hashed file; a typed client built into a proven npm package with several entries, declarations and external peers; no runtime install policy |
82
+ | `stitchkit/files` | server (Bun or Node) | stable<br>_redefined in 5 of the 43 minors since 0.94.0, most recently 0.133.0_ | peer-free managed local-file boundary |
83
+ | `stitchkit/spend` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | peer-free spend gateway for paid model APIs: the attempt recorded before the call and closed on every outcome, credentials only for the provider's origin, a spooled ledger, rank-merged receipts and a reconciler |
84
+ | `stitchkit/spend/testing` | tests on Bun or Node | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | the coverage guard: red on a model SDK import, a provider key or a provider host outside the gateway files |
85
+ | `stitchkit/service-host` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | peer-free host service supervision — verified versioned artifact activation, Linux `systemd` and macOS `launchd` units (`plutil`, `bootout`/`bootstrap`, rollback), live process/Unix-socket identity verification, and an in-process config-watched reloader |
86
+ | `stitchkit/service-host/macos` | server (Bun or Node, macOS) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | peer-free macOS daemon bundle toolkit — fail-closed Developer ID `codesign`, strict C11 launcher `.app` bundles with atomic `RENAME_SWAP` install/rollback, Apple 824×824 squircle `AppIcon.icns`, streaming `lsregister` maintenance, and TCC responsibility inspection |
87
+ | `stitchkit/service-host/work` | server (Bun or Node; Linux with systemd ≥ 254, or a process root on Linux and macOS) | evolving<br>_redefined in 0 of the 4 minors since 0.133.0_ | peer-free launch of work in its own boundary with a declared owner — a transient systemd scope or a recorded process root, the typed owner record, the one inherited variable that names the boundary, and the membership check that asks the boundary; see [native I/O](native-io.md#work-in-its-own-boundary) |
88
+ | `stitchkit/telegram` | server (Bun or Node) | evolving<br>_redefined in 9 of the 43 minors since 0.94.0, most recently 0.136.0_ | peer-free Telegram platform primitives — Mini App `initData` verification, widget limits and the `widget_query`, `shared_widget_query` and widget message schemas, send-failure classification, one outbound budget per bot token with weighted albums and per-chat 429 pauses, resumable broadcasts, the operator channel with dedupe, a Bot API transport that separates a request that never left from an unknown outcome, local Bot API files, the waveform of a voice message read from its PCM, webhook ownership and durable webhook update intake |
89
+ | `stitchkit/telegram/grammy` | server (Bun or Node) | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the token's outbound budget as one grammY client transformer — a 429 that comes back as a response pauses its chat, and a cancelled wait is a request that never left; the widget methods over the same client |
90
+ | `stitchkit/telegram/html` | browser and server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | Telegram's HTML as a tree — compile GFM Markdown to Telegram HTML with fence-aware splitting, clean any markup to what Telegram accepts, cut long text into valid parts by what the reader sees, check markup before it is sent |
91
+ | `stitchkit/telegram/voice` | browser and server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the waveform of a voice message as one format — packed for `sendVoice` the way Telegram Desktop scales it, unpacked to draw it, a `getMe` read of whether the server takes it |
92
+ | `stitchkit/telegram/screens` | server (Bun or Node) | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | a bot's menus as declared screens over grammY — typed paths, actions and input, message reconciliation, state in any `StorageAdapter`, a test chat |
93
+ | `stitchkit/tracking` | browser **and** server | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | visitor-tracking mechanics — `createTrackingClient`, the tab-shared outbox, the page-leave beacon, attribution, the contract factory; no event vocabulary, no React |
94
+ | `stitchkit/tracking/contract` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the wire shapes — the contract factory, event and visit schemas, the performance sample and its trust threshold; brings `zod` |
95
+ | `stitchkit/tracking/performance` | browser **and** server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | Web Vitals from real visitors, collected after load through the optional peer `web-vitals`; no `zod` |
96
+ | `stitchkit/tracking/server` | server (Bun or Node) | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the decisions a tracking backend makes — dispositions, visit lease over an application-owned store, active intervals, presence; no database |
97
+ | `stitchkit/release` | browser **and** server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | a page follows the release it was built for — `createReleaseMarker` on the server, `createReleaseWatcher` in the browser, the `X-Build-Id` header and a socket event between them |
98
+ | `stitchkit/voice` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the mechanics of a live voice reply — `SentenceCutter`, `speakableText`, a `SpeechQueue` that synthesises ahead and stops on interruption, the conversation phases |
99
+ | `stitchkit/sync` | browser **and** server | evolving<br>_redefined in 1 of the 10 minors since 0.127.0, most recently 0.132.0_ | the client half of an offline-first sync — which outbox rows leave next, pending edits on top of remote rows, deletes that win until acknowledged, the cursor session, the push and page wire with an open outcome vocabulary; no driver, runs in Hermes |
100
+ | `stitchkit/sync/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | the server half — versions that commit in order, a ledger that runs each change once, a feed of what changed, inside the app's own transaction; a memory store and `checkSyncStore` |
101
+ | `stitchkit/geo` | server (Bun or Node) | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.127.0_ | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
102
+ | `stitchkit/geo/contract` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the place snapshot schema, for a shared contract that stores or sends `GeoAttribution`; brings `zod` |
103
+ | `stitchkit/xlsx` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | a workbook from rows and typed columns, with no dependency; text never runs as a formula |
104
+ | `stitchkit/oauth` | browser **and** server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
105
+ | `stitchkit/google` | server (Bun or Node) | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | optional Google code exchange and verified OIDC identity adapter |
106
+ | `stitchkit/observability` | server | stable<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.136.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
107
+ | `stitchkit/testing` | tests on Bun or Node | stable<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
108
+ | `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.128.0_ | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
109
+ | `stitchkit/react` | browser + server rendering | stable<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.136.0_ | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
110
+ | `stitchkit/react/keyboard` | browser | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.115.0_ | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
111
+ | `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
112
+ | `stitchkit/agent-runtime` | server | evolving<br>_redefined in 12 of the 43 minors since 0.94.0, most recently 0.136.0_ | peer-free durable conversation/run loop over `AgentModelDriver`, stateless `completeText`/`completeObject`, driver composition, history, models, prompts, fencing and events |
113
+ | `stitchkit/agent-runtime/sandbox` | server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.136.0_ | optional Linux Bubblewrap sessions, long-lived OS process sandboxes (`createProcessSandbox`, `probeProcessSandbox`, `buildSeatbeltProfile`), durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
114
+ | `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving<br>_redefined in 4 of the 43 minors since 0.94.0, most recently 0.136.0_ | peer-free `createScriptedModelDriver`, credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
115
+ | `stitchkit/agent-runtime/harness` | server | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.134.0_ | peer-free resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
116
+ | `stitchkit/agent-runtime/coding-tools` | server (Bun or Node) | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | bounded host-authorized direct file and shell tools; a root boundary, not an OS sandbox |
117
+ | `stitchkit/agent-runtime/openrouter` | server | evolving<br>_redefined in 4 of the 43 minors since 0.94.0, most recently 0.136.0_ | peer-free native OpenRouter Chat Completions SSE driver, catalog, admission, route pinning and spend reconciliation, plus typed non-chat clients (speech-to-text, text-to-speech, images, video, embeddings, rerank, System One, any endpoint through `openRouterRequestJson`) bound once by `createOpenRouterClient`; see [agent runtime guide](agent-runtime.md#openrouter-non-chat-endpoints-and-shared-transport) |
118
+ | `stitchkit/agent-runtime/openai` | server | evolving<br>_redefined in 0 of the 3 minors since 0.134.0_ | peer-free native OpenAI Responses API (`POST /v1/responses`) driver, policy schemas and provenance-aware usage normalization |
119
+ | `stitchkit/agent-runtime/anthropic` | server | evolving<br>_redefined in 0 of the 3 minors since 0.134.0_ | peer-free native Anthropic Messages API (`POST /v1/messages`) driver, thinking/cache policy schemas and provenance-aware usage normalization |
120
+ | `stitchkit/agent-runtime/ai-sdk` | server | evolving<br>_redefined in 0 of the 3 minors since 0.134.0_ | thin optional-peer adapter (`fromAiSdkModel`, `fromAiSdkTools`) bridging AI SDK (`LanguageModelV4` from `ai@7`) models and `ToolSet`s onto `AgentModelDriver` and `AgentToolSet`; requires `ai` |
121
+ | `stitchkit/agent-runtime/browser` | browser + server | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.127.0_ | canonical agent records, events, reconnect cursor, interactive approval/input/permission-mode/host-status state (`deriveAgentConversationActivity`, `deriveAgentConversationState`, `delivery: 'unknown'` reconciliation) and optional conversation controller |
122
+ | `stitchkit/agent-runtime/react` | browser + server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | React subscription to an application-owned agent controller |
123
+ | `stitchkit/agent-runtime/realtime` | server (Bun or Node) | evolving<br>_redefined in 2 of the 43 minors since 0.94.0, most recently 0.127.0_ | authorized agent control over the existing Socket.IO server |
124
+ | `stitchkit/agent-executor` | server (Bun or Node) | evolving<br>_redefined in 4 of the 10 minors since 0.127.0, most recently 0.133.0_ | the executor ↔ server contract for external coding agents (Claude Code, Codex, ACP): delta vocabulary (including `ExecutorPlanDelta`) over the shared message parts, thread leases with a fence, turn phases and their reports |
125
+ | `stitchkit/agent-executor/claude` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | the Claude Code driver: the unmodified CLI over `stream-json`, permission requests answered by the host, reconcile by the input's id in the profile's transcript |
126
+ | `stitchkit/agent-executor/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 1 of the 10 minors since 0.127.0, most recently 0.131.0_ | Claude through the Agent SDK: the application's `query` (optional peer `@anthropic-ai/claude-agent-sdk`), the CLI's classifier, `canUseTool` asked of the host |
127
+ | `stitchkit/agent-executor/acp` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | an Agent Client Protocol v1 agent over stdio: settings by category, images, MCP servers, tool metadata (`title`/`kind`/`locations`), meaningful `tool_call_update` progress updates, typed `plan` deltas, `session/resume`/`load`/`list`, `session/cancel`; no reconcile |
128
+ | `stitchkit/agent-executor/codex` | server (Bun or Node) | evolving<br>_redefined in 3 of the 10 minors since 0.127.0, most recently 0.133.0_ | the Codex driver: `codex app-server` over stdio or Unix-socket WebSocket (`unix-listen` / `unix-connect`), thread policy and live controls, approval and input requests answered by the host, unknown server requests refused, reconcile by the client id in `thread/turns/list` |
129
+ | `stitchkit/agent-executor/testing` | server (Bun or Node) | evolving<br>_redefined in 1 of the 10 minors since 0.127.0, most recently 0.133.0_ | the engine conformance kit, deterministic replay driver, portable fake Codex app-server, fail-loud consumer stub factories, and schema-validated test fixtures; no optional peer |
130
+ | `stitchkit/agent-executor/testing/claude-sdk` | server (Bun or Node) | evolving<br>_redefined in 0 of the 4 minors since 0.133.0_ | the multi-turn fake Claude SDK query harness and the Claude SDK session stub, typed by the optional peer `@anthropic-ai/claude-agent-sdk` |
131
+ | `stitchkit/agent-runtime/postgres` | server (Bun or Node) | evolving<br>_redefined in 0 of the 10 minors since 0.127.0_ | the agent store, conversation reader and companion host on Postgres, over the application's own client (Bun SQL, Prisma, `pg`) |
132
+ | `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
133
+ | `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving<br>_redefined in 1 of the 43 minors since 0.94.0, most recently 0.127.0_ | durable built-in SQLite store for the agent runtime |
134
134
  | `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
135
- | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 42 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
136
- | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
137
- | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
138
- | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 42 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
139
- | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 42 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
135
+ | `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 43 minors since 0.94.0, most recently 0.127.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
136
+ | `stitchkit/application/grammy` | server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
137
+ | `stitchkit/application/opentelemetry` | server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | maps application snapshots onto an injected OpenTelemetry `Meter` |
138
+ | `stitchkit/application/diagnostic-journal` | server | evolving<br>_redefined in 3 of the 43 minors since 0.94.0, most recently 0.127.0_ | the local diagnostic journal — an exclusive bounded writer and snapshot reader with explicit anomalies |
139
+ | `stitchkit/application/directory-inbox` | server | evolving<br>_redefined in 0 of the 43 minors since 0.94.0_ | the directory inbox — entries another program drops into a directory, delivered to the application at least once |
140
140
 
141
141
  Rule of thumb: browser code imports `stitchkit` and `stitchkit/react`; server
142
142
  code adds `stitchkit/server` (or `stitchkit/node` on Node) and opts into
@@ -176,18 +176,28 @@ export const notes = defineContract({ prefix: 'notes' }, {
176
176
 
177
177
  ```ts
178
178
  // src/server/index.ts
179
- import { implement, createServer } from 'stitchkit/server'
179
+ import { createServer, implement, notFound } from 'stitchkit/server'
180
180
  import { notes } from '../shared/contracts'
181
181
 
182
+ const db = new Map<string, { id: string; text: string }>() // your database here
183
+
182
184
  const service = implement(notes, {
183
- list: () => db.list(),
184
- create: (ctx) => db.create(ctx.input.text), // ctx.input is typed
185
- get: (ctx) => db.get(ctx.params.id), // ctx.params is typed
185
+ list: () => [...db.values()],
186
+ create: (ctx) => { // ctx.input is typed
187
+ const note = { id: String(db.size + 1), text: ctx.input.text }
188
+ db.set(note.id, note)
189
+ return note
190
+ },
191
+ get: (ctx) => db.get(ctx.params.id) ?? notFound(), // ctx.params is typed
186
192
  })
187
193
 
188
- createServer({ services: [service], port: 3000 })
194
+ const server = createServer({ services: [service], port: 3000 })
195
+ console.log(`Listening on ${server.url}`)
189
196
  ```
190
197
 
198
+ Each contract is served under its prefix: `notes` answers at `/notes` and
199
+ `/notes/:id`, with no other path in front.
200
+
191
201
  ### 3. Call it, typed
192
202
 
193
203
  ```ts
@@ -195,16 +205,19 @@ createServer({ services: [service], port: 3000 })
195
205
  import { createClient, createHttpClient } from 'stitchkit'
196
206
  import { notes } from '../shared/contracts'
197
207
 
198
- export const api = createClient(notes, createHttpClient({ baseUrl: '/api' }))
208
+ export const api = createClient(notes, createHttpClient({ baseUrl: 'http://localhost:3000' }))
199
209
 
200
- await api.list() // GET /notes → Note[]
201
- await api.create({ text: 'hi' }) // POST /notes → Note
202
- await api.get({ id: '1' }) // GET /notes/1 → Note
210
+ console.log(await api.create({ text: 'hi' })) // POST http://localhost:3000/notes → Note
211
+ console.log(await api.list()) // GET http://localhost:3000/notes → Note[]
212
+ console.log(await api.get({ id: '1' })) // GET http://localhost:3000/notes/1 → Note
203
213
  ```
204
214
 
205
- Run the server with `bun run src/server/index.ts`. The contract is the single
206
- source of truth — change it and both the handler and the client are re-typed at
207
- once.
215
+ Start the server with `bun run src/server/index.ts`, then run the client in a
216
+ second terminal with `bun run src/client/api.ts`. `baseUrl` is where the server
217
+ listens; a browser app served from the same origin can pass its own origin, or
218
+ mount the services under a prefix (`groups: [{ pathPrefix: '/api', services: [service] }]`)
219
+ and call `baseUrl: '/api'`. The contract is the single source of truth — change it
220
+ and both the handler and the client are re-typed at once.
208
221
 
209
222
  #### On Node
210
223
 
@@ -277,7 +290,7 @@ bun add socket.io @socket.io/bun-engine # e.g. the Socket.IO server on Bun
277
290
  Dynamic optional-peer adapters fail with an actionable error naming the package
278
291
  and install command. Static entrypoints such as `stitchkit/tools/mcp` fail during
279
292
  ESM resolution by naming the exact missing package; the feature-to-peer matrix
280
- below is the canonical install command.
293
+ above is the canonical install command.
281
294
 
282
295
  `stitchkit/tools` itself loads no optional peer, and `stitchkit/tools/toolkit`
283
296
  stays free of `ai` (ADR 0338). Install only the peer of the adapter you import:
@@ -319,6 +332,13 @@ durable SQLite history, lazy skills, direct coding tools, approval continuations
319
332
  and recovery stay framework-owned primitives, while model choice, permissions,
320
333
  executables and OS isolation remain application policy.
321
334
 
335
+ For a long-polling Telegram bot, run
336
+ `bun create stitchkit my-bot --template telegram-bot`, copy `.env.example` to
337
+ `.env`, set `BOT_TOKEN`, then run `bun run dev`. The bot is a managed
338
+ application (`stitchkit/application` with `stitchkit/application/grammy`): its
339
+ handlers live in `src/handlers.ts`, and the entry point turns signals and a
340
+ poller that ended on its own into a bounded shutdown.
341
+
322
342
  ==============================================================================
323
343
  # Guide: Typed client (docs/guide/client.md)
324
344
  ==============================================================================
@@ -22,8 +22,9 @@ declarations and is never imported at run time — the bot brings it. → ADR 02
22
22
  | Export | Kind | Summary |
23
23
  |--------|------|---------|
24
24
  | `telegramBudgetTransformer` | function | `bot.api.config.use(telegramBudgetTransformer(budget))`: every Bot API call runs under the token's `telegramOutboundBudget`; a 429 that comes back as a response pauses the token, a cancellation before the request was handed on throws `TelegramNotDispatchedError`, a cancellation in flight stays the client's own error; it never retries |
25
- | `telegramWidgetApi` / `TelegramWidgetApi` | function / _type_ | `telegramWidgetApi(bot.api)`: `sendWidget`, `editMessageWidgetData` and `answerWidgetQuery` through the client's `api.raw`, so its transformers — the outbound budget among them — run each call; input over a limit throws `ZodError` before any request, an already aborted signal throws `TelegramNotDispatchedError`, a request is handed on once and never repeated, `message is not modified` is success, and an unexpected successful answer is an error whose outcome is unknown |
26
- | `TelegramSendWidgetParams` / `TelegramEditMessageWidgetDataParams` / `TelegramAnswerWidgetQueryParams` | _type_ | the methods' Bot API parameters by their Bot API names; an edit names `chat_id` with `message_id` or `inline_message_id`, and `chat_data` or `public_data` (`''` removes it, an omitted field keeps it) |
25
+ | `telegramWidgetApi` / `TelegramWidgetApi` | function / _type_ | `telegramWidgetApi(bot.api)`: `sendWidget`, `sendSharedWidget`, `editMessageWidgetData`, `editSharedWidgetData` and `answerWidgetQuery` through the client's `api.raw`, so its transformers — the outbound budget among them — run each call; input over a limit throws `ZodError` before any request, an already aborted signal throws `TelegramNotDispatchedError`, a request is handed on once and never repeated, `message is not modified` is success, and an unexpected successful answer is an error whose outcome is unknown |
26
+ | `TelegramSendWidgetParams` / `TelegramEditMessageWidgetDataParams` / `TelegramAnswerWidgetQueryParams` | _type_ | the methods' Bot API parameters by their Bot API names; `is_shared: true` creates a shared widget, whose message must carry `widget.id`; an edit names `chat_id` with `message_id` or `inline_message_id`, and `chat_data` or `public_data` (`''` removes it, an omitted field keeps it) |
27
+ | `TelegramSendSharedWidgetParams` / `TelegramEditSharedWidgetDataParams` | _type_ | `sendSharedWidget` sends an existing shared widget by `widget_id` again, costs one message, and its message must carry that id; `editSharedWidgetData` changes `public_data` (`''` removes it) of every message with the widget, with an optional `cache_time` of 5–3600 s, and costs no message |
27
28
  | `TelegramWidgetCallOptions` | _type_ | `signal` for one call: aborted before the request leaves, the call is not dispatched |
28
29
 
29
30
  ---
@@ -71,6 +71,8 @@ injected grammY bot. → ADR 0143, ADR 0201, ADR 0274 — [guide](../guide/teleg
71
71
  | `TelegramWidgetHtmlSchema` / `TelegramWidgetDataSchema` | schema | widget HTML (1–32768 bytes, at most 4096 compressed) and widget data (0–1024 bytes), counted in UTF-8 bytes; NUL and an unpaired surrogate are refused, an empty data string is a value |
72
72
  | `TelegramWidgetMessageSchema` / `TelegramWidgetMessage` | schema / _type_ | the message `sendWidget` returns — `message_id`, `chat`, `widget` with `html` and its data; parsed loosely, so fields Telegram adds pass through |
73
73
  | `TelegramWidgetQuerySchema` / `TelegramWidgetQuery` | schema / _type_ | `Update.widget_query`: `id`, `from`, `chat` with `message_id` or `inline_message_id`, `chat_instance`, `type` (`data` / `sign_data` / `sent_transaction`), `data` of 1–64 bytes, `widget_id` |
74
- | `parseTelegramWidgetQuery` / `TelegramWidgetQueryParse` | function / _type_ | read `update.widget_query`: `{ query }`, or `{ id, error }` for a query that does not parse — its id is enough to answer it with a refusal — or `undefined` without an id |
74
+ | `parseTelegramWidgetQuery` / `TelegramWidgetQueryParse` | function / _type_ | read `update.widget_query`: `{ query }`, or `{ id, error }` for a query that does not parse — its id is enough to answer it with a refusal — or `undefined` without an id; `TelegramWidgetQueryParse<Query>` is the same result for another query type |
75
+ | `TelegramSharedWidgetQuerySchema` / `TelegramSharedWidgetQuery` | schema / _type_ | `Update.shared_widget_query`, a query from a forwarded shared widget: `id`, `from`, `type`, `data` of 1–64 bytes and the shared widget's `widget_id` — no chat and no message |
76
+ | `parseTelegramSharedWidgetQuery` | function | read `update.shared_widget_query` as `parseTelegramWidgetQuery` reads `update.widget_query`: `{ query }`, `{ id, error }` or `undefined` |
75
77
 
76
78
  ---
package/llms/telegram.txt CHANGED
@@ -403,10 +403,10 @@ local Bot API server, and it uses no proxy: where the network needs one, keep `f
403
403
  ## Widgets
404
404
 
405
405
  A widget (Bot API 10.4) is HTML that the Telegram app runs and draws inside a message, with data
406
- of its own the bot changes and queries it sends to the bot. grammY 1.46 does not type the three
407
- methods, and a bot that reaches for them tends to build a second client and with it a second
408
- limiter. `telegramWidgetApi` takes the client the bot already has and calls the methods through
409
- its `api.raw`, so the client's transformers — the outbound budget among them — run every call:
406
+ of its own the bot changes and queries it sends to the bot. `telegramWidgetApi` takes the client
407
+ the bot already has and calls the five widget methods through its `api.raw`, so the client's
408
+ transformers — the outbound budget among them — run every call and no second client, with a
409
+ second limiter, is built for them:
410
410
 
411
411
  ```ts
412
412
  import { telegramOutboundBudget } from 'stitchkit/telegram'
@@ -426,8 +426,10 @@ await widgets.editMessageWidgetData(
426
426
  await widgets.answerWidgetQuery({ widget_query_id: query.id, data: answer }, { signal })
427
427
  ```
428
428
 
429
- The parameters are the Bot API's, by their Bot API names, so the call reads as the grammY call it
430
- becomes once grammY types the method. A field is sent when it is not `undefined`: `chat_data: ''`
429
+ The parameters are the Bot API's, by their Bot API names, so the call reads as the grammY call.
430
+ Their types are written in this package rather than taken from grammY: the supported range starts at
431
+ grammY 1.46, which types no widget method (1.48 types them all), and a type test holds each
432
+ parameter type to the installed grammY's own field for field. A field is sent when it is not `undefined`: `chat_data: ''`
431
433
  reaches Telegram and removes the data, an omitted field keeps it. An edit names `chat_id` with
432
434
  `message_id`, or `inline_message_id`, and changes `chat_data`, `public_data` or both.
433
435
 
@@ -454,15 +456,38 @@ reaches Telegram and removes the data, an omitted field keeps it. An edit names
454
456
  returns — `true` where a message was due, as a grammY webhook reply gives — is an error with the
455
457
  parse failure as its `cause`: the request was sent and its outcome is unknown.
456
458
  - **Queries are answered at intake.** `widget_query` must be in the webhook's or polling's
457
- `allowed_updates`; grammY's `Update` type does not name it yet, so read
459
+ `allowed_updates`; grammY 1.46's `Update` type does not name it, so read
458
460
  `update.widget_query` with `parseTelegramWidgetQuery`. It returns `{ query }`, or `{ id, error }`
459
461
  for a query that does not parse — an unknown `type` or data outside 1–64 bytes — whose id is
460
462
  enough to answer it with a refusal rather than leave the widget waiting, or `undefined` without
461
463
  an id. Telegram's message, chat and query objects are parsed loosely: fields it adds later pass
462
464
  through.
463
- - **Shared widgets are not here.** `is_shared`, `sendSharedWidget`, `editSharedWidgetData` and
464
- `shared_widget_query` are outside this API; in production Telegram sends widgets to private
465
- chats only.
465
+
466
+ ### Shared widgets
467
+
468
+ A shared widget is one widget shown by many messages with one `public_data`. `sendWidget` with
469
+ `is_shared: true` creates it, and the message it returns carries its id in `widget.id`, typed as a
470
+ `string` — an answer without one is an error whose outcome is unknown. `sendSharedWidget` sends the same widget to
471
+ another chat; `editSharedWidgetData` changes the public data of every message with it at once:
472
+
473
+ ```ts
474
+ const first = await widgets.sendWidget({ chat_id, html, public_data: board, is_shared: true })
475
+ const widget_id = first.widget.id
476
+ await widgets.sendSharedWidget({ chat_id: other, widget_id, chat_data: seat })
477
+ await widgets.editSharedWidgetData({ widget_id, public_data: next, cache_time: 10 })
478
+ ```
479
+
480
+ - **A shared send costs one message; a shared data edit costs none.** `sendSharedWidget` waits for
481
+ the token's schedule like any send. `editSharedWidgetData` changes no message, so it waits for no
482
+ slot; Telegram limits it to one edit per second per widget, which is the caller's to keep.
483
+ `public_data: ''` removes the data; `cache_time` (5–3600 s, 30 by default) is how long an app may
484
+ keep the old data.
485
+ - **A forwarded shared widget asks through `shared_widget_query`.** Add it to `allowed_updates` and
486
+ read it with `parseTelegramSharedWidgetQuery`: `{ query }` with the `widget_id`, no chat and no
487
+ message, `{ id, error }` for one that does not parse, or `undefined` without an id. Answer it with
488
+ `answerWidgetQuery` like any other query. A query from a shared widget in a message the bot sent
489
+ arrives as an ordinary `widget_query` with `widget_id` set.
490
+ - In production Telegram sends widgets to private chats only, and their content is protected.
466
491
 
467
492
  The installed
468
493
  [`telegram-widget-api.mjs`](../../packages/core/scripts/consumer-lane/fixtures/minimal/src/telegram-widget-api.mjs)
@@ -0,0 +1,175 @@
1
+ # Upgrading 0.128.0 → 0.129.0 — stitchkit docs slice
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
+
6
+ Contains: Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
7
+
8
+ ==============================================================================
9
+ # Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
10
+ ==============================================================================
11
+
12
+ ## Released migration: 0.129.0
13
+
14
+ ### codex-plan-window-keys
15
+
16
+ **Who must act:** every caller of `codexPlanWindows` or `createCodexDriver` (`status()`) from
17
+ `stitchkit/agent-executor/codex` that matches plan window names against `'primary'` or
18
+ `'secondary'`.
19
+
20
+ `codexPlanWindows` now unfolds the full `account/rateLimits/read` response envelope (including
21
+ per-model `rateLimitsByLimitId` buckets) as well as bare `RateLimitSnapshot` objects, keying each
22
+ window as `<limitId|limit>:<windowDurationMins>m` (falling back to `<limitId|limit>:<slot>` when
23
+ duration is absent, or `<limitId|limit>:<windowDurationMins>m:<slot>` when both slots share a
24
+ duration) and populating optional `windowDurationMins` and `label` on `PlanWindow`:
25
+
26
+ ```ts
27
+ // before
28
+ const fiveHour = status.planLimits?.windows.find((w) => w.name === 'primary')
29
+ const weekly = status.planLimits?.windows.find((w) => w.name === 'secondary')
30
+
31
+ // after
32
+ const fiveHour = status.planLimits?.windows.find(
33
+ (w) => w.windowDurationMins === 300 || w.name === 'limit:primary',
34
+ )
35
+ const weekly = status.planLimits?.windows.find(
36
+ (w) => w.windowDurationMins === 10080 || w.name === 'limit:secondary',
37
+ )
38
+ ```
39
+
40
+ ## Released migration: 0.128.0
41
+
42
+ ### invocation-payload-lifecycle
43
+
44
+ **Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime`
45
+ that reads `readPayload`, reads `sent.artifactId` on `provider/request` or top-level `artifactId`
46
+ on `provider/response` (`ModelInvocationRecord`), passes `authorize` to `ModelInvocationConfig`,
47
+ or relies on `maxPayloadBytes` aborting the provider call.
48
+
49
+ 1. **`readPayload` returns a discriminated status:** encrypted payloads redacted by
50
+ `purgePayloads` / `store.purgeExpiredPayloads` stay readable as `{ status: 'expired', expiredAt }`
51
+ while live payloads return `{ status: 'available', payload }`:
52
+
53
+ ```ts
54
+ // before
55
+ const payload = await ledger.readPayload({ conversationId, artifactId }, ctx)
56
+ console.log(payload.payload)
57
+
58
+ // after
59
+ const result = await ledger.readPayload({ conversationId, artifactId }, ctx)
60
+ if (result.status === 'available') {
61
+ console.log(result.payload)
62
+ } else {
63
+ console.log('expired at', result.expiredAt)
64
+ }
65
+ ```
66
+
67
+ 2. **`sent.artifactId` (`provider/request`) and top-level `artifactId` (`provider/response`) are optional when oversized:** exceeding
68
+ `maxPayloadBytes` no longer aborts or prevents the provider call. Instead, the ledger omits the
69
+ encrypted body, records `payloadOmitted: 'max-payload-bytes'` (with `artifactId` absent and
70
+ `payloadSha256` preserved), and reports `InvocationPayloadTooLargeError` via `complete().receiptError`:
71
+
72
+ ```ts
73
+ // before
74
+ const id: string = record.sent.artifactId
75
+
76
+ // after
77
+ if (record.sent.artifactId !== undefined) {
78
+ await ledger.readPayload({ conversationId, artifactId: record.sent.artifactId }, ctx)
79
+ } else if (record.sent.payloadOmitted === 'max-payload-bytes') {
80
+ // body was intentionally omitted past maxPayloadBytes
81
+ }
82
+ ```
83
+
84
+ 3. **`ModelInvocationConfig.authorize` handles `'purge-payloads'`:** if your `authorize` callback
85
+ switches exhaustively on `input.action`, handle the new `'purge-payloads'` variant alongside
86
+ `'complete'`, `'agent'`, `'read'`, and `'read-payload'` (single-argument `input: ModelInvocationAuthorizationInput` carrying `input.context`):
87
+
88
+ ```ts
89
+ authorize: (input) => {
90
+ switch (input.action) {
91
+ case 'complete':
92
+ case 'agent':
93
+ case 'read':
94
+ case 'read-payload':
95
+ case 'purge-payloads':
96
+ return allow(input.context, input)
97
+ }
98
+ }
99
+ ```
100
+
101
+ ### cli-option-projections-error-field
102
+
103
+ **Who must act:** every caller of `extractCliGlobalOptions` or `scanCliInvocation` from
104
+ `stitchkit/cli` that caught a thrown `CliArgumentError` on call or on `.argv` access (→ ADR 0327).
105
+
106
+ Both projections now return malformed CLI syntax on an explicit `error?: CliArgumentError` field
107
+ with fail-closed empty routing fields (`argv: []` on `extractCliGlobalOptions`; `command: undefined`
108
+ and `commandTokens: []` on `scanCliInvocation`) instead of throwing on call or via a getter on `.argv`:
109
+
110
+ ```ts
111
+ // before
112
+ let parsed
113
+ try {
114
+ parsed = extractCliGlobalOptions(argv, globals)
115
+ void parsed.argv
116
+ } catch (err) {
117
+ if (err instanceof CliArgumentError) {
118
+ parsed = { globals: {}, argv: [] }
119
+ } else {
120
+ throw err
121
+ }
122
+ }
123
+
124
+ // after
125
+ const parsed = extractCliGlobalOptions(argv, globals)
126
+ if (parsed.error) {
127
+ // handle parsed.error, or pass raw argv to createCli(...) for exit-code-2 reporting
128
+ }
129
+ ```
130
+
131
+ ### declaration-single-version
132
+
133
+ **Who must act:** every repository whose `project.json` is validated by `stitchkit/declaration`
134
+ and still carries `identity.version`, or whose server/CLI code reads `declaration.identity.version`.
135
+
136
+ The root `package.json` is the single source of truth for the repository version (whether SemVer or
137
+ CalVer). `ProjectIdentitySchema` no longer accepts `identity.version`:
138
+
139
+ ```jsonc
140
+ // before (project.json)
141
+ {
142
+ "identity": {
143
+ "slug": "my-app",
144
+ "name": "My App",
145
+ "version": "0.1.0",
146
+ "description": { "en": "My App." }
147
+ }
148
+ }
149
+
150
+ // after (project.json)
151
+ {
152
+ "identity": {
153
+ "slug": "my-app",
154
+ "name": "My App",
155
+ "description": { "en": "My App." }
156
+ }
157
+ }
158
+ ```
159
+
160
+ Read your application version from the root `package.json` for a single-version application — or
161
+ from the package's own `package.json` if that package is released independently — instead of
162
+ `identity.version` (for example, in OpenAPI `info.version`, MCP `serverInfo.version`, and
163
+ `createCli({ version })`).
164
+
165
+ ### read-only-surface-inspection
166
+
167
+ **Who must act:** optional — hosts and test suites that currently mount a tool surface with
168
+ `access: { open: 'local-operator' }` solely for read-only surface inspection.
169
+
170
+ Pass `access: { inspect: true }` to `mountAgent`, `mountMcp`, `buildMcpServer`, `createToolInvoker`,
171
+ `createCli`, `createCliInvoker`, or `createDeferredAgentToolSurface().mount` whenever a caller only
172
+ needs catalogs, schemas, `--help`, `--schema`, or `commands`. Every tool execution fails closed with
173
+ `FORBIDDEN` before extensions, hooks, durability, multi-round resolvers, or auth run. Keep
174
+ `access: { gate }` for authenticated execution surfaces and `access: { open: 'local-operator' }` for
175
+ tests or local tools that genuinely execute handlers.