stitchkit 0.135.1 → 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 +109 -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 +123 -81
  95. package/dist/agent-runtime/providers/openrouter-audio.d.ts.map +1 -1
  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 +2 -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 +26 -6
  103. package/dist/agent-runtime/providers/openrouter-http.d.ts.map +1 -1
  104. package/dist/agent-runtime/providers/openrouter-media.d.ts +91 -77
  105. package/dist/agent-runtime/providers/openrouter-media.d.ts.map +1 -1
  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 +2 -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-retrieval.d.ts +86 -55
  113. package/dist/agent-runtime/providers/openrouter-retrieval.d.ts.map +1 -1
  114. package/dist/agent-runtime/providers/openrouter-speech.d.ts +90 -0
  115. package/dist/agent-runtime/providers/openrouter-speech.d.ts.map +1 -0
  116. package/dist/agent-runtime/providers/openrouter-spend.d.ts +2 -2
  117. package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -1
  118. package/dist/agent-runtime/providers/openrouter-stream.d.ts.map +1 -1
  119. package/dist/agent-runtime/providers/openrouter-systemone.d.ts +87 -32
  120. package/dist/agent-runtime/providers/openrouter-systemone.d.ts.map +1 -1
  121. package/dist/agent-runtime/providers/openrouter-url.d.ts +7 -1
  122. package/dist/agent-runtime/providers/openrouter-url.d.ts.map +1 -1
  123. package/dist/agent-runtime/providers/openrouter-wire.d.ts +45 -0
  124. package/dist/agent-runtime/providers/openrouter-wire.d.ts.map +1 -0
  125. package/dist/agent-runtime/providers/openrouter.d.ts +1 -3
  126. package/dist/agent-runtime/providers/openrouter.d.ts.map +1 -1
  127. package/dist/agent-runtime/providers/provider-http.d.ts +14 -2
  128. package/dist/agent-runtime/providers/provider-http.d.ts.map +1 -1
  129. package/dist/agent-runtime/providers/provider-json-schema-strip.d.ts.map +1 -1
  130. package/dist/agent-runtime/providers/provider-json-schema.d.ts.map +1 -1
  131. package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts.map +1 -1
  132. package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts +42 -0
  133. package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts.map +1 -0
  134. package/dist/agent-runtime/providers/provider-usage.d.ts +9 -0
  135. package/dist/agent-runtime/providers/provider-usage.d.ts.map +1 -1
  136. package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts +9 -0
  137. package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts.map +1 -1
  138. package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts +6 -0
  139. package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts.map +1 -1
  140. package/dist/agent-runtime/sandbox/sandbox-contract.d.ts.map +1 -1
  141. package/dist/agent-runtime/sandbox/sandbox-process-linux.d.ts.map +1 -1
  142. package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts +5 -1
  143. package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts.map +1 -1
  144. package/dist/agent-runtime/sandbox/sandbox-process-wrapper.d.ts.map +1 -1
  145. package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
  146. package/dist/agent-runtime/stores/branch-observations.d.ts +42 -42
  147. package/dist/agent-runtime/stores/sql-rows.d.ts +10 -10
  148. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  149. package/dist/agent-runtime/testing/fault-bench.d.ts +5 -1
  150. package/dist/agent-runtime/testing/fault-bench.d.ts.map +1 -1
  151. package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +20 -20
  152. package/dist/agent-runtime/testing/store-conformance-support.d.ts +10 -10
  153. package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
  154. package/dist/browser/client-executors.d.ts.map +1 -1
  155. package/dist/browser/client-url.d.ts.map +1 -1
  156. package/dist/contract/define.d.ts +3 -7
  157. package/dist/contract/define.d.ts.map +1 -1
  158. package/dist/contract/normalize.d.ts +17 -5
  159. package/dist/contract/normalize.d.ts.map +1 -1
  160. package/dist/entrypoints/agent-executor/acp.js +4 -2
  161. package/dist/entrypoints/agent-executor/claude-sdk.js +20 -20
  162. package/dist/entrypoints/agent-executor/claude.js +7 -7
  163. package/dist/entrypoints/agent-executor/codex.d.ts +2 -1
  164. package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
  165. package/dist/entrypoints/agent-executor/codex.js +129 -35
  166. package/dist/entrypoints/agent-executor/testing/claude-sdk.js +2 -2
  167. package/dist/entrypoints/agent-executor/testing.js +17 -13
  168. package/dist/entrypoints/agent-executor.js +1 -1
  169. package/dist/entrypoints/agent-runtime/ai-sdk.d.ts +2 -1
  170. package/dist/entrypoints/agent-runtime/ai-sdk.d.ts.map +1 -1
  171. package/dist/entrypoints/agent-runtime/ai-sdk.js +10 -12
  172. package/dist/entrypoints/agent-runtime/anthropic.js +13 -10
  173. package/dist/entrypoints/agent-runtime/browser.js +8 -4
  174. package/dist/entrypoints/agent-runtime/harness.js +18 -19
  175. package/dist/entrypoints/agent-runtime/openai.js +5 -5
  176. package/dist/entrypoints/agent-runtime/openrouter.d.ts +7 -5
  177. package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
  178. package/dist/entrypoints/agent-runtime/openrouter.js +1095 -854
  179. package/dist/entrypoints/agent-runtime/postgres.js +2 -2
  180. package/dist/entrypoints/agent-runtime/realtime.js +5 -5
  181. package/dist/entrypoints/agent-runtime/sandbox.js +167 -139
  182. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  183. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  184. package/dist/entrypoints/agent-runtime/testing.js +3 -3
  185. package/dist/entrypoints/agent-runtime.js +246 -360
  186. package/dist/entrypoints/application.js +2 -2
  187. package/dist/entrypoints/cli.js +36 -15
  188. package/dist/entrypoints/contract.js +12 -10
  189. package/dist/entrypoints/geo.js +1 -1
  190. package/dist/entrypoints/handler.js +5 -6
  191. package/dist/entrypoints/http.d.ts +2 -0
  192. package/dist/entrypoints/http.d.ts.map +1 -1
  193. package/dist/entrypoints/http.js +16 -4
  194. package/dist/entrypoints/index.js +26 -35
  195. package/dist/entrypoints/live.js +3 -3
  196. package/dist/entrypoints/node.js +7 -7
  197. package/dist/entrypoints/observability.js +9 -7
  198. package/dist/entrypoints/process.js +3 -3
  199. package/dist/entrypoints/remote.js +5 -5
  200. package/dist/entrypoints/server.js +29 -16
  201. package/dist/entrypoints/telegram/grammy.d.ts +1 -1
  202. package/dist/entrypoints/telegram/grammy.d.ts.map +1 -1
  203. package/dist/entrypoints/telegram/grammy.js +39 -5
  204. package/dist/entrypoints/telegram/screens.js +3 -0
  205. package/dist/entrypoints/telegram.d.ts +1 -1
  206. package/dist/entrypoints/telegram.d.ts.map +1 -1
  207. package/dist/entrypoints/telegram.js +19 -6
  208. package/dist/entrypoints/testing.js +10 -11
  209. package/dist/entrypoints/tools/agent.js +8 -9
  210. package/dist/entrypoints/tools/connections.js +27 -57
  211. package/dist/entrypoints/tools/contract.js +4 -4
  212. package/dist/entrypoints/tools/invoker.js +7 -8
  213. package/dist/entrypoints/tools/mcp.js +9 -10
  214. package/dist/entrypoints/tools/toolkit.js +11 -12
  215. package/dist/entrypoints/tools.js +20 -20
  216. package/dist/entrypoints/tracking/contract.js +1 -1
  217. package/dist/entrypoints/tracking/performance.js +1 -1
  218. package/dist/entrypoints/tracking.js +1 -1
  219. package/dist/{index-3czc3ykr.js → index-08a3qfr8.js} +1 -1
  220. package/dist/{index-grhhsrd5.js → index-1en7k3q5.js} +2 -1
  221. package/dist/{index-pdcbjd6a.js → index-1yky29qg.js} +6 -3
  222. package/dist/{index-b4c9dpzm.js → index-252den5a.js} +10 -11
  223. package/dist/{index-xtby8rj3.js → index-28kbdn63.js} +5 -47
  224. package/dist/{index-57sbckhv.js → index-36mtj8xm.js} +2 -2
  225. package/dist/{index-dm84tsd5.js → index-3kb8dw48.js} +1 -1
  226. package/dist/index-3tb82xr7.js +11 -0
  227. package/dist/{index-c24bj2r1.js → index-4243301z.js} +2 -2
  228. package/dist/{index-nr4fhfn4.js → index-4p2zx593.js} +2 -0
  229. package/dist/{index-q86qnzzf.js → index-54wp467c.js} +4 -4
  230. package/dist/{index-mcv7b2n0.js → index-63ctzjp4.js} +497 -495
  231. package/dist/{index-y0a4gt1s.js → index-65p8v81y.js} +3 -2
  232. package/dist/{index-z72vazf5.js → index-6y3eae97.js} +27 -83
  233. package/dist/{index-5awtbyns.js → index-9vj869rx.js} +1 -1
  234. package/dist/{index-5q0qpw3v.js → index-aqm7e864.js} +23 -8
  235. package/dist/{index-d4at0q09.js → index-b9mj31q7.js} +90 -88
  236. package/dist/{index-baba8ehy.js → index-bjrcbcn2.js} +2 -2
  237. package/dist/{index-fsw9wxk9.js → index-c9j8441q.js} +1 -103
  238. package/dist/{index-wdb5jhas.js → index-d1pdv8qc.js} +1 -1
  239. package/dist/{index-73wq9abg.js → index-df5xr2f9.js} +13 -59
  240. package/dist/{index-n9358ydy.js → index-dm50x3by.js} +1 -1
  241. package/dist/{index-zyyerdny.js → index-dmrx8xma.js} +3 -0
  242. package/dist/{index-78da4g74.js → index-dwq6a6sq.js} +17 -13
  243. package/dist/{index-9be3tf6r.js → index-e413q2cj.js} +49 -22
  244. package/dist/{index-g4gstmp1.js → index-ednf2cxs.js} +1 -1
  245. package/dist/{index-84tp547a.js → index-edpkm3k7.js} +29 -97
  246. package/dist/{index-gs0jw0hy.js → index-efbzm2se.js} +3 -3
  247. package/dist/{index-de7b0kvz.js → index-epwvp88y.js} +1 -1
  248. package/dist/{index-asnd4h2k.js → index-f0dzyskg.js} +27 -4
  249. package/dist/{index-xbb8ysmq.js → index-fatke81t.js} +2 -2
  250. package/dist/{index-6nzzj7qr.js → index-gq35s3bm.js} +1 -1
  251. package/dist/index-gvgtmt7a.js +102 -0
  252. package/dist/{index-m2b49tvc.js → index-h08xqfw9.js} +20 -21
  253. package/dist/{index-gk6dq9ay.js → index-ha1tv70k.js} +3 -26
  254. package/dist/{index-wsv11dhg.js → index-hberxns4.js} +1 -1
  255. package/dist/{index-rkphknhx.js → index-hpzhz1vm.js} +1 -1
  256. package/dist/{index-npfdymav.js → index-j5vzhj3d.js} +1 -1
  257. package/dist/{index-d3s070eh.js → index-jperyn0c.js} +1 -1
  258. package/dist/{index-yhwx4fwk.js → index-kzsetgh9.js} +1 -1
  259. package/dist/{index-x6sp5vpa.js → index-q4tr9vnf.js} +1 -1
  260. package/dist/{index-hce3hbdg.js → index-qj0sq69b.js} +6 -2
  261. package/dist/{index-v0j22shs.js → index-rg08syp1.js} +9 -6
  262. package/dist/{index-8vzh5wpv.js → index-rw1caff2.js} +14 -26
  263. package/dist/index-s8af9jqw.js +6 -0
  264. package/dist/{index-bgj9hbm3.js → index-sdppfbrh.js} +30 -16
  265. package/dist/{index-y0mwkgkf.js → index-shte29pg.js} +1086 -1055
  266. package/dist/{index-fec05c9k.js → index-ta0e2daw.js} +9 -7
  267. package/dist/{index-ht71v1ag.js → index-tb36xawm.js} +59 -44
  268. package/dist/{index-c0yym4a0.js → index-w7e402wx.js} +11 -105
  269. package/dist/{index-bvpevwt6.js → index-xnqab06h.js} +207 -202
  270. package/dist/index-xrbrvn15.js +147 -0
  271. package/dist/{index-ac3rfec5.js → index-y6wzzk2e.js} +21 -1
  272. package/dist/{index-3d2c45jn.js → index-yjx5jna7.js} +2 -2
  273. package/dist/internal/loopback-host.d.ts +8 -0
  274. package/dist/internal/loopback-host.d.ts.map +1 -0
  275. package/dist/internal/own-member.d.ts +7 -0
  276. package/dist/internal/own-member.d.ts.map +1 -0
  277. package/dist/internal/request.d.ts +17 -8
  278. package/dist/internal/request.d.ts.map +1 -1
  279. package/dist/internal/secret-shapes.d.ts +33 -4
  280. package/dist/internal/secret-shapes.d.ts.map +1 -1
  281. package/dist/json-schema/dialect.d.ts.map +1 -1
  282. package/dist/json-schema/keywords.d.ts +25 -6
  283. package/dist/json-schema/keywords.d.ts.map +1 -1
  284. package/dist/json-schema/string-format.d.ts.map +1 -1
  285. package/dist/live/events.d.ts.map +1 -1
  286. package/dist/live/watch-client.d.ts.map +1 -1
  287. package/dist/live/watch-delta.d.ts.map +1 -1
  288. package/dist/observability/context.d.ts +4 -3
  289. package/dist/observability/context.d.ts.map +1 -1
  290. package/dist/observability/sanitize.d.ts.map +1 -1
  291. package/dist/observability/secret-values.d.ts +0 -9
  292. package/dist/observability/secret-values.d.ts.map +1 -1
  293. package/dist/server/context.d.ts +3 -2
  294. package/dist/server/context.d.ts.map +1 -1
  295. package/dist/server/error-hook.d.ts +4 -3
  296. package/dist/server/error-hook.d.ts.map +1 -1
  297. package/dist/server/event-bus.d.ts.map +1 -1
  298. package/dist/server/file.d.ts +11 -3
  299. package/dist/server/file.d.ts.map +1 -1
  300. package/dist/server/handler-state.d.ts +2 -2
  301. package/dist/server/handler-state.d.ts.map +1 -1
  302. package/dist/server/middleware/jwt.d.ts +12 -1
  303. package/dist/server/middleware/jwt.d.ts.map +1 -1
  304. package/dist/server/middleware/trust-fence.d.ts +4 -0
  305. package/dist/server/middleware/trust-fence.d.ts.map +1 -1
  306. package/dist/server/multipart.d.ts +2 -3
  307. package/dist/server/multipart.d.ts.map +1 -1
  308. package/dist/server/raw.d.ts.map +1 -1
  309. package/dist/server/request-body.d.ts +12 -1
  310. package/dist/server/request-body.d.ts.map +1 -1
  311. package/dist/server/request-completion.d.ts.map +1 -1
  312. package/dist/server/types.d.ts +14 -9
  313. package/dist/server/types.d.ts.map +1 -1
  314. package/dist/telegram/crypto.d.ts.map +1 -1
  315. package/dist/telegram/init-data.d.ts +4 -4
  316. package/dist/telegram/init-data.d.ts.map +1 -1
  317. package/dist/telegram/outbound-cost.d.ts.map +1 -1
  318. package/dist/telegram/screens/test-chat.d.ts.map +1 -1
  319. package/dist/telegram/widget-api.d.ts +85 -13
  320. package/dist/telegram/widget-api.d.ts.map +1 -1
  321. package/dist/telegram/widget.d.ts +46 -2
  322. package/dist/telegram/widget.d.ts.map +1 -1
  323. package/dist/tools/cli/args-classify.d.ts +4 -74
  324. package/dist/tools/cli/args-classify.d.ts.map +1 -1
  325. package/dist/tools/cli/args-framework.d.ts +79 -0
  326. package/dist/tools/cli/args-framework.d.ts.map +1 -0
  327. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  328. package/dist/tools/cli/args-tokens.d.ts.map +1 -1
  329. package/dist/tools/cli/checkpoint.d.ts +5 -0
  330. package/dist/tools/cli/checkpoint.d.ts.map +1 -1
  331. package/dist/tools/cli/stream.d.ts.map +1 -1
  332. package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -1
  333. package/dist/tools/connections/openapi.d.ts.map +1 -1
  334. package/dist/tools/connections/runtime.d.ts.map +1 -1
  335. package/dist/tools/execute-handler.d.ts +24 -0
  336. package/dist/tools/execute-handler.d.ts.map +1 -0
  337. package/dist/tools/execute.d.ts.map +1 -1
  338. package/dist/tools/mcp/round.d.ts.map +1 -1
  339. package/dist/tools/schema/coerce.d.ts.map +1 -1
  340. package/dist/tools/schema/flatten.d.ts.map +1 -1
  341. package/dist/tools/schema/inline-references.d.ts.map +1 -1
  342. package/dist/tools/schema/nesting-limit.d.ts.map +1 -1
  343. package/dist/tools/schema/presentation.d.ts.map +1 -1
  344. package/dist/tracking/privacy.d.ts.map +1 -1
  345. package/llms/agent-runtime-openrouter.txt +10 -9
  346. package/llms/agent-runtime-sandbox.txt +50 -11
  347. package/llms/agent-runtime-testing.txt +1 -1
  348. package/llms/agent-runtime.2.txt +9 -6
  349. package/llms/agent-runtime.3.txt +2 -2
  350. package/llms/agent-runtime.4.txt +11 -5
  351. package/llms/agent-runtime.5.txt +1 -1
  352. package/llms/agent-runtime.txt +283 -36
  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 +1 -0
  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 +994 -217
  371. package/llms.txt +13 -12
  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
