stitchkit 0.93.0 → 0.94.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1082) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/README.md +5 -2
  3. package/dist/agent-runtime/children-control.d.ts +6 -0
  4. package/dist/agent-runtime/children-control.d.ts.map +1 -0
  5. package/dist/agent-runtime/children-spawn.d.ts +6 -0
  6. package/dist/agent-runtime/children-spawn.d.ts.map +1 -0
  7. package/dist/agent-runtime/children-state.d.ts +46 -0
  8. package/dist/agent-runtime/children-state.d.ts.map +1 -0
  9. package/dist/agent-runtime/children-usage.d.ts +8 -0
  10. package/dist/agent-runtime/children-usage.d.ts.map +1 -0
  11. package/dist/agent-runtime/children.d.ts +11 -14
  12. package/dist/agent-runtime/children.d.ts.map +1 -1
  13. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  14. package/dist/agent-runtime/coding-tool-contract.d.ts +2 -1
  15. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  16. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  17. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  18. package/dist/agent-runtime/contained-darwin.d.ts +38 -0
  19. package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
  20. package/dist/agent-runtime/contained-files.d.ts +11 -26
  21. package/dist/agent-runtime/contained-files.d.ts.map +1 -1
  22. package/dist/agent-runtime/contained-scan.d.ts +21 -0
  23. package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
  24. package/dist/agent-runtime/contained-write.d.ts +9 -0
  25. package/dist/agent-runtime/contained-write.d.ts.map +1 -0
  26. package/dist/agent-runtime/deferred-tool-types.d.ts +4 -3
  27. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  28. package/dist/agent-runtime/events.d.ts +1 -1
  29. package/dist/agent-runtime/events.d.ts.map +1 -1
  30. package/dist/agent-runtime/harness-control.d.ts +0 -1
  31. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  32. package/dist/agent-runtime/harness.d.ts +0 -5
  33. package/dist/agent-runtime/harness.d.ts.map +1 -1
  34. package/dist/agent-runtime/managed-tools.d.ts +3 -2
  35. package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
  36. package/dist/agent-runtime/observability.d.ts +1 -1
  37. package/dist/agent-runtime/observability.d.ts.map +1 -1
  38. package/dist/agent-runtime/openrouter.d.ts +29 -0
  39. package/dist/agent-runtime/openrouter.d.ts.map +1 -0
  40. package/dist/agent-runtime/projections.d.ts +1 -1
  41. package/dist/agent-runtime/projections.d.ts.map +1 -1
  42. package/dist/agent-runtime/run-acquisition.d.ts +17 -0
  43. package/dist/agent-runtime/run-acquisition.d.ts.map +1 -0
  44. package/dist/agent-runtime/run-execution-state.d.ts +133 -0
  45. package/dist/agent-runtime/run-execution-state.d.ts.map +1 -0
  46. package/dist/agent-runtime/run-execution.d.ts +17 -33
  47. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  48. package/dist/agent-runtime/run-failure.d.ts +18 -0
  49. package/dist/agent-runtime/run-failure.d.ts.map +1 -0
  50. package/dist/agent-runtime/run-model-attempts.d.ts +6 -0
  51. package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -0
  52. package/dist/agent-runtime/run-prompt-history.d.ts +58 -0
  53. package/dist/agent-runtime/run-prompt-history.d.ts.map +1 -0
  54. package/dist/agent-runtime/run-provider-ledger.d.ts +26 -0
  55. package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -0
  56. package/dist/agent-runtime/run-stream-parts.d.ts +17 -0
  57. package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -0
  58. package/dist/agent-runtime/run-terminal.d.ts +11 -0
  59. package/dist/agent-runtime/run-terminal.d.ts.map +1 -0
  60. package/dist/agent-runtime/run-turn-preparation.d.ts +22 -0
  61. package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -0
  62. package/dist/agent-runtime/runtime-admission-gate.d.ts +29 -0
  63. package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -0
  64. package/dist/agent-runtime/runtime-control.d.ts +9 -0
  65. package/dist/agent-runtime/runtime-control.d.ts.map +1 -0
  66. package/dist/agent-runtime/runtime-recovery.d.ts +10 -0
  67. package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -0
  68. package/dist/agent-runtime/runtime-state.d.ts +36 -0
  69. package/dist/agent-runtime/runtime-state.d.ts.map +1 -0
  70. package/dist/agent-runtime/runtime-submit.d.ts +5 -0
  71. package/dist/agent-runtime/runtime-submit.d.ts.map +1 -0
  72. package/dist/agent-runtime/runtime.d.ts +10 -5
  73. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  74. package/dist/agent-runtime/schedule-records.d.ts +34 -0
  75. package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
  76. package/dist/agent-runtime/schedules.d.ts +34 -0
  77. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  78. package/dist/agent-runtime/sqlite-bun.d.ts +12 -0
  79. package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -0
  80. package/dist/agent-runtime/sqlite-events.d.ts +5 -0
  81. package/dist/agent-runtime/sqlite-events.d.ts.map +1 -0
  82. package/dist/agent-runtime/sqlite-history.d.ts +7 -0
  83. package/dist/agent-runtime/sqlite-history.d.ts.map +1 -0
  84. package/dist/agent-runtime/sqlite-ledger.d.ts +7 -0
  85. package/dist/agent-runtime/sqlite-ledger.d.ts.map +1 -0
  86. package/dist/agent-runtime/sqlite-node.d.ts +12 -0
  87. package/dist/agent-runtime/sqlite-node.d.ts.map +1 -0
  88. package/dist/agent-runtime/sqlite-reads.d.ts +14 -0
  89. package/dist/agent-runtime/sqlite-reads.d.ts.map +1 -0
  90. package/dist/agent-runtime/sqlite-rows.d.ts +178 -0
  91. package/dist/agent-runtime/sqlite-rows.d.ts.map +1 -0
  92. package/dist/agent-runtime/sqlite-schema.d.ts +7 -0
  93. package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -0
  94. package/dist/agent-runtime/sqlite-transactions.d.ts +25 -0
  95. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -0
  96. package/dist/agent-runtime/sqlite.d.ts +10 -6
  97. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  98. package/dist/agent-runtime/store-archive.d.ts +16 -0
  99. package/dist/agent-runtime/store-archive.d.ts.map +1 -0
  100. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
  101. package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
  102. package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
  103. package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
  104. package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
  105. package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
  106. package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
  107. package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
  108. package/dist/agent-runtime/store-conformance.d.ts +40 -0
  109. package/dist/agent-runtime/store-conformance.d.ts.map +1 -0
  110. package/dist/agent-runtime/store-create.d.ts +11 -0
  111. package/dist/agent-runtime/store-create.d.ts.map +1 -0
  112. package/dist/agent-runtime/store-driver-contract.d.ts +814 -0
  113. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -0
  114. package/dist/agent-runtime/store-events.d.ts +7 -89
  115. package/dist/agent-runtime/store-events.d.ts.map +1 -1
  116. package/dist/agent-runtime/store-memory.d.ts +4 -0
  117. package/dist/agent-runtime/store-memory.d.ts.map +1 -0
  118. package/dist/agent-runtime/store-mutate.d.ts +13 -0
  119. package/dist/agent-runtime/store-mutate.d.ts.map +1 -0
  120. package/dist/agent-runtime/store-purge.d.ts +1 -1
  121. package/dist/agent-runtime/store-purge.d.ts.map +1 -1
  122. package/dist/agent-runtime/store-reads.d.ts +29 -0
  123. package/dist/agent-runtime/store-reads.d.ts.map +1 -0
  124. package/dist/agent-runtime/store-reduce-history.d.ts +10 -0
  125. package/dist/agent-runtime/store-reduce-history.d.ts.map +1 -0
  126. package/dist/agent-runtime/store-reduce-run.d.ts +14 -0
  127. package/dist/agent-runtime/store-reduce-run.d.ts.map +1 -0
  128. package/dist/agent-runtime/store-reduce-shared.d.ts +76 -0
  129. package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -0
  130. package/dist/agent-runtime/store-reduce-terminal.d.ts +6 -0
  131. package/dist/agent-runtime/store-reduce-terminal.d.ts.map +1 -0
  132. package/dist/agent-runtime/store-reducer.d.ts +24 -0
  133. package/dist/agent-runtime/store-reducer.d.ts.map +1 -0
  134. package/dist/agent-runtime/store-snapshot.d.ts +19 -0
  135. package/dist/agent-runtime/store-snapshot.d.ts.map +1 -0
  136. package/dist/agent-runtime/store.d.ts +1 -1
  137. package/dist/agent-runtime/store.d.ts.map +1 -1
  138. package/dist/application/admission-rate.d.ts +21 -0
  139. package/dist/application/admission-rate.d.ts.map +1 -0
  140. package/dist/application/admission-run.d.ts +8 -0
  141. package/dist/application/admission-run.d.ts.map +1 -0
  142. package/dist/application/admission.d.ts +1 -1
  143. package/dist/application/admission.d.ts.map +1 -1
  144. package/dist/application/diagnostic-journal-lock.d.ts +9 -34
  145. package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
  146. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
  147. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
  148. package/dist/application/events.d.ts +1 -1
  149. package/dist/application/events.d.ts.map +1 -1
  150. package/dist/application/file-state-store.d.ts +23 -0
  151. package/dist/application/file-state-store.d.ts.map +1 -0
  152. package/dist/application/health.d.ts +1 -1
  153. package/dist/application/health.d.ts.map +1 -1
  154. package/dist/application/kernel-admission.d.ts +8 -0
  155. package/dist/application/kernel-admission.d.ts.map +1 -0
  156. package/dist/application/kernel-contract.d.ts +142 -0
  157. package/dist/application/kernel-contract.d.ts.map +1 -0
  158. package/dist/application/kernel-resource-context.d.ts +24 -0
  159. package/dist/application/kernel-resource-context.d.ts.map +1 -0
  160. package/dist/application/kernel-restart.d.ts +5 -0
  161. package/dist/application/kernel-restart.d.ts.map +1 -0
  162. package/dist/application/kernel-rollback.d.ts +4 -0
  163. package/dist/application/kernel-rollback.d.ts.map +1 -0
  164. package/dist/application/kernel-shutdown.d.ts +6 -0
  165. package/dist/application/kernel-shutdown.d.ts.map +1 -0
  166. package/dist/application/kernel-start.d.ts +20 -0
  167. package/dist/application/kernel-start.d.ts.map +1 -0
  168. package/dist/application/kernel-state.d.ts +116 -0
  169. package/dist/application/kernel-state.d.ts.map +1 -0
  170. package/dist/application/kernel.d.ts +9 -140
  171. package/dist/application/kernel.d.ts.map +1 -1
  172. package/dist/application/latest-sink.d.ts +1 -1
  173. package/dist/application/latest-sink.d.ts.map +1 -1
  174. package/dist/application/notification-outbox.d.ts.map +1 -1
  175. package/dist/application/opentelemetry.d.ts +1 -1
  176. package/dist/application/opentelemetry.d.ts.map +1 -1
  177. package/dist/application/schedule.d.ts +0 -1
  178. package/dist/application/schedule.d.ts.map +1 -1
  179. package/dist/application/watch-hub-core.d.ts +122 -0
  180. package/dist/application/watch-hub-core.d.ts.map +1 -0
  181. package/dist/application/watch-hub.d.ts +3 -3
  182. package/dist/application/watch-hub.d.ts.map +1 -1
  183. package/dist/browser/client-executors.d.ts +14 -0
  184. package/dist/browser/client-executors.d.ts.map +1 -0
  185. package/dist/browser/client-multipart.d.ts +1 -1
  186. package/dist/browser/client-multipart.d.ts.map +1 -1
  187. package/dist/browser/client-url.d.ts +1 -1
  188. package/dist/browser/client-url.d.ts.map +1 -1
  189. package/dist/browser/client.d.ts +3 -2
  190. package/dist/browser/client.d.ts.map +1 -1
  191. package/dist/browser/contract-stream.d.ts +1 -1
  192. package/dist/browser/contract-stream.d.ts.map +1 -1
  193. package/dist/browser/http-fetch.d.ts +22 -0
  194. package/dist/browser/http-fetch.d.ts.map +1 -0
  195. package/dist/browser/http.d.ts +2 -4
  196. package/dist/browser/http.d.ts.map +1 -1
  197. package/dist/browser/live-state-core.d.ts +63 -0
  198. package/dist/browser/live-state-core.d.ts.map +1 -0
  199. package/dist/browser/live-state.d.ts.map +1 -1
  200. package/dist/browser/realtime-client.d.ts +26 -0
  201. package/dist/browser/realtime-client.d.ts.map +1 -0
  202. package/dist/browser/resumable.d.ts +1 -28
  203. package/dist/browser/resumable.d.ts.map +1 -1
  204. package/dist/browser/retained.d.ts.map +1 -0
  205. package/dist/browser/socket-io-connection.d.ts +82 -0
  206. package/dist/browser/socket-io-connection.d.ts.map +1 -0
  207. package/dist/browser/socket-io-peer.d.ts +20 -0
  208. package/dist/browser/socket-io-peer.d.ts.map +1 -0
  209. package/dist/browser/socket-io-trace.d.ts +31 -0
  210. package/dist/browser/socket-io-trace.d.ts.map +1 -0
  211. package/dist/browser/socket-io.d.ts +24 -18
  212. package/dist/browser/socket-io.d.ts.map +1 -1
  213. package/dist/browser/stream.d.ts +14 -2
  214. package/dist/browser/stream.d.ts.map +1 -1
  215. package/dist/contract/client-types.d.ts +134 -0
  216. package/dist/contract/client-types.d.ts.map +1 -0
  217. package/dist/contract/define-validation.d.ts +30 -0
  218. package/dist/contract/define-validation.d.ts.map +1 -0
  219. package/dist/contract/define.d.ts +47 -394
  220. package/dist/contract/define.d.ts.map +1 -1
  221. package/dist/contract/normalize.d.ts +56 -0
  222. package/dist/contract/normalize.d.ts.map +1 -0
  223. package/dist/contract/runtime-context.d.ts +131 -0
  224. package/dist/contract/runtime-context.d.ts.map +1 -0
  225. package/dist/contract/tool-options.d.ts +105 -0
  226. package/dist/contract/tool-options.d.ts.map +1 -0
  227. package/dist/contract/tool-view.d.ts +148 -0
  228. package/dist/contract/tool-view.d.ts.map +1 -0
  229. package/dist/declaration/declaration.d.ts.map +1 -0
  230. package/dist/durability/contract.d.ts +259 -0
  231. package/dist/durability/contract.d.ts.map +1 -0
  232. package/dist/durability/effect.d.ts +24 -0
  233. package/dist/durability/effect.d.ts.map +1 -0
  234. package/dist/durability/engine.d.ts +14 -0
  235. package/dist/durability/engine.d.ts.map +1 -0
  236. package/dist/durability/events.d.ts +103 -0
  237. package/dist/durability/events.d.ts.map +1 -0
  238. package/dist/durability/json.d.ts +3 -0
  239. package/dist/durability/json.d.ts.map +1 -0
  240. package/dist/durability/ledger.d.ts +27 -0
  241. package/dist/durability/ledger.d.ts.map +1 -0
  242. package/dist/durability/parks.d.ts +22 -0
  243. package/dist/durability/parks.d.ts.map +1 -0
  244. package/dist/durability/scheduler.d.ts +30 -0
  245. package/dist/durability/scheduler.d.ts.map +1 -0
  246. package/dist/entrypoints/agent-runtime/browser.d.ts +5 -0
  247. package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -0
  248. package/dist/entrypoints/agent-runtime/browser.js +124 -0
  249. package/dist/entrypoints/agent-runtime/coding-tools.d.ts +2 -0
  250. package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -0
  251. package/dist/entrypoints/agent-runtime/coding-tools.js +22 -0
  252. package/dist/entrypoints/agent-runtime/harness.d.ts +2 -0
  253. package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -0
  254. package/dist/entrypoints/agent-runtime/harness.js +739 -0
  255. package/dist/entrypoints/agent-runtime/openrouter.d.ts +2 -0
  256. package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -0
  257. package/dist/entrypoints/agent-runtime/openrouter.js +270 -0
  258. package/dist/entrypoints/agent-runtime/sandbox.d.ts +5 -0
  259. package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -0
  260. package/dist/entrypoints/agent-runtime/sandbox.js +797 -0
  261. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts +2 -0
  262. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts.map +1 -0
  263. package/dist/entrypoints/agent-runtime/sqlite/bun.js +44 -0
  264. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts +2 -0
  265. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts.map +1 -0
  266. package/dist/entrypoints/agent-runtime/sqlite/node.js +46 -0
  267. package/dist/entrypoints/agent-runtime/testing.d.ts +4 -0
  268. package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -0
  269. package/dist/entrypoints/agent-runtime/testing.js +1116 -0
  270. package/dist/entrypoints/agent-runtime.d.ts +42 -0
  271. package/dist/entrypoints/agent-runtime.d.ts.map +1 -0
  272. package/dist/entrypoints/agent-runtime.js +2670 -0
  273. package/dist/entrypoints/application/diagnostic-journal.d.ts +21 -0
  274. package/dist/entrypoints/application/diagnostic-journal.d.ts.map +1 -0
  275. package/dist/entrypoints/application/diagnostic-journal.js +492 -0
  276. package/dist/entrypoints/application/grammy.d.ts +2 -0
  277. package/dist/entrypoints/application/grammy.d.ts.map +1 -0
  278. package/dist/entrypoints/application/grammy.js +169 -0
  279. package/dist/entrypoints/application/opentelemetry.d.ts +2 -0
  280. package/dist/entrypoints/application/opentelemetry.d.ts.map +1 -0
  281. package/dist/entrypoints/application/opentelemetry.js +250 -0
  282. package/dist/entrypoints/application/schemas.d.ts +15 -0
  283. package/dist/entrypoints/application/schemas.d.ts.map +1 -0
  284. package/dist/entrypoints/application/schemas.js +27 -0
  285. package/dist/entrypoints/application.d.ts +23 -0
  286. package/dist/entrypoints/application.d.ts.map +1 -0
  287. package/dist/entrypoints/application.js +2016 -0
  288. package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -0
  289. package/dist/entrypoints/bin/upgrade-cli.js +177 -0
  290. package/dist/entrypoints/cli.d.ts +44 -0
  291. package/dist/entrypoints/cli.d.ts.map +1 -0
  292. package/dist/entrypoints/cli.js +773 -0
  293. package/dist/entrypoints/contract.d.ts +12 -0
  294. package/dist/entrypoints/contract.d.ts.map +1 -0
  295. package/dist/entrypoints/contract.js +64 -0
  296. package/dist/entrypoints/declaration.d.ts +2 -0
  297. package/dist/entrypoints/declaration.d.ts.map +1 -0
  298. package/dist/entrypoints/declaration.js +183 -0
  299. package/dist/entrypoints/files.d.ts +5 -0
  300. package/dist/entrypoints/files.d.ts.map +1 -0
  301. package/dist/entrypoints/files.js +111 -0
  302. package/dist/entrypoints/geo.d.ts +3 -0
  303. package/dist/entrypoints/geo.d.ts.map +1 -0
  304. package/dist/entrypoints/geo.js +245 -0
  305. package/dist/entrypoints/google.d.ts +2 -0
  306. package/dist/entrypoints/google.d.ts.map +1 -0
  307. package/dist/entrypoints/google.js +175 -0
  308. package/dist/entrypoints/index.d.ts +17 -0
  309. package/dist/entrypoints/index.d.ts.map +1 -0
  310. package/dist/entrypoints/index.js +764 -0
  311. package/dist/entrypoints/live.d.ts +19 -0
  312. package/dist/entrypoints/live.d.ts.map +1 -0
  313. package/dist/entrypoints/live.js +302 -0
  314. package/dist/entrypoints/node.d.ts +19 -0
  315. package/dist/entrypoints/node.d.ts.map +1 -0
  316. package/dist/entrypoints/node.js +308 -0
  317. package/dist/entrypoints/oauth.d.ts +2 -0
  318. package/dist/entrypoints/oauth.d.ts.map +1 -0
  319. package/dist/entrypoints/oauth.js +170 -0
  320. package/dist/entrypoints/observability.d.ts +19 -0
  321. package/dist/entrypoints/observability.d.ts.map +1 -0
  322. package/dist/entrypoints/observability.js +567 -0
  323. package/dist/entrypoints/primitives.d.ts +3 -0
  324. package/dist/entrypoints/primitives.d.ts.map +1 -0
  325. package/dist/entrypoints/primitives.js +749 -0
  326. package/dist/entrypoints/react.d.ts +5 -0
  327. package/dist/entrypoints/react.d.ts.map +1 -0
  328. package/dist/entrypoints/react.js +403 -0
  329. package/dist/entrypoints/release.d.ts +15 -0
  330. package/dist/entrypoints/release.d.ts.map +1 -0
  331. package/dist/entrypoints/release.js +196 -0
  332. package/dist/entrypoints/remote.d.ts +9 -0
  333. package/dist/entrypoints/remote.d.ts.map +1 -0
  334. package/dist/entrypoints/remote.js +66 -0
  335. package/dist/entrypoints/server.d.ts +39 -0
  336. package/dist/entrypoints/server.d.ts.map +1 -0
  337. package/dist/entrypoints/server.js +2009 -0
  338. package/dist/entrypoints/telegram.d.ts +3 -0
  339. package/dist/entrypoints/telegram.d.ts.map +1 -0
  340. package/dist/entrypoints/telegram.js +224 -0
  341. package/dist/entrypoints/testing.d.ts +10 -0
  342. package/dist/entrypoints/testing.d.ts.map +1 -0
  343. package/dist/entrypoints/testing.js +1377 -0
  344. package/dist/entrypoints/tools/connections.d.ts +19 -0
  345. package/dist/entrypoints/tools/connections.d.ts.map +1 -0
  346. package/dist/entrypoints/tools/connections.js +1110 -0
  347. package/dist/entrypoints/tools/contract.d.ts +29 -0
  348. package/dist/entrypoints/tools/contract.d.ts.map +1 -0
  349. package/dist/entrypoints/tools/contract.js +24 -0
  350. package/dist/entrypoints/tools/invoker.d.ts +9 -0
  351. package/dist/entrypoints/tools/invoker.d.ts.map +1 -0
  352. package/dist/entrypoints/tools/invoker.js +20 -0
  353. package/dist/entrypoints/tools.d.ts +54 -0
  354. package/dist/entrypoints/tools.d.ts.map +1 -0
  355. package/dist/entrypoints/tools.js +3009 -0
  356. package/dist/entrypoints/tracking/server.d.ts +15 -0
  357. package/dist/entrypoints/tracking/server.d.ts.map +1 -0
  358. package/dist/entrypoints/tracking.d.ts +24 -0
  359. package/dist/entrypoints/tracking.d.ts.map +1 -0
  360. package/dist/entrypoints/tracking.js +1140 -0
  361. package/dist/files/boundary.d.ts.map +1 -1
  362. package/dist/files/file-io.d.ts +14 -0
  363. package/dist/files/file-io.d.ts.map +1 -0
  364. package/dist/google/google.d.ts.map +1 -0
  365. package/dist/index-0b1ess5e.js +38 -0
  366. package/dist/index-1j8pm5t0.js +412 -0
  367. package/dist/index-1zbbzgfh.js +89 -0
  368. package/dist/index-2bxbyab0.js +47 -0
  369. package/dist/index-2gxzjvyr.js +266 -0
  370. package/dist/index-35mh5bhj.js +177 -0
  371. package/dist/index-48ffdxgk.js +6 -0
  372. package/dist/index-4gcnakhx.js +82 -0
  373. package/dist/index-55hkhm67.js +343 -0
  374. package/dist/index-79z7m7dt.js +675 -0
  375. package/dist/index-7f68ghdn.js +3618 -0
  376. package/dist/index-7p1f0vp2.js +154 -0
  377. package/dist/index-83bdg97s.js +16 -0
  378. package/dist/index-863ea9jb.js +154 -0
  379. package/dist/index-8p52kd5p.js +242 -0
  380. package/dist/index-d9pk3td4.js +326 -0
  381. package/dist/index-dce5wxcq.js +63 -0
  382. package/dist/index-e01r054k.js +105 -0
  383. package/dist/index-ensd0r74.js +595 -0
  384. package/dist/index-eqqvgdb3.js +46 -0
  385. package/dist/index-gxrt5h6v.js +341 -0
  386. package/dist/index-h6eeys1v.js +211 -0
  387. package/dist/index-ham5sz8m.js +734 -0
  388. package/dist/index-het2he5g.js +1387 -0
  389. package/dist/index-hffjpmq9.js +30 -0
  390. package/dist/index-hmp4800j.js +51 -0
  391. package/dist/index-k30h66yd.js +317 -0
  392. package/dist/index-k5hsfc3j.js +31 -0
  393. package/dist/index-khtgb21r.js +92 -0
  394. package/dist/index-m9zn6cpq.js +51 -0
  395. package/dist/index-ndddxtyx.js +324 -0
  396. package/dist/index-ngfhvfpd.js +30 -0
  397. package/dist/index-np4m8hd3.js +1205 -0
  398. package/dist/index-p3vsv1fb.js +3493 -0
  399. package/dist/index-p5r7qpdd.js +85 -0
  400. package/dist/index-p9e0w8hs.js +1084 -0
  401. package/dist/index-p9sh0xx4.js +64 -0
  402. package/dist/index-paz6sgdp.js +371 -0
  403. package/dist/index-px2gm2jp.js +448 -0
  404. package/dist/index-qwhynv6x.js +103 -0
  405. package/dist/index-s812ycat.js +65 -0
  406. package/dist/index-sp1tzwnb.js +281 -0
  407. package/dist/index-t9rhjr9f.js +2306 -0
  408. package/dist/index-v260df89.js +342 -0
  409. package/dist/index-w906953s.js +946 -0
  410. package/dist/index-wdkt63w3.js +214 -0
  411. package/dist/index-wqgjfstn.js +18 -0
  412. package/dist/index-wsm5w4ee.js +1023 -0
  413. package/dist/index-xw3s75nj.js +100 -0
  414. package/dist/index-yw4fzmdz.js +268 -0
  415. package/dist/index-zfrhfn82.js +85 -0
  416. package/dist/index-znfs20ss.js +98 -0
  417. package/dist/internal/atomic-file.d.ts +23 -2
  418. package/dist/internal/atomic-file.d.ts.map +1 -1
  419. package/dist/internal/backoff.d.ts +29 -0
  420. package/dist/internal/backoff.d.ts.map +1 -0
  421. package/dist/internal/canonical-json.d.ts +21 -11
  422. package/dist/internal/canonical-json.d.ts.map +1 -1
  423. package/dist/internal/channel.d.ts.map +1 -0
  424. package/dist/internal/exclusive-lock.d.ts +51 -0
  425. package/dist/internal/exclusive-lock.d.ts.map +1 -0
  426. package/dist/internal/logger.d.ts.map +1 -0
  427. package/dist/internal/process-identity.d.ts +47 -0
  428. package/dist/internal/process-identity.d.ts.map +1 -0
  429. package/dist/internal/request.d.ts.map +1 -0
  430. package/dist/internal/stable-digest.d.ts +0 -43
  431. package/dist/internal/stable-digest.d.ts.map +1 -1
  432. package/dist/internal/typed.d.ts +0 -8
  433. package/dist/internal/typed.d.ts.map +1 -1
  434. package/dist/internal/with-exclusive-lock.d.ts +67 -0
  435. package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
  436. package/dist/internal/zod-issues.d.ts +38 -0
  437. package/dist/internal/zod-issues.d.ts.map +1 -0
  438. package/dist/json-schema/dialect.d.ts +17 -0
  439. package/dist/json-schema/dialect.d.ts.map +1 -0
  440. package/dist/json-schema/json-schema.d.ts.map +1 -0
  441. package/dist/live/watch-client.d.ts.map +1 -1
  442. package/dist/live/watch-delta.d.ts.map +1 -1
  443. package/dist/oauth/authorization-code.d.ts +57 -0
  444. package/dist/oauth/authorization-code.d.ts.map +1 -0
  445. package/dist/observability/audit.d.ts +3 -3
  446. package/dist/observability/audit.d.ts.map +1 -1
  447. package/dist/observability/bounded-logger.d.ts +1 -1
  448. package/dist/observability/bounded-logger.d.ts.map +1 -1
  449. package/dist/observability/bounded-sink.d.ts +81 -0
  450. package/dist/observability/bounded-sink.d.ts.map +1 -0
  451. package/dist/observability/context.d.ts +1 -1
  452. package/dist/observability/context.d.ts.map +1 -1
  453. package/dist/observability/event.d.ts +2 -1
  454. package/dist/observability/event.d.ts.map +1 -1
  455. package/dist/observability/work.d.ts +1 -1
  456. package/dist/observability/work.d.ts.map +1 -1
  457. package/dist/primitives/audit.d.ts +1 -1
  458. package/dist/primitives/audit.d.ts.map +1 -1
  459. package/dist/primitives/export-operation.d.ts +4 -2
  460. package/dist/primitives/export-operation.d.ts.map +1 -1
  461. package/dist/realtime/registry.d.ts +0 -5
  462. package/dist/realtime/registry.d.ts.map +1 -1
  463. package/dist/realtime/socket.d.ts +1 -1
  464. package/dist/realtime/socket.d.ts.map +1 -1
  465. package/dist/server/bun.d.ts +0 -1
  466. package/dist/server/bun.d.ts.map +1 -1
  467. package/dist/server/context-contribution.d.ts +1 -1
  468. package/dist/server/context-contribution.d.ts.map +1 -1
  469. package/dist/server/context.d.ts +2 -2
  470. package/dist/server/context.d.ts.map +1 -1
  471. package/dist/server/contract-method.d.ts +15 -0
  472. package/dist/server/contract-method.d.ts.map +1 -0
  473. package/dist/server/contract-stream.d.ts +1 -1
  474. package/dist/server/contract-stream.d.ts.map +1 -1
  475. package/dist/server/create.d.ts +8 -0
  476. package/dist/server/create.d.ts.map +1 -1
  477. package/dist/server/endpoint-dispatch.d.ts +10 -0
  478. package/dist/server/endpoint-dispatch.d.ts.map +1 -0
  479. package/dist/server/endpoint-response.d.ts +19 -0
  480. package/dist/server/endpoint-response.d.ts.map +1 -0
  481. package/dist/server/error-dispatch.d.ts +17 -1
  482. package/dist/server/error-dispatch.d.ts.map +1 -1
  483. package/dist/server/error-hook.d.ts +2 -2
  484. package/dist/server/error-hook.d.ts.map +1 -1
  485. package/dist/server/handler-state.d.ts +44 -0
  486. package/dist/server/handler-state.d.ts.map +1 -0
  487. package/dist/server/implement-registry.d.ts +54 -0
  488. package/dist/server/implement-registry.d.ts.map +1 -0
  489. package/dist/server/implement.d.ts +9 -55
  490. package/dist/server/implement.d.ts.map +1 -1
  491. package/dist/server/middleware/auth.d.ts +1 -31
  492. package/dist/server/middleware/auth.d.ts.map +1 -1
  493. package/dist/server/middleware/cors.d.ts +17 -0
  494. package/dist/server/middleware/cors.d.ts.map +1 -1
  495. package/dist/server/middleware/jwt.d.ts +31 -0
  496. package/dist/server/middleware/jwt.d.ts.map +1 -0
  497. package/dist/server/middleware/trust-fence.d.ts +1 -1
  498. package/dist/server/middleware/trust-fence.d.ts.map +1 -1
  499. package/dist/server/multipart-reader.d.ts +22 -0
  500. package/dist/server/multipart-reader.d.ts.map +1 -0
  501. package/dist/server/multipart.d.ts +1 -1
  502. package/dist/server/multipart.d.ts.map +1 -1
  503. package/dist/server/oauth/cimd.d.ts +88 -0
  504. package/dist/server/oauth/cimd.d.ts.map +1 -0
  505. package/dist/server/oauth/endpoints.d.ts +39 -0
  506. package/dist/server/oauth/endpoints.d.ts.map +1 -0
  507. package/dist/server/oauth/metadata.d.ts +28 -0
  508. package/dist/server/oauth/metadata.d.ts.map +1 -0
  509. package/dist/server/oauth/provider.d.ts +117 -0
  510. package/dist/server/oauth/provider.d.ts.map +1 -0
  511. package/dist/server/realtime.d.ts +1 -1
  512. package/dist/server/realtime.d.ts.map +1 -1
  513. package/dist/server/request-completion.d.ts +16 -0
  514. package/dist/server/request-completion.d.ts.map +1 -0
  515. package/dist/server/response-metadata.d.ts +1 -1
  516. package/dist/server/response-metadata.d.ts.map +1 -1
  517. package/dist/server/route-table.d.ts +9 -0
  518. package/dist/server/route-table.d.ts.map +1 -0
  519. package/dist/server/stream.d.ts +0 -13
  520. package/dist/server/stream.d.ts.map +1 -1
  521. package/dist/server/streaming-pump.d.ts +66 -0
  522. package/dist/server/streaming-pump.d.ts.map +1 -0
  523. package/dist/server/streaming-route.d.ts +12 -5
  524. package/dist/server/streaming-route.d.ts.map +1 -1
  525. package/dist/server/types.d.ts +10 -4
  526. package/dist/server/types.d.ts.map +1 -1
  527. package/dist/server/unix-client-bun.d.ts.map +1 -1
  528. package/dist/server/unix-client-http1.d.ts +76 -0
  529. package/dist/server/unix-client-http1.d.ts.map +1 -0
  530. package/dist/server/unix-client.d.ts.map +1 -1
  531. package/dist/testing/handler-clients.d.ts +32 -0
  532. package/dist/testing/handler-clients.d.ts.map +1 -0
  533. package/dist/testing/managed-resource-conformance-scenarios.d.ts.map +1 -1
  534. package/dist/testing/realtime-probe.d.ts +33 -0
  535. package/dist/testing/realtime-probe.d.ts.map +1 -0
  536. package/dist/testing/surface-conformance.d.ts +2 -32
  537. package/dist/testing/surface-conformance.d.ts.map +1 -1
  538. package/dist/testing/surface-manifest-digest.d.ts +44 -0
  539. package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
  540. package/dist/testing/surface-manifest.d.ts +30 -4
  541. package/dist/testing/surface-manifest.d.ts.map +1 -1
  542. package/dist/tools/agent.d.ts +1 -1
  543. package/dist/tools/agent.d.ts.map +1 -1
  544. package/dist/tools/cli/args-fields.d.ts +31 -0
  545. package/dist/tools/cli/args-fields.d.ts.map +1 -0
  546. package/dist/tools/cli/args-route.d.ts +42 -0
  547. package/dist/tools/cli/args-route.d.ts.map +1 -0
  548. package/dist/tools/cli/args-view.d.ts +32 -0
  549. package/dist/tools/cli/args-view.d.ts.map +1 -0
  550. package/dist/tools/cli/args.d.ts +80 -0
  551. package/dist/tools/cli/args.d.ts.map +1 -0
  552. package/dist/tools/cli/argument-error.d.ts +5 -0
  553. package/dist/tools/cli/argument-error.d.ts.map +1 -0
  554. package/dist/tools/cli/checkpoint.d.ts +24 -0
  555. package/dist/tools/cli/checkpoint.d.ts.map +1 -0
  556. package/dist/tools/cli/command.d.ts +70 -0
  557. package/dist/tools/cli/command.d.ts.map +1 -0
  558. package/dist/tools/cli/config.d.ts +90 -0
  559. package/dist/tools/cli/config.d.ts.map +1 -0
  560. package/dist/tools/cli/create-cli.d.ts +36 -0
  561. package/dist/tools/cli/create-cli.d.ts.map +1 -0
  562. package/dist/tools/cli/download.d.ts +8 -0
  563. package/dist/tools/cli/download.d.ts.map +1 -0
  564. package/dist/tools/cli/format.d.ts +50 -0
  565. package/dist/tools/cli/format.d.ts.map +1 -0
  566. package/dist/tools/cli/help.d.ts +24 -0
  567. package/dist/tools/cli/help.d.ts.map +1 -0
  568. package/dist/tools/cli/installer.d.ts +34 -0
  569. package/dist/tools/cli/installer.d.ts.map +1 -0
  570. package/dist/tools/cli/invoke.d.ts +144 -0
  571. package/dist/tools/cli/invoke.d.ts.map +1 -0
  572. package/dist/tools/cli/io.d.ts +10 -0
  573. package/dist/tools/cli/io.d.ts.map +1 -0
  574. package/dist/tools/cli/managed-surface.d.ts +30 -0
  575. package/dist/tools/cli/managed-surface.d.ts.map +1 -0
  576. package/dist/tools/cli/manifest.d.ts +80 -0
  577. package/dist/tools/cli/manifest.d.ts.map +1 -0
  578. package/dist/tools/cli/policy.d.ts +27 -0
  579. package/dist/tools/cli/policy.d.ts.map +1 -0
  580. package/dist/tools/cli/prepare.d.ts +14 -0
  581. package/dist/tools/cli/prepare.d.ts.map +1 -0
  582. package/dist/tools/cli/profile.d.ts +40 -0
  583. package/dist/tools/cli/profile.d.ts.map +1 -0
  584. package/dist/tools/cli/run-managed.d.ts +5 -0
  585. package/dist/tools/cli/run-managed.d.ts.map +1 -0
  586. package/dist/tools/cli/run-native.d.ts +9 -0
  587. package/dist/tools/cli/run-native.d.ts.map +1 -0
  588. package/dist/tools/cli/session.d.ts +40 -0
  589. package/dist/tools/cli/session.d.ts.map +1 -0
  590. package/dist/tools/cli/signature.d.ts +81 -0
  591. package/dist/tools/cli/signature.d.ts.map +1 -0
  592. package/dist/tools/cli/stream.d.ts +93 -0
  593. package/dist/tools/cli/stream.d.ts.map +1 -0
  594. package/dist/tools/cli/update.d.ts +145 -0
  595. package/dist/tools/cli/update.d.ts.map +1 -0
  596. package/dist/tools/cli/view.d.ts +12 -0
  597. package/dist/tools/cli/view.d.ts.map +1 -0
  598. package/dist/tools/cli/wait.d.ts +54 -0
  599. package/dist/tools/cli/wait.d.ts.map +1 -0
  600. package/dist/tools/connections/runtime.d.ts +1 -1
  601. package/dist/tools/connections/runtime.d.ts.map +1 -1
  602. package/dist/tools/connections/types.d.ts +3 -3
  603. package/dist/tools/connections/types.d.ts.map +1 -1
  604. package/dist/tools/durability-context.d.ts +1 -1
  605. package/dist/tools/durability-context.d.ts.map +1 -1
  606. package/dist/tools/execute-args.d.ts +23 -0
  607. package/dist/tools/execute-args.d.ts.map +1 -0
  608. package/dist/tools/execute-hooks.d.ts +146 -0
  609. package/dist/tools/execute-hooks.d.ts.map +1 -0
  610. package/dist/tools/execute-result.d.ts +40 -0
  611. package/dist/tools/execute-result.d.ts.map +1 -0
  612. package/dist/tools/execute.d.ts +31 -193
  613. package/dist/tools/execute.d.ts.map +1 -1
  614. package/dist/tools/internal/surface-projector.d.ts +9 -6
  615. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  616. package/dist/tools/internal/tool-view.d.ts +41 -0
  617. package/dist/tools/internal/tool-view.d.ts.map +1 -0
  618. package/dist/tools/invoker.d.ts +13 -4
  619. package/dist/tools/invoker.d.ts.map +1 -1
  620. package/dist/tools/lifecycle.d.ts +1 -1
  621. package/dist/tools/lifecycle.d.ts.map +1 -1
  622. package/dist/tools/list-names.d.ts +3 -3
  623. package/dist/tools/list-names.d.ts.map +1 -1
  624. package/dist/tools/manifest.d.ts +2 -2
  625. package/dist/tools/manifest.d.ts.map +1 -1
  626. package/dist/tools/mcp/app.d.ts +62 -0
  627. package/dist/tools/mcp/app.d.ts.map +1 -0
  628. package/dist/tools/mcp/catalog.d.ts +68 -0
  629. package/dist/tools/mcp/catalog.d.ts.map +1 -0
  630. package/dist/tools/mcp/handler.d.ts +46 -0
  631. package/dist/tools/mcp/handler.d.ts.map +1 -0
  632. package/dist/tools/mcp/mount.d.ts +152 -0
  633. package/dist/tools/mcp/mount.d.ts.map +1 -0
  634. package/dist/tools/mcp/prepare.d.ts +76 -0
  635. package/dist/tools/mcp/prepare.d.ts.map +1 -0
  636. package/dist/tools/mcp/progress.d.ts +46 -0
  637. package/dist/tools/mcp/progress.d.ts.map +1 -0
  638. package/dist/tools/mcp/register.d.ts +36 -0
  639. package/dist/tools/mcp/register.d.ts.map +1 -0
  640. package/dist/tools/mcp/round-context.d.ts +38 -0
  641. package/dist/tools/mcp/round-context.d.ts.map +1 -0
  642. package/dist/tools/mcp/round-policy.d.ts +33 -0
  643. package/dist/tools/mcp/round-policy.d.ts.map +1 -0
  644. package/dist/tools/mcp/round.d.ts +53 -0
  645. package/dist/tools/mcp/round.d.ts.map +1 -0
  646. package/dist/tools/mcp/runtime-tools.d.ts +25 -0
  647. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -0
  648. package/dist/tools/mcp/stdio-signals.d.ts +33 -0
  649. package/dist/tools/mcp/stdio-signals.d.ts.map +1 -0
  650. package/dist/tools/mcp/stdio.d.ts +20 -0
  651. package/dist/tools/mcp/stdio.d.ts.map +1 -0
  652. package/dist/tools/mcp/trace.d.ts +12 -0
  653. package/dist/tools/mcp/trace.d.ts.map +1 -0
  654. package/dist/tools/mount.d.ts +14 -7
  655. package/dist/tools/mount.d.ts.map +1 -1
  656. package/dist/tools/native-definition.d.ts +4 -3
  657. package/dist/tools/native-definition.d.ts.map +1 -1
  658. package/dist/tools/operations/async-operation-binding-types.d.ts +127 -0
  659. package/dist/tools/operations/async-operation-binding-types.d.ts.map +1 -0
  660. package/dist/tools/operations/async-operation-binding.d.ts +28 -0
  661. package/dist/tools/operations/async-operation-binding.d.ts.map +1 -0
  662. package/dist/tools/operations/async-operation-canonical-types.d.ts +110 -0
  663. package/dist/tools/operations/async-operation-canonical-types.d.ts.map +1 -0
  664. package/dist/tools/operations/async-operation-canonical.d.ts +7 -0
  665. package/dist/tools/operations/async-operation-canonical.d.ts.map +1 -0
  666. package/dist/tools/operations/async-operation-contract.d.ts.map +1 -0
  667. package/dist/tools/operations/async-operation-id.d.ts +23 -0
  668. package/dist/tools/operations/async-operation-id.d.ts.map +1 -0
  669. package/dist/tools/operations/async-operation-runtime-tools.d.ts +41 -0
  670. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -0
  671. package/dist/tools/operations/async-operation-runtime-types.d.ts +69 -0
  672. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -0
  673. package/dist/tools/operations/async-operation-runtime.d.ts +5 -0
  674. package/dist/tools/operations/async-operation-runtime.d.ts.map +1 -0
  675. package/dist/tools/operations/define-wait-tool.d.ts +22 -0
  676. package/dist/tools/operations/define-wait-tool.d.ts.map +1 -0
  677. package/dist/tools/operations/mount-wait.d.ts.map +1 -0
  678. package/dist/tools/operations/wait-core.d.ts.map +1 -0
  679. package/dist/tools/remote.d.ts +1 -1
  680. package/dist/tools/remote.d.ts.map +1 -1
  681. package/dist/tools/runtime-tool.d.ts +13 -4
  682. package/dist/tools/runtime-tool.d.ts.map +1 -1
  683. package/dist/tools/schema/coerce.d.ts.map +1 -0
  684. package/dist/tools/schema/flatten-join.d.ts.map +1 -0
  685. package/dist/tools/schema/flatten.d.ts.map +1 -0
  686. package/dist/tools/schema/portable-formats.d.ts.map +1 -0
  687. package/dist/tools/schema/presentation.d.ts +24 -0
  688. package/dist/tools/schema/presentation.d.ts.map +1 -0
  689. package/dist/tools/schema/schema.d.ts.map +1 -0
  690. package/dist/tools/schema/untyped-properties.d.ts.map +1 -0
  691. package/dist/tools/surface.d.ts +2 -3
  692. package/dist/tools/surface.d.ts.map +1 -1
  693. package/dist/tools/tool-logger.d.ts +1 -1
  694. package/dist/tools/tool-logger.d.ts.map +1 -1
  695. package/dist/tools/toolkit.d.ts +4 -4
  696. package/dist/tools/toolkit.d.ts.map +1 -1
  697. package/dist/tools/transfer/define-download-tool.d.ts +18 -0
  698. package/dist/tools/transfer/define-download-tool.d.ts.map +1 -0
  699. package/dist/tools/transfer/define-upload-tool.d.ts +16 -0
  700. package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -0
  701. package/dist/tools/transfer/define-view-file-tool.d.ts +10 -0
  702. package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -0
  703. package/dist/tools/transfer/download-core.d.ts +20 -0
  704. package/dist/tools/transfer/download-core.d.ts.map +1 -0
  705. package/dist/tools/transfer/managed-file-error.d.ts +6 -0
  706. package/dist/tools/transfer/managed-file-error.d.ts.map +1 -0
  707. package/dist/tools/transfer/mount-download.d.ts +41 -0
  708. package/dist/tools/transfer/mount-download.d.ts.map +1 -0
  709. package/dist/tools/transfer/mount-upload.d.ts +21 -0
  710. package/dist/tools/transfer/mount-upload.d.ts.map +1 -0
  711. package/dist/tools/transfer/native-result.d.ts.map +1 -0
  712. package/dist/tools/transfer/upload-core.d.ts +4 -0
  713. package/dist/tools/transfer/upload-core.d.ts.map +1 -0
  714. package/dist/tools/transfer/view-file-contract.d.ts.map +1 -0
  715. package/dist/tools/transfer/view-file.d.ts +62 -0
  716. package/dist/tools/transfer/view-file.d.ts.map +1 -0
  717. package/dist/tools/transports.d.ts +1 -1
  718. package/dist/tools/transports.d.ts.map +1 -1
  719. package/dist/tracking/client-listeners.d.ts +30 -0
  720. package/dist/tracking/client-listeners.d.ts.map +1 -0
  721. package/dist/tracking/client-visit.d.ts +61 -0
  722. package/dist/tracking/client-visit.d.ts.map +1 -0
  723. package/dist/tracking/client.d.ts +3 -2
  724. package/dist/tracking/client.d.ts.map +1 -1
  725. package/dist/tracking/contract.d.ts +1 -1
  726. package/dist/tracking/contract.d.ts.map +1 -1
  727. package/llms/agent-runtime-browser.txt +33 -0
  728. package/llms/agent-runtime-coding-tools.txt +58 -0
  729. package/llms/agent-runtime-harness.txt +45 -0
  730. package/llms/agent-runtime-openrouter.txt +22 -0
  731. package/llms/agent-runtime-sandbox.txt +159 -0
  732. package/llms/agent-runtime-sqlite-bun.txt +29 -0
  733. package/llms/agent-runtime-sqlite-node.txt +26 -0
  734. package/llms/agent-runtime-testing.txt +30 -0
  735. package/llms/agent-runtime.2.txt +550 -0
  736. package/llms/agent-runtime.3.txt +311 -0
  737. package/llms/agent-runtime.txt +893 -0
  738. package/llms/application-diagnostic-journal.txt +30 -0
  739. package/llms/application-grammy.txt +27 -0
  740. package/llms/application-opentelemetry.txt +27 -0
  741. package/llms/application-schemas.txt +42 -0
  742. package/llms/application.2.txt +487 -0
  743. package/llms/application.txt +886 -0
  744. package/llms/cli.2.txt +80 -0
  745. package/llms/cli.txt +948 -0
  746. package/llms/contract.txt +606 -0
  747. package/llms/declaration.txt +286 -0
  748. package/llms/files.txt +33 -0
  749. package/llms/geo.txt +114 -0
  750. package/llms/google.txt +27 -0
  751. package/llms/live.txt +471 -0
  752. package/llms/node.txt +43 -0
  753. package/llms/oauth.txt +136 -0
  754. package/llms/observability.txt +893 -0
  755. package/llms/primitives.txt +158 -0
  756. package/llms/react.txt +184 -0
  757. package/llms/release.txt +176 -0
  758. package/llms/remote.txt +25 -0
  759. package/llms/server.2.txt +361 -0
  760. package/llms/server.3.txt +1031 -0
  761. package/llms/server.4.txt +905 -0
  762. package/llms/server.5.txt +250 -0
  763. package/llms/server.txt +996 -0
  764. package/llms/stitchkit.2.txt +836 -0
  765. package/llms/stitchkit.3.txt +147 -0
  766. package/llms/stitchkit.txt +260 -0
  767. package/llms/telegram.txt +30 -0
  768. package/llms/testing.txt +676 -0
  769. package/llms/tools-connections.txt +45 -0
  770. package/llms/tools-contract.txt +9 -0
  771. package/llms/tools-invoker.txt +9 -0
  772. package/llms/tools.2.txt +647 -0
  773. package/llms/tools.3.txt +288 -0
  774. package/llms/tools.txt +966 -0
  775. package/llms/tracking-server.txt +32 -0
  776. package/llms/tracking.txt +263 -0
  777. package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
  778. package/llms/upgrading-0.53.0-0.67.0.txt +1174 -0
  779. package/llms/upgrading-0.68.0-0.94.0.txt +1159 -0
  780. package/llms/upgrading.txt +215 -0
  781. package/llms-full.txt +312 -77
  782. package/llms.txt +54 -5
  783. package/package.json +84 -83
  784. package/dist/agent-runtime/durability-contract.d.ts +0 -176
  785. package/dist/agent-runtime/durability-contract.d.ts.map +0 -1
  786. package/dist/agent-runtime/durability-json.d.ts +0 -3
  787. package/dist/agent-runtime/durability-json.d.ts.map +0 -1
  788. package/dist/agent-runtime/durability-ledger.d.ts +0 -16
  789. package/dist/agent-runtime/durability-ledger.d.ts.map +0 -1
  790. package/dist/agent-runtime/durability-scheduler.d.ts +0 -29
  791. package/dist/agent-runtime/durability-scheduler.d.ts.map +0 -1
  792. package/dist/agent-runtime/durability.d.ts +0 -14
  793. package/dist/agent-runtime/durability.d.ts.map +0 -1
  794. package/dist/agent-runtime/store-driver.d.ts +0 -814
  795. package/dist/agent-runtime/store-driver.d.ts.map +0 -1
  796. package/dist/agent-runtime-browser.d.ts +0 -5
  797. package/dist/agent-runtime-browser.d.ts.map +0 -1
  798. package/dist/agent-runtime-browser.js +0 -124
  799. package/dist/agent-runtime-coding-tools.d.ts +0 -2
  800. package/dist/agent-runtime-coding-tools.d.ts.map +0 -1
  801. package/dist/agent-runtime-coding-tools.js +0 -23
  802. package/dist/agent-runtime-harness.d.ts +0 -2
  803. package/dist/agent-runtime-harness.d.ts.map +0 -1
  804. package/dist/agent-runtime-harness.js +0 -729
  805. package/dist/agent-runtime-openrouter.d.ts +0 -29
  806. package/dist/agent-runtime-openrouter.d.ts.map +0 -1
  807. package/dist/agent-runtime-openrouter.js +0 -270
  808. package/dist/agent-runtime-sandbox.d.ts +0 -5
  809. package/dist/agent-runtime-sandbox.d.ts.map +0 -1
  810. package/dist/agent-runtime-sandbox.js +0 -798
  811. package/dist/agent-runtime-sqlite-bun.d.ts +0 -11
  812. package/dist/agent-runtime-sqlite-bun.d.ts.map +0 -1
  813. package/dist/agent-runtime-sqlite-bun.js +0 -42
  814. package/dist/agent-runtime-sqlite-node.d.ts +0 -11
  815. package/dist/agent-runtime-sqlite-node.d.ts.map +0 -1
  816. package/dist/agent-runtime-sqlite-node.js +0 -44
  817. package/dist/agent-runtime-testing.d.ts +0 -3
  818. package/dist/agent-runtime-testing.d.ts.map +0 -1
  819. package/dist/agent-runtime-testing.js +0 -156
  820. package/dist/agent-runtime.d.ts +0 -38
  821. package/dist/agent-runtime.d.ts.map +0 -1
  822. package/dist/agent-runtime.js +0 -2607
  823. package/dist/application/channel.d.ts.map +0 -1
  824. package/dist/application-diagnostic-journal.d.ts +0 -21
  825. package/dist/application-diagnostic-journal.d.ts.map +0 -1
  826. package/dist/application-diagnostic-journal.js +0 -632
  827. package/dist/application-grammy.d.ts +0 -2
  828. package/dist/application-grammy.d.ts.map +0 -1
  829. package/dist/application-grammy.js +0 -169
  830. package/dist/application-opentelemetry.d.ts +0 -2
  831. package/dist/application-opentelemetry.d.ts.map +0 -1
  832. package/dist/application-opentelemetry.js +0 -250
  833. package/dist/application-schemas.d.ts +0 -15
  834. package/dist/application-schemas.d.ts.map +0 -1
  835. package/dist/application-schemas.js +0 -27
  836. package/dist/application.d.ts +0 -22
  837. package/dist/application.d.ts.map +0 -1
  838. package/dist/application.js +0 -1977
  839. package/dist/cli.d.ts +0 -41
  840. package/dist/cli.d.ts.map +0 -1
  841. package/dist/cli.js +0 -753
  842. package/dist/contract/index.d.ts +0 -8
  843. package/dist/contract/index.d.ts.map +0 -1
  844. package/dist/contract/index.js +0 -55
  845. package/dist/declaration.d.ts.map +0 -1
  846. package/dist/declaration.js +0 -183
  847. package/dist/files.d.ts +0 -3
  848. package/dist/files.d.ts.map +0 -1
  849. package/dist/files.js +0 -15
  850. package/dist/geo.d.ts +0 -3
  851. package/dist/geo.d.ts.map +0 -1
  852. package/dist/geo.js +0 -245
  853. package/dist/google.d.ts.map +0 -1
  854. package/dist/google.js +0 -175
  855. package/dist/index-0a349c33.js +0 -470
  856. package/dist/index-0j3vcp5m.js +0 -28
  857. package/dist/index-2c2bjw3s.js +0 -51
  858. package/dist/index-2na0qrfn.js +0 -214
  859. package/dist/index-2qzskm8h.js +0 -63
  860. package/dist/index-3bmnp41g.js +0 -2169
  861. package/dist/index-3xwxfj4z.js +0 -334
  862. package/dist/index-4fpa9dy2.js +0 -51
  863. package/dist/index-6kyksz9y.js +0 -268
  864. package/dist/index-77fekveh.js +0 -44
  865. package/dist/index-7gnkny4z.js +0 -326
  866. package/dist/index-7zbps32p.js +0 -89
  867. package/dist/index-9f8ztey6.js +0 -588
  868. package/dist/index-a11g2kry.js +0 -866
  869. package/dist/index-a916km3r.js +0 -45
  870. package/dist/index-actkayzn.js +0 -367
  871. package/dist/index-bn2cjajt.js +0 -524
  872. package/dist/index-bx75zwt7.js +0 -63
  873. package/dist/index-cby4ar3v.js +0 -46
  874. package/dist/index-cnyk6te3.js +0 -77
  875. package/dist/index-cxqhvq21.js +0 -413
  876. package/dist/index-e0znv5gn.js +0 -176
  877. package/dist/index-e42wzzz5.js +0 -154
  878. package/dist/index-f477k430.js +0 -324
  879. package/dist/index-f9mb610r.js +0 -177
  880. package/dist/index-fadnxwna.js +0 -1046
  881. package/dist/index-fq77yfzc.js +0 -1303
  882. package/dist/index-h9etkkyk.js +0 -1126
  883. package/dist/index-hrbajay7.js +0 -1196
  884. package/dist/index-kw9t5ayn.js +0 -507
  885. package/dist/index-mzvgxp0n.js +0 -80
  886. package/dist/index-n0f51dfn.js +0 -3170
  887. package/dist/index-p13mwz16.js +0 -16
  888. package/dist/index-s8cnx02s.js +0 -90
  889. package/dist/index-sr93cwf9.js +0 -325
  890. package/dist/index-tmwcrptx.js +0 -85
  891. package/dist/index-v5573g1k.js +0 -142
  892. package/dist/index-vjpvjqpn.js +0 -86
  893. package/dist/index-vk3kq9sb.js +0 -3344
  894. package/dist/index-wc4x00bn.js +0 -103
  895. package/dist/index-wnfk50r0.js +0 -211
  896. package/dist/index-yewwh1w4.js +0 -647
  897. package/dist/index-yn8remb1.js +0 -290
  898. package/dist/index-ywd0y6m1.js +0 -394
  899. package/dist/index-zwkgfq1s.js +0 -345
  900. package/dist/index.d.ts +0 -14
  901. package/dist/index.d.ts.map +0 -1
  902. package/dist/index.js +0 -632
  903. package/dist/internal/errors.d.ts +0 -92
  904. package/dist/internal/errors.d.ts.map +0 -1
  905. package/dist/internal/observability-sink.d.ts +0 -81
  906. package/dist/internal/observability-sink.d.ts.map +0 -1
  907. package/dist/live.d.ts +0 -19
  908. package/dist/live.d.ts.map +0 -1
  909. package/dist/live.js +0 -282
  910. package/dist/logger.d.ts.map +0 -1
  911. package/dist/node.d.ts +0 -18
  912. package/dist/node.d.ts.map +0 -1
  913. package/dist/node.js +0 -303
  914. package/dist/oauth.d.ts +0 -57
  915. package/dist/oauth.d.ts.map +0 -1
  916. package/dist/oauth.js +0 -170
  917. package/dist/observability/index.d.ts +0 -19
  918. package/dist/observability/index.d.ts.map +0 -1
  919. package/dist/observability/index.js +0 -569
  920. package/dist/primitives.d.ts +0 -3
  921. package/dist/primitives.d.ts.map +0 -1
  922. package/dist/primitives.js +0 -754
  923. package/dist/react.d.ts +0 -5
  924. package/dist/react.d.ts.map +0 -1
  925. package/dist/react.js +0 -403
  926. package/dist/release.d.ts +0 -15
  927. package/dist/release.d.ts.map +0 -1
  928. package/dist/release.js +0 -196
  929. package/dist/remote.d.ts +0 -9
  930. package/dist/remote.d.ts.map +0 -1
  931. package/dist/remote.js +0 -88
  932. package/dist/retained.d.ts.map +0 -1
  933. package/dist/server/file-state-store.d.ts +0 -23
  934. package/dist/server/file-state-store.d.ts.map +0 -1
  935. package/dist/server/index.d.ts +0 -36
  936. package/dist/server/index.d.ts.map +0 -1
  937. package/dist/server/index.js +0 -1745
  938. package/dist/server/request.d.ts.map +0 -1
  939. package/dist/telegram.d.ts +0 -3
  940. package/dist/telegram.d.ts.map +0 -1
  941. package/dist/telegram.js +0 -224
  942. package/dist/testing/agent-store-conformance.d.ts +0 -40
  943. package/dist/testing/agent-store-conformance.d.ts.map +0 -1
  944. package/dist/testing.d.ts +0 -39
  945. package/dist/testing.d.ts.map +0 -1
  946. package/dist/testing.js +0 -2209
  947. package/dist/tool-invoker.d.ts +0 -9
  948. package/dist/tool-invoker.d.ts.map +0 -1
  949. package/dist/tool-invoker.js +0 -21
  950. package/dist/tools/async-operation-contract.d.ts.map +0 -1
  951. package/dist/tools/async-operation.d.ts +0 -332
  952. package/dist/tools/async-operation.d.ts.map +0 -1
  953. package/dist/tools/cli-args.d.ts +0 -143
  954. package/dist/tools/cli-args.d.ts.map +0 -1
  955. package/dist/tools/cli-checkpoint.d.ts +0 -24
  956. package/dist/tools/cli-checkpoint.d.ts.map +0 -1
  957. package/dist/tools/cli-command.d.ts +0 -70
  958. package/dist/tools/cli-command.d.ts.map +0 -1
  959. package/dist/tools/cli-format.d.ts +0 -49
  960. package/dist/tools/cli-format.d.ts.map +0 -1
  961. package/dist/tools/cli-installer.d.ts +0 -34
  962. package/dist/tools/cli-installer.d.ts.map +0 -1
  963. package/dist/tools/cli-invoke.d.ts +0 -143
  964. package/dist/tools/cli-invoke.d.ts.map +0 -1
  965. package/dist/tools/cli-manifest.d.ts +0 -80
  966. package/dist/tools/cli-manifest.d.ts.map +0 -1
  967. package/dist/tools/cli-policy.d.ts +0 -27
  968. package/dist/tools/cli-policy.d.ts.map +0 -1
  969. package/dist/tools/cli-profile.d.ts +0 -40
  970. package/dist/tools/cli-profile.d.ts.map +0 -1
  971. package/dist/tools/cli-signature.d.ts +0 -81
  972. package/dist/tools/cli-signature.d.ts.map +0 -1
  973. package/dist/tools/cli-stream.d.ts +0 -93
  974. package/dist/tools/cli-stream.d.ts.map +0 -1
  975. package/dist/tools/cli-update.d.ts +0 -126
  976. package/dist/tools/cli-update.d.ts.map +0 -1
  977. package/dist/tools/cli-view.d.ts +0 -12
  978. package/dist/tools/cli-view.d.ts.map +0 -1
  979. package/dist/tools/cli-wait.d.ts +0 -54
  980. package/dist/tools/cli-wait.d.ts.map +0 -1
  981. package/dist/tools/cli.d.ts +0 -94
  982. package/dist/tools/cli.d.ts.map +0 -1
  983. package/dist/tools/coerce.d.ts.map +0 -1
  984. package/dist/tools/connections/index.d.ts +0 -20
  985. package/dist/tools/connections/index.d.ts.map +0 -1
  986. package/dist/tools/connections/index.js +0 -1107
  987. package/dist/tools/define-download-tool.d.ts +0 -18
  988. package/dist/tools/define-download-tool.d.ts.map +0 -1
  989. package/dist/tools/define-upload-tool.d.ts +0 -16
  990. package/dist/tools/define-upload-tool.d.ts.map +0 -1
  991. package/dist/tools/define-view-file-tool.d.ts +0 -10
  992. package/dist/tools/define-view-file-tool.d.ts.map +0 -1
  993. package/dist/tools/define-wait-tool.d.ts +0 -22
  994. package/dist/tools/define-wait-tool.d.ts.map +0 -1
  995. package/dist/tools/download-core.d.ts +0 -20
  996. package/dist/tools/download-core.d.ts.map +0 -1
  997. package/dist/tools/flatten-join.d.ts.map +0 -1
  998. package/dist/tools/flatten.d.ts.map +0 -1
  999. package/dist/tools/json-schema-dialect.d.ts +0 -17
  1000. package/dist/tools/json-schema-dialect.d.ts.map +0 -1
  1001. package/dist/tools/json-schema.d.ts.map +0 -1
  1002. package/dist/tools/managed-file-error.d.ts +0 -6
  1003. package/dist/tools/managed-file-error.d.ts.map +0 -1
  1004. package/dist/tools/mcp-app.d.ts +0 -62
  1005. package/dist/tools/mcp-app.d.ts.map +0 -1
  1006. package/dist/tools/mcp-catalog.d.ts +0 -68
  1007. package/dist/tools/mcp-catalog.d.ts.map +0 -1
  1008. package/dist/tools/mcp-handler.d.ts +0 -46
  1009. package/dist/tools/mcp-handler.d.ts.map +0 -1
  1010. package/dist/tools/mcp-prepare.d.ts +0 -75
  1011. package/dist/tools/mcp-prepare.d.ts.map +0 -1
  1012. package/dist/tools/mcp-progress.d.ts +0 -46
  1013. package/dist/tools/mcp-progress.d.ts.map +0 -1
  1014. package/dist/tools/mcp-round-policy.d.ts +0 -33
  1015. package/dist/tools/mcp-round-policy.d.ts.map +0 -1
  1016. package/dist/tools/mcp-round.d.ts +0 -61
  1017. package/dist/tools/mcp-round.d.ts.map +0 -1
  1018. package/dist/tools/mcp-stdio-signals.d.ts +0 -33
  1019. package/dist/tools/mcp-stdio-signals.d.ts.map +0 -1
  1020. package/dist/tools/mcp-stdio.d.ts +0 -20
  1021. package/dist/tools/mcp-stdio.d.ts.map +0 -1
  1022. package/dist/tools/mcp-trace.d.ts +0 -12
  1023. package/dist/tools/mcp-trace.d.ts.map +0 -1
  1024. package/dist/tools/mcp.d.ts +0 -152
  1025. package/dist/tools/mcp.d.ts.map +0 -1
  1026. package/dist/tools/mount-download.d.ts +0 -41
  1027. package/dist/tools/mount-download.d.ts.map +0 -1
  1028. package/dist/tools/mount-upload.d.ts +0 -21
  1029. package/dist/tools/mount-upload.d.ts.map +0 -1
  1030. package/dist/tools/mount-wait.d.ts.map +0 -1
  1031. package/dist/tools/native-mcp.d.ts +0 -20
  1032. package/dist/tools/native-mcp.d.ts.map +0 -1
  1033. package/dist/tools/native-result.d.ts.map +0 -1
  1034. package/dist/tools/oauth-metadata.d.ts +0 -28
  1035. package/dist/tools/oauth-metadata.d.ts.map +0 -1
  1036. package/dist/tools/oauth-provider.d.ts +0 -184
  1037. package/dist/tools/oauth-provider.d.ts.map +0 -1
  1038. package/dist/tools/portable-formats.d.ts.map +0 -1
  1039. package/dist/tools/presentation.d.ts +0 -22
  1040. package/dist/tools/presentation.d.ts.map +0 -1
  1041. package/dist/tools/schema.d.ts.map +0 -1
  1042. package/dist/tools/untyped-properties.d.ts.map +0 -1
  1043. package/dist/tools/upload-core.d.ts +0 -4
  1044. package/dist/tools/upload-core.d.ts.map +0 -1
  1045. package/dist/tools/view-file-contract.d.ts.map +0 -1
  1046. package/dist/tools/view-file.d.ts +0 -62
  1047. package/dist/tools/view-file.d.ts.map +0 -1
  1048. package/dist/tools/wait-core.d.ts.map +0 -1
  1049. package/dist/tools-contract.d.ts +0 -29
  1050. package/dist/tools-contract.d.ts.map +0 -1
  1051. package/dist/tools-contract.js +0 -24
  1052. package/dist/tools.d.ts +0 -50
  1053. package/dist/tools.d.ts.map +0 -1
  1054. package/dist/tools.js +0 -2930
  1055. package/dist/tracking-server.d.ts +0 -15
  1056. package/dist/tracking-server.d.ts.map +0 -1
  1057. package/dist/tracking.d.ts +0 -24
  1058. package/dist/tracking.d.ts.map +0 -1
  1059. package/dist/tracking.js +0 -1092
  1060. package/dist/upgrade-cli.d.ts.map +0 -1
  1061. package/dist/upgrade-cli.js +0 -177
  1062. /package/dist/{retained.d.ts → browser/retained.d.ts} +0 -0
  1063. /package/dist/{declaration.d.ts → declaration/declaration.d.ts} +0 -0
  1064. /package/dist/{upgrade-cli.d.ts → entrypoints/bin/upgrade-cli.d.ts} +0 -0
  1065. /package/dist/{tracking-server.js → entrypoints/tracking/server.js} +0 -0
  1066. /package/dist/{google.d.ts → google/google.d.ts} +0 -0
  1067. /package/dist/{index-pq95qkbf.js → index-5jm36zv1.js} +0 -0
  1068. /package/dist/{application → internal}/channel.d.ts +0 -0
  1069. /package/dist/{logger.d.ts → internal/logger.d.ts} +0 -0
  1070. /package/dist/{server → internal}/request.d.ts +0 -0
  1071. /package/dist/{tools → json-schema}/json-schema.d.ts +0 -0
  1072. /package/dist/tools/{async-operation-contract.d.ts → operations/async-operation-contract.d.ts} +0 -0
  1073. /package/dist/tools/{mount-wait.d.ts → operations/mount-wait.d.ts} +0 -0
  1074. /package/dist/tools/{wait-core.d.ts → operations/wait-core.d.ts} +0 -0
  1075. /package/dist/tools/{coerce.d.ts → schema/coerce.d.ts} +0 -0
  1076. /package/dist/tools/{flatten-join.d.ts → schema/flatten-join.d.ts} +0 -0
  1077. /package/dist/tools/{flatten.d.ts → schema/flatten.d.ts} +0 -0
  1078. /package/dist/tools/{portable-formats.d.ts → schema/portable-formats.d.ts} +0 -0
  1079. /package/dist/tools/{schema.d.ts → schema/schema.d.ts} +0 -0
  1080. /package/dist/tools/{untyped-properties.d.ts → schema/untyped-properties.d.ts} +0 -0
  1081. /package/dist/tools/{native-result.d.ts → transfer/native-result.d.ts} +0 -0
  1082. /package/dist/tools/{view-file-contract.d.ts → transfer/view-file-contract.d.ts} +0 -0
@@ -0,0 +1,1174 @@
1
+ # Upgrading 0.53.0 → 0.67.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.53.0 → 0.67.0 (docs/guide/upgrading.md)
7
+
8
+ ==============================================================================
9
+ # Guide: Upgrading, 0.53.0 → 0.67.0 (docs/guide/upgrading.md)
10
+ ==============================================================================
11
+
12
+ ## Released migration: 0.67.0
13
+
14
+ Three application-kernel changes. Two of them fix silent failures, so the most
15
+ important part of this migration is not what the compiler points at — it is the
16
+ two things that change with no compile error at all: **when your server is
17
+ created**, and **which shutdown budget a signal spends**.
18
+
19
+ ### If you gave `managedServerResource` a thunk
20
+
21
+ It is now called during `start`, after the resource's dependencies are ready —
22
+ the reading the type always suggested. Before, it was called on the way *down*,
23
+ so `app.start()` resolved, the snapshot said `healthy` and `ready`, and nothing
24
+ was bound to the port.
25
+
26
+ If your application looked like this, it was never listening:
27
+
28
+ ```ts
29
+ // before — resolves clean, listens on nothing
30
+ managedServerResource({ id: 'http', dependsOn: ['database'], server: () => createServer(config) })
31
+ ```
32
+
33
+ Nothing to change: the same code now binds the port. Check your startup logs for
34
+ a healthy report you never actually verified with a request.
35
+
36
+ If you used the spread workaround — this resource's phases over your own
37
+ `start` — it keeps working, and you can now delete it:
38
+
39
+ ```ts
40
+ // before
41
+ let handle: ManagedServerHandle<T> | null = null
42
+ const shutdown = managedServerResource({ id: 'http', server: () => handle! })
43
+ const http = defineManagedResource({
44
+ ...shutdown,
45
+ dependsOn: ['database', 'socket-io'],
46
+ start: () => { handle = createServer(config) },
47
+ })
48
+
49
+ // after
50
+ const http = managedServerResource({
51
+ id: 'http',
52
+ dependsOn: [database, socketIo],
53
+ server: () => createServer(config),
54
+ })
55
+ ```
56
+
57
+ An already-created handle is adopted exactly as before.
58
+
59
+ ### If you passed `shutdown` to `bindProcessSignals`
60
+
61
+ `bindProcessSignals` used to fill in the schema's defaults for every budget you
62
+ omitted, which made `createApplication({ shutdown })` unreachable on the signal
63
+ path — the one path production stops through. An application declaring five
64
+ seconds took thirty-five.
65
+
66
+ Declare the budget once, on the application, and delete the repetition:
67
+
68
+ ```ts
69
+ // before — the same two numbers in two places, and only one of them applied
70
+ const app = createApplication({ id: 'svc', resources, shutdown: SHUTDOWN_BUDGET })
71
+ bindProcessSignals(app, { shutdown: SHUTDOWN_BUDGET })
72
+
73
+ // after
74
+ const app = createApplication({ id: 'svc', resources, shutdown: SHUTDOWN_BUDGET })
75
+ bindProcessSignals(app)
76
+ ```
77
+
78
+ **Check this even if you change nothing.** If you declared a budget on the
79
+ application and did not repeat it on the binding, your process has been stopping
80
+ on 30 s / 5 s and will now stop on what you declared. Compare it against the
81
+ supervisor timeout that watches it — `kill_timeout`, `TimeoutStopSec` — because
82
+ that number was probably calculated from the declaration.
83
+
84
+ Passing `shutdown` to the binding still works and still wins, key by key: one
85
+ key overrides that key alone and leaves the other at the declaration.
86
+
87
+ ### If you read `resource.dependsOn`
88
+
89
+ Its type widened from `readonly string[]` to `readonly ManagedResourceDependency[]`
90
+ — `string | ManagedResource` — so a dependency can be declared as the resource
91
+ itself. Declaring stays compatible; reading needs one call:
92
+
93
+ ```ts
94
+ // before
95
+ const ids: readonly string[] = resource.dependsOn ?? []
96
+
97
+ // after
98
+ import { managedResourceDependencyId } from 'stitchkit/application'
99
+ const ids = (resource.dependsOn ?? []).map(managedResourceDependencyId)
100
+ ```
101
+
102
+ ### If you thread a handle through a module-local
103
+
104
+ This is the pattern the change exists to remove, and it is opt-in — nothing
105
+ breaks if you keep yours:
106
+
107
+ ```ts
108
+ // before
109
+ let socket: SocketHandle | null = null
110
+ const socketIo = defineManagedResource({
111
+ id: 'socket-io',
112
+ start: async () => { socket = await createSocketServer(config) },
113
+ })
114
+ const http = defineManagedResource({
115
+ id: 'http',
116
+ dependsOn: ['socket-io'],
117
+ start: () => {
118
+ if (!socket) throw new Error('socket is not initialized') // unreachable
119
+ server = createServer({ socket })
120
+ },
121
+ })
122
+
123
+ // after
124
+ const socketIo = defineManagedResource({
125
+ id: 'socket-io',
126
+ start: async () => ({ value: await createSocketServer(config) }),
127
+ })
128
+ const http = defineManagedResource({
129
+ id: 'http',
130
+ dependsOn: [socketIo],
131
+ start: (context) => {
132
+ server = createServer({ socket: context.use(socketIo) }) // SocketHandle
133
+ },
134
+ })
135
+ ```
136
+
137
+ Declare the dependency with the **resource** when you intend to read from it —
138
+ that is the form `use` can type. `use` refuses a resource missing from
139
+ `dependsOn`, and refuses one that published no value; the second refusal is a
140
+ compile error too.
141
+
142
+ ## Released migration: 0.66.0
143
+
144
+ Three changes, and only one of them is a feature. The other two are shapes that
145
+ would have had to break later: a vocabulary that described one fact with two
146
+ words, and a store whose only read was the whole conversation.
147
+
148
+ The compiler points at most of it. Two things change with no compile error —
149
+ what a **total** says about its own provenance, and the fact that token counts
150
+ are now validated where they were not.
151
+
152
+ ### An input that joins a run in flight
153
+
154
+ #### If you matched exhaustively on `AgentTerminalReason`
155
+
156
+ `'absorbed'` is new. A run ends this way when a run already in flight took its
157
+ input on and answered it; its state is `'superseded'`, and `absorbedIntoRunId`
158
+ names the run that has the answer.
159
+
160
+ ```ts
161
+ // after
162
+ switch (run.terminalReason) {
163
+ // …
164
+ case 'absorbed':
165
+ // no assistant message of its own — follow run.absorbedIntoRunId
166
+ break
167
+ }
168
+ ```
169
+
170
+ A run record with `terminalReason: 'absorbed'` and no `absorbedIntoRunId` is
171
+ refused at parse time, and so is `absorbedIntoRunId` on any other reason.
172
+
173
+ #### If you render or export runs
174
+
175
+ An absorbed run has **no assistant message**. Anything that assumes "every
176
+ terminal run has one" needs the `absorbed` case — the answer is on the run
177
+ `absorbedIntoRunId` names, and `store.loadRun` resolves it.
178
+
179
+ #### If you want the policy
180
+
181
+ ```ts
182
+ // after
183
+ runs: { inputPolicy: 'inject' }
184
+ ```
185
+
186
+ It was withdrawn in 0.65.0 and is back with the ordering corrected: the
187
+ absorption commits with the terminal record, not at the step boundary. Read
188
+ *An input that joins a run in flight* in the agent-runtime guide before turning
189
+ it on — in particular what happens when the absorbing run does not complete, and
190
+ how it composes with `coalescePending`.
191
+
192
+ #### If you implement a store driver
193
+
194
+ Nothing to do, but know what changed underneath: one terminal commit can now
195
+ save **two** run records, and they must land in the same transaction. A driver
196
+ that persists one of the pair fails `runAgentStoreConformance`.
197
+
198
+ ### A run read without its conversation
199
+
200
+ #### If you implement `AgentRuntimeStore` by hand
201
+
202
+ Two members to add. **If your adapter is an `AgentRuntimeStoreDriver` passed to
203
+ `createAgentRuntimeStore`, there is nothing to do** — the driver already had
204
+ everything both need.
205
+
206
+ ```ts
207
+ // after
208
+ loadRun(input: { conversationId: string; runId: string }): Promise<AgentRunView | undefined>
209
+ listActiveRuns(conversationId: string): Promise<readonly AgentRun[]>
210
+ ```
211
+
212
+ `AgentRunView` is `{ snapshotVersion, run, assistant? }`. `assistant` is the
213
+ retained terminal answer, so it is present exactly when the run has ended and
214
+ absent while it is live — a store that returns a live run's draft here lets the
215
+ terminal path resolve a run that has not finished. `listActiveRuns` orders by
216
+ `createdAt` then `id`, and must not report a run that has ended.
217
+ `runAgentStoreConformance` covers both, including the boundary cases.
218
+
219
+ #### If you have a store **double** in your tests
220
+
221
+ The runtime now reads `loadRun` where it used to read `loadSnapshot`. A double
222
+ that simulates a condition — a run drifting to another owner, a stale fencing
223
+ token — must apply it to both reads, or the code under test will not see it.
224
+ This is not hypothetical: it turned one of this repository's own fixtures into
225
+ an infinite retry loop, which is how the bounded retry below was found.
226
+
227
+ #### Nothing else changes
228
+
229
+ `loadSnapshot` behaves exactly as before, and still returns the whole
230
+ conversation — as does every mutation result. What it costs, and what bounds it,
231
+ is now written down in *Reading a conversation* in the agent-runtime guide.
232
+
233
+ ### One provenance vocabulary, and integral tokens
234
+
235
+ #### If you match on `'measured'`
236
+
237
+ A **total** now says `computed`, because it is a sum this code performed rather
238
+ than a count it took — the same rule `AgentUsage` has always applied to a run's
239
+ spend. Two values change with no compile error:
240
+
241
+ ```ts
242
+ // before
243
+ if (result.totalTokens.provenance === 'measured') { /* exact */ }
244
+ // after
245
+ if (result.totalTokens.provenance === 'computed') { /* exact, and derived */ }
246
+ ```
247
+
248
+ It affects `AgentHistoryBudgetResult.totalTokens` and
249
+ `ComposedAgentPrompt.instructionTokens`. A per-message or per-section count is
250
+ still `measured` — only the totals moved. When any part was estimated the total
251
+ is still `estimated`: an estimate survives arithmetic, and that is the weaker
252
+ claim, so it wins.
253
+
254
+ #### If you produce token counts
255
+
256
+ They are validated now, in the places they were not. A fractional count throws
257
+ where it used to flow into the context-window arithmetic:
258
+
259
+ ```ts
260
+ // refused from this release on
261
+ estimateTokens: (text) => ({ value: text.length / 4, provenance: 'estimated' })
262
+ // after
263
+ estimateTokens: (text) => ({ value: Math.ceil(text.length / 4), provenance: 'estimated' })
264
+ ```
265
+
266
+ The same applies to `ComposeAgentPromptOptions.estimateFallback` and
267
+ `.historyTokens`, to `AgentPromptBudget.toolSchemas` / `.attachments` /
268
+ `.providerOverhead`, and to `AgentPromptBudget.contextWindow` /
269
+ `.reservedOutput`, which must now be non-negative safe integers.
270
+
271
+ `AgentUsageValue.value` is `z.int()` too, which matters if you build usage
272
+ records by hand or in a store double. A figure arriving from a **provider** is
273
+ not thrown — `normalizeSdkUsage` and the OpenRouter adapter turn a non-integer
274
+ into `{ provenance: 'unavailable' }`, so a run that already answered is not
275
+ failed over its own bookkeeping.
276
+
277
+ #### The new export
278
+
279
+ `AgentProvenanceSchema` / `AgentProvenance` is the whole vocabulary:
280
+ `provider-reported`, `measured`, `computed`, `estimated`, `unavailable`. Each
281
+ surface declares its subset, so nothing widened — `AgentUsageValue` still refuses
282
+ `measured` and `AgentTokenCount` still refuses `provider-reported`. Use it when
283
+ you want one switch over the question instead of two.
284
+
285
+ ## Released migration: 0.65.0
286
+
287
+ The largest migration of the pre-1.0 line, and most of it is the compiler
288
+ pointing at things. One item is a feature withdrawal and two change behaviour
289
+ with no compile error at all.
290
+
291
+ ### A projection a provider accepts, and a policy withdrawn
292
+
293
+ ### If you compact, or use `system-note`, you were broken and now are not
294
+
295
+ No code change to adopt the fix — but **check your own code if you call
296
+ `projectAgentHistory` yourself.** System and summary records no longer appear in
297
+ `messages`; they come back in `system` and belong in the provider's instructions
298
+ channel, which is the only place `ai` accepts them:
299
+
300
+ ```ts
301
+ // before — the provider refuses this outright
302
+ const messages = await projectAgentHistory(snapshot.messages)
303
+ streamText({ model, messages })
304
+
305
+ // after
306
+ const { messages, system } = await projectAgentHistoryDetailed(snapshot.messages)
307
+ streamText({
308
+ model,
309
+ instructions: system.map((content) => ({ role: 'system', content })),
310
+ messages,
311
+ })
312
+ ```
313
+
314
+ If you use `createAgentRuntime`, this is handled for you.
315
+
316
+ ### `inputPolicy: 'inject'` is withdrawn
317
+
318
+ ```ts
319
+ // before
320
+ runs: { inputPolicy: 'inject' }
321
+ // after
322
+ runs: { inputPolicy: 'queue' }
323
+ ```
324
+
325
+ `'absorbed'`, `AgentRun.absorbedIntoRunId` and `AgentRuntimeStore.absorbQueuedRun`
326
+ go with it. A driver built on `AgentRuntimeStoreDriver` needs no change.
327
+
328
+ ### Records must agree with themselves
329
+
330
+ If you construct `AgentRun` values — a store double, a fixture, a migration —
331
+ derive the state instead of setting it:
332
+
333
+ ```ts
334
+ // after
335
+ import { runStateForTerminalReason } from 'stitchkit/agent-runtime'
336
+ AgentRunSchema.parse({ …run, terminalReason: reason, state: runStateForTerminalReason(reason) })
337
+ ```
338
+
339
+ A terminal state with no reason, a queued run carrying one, and `policy_stop`
340
+ without a `terminalPolicyName` are now all refused at parse time.
341
+
342
+ ### Enum and field changes the compiler will point at
343
+
344
+ - `AgentTerminalReason`: `'tool_failure'` removed (never produced),
345
+ `'context_overflow'` added — this runtime's own refusal when the prompt does
346
+ not fit, which used to report `provider_failure`.
347
+ - `AgentRunState`: `'absorbed'` removed.
348
+ - `AgentRunMetrics.usage` is required.
349
+ - `AgentHistoryBudgetDecision['reason']`: `'superseded'` → `'unspeakable'`.
350
+
351
+ ### Two behaviour changes with no compile error
352
+
353
+ - **`loop.idleTimeoutMs` now defaults to 60 000.** A run whose provider stream
354
+ goes quiet for a minute ends as `timeout` instead of holding the lane forever.
355
+ Pass `null` for the old behaviour, and think about why you want it.
356
+ - **`advanceAgentRuntimeEventCursor` stops returning `gap` for durable events.**
357
+ If you reload a conversation on `gap`, you were reloading after essentially
358
+ every run. Transient events still report it, and there it is real.
359
+
360
+ ## Released migration: 0.64.0
361
+
362
+ Two changes, and only one of them can break a build. Nothing was removed.
363
+
364
+ ### An event that says which kind it is
365
+
366
+ ### Narrow `AgentRunEvent` on `type`
367
+
368
+ ```ts
369
+ // before
370
+ for (const event of events) record(event.usage?.cost?.value ?? 0)
371
+
372
+ // after — and the compiler will point at every site
373
+ for (const event of events) {
374
+ if (event.type !== 'run-terminal') continue
375
+ record(event.usage.cost.value ?? null) // `usage` is present; unknown says so
376
+ }
377
+ ```
378
+
379
+ `step` is now required on `step-finished`, `terminalReason` on `run-terminal`,
380
+ and `usage` on both. `queueWaitMs` exists only on `run-started`. Nothing was
381
+ removed — the fields that were optional because a *different* kind of event
382
+ lacked them are now simply on the kinds that have them.
383
+
384
+ Import `AgentRunTerminalEventSchema` (or the sibling schemas) if you construct
385
+ events in tests.
386
+
387
+ ### If you implement `AgentRuntimeStore` directly, move to the driver
388
+
389
+ Not urgent and nothing breaks today — but the aggregate is no longer the
390
+ supported target, so its future growth will not be announced as breaking
391
+ (→ ADR 0111). The supported shape is one line:
392
+
393
+ ```ts
394
+ const driver: AgentRuntimeStoreDriver<TransactionClient> = { /* six primitives */ }
395
+ export const store = createAgentRuntimeStore(driver)
396
+ ```
397
+
398
+ Run `runAgentStoreConformance` against your adapter before and after any bump —
399
+ see *Before you bump, if you implement an agent store* above.
400
+
401
+ ## Released migration: 0.63.0
402
+
403
+ Four changes to what a running system reports and how an input reaches a run
404
+ in flight. Nothing moves an export except one added store member, and only an
405
+ application implementing `AgentRuntimeStore` directly has to touch code.
406
+
407
+ ### A spend figure that survives, and an input that joins
408
+
409
+ ### `AgentRuntimeStore` has a ninth member
410
+
411
+ Only if you implement the aggregate interface directly — an adapter built on
412
+ `AgentRuntimeStoreDriver` needs no change, and the public conformance kit covers
413
+ the new operation.
414
+
415
+ ```ts
416
+ // after
417
+ absorbQueuedRun(input: AbsorbQueuedRun): Promise<AgentStoreMutationResult>
418
+ ```
419
+
420
+ It moves a queued successor's inputs into the run already answering, in one
421
+ mutation, and marks the successor `absorbed`. Two run records change in one
422
+ transaction — if your driver persists them one at a time, persist both.
423
+
424
+ ### A provider failure says so
425
+
426
+ ```ts
427
+ // before — an upstream error arrived as a policy stop with no policy
428
+ if (terminal.reason === 'policy_stop') retryLater()
429
+
430
+ // after
431
+ if (terminal.reason === 'provider_failure') retryLater()
432
+ if (terminal.reason === 'provider_stop') { /* a length cap or content filter */ }
433
+ ```
434
+
435
+ `policy_stop` now always carries the `policyName` that caused it. If you switch
436
+ exhaustively on `AgentTerminalReason` or `AgentRunState`, add `'provider_stop'`
437
+ and `'absorbed'`.
438
+
439
+ ### `partial` changed meaning
440
+
441
+ It used to tell you which event kind you were holding. It now tells you whether
442
+ the figure beside it is a confirmed total:
443
+
444
+ ```ts
445
+ // after — true when the provider never reported the run finished
446
+ if (metrics.partial) treatAsFloor(metrics.usage)
447
+ ```
448
+
449
+ Terminal events for runs that were superseded, interrupted, timed out or failed
450
+ before the provider finished now report `partial: true` where they reported
451
+ `false`.
452
+
453
+ ### Checkpoint metrics are a running total
454
+
455
+ ```ts
456
+ // wrong, and now wrong by more than it used to be
457
+ const spent = checkpoints.reduce((total, c) => total + (c.metrics.usage?.cost?.value ?? 0), 0)
458
+ // right
459
+ const spent = checkpoints.at(-1)?.metrics.usage?.cost?.value
460
+ ```
461
+
462
+ ### You can read a run's spend back from the store
463
+
464
+ `AgentRun.usage` is written at every checkpoint and with the terminal record, so
465
+ a dropped observability event no longer loses the number, and a process that dies
466
+ mid-stream leaves behind what it had already spent.
467
+
468
+ ## Released migration: 0.62.0
469
+
470
+ Two groups of behaviour changes. Nothing moves an export — the surface is
471
+ strictly additive — and every item changes what a running system reports or
472
+ sends, which is what this heading is for. One of them changes a number you may
473
+ already be billing against.
474
+
475
+ ### A run reports what it spent
476
+
477
+ Three changes to what the runtime says about cost and tokens. Nothing moves an
478
+ export; all three change numbers a running system reports, and one of them
479
+ changes a number you may already be billing against.
480
+
481
+ #### Multi-step cost was under-reported and is now summed
482
+
483
+ No code change is needed to get the fix — but check any predicate that reads
484
+ `provenance`:
485
+
486
+ ```ts
487
+ // before — accepted a number that was one step's cost, not the run's
488
+ if (usage.cost?.provenance === 'provider-reported') bill(usage.cost.value)
489
+
490
+ // after — a sum stitchkit performed says so
491
+ if (usage.cost && usage.cost.provenance !== 'unavailable') bill(usage.cost.value)
492
+ ```
493
+
494
+ `'computed'` means stitchkit added up provider-reported parts. It is not a guess
495
+ — `'estimated'` is the word for that — but it is deliberately not
496
+ `'provider-reported'`, because that label is what a caller filters on when it
497
+ wants a figure it can bill against unchanged, and a sum is not one.
498
+
499
+ Token totals moved with it. The AI SDK's `totalUsage` is a sum *it* performed
500
+ over per-step provider figures — not a run total any provider handed over — so
501
+ labelling it `provider-reported` was the same overstatement. **A run total on a
502
+ terminal event is always `computed`.** If you want a figure with the provider's
503
+ own word on it, read `step-finished`: each step carries what that call reported.
504
+
505
+ #### `usage` is always present on a terminal event
506
+
507
+ ```ts
508
+ // before — absent when the run ended before the provider's `finish`
509
+ const spent = event.usage?.cost?.value ?? 0 // silently 0 for a real spend
510
+
511
+ // after — present, and it says what it does not know
512
+ event.usage?.cost?.provenance === 'unavailable' // we spent, and cannot say how much
513
+ ```
514
+
515
+ Keep the optional chaining: one `AgentRunEvent` shape covers `run-started`,
516
+ `step-finished` and `run-terminal`, so `usage` stays optional on the type. The
517
+ guarantee is about terminal events, and a schema shared with `run-started`
518
+ cannot express it.
519
+
520
+ **Do not read `unavailable` as zero.** A run aborted mid-stream has spent real
521
+ money that nobody has counted; a run that never reached the provider has not.
522
+ Both used to look the same and now do not.
523
+
524
+ #### A losing executor reports its own spend
525
+
526
+ An execution that loses the terminal compare-and-swap now emits an operator
527
+ `run-terminal` event, because it ran and it spent. If a sink treated those events
528
+ as "runs this process committed", that is no longer true — `AgentRuntimeResult.metrics`
529
+ is still `undefined` for a losing executor and remains the way to tell.
530
+
531
+ The *delivery* `terminal` event is unchanged and still fires only for the winner,
532
+ so nothing delivers a turn twice.
533
+
534
+ ### An interrupted answer stops passing as a finished one
535
+
536
+ Two behaviour changes, one shared cause: a run ended by a newer input used to
537
+ leave its half-written answer in the conversation with no sign that it was cut
538
+ off, and the next request to the provider carried it as an ordinary assistant
539
+ turn.
540
+
541
+ #### The projection marks an interrupted turn
542
+
543
+ Nothing to change to adopt the fix — the default is the fixed behaviour. What to
544
+ check is whether the marker is the *right* form for your surface, and the
545
+ question that decides it is not "was the run interrupted" but **"did anyone see
546
+ what it produced"**.
547
+
548
+ ```ts
549
+ // after — pick the form; the default is 'assistant-marked'
550
+ createAgentRuntime({ history: { interruptedAssistant: 'system-note' } })
551
+ ```
552
+
553
+ - **The user pressed stop and the text was on their screen** — keep
554
+ `'assistant-marked'`. The assistant turn is the truthful record of what the
555
+ human read, and the model should stay consistent with it.
556
+ - **The partial never reached anyone** — a surface that sends nothing until the
557
+ run is done — prefer `'system-note'`. An assistant turn in provider history is
558
+ a commitment the model stays consistent with; a system line is context.
559
+
560
+ If you pass `history.project` you own the projection outright and none of this
561
+ applies — but the same question does.
562
+
563
+ #### A run ended by a newer input can now say so
564
+
565
+ ```ts
566
+ // before
567
+ runs: { inputPolicy: 'interrupt' } // ends the run, keeps its partial answer
568
+
569
+ // after — for a surface where a follow-up message invalidates the answer
570
+ // in flight rather than merely stopping it
571
+ runs: { inputPolicy: 'supersede' } // ends the run, discards its partial answer
572
+ ```
573
+
574
+ `inputPolicy` also accepts `(input) => policy`, which is how one application
575
+ gives two conversation surfaces different rules without the runtime learning
576
+ which is which.
577
+
578
+ A superseded run terminates with `terminalReason: 'superseded'`, state
579
+ `'superseded'` and an assistant message of status `'superseded'`. **If you switch
580
+ exhaustively on any of those enums, add the arm** — that is the part of this
581
+ release that can break a build rather than a behaviour. The record itself is
582
+ kept: it is excluded from the projection, not deleted, so an operator can still
583
+ see what was thrown away.
584
+
585
+ ## Released migration: 0.61.0
586
+
587
+ Three behaviour changes between versions. None moves an export — the surface is
588
+ strictly additive — and all three change what a running system does, which is
589
+ what this heading is for.
590
+
591
+ ### A failed `start()` now drains before it rejects
592
+
593
+ The rollback of a failed startup used to close every resource with a zero
594
+ budget: it returned almost at once, by severing requests the server had already
595
+ accepted. It now spends the application's shutdown budget, so a request already
596
+ in flight is answered rather than killed.
597
+
598
+ **What to check.** Nothing, if a failed startup has nothing in flight — the
599
+ rollback still returns immediately. The case to think about is a request that
600
+ never finishes: a hung upstream, a client ignoring a close frame, a streaming
601
+ subscription. Under the default 30s grace and 5s force, a `start()` that used to
602
+ reject in milliseconds can now take 35 seconds to reject.
603
+
604
+ If a fast failure matters more than draining — a supervisor waiting to restart,
605
+ a boot check in CI — declare a smaller budget. The same field is the default for
606
+ `shutdown()` with no options, so this is one decision, not two:
607
+
608
+ ```ts
609
+ // before
610
+ createApplication({ id: 'app', resources })
611
+
612
+ // after
613
+ createApplication({
614
+ id: 'app',
615
+ resources,
616
+ shutdown: { gracePeriodMs: 5_000, forceTimeoutMs: 1_000 },
617
+ })
618
+ ```
619
+
620
+ The budget is a real bound: a `close` that never returns is abandoned when it
621
+ runs out and reported as a `close` failure, and the startup error remains the
622
+ `cause` of the `AggregateError` `start()` rejects with. → ADR 0107
623
+
624
+ ### A refused realtime frame now answers its sender
625
+
626
+ A frame that fails the receiver's `args` schema used to be dropped where it
627
+ landed. If the event carries an acknowledgement, the receiver now answers it
628
+ with a reserved envelope and the sender's `request()` rejects at once with
629
+ `RealtimeRequestRejectedError`. → ADR 0106
630
+
631
+ **What to check before you upgrade one half of a distributed pair.** Look at the
632
+ `ack` schemas on the OLDER peer:
633
+
634
+ ```ts
635
+ // safe: a contract-first acknowledgement refuses the envelope, so the older
636
+ // peer raises RealtimeRequestInvalidAcknowledgementError at once instead of
637
+ // waiting out its deadline. Different error, still an error, and sooner.
638
+ ack: z.object({ stored: z.boolean() })
639
+
640
+ // NOT safe: a schema that validates nothing accepts the refusal AS A VALUE.
641
+ // The older peer reads a refusal as a successful acknowledgement — silently.
642
+ ack: z.unknown()
643
+ ack: z.looseObject({})
644
+ ```
645
+
646
+ If any acknowledgement on the older side is permissive, tighten it before the
647
+ rollout, or upgrade both halves together.
648
+
649
+ Also: the receiver now invokes the peer's raw acknowledgement callback for a
650
+ refused frame, including when the peer is a plain Socket.IO client. That
651
+ callback previously could not run on a refused frame and now can.
652
+
653
+ `RealtimeRejectedEvent['reason']` gained `'rejected-by-peer'`. If you `switch`
654
+ over it exhaustively with an `assertNever` default, that stops compiling — add
655
+ the case.
656
+
657
+ ### Two smaller behaviour changes, easy to miss
658
+
659
+ **`streamSSE`'s `cancel` no longer awaits the generator.** Teardown is now
660
+ unordered relative to request completion. If your generator releases a resource
661
+ in `return()`/`finally` — a temp file, a pooled connection — and anything
662
+ downstream assumed that had finished by the time the response settled, it no
663
+ longer has. Release in the generator's own `finally` and do not depend on the
664
+ ordering.
665
+
666
+ **A `socket.io-client` peer that cannot load no longer kills the process.** With
667
+ `onConnectError` configured, the failure is delivered there with
668
+ `terminal: true` instead of crashing. If your handler logs and moves on, you now
669
+ have a live process whose client will never connect, where a supervisor used to
670
+ restart it. Treat `terminal: true` as fatal if that is what you want.
671
+
672
+ ### `reportHealth` inside `start` is no longer discarded
673
+
674
+ Becoming ready assigned `healthy` unconditionally, throwing away whatever a
675
+ resource reported during `start`. It is now kept, and only a resource that
676
+ reported nothing is assumed healthy.
677
+
678
+ **How to find what this touches:** grep your `start` bodies for **every**
679
+ `reportHealth` call, not only the ones reporting `degraded`. The old
680
+ unconditional assignment was also a repair — a resource that reported
681
+ `'unhealthy'` early in `start` and never corrected itself was quietly fixed up
682
+ on the way to ready.
683
+
684
+ Two cases, and they need opposite fixes.
685
+
686
+ **1. A resource that is genuinely expected to start degraded** — up, but still
687
+ dialling something external. `required` defaults to **`true`**, and readiness
688
+ requires every required resource to be healthy, so such a resource now refuses
689
+ the whole startup where before its report vanished. That is the invariant
690
+ working as intended; what changed is that it can be reached. Say what it is:
691
+
692
+ ```ts
693
+ // before: started, and its report was discarded
694
+ defineManagedResource({ id: 'dialling', start: ({ reportHealth }) => reportHealth('degraded') })
695
+
696
+ // after: says what it is, and does not gate the application
697
+ defineManagedResource({ id: 'dialling', required: false, start: ({ reportHealth }) => reportHealth('degraded') })
698
+ ```
699
+
700
+ **2. A resource that reported `'unhealthy'` early and became healthy later** —
701
+ a pessimistic report before a connection settled. Here `required: false` is the
702
+ **wrong** fix: it would hide a real failure. Report the recovery instead:
703
+
704
+ ```ts
705
+ start: async ({ reportHealth }) => {
706
+ reportHealth('unhealthy')
707
+ await connect()
708
+ reportHealth('healthy') // ← previously unnecessary; now it is the fix
709
+ }
710
+ ```
711
+
712
+ **Also check your health endpoint.** An **optional** resource reporting
713
+ non-healthy during `start` now moves the application aggregate to `degraded`,
714
+ where before it stayed `healthy`. A readiness probe that maps `degraded` to a
715
+ non-200 will flip on upgrade — and a supervisor that restarts on that will loop.
716
+
717
+ The refusals now say which of the two happened: a resource that was never
718
+ healthy is told it "is not healthy" and pointed at `required: false`; one that
719
+ was healthy and stopped is told it "lost readiness" and pointed at
720
+ `onResourceFailure`.
721
+
722
+ ## Released migration: 0.60.0
723
+
724
+ ### close() says what it achieved
725
+
726
+ `AgentRuntime.close()` returned `Promise<void>` and its contract promised three
727
+ things that cannot hold together. It now returns
728
+ `{ settled, timedOut, remaining }`.
729
+
730
+ Nothing breaks if you ignore the value:
731
+
732
+ ```ts
733
+ await runtime.close({ gracePeriodMs: 30_000, forceTimeoutMs: 5_000 })
734
+ ```
735
+
736
+ What DOES change is any code that relied on the old sentence "`close()` never
737
+ returns while a run is still in flight" while naming a `forceTimeoutMs`. That
738
+ was never true — the force budget exists precisely to stop waiting — so if your
739
+ process exits straight after `close()`, read the result:
740
+
741
+ ```ts
742
+ const closed = await runtime.close({ gracePeriodMs: 30_000, forceTimeoutMs: 5_000 })
743
+ if (!closed.settled) {
744
+ // `closed.remaining` runs were still in flight. They stay recoverable
745
+ // through `scanRecoverable`; close never marks them terminal on its own.
746
+ logger.warn({ remaining: closed.remaining }, 'exiting with runs in flight')
747
+ }
748
+ ```
749
+
750
+ If you want the old guarantee, omit `forceTimeoutMs`: that is the one
751
+ combination in which `close()` cannot return with a run in flight — and its wait
752
+ is unbounded, which is the trade.
753
+
754
+ A TypeScript consumer that wrote `const done: void = await runtime.close()` is
755
+ the only shape that stops compiling.
756
+
757
+ ### one name per concept
758
+
759
+ `AgentModelDeclaration` was a bare alias of `AgentModelDescriptor`, so the same
760
+ type reached consumers under two exported names:
761
+
762
+ ```ts
763
+ // before
764
+ defineModelRegistry<Record<string, AgentModelDeclaration>>({ … })
765
+ // after
766
+ defineModelRegistry<Record<string, AgentModelDescriptor>>({ … })
767
+ ```
768
+
769
+ A find-and-replace covers it; there is no behavioural change. Kept name is
770
+ `AgentModelDescriptor`, the one paired with `AgentModelDescriptorSchema` and
771
+ returned by `registry.descriptor()`.
772
+
773
+ Two names that look like the same case and are **not** being merged:
774
+ `SocketEventMap` aliases Socket.IO's `EventsMap` so a vendor's name stays out of
775
+ our signatures, and `AgentRun.ownerId` holds the same value a runtime publishes
776
+ as `runtimeEpoch` on its events. The latter is one identity in two roles — "who
777
+ owns this run" and "which runtime emitted this event" — and both declarations
778
+ now say so. Renaming either would make the fencing comparison read worse.
779
+
780
+ ### a reachable public surface
781
+
782
+ Three exports that the public API required and did not provide, plus one option
783
+ it accepted and ignored.
784
+
785
+ ```ts
786
+ // before — identified by string, because the class was exported nowhere
787
+ if (error instanceof Error && error.name === 'AgentRuntimeConflictError') …
788
+ // after
789
+ import { AgentRuntimeConflictError } from 'stitchkit/agent-runtime'
790
+ if (error instanceof AgentRuntimeConflictError) …
791
+ ```
792
+
793
+ `ActivityTokenBrand` is exported, so `ActivityProjection` can be implemented by
794
+ a test double. `STITCH_ERROR_STATUS` gained `APPLICATION_NOT_ACCEPTING` (503) —
795
+ only an exhaustive `satisfies Record<StitchErrorCode, …>` map stops compiling,
796
+ and the fix is one line. (`GRAMMY_WEBHOOK_NOT_ACCEPTING` joined it in 0.60.1,
797
+ under the same rule — see ADR 0105. This section briefly said the opposite: that
798
+ an adapter's code stays out of the registry. It does not, and leaving it out was
799
+ the worse of the two, because `isStitchErrorCode` then answered `false` and the
800
+ code reached the wire spelled stitchkit's way, past both `codeMap` and
801
+ `unmappedCode`.)
802
+
803
+ `application.shutdown()` no longer accepts `retryAfterSeconds`. Delete it from
804
+ the call — the kernel never read it. If you meant the HTTP `Retry-After` a
805
+ draining server sends, that lives on `managedServerResource({ retryAfterSeconds })`,
806
+ where it always did the work.
807
+
808
+ ### one shutdown vocabulary
809
+
810
+ ```ts
811
+ // before
812
+ await runtime.close({ drainTimeoutMs: 30_000, forceTimeoutMs: 5_000 })
813
+ // after
814
+ await runtime.close({ gracePeriodMs: 30_000, forceTimeoutMs: 5_000 })
815
+ ```
816
+
817
+ The rename is mechanical. The behaviour change under it is not, and it is the
818
+ reason the rename waited: two combinations were traps.
819
+ `close({ drainTimeoutMs })` with no force budget aborted the runs and returned
820
+ **without waiting for them to settle** — so naming a budget gave a weaker
821
+ guarantee than naming none — and `close({ forceTimeoutMs })` with no drain
822
+ budget never read the force budget, leaving an unbounded wait. Both now behave
823
+ as their names say.
824
+
825
+ > **Superseded.** This section once ended "and `close()` never returns while a
826
+ > run is in flight". That was never true with a force budget — the budget exists
827
+ > to stop waiting — and `close()` now returns `{ settled, timedOut, remaining }`
828
+ > instead of promising it. See *Released migration: 0.60.0 → close() says what
829
+ > it achieved*, above.
830
+
831
+ If your shutdown path measured how long `close()` took, expect it to take
832
+ longer in exactly the case where it used to return early — that is the fix, not
833
+ a regression. Defaults stay per-surface: `ShutdownOptions.gracePeriodMs`
834
+ defaults to 30 seconds, and the runtime's omitted budget still means "abort
835
+ immediately", the behaviour `close()` has always had.
836
+
837
+ ### unresolved attachments are omitted
838
+
839
+ `history.unresolvedFile` defaulted to `text`, and the placeholder it produced
840
+ carried the storage reference:
841
+
842
+ ```ts
843
+ // before — the provider received your object key
844
+ // "[attachment: s3://bucket/tenants/42/invoice.pdf]"
845
+ history: {}
846
+ // after — omitted entirely by default; ask for a placeholder explicitly
847
+ history: { unresolvedFile: 'text' } // "[attachment: invoice.pdf]"
848
+ ```
849
+
850
+ Two things to check. If a prompt relied on the model seeing *something* where an
851
+ unresolved file was, set `unresolvedFile: 'text'` — behaviour otherwise changes
852
+ silently, since an omitted part produces no error. And if any stored transcript
853
+ or provider log contains the old placeholder, it contains your storage layout;
854
+ treat those as disclosed. The `error` policy still names the reference, because
855
+ it is thrown into your process rather than sent upstream.
856
+
857
+ ### one bounded recoverable scan
858
+
859
+ `AgentRuntimeStore` had two scans: a mandatory unbounded one and an optional
860
+ paged one. The runtime only ever called the optional one, so implementing the
861
+ interface as written produced a store that threw on its first `recover()`:
862
+
863
+ ```ts
864
+ // before — the mandatory member was dead, the needed one was optional
865
+ {
866
+ scanRecoverable: () => loadEveryRecoverableSnapshot(),
867
+ scanRecoverablePage: ({ cursor, limit }) => page(cursor, limit),
868
+ }
869
+ // after — one member, the bounded signature the driver already used
870
+ { scanRecoverable: ({ cursor, limit }) => page(cursor, limit) }
871
+ ```
872
+
873
+ Delete the unbounded implementation rather than porting it: loading every
874
+ recoverable conversation to start is the shape 0.59.0 and ADR 0101 moved away
875
+ from, and nothing calls it now. If you built on `createAgentRuntimeStore()` you
876
+ have nothing to do **if you only pass it to the runtime** — it implements the
877
+ bounded page for you from the same driver member. If you CALL it yourself, the
878
+ member changed shape: `scanRecoverable()` took no argument and returned
879
+ snapshots; it now takes `{ cursor?, limit }` — `limit` is required — and returns
880
+ one page of descriptors.
881
+ ```ts
882
+ // before: const stale = await store.scanRecoverable()
883
+ // after: const { items, nextCursor } = await store.scanRecoverable({ limit: 100 })
884
+ ```
885
+
886
+ ### published application status
887
+
888
+ `createApplicationHealthHandler` and `createApplicationOperationalHandlers` no
889
+ longer serialise the whole `ApplicationSnapshot`. They publish
890
+ `ApplicationStatusProjection` — the verdict plus resource counts:
891
+
892
+ ```ts
893
+ // before — the response named every resource and its dependency edges
894
+ const { resources } = await fetch('/status').then((r) => r.json())
895
+ resources[0].dependsOn
896
+ // after — the topology is read in-process, where it always belonged
897
+ app.getSnapshot().resources[0].dependsOn
898
+ ```
899
+
900
+ The consequence to check is not compilation — it is whatever already consumes
901
+ these routes. A dashboard that drew the dependency graph from `/status`, or an
902
+ alert keyed on `admission.pending`, goes blank rather than red: the fields are
903
+ absent, not zero. Both are available from `getSnapshot()`, so the fix is to read
904
+ them in the process that owns the application and publish them on a channel you
905
+ control. If a route was reachable from outside your network, treat the previous
906
+ payload as disclosed and rotate nothing but assume the topology is known.
907
+
908
+ ## Released migration: 0.59.0
909
+
910
+ ### Normalized agent runtime persistence
911
+
912
+ `AgentRuntimeStoreDriver` no longer reads and rewrites a lifetime `AgentStoredState` JSON
913
+ aggregate. Migrate that row and its recoverable/archive projections once:
914
+
915
+ 1. Copy `conversationId` and `version` into the bounded runtime head.
916
+ 2. Write every `AgentStoredState.runs[]` entry as one normalized run record.
917
+ 3. Write every `AgentStoredState.admissions[]` entry as one admission receipt and copy its
918
+ canonical input into that receipt.
919
+ 4. For terminal runs, retain the canonical assistant on the run record before deleting any old
920
+ history/archive rows.
921
+ 5. Replace the recoverable projection with an index over normalized run `state`.
922
+ 6. Cut the adapter over atomically; there is no compatibility driver or dual-write mode.
923
+
924
+ ```ts
925
+ // before
926
+ createAgentRuntimeStore({
927
+ state: { load, compareAndSwap },
928
+ history: { load, loadById, apply },
929
+ scanRecoverable,
930
+ })
931
+
932
+ // after
933
+ createAgentRuntimeStore({
934
+ head: { load, compareAndSwap },
935
+ runs: { load, loadByAssistantMessageId, loadMany, listActive, save },
936
+ admissions: { load, loadByInputMessageId, create },
937
+ history: { load, apply },
938
+ scanRecoverable,
939
+ })
940
+ ```
941
+
942
+ `AgentRuntimeHeadSchema`, `AgentStoredRunSchema` and `AgentAdmissionReceiptSchema` replace
943
+ `AgentStoredStateSchema` and `AgentAdmissionIdentitySchema`. Run
944
+ `runAgentStoreConformance()` against the migrated adapter before switching production traffic.
945
+ If an application implements `AgentRuntimeStore` directly, its duplicate result must also include
946
+ the canonical `run` and the retained `assistant` for a terminal run.
947
+
948
+ ## Released migration: 0.58.0
949
+
950
+ ### The default history projection rejects invalid chronology
951
+
952
+ `projectAgentHistory` no longer forwards records a provider contract cannot
953
+ accept. A completed assistant record before the first user message, and an
954
+ assistant record whose tool calls have no matching results, are omitted with an
955
+ inspectable decision instead of being sent upstream:
956
+
957
+ ```ts
958
+ // before — a leading assistant record was forwarded as-is
959
+ projectAgentHistory(messages)
960
+ // after — opt in explicitly, and only where the provider contract permits it
961
+ projectAgentHistory(messages, { leadingAssistant: 'allow' })
962
+ ```
963
+
964
+ Two consequences the changelog does not spell out. First, the projection can now
965
+ return **fewer** messages than the history holds, so any assertion or metric
966
+ that compared projected length against stored length will move; read the
967
+ detailed projection instead — it reports what was omitted and why, which is the
968
+ supported way to see the difference. Second, the omission is silent to the
969
+ provider but not to you: if a conversation suddenly loses its leading context,
970
+ the decision record is where that shows up, not the transcript.
971
+
972
+ ### Operator events redact `internalCause` by default
973
+
974
+ Raw provider and tool failures no longer travel in operator events unless the
975
+ sink asks for them:
976
+
977
+ ```ts
978
+ // before — internalCause was present
979
+ createAgentObservability({ write })
980
+ // after — an explicit operator-only opt-in
981
+ createAgentObservability({ write, includeInternalCause: true })
982
+ ```
983
+
984
+ The consequence to check before upgrading: any dashboard, alert or log
985
+ processor keyed on `internalCause` goes blind the moment you upgrade, and it
986
+ goes blind quietly — the field is absent, not empty. Set the flag on the
987
+ operator sink you own. Product delivery stays redacted regardless of the flag;
988
+ this option cannot widen what reaches a user.
989
+
990
+ ## Released migration: 0.57.0
991
+
992
+ ### Duplicate admission results carry the complete identity
993
+
994
+ Custom `AgentRuntimeStore` adapters must persist and return the input and
995
+ assistant identities associated with an idempotency key:
996
+
997
+ ```ts
998
+ // before
999
+ return { outcome: 'duplicate', runId, snapshot }
1000
+
1001
+ // after
1002
+ return { outcome: 'duplicate', input, inputMessageId, runId, assistantMessageId, snapshot }
1003
+ ```
1004
+
1005
+ Prefer replacing the custom aggregate reducer with `createAgentRuntimeStore()`;
1006
+ its admission record and transaction driver implement this contract
1007
+ automatically. Historical note: 0.59.0 reshaped this driver again, so an adapter
1008
+ crossing both versions should read that section first and migrate once.
1009
+
1010
+ ### `AgentRuntimeEvent` adds a post-commit `admission` variant
1011
+
1012
+ Add it to any exhaustive publisher switch. Its `assistant` is either the pending
1013
+ placeholder for a new assignment or the canonical persisted assistant for a
1014
+ duplicate:
1015
+
1016
+ ```ts
1017
+ case 'admission':
1018
+ await persistProductProjection(event.input, event.run, event.assistant)
1019
+ break
1020
+ ```
1021
+
1022
+ The consequence for an exhaustive switch written without a `default` branch is a
1023
+ compile error, which is the point. The consequence for a switch that *has* a
1024
+ `default` is worse and silent: post-commit admissions fall into it and are
1025
+ projected as an unknown event. Grep for publisher switches before upgrading.
1026
+
1027
+ ## Released migration: 0.56.0
1028
+
1029
+ ### Surface manifests are version 2
1030
+
1031
+ `operation.tools` could not describe a role-selected MCP surface, a different
1032
+ Agent or CLI selection, or an advertised `extend` schema, so projections moved
1033
+ out of the canonical operation:
1034
+
1035
+ ```ts
1036
+ // before
1037
+ manifest.operations[0].tools.MCP
1038
+ // after
1039
+ manifest.toolSurfaces.find((s) => s.transport === 'MCP' && s.surface === null)?.tools
1040
+
1041
+ // before
1042
+ buildSurfaceManifest({ mcpSurfaces: { admin: { services, extend } } })
1043
+ // after
1044
+ buildSurfaceManifest({ mcpSurfaces: { admin: { services } }, mcpPreparation: { extend } })
1045
+ ```
1046
+
1047
+ A committed snapshot is regenerated once, deliberately: `manifestVersion` is
1048
+ `2`, and `ConformanceTransport` gained `REALTIME`, so any exhaustive
1049
+ `Record<ConformanceTransport, …>` must handle it.
1050
+
1051
+ ### `FILE_*` codes joined the error registry
1052
+
1053
+ `StitchErrorCode` gained `FILE_INVALID_PATH`, `FILE_OUTSIDE_ROOT`,
1054
+ `FILE_NOT_FOUND`, `FILE_NOT_REGULAR`, `FILE_INSPECTION_REJECTED`,
1055
+ `FILE_TOO_LARGE` and `FILE_EXISTS`. Only exhaustive maps break:
1056
+
1057
+ ```ts
1058
+ // before — compiled while the registry had no file codes
1059
+ const copy: Record<StitchErrorCode, string> = { …, RATE_LIMITED: '…' }
1060
+ // after — add the seven managed-file codes (or use Partial<Record<…>>)
1061
+ ```
1062
+
1063
+ Unexpected IO stays scrubbed as `INTERNAL_SERVER_ERROR`: the new codes are the
1064
+ caller-safe ones only.
1065
+
1066
+ ### `ScopedAuthHook` is nominal
1067
+
1068
+ A hand-written function shaped like an auth hook is no longer assignable —
1069
+ identity now comes from the factory, so scope ownership and the inferred
1070
+ context cannot drift apart:
1071
+
1072
+ ```ts
1073
+ // before — a structural stand-in
1074
+ const auth: ScopedAuthHook<Scopes> = async (ctx, endpoint) => { … }
1075
+ // after — create it, then compose domains
1076
+ const auth = createAuthHook({ resolve, rules })
1077
+ const composed = composeAuthHooks({ hooks: [auth, billingAuth], defaultScope: 'public' })
1078
+ ```
1079
+
1080
+ ### Managed-file inspectors also run on reads
1081
+
1082
+ An inspector is no longer write-only, and it has a finite default deadline
1083
+ (15 s). Make it read-aware and idempotent — a read carries no
1084
+ `declaredMediaType`:
1085
+
1086
+ ```ts
1087
+ // before
1088
+ inspect: ({ declaredMediaType }) => inspectDeclaredType(declaredMediaType!)
1089
+ // after
1090
+ inspect: ({ prefix, declaredMediaType, signal }) =>
1091
+ inspectBytes(prefix, { declaredMediaType, signal })
1092
+ ```
1093
+
1094
+ Set `inspectionTimeoutMs` explicitly when 15 seconds is the wrong budget.
1095
+
1096
+ ### Direct async-operation binding needs a wire-stable ID
1097
+
1098
+ A direct binding reuses the start output as the follow-up wire input, so the ID
1099
+ schema must parse to itself (`z.input` equals `z.output`, no transform,
1100
+ coercion, default or overwrite). Anything else is parsed twice:
1101
+
1102
+ ```ts
1103
+ // before — a transform silently ran on start and again on every follow-up
1104
+ defineAsyncOperationContract({ binding: 'direct', id: z.string().transform(Number) })
1105
+ // after — keep the wire shape, adapt explicitly
1106
+ defineAsyncOperationContract({
1107
+ binding: 'adapted',
1108
+ id,
1109
+ adapters: { idFromStart, inputFor },
1110
+ })
1111
+ ```
1112
+
1113
+ ## Released migration: 0.55.0
1114
+
1115
+ ### Peer-free `implementRemote`
1116
+
1117
+ `implementRemote` now has one canonical, optional-peer-free owner. This keeps
1118
+ MCP SDK and AI SDK modules out of CLI bundles that only proxy HTTP calls:
1119
+
1120
+ ```ts
1121
+ // before
1122
+ import { implementRemote } from 'stitchkit/tools'
1123
+ // after
1124
+ import { implementRemote } from 'stitchkit/remote'
1125
+ ```
1126
+
1127
+ ### Managed file boundary and strict auth returns
1128
+
1129
+ Create one boundary during application bootstrap and pass the capability, never
1130
+ a per-call directory or host path:
1131
+
1132
+ ```ts
1133
+ import { createManagedFileBoundary } from 'stitchkit/files'
1134
+
1135
+ const files = await createManagedFileBoundary({ root: '/srv/app-files' })
1136
+
1137
+ // before
1138
+ defineDownloadTool({ defaultDir: '/srv/app-files', resolveUrl, ...common })
1139
+ defineUploadTool({ upload: (path) => provider.uploadFile(path), ...common })
1140
+ defineViewFileTool({ baseDir: '/srv/app-files', ...common })
1141
+
1142
+ // after
1143
+ defineDownloadTool({ files, resolveUrl, ...common })
1144
+ defineUploadTool({ files, upload: ({ bytes }) => provider.upload(bytes), ...common })
1145
+ defineViewFileTool({ files, ...common })
1146
+ ```
1147
+
1148
+ Downloaded `path` is now relative to the boundary and MIME metadata is named
1149
+ `mediaType`. Update raw `mountDownload`/`mountUpload`/`mountViewFile` configs the
1150
+ same way. Auth predicates must explicitly return `true`, `false`, or a plain
1151
+ object of context fields; replace accidental `undefined` fallthroughs with the
1152
+ intended boolean.
1153
+
1154
+ ## Released migration: 0.53.0
1155
+
1156
+ ### Realtime `emit` returns `boolean` instead of `void`
1157
+
1158
+ Every **call site** compiles and behaves exactly as before — the return value
1159
+ is new information (`true` = accepted by the transport, `false` = dropped
1160
+ while the browser client was disconnected), not a behavior change. What breaks
1161
+ is **implementing** the interfaces: a test mock or app-side adapter of
1162
+ `SocketIOClient` / `RealtimeClient` / `ValidatedRealtimeSocket` /
1163
+ `RealtimeServer` whose `emit` returns `void` no longer typechecks.
1164
+
1165
+ ```ts
1166
+ // before — a void mock satisfied the interface
1167
+ const mock: Pick<RealtimeClient<S, C>, 'emit'> = { emit: () => {} }
1168
+ // after — report acceptance (true is what a live server-side emit reports)
1169
+ const mock: Pick<RealtimeClient<S, C>, 'emit'> = { emit: () => true }
1170
+ ```
1171
+
1172
+ While migrating, consider replacing hand-rolled `if (client.connected)` guards
1173
+ with the new honest surface: check `client.emit(...) === false`, or observe
1174
+ drops centrally with `onDroppedEmit`.