stitchkit 0.94.0 → 0.95.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 (360) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
  3. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  4. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  5. package/dist/agent-runtime/contained-darwin.d.ts +38 -0
  6. package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
  7. package/dist/agent-runtime/contained-files.d.ts +11 -26
  8. package/dist/agent-runtime/contained-files.d.ts.map +1 -1
  9. package/dist/agent-runtime/contained-scan.d.ts +21 -0
  10. package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
  11. package/dist/agent-runtime/contained-write.d.ts +9 -0
  12. package/dist/agent-runtime/contained-write.d.ts.map +1 -0
  13. package/dist/agent-runtime/deferred-tool-types.d.ts +3 -2
  14. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  15. package/dist/agent-runtime/harness-control.d.ts +0 -1
  16. package/dist/agent-runtime/harness-control.d.ts.map +1 -1
  17. package/dist/agent-runtime/harness.d.ts +0 -5
  18. package/dist/agent-runtime/harness.d.ts.map +1 -1
  19. package/dist/agent-runtime/managed-tools.d.ts +3 -2
  20. package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
  21. package/dist/agent-runtime/provider-origin.d.ts +7 -0
  22. package/dist/agent-runtime/provider-origin.d.ts.map +1 -1
  23. package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -1
  24. package/dist/agent-runtime/runtime.d.ts +1 -1
  25. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  26. package/dist/agent-runtime/schedule-records.d.ts +34 -0
  27. package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
  28. package/dist/agent-runtime/schedules.d.ts +34 -0
  29. package/dist/agent-runtime/schedules.d.ts.map +1 -1
  30. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
  31. package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
  32. package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
  33. package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
  34. package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
  35. package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
  36. package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
  37. package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
  38. package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
  39. package/dist/application/admission-rate.d.ts +21 -0
  40. package/dist/application/admission-rate.d.ts.map +1 -0
  41. package/dist/application/admission-run.d.ts +8 -0
  42. package/dist/application/admission-run.d.ts.map +1 -0
  43. package/dist/application/admission.d.ts.map +1 -1
  44. package/dist/application/diagnostic-journal-lock.d.ts +9 -34
  45. package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
  46. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
  47. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
  48. package/dist/application/kernel-resource-context.d.ts.map +1 -1
  49. package/dist/application/notification-outbox.d.ts.map +1 -1
  50. package/dist/application/process-lifecycle-transitions.d.ts +175 -0
  51. package/dist/application/process-lifecycle-transitions.d.ts.map +1 -0
  52. package/dist/application/process-lifecycle.d.ts +3 -131
  53. package/dist/application/process-lifecycle.d.ts.map +1 -1
  54. package/dist/application/schedule.d.ts +0 -1
  55. package/dist/application/schedule.d.ts.map +1 -1
  56. package/dist/application/watch-hub-core.d.ts +122 -0
  57. package/dist/application/watch-hub-core.d.ts.map +1 -0
  58. package/dist/application/watch-hub.d.ts +2 -2
  59. package/dist/application/watch-hub.d.ts.map +1 -1
  60. package/dist/browser/client-executors.d.ts +14 -0
  61. package/dist/browser/client-executors.d.ts.map +1 -0
  62. package/dist/browser/client-multipart.d.ts +1 -1
  63. package/dist/browser/client-multipart.d.ts.map +1 -1
  64. package/dist/browser/client.d.ts +3 -2
  65. package/dist/browser/client.d.ts.map +1 -1
  66. package/dist/browser/http-fetch.d.ts +22 -0
  67. package/dist/browser/http-fetch.d.ts.map +1 -0
  68. package/dist/browser/http.d.ts +1 -3
  69. package/dist/browser/http.d.ts.map +1 -1
  70. package/dist/browser/live-state-core.d.ts +63 -0
  71. package/dist/browser/live-state-core.d.ts.map +1 -0
  72. package/dist/browser/live-state.d.ts.map +1 -1
  73. package/dist/browser/realtime-client.d.ts +26 -0
  74. package/dist/browser/realtime-client.d.ts.map +1 -0
  75. package/dist/browser/socket-io-connection.d.ts +82 -0
  76. package/dist/browser/socket-io-connection.d.ts.map +1 -0
  77. package/dist/browser/socket-io-peer.d.ts +20 -0
  78. package/dist/browser/socket-io-peer.d.ts.map +1 -0
  79. package/dist/browser/socket-io-trace.d.ts +31 -0
  80. package/dist/browser/socket-io-trace.d.ts.map +1 -0
  81. package/dist/browser/socket-io.d.ts +2 -18
  82. package/dist/browser/socket-io.d.ts.map +1 -1
  83. package/dist/contract/client-types.d.ts +134 -0
  84. package/dist/contract/client-types.d.ts.map +1 -0
  85. package/dist/contract/define-validation.d.ts +30 -0
  86. package/dist/contract/define-validation.d.ts.map +1 -0
  87. package/dist/contract/define.d.ts +3 -357
  88. package/dist/contract/define.d.ts.map +1 -1
  89. package/dist/contract/runtime-context.d.ts +131 -0
  90. package/dist/contract/runtime-context.d.ts.map +1 -0
  91. package/dist/contract/tool-options.d.ts +105 -0
  92. package/dist/contract/tool-options.d.ts.map +1 -0
  93. package/dist/contract/tool-view.d.ts +15 -2
  94. package/dist/contract/tool-view.d.ts.map +1 -1
  95. package/dist/durability/contract.d.ts +83 -0
  96. package/dist/durability/contract.d.ts.map +1 -1
  97. package/dist/durability/effect.d.ts +24 -0
  98. package/dist/durability/effect.d.ts.map +1 -0
  99. package/dist/durability/engine.d.ts +2 -2
  100. package/dist/durability/engine.d.ts.map +1 -1
  101. package/dist/durability/events.d.ts +2 -0
  102. package/dist/durability/events.d.ts.map +1 -1
  103. package/dist/durability/ledger.d.ts +11 -0
  104. package/dist/durability/ledger.d.ts.map +1 -1
  105. package/dist/durability/parks.d.ts +22 -0
  106. package/dist/durability/parks.d.ts.map +1 -0
  107. package/dist/durability/scheduler.d.ts +1 -0
  108. package/dist/durability/scheduler.d.ts.map +1 -1
  109. package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
  110. package/dist/entrypoints/agent-runtime/harness.js +127 -116
  111. package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
  112. package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
  113. package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
  114. package/dist/entrypoints/agent-runtime/testing.js +246 -214
  115. package/dist/entrypoints/agent-runtime.js +224 -203
  116. package/dist/entrypoints/application/diagnostic-journal.js +63 -203
  117. package/dist/entrypoints/application/opentelemetry.js +1 -1
  118. package/dist/entrypoints/application.d.ts +2 -1
  119. package/dist/entrypoints/application.d.ts.map +1 -1
  120. package/dist/entrypoints/application.js +506 -380
  121. package/dist/entrypoints/cli.d.ts +4 -1
  122. package/dist/entrypoints/cli.d.ts.map +1 -1
  123. package/dist/entrypoints/cli.js +57 -35
  124. package/dist/entrypoints/contract.d.ts +5 -2
  125. package/dist/entrypoints/contract.d.ts.map +1 -1
  126. package/dist/entrypoints/contract.js +3 -2
  127. package/dist/entrypoints/files.d.ts +2 -0
  128. package/dist/entrypoints/files.d.ts.map +1 -1
  129. package/dist/entrypoints/files.js +98 -2
  130. package/dist/entrypoints/index.d.ts +4 -2
  131. package/dist/entrypoints/index.d.ts.map +1 -1
  132. package/dist/entrypoints/index.js +348 -282
  133. package/dist/entrypoints/live.js +89 -71
  134. package/dist/entrypoints/node.d.ts +2 -1
  135. package/dist/entrypoints/node.d.ts.map +1 -1
  136. package/dist/entrypoints/node.js +13 -12
  137. package/dist/entrypoints/react.js +1 -1
  138. package/dist/entrypoints/remote.js +4 -4
  139. package/dist/entrypoints/server.d.ts +4 -2
  140. package/dist/entrypoints/server.d.ts.map +1 -1
  141. package/dist/entrypoints/server.js +293 -79
  142. package/dist/entrypoints/testing.d.ts +2 -1
  143. package/dist/entrypoints/testing.d.ts.map +1 -1
  144. package/dist/entrypoints/testing.js +288 -281
  145. package/dist/entrypoints/tools/connections.js +2 -2
  146. package/dist/entrypoints/tools/invoker.js +4 -4
  147. package/dist/entrypoints/tools.d.ts +6 -3
  148. package/dist/entrypoints/tools.d.ts.map +1 -1
  149. package/dist/entrypoints/tools.js +245 -202
  150. package/dist/entrypoints/tracking.js +325 -274
  151. package/dist/files/boundary.d.ts.map +1 -1
  152. package/dist/files/file-io.d.ts +14 -0
  153. package/dist/files/file-io.d.ts.map +1 -0
  154. package/dist/index-1j8pm5t0.js +412 -0
  155. package/dist/{index-kvj7f4hq.js → index-2bxbyab0.js} +10 -2
  156. package/dist/{index-xnj9bgxe.js → index-2gxzjvyr.js} +2 -162
  157. package/dist/index-4gcnakhx.js +82 -0
  158. package/dist/{index-j05z5gn4.js → index-55hkhm67.js} +136 -119
  159. package/dist/{index-cq4qfycf.js → index-79z7m7dt.js} +227 -59
  160. package/dist/{index-r7nmqpsg.js → index-7p1f0vp2.js} +1 -1
  161. package/dist/{index-dcpdvjsc.js → index-863ea9jb.js} +4 -4
  162. package/dist/index-8p52kd5p.js +242 -0
  163. package/dist/{index-97ac4gph.js → index-8zja4pkf.js} +26 -4
  164. package/dist/{index-2qzskm8h.js → index-dce5wxcq.js} +1 -1
  165. package/dist/index-e01r054k.js +105 -0
  166. package/dist/{index-sees8yf8.js → index-ensd0r74.js} +118 -111
  167. package/dist/{index-1nd48tm9.js → index-gxrt5h6v.js} +2 -1
  168. package/dist/{index-e87kakm4.js → index-ham5sz8m.js} +112 -110
  169. package/dist/{index-kj2wbeta.js → index-het2he5g.js} +280 -196
  170. package/dist/{index-vcvkq30w.js → index-hmp4800j.js} +3 -3
  171. package/dist/{index-gyr48nzg.js → index-k30h66yd.js} +71 -151
  172. package/dist/{index-2cr1cqhn.js → index-khtgb21r.js} +2 -2
  173. package/dist/{index-x4799c19.js → index-ndddxtyx.js} +11 -11
  174. package/dist/{index-dydjcp8z.js → index-np4m8hd3.js} +38 -36
  175. package/dist/{index-p81267c2.js → index-p3vsv1fb.js} +621 -357
  176. package/dist/{index-mp5sn43f.js → index-p9e0w8hs.js} +2 -2
  177. package/dist/{index-rewkc2hj.js → index-p9sh0xx4.js} +3 -3
  178. package/dist/{index-70yj2ebz.js → index-paz6sgdp.js} +107 -103
  179. package/dist/{index-bn2cjajt.js → index-px2gm2jp.js} +26 -102
  180. package/dist/index-s812ycat.js +65 -0
  181. package/dist/{index-xsqjkha9.js → index-sp1tzwnb.js} +2 -2
  182. package/dist/{index-n6hxg8as.js → index-t9rhjr9f.js} +615 -566
  183. package/dist/{index-zeemqhqx.js → index-v260df89.js} +88 -80
  184. package/dist/{index-fdp6hdxn.js → index-w906953s.js} +5 -1
  185. package/dist/{index-mdzh02yc.js → index-wdkt63w3.js} +1 -1
  186. package/dist/{index-58k4fp34.js → index-wsm5w4ee.js} +1 -1
  187. package/dist/{index-v38qyerb.js → index-xw3s75nj.js} +1 -1
  188. package/dist/internal/atomic-file.d.ts +23 -2
  189. package/dist/internal/atomic-file.d.ts.map +1 -1
  190. package/dist/internal/exclusive-lock.d.ts +51 -0
  191. package/dist/internal/exclusive-lock.d.ts.map +1 -0
  192. package/dist/internal/process-identity.d.ts +47 -0
  193. package/dist/internal/process-identity.d.ts.map +1 -0
  194. package/dist/internal/with-exclusive-lock.d.ts +67 -0
  195. package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
  196. package/dist/live/watch-client.d.ts.map +1 -1
  197. package/dist/observability/audit.d.ts +2 -2
  198. package/dist/observability/audit.d.ts.map +1 -1
  199. package/dist/observability/event.d.ts +2 -1
  200. package/dist/observability/event.d.ts.map +1 -1
  201. package/dist/primitives/export-operation.d.ts +1 -1
  202. package/dist/primitives/export-operation.d.ts.map +1 -1
  203. package/dist/realtime/registry.d.ts +0 -5
  204. package/dist/realtime/registry.d.ts.map +1 -1
  205. package/dist/server/bun.d.ts +0 -1
  206. package/dist/server/bun.d.ts.map +1 -1
  207. package/dist/server/context-contribution.d.ts +1 -1
  208. package/dist/server/context-contribution.d.ts.map +1 -1
  209. package/dist/server/context.d.ts +1 -1
  210. package/dist/server/context.d.ts.map +1 -1
  211. package/dist/server/endpoint-response.d.ts +2 -1
  212. package/dist/server/endpoint-response.d.ts.map +1 -1
  213. package/dist/server/error-dispatch.d.ts +1 -1
  214. package/dist/server/error-dispatch.d.ts.map +1 -1
  215. package/dist/server/error-hook.d.ts +1 -1
  216. package/dist/server/error-hook.d.ts.map +1 -1
  217. package/dist/server/handler-state.d.ts +1 -1
  218. package/dist/server/handler-state.d.ts.map +1 -1
  219. package/dist/server/implement-registry.d.ts +54 -0
  220. package/dist/server/implement-registry.d.ts.map +1 -0
  221. package/dist/server/implement.d.ts +9 -55
  222. package/dist/server/implement.d.ts.map +1 -1
  223. package/dist/server/middleware/auth.d.ts +1 -31
  224. package/dist/server/middleware/auth.d.ts.map +1 -1
  225. package/dist/server/middleware/jwt.d.ts +31 -0
  226. package/dist/server/middleware/jwt.d.ts.map +1 -0
  227. package/dist/server/multipart-reader.d.ts +22 -0
  228. package/dist/server/multipart-reader.d.ts.map +1 -0
  229. package/dist/server/multipart.d.ts +1 -1
  230. package/dist/server/multipart.d.ts.map +1 -1
  231. package/dist/server/oauth/cimd.d.ts +88 -0
  232. package/dist/server/oauth/cimd.d.ts.map +1 -0
  233. package/dist/server/oauth/endpoints.d.ts +39 -0
  234. package/dist/server/oauth/endpoints.d.ts.map +1 -0
  235. package/dist/server/oauth/provider.d.ts +1 -68
  236. package/dist/server/oauth/provider.d.ts.map +1 -1
  237. package/dist/server/streaming-pump.d.ts +66 -0
  238. package/dist/server/streaming-pump.d.ts.map +1 -0
  239. package/dist/server/streaming-route.d.ts +12 -5
  240. package/dist/server/streaming-route.d.ts.map +1 -1
  241. package/dist/server/types.d.ts +4 -1
  242. package/dist/server/types.d.ts.map +1 -1
  243. package/dist/server/unix-client-bun.d.ts.map +1 -1
  244. package/dist/server/unix-client-http1.d.ts +76 -0
  245. package/dist/server/unix-client-http1.d.ts.map +1 -0
  246. package/dist/server/unix-client.d.ts.map +1 -1
  247. package/dist/testing/handler-clients.d.ts +2 -1
  248. package/dist/testing/handler-clients.d.ts.map +1 -1
  249. package/dist/testing/realtime-probe.d.ts +33 -0
  250. package/dist/testing/realtime-probe.d.ts.map +1 -0
  251. package/dist/testing/surface-conformance.d.ts +0 -31
  252. package/dist/testing/surface-conformance.d.ts.map +1 -1
  253. package/dist/testing/surface-manifest-digest.d.ts +44 -0
  254. package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
  255. package/dist/testing/surface-manifest.d.ts.map +1 -1
  256. package/dist/tools/agent.d.ts +1 -1
  257. package/dist/tools/agent.d.ts.map +1 -1
  258. package/dist/tools/cli/args-fields.d.ts +31 -0
  259. package/dist/tools/cli/args-fields.d.ts.map +1 -0
  260. package/dist/tools/cli/args-route.d.ts +42 -0
  261. package/dist/tools/cli/args-route.d.ts.map +1 -0
  262. package/dist/tools/cli/args-view.d.ts +32 -0
  263. package/dist/tools/cli/args-view.d.ts.map +1 -0
  264. package/dist/tools/cli/args.d.ts +2 -65
  265. package/dist/tools/cli/args.d.ts.map +1 -1
  266. package/dist/tools/cli/argument-error.d.ts +5 -0
  267. package/dist/tools/cli/argument-error.d.ts.map +1 -0
  268. package/dist/tools/cli/checkpoint.d.ts.map +1 -1
  269. package/dist/tools/cli/command.d.ts +1 -1
  270. package/dist/tools/cli/command.d.ts.map +1 -1
  271. package/dist/tools/cli/config.d.ts +1 -1
  272. package/dist/tools/cli/config.d.ts.map +1 -1
  273. package/dist/tools/cli/format.d.ts +2 -1
  274. package/dist/tools/cli/format.d.ts.map +1 -1
  275. package/dist/tools/cli/invoke.d.ts +2 -1
  276. package/dist/tools/cli/invoke.d.ts.map +1 -1
  277. package/dist/tools/cli/managed-surface.d.ts +1 -1
  278. package/dist/tools/cli/managed-surface.d.ts.map +1 -1
  279. package/dist/tools/cli/policy.d.ts +1 -1
  280. package/dist/tools/cli/policy.d.ts.map +1 -1
  281. package/dist/tools/cli/prepare.d.ts.map +1 -1
  282. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  283. package/dist/tools/cli/session.d.ts +1 -1
  284. package/dist/tools/cli/session.d.ts.map +1 -1
  285. package/dist/tools/cli/update.d.ts +19 -0
  286. package/dist/tools/cli/update.d.ts.map +1 -1
  287. package/dist/tools/cli/view.d.ts +1 -1
  288. package/dist/tools/cli/view.d.ts.map +1 -1
  289. package/dist/tools/cli/wait.d.ts +1 -1
  290. package/dist/tools/cli/wait.d.ts.map +1 -1
  291. package/dist/tools/connections/runtime.d.ts +1 -1
  292. package/dist/tools/connections/runtime.d.ts.map +1 -1
  293. package/dist/tools/execute-args.d.ts +23 -0
  294. package/dist/tools/execute-args.d.ts.map +1 -0
  295. package/dist/tools/execute-hooks.d.ts +146 -0
  296. package/dist/tools/execute-hooks.d.ts.map +1 -0
  297. package/dist/tools/execute-result.d.ts +40 -0
  298. package/dist/tools/execute-result.d.ts.map +1 -0
  299. package/dist/tools/execute.d.ts +4 -193
  300. package/dist/tools/execute.d.ts.map +1 -1
  301. package/dist/tools/internal/surface-projector.d.ts +2 -1
  302. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  303. package/dist/tools/invoker.d.ts +2 -1
  304. package/dist/tools/invoker.d.ts.map +1 -1
  305. package/dist/tools/lifecycle.d.ts +1 -1
  306. package/dist/tools/lifecycle.d.ts.map +1 -1
  307. package/dist/tools/mcp/mount.d.ts +1 -1
  308. package/dist/tools/mcp/mount.d.ts.map +1 -1
  309. package/dist/tools/mcp/prepare.d.ts +2 -1
  310. package/dist/tools/mcp/prepare.d.ts.map +1 -1
  311. package/dist/tools/mcp/progress.d.ts +1 -1
  312. package/dist/tools/mcp/progress.d.ts.map +1 -1
  313. package/dist/tools/mcp/register.d.ts +3 -2
  314. package/dist/tools/mcp/register.d.ts.map +1 -1
  315. package/dist/tools/mcp/round-context.d.ts +38 -0
  316. package/dist/tools/mcp/round-context.d.ts.map +1 -0
  317. package/dist/tools/mcp/round-policy.d.ts +1 -1
  318. package/dist/tools/mcp/round-policy.d.ts.map +1 -1
  319. package/dist/tools/mcp/round.d.ts +3 -11
  320. package/dist/tools/mcp/round.d.ts.map +1 -1
  321. package/dist/tools/mcp/runtime-tools.d.ts +2 -1
  322. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  323. package/dist/tools/mount.d.ts +3 -1
  324. package/dist/tools/mount.d.ts.map +1 -1
  325. package/dist/tools/native-definition.d.ts +2 -1
  326. package/dist/tools/native-definition.d.ts.map +1 -1
  327. package/dist/tools/operations/async-operation-runtime-tools.d.ts +2 -1
  328. package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
  329. package/dist/tools/operations/async-operation-runtime-types.d.ts +2 -1
  330. package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
  331. package/dist/tools/remote.d.ts.map +1 -1
  332. package/dist/tools/runtime-tool.d.ts +3 -1
  333. package/dist/tools/runtime-tool.d.ts.map +1 -1
  334. package/dist/tools/tool-logger.d.ts +1 -1
  335. package/dist/tools/tool-logger.d.ts.map +1 -1
  336. package/dist/tracking/client-listeners.d.ts +30 -0
  337. package/dist/tracking/client-listeners.d.ts.map +1 -0
  338. package/dist/tracking/client-visit.d.ts +61 -0
  339. package/dist/tracking/client-visit.d.ts.map +1 -0
  340. package/dist/tracking/client.d.ts +3 -2
  341. package/dist/tracking/client.d.ts.map +1 -1
  342. package/llms/application.2.txt +271 -7
  343. package/llms/application.txt +66 -289
  344. package/llms/cli.2.txt +80 -0
  345. package/llms/cli.txt +45 -74
  346. package/llms/contract.txt +3 -3
  347. package/llms/files.txt +3 -0
  348. package/llms/stitchkit.txt +3 -3
  349. package/llms/tools.2.txt +88 -279
  350. package/llms/tools.3.txt +288 -0
  351. package/llms/tools.txt +27 -65
  352. package/llms/{upgrading-0.37.0-0.50.0.txt → upgrading-0.37.0-0.53.0.txt} +25 -3
  353. package/llms/{upgrading-0.53.0-0.67.0.txt → upgrading-0.55.0-0.68.0.txt} +53 -25
  354. package/llms/{upgrading-0.68.0-0.94.0.txt → upgrading-0.69.0-0.95.0.txt} +45 -53
  355. package/llms/upgrading.txt +3 -3
  356. package/llms-full.txt +216 -43
  357. package/llms.txt +8 -8
  358. package/package.json +1 -1
  359. package/dist/index-e2z3ahw9.js +0 -325
  360. package/dist/index-mkm15s49.js +0 -394
@@ -12,10 +12,10 @@ import {
12
12
  parseApiErrorBody,
13
13
  refuseLocally,
14
14
  responseTraceId
15
- } from "./index-zeemqhqx.js";
15
+ } from "./index-v260df89.js";
16
16
  import {
17
17
  parseTrailingWildcard
18
- } from "./index-gyr48nzg.js";
18
+ } from "./index-4gcnakhx.js";
19
19
  import {
20
20
  isRecord,
21
21
  mapObject,
@@ -433,7 +433,7 @@ function parseContractStream(response, descriptor, abort) {
433
433
  return new OwnedContractStream(readContractStream(response, descriptor, abort), abort);
434
434
  }
435
435
 
436
- // src/browser/client.ts
436
+ // src/browser/client-executors.ts
437
437
  function withTimeout(options, endpoint) {
438
438
  const responseType = endpoint.rawResponse || "stream" in endpoint ? "response" : endpoint.output ? undefined : "void";
439
439
  if (endpoint.timeout === undefined && responseType === undefined)
@@ -474,104 +474,6 @@ function withOutput(endpoint, result, abortStream) {
474
474
  return schema.parse(value);
475
475
  });
476
476
  }
477
- function contractEndpointMatchers(contract, endpointNames, contractConfig) {
478
- const selected = endpointNames ? new Set(endpointNames) : null;
479
- const matchers = [];
480
- for (const [key, endpoint] of typedEntries(contract.endpoints)) {
481
- if (selected && !selected.has(key))
482
- continue;
483
- if (endpoint.expose && !endpoint.expose.includes("HTTP")) {
484
- if (selected) {
485
- throw new Error(`Cannot create an HTTP route matcher for non-HTTP endpoint: ${String(key)}`);
486
- }
487
- continue;
488
- }
489
- matchers.push(createClientRouteMatcher(endpoint, contract.meta.prefix, contractConfig));
490
- }
491
- if (selected && matchers.length !== selected.size) {
492
- throw new Error("Cannot create an HTTP route matcher for an unknown endpoint");
493
- }
494
- return matchers;
495
- }
496
- function createClient(contract, configOrClient, contractConfig) {
497
- const client = {};
498
- const makeExecutor = isHttpAdapter(configOrClient) ? (endpoint) => createHttpExecutor(endpoint, contract.meta.prefix, configOrClient, contractConfig) : (endpoint) => createFetchExecutor(endpoint, contract.meta.prefix, configOrClient, contractConfig);
499
- for (const [key, endpoint] of typedEntries(contract.endpoints)) {
500
- if (endpoint.expose && !endpoint.expose.includes("HTTP"))
501
- continue;
502
- setClientMethod(client, key, createEndpointMethod(endpoint, makeExecutor(endpoint), contractConfig));
503
- }
504
- return client;
505
- }
506
- function createClients(contracts, configOrClient, contractConfig) {
507
- return mapObject(contracts, (_key, contract) => createClient(contract, configOrClient, contractConfig));
508
- }
509
- function buildScopedRegistry(contracts, scopeConfigs, surfaceName, build) {
510
- const registry = {};
511
- for (const [namespace, value] of Object.entries(contracts)) {
512
- const list = Array.isArray(value) ? value : [value];
513
- const surface = {};
514
- for (const contract of list) {
515
- const scope = contract.meta.scope;
516
- if (!scope) {
517
- throw new Error(`Contract in ${surfaceName} namespace "${namespace}" has no scope`);
518
- }
519
- const scopeConfig = scopeConfigs[scope];
520
- if (!scopeConfig) {
521
- throw new Error(`Missing ${surfaceName} config for scope: ${scope}`);
522
- }
523
- for (const [methodName, method] of Object.entries(build(contract, scopeConfig))) {
524
- if (Object.hasOwn(surface, methodName)) {
525
- throw new Error(`${surfaceName[0]?.toUpperCase()}${surfaceName.slice(1)} namespace "${namespace}" has duplicate method: ${methodName}`);
526
- }
527
- surface[methodName] = method;
528
- }
529
- }
530
- registry[namespace] = surface;
531
- }
532
- return registry;
533
- }
534
- function createScopedClients(contracts, configOrClient, scopeConfigs) {
535
- return buildScopedRegistry(contracts, scopeConfigs, "client", (contract, config) => createClient(contract, configOrClient, config));
536
- }
537
- function isHttpAdapter(value) {
538
- return typeof value === "object" && "get" in value && typeof value.get === "function";
539
- }
540
- function setClientMethod(target, key, method) {
541
- target[key] = method;
542
- }
543
- function createEndpointMethod(endpoint, execute, contractConfig) {
544
- const hasScopedArguments = (contractConfig?.stripPrefixKeys?.length ?? 0) > 0;
545
- if (endpointHasArguments(endpoint) || hasScopedArguments) {
546
- const method2 = (requestArgs) => settle(execute, readClientRequestArgs(requestArgs), undefined);
547
- return Object.assign(method2, {
548
- withOptions: (...args) => {
549
- refuseExtraWithOptionsArguments(endpoint, args.length, 2);
550
- return settle(execute, readClientRequestArgs(args[0]), readClientRequestOptions(args[1]));
551
- }
552
- });
553
- }
554
- const method = () => settle(execute, {}, undefined);
555
- return Object.assign(method, {
556
- withOptions: (...args) => {
557
- refuseExtraWithOptionsArguments(endpoint, args.length, 1);
558
- return settle(execute, {}, readClientRequestOptions(args[0]));
559
- }
560
- });
561
- }
562
- function settle(execute, requestArgs, options) {
563
- try {
564
- return execute(requestArgs, options);
565
- } catch (error) {
566
- return Promise.reject(error);
567
- }
568
- }
569
- function refuseExtraWithOptionsArguments(endpoint, received, expected) {
570
- if (received <= expected)
571
- return;
572
- const shape = expected === 1 ? "withOptions(options)" : "withOptions(args, options)";
573
- throw new TypeError(`${endpoint.method} ${endpoint.path}: this endpoint declares ${expected === 1 ? "no input" : "an input"}, so its method is ${shape} — it received ${received} arguments. ` + "An extra argument here is dropped, and a request options object in the dropped position " + "sends the request without them: an abort signal placed there never reaches the server.");
574
- }
575
477
  function createHttpExecutor(endpoint, prefix, client, config) {
576
478
  const httpMethod = endpoint.method.toLowerCase();
577
479
  return (requestArgs, options) => {
@@ -674,6 +576,115 @@ function createFetchExecutor(endpoint, prefix, config, contractConfig) {
674
576
  }
675
577
  };
676
578
  }
579
+ async function throwForErrorResponse(res, config, fallbackBody) {
580
+ const body = await res.json().catch(() => fallbackBody);
581
+ config.onError?.(res.status, body);
582
+ const parsed = parseApiErrorBody(body);
583
+ if (parsed) {
584
+ throw new ApiError(parsed.code, res.status, parsed.details, parsed.message, parsed.hint, responseTraceId(res));
585
+ }
586
+ throw new ApiError("HTTP_ERROR", res.status, { body }, undefined, undefined, responseTraceId(res));
587
+ }
588
+
589
+ // src/browser/client.ts
590
+ function contractEndpointMatchers(contract, endpointNames, contractConfig) {
591
+ const selected = endpointNames ? new Set(endpointNames) : null;
592
+ const matchers = [];
593
+ for (const [key, endpoint] of typedEntries(contract.endpoints)) {
594
+ if (selected && !selected.has(key))
595
+ continue;
596
+ if (endpoint.expose && !endpoint.expose.includes("HTTP")) {
597
+ if (selected) {
598
+ throw new Error(`Cannot create an HTTP route matcher for non-HTTP endpoint: ${String(key)}`);
599
+ }
600
+ continue;
601
+ }
602
+ matchers.push(createClientRouteMatcher(endpoint, contract.meta.prefix, contractConfig));
603
+ }
604
+ if (selected && matchers.length !== selected.size) {
605
+ throw new Error("Cannot create an HTTP route matcher for an unknown endpoint");
606
+ }
607
+ return matchers;
608
+ }
609
+ function createClient(contract, configOrClient, contractConfig) {
610
+ const client = {};
611
+ const makeExecutor = isHttpAdapter(configOrClient) ? (endpoint) => createHttpExecutor(endpoint, contract.meta.prefix, configOrClient, contractConfig) : (endpoint) => createFetchExecutor(endpoint, contract.meta.prefix, configOrClient, contractConfig);
612
+ for (const [key, endpoint] of typedEntries(contract.endpoints)) {
613
+ if (endpoint.expose && !endpoint.expose.includes("HTTP"))
614
+ continue;
615
+ setClientMethod(client, key, createEndpointMethod(endpoint, makeExecutor(endpoint), contractConfig));
616
+ }
617
+ return client;
618
+ }
619
+ function createClients(contracts, configOrClient, contractConfig) {
620
+ return mapObject(contracts, (_key, contract) => createClient(contract, configOrClient, contractConfig));
621
+ }
622
+ function buildScopedRegistry(contracts, scopeConfigs, surfaceName, build) {
623
+ const registry = {};
624
+ for (const [namespace, value] of Object.entries(contracts)) {
625
+ const list = Array.isArray(value) ? value : [value];
626
+ const surface = {};
627
+ for (const contract of list) {
628
+ const scope = contract.meta.scope;
629
+ if (!scope) {
630
+ throw new Error(`Contract in ${surfaceName} namespace "${namespace}" has no scope`);
631
+ }
632
+ const scopeConfig = scopeConfigs[scope];
633
+ if (!scopeConfig) {
634
+ throw new Error(`Missing ${surfaceName} config for scope: ${scope}`);
635
+ }
636
+ for (const [methodName, method] of Object.entries(build(contract, scopeConfig))) {
637
+ if (Object.hasOwn(surface, methodName)) {
638
+ throw new Error(`${surfaceName[0]?.toUpperCase()}${surfaceName.slice(1)} namespace "${namespace}" has duplicate method: ${methodName}`);
639
+ }
640
+ surface[methodName] = method;
641
+ }
642
+ }
643
+ registry[namespace] = surface;
644
+ }
645
+ return registry;
646
+ }
647
+ function createScopedClients(contracts, configOrClient, scopeConfigs) {
648
+ return buildScopedRegistry(contracts, scopeConfigs, "client", (contract, config) => createClient(contract, configOrClient, config));
649
+ }
650
+ function isHttpAdapter(value) {
651
+ return typeof value === "object" && "get" in value && typeof value.get === "function";
652
+ }
653
+ function setClientMethod(target, key, method) {
654
+ target[key] = method;
655
+ }
656
+ function createEndpointMethod(endpoint, execute, contractConfig) {
657
+ const hasScopedArguments = (contractConfig?.stripPrefixKeys?.length ?? 0) > 0;
658
+ if (endpointHasArguments(endpoint) || hasScopedArguments) {
659
+ const method2 = (requestArgs) => settle(execute, readClientRequestArgs(requestArgs), undefined);
660
+ return Object.assign(method2, {
661
+ withOptions: (...args) => {
662
+ refuseExtraWithOptionsArguments(endpoint, args.length, 2);
663
+ return settle(execute, readClientRequestArgs(args[0]), readClientRequestOptions(args[1]));
664
+ }
665
+ });
666
+ }
667
+ const method = () => settle(execute, {}, undefined);
668
+ return Object.assign(method, {
669
+ withOptions: (...args) => {
670
+ refuseExtraWithOptionsArguments(endpoint, args.length, 1);
671
+ return settle(execute, {}, readClientRequestOptions(args[0]));
672
+ }
673
+ });
674
+ }
675
+ function settle(execute, requestArgs, options) {
676
+ try {
677
+ return execute(requestArgs, options);
678
+ } catch (error) {
679
+ return Promise.reject(error);
680
+ }
681
+ }
682
+ function refuseExtraWithOptionsArguments(endpoint, received, expected) {
683
+ if (received <= expected)
684
+ return;
685
+ const shape = expected === 1 ? "withOptions(options)" : "withOptions(args, options)";
686
+ throw new TypeError(`${endpoint.method} ${endpoint.path}: this endpoint declares ${expected === 1 ? "no input" : "an input"}, so its method is ${shape} — it received ${received} arguments. ` + "An extra argument here is dropped, and a request options object in the dropped position " + "sends the request without them: an abort signal placed there never reaches the server.");
687
+ }
677
688
  function endpointHasArguments(endpoint) {
678
689
  return Boolean(endpoint.params || endpoint.input || endpoint.multipart);
679
690
  }
@@ -697,15 +708,6 @@ function readClientRequestOptions(value) {
697
708
  function isAbortSignal(value) {
698
709
  return typeof value === "object" && value !== null && "aborted" in value && typeof value.aborted === "boolean" && "addEventListener" in value && typeof value.addEventListener === "function" && "removeEventListener" in value && typeof value.removeEventListener === "function";
699
710
  }
700
- async function throwForErrorResponse(res, config, fallbackBody) {
701
- const body = await res.json().catch(() => fallbackBody);
702
- config.onError?.(res.status, body);
703
- const parsed = parseApiErrorBody(body);
704
- if (parsed) {
705
- throw new ApiError(parsed.code, res.status, parsed.details, parsed.message, parsed.hint, responseTraceId(res));
706
- }
707
- throw new ApiError("HTTP_ERROR", res.status, { body }, undefined, undefined, responseTraceId(res));
708
- }
709
711
  function createUrlBuilder(contract, source, contractConfig) {
710
712
  const builder = {};
711
713
  for (const [key, endpoint] of typedEntries(contract.endpoints)) {