@@ -7,21 +7,18 @@ import {
7
7
  import {
8
8
  DEFAULT_CORS_ALLOW_HEADERS2
9
9
  } from "../index-7mjsb7zv.js";
10
- import"../index-gk6dq9ay.js";
11
- import"../index-wdb5jhas.js";
12
- import {
13
- normalizeError2
14
- } from "../index-78da4g74.js";
10
+ import"../index-ha1tv70k.js";
11
+ import"../index-d1pdv8qc.js";
15
12
  import"../index-dsa676h8.js";
16
- import"../index-n9358ydy.js";
13
+ import"../index-dm50x3by.js";
17
14
  import {
18
15
  coerceJsonArgs2
19
- } from "../index-hce3hbdg.js";
16
+ } from "../index-qj0sq69b.js";
20
17
  import {
21
18
  ToolExecutionControlError2,
22
19
  isToolExecutionControlError2,
23
20
  collectTools2
24
- } from "../index-d4at0q09.js";
21
+ } from "../index-b9mj31q7.js";
25
22
  import {
26
23
  ALL_TRANSPORTS2,
27
24
  TOOL_TRANSPORTS2
@@ -30,12 +27,12 @@ import {
30
27
  assertToolName,
31
28
  assertUniqueToolName,
32
29
  flattenToolJsonSchema2
33
- } from "../index-84tp547a.js";
30
+ } from "../index-edpkm3k7.js";
34
31
  import"../index-werjqesf.js";
35
32
  import"../index-m38ej7e5.js";
36
33
  import {
37
34
  defineContract2
38
- } from "../index-zyyerdny.js";
35
+ } from "../index-dmrx8xma.js";
39
36
  import {
40
37
  AsyncOperationCancelResultSchema2,
41
38
  createAsyncOperationSnapshotSchema2
@@ -58,17 +55,17 @@ import {
58
55
  import {
59
56
  signJwt2,
60
57
  verifyPkce2
61
- } from "../index-nr4fhfn4.js";
58
+ } from "../index-4p2zx593.js";
62
59
  import {
63
60
  describeToolCatalog2,
64
61
  buildToolManifest2
65
- } from "../index-3czc3ykr.js";
62
+ } from "../index-08a3qfr8.js";
66
63
  import {
67
64
  listToolNames2,
68
65
  listContractToolNames2
69
- } from "../index-xbb8ysmq.js";
70
- import"../index-6nzzj7qr.js";
71
- import"../index-fthw8dwa.js";
66
+ } from "../index-fatke81t.js";
67
+ import"../index-gq35s3bm.js";
68
+ import"../index-4gbybjg6.js";
72
69
  import {
73
70
  PROTECTED_RESOURCE_PATH2,
74
71
  protectedResourceMetadataUrl2,
@@ -80,16 +77,16 @@ import {
80
77
  PORTABLE_JSON_SCHEMA_FORMATS2,
81
78
  findNonPortableFormats2,
82
79
  findUntypedProperties2
83
- } from "../index-dm84tsd5.js";
80
+ } from "../index-3kb8dw48.js";
84
81
  import {
85
82
  AgentToolError2,
86
83
  isAgentToolError2,
87
84
  defineAgentTool2,
88
85
  mountAgentTools2
89
- } from "../index-q86qnzzf.js";
86
+ } from "../index-54wp467c.js";
90
87
  import {
91
88
  createToolInvoker2
92
- } from "../index-3d2c45jn.js";
89
+ } from "../index-yjx5jna7.js";
93
90
  import {
94
91
  WaitTimeoutError,
95
92
  runWaitOperation,
@@ -102,10 +99,13 @@ import {
102
99
  } from "../index-dz6tstcp.js";
103
100
  import {
104
101
  collectToolSurface
105
- } from "../index-baba8ehy.js";
102
+ } from "../index-bjrcbcn2.js";
106
103
  import {
107
104
  getTraceId2
108
- } from "../index-x6sp5vpa.js";
105
+ } from "../index-q4tr9vnf.js";
106
+ import {
107
+ normalizeError2
108
+ } from "../index-dwq6a6sq.js";
109
109
  import {
110
110
  defineRuntimeTool2,
111
111
  createRuntimeToolFactory2
@@ -3,7 +3,7 @@ import"../../index-yt1gg11x.js";
3
3
  import"../../index-werjqesf.js";
4
4
  import {
5
5
  defineContract2
6
- } from "../../index-zyyerdny.js";
6
+ } from "../../index-dmrx8xma.js";
7
7
 
8
8
  // src/tracking/schemas.ts
9
9
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  redactTrackingText2,
3
3
  sendUnloadBeacon2
4
- } from "../../index-8vzh5wpv.js";
4
+ } from "../../index-rw1caff2.js";
5
5
  import {
6
6
  DEFAULT_BOT_USER_AGENT_PATTERN2
7
7
  } from "../../index-1f40z584.js";
@@ -3,7 +3,7 @@ import {
3
3
  maskTrackingParameters,
4
4
  redactTrackingValue2,
5
5
  sendUnloadBeacon2
6
- } from "../index-8vzh5wpv.js";
6
+ } from "../index-rw1caff2.js";
7
7
  import {
8
8
  ApiError2
9
9
  } from "../index-kfjkb396.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  projectToolSurface
3
- } from "./index-84tp547a.js";
3
+ } from "./index-edpkm3k7.js";
4
4
 
5
5
  // src/tools/manifest.ts
6
6
  function utf8Length(value) {
@@ -66,7 +66,8 @@ var AgentAttemptResetEventSchema2 = EventIdentitySchema.extend({
66
66
  type: z.literal("attempt-reset"),
67
67
  runtimeEpoch: z.string().min(1),
68
68
  sequence: z.int().nonnegative(),
69
- attempt: z.int().positive()
69
+ attempt: z.int().positive(),
70
+ withdrawn: z.object({ text: z.int().nonnegative(), reasoning: z.int().nonnegative() }).optional()
70
71
  });
71
72
  var AgentCheckpointEventSchema2 = EventIdentitySchema.extend({
72
73
  type: z.literal("assistant-checkpoint"),
@@ -2,6 +2,9 @@ import {
2
2
  LiveStatePhaseSchema2,
3
3
  LiveStateStopReasonSchema2
4
4
  } from "./index-jmaw365j.js";
5
+ import {
6
+ setOwnMember
7
+ } from "./index-3tb82xr7.js";
5
8
  import {
6
9
  serializeCanonicalJson
7
10
  } from "./index-fmzg39a8.js";
@@ -53,12 +56,12 @@ function objectDiff(previous, next) {
53
56
  const drop = [];
54
57
  for (const key of Object.keys(next)) {
55
58
  if (!Object.hasOwn(previous, key)) {
56
- set[key] = { t: "set", v: next[key] };
59
+ setOwnMember(set, key, { t: "set", v: next[key] });
57
60
  continue;
58
61
  }
59
62
  const nested = diff(previous[key], next[key]);
60
63
  if (nested !== undefined)
61
- set[key] = nested;
64
+ setOwnMember(set, key, nested);
62
65
  }
63
66
  for (const key of Object.keys(previous)) {
64
67
  if (!Object.hasOwn(next, key))
@@ -144,7 +147,7 @@ function apply(previous, delta) {
144
147
  for (const key of delta.drop ?? [])
145
148
  delete result[key];
146
149
  for (const [key, nested] of Object.entries(delta.set ?? {})) {
147
- result[key] = apply(Object.hasOwn(result, key) ? result[key] : undefined, nested);
150
+ setOwnMember(result, key, apply(Object.hasOwn(result, key) ? result[key] : undefined, nested));
148
151
  }
149
152
  return result;
150
153
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-dsa676h8.js";
4
4
  import {
5
5
  toJsonSchema
6
- } from "./index-wdb5jhas.js";
6
+ } from "./index-d1pdv8qc.js";
7
7
  import {
8
8
  inspectOnlyError,
9
9
  resolveToolAccess,
@@ -13,11 +13,11 @@ import {
13
13
  collectTools2,
14
14
  createToolRunner,
15
15
  formatToolError
16
- } from "./index-d4at0q09.js";
16
+ } from "./index-b9mj31q7.js";
17
17
  import {
18
18
  toolSurfaceOutputSchema,
19
19
  presentationMetadata
20
- } from "./index-84tp547a.js";
20
+ } from "./index-edpkm3k7.js";
21
21
  import {
22
22
  publishedToolAnnotations
23
23
  } from "./index-0x4mnwg5.js";
@@ -26,7 +26,7 @@ import {
26
26
  validateMcpRoundPolicy,
27
27
  validateResolvedInputRounds,
28
28
  prepareProjectedMcpTools
29
- } from "./index-gs0jw0hy.js";
29
+ } from "./index-efbzm2se.js";
30
30
  import {
31
31
  markProtocolOutcome
32
32
  } from "./index-cfnmvcq8.js";
@@ -48,14 +48,14 @@ import {
48
48
  } from "./index-5t4fpdct.js";
49
49
  import {
50
50
  projectJsonSafe
51
- } from "./index-5awtbyns.js";
51
+ } from "./index-9vj869rx.js";
52
52
  import {
53
53
  collectToolSurface
54
- } from "./index-baba8ehy.js";
54
+ } from "./index-bjrcbcn2.js";
55
55
  import {
56
56
  runWithRequestContext2,
57
57
  getRequestContext2
58
- } from "./index-x6sp5vpa.js";
58
+ } from "./index-q4tr9vnf.js";
59
59
  import {
60
60
  defineRuntimeTool2
61
61
  } from "./index-7csn6pva.js";
@@ -349,9 +349,9 @@ function roundPlanDigest(requests) {
349
349
  });
350
350
  }
351
351
  async function resolveRequests(options, policy) {
352
- const declared = staticInputRounds(policy);
353
- if (declared)
354
- return { requests: declared, guarded: false };
352
+ const resolver = policy.inputRequired;
353
+ if (typeof resolver !== "function")
354
+ return { requests: resolver, guarded: false };
355
355
  const parsed = parseToolCallArguments(options.tool.method, options.rawArgs, {
356
356
  coerceJson: options.coerceJsonArgs ?? true,
357
357
  toolSurface: true
@@ -359,7 +359,6 @@ async function resolveRequests(options, policy) {
359
359
  if (!parsed.ok) {
360
360
  return { requests: [], guarded: false };
361
361
  }
362
- const resolver = policy.inputRequired;
363
362
  const resolved = await resolver({ params: parsed.params, input: parsed.input });
364
363
  validateResolvedInputRounds(options.tool, resolved, options.runtime?.maxRounds ?? 1);
365
364
  return { requests: resolved, guarded: false };
@@ -1,6 +1,7 @@
1
1
  import {
2
+ isSecretKeyName,
2
3
  maskSecretShapes
3
- } from "./index-sznqf8fx.js";
4
+ } from "./index-xrbrvn15.js";
4
5
  import {
5
6
  isUnsafeKey
6
7
  } from "./index-zsarb5xp.js";
@@ -9,49 +10,6 @@ import {
9
10
  } from "./index-ps3djm8d.js";
10
11
 
11
12
  // src/observability/sanitize.ts
12
- var SENSITIVE_WORDS = new Set([
13
- "password",
14
- "passwords",
15
- "passwd",
16
- "pwd",
17
- "secret",
18
- "secrets",
19
- "token",
20
- "tokens",
21
- "apikey",
22
- "auth",
23
- "authorization",
24
- "bearer",
25
- "cookie",
26
- "cookies",
27
- "credential",
28
- "credentials"
29
- ]);
30
- var SENSITIVE_WORD_PAIRS = new Set([
31
- "apikey",
32
- "privatekey",
33
- "initdata",
34
- "sessionid",
35
- "sessionkey"
36
- ]);
37
- var SENSITIVE_EXACT = new Set(["session"]);
38
- function splitKeyWords(key) {
39
- return key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 0);
40
- }
41
- function isSensitiveKeyDefault(key) {
42
- const words = splitKeyWords(key);
43
- if (words.length === 1 && SENSITIVE_EXACT.has(words[0] ?? ""))
44
- return true;
45
- for (let index = 0;index < words.length; index += 1) {
46
- const word = words[index] ?? "";
47
- if (SENSITIVE_WORDS.has(word))
48
- return true;
49
- const next = words[index + 1];
50
- if (next !== undefined && SENSITIVE_WORD_PAIRS.has(word + next))
51
- return true;
52
- }
53
- return false;
54
- }
55
13
  var DEFAULT_MAX_BYTES = 16000;
56
14
  var DEFAULT_MAX_DEPTH = 20;
57
15
  var DEFAULT_MAX_NODES = 20000;
@@ -69,7 +27,7 @@ function secretMasker(options, isSecretName) {
69
27
  output = output.replace(global, MASK);
70
28
  } catch {}
71
29
  }
72
- return maskSecretShapes(output, MASK, isSecretName);
30
+ return maskSecretShapes(output, { mask: MASK, isSecretName });
73
31
  };
74
32
  }
75
33
  var ERROR_CORE = new Set(["_type", "name", "message", "stack", "cause"]);
@@ -110,9 +68,9 @@ function pathMatcher(patterns) {
110
68
  }
111
69
  function redact2(value, options = {}) {
112
70
  const custom = options.sensitiveKeys;
113
- const isSensitive = custom === undefined ? isSensitiveKeyDefault : (key) => {
71
+ const isSensitive = custom === undefined ? isSecretKeyName : (key) => {
114
72
  custom.lastIndex = 0;
115
- return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSensitiveKeyDefault(key);
73
+ return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSecretKeyName(key);
116
74
  };
117
75
  const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
118
76
  const maxStringLength = options.maxStringLength ?? Number.POSITIVE_INFINITY;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AgentControlRequestSchema2,
3
3
  AgentControlResponseSchema2
4
- } from "./index-yhwx4fwk.js";
4
+ } from "./index-kzsetgh9.js";
5
5
  import {
6
6
  createAgentRuntimeEventSink2
7
- } from "./index-d3s070eh.js";
7
+ } from "./index-jperyn0c.js";
8
8
  import {
9
9
  assertPositiveSafeInteger
10
10
  } from "./index-gr0kxymw.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TYPE_DEFINING_KEYWORDS
3
- } from "./index-9be3tf6r.js";
3
+ } from "./index-e413q2cj.js";
4
4
  import {
5
5
  isRecord
6
6
  } from "./index-ps3djm8d.js";
@@ -0,0 +1,11 @@
1
+ // src/internal/own-member.ts
2
+ function setOwnMember(target, key, value) {
3
+ Object.defineProperty(target, key, {
4
+ value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ }
10
+
11
+ export { setOwnMember };
@@ -9,7 +9,7 @@ import {
9
9
  nextEventSeqByMaximum,
10
10
  agentSqlTables,
11
11
  createAgentRuntimeStore2
12
- } from "./index-v0j22shs.js";
12
+ } from "./index-rg08syp1.js";
13
13
  import {
14
14
  canonicalAgentJson2
15
15
  } from "./index-qcy8et93.js";
@@ -24,7 +24,7 @@ import {
24
24
  scanSqlRecoverable,
25
25
  listSqlConversations,
26
26
  pageSqlConversationMessages
27
- } from "./index-wsv11dhg.js";
27
+ } from "./index-hberxns4.js";
28
28
  import {
29
29
  rollbackSqliteFailure
30
30
  } from "./index-ttexdtjj.js";
@@ -54,6 +54,8 @@ async function verifyJwt2(token, secret, options = {}) {
54
54
  throw unauthorized2("Malformed token");
55
55
  if (payload.exp < now - leeway)
56
56
  throw unauthorized2("Token expired");
57
+ } else if ((options.expiration ?? "required") === "required") {
58
+ throw unauthorized2("Token has no expiry");
57
59
  }
58
60
  if ("nbf" in payload) {
59
61
  if (typeof payload.nbf !== "number")
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  toJsonSchema
3
- } from "./index-wdb5jhas.js";
3
+ } from "./index-d1pdv8qc.js";
4
4
  import {
5
5
  localVerdict
6
6
  } from "./index-dsa676h8.js";
@@ -12,13 +12,13 @@ import {
12
12
  isToolExecutionControlError2,
13
13
  createToolRunner,
14
14
  formatToolError
15
- } from "./index-d4at0q09.js";
15
+ } from "./index-b9mj31q7.js";
16
16
  import {
17
17
  flattenToolJsonSchema2
18
- } from "./index-84tp547a.js";
18
+ } from "./index-edpkm3k7.js";
19
19
  import {
20
20
  collectToolSurface
21
- } from "./index-baba8ehy.js";
21
+ } from "./index-bjrcbcn2.js";
22
22
  import {
23
23
  agentPresenterOf
24
24
  } from "./index-7csn6pva.js";