stitchkit 0.92.0 → 0.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (793) hide show
  1. package/CHANGELOG.md +191 -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-tool-contract.d.ts +2 -1
  14. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  15. package/dist/agent-runtime/deferred-tool-types.d.ts +2 -2
  16. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  17. package/dist/agent-runtime/events.d.ts +1 -1
  18. package/dist/agent-runtime/events.d.ts.map +1 -1
  19. package/dist/agent-runtime/managed-tools.d.ts +1 -1
  20. package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
  21. package/dist/agent-runtime/observability.d.ts +1 -1
  22. package/dist/agent-runtime/observability.d.ts.map +1 -1
  23. package/dist/{agent-runtime-openrouter.d.ts → agent-runtime/openrouter.d.ts} +3 -3
  24. package/dist/agent-runtime/openrouter.d.ts.map +1 -0
  25. package/dist/agent-runtime/projections.d.ts +1 -1
  26. package/dist/agent-runtime/projections.d.ts.map +1 -1
  27. package/dist/agent-runtime/run-acquisition.d.ts +17 -0
  28. package/dist/agent-runtime/run-acquisition.d.ts.map +1 -0
  29. package/dist/agent-runtime/run-execution-state.d.ts +133 -0
  30. package/dist/agent-runtime/run-execution-state.d.ts.map +1 -0
  31. package/dist/agent-runtime/run-execution.d.ts +17 -33
  32. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  33. package/dist/agent-runtime/run-failure.d.ts +18 -0
  34. package/dist/agent-runtime/run-failure.d.ts.map +1 -0
  35. package/dist/agent-runtime/run-model-attempts.d.ts +6 -0
  36. package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -0
  37. package/dist/agent-runtime/run-prompt-history.d.ts +58 -0
  38. package/dist/agent-runtime/run-prompt-history.d.ts.map +1 -0
  39. package/dist/agent-runtime/run-provider-ledger.d.ts +26 -0
  40. package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -0
  41. package/dist/agent-runtime/run-stream-parts.d.ts +17 -0
  42. package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -0
  43. package/dist/agent-runtime/run-terminal.d.ts +11 -0
  44. package/dist/agent-runtime/run-terminal.d.ts.map +1 -0
  45. package/dist/agent-runtime/run-turn-preparation.d.ts +22 -0
  46. package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -0
  47. package/dist/agent-runtime/runtime-admission-gate.d.ts +29 -0
  48. package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -0
  49. package/dist/agent-runtime/runtime-control.d.ts +9 -0
  50. package/dist/agent-runtime/runtime-control.d.ts.map +1 -0
  51. package/dist/agent-runtime/runtime-recovery.d.ts +10 -0
  52. package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -0
  53. package/dist/agent-runtime/runtime-state.d.ts +36 -0
  54. package/dist/agent-runtime/runtime-state.d.ts.map +1 -0
  55. package/dist/agent-runtime/runtime-submit.d.ts +5 -0
  56. package/dist/agent-runtime/runtime-submit.d.ts.map +1 -0
  57. package/dist/agent-runtime/runtime.d.ts +9 -4
  58. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  59. package/dist/{agent-runtime-sqlite-bun.d.ts → agent-runtime/sqlite-bun.d.ts} +5 -4
  60. package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -0
  61. package/dist/agent-runtime/sqlite-events.d.ts +5 -0
  62. package/dist/agent-runtime/sqlite-events.d.ts.map +1 -0
  63. package/dist/agent-runtime/sqlite-history.d.ts +7 -0
  64. package/dist/agent-runtime/sqlite-history.d.ts.map +1 -0
  65. package/dist/agent-runtime/sqlite-ledger.d.ts +7 -0
  66. package/dist/agent-runtime/sqlite-ledger.d.ts.map +1 -0
  67. package/dist/{agent-runtime-sqlite-node.d.ts → agent-runtime/sqlite-node.d.ts} +5 -4
  68. package/dist/agent-runtime/sqlite-node.d.ts.map +1 -0
  69. package/dist/agent-runtime/sqlite-reads.d.ts +14 -0
  70. package/dist/agent-runtime/sqlite-reads.d.ts.map +1 -0
  71. package/dist/agent-runtime/sqlite-rows.d.ts +178 -0
  72. package/dist/agent-runtime/sqlite-rows.d.ts.map +1 -0
  73. package/dist/agent-runtime/sqlite-schema.d.ts +7 -0
  74. package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -0
  75. package/dist/agent-runtime/sqlite-transactions.d.ts +25 -0
  76. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -0
  77. package/dist/agent-runtime/sqlite.d.ts +10 -6
  78. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  79. package/dist/agent-runtime/store-archive.d.ts +16 -0
  80. package/dist/agent-runtime/store-archive.d.ts.map +1 -0
  81. package/dist/{testing/agent-store-conformance.d.ts → agent-runtime/store-conformance.d.ts} +2 -2
  82. package/dist/agent-runtime/store-conformance.d.ts.map +1 -0
  83. package/dist/agent-runtime/store-create.d.ts +11 -0
  84. package/dist/agent-runtime/store-create.d.ts.map +1 -0
  85. package/dist/agent-runtime/{store-driver.d.ts → store-driver-contract.d.ts} +7 -7
  86. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -0
  87. package/dist/agent-runtime/store-events.d.ts +7 -89
  88. package/dist/agent-runtime/store-events.d.ts.map +1 -1
  89. package/dist/agent-runtime/store-memory.d.ts +4 -0
  90. package/dist/agent-runtime/store-memory.d.ts.map +1 -0
  91. package/dist/agent-runtime/store-mutate.d.ts +13 -0
  92. package/dist/agent-runtime/store-mutate.d.ts.map +1 -0
  93. package/dist/agent-runtime/store-purge.d.ts +1 -1
  94. package/dist/agent-runtime/store-purge.d.ts.map +1 -1
  95. package/dist/agent-runtime/store-reads.d.ts +29 -0
  96. package/dist/agent-runtime/store-reads.d.ts.map +1 -0
  97. package/dist/agent-runtime/store-reduce-history.d.ts +10 -0
  98. package/dist/agent-runtime/store-reduce-history.d.ts.map +1 -0
  99. package/dist/agent-runtime/store-reduce-run.d.ts +14 -0
  100. package/dist/agent-runtime/store-reduce-run.d.ts.map +1 -0
  101. package/dist/agent-runtime/store-reduce-shared.d.ts +76 -0
  102. package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -0
  103. package/dist/agent-runtime/store-reduce-terminal.d.ts +6 -0
  104. package/dist/agent-runtime/store-reduce-terminal.d.ts.map +1 -0
  105. package/dist/agent-runtime/store-reducer.d.ts +24 -0
  106. package/dist/agent-runtime/store-reducer.d.ts.map +1 -0
  107. package/dist/agent-runtime/store-snapshot.d.ts +19 -0
  108. package/dist/agent-runtime/store-snapshot.d.ts.map +1 -0
  109. package/dist/agent-runtime/store.d.ts +1 -1
  110. package/dist/agent-runtime/store.d.ts.map +1 -1
  111. package/dist/application/admission.d.ts +1 -1
  112. package/dist/application/admission.d.ts.map +1 -1
  113. package/dist/application/events.d.ts +1 -1
  114. package/dist/application/events.d.ts.map +1 -1
  115. package/dist/{server → application}/file-state-store.d.ts +1 -1
  116. package/dist/application/file-state-store.d.ts.map +1 -0
  117. package/dist/application/health.d.ts +1 -1
  118. package/dist/application/health.d.ts.map +1 -1
  119. package/dist/application/kernel-admission.d.ts +8 -0
  120. package/dist/application/kernel-admission.d.ts.map +1 -0
  121. package/dist/application/kernel-contract.d.ts +142 -0
  122. package/dist/application/kernel-contract.d.ts.map +1 -0
  123. package/dist/application/kernel-resource-context.d.ts +24 -0
  124. package/dist/application/kernel-resource-context.d.ts.map +1 -0
  125. package/dist/application/kernel-restart.d.ts +5 -0
  126. package/dist/application/kernel-restart.d.ts.map +1 -0
  127. package/dist/application/kernel-rollback.d.ts +4 -0
  128. package/dist/application/kernel-rollback.d.ts.map +1 -0
  129. package/dist/application/kernel-shutdown.d.ts +6 -0
  130. package/dist/application/kernel-shutdown.d.ts.map +1 -0
  131. package/dist/application/kernel-start.d.ts +20 -0
  132. package/dist/application/kernel-start.d.ts.map +1 -0
  133. package/dist/application/kernel-state.d.ts +116 -0
  134. package/dist/application/kernel-state.d.ts.map +1 -0
  135. package/dist/application/kernel.d.ts +9 -140
  136. package/dist/application/kernel.d.ts.map +1 -1
  137. package/dist/application/latest-sink.d.ts +1 -1
  138. package/dist/application/latest-sink.d.ts.map +1 -1
  139. package/dist/application/opentelemetry.d.ts +1 -1
  140. package/dist/application/opentelemetry.d.ts.map +1 -1
  141. package/dist/application/watch-hub.d.ts +2 -2
  142. package/dist/application/watch-hub.d.ts.map +1 -1
  143. package/dist/browser/client-multipart.d.ts +1 -1
  144. package/dist/browser/client-multipart.d.ts.map +1 -1
  145. package/dist/browser/client-url.d.ts +1 -1
  146. package/dist/browser/client-url.d.ts.map +1 -1
  147. package/dist/browser/client.d.ts +1 -1
  148. package/dist/browser/client.d.ts.map +1 -1
  149. package/dist/browser/contract-stream.d.ts +1 -1
  150. package/dist/browser/contract-stream.d.ts.map +1 -1
  151. package/dist/browser/http.d.ts +1 -1
  152. package/dist/browser/http.d.ts.map +1 -1
  153. package/dist/browser/resumable.d.ts +1 -28
  154. package/dist/browser/resumable.d.ts.map +1 -1
  155. package/dist/browser/retained.d.ts.map +1 -0
  156. package/dist/browser/socket-io.d.ts +23 -1
  157. package/dist/browser/socket-io.d.ts.map +1 -1
  158. package/dist/browser/stream.d.ts +14 -2
  159. package/dist/browser/stream.d.ts.map +1 -1
  160. package/dist/contract/define.d.ts +72 -65
  161. package/dist/contract/define.d.ts.map +1 -1
  162. package/dist/{internal/errors.d.ts → contract/normalize.d.ts} +3 -39
  163. package/dist/contract/normalize.d.ts.map +1 -0
  164. package/dist/contract/tool-view.d.ts +135 -0
  165. package/dist/contract/tool-view.d.ts.map +1 -0
  166. package/dist/declaration/declaration.d.ts.map +1 -0
  167. package/dist/{agent-runtime/durability-contract.d.ts → durability/contract.d.ts} +2 -2
  168. package/dist/durability/contract.d.ts.map +1 -0
  169. package/dist/{agent-runtime/durability.d.ts → durability/engine.d.ts} +4 -4
  170. package/dist/durability/engine.d.ts.map +1 -0
  171. package/dist/durability/events.d.ts +101 -0
  172. package/dist/durability/events.d.ts.map +1 -0
  173. package/dist/{agent-runtime/durability-json.d.ts → durability/json.d.ts} +1 -1
  174. package/dist/durability/json.d.ts.map +1 -0
  175. package/dist/{agent-runtime/durability-ledger.d.ts → durability/ledger.d.ts} +2 -2
  176. package/dist/durability/ledger.d.ts.map +1 -0
  177. package/dist/{agent-runtime/durability-scheduler.d.ts → durability/scheduler.d.ts} +2 -2
  178. package/dist/durability/scheduler.d.ts.map +1 -0
  179. package/dist/entrypoints/agent-runtime/browser.d.ts +5 -0
  180. package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -0
  181. package/dist/{agent-runtime-browser.js → entrypoints/agent-runtime/browser.js} +3 -3
  182. package/dist/{agent-runtime-coding-tools.d.ts → entrypoints/agent-runtime/coding-tools.d.ts} +2 -2
  183. package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -0
  184. package/dist/entrypoints/agent-runtime/coding-tools.js +22 -0
  185. package/dist/{agent-runtime-harness.d.ts → entrypoints/agent-runtime/harness.d.ts} +2 -2
  186. package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -0
  187. package/dist/{agent-runtime-harness.js → entrypoints/agent-runtime/harness.js} +24 -25
  188. package/dist/entrypoints/agent-runtime/openrouter.d.ts +2 -0
  189. package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -0
  190. package/dist/{agent-runtime-openrouter.js → entrypoints/agent-runtime/openrouter.js} +3 -3
  191. package/dist/{agent-runtime-sandbox.d.ts → entrypoints/agent-runtime/sandbox.d.ts} +5 -5
  192. package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -0
  193. package/dist/{agent-runtime-sandbox.js → entrypoints/agent-runtime/sandbox.js} +11 -12
  194. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts +2 -0
  195. package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts.map +1 -0
  196. package/dist/{agent-runtime-sqlite-bun.js → entrypoints/agent-runtime/sqlite/bun.js} +8 -6
  197. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts +2 -0
  198. package/dist/entrypoints/agent-runtime/sqlite/node.d.ts.map +1 -0
  199. package/dist/{agent-runtime-sqlite-node.js → entrypoints/agent-runtime/sqlite/node.js} +8 -6
  200. package/dist/entrypoints/agent-runtime/testing.d.ts +4 -0
  201. package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -0
  202. package/dist/entrypoints/agent-runtime/testing.js +1084 -0
  203. package/dist/{agent-runtime.d.ts → entrypoints/agent-runtime.d.ts} +41 -37
  204. package/dist/entrypoints/agent-runtime.d.ts.map +1 -0
  205. package/dist/{agent-runtime.js → entrypoints/agent-runtime.js} +408 -366
  206. package/dist/{application-diagnostic-journal.d.ts → entrypoints/application/diagnostic-journal.d.ts} +2 -2
  207. package/dist/entrypoints/application/diagnostic-journal.d.ts.map +1 -0
  208. package/dist/{application-diagnostic-journal.js → entrypoints/application/diagnostic-journal.js} +3 -3
  209. package/dist/{application-grammy.d.ts → entrypoints/application/grammy.d.ts} +2 -2
  210. package/dist/entrypoints/application/grammy.d.ts.map +1 -0
  211. package/dist/{application-grammy.js → entrypoints/application/grammy.js} +2 -2
  212. package/dist/{application-opentelemetry.d.ts → entrypoints/application/opentelemetry.d.ts} +2 -2
  213. package/dist/entrypoints/application/opentelemetry.d.ts.map +1 -0
  214. package/dist/{application-opentelemetry.js → entrypoints/application/opentelemetry.js} +4 -4
  215. package/dist/{application-schemas.d.ts → entrypoints/application/schemas.d.ts} +2 -2
  216. package/dist/entrypoints/application/schemas.d.ts.map +1 -0
  217. package/dist/{application-schemas.js → entrypoints/application/schemas.js} +2 -2
  218. package/dist/{application.d.ts → entrypoints/application.d.ts} +22 -21
  219. package/dist/entrypoints/application.d.ts.map +1 -0
  220. package/dist/{application.js → entrypoints/application.js} +24 -22
  221. package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -0
  222. package/dist/{upgrade-cli.js → entrypoints/bin/upgrade-cli.js} +3 -3
  223. package/dist/{cli.d.ts → entrypoints/cli.d.ts} +15 -15
  224. package/dist/entrypoints/cli.d.ts.map +1 -0
  225. package/dist/{cli.js → entrypoints/cli.js} +37 -32
  226. package/dist/entrypoints/contract.d.ts +9 -0
  227. package/dist/entrypoints/contract.d.ts.map +1 -0
  228. package/dist/{contract/index.js → entrypoints/contract.js} +14 -6
  229. package/dist/entrypoints/declaration.d.ts +2 -0
  230. package/dist/entrypoints/declaration.d.ts.map +1 -0
  231. package/dist/{declaration.js → entrypoints/declaration.js} +1 -1
  232. package/dist/{files.d.ts → entrypoints/files.d.ts} +2 -2
  233. package/dist/entrypoints/files.d.ts.map +1 -0
  234. package/dist/{files.js → entrypoints/files.js} +3 -3
  235. package/dist/{geo.d.ts → entrypoints/geo.d.ts} +1 -1
  236. package/dist/entrypoints/geo.d.ts.map +1 -0
  237. package/dist/{geo.js → entrypoints/geo.js} +4 -4
  238. package/dist/entrypoints/google.d.ts +2 -0
  239. package/dist/entrypoints/google.d.ts.map +1 -0
  240. package/dist/{google.js → entrypoints/google.js} +1 -1
  241. package/dist/{index.d.ts → entrypoints/index.d.ts} +14 -13
  242. package/dist/entrypoints/index.d.ts.map +1 -0
  243. package/dist/{index.js → entrypoints/index.js} +99 -33
  244. package/dist/{live.d.ts → entrypoints/live.d.ts} +4 -4
  245. package/dist/entrypoints/live.d.ts.map +1 -0
  246. package/dist/{live.js → entrypoints/live.js} +6 -4
  247. package/dist/{node.d.ts → entrypoints/node.d.ts} +11 -11
  248. package/dist/entrypoints/node.d.ts.map +1 -0
  249. package/dist/{node.js → entrypoints/node.js} +20 -16
  250. package/dist/entrypoints/oauth.d.ts +2 -0
  251. package/dist/entrypoints/oauth.d.ts.map +1 -0
  252. package/dist/{oauth.js → entrypoints/oauth.js} +3 -3
  253. package/dist/{observability/index.d.ts → entrypoints/observability.d.ts} +11 -11
  254. package/dist/entrypoints/observability.d.ts.map +1 -0
  255. package/dist/{observability/index.js → entrypoints/observability.js} +9 -11
  256. package/dist/entrypoints/primitives.d.ts +3 -0
  257. package/dist/entrypoints/primitives.d.ts.map +1 -0
  258. package/dist/{primitives.js → entrypoints/primitives.js} +1 -6
  259. package/dist/{react.d.ts → entrypoints/react.d.ts} +4 -4
  260. package/dist/entrypoints/react.d.ts.map +1 -0
  261. package/dist/{react.js → entrypoints/react.js} +3 -3
  262. package/dist/{release.d.ts → entrypoints/release.d.ts} +4 -4
  263. package/dist/entrypoints/release.d.ts.map +1 -0
  264. package/dist/{release.js → entrypoints/release.js} +1 -1
  265. package/dist/{remote.d.ts → entrypoints/remote.d.ts} +1 -1
  266. package/dist/entrypoints/remote.d.ts.map +1 -0
  267. package/dist/entrypoints/remote.js +66 -0
  268. package/dist/{server/index.d.ts → entrypoints/server.d.ts} +35 -34
  269. package/dist/entrypoints/server.d.ts.map +1 -0
  270. package/dist/{server/index.js → entrypoints/server.js} +294 -244
  271. package/dist/{telegram.d.ts → entrypoints/telegram.d.ts} +2 -2
  272. package/dist/entrypoints/telegram.d.ts.map +1 -0
  273. package/dist/{telegram.js → entrypoints/telegram.js} +1 -1
  274. package/dist/entrypoints/testing.d.ts +9 -0
  275. package/dist/entrypoints/testing.d.ts.map +1 -0
  276. package/dist/{testing.js → entrypoints/testing.js} +107 -926
  277. package/dist/{tools/connections/index.d.ts → entrypoints/tools/connections.d.ts} +6 -7
  278. package/dist/entrypoints/tools/connections.d.ts.map +1 -0
  279. package/dist/{tools/connections/index.js → entrypoints/tools/connections.js} +7 -4
  280. package/dist/{tools-contract.d.ts → entrypoints/tools/contract.d.ts} +5 -5
  281. package/dist/entrypoints/tools/contract.d.ts.map +1 -0
  282. package/dist/{tools-contract.js → entrypoints/tools/contract.js} +4 -4
  283. package/dist/{tool-invoker.d.ts → entrypoints/tools/invoker.d.ts} +2 -2
  284. package/dist/entrypoints/tools/invoker.d.ts.map +1 -0
  285. package/dist/entrypoints/tools/invoker.js +20 -0
  286. package/dist/entrypoints/tools.d.ts +51 -0
  287. package/dist/entrypoints/tools.d.ts.map +1 -0
  288. package/dist/{tools.js → entrypoints/tools.js} +1787 -1751
  289. package/dist/{tracking-server.d.ts → entrypoints/tracking/server.d.ts} +8 -8
  290. package/dist/entrypoints/tracking/server.d.ts.map +1 -0
  291. package/dist/{tracking.d.ts → entrypoints/tracking.d.ts} +15 -15
  292. package/dist/entrypoints/tracking.d.ts.map +1 -0
  293. package/dist/{tracking.js → entrypoints/tracking.js} +5 -8
  294. package/dist/google/google.d.ts.map +1 -0
  295. package/dist/{index-a916km3r.js → index-0b1ess5e.js} +6 -13
  296. package/dist/{index-zwkgfq1s.js → index-1nd48tm9.js} +113 -118
  297. package/dist/{index-7zbps32p.js → index-1zbbzgfh.js} +2 -2
  298. package/dist/{index-mzvgxp0n.js → index-2cr1cqhn.js} +16 -4
  299. package/dist/{index-f9mb610r.js → index-35mh5bhj.js} +2 -2
  300. package/dist/index-48ffdxgk.js +6 -0
  301. package/dist/index-58k4fp34.js +1023 -0
  302. package/dist/{index-p13mwz16.js → index-83bdg97s.js} +1 -1
  303. package/dist/index-97ac4gph.js +3618 -0
  304. package/dist/{index-kw9t5ayn.js → index-cq4qfycf.js} +5 -5
  305. package/dist/{index-7gnkny4z.js → index-d9pk3td4.js} +1 -1
  306. package/dist/{index-e42wzzz5.js → index-dcpdvjsc.js} +7 -7
  307. package/dist/{index-h9etkkyk.js → index-dydjcp8z.js} +102 -25
  308. package/dist/{index-sr93cwf9.js → index-e2z3ahw9.js} +2 -2
  309. package/dist/{index-yewwh1w4.js → index-e87kakm4.js} +96 -11
  310. package/dist/{index-cby4ar3v.js → index-eqqvgdb3.js} +1 -1
  311. package/dist/index-fdp6hdxn.js +942 -0
  312. package/dist/{index-0a349c33.js → index-gyr48nzg.js} +125 -198
  313. package/dist/{index-wnfk50r0.js → index-h6eeys1v.js} +1 -1
  314. package/dist/{index-77fekveh.js → index-hffjpmq9.js} +1 -15
  315. package/dist/{index-yn8remb1.js → index-j05z5gn4.js} +50 -14
  316. package/dist/index-k5hsfc3j.js +31 -0
  317. package/dist/{index-fq77yfzc.js → index-kj2wbeta.js} +1 -1
  318. package/dist/index-kvj7f4hq.js +39 -0
  319. package/dist/{index-4fpa9dy2.js → index-m9zn6cpq.js} +2 -2
  320. package/dist/{index-2na0qrfn.js → index-mdzh02yc.js} +7 -7
  321. package/dist/{index-ywd0y6m1.js → index-mkm15s49.js} +1 -1
  322. package/dist/index-mp5sn43f.js +1084 -0
  323. package/dist/{index-7n145nbe.js → index-n6hxg8as.js} +530 -387
  324. package/dist/index-ngfhvfpd.js +30 -0
  325. package/dist/{index-e0znv5gn.js → index-p5r7qpdd.js} +2 -93
  326. package/dist/{index-n0f51dfn.js → index-p81267c2.js} +608 -549
  327. package/dist/{index-wc4x00bn.js → index-qwhynv6x.js} +1 -1
  328. package/dist/index-r7nmqpsg.js +154 -0
  329. package/dist/{index-bx75zwt7.js → index-rewkc2hj.js} +5 -4
  330. package/dist/{index-9f8ztey6.js → index-sees8yf8.js} +2 -2
  331. package/dist/{index-vjpvjqpn.js → index-v38qyerb.js} +16 -2
  332. package/dist/{index-2c2bjw3s.js → index-vcvkq30w.js} +3 -3
  333. package/dist/index-wqgjfstn.js +18 -0
  334. package/dist/{index-f477k430.js → index-x4799c19.js} +1 -1
  335. package/dist/{index-cxqhvq21.js → index-xnj9bgxe.js} +142 -129
  336. package/dist/index-xsqjkha9.js +281 -0
  337. package/dist/{index-6kyksz9y.js → index-yw4fzmdz.js} +1 -1
  338. package/dist/{index-3xwxfj4z.js → index-zeemqhqx.js} +1 -1
  339. package/dist/{index-tmwcrptx.js → index-zfrhfn82.js} +1 -1
  340. package/dist/index-znfs20ss.js +98 -0
  341. package/dist/internal/backoff.d.ts +29 -0
  342. package/dist/internal/backoff.d.ts.map +1 -0
  343. package/dist/internal/canonical-json.d.ts +21 -11
  344. package/dist/internal/canonical-json.d.ts.map +1 -1
  345. package/dist/internal/channel.d.ts.map +1 -0
  346. package/dist/internal/logger.d.ts.map +1 -0
  347. package/dist/internal/request.d.ts.map +1 -0
  348. package/dist/internal/secure-fetch.d.ts +12 -0
  349. package/dist/internal/secure-fetch.d.ts.map +1 -1
  350. package/dist/internal/stable-digest.d.ts +0 -43
  351. package/dist/internal/stable-digest.d.ts.map +1 -1
  352. package/dist/internal/typed.d.ts +0 -8
  353. package/dist/internal/typed.d.ts.map +1 -1
  354. package/dist/internal/zod-issues.d.ts +38 -0
  355. package/dist/internal/zod-issues.d.ts.map +1 -0
  356. package/dist/{tools/json-schema-dialect.d.ts → json-schema/dialect.d.ts} +1 -1
  357. package/dist/json-schema/dialect.d.ts.map +1 -0
  358. package/dist/json-schema/json-schema.d.ts.map +1 -0
  359. package/dist/live/watch-delta.d.ts.map +1 -1
  360. package/dist/{oauth.d.ts → oauth/authorization-code.d.ts} +1 -1
  361. package/dist/oauth/authorization-code.d.ts.map +1 -0
  362. package/dist/observability/audit.d.ts +2 -2
  363. package/dist/observability/audit.d.ts.map +1 -1
  364. package/dist/observability/bounded-logger.d.ts +1 -1
  365. package/dist/observability/bounded-logger.d.ts.map +1 -1
  366. package/dist/{internal/observability-sink.d.ts → observability/bounded-sink.d.ts} +2 -2
  367. package/dist/observability/bounded-sink.d.ts.map +1 -0
  368. package/dist/observability/context.d.ts +1 -1
  369. package/dist/observability/context.d.ts.map +1 -1
  370. package/dist/observability/event.d.ts +1 -1
  371. package/dist/observability/event.d.ts.map +1 -1
  372. package/dist/observability/work.d.ts +1 -1
  373. package/dist/observability/work.d.ts.map +1 -1
  374. package/dist/primitives/audit.d.ts +1 -1
  375. package/dist/primitives/audit.d.ts.map +1 -1
  376. package/dist/primitives/export-operation.d.ts +4 -2
  377. package/dist/primitives/export-operation.d.ts.map +1 -1
  378. package/dist/realtime/socket.d.ts +1 -1
  379. package/dist/realtime/socket.d.ts.map +1 -1
  380. package/dist/server/context-contribution.d.ts +1 -1
  381. package/dist/server/context-contribution.d.ts.map +1 -1
  382. package/dist/server/context.d.ts +2 -2
  383. package/dist/server/context.d.ts.map +1 -1
  384. package/dist/server/contract-method.d.ts +15 -0
  385. package/dist/server/contract-method.d.ts.map +1 -0
  386. package/dist/server/contract-stream.d.ts +1 -1
  387. package/dist/server/contract-stream.d.ts.map +1 -1
  388. package/dist/server/create.d.ts +8 -0
  389. package/dist/server/create.d.ts.map +1 -1
  390. package/dist/server/endpoint-dispatch.d.ts +10 -0
  391. package/dist/server/endpoint-dispatch.d.ts.map +1 -0
  392. package/dist/server/endpoint-response.d.ts +18 -0
  393. package/dist/server/endpoint-response.d.ts.map +1 -0
  394. package/dist/server/error-dispatch.d.ts +17 -1
  395. package/dist/server/error-dispatch.d.ts.map +1 -1
  396. package/dist/server/error-hook.d.ts +2 -2
  397. package/dist/server/error-hook.d.ts.map +1 -1
  398. package/dist/server/handler-state.d.ts +44 -0
  399. package/dist/server/handler-state.d.ts.map +1 -0
  400. package/dist/server/implement.d.ts +1 -1
  401. package/dist/server/implement.d.ts.map +1 -1
  402. package/dist/server/middleware/auth.d.ts +1 -1
  403. package/dist/server/middleware/auth.d.ts.map +1 -1
  404. package/dist/server/middleware/cors.d.ts +17 -0
  405. package/dist/server/middleware/cors.d.ts.map +1 -1
  406. package/dist/server/middleware/trust-fence.d.ts +1 -1
  407. package/dist/server/middleware/trust-fence.d.ts.map +1 -1
  408. package/dist/server/multipart.d.ts +1 -1
  409. package/dist/server/multipart.d.ts.map +1 -1
  410. package/dist/{tools/oauth-metadata.d.ts → server/oauth/metadata.d.ts} +2 -2
  411. package/dist/server/oauth/metadata.d.ts.map +1 -0
  412. package/dist/{tools/oauth-provider.d.ts → server/oauth/provider.d.ts} +2 -2
  413. package/dist/server/oauth/provider.d.ts.map +1 -0
  414. package/dist/server/realtime.d.ts +1 -1
  415. package/dist/server/realtime.d.ts.map +1 -1
  416. package/dist/server/request-completion.d.ts +16 -0
  417. package/dist/server/request-completion.d.ts.map +1 -0
  418. package/dist/server/response-metadata.d.ts +1 -1
  419. package/dist/server/response-metadata.d.ts.map +1 -1
  420. package/dist/server/route-table.d.ts +9 -0
  421. package/dist/server/route-table.d.ts.map +1 -0
  422. package/dist/server/stream.d.ts +0 -13
  423. package/dist/server/stream.d.ts.map +1 -1
  424. package/dist/server/types.d.ts +7 -4
  425. package/dist/server/types.d.ts.map +1 -1
  426. package/dist/testing/handler-clients.d.ts +31 -0
  427. package/dist/testing/handler-clients.d.ts.map +1 -0
  428. package/dist/testing/managed-resource-conformance-scenarios.d.ts.map +1 -1
  429. package/dist/testing/surface-conformance.d.ts +2 -1
  430. package/dist/testing/surface-conformance.d.ts.map +1 -1
  431. package/dist/testing/surface-manifest.d.ts +64 -5
  432. package/dist/testing/surface-manifest.d.ts.map +1 -1
  433. package/dist/tools/{cli-args.d.ts → cli/args.d.ts} +1 -1
  434. package/dist/tools/cli/args.d.ts.map +1 -0
  435. package/dist/tools/{cli-checkpoint.d.ts → cli/checkpoint.d.ts} +1 -1
  436. package/dist/tools/cli/checkpoint.d.ts.map +1 -0
  437. package/dist/tools/{cli-command.d.ts → cli/command.d.ts} +22 -4
  438. package/dist/tools/cli/command.d.ts.map +1 -0
  439. package/dist/tools/{cli.d.ts → cli/config.d.ts} +5 -12
  440. package/dist/tools/cli/config.d.ts.map +1 -0
  441. package/dist/tools/cli/create-cli.d.ts +36 -0
  442. package/dist/tools/cli/create-cli.d.ts.map +1 -0
  443. package/dist/tools/cli/download.d.ts +8 -0
  444. package/dist/tools/cli/download.d.ts.map +1 -0
  445. package/dist/tools/{cli-format.d.ts → cli/format.d.ts} +2 -2
  446. package/dist/tools/cli/format.d.ts.map +1 -0
  447. package/dist/tools/cli/help.d.ts +24 -0
  448. package/dist/tools/cli/help.d.ts.map +1 -0
  449. package/dist/tools/{cli-installer.d.ts → cli/installer.d.ts} +2 -2
  450. package/dist/tools/cli/installer.d.ts.map +1 -0
  451. package/dist/tools/{cli-invoke.d.ts → cli/invoke.d.ts} +35 -10
  452. package/dist/tools/cli/invoke.d.ts.map +1 -0
  453. package/dist/tools/cli/io.d.ts +10 -0
  454. package/dist/tools/cli/io.d.ts.map +1 -0
  455. package/dist/tools/cli/managed-surface.d.ts +30 -0
  456. package/dist/tools/cli/managed-surface.d.ts.map +1 -0
  457. package/dist/tools/{cli-manifest.d.ts → cli/manifest.d.ts} +1 -1
  458. package/dist/tools/cli/manifest.d.ts.map +1 -0
  459. package/dist/tools/{cli-policy.d.ts → cli/policy.d.ts} +2 -2
  460. package/dist/tools/cli/policy.d.ts.map +1 -0
  461. package/dist/tools/cli/prepare.d.ts +14 -0
  462. package/dist/tools/cli/prepare.d.ts.map +1 -0
  463. package/dist/tools/{cli-profile.d.ts → cli/profile.d.ts} +2 -2
  464. package/dist/tools/cli/profile.d.ts.map +1 -0
  465. package/dist/tools/cli/run-managed.d.ts +5 -0
  466. package/dist/tools/cli/run-managed.d.ts.map +1 -0
  467. package/dist/tools/cli/run-native.d.ts +9 -0
  468. package/dist/tools/cli/run-native.d.ts.map +1 -0
  469. package/dist/tools/cli/session.d.ts +40 -0
  470. package/dist/tools/cli/session.d.ts.map +1 -0
  471. package/dist/tools/{cli-signature.d.ts → cli/signature.d.ts} +2 -2
  472. package/dist/tools/cli/signature.d.ts.map +1 -0
  473. package/dist/tools/{cli-stream.d.ts → cli/stream.d.ts} +4 -4
  474. package/dist/tools/cli/stream.d.ts.map +1 -0
  475. package/dist/tools/{cli-update.d.ts → cli/update.d.ts} +3 -3
  476. package/dist/tools/cli/update.d.ts.map +1 -0
  477. package/dist/tools/{cli-view.d.ts → cli/view.d.ts} +2 -2
  478. package/dist/tools/cli/view.d.ts.map +1 -0
  479. package/dist/tools/{cli-wait.d.ts → cli/wait.d.ts} +2 -2
  480. package/dist/tools/cli/wait.d.ts.map +1 -0
  481. package/dist/tools/connections/runtime.d.ts +1 -1
  482. package/dist/tools/connections/runtime.d.ts.map +1 -1
  483. package/dist/tools/connections/types.d.ts +3 -3
  484. package/dist/tools/connections/types.d.ts.map +1 -1
  485. package/dist/tools/durability-context.d.ts +1 -1
  486. package/dist/tools/durability-context.d.ts.map +1 -1
  487. package/dist/tools/execute.d.ts +30 -3
  488. package/dist/tools/execute.d.ts.map +1 -1
  489. package/dist/tools/internal/surface-projector.d.ts +8 -6
  490. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  491. package/dist/tools/internal/tool-view.d.ts +41 -0
  492. package/dist/tools/internal/tool-view.d.ts.map +1 -0
  493. package/dist/tools/invoker.d.ts +11 -3
  494. package/dist/tools/invoker.d.ts.map +1 -1
  495. package/dist/tools/list-names.d.ts +3 -3
  496. package/dist/tools/list-names.d.ts.map +1 -1
  497. package/dist/tools/manifest.d.ts +2 -2
  498. package/dist/tools/manifest.d.ts.map +1 -1
  499. package/dist/tools/{mcp-app.d.ts → mcp/app.d.ts} +1 -1
  500. package/dist/tools/mcp/app.d.ts.map +1 -0
  501. package/dist/tools/{mcp-catalog.d.ts → mcp/catalog.d.ts} +2 -2
  502. package/dist/tools/mcp/catalog.d.ts.map +1 -0
  503. package/dist/tools/{mcp-handler.d.ts → mcp/handler.d.ts} +5 -5
  504. package/dist/tools/mcp/handler.d.ts.map +1 -0
  505. package/dist/tools/{mcp.d.ts → mcp/mount.d.ts} +9 -9
  506. package/dist/tools/mcp/mount.d.ts.map +1 -0
  507. package/dist/tools/{mcp-prepare.d.ts → mcp/prepare.d.ts} +9 -9
  508. package/dist/tools/mcp/prepare.d.ts.map +1 -0
  509. package/dist/tools/{mcp-progress.d.ts → mcp/progress.d.ts} +2 -2
  510. package/dist/tools/mcp/progress.d.ts.map +1 -0
  511. package/dist/tools/mcp/register.d.ts +35 -0
  512. package/dist/tools/mcp/register.d.ts.map +1 -0
  513. package/dist/tools/{mcp-round-policy.d.ts → mcp/round-policy.d.ts} +2 -2
  514. package/dist/tools/mcp/round-policy.d.ts.map +1 -0
  515. package/dist/tools/{mcp-round.d.ts → mcp/round.d.ts} +4 -4
  516. package/dist/tools/mcp/round.d.ts.map +1 -0
  517. package/dist/tools/mcp/runtime-tools.d.ts +24 -0
  518. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -0
  519. package/dist/tools/{mcp-stdio-signals.d.ts → mcp/stdio-signals.d.ts} +3 -3
  520. package/dist/tools/mcp/stdio-signals.d.ts.map +1 -0
  521. package/dist/tools/{mcp-stdio.d.ts → mcp/stdio.d.ts} +4 -4
  522. package/dist/tools/mcp/stdio.d.ts.map +1 -0
  523. package/dist/tools/{mcp-trace.d.ts → mcp/trace.d.ts} +1 -1
  524. package/dist/tools/mcp/trace.d.ts.map +1 -0
  525. package/dist/tools/mount.d.ts +12 -7
  526. package/dist/tools/mount.d.ts.map +1 -1
  527. package/dist/tools/native-definition.d.ts +3 -3
  528. package/dist/tools/native-definition.d.ts.map +1 -1
  529. package/dist/tools/operations/async-operation-binding-types.d.ts +127 -0
  530. package/dist/tools/operations/async-operation-binding-types.d.ts.map +1 -0
  531. package/dist/tools/operations/async-operation-binding.d.ts +28 -0
  532. package/dist/tools/operations/async-operation-binding.d.ts.map +1 -0
  533. package/dist/tools/operations/async-operation-canonical-types.d.ts +110 -0
  534. package/dist/tools/operations/async-operation-canonical-types.d.ts.map +1 -0
  535. package/dist/tools/operations/async-operation-canonical.d.ts +7 -0
  536. package/dist/tools/operations/async-operation-canonical.d.ts.map +1 -0
  537. package/dist/tools/operations/async-operation-contract.d.ts.map +1 -0
  538. package/dist/tools/operations/async-operation-id.d.ts +23 -0
  539. package/dist/tools/operations/async-operation-id.d.ts.map +1 -0
  540. package/dist/tools/operations/async-operation-runtime-tools.d.ts +40 -0
  541. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -0
  542. package/dist/tools/operations/async-operation-runtime-types.d.ts +68 -0
  543. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -0
  544. package/dist/tools/operations/async-operation-runtime.d.ts +5 -0
  545. package/dist/tools/operations/async-operation-runtime.d.ts.map +1 -0
  546. package/dist/tools/{define-wait-tool.d.ts → operations/define-wait-tool.d.ts} +2 -2
  547. package/dist/tools/operations/define-wait-tool.d.ts.map +1 -0
  548. package/dist/tools/operations/mount-wait.d.ts.map +1 -0
  549. package/dist/tools/operations/wait-core.d.ts.map +1 -0
  550. package/dist/tools/remote.d.ts +1 -1
  551. package/dist/tools/remote.d.ts.map +1 -1
  552. package/dist/tools/runtime-tool.d.ts +11 -4
  553. package/dist/tools/runtime-tool.d.ts.map +1 -1
  554. package/dist/tools/schema/coerce.d.ts.map +1 -0
  555. package/dist/tools/schema/flatten-join.d.ts.map +1 -0
  556. package/dist/tools/schema/flatten.d.ts.map +1 -0
  557. package/dist/tools/schema/portable-formats.d.ts.map +1 -0
  558. package/dist/tools/{presentation.d.ts → schema/presentation.d.ts} +2 -0
  559. package/dist/tools/schema/presentation.d.ts.map +1 -0
  560. package/dist/tools/schema/schema.d.ts.map +1 -0
  561. package/dist/tools/schema/untyped-properties.d.ts.map +1 -0
  562. package/dist/tools/surface.d.ts +2 -3
  563. package/dist/tools/surface.d.ts.map +1 -1
  564. package/dist/tools/toolkit.d.ts +4 -4
  565. package/dist/tools/toolkit.d.ts.map +1 -1
  566. package/dist/tools/{define-download-tool.d.ts → transfer/define-download-tool.d.ts} +4 -4
  567. package/dist/tools/transfer/define-download-tool.d.ts.map +1 -0
  568. package/dist/tools/{define-upload-tool.d.ts → transfer/define-upload-tool.d.ts} +3 -3
  569. package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -0
  570. package/dist/tools/{define-view-file-tool.d.ts → transfer/define-view-file-tool.d.ts} +2 -2
  571. package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -0
  572. package/dist/tools/{download-core.d.ts → transfer/download-core.d.ts} +2 -2
  573. package/dist/tools/transfer/download-core.d.ts.map +1 -0
  574. package/dist/tools/{managed-file-error.d.ts → transfer/managed-file-error.d.ts} +1 -1
  575. package/dist/tools/transfer/managed-file-error.d.ts.map +1 -0
  576. package/dist/tools/{mount-download.d.ts → transfer/mount-download.d.ts} +1 -1
  577. package/dist/tools/transfer/mount-download.d.ts.map +1 -0
  578. package/dist/tools/{mount-upload.d.ts → transfer/mount-upload.d.ts} +1 -1
  579. package/dist/tools/transfer/mount-upload.d.ts.map +1 -0
  580. package/dist/tools/transfer/native-result.d.ts.map +1 -0
  581. package/dist/tools/{upload-core.d.ts → transfer/upload-core.d.ts} +1 -1
  582. package/dist/tools/transfer/upload-core.d.ts.map +1 -0
  583. package/dist/tools/transfer/view-file-contract.d.ts.map +1 -0
  584. package/dist/tools/{view-file.d.ts → transfer/view-file.d.ts} +1 -1
  585. package/dist/tools/transfer/view-file.d.ts.map +1 -0
  586. package/dist/tools/transports.d.ts +1 -1
  587. package/dist/tools/transports.d.ts.map +1 -1
  588. package/dist/tracking/contract.d.ts +1 -1
  589. package/dist/tracking/contract.d.ts.map +1 -1
  590. package/llms/agent-runtime-browser.txt +33 -0
  591. package/llms/agent-runtime-coding-tools.txt +58 -0
  592. package/llms/agent-runtime-harness.txt +45 -0
  593. package/llms/agent-runtime-openrouter.txt +22 -0
  594. package/llms/agent-runtime-sandbox.txt +159 -0
  595. package/llms/agent-runtime-sqlite-bun.txt +29 -0
  596. package/llms/agent-runtime-sqlite-node.txt +26 -0
  597. package/llms/agent-runtime-testing.txt +30 -0
  598. package/llms/agent-runtime.2.txt +550 -0
  599. package/llms/agent-runtime.3.txt +311 -0
  600. package/llms/agent-runtime.txt +893 -0
  601. package/llms/application-diagnostic-journal.txt +30 -0
  602. package/llms/application-grammy.txt +27 -0
  603. package/llms/application-opentelemetry.txt +27 -0
  604. package/llms/application-schemas.txt +42 -0
  605. package/llms/application.2.txt +223 -0
  606. package/llms/application.txt +1144 -0
  607. package/llms/cli.txt +977 -0
  608. package/llms/contract.txt +606 -0
  609. package/llms/declaration.txt +286 -0
  610. package/llms/files.txt +30 -0
  611. package/llms/geo.txt +114 -0
  612. package/llms/google.txt +27 -0
  613. package/llms/live.txt +471 -0
  614. package/llms/node.txt +43 -0
  615. package/llms/oauth.txt +136 -0
  616. package/llms/observability.txt +893 -0
  617. package/llms/primitives.txt +158 -0
  618. package/llms/react.txt +184 -0
  619. package/llms/release.txt +176 -0
  620. package/llms/remote.txt +25 -0
  621. package/llms/server.2.txt +361 -0
  622. package/llms/server.3.txt +1031 -0
  623. package/llms/server.4.txt +905 -0
  624. package/llms/server.5.txt +250 -0
  625. package/llms/server.txt +996 -0
  626. package/llms/stitchkit.2.txt +836 -0
  627. package/llms/stitchkit.3.txt +147 -0
  628. package/llms/stitchkit.txt +260 -0
  629. package/llms/telegram.txt +30 -0
  630. package/llms/testing.txt +676 -0
  631. package/llms/tools-connections.txt +45 -0
  632. package/llms/tools-contract.txt +9 -0
  633. package/llms/tools-invoker.txt +9 -0
  634. package/llms/tools.2.txt +838 -0
  635. package/llms/tools.txt +1004 -0
  636. package/llms/tracking-server.txt +32 -0
  637. package/llms/tracking.txt +263 -0
  638. package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
  639. package/llms/upgrading-0.53.0-0.67.0.txt +1174 -0
  640. package/llms/upgrading-0.68.0-0.94.0.txt +1159 -0
  641. package/llms/upgrading.txt +215 -0
  642. package/llms-full.txt +305 -75
  643. package/llms.txt +54 -5
  644. package/package.json +84 -83
  645. package/dist/agent-runtime/durability-contract.d.ts.map +0 -1
  646. package/dist/agent-runtime/durability-json.d.ts.map +0 -1
  647. package/dist/agent-runtime/durability-ledger.d.ts.map +0 -1
  648. package/dist/agent-runtime/durability-scheduler.d.ts.map +0 -1
  649. package/dist/agent-runtime/durability.d.ts.map +0 -1
  650. package/dist/agent-runtime/store-driver.d.ts.map +0 -1
  651. package/dist/agent-runtime-browser.d.ts +0 -5
  652. package/dist/agent-runtime-browser.d.ts.map +0 -1
  653. package/dist/agent-runtime-coding-tools.d.ts.map +0 -1
  654. package/dist/agent-runtime-coding-tools.js +0 -23
  655. package/dist/agent-runtime-harness.d.ts.map +0 -1
  656. package/dist/agent-runtime-openrouter.d.ts.map +0 -1
  657. package/dist/agent-runtime-sandbox.d.ts.map +0 -1
  658. package/dist/agent-runtime-sqlite-bun.d.ts.map +0 -1
  659. package/dist/agent-runtime-sqlite-node.d.ts.map +0 -1
  660. package/dist/agent-runtime-testing.d.ts +0 -3
  661. package/dist/agent-runtime-testing.d.ts.map +0 -1
  662. package/dist/agent-runtime-testing.js +0 -156
  663. package/dist/agent-runtime.d.ts.map +0 -1
  664. package/dist/application/channel.d.ts.map +0 -1
  665. package/dist/application-diagnostic-journal.d.ts.map +0 -1
  666. package/dist/application-grammy.d.ts.map +0 -1
  667. package/dist/application-opentelemetry.d.ts.map +0 -1
  668. package/dist/application-schemas.d.ts.map +0 -1
  669. package/dist/application.d.ts.map +0 -1
  670. package/dist/cli.d.ts.map +0 -1
  671. package/dist/contract/index.d.ts +0 -8
  672. package/dist/contract/index.d.ts.map +0 -1
  673. package/dist/declaration.d.ts.map +0 -1
  674. package/dist/files.d.ts.map +0 -1
  675. package/dist/geo.d.ts.map +0 -1
  676. package/dist/google.d.ts.map +0 -1
  677. package/dist/index-0j3vcp5m.js +0 -28
  678. package/dist/index-a11g2kry.js +0 -866
  679. package/dist/index-cnyk6te3.js +0 -77
  680. package/dist/index-fadnxwna.js +0 -1046
  681. package/dist/index-hrbajay7.js +0 -1196
  682. package/dist/index-s8cnx02s.js +0 -90
  683. package/dist/index-v5573g1k.js +0 -142
  684. package/dist/index-vk3kq9sb.js +0 -3344
  685. package/dist/index.d.ts.map +0 -1
  686. package/dist/internal/errors.d.ts.map +0 -1
  687. package/dist/internal/observability-sink.d.ts.map +0 -1
  688. package/dist/live.d.ts.map +0 -1
  689. package/dist/logger.d.ts.map +0 -1
  690. package/dist/node.d.ts.map +0 -1
  691. package/dist/oauth.d.ts.map +0 -1
  692. package/dist/observability/index.d.ts.map +0 -1
  693. package/dist/primitives.d.ts +0 -3
  694. package/dist/primitives.d.ts.map +0 -1
  695. package/dist/react.d.ts.map +0 -1
  696. package/dist/release.d.ts.map +0 -1
  697. package/dist/remote.d.ts.map +0 -1
  698. package/dist/remote.js +0 -88
  699. package/dist/retained.d.ts.map +0 -1
  700. package/dist/server/file-state-store.d.ts.map +0 -1
  701. package/dist/server/index.d.ts.map +0 -1
  702. package/dist/server/request.d.ts.map +0 -1
  703. package/dist/telegram.d.ts.map +0 -1
  704. package/dist/testing/agent-store-conformance.d.ts.map +0 -1
  705. package/dist/testing.d.ts +0 -39
  706. package/dist/testing.d.ts.map +0 -1
  707. package/dist/tool-invoker.d.ts.map +0 -1
  708. package/dist/tool-invoker.js +0 -21
  709. package/dist/tools/async-operation-contract.d.ts.map +0 -1
  710. package/dist/tools/async-operation.d.ts +0 -332
  711. package/dist/tools/async-operation.d.ts.map +0 -1
  712. package/dist/tools/cli-args.d.ts.map +0 -1
  713. package/dist/tools/cli-checkpoint.d.ts.map +0 -1
  714. package/dist/tools/cli-command.d.ts.map +0 -1
  715. package/dist/tools/cli-format.d.ts.map +0 -1
  716. package/dist/tools/cli-installer.d.ts.map +0 -1
  717. package/dist/tools/cli-invoke.d.ts.map +0 -1
  718. package/dist/tools/cli-manifest.d.ts.map +0 -1
  719. package/dist/tools/cli-policy.d.ts.map +0 -1
  720. package/dist/tools/cli-profile.d.ts.map +0 -1
  721. package/dist/tools/cli-signature.d.ts.map +0 -1
  722. package/dist/tools/cli-stream.d.ts.map +0 -1
  723. package/dist/tools/cli-update.d.ts.map +0 -1
  724. package/dist/tools/cli-view.d.ts.map +0 -1
  725. package/dist/tools/cli-wait.d.ts.map +0 -1
  726. package/dist/tools/cli.d.ts.map +0 -1
  727. package/dist/tools/coerce.d.ts.map +0 -1
  728. package/dist/tools/connections/index.d.ts.map +0 -1
  729. package/dist/tools/define-download-tool.d.ts.map +0 -1
  730. package/dist/tools/define-upload-tool.d.ts.map +0 -1
  731. package/dist/tools/define-view-file-tool.d.ts.map +0 -1
  732. package/dist/tools/define-wait-tool.d.ts.map +0 -1
  733. package/dist/tools/download-core.d.ts.map +0 -1
  734. package/dist/tools/flatten-join.d.ts.map +0 -1
  735. package/dist/tools/flatten.d.ts.map +0 -1
  736. package/dist/tools/json-schema-dialect.d.ts.map +0 -1
  737. package/dist/tools/json-schema.d.ts.map +0 -1
  738. package/dist/tools/managed-file-error.d.ts.map +0 -1
  739. package/dist/tools/mcp-app.d.ts.map +0 -1
  740. package/dist/tools/mcp-catalog.d.ts.map +0 -1
  741. package/dist/tools/mcp-handler.d.ts.map +0 -1
  742. package/dist/tools/mcp-prepare.d.ts.map +0 -1
  743. package/dist/tools/mcp-progress.d.ts.map +0 -1
  744. package/dist/tools/mcp-round-policy.d.ts.map +0 -1
  745. package/dist/tools/mcp-round.d.ts.map +0 -1
  746. package/dist/tools/mcp-stdio-signals.d.ts.map +0 -1
  747. package/dist/tools/mcp-stdio.d.ts.map +0 -1
  748. package/dist/tools/mcp-trace.d.ts.map +0 -1
  749. package/dist/tools/mcp.d.ts.map +0 -1
  750. package/dist/tools/mount-download.d.ts.map +0 -1
  751. package/dist/tools/mount-upload.d.ts.map +0 -1
  752. package/dist/tools/mount-wait.d.ts.map +0 -1
  753. package/dist/tools/native-mcp.d.ts +0 -20
  754. package/dist/tools/native-mcp.d.ts.map +0 -1
  755. package/dist/tools/native-result.d.ts.map +0 -1
  756. package/dist/tools/oauth-metadata.d.ts.map +0 -1
  757. package/dist/tools/oauth-provider.d.ts.map +0 -1
  758. package/dist/tools/portable-formats.d.ts.map +0 -1
  759. package/dist/tools/presentation.d.ts.map +0 -1
  760. package/dist/tools/schema.d.ts.map +0 -1
  761. package/dist/tools/untyped-properties.d.ts.map +0 -1
  762. package/dist/tools/upload-core.d.ts.map +0 -1
  763. package/dist/tools/view-file-contract.d.ts.map +0 -1
  764. package/dist/tools/view-file.d.ts.map +0 -1
  765. package/dist/tools/wait-core.d.ts.map +0 -1
  766. package/dist/tools-contract.d.ts.map +0 -1
  767. package/dist/tools.d.ts +0 -50
  768. package/dist/tools.d.ts.map +0 -1
  769. package/dist/tracking-server.d.ts.map +0 -1
  770. package/dist/tracking.d.ts.map +0 -1
  771. package/dist/upgrade-cli.d.ts.map +0 -1
  772. package/dist/{retained.d.ts → browser/retained.d.ts} +0 -0
  773. package/dist/{declaration.d.ts → declaration/declaration.d.ts} +0 -0
  774. package/dist/{upgrade-cli.d.ts → entrypoints/bin/upgrade-cli.d.ts} +0 -0
  775. package/dist/{tracking-server.js → entrypoints/tracking/server.js} +0 -0
  776. package/dist/{google.d.ts → google/google.d.ts} +0 -0
  777. package/dist/{index-pq95qkbf.js → index-5jm36zv1.js} +0 -0
  778. package/dist/{index-actkayzn.js → index-70yj2ebz.js} +3 -3
  779. /package/dist/{application → internal}/channel.d.ts +0 -0
  780. /package/dist/{logger.d.ts → internal/logger.d.ts} +0 -0
  781. /package/dist/{server → internal}/request.d.ts +0 -0
  782. /package/dist/{tools → json-schema}/json-schema.d.ts +0 -0
  783. /package/dist/tools/{async-operation-contract.d.ts → operations/async-operation-contract.d.ts} +0 -0
  784. /package/dist/tools/{mount-wait.d.ts → operations/mount-wait.d.ts} +0 -0
  785. /package/dist/tools/{wait-core.d.ts → operations/wait-core.d.ts} +0 -0
  786. /package/dist/tools/{coerce.d.ts → schema/coerce.d.ts} +0 -0
  787. /package/dist/tools/{flatten-join.d.ts → schema/flatten-join.d.ts} +0 -0
  788. /package/dist/tools/{flatten.d.ts → schema/flatten.d.ts} +0 -0
  789. /package/dist/tools/{portable-formats.d.ts → schema/portable-formats.d.ts} +0 -0
  790. /package/dist/tools/{schema.d.ts → schema/schema.d.ts} +0 -0
  791. /package/dist/tools/{untyped-properties.d.ts → schema/untyped-properties.d.ts} +0 -0
  792. /package/dist/tools/{native-result.d.ts → transfer/native-result.d.ts} +0 -0
  793. /package/dist/tools/{view-file-contract.d.ts → transfer/view-file-contract.d.ts} +0 -0
@@ -0,0 +1,281 @@
1
+ import {
2
+ AgentAdmissionReceiptSchema,
3
+ AgentHistoryMutationSchema,
4
+ AgentRuntimeHeadSchema,
5
+ AgentSeedReceiptSchema,
6
+ AgentStoredRunSchema,
7
+ createAgentRuntimeStore,
8
+ isActiveRunState,
9
+ replaceMessage
10
+ } from "./index-58k4fp34.js";
11
+ import {
12
+ AgentRecoverablePageSchema,
13
+ AgentStoreEventEnvelopeSchema,
14
+ AgentStoreEventPageSchema
15
+ } from "./index-1nd48tm9.js";
16
+ import {
17
+ AgentMessageSchema,
18
+ AgentRecordIdSchema
19
+ } from "./index-gtj3zc53.js";
20
+
21
+ // src/agent-runtime/store-memory.ts
22
+ import { z } from "zod";
23
+ var RecoverableCursorSchema = z.tuple([AgentRecordIdSchema, AgentRecordIdSchema]);
24
+ function recoverableCursor(input) {
25
+ return JSON.stringify([input.conversationId, input.run.id]);
26
+ }
27
+ function parseRecoverableCursor(cursor) {
28
+ return RecoverableCursorSchema.parse(JSON.parse(cursor));
29
+ }
30
+ function cloneHeadMap(source) {
31
+ return new Map([...source].map(([key, value]) => [
32
+ key,
33
+ AgentRuntimeHeadSchema.parse(structuredClone(value))
34
+ ]));
35
+ }
36
+ function cloneNestedMap(source, clone) {
37
+ return new Map([...source].map(([outerKey, values]) => [
38
+ outerKey,
39
+ new Map([...values].map(([innerKey, value]) => [innerKey, clone(value)]))
40
+ ]));
41
+ }
42
+ function cloneHistoryMap(source) {
43
+ return new Map([...source].map(([key, value]) => [
44
+ key,
45
+ value.map((message) => AgentMessageSchema.parse(structuredClone(message)))
46
+ ]));
47
+ }
48
+ var memoryConversations = {
49
+ async isPurged(transaction, conversationId) {
50
+ return transaction.purged.has(conversationId);
51
+ },
52
+ async remove(transaction, conversationId) {
53
+ transaction.purged.add(conversationId);
54
+ transaction.heads.delete(conversationId);
55
+ transaction.runs.delete(conversationId);
56
+ transaction.admissions.delete(conversationId);
57
+ transaction.seeds.delete(conversationId);
58
+ transaction.histories.delete(conversationId);
59
+ transaction.events.delete(conversationId);
60
+ }
61
+ };
62
+ var memoryHead = {
63
+ async load(transaction, conversationId) {
64
+ const head = transaction.heads.get(conversationId);
65
+ return head ? AgentRuntimeHeadSchema.parse(structuredClone(head)) : undefined;
66
+ },
67
+ async compareAndSwap(transaction, input) {
68
+ const current = transaction.heads.get(input.conversationId);
69
+ const actualVersion = current?.version ?? 0;
70
+ if (actualVersion !== input.expectedVersion) {
71
+ return { outcome: "conflict", actualVersion };
72
+ }
73
+ transaction.heads.set(input.conversationId, AgentRuntimeHeadSchema.parse(structuredClone(input.next)));
74
+ return { outcome: "applied" };
75
+ }
76
+ };
77
+ var memoryRuns = {
78
+ async load(transaction, input) {
79
+ const record = transaction.runs.get(input.conversationId)?.get(input.runId);
80
+ return record ? AgentStoredRunSchema.parse(structuredClone(record)) : undefined;
81
+ },
82
+ async loadByAssistantMessageId(transaction, input) {
83
+ const record = [...transaction.runs.get(input.conversationId)?.values() ?? []].find((candidate) => candidate.run.assistantMessageId === input.assistantMessageId);
84
+ return record ? AgentStoredRunSchema.parse(structuredClone(record)) : undefined;
85
+ },
86
+ async loadMany(transaction, input) {
87
+ const records = transaction.runs.get(input.conversationId);
88
+ return input.runIds.flatMap((runId) => {
89
+ const record = records?.get(runId);
90
+ return record ? [AgentStoredRunSchema.parse(structuredClone(record))] : [];
91
+ });
92
+ },
93
+ async listActive(transaction, conversationId) {
94
+ return [...transaction.runs.get(conversationId)?.values() ?? []].filter((record) => isActiveRunState(record.run.state)).map((record) => AgentStoredRunSchema.parse(structuredClone(record)));
95
+ },
96
+ async save(transaction, rawRecord) {
97
+ const record = AgentStoredRunSchema.parse(structuredClone(rawRecord));
98
+ const conversationRuns = transaction.runs.get(record.run.conversationId) ?? new Map;
99
+ const collision = [...conversationRuns.values()].find((candidate) => candidate.run.id !== record.run.id && candidate.run.assistantMessageId === record.run.assistantMessageId);
100
+ if (collision)
101
+ throw new TypeError("Assistant message identity is already reserved");
102
+ conversationRuns.set(record.run.id, record);
103
+ transaction.runs.set(record.run.conversationId, conversationRuns);
104
+ }
105
+ };
106
+ var memoryAdmissions = {
107
+ async load(transaction, input) {
108
+ const receipt = transaction.admissions.get(input.conversationId)?.get(input.idempotencyKey);
109
+ return receipt ? AgentAdmissionReceiptSchema.parse(structuredClone(receipt)) : undefined;
110
+ },
111
+ async loadByInputMessageId(transaction, input) {
112
+ const receipt = [
113
+ ...transaction.admissions.get(input.conversationId)?.values() ?? []
114
+ ].find((candidate) => candidate.input.id === input.inputMessageId);
115
+ return receipt ? AgentAdmissionReceiptSchema.parse(structuredClone(receipt)) : undefined;
116
+ },
117
+ async create(transaction, rawReceipt) {
118
+ const receipt = AgentAdmissionReceiptSchema.parse(structuredClone(rawReceipt));
119
+ const conversationAdmissions = transaction.admissions.get(receipt.conversationId) ?? new Map;
120
+ if (conversationAdmissions.has(receipt.idempotencyKey) || [...conversationAdmissions.values()].some((candidate) => candidate.input.id === receipt.input.id)) {
121
+ throw new TypeError("Admission identity is already reserved");
122
+ }
123
+ conversationAdmissions.set(receipt.idempotencyKey, receipt);
124
+ transaction.admissions.set(receipt.conversationId, conversationAdmissions);
125
+ }
126
+ };
127
+ var memorySeeds = {
128
+ async load(transaction, input) {
129
+ const receipt = transaction.seeds.get(input.conversationId)?.get(input.seedKey);
130
+ return receipt ? AgentSeedReceiptSchema.parse(structuredClone(receipt)) : undefined;
131
+ },
132
+ async create(transaction, rawReceipt) {
133
+ const receipt = AgentSeedReceiptSchema.parse(structuredClone(rawReceipt));
134
+ const conversationSeeds = transaction.seeds.get(receipt.conversationId) ?? new Map;
135
+ if (conversationSeeds.has(receipt.seedKey)) {
136
+ throw new TypeError("Conversation seed identity is already reserved");
137
+ }
138
+ conversationSeeds.set(receipt.seedKey, receipt);
139
+ transaction.seeds.set(receipt.conversationId, conversationSeeds);
140
+ }
141
+ };
142
+ var memoryHistory = {
143
+ async load(transaction, conversationId) {
144
+ return (transaction.histories.get(conversationId) ?? []).map((message) => AgentMessageSchema.parse(structuredClone(message)));
145
+ },
146
+ async hasMessage(transaction, input) {
147
+ return (transaction.histories.get(input.conversationId) ?? []).some((message) => message.id === input.messageId);
148
+ },
149
+ async apply(transaction, rawMutation) {
150
+ const mutation = AgentHistoryMutationSchema.parse(rawMutation);
151
+ const conversationId = mutation.type === "admit" ? mutation.input.conversationId : mutation.type === "upsert-assistant" ? mutation.message.conversationId : mutation.type === "seed" ? mutation.message.conversationId : mutation.summary.conversationId;
152
+ const current = transaction.histories.get(conversationId) ?? [];
153
+ if (mutation.type === "admit") {
154
+ transaction.histories.set(conversationId, [...current, mutation.input]);
155
+ return;
156
+ }
157
+ if (mutation.type === "upsert-assistant") {
158
+ transaction.histories.set(conversationId, replaceMessage(current, mutation.message));
159
+ return;
160
+ }
161
+ if (mutation.type === "seed") {
162
+ const existingIndex = current.findIndex((message) => message.id === mutation.message.id);
163
+ if (existingIndex === -1) {
164
+ transaction.histories.set(conversationId, [mutation.message, ...current]);
165
+ } else {
166
+ const next = [...current];
167
+ next[existingIndex] = mutation.message;
168
+ transaction.histories.set(conversationId, next);
169
+ }
170
+ return;
171
+ }
172
+ const replaced = new Set(mutation.replacedMessageIds);
173
+ const positions = current.map((message, index) => replaced.has(message.id) ? index : undefined).filter((index) => index !== undefined);
174
+ const first = positions[0];
175
+ if (first === undefined)
176
+ throw new Error("Compaction history range disappeared");
177
+ transaction.histories.set(conversationId, [
178
+ ...current.slice(0, first),
179
+ mutation.summary,
180
+ ...current.slice(first + positions.length)
181
+ ]);
182
+ }
183
+ };
184
+ var memoryEvents = {
185
+ async append(transaction, draft) {
186
+ const current = transaction.events.get(draft.conversationId) ?? [];
187
+ const event = AgentStoreEventEnvelopeSchema.parse({
188
+ ...draft,
189
+ seq: (current.at(-1)?.seq ?? 0) + 1
190
+ });
191
+ if (current.some((candidate) => candidate.eventId === event.eventId)) {
192
+ throw new TypeError("Agent store event identity is already present");
193
+ }
194
+ transaction.events.set(draft.conversationId, [...current, event]);
195
+ return event;
196
+ },
197
+ async list(transaction, input) {
198
+ const selected = (transaction.events.get(input.conversationId) ?? []).filter((event) => (input.fromSeq === undefined || event.seq >= input.fromSeq) && (input.toSeq === undefined || event.seq <= input.toSeq));
199
+ const items = selected.slice(0, input.limit);
200
+ const last = items.at(-1);
201
+ return AgentStoreEventPageSchema.parse({
202
+ items,
203
+ ...selected.length > items.length && last ? { nextSeq: last.seq + 1 } : {}
204
+ });
205
+ }
206
+ };
207
+ function scanMemoryRecoverable(runs, input) {
208
+ const descriptors = [...runs].flatMap(([conversationId, conversationRuns]) => [...conversationRuns.values()].filter((record) => isActiveRunState(record.run.state)).map((record) => ({ conversationId, run: record.run }))).sort((left, right) => left.conversationId.localeCompare(right.conversationId) || left.run.id.localeCompare(right.run.id));
209
+ const cursorTuple = input.cursor ? parseRecoverableCursor(input.cursor) : undefined;
210
+ const start = cursorTuple ? descriptors.findIndex((item) => item.conversationId.localeCompare(cursorTuple[0]) > 0 || item.conversationId === cursorTuple[0] && item.run.id.localeCompare(cursorTuple[1]) > 0) : 0;
211
+ if (start === -1) {
212
+ return AgentRecoverablePageSchema.parse({ items: [] });
213
+ }
214
+ const items = descriptors.slice(start, start + input.limit);
215
+ const last = items.at(-1);
216
+ const hasMore = start + items.length < descriptors.length;
217
+ return AgentRecoverablePageSchema.parse({
218
+ items,
219
+ ...hasMore && last && { nextCursor: recoverableCursor(last) }
220
+ });
221
+ }
222
+ function createMemoryAgentRuntimeStore() {
223
+ let purged = new Set;
224
+ let heads = new Map;
225
+ let runs = new Map;
226
+ let admissions = new Map;
227
+ let seeds = new Map;
228
+ let histories = new Map;
229
+ let events = new Map;
230
+ let transactionTail = Promise.resolve();
231
+ const driver = {
232
+ async transaction(work) {
233
+ const previous = transactionTail;
234
+ const release = Promise.withResolvers();
235
+ transactionTail = previous.catch(() => {
236
+ return;
237
+ }).then(() => release.promise);
238
+ await previous.catch(() => {
239
+ return;
240
+ });
241
+ const transaction = {
242
+ purged: new Set(purged),
243
+ heads: cloneHeadMap(heads),
244
+ runs: cloneNestedMap(runs, (record) => AgentStoredRunSchema.parse(structuredClone(record))),
245
+ admissions: cloneNestedMap(admissions, (receipt) => AgentAdmissionReceiptSchema.parse(structuredClone(receipt))),
246
+ seeds: cloneNestedMap(seeds, (receipt) => AgentSeedReceiptSchema.parse(structuredClone(receipt))),
247
+ histories: cloneHistoryMap(histories),
248
+ events: new Map([...events].map(([conversationId, stored]) => [
249
+ conversationId,
250
+ stored.map((event) => AgentStoreEventEnvelopeSchema.parse(structuredClone(event)))
251
+ ]))
252
+ };
253
+ try {
254
+ const result = await work(transaction);
255
+ purged = transaction.purged;
256
+ heads = transaction.heads;
257
+ runs = transaction.runs;
258
+ admissions = transaction.admissions;
259
+ seeds = transaction.seeds;
260
+ histories = transaction.histories;
261
+ events = transaction.events;
262
+ return result;
263
+ } finally {
264
+ release.resolve();
265
+ }
266
+ },
267
+ conversations: memoryConversations,
268
+ head: memoryHead,
269
+ runs: memoryRuns,
270
+ admissions: memoryAdmissions,
271
+ seeds: memorySeeds,
272
+ history: memoryHistory,
273
+ events: memoryEvents,
274
+ async scanRecoverable(input) {
275
+ return scanMemoryRecoverable(runs, input);
276
+ }
277
+ };
278
+ return createAgentRuntimeStore(driver);
279
+ }
280
+
281
+ export { createMemoryAgentRuntimeStore };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-kzfs85xp.js";
4
4
  import {
5
5
  isRecord
6
- } from "./index-77fekveh.js";
6
+ } from "./index-hffjpmq9.js";
7
7
 
8
8
  // src/observability/sanitize.ts
9
9
  var SENSITIVE_WORDS = new Set([
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  isRecord,
7
7
  transportResult
8
- } from "./index-77fekveh.js";
8
+ } from "./index-hffjpmq9.js";
9
9
 
10
10
  // src/browser/http.ts
11
11
  import ky, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getClientInfo,
3
3
  resolveSocketIp
4
- } from "./index-f9mb610r.js";
4
+ } from "./index-35mh5bhj.js";
5
5
  import {
6
6
  resolveTraceContext
7
7
  } from "./index-zcgf3gqf.js";
@@ -0,0 +1,98 @@
1
+ import {
2
+ formatZodError,
3
+ zodIssues
4
+ } from "./index-p5r7qpdd.js";
5
+ import {
6
+ AppError
7
+ } from "./index-2vtcmrj9.js";
8
+ import {
9
+ isRecord
10
+ } from "./index-hffjpmq9.js";
11
+
12
+ // src/contract/normalize.ts
13
+ import { z } from "zod";
14
+ var MAX_DETAIL_ISSUES = 20;
15
+ function errorCode(err) {
16
+ if (AppError.is(err))
17
+ return err.code;
18
+ if (err instanceof z.ZodError)
19
+ return "VALIDATION_ERROR";
20
+ return;
21
+ }
22
+ function recordedErrorMessage(code, envelopeMessage, thrown) {
23
+ if ((code === "INTERNAL_SERVER_ERROR" || code === "REALTIME_CONTRACT_VIOLATION") && thrown !== undefined) {
24
+ if (thrown instanceof Error)
25
+ return thrown.message;
26
+ if (typeof thrown === "string")
27
+ return thrown;
28
+ }
29
+ return envelopeMessage;
30
+ }
31
+ function normalizeError(err) {
32
+ if (AppError.is(err)) {
33
+ if (err.code === "REALTIME_CONTRACT_VIOLATION") {
34
+ return new AppError("REALTIME_CONTRACT_VIOLATION", "Realtime contract violation", 500);
35
+ }
36
+ return err;
37
+ }
38
+ if (err instanceof z.ZodError) {
39
+ return new AppError("VALIDATION_ERROR", formatZodError(err), 400, {
40
+ issues: zodIssues(err).slice(0, MAX_DETAIL_ISSUES)
41
+ });
42
+ }
43
+ console.error("[stitchkit] unhandled error:", err);
44
+ return new AppError("INTERNAL_SERVER_ERROR", "Internal server error", 500);
45
+ }
46
+ function strippedPaths(before, after, prefix) {
47
+ if (Array.isArray(before)) {
48
+ if (!Array.isArray(after))
49
+ return [];
50
+ return before.flatMap((item, i) => strippedPaths(item, after[i], `${prefix}[${i}]`));
51
+ }
52
+ if (!isRecord(before) || !isRecord(after))
53
+ return [];
54
+ const paths = [];
55
+ for (const [key, value] of Object.entries(before)) {
56
+ const path = prefix ? `${prefix}.${key}` : key;
57
+ if (!(key in after)) {
58
+ paths.push(path);
59
+ continue;
60
+ }
61
+ paths.push(...strippedPaths(value, after[key], path));
62
+ }
63
+ return paths;
64
+ }
65
+ function validateHandlerOutput(schema, data, onStripped) {
66
+ const parsed = schema.safeParse(data);
67
+ if (parsed.success) {
68
+ if (onStripped) {
69
+ const paths = strippedPaths(data, parsed.data, "");
70
+ if (paths.length > 0)
71
+ onStripped(paths);
72
+ }
73
+ return { ok: true, data: parsed.data };
74
+ }
75
+ return {
76
+ ok: false,
77
+ message: `Handler output does not match the contract: ${formatZodError(parsed.error)}`
78
+ };
79
+ }
80
+ function validateDeclaredOutput(schema, data, onStripped) {
81
+ if (!schema) {
82
+ if (data === undefined || data === null)
83
+ return { ok: true, data };
84
+ return {
85
+ ok: false,
86
+ message: "Handler returned data but the contract declares no output"
87
+ };
88
+ }
89
+ if (data === undefined) {
90
+ return {
91
+ ok: false,
92
+ message: "Handler returned undefined but the contract declares an output"
93
+ };
94
+ }
95
+ return validateHandlerOutput(schema, data, onStripped);
96
+ }
97
+
98
+ export { errorCode, recordedErrorMessage, normalizeError, validateDeclaredOutput };
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const BackoffPolicySchema: z.ZodReadonly<z.ZodObject<{
3
+ minDelayMs: z.ZodNumber;
4
+ maxDelayMs: z.ZodNumber;
5
+ jitter: z.ZodNumber;
6
+ }, z.core.$strict>>;
7
+ export type BackoffPolicy = z.infer<typeof BackoffPolicySchema>;
8
+ /**
9
+ * The delay before retry number `attempt` (1-based) under `policy`: doubling
10
+ * from `minDelayMs`, capped at `maxDelayMs`, with `jitter` subtracted. The one
11
+ * formula behind `createBackoff` and every attempt-numbered retry schedule.
12
+ */
13
+ export declare function backoffDelay(policy: BackoffPolicy, attempt: number, random?: () => number): number;
14
+ export interface Backoff {
15
+ /** The next delay in milliseconds, doubling from `minDelayMs` and jittered. */
16
+ next(): number;
17
+ reset(): void;
18
+ }
19
+ /**
20
+ * Exponential backoff with jitter, as a value.
21
+ *
22
+ * Jitter is the part that is easy to leave out and expensive to leave out: without it every
23
+ * consumer that lost the same server retries at the same instant, and the recovering server is
24
+ * hit by the whole fleet at once instead of a spread. The randomisation is subtractive — a delay
25
+ * is never longer than the ceiling the caller declared, only shorter — so `maxDelayMs` remains a
26
+ * real bound rather than an average.
27
+ */
28
+ export declare function createBackoff(policy: BackoffPolicy, random?: () => number): Backoff;
29
+ //# sourceMappingURL=backoff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backoff.d.ts","sourceRoot":"","sources":["../../src/internal/backoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;mBAW5B,CAAC;AACL,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,MAAoB,GACjC,MAAM,CAOR;AAED,MAAM,WAAW,OAAO;IACtB,+EAA+E;IAC/E,IAAI,IAAI,MAAM,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,aAAa,EACrB,MAAM,GAAE,MAAM,MAAoB,GACjC,OAAO,CAYT"}
@@ -1,20 +1,30 @@
1
1
  /**
2
- * Codepoint order, not locale order.
2
+ * UTF-16 code-unit order — the order `Array.prototype.sort` uses without a
3
+ * comparator, and deliberately not code-point or locale order.
3
4
  *
4
- * `Array.prototype.sort` without a comparator is codepoint order already, but
5
- * `localeCompare` is what a reader reaches for — and it would make a digest
6
- * depend on the machine's locale, which is the one input a fingerprint must
7
- * never have.
5
+ * Locale order would make a digest depend on the machine it ran on. Code-point
6
+ * order would be defensible, but every digest this package has ever written —
7
+ * CLI manifest signatures, agent-store event and checkpoint hashes, archives,
8
+ * committed surface snapshots — was taken in code-unit order, and the two
9
+ * disagree on keys outside the Basic Multilingual Plane. Changing it would
10
+ * report drift in data that never changed.
8
11
  */
9
- export declare function compareCodepoints(left: string, right: string): number;
12
+ export declare function compareCodeUnits(left: string, right: string): number;
10
13
  /**
11
14
  * Canonical bytes for a JSON value — object keys sorted, array order kept.
12
15
  *
13
- * The single serialisation behind every digest this repository takes of a
14
- * declared surface: the committed manifest snapshot and the live MCP catalog
15
- * stamp. Two implementations of "the same bytes" would eventually disagree,
16
- * and a fingerprint that disagrees with itself reports drift that never
17
- * happened.
16
+ * The one serialisation behind every digest and identity in the package: the
17
+ * surface snapshot and the MCP catalog stamp, CLI manifest signatures, the
18
+ * agent store's hashes and archives, watched-read and MCP-round argument keys,
19
+ * and schema comparison in union flattening. Two implementations of "the same
20
+ * bytes" would eventually disagree, and a fingerprint that disagrees with
21
+ * itself reports drift that never happened.
22
+ *
23
+ * What `JSON.stringify` drops or transforms is dropped or transformed here too:
24
+ * an `undefined` member disappears, a `Date` becomes `{}` (its own keys, none). A caller that must
25
+ * refuse such values validates before calling (the agent store parses with
26
+ * `z.json()` first). A top-level `undefined` answers `'undefined'`, so the
27
+ * result is always a string.
18
28
  */
19
29
  export declare function serializeCanonicalJson(value: unknown): string;
20
30
  //# sourceMappingURL=canonical-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../src/internal/canonical-json.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrE;AAYD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE7D"}
1
+ {"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../src/internal/canonical-json.ts"],"names":[],"mappings":"AAEA;;;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GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAU5E;AAgGD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CA+BjD"}
@@ -52,6 +52,18 @@ export interface PinnedDocumentResponse {
52
52
  body: Uint8Array;
53
53
  url: URL;
54
54
  }
55
+ /**
56
+ * The network boundary refused this address — as opposed to the network failing.
57
+ *
58
+ * A caller that offers a way through the boundary has to be able to tell the two
59
+ * apart, and matching on a message is not telling them apart: the wording is
60
+ * ours to change and a match on it breaks silently the moment it does. The class
61
+ * is the distinction, so a caller can name its own remedy instead of relaying a
62
+ * sentence that reads like a timeout.
63
+ */
64
+ export declare class PrivateAddressRefusal extends Error {
65
+ readonly name = "PrivateAddressRefusal";
66
+ }
55
67
  /**
56
68
  * Fetch a small public document while pinning the TCP connection to the exact
57
69
  * public DNS answer that passed validation. This closes the check/use DNS
@@ -1 +1 @@
1
- {"version":3,"file":"secure-fetch.d.ts","sourceRoot":"","sources":["../../src/internal/secure-fetch.ts"],"names":[],"mappings":"AAiEA,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CA8D/C;AA4BD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,wBAAsB,YAAY,CAChC,KAAK,EAAE,GAAG,EACV,YAAY,EAAE,OAAO,EACrB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,QAA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AE,OAAO,EACrB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,QAAQ,CAAC,CAiDnB;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,GAAG,CAAC;CACV;AAED;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,2BAA2B;CACzC;AA6CD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAkFjC;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoBnF"}
@@ -1,46 +1,3 @@
1
- /**
2
- * A stable identity for a call's arguments — one implementation, two callers.
3
- *
4
- * Two callers need the same thing for different reasons. The MCP round keys a
5
- * tool invocation by `(operation, arguments)` so a retry is recognised as the
6
- * same round; a watched read keys its shared source by `(operation, arguments)`
7
- * so two browsers asking the same question are one read on the server. If those
8
- * two computed the key differently, the same arguments would be the same round
9
- * and two different watches — and nothing would say so.
10
- *
11
- * The stability that matters is key order: `{a:1,b:2}` and `{b:2,a:1}` are the
12
- * same arguments and `JSON.stringify` disagrees, so a naive key silently splits
13
- * one shared source into two whenever a caller builds its object in a different
14
- * order. That is not a hypothetical: object literal order follows the source
15
- * that wrote it, and two components asking the same question rarely share one.
16
- *
17
- * ## Why this is not SHA-256
18
- *
19
- * It was, and that made every watched read fail on an ordinary intranet. Web
20
- * Crypto — `crypto.subtle` — exists only in a **secure context**, so a page
21
- * served over plain HTTP from a LAN name has no `crypto.subtle` at all and the
22
- * first digest throws `Cannot read properties of undefined`. `localhost` is
23
- * secure by definition, which is exactly why nothing caught it until a browser
24
- * opened the app by its name.
25
- *
26
- * The fix is not a fallback, it is admitting what this is for: **identity, not
27
- * secrecy**. Nothing here resists an adversary — an attacker who can choose your
28
- * watch arguments can already ask the question directly. So the requirement is
29
- * distribution and determinism, both ends agreeing, and no ambient capability;
30
- * a cryptographic hash bought none of that and cost the entire non-secure web.
31
- *
32
- * Being synchronous is the second thing it buys. A promise for a key made the
33
- * first subscription of a question asynchronous, which meant a component could
34
- * not be handed a retained value in the same turn it subscribed.
35
- */
36
- /**
37
- * The value with every object's keys sorted, recursively — arrays keep their
38
- * order, because in an array order *is* the value.
39
- *
40
- * `Object.keys` returns own enumerable keys only, so nothing from a prototype
41
- * reaches the digest.
42
- */
43
- export declare function stableValue(value: unknown): unknown;
44
1
  /**
45
2
  * A bounded, order-independent identity for a call's arguments.
46
3
  *
@@ -1 +1 @@
1
- {"version":3,"file":"stable-digest.d.ts","sourceRoot":"","sources":["../../src/internal/stable-digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQnD;AAyCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGrE"}
1
+ {"version":3,"file":"stable-digest.d.ts","sourceRoot":"","sources":["../../src/internal/stable-digest.ts"],"names":[],"mappings":"AA6EA;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGrE"}
@@ -1,5 +1,3 @@
1
- import type { SurfaceAgentRuntimeToolDefinition } from '../tools/internal/surface-projector.js';
2
- import type { RuntimeToolDefinition } from '../tools/runtime-tool.js';
3
1
  export declare function typedEntries<T extends object>(value: T): Array<{
4
2
  [K in keyof T]: [K, T[K]];
5
3
  }[keyof T]>;
@@ -7,12 +5,6 @@ export declare function typedEntries<T extends object>(value: T): Array<{
7
5
  export declare function isRecord(value: unknown): value is Record<string, unknown>;
8
6
  /** Invoke a runtime-discovered handler after a fail-first function check. */
9
7
  export declare function callRuntimeHandler(handler: unknown, context: unknown): unknown;
10
- /**
11
- * Agent-only public declarations use a peer-free structural tool definition.
12
- * Construction validates executable functions before this boundary restores
13
- * the richer internal definition consumed by the canonical mount.
14
- */
15
- export declare function executableAgentRuntimeTools(tools: readonly SurfaceAgentRuntimeToolDefinition[]): readonly RuntimeToolDefinition[];
16
8
  /**
17
9
  * Isolated loose-to-typed adapter boundary for transports whose decoder is
18
10
  * selected at runtime while the contract fixes the generic result type.
@@ -1 +1 @@
1
- {"version":3,"file":"typed.d.ts","sourceRoot":"","sources":["../../src/internal/typed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC3C,KAAK,EAAE,CAAC,GACP,KAAK,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAE/C;AAED,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE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,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAK9E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAEpD;AAED,wBAAgB,SAAS,CACvB,OAAO,SAAS,MAAM,EACtB,OAAO,SAAS;KAAG,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,EAAE,OAAO;CAAE,EAElD,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,CAAC,CAAC,SAAS,MAAM,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,GACrF,OAAO,CAOT;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,SAAS,MAAM,EACtB,OAAO,SAAS;KAAG,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,EAAE,OAAO;CAAE,EAElD,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,KAAK,OAAO,GACrE,OAAO,CAKT"}
@@ -0,0 +1,38 @@
1
+ import type { z } from 'zod';
2
+ /** One field-level validation issue — the structured sibling of `formatZodError`. */
3
+ export interface ZodIssueSummary {
4
+ /** Dotted path to the offending field (`(root)` for a top-level issue). */
5
+ path: string;
6
+ /** Zod issue code (e.g. `invalid_type`, `too_small`). */
7
+ code: string;
8
+ /** Human-readable message for this field. */
9
+ message: string;
10
+ /**
11
+ * 1-based index of the union branch that produced this issue, counted within
12
+ * the nearest enclosing union. Absent when no union was involved.
13
+ */
14
+ branch?: number;
15
+ }
16
+ /**
17
+ * Project a `ZodError` into structured, wire-safe field issues — path / code /
18
+ * message (and a union branch, where one applies) — nothing server-internal.
19
+ * For a machine client that matches on fields rather than parsing the text
20
+ * `message`. Returns every issue; a caller that bounds response size slices it
21
+ * (see `normalizeError`).
22
+ *
23
+ * A failed union contributes its own issue AND one issue per branch failure, so
24
+ * the refusal names the branch and the path instead of only `(root)`.
25
+ */
26
+ export declare function zodIssues(error: z.ZodError): ZodIssueSummary[];
27
+ /**
28
+ * The text a person reads, which is a different job from the structured list.
29
+ *
30
+ * `zodIssues` keeps every branch failure, including the several that sit at the
31
+ * union's own path — a machine addresses them by branch number and wants them
32
+ * all. A reader gains nothing from the same path twice: the union's own line
33
+ * already quotes those reasons, and each repeat costs one of the few lines the
34
+ * cap allows. So the text keeps the first issue at each path and drops the
35
+ * rest, which is what leaves room for the line naming the field.
36
+ */
37
+ export declare function formatZodError(error: z.ZodError): string;
38
+ //# sourceMappingURL=zod-issues.d.ts.map