rivetkit 0.0.0-sqlite-profiling-compat.4a9a623 → 0.0.0-sqlite-sync-3x-release.a00b07f

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 (277) hide show
  1. package/dist/browser/client.d.ts +1317 -765
  2. package/dist/browser/client.js +1457 -737
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.d.ts +252 -129
  5. package/dist/browser/inspector/client.js +2042 -228
  6. package/dist/browser/inspector/client.js.map +1 -1
  7. package/dist/tsup/actor/errors.cjs +6 -2
  8. package/dist/tsup/actor/errors.cjs.map +1 -1
  9. package/dist/tsup/actor/errors.d.cts +1 -1
  10. package/dist/tsup/actor/errors.d.ts +1 -1
  11. package/dist/tsup/actor/errors.js +5 -1
  12. package/dist/tsup/agent-os/index.cjs +3 -2367
  13. package/dist/tsup/agent-os/index.cjs.map +1 -1
  14. package/dist/tsup/agent-os/index.d.cts +1 -2277
  15. package/dist/tsup/agent-os/index.d.ts +1 -2277
  16. package/dist/tsup/agent-os/index.js +3 -2367
  17. package/dist/tsup/agent-os/index.js.map +1 -1
  18. package/dist/tsup/{chunk-7QKCGUTJ.cjs → chunk-2MOLY6AM.cjs} +444 -29
  19. package/dist/tsup/chunk-2MOLY6AM.cjs.map +1 -0
  20. package/dist/tsup/{chunk-IICIOTML.js → chunk-3DONDAMG.js} +2 -2
  21. package/dist/tsup/{chunk-XIX5DOZN.js → chunk-6FEYCVZC.js} +196 -20
  22. package/dist/tsup/chunk-6FEYCVZC.js.map +1 -0
  23. package/dist/tsup/chunk-6KXVLIXL.cjs +14 -0
  24. package/dist/tsup/chunk-6KXVLIXL.cjs.map +1 -0
  25. package/dist/tsup/chunk-73RNTXHB.cjs +243 -0
  26. package/dist/tsup/chunk-73RNTXHB.cjs.map +1 -0
  27. package/dist/tsup/{chunk-HXUEHHJF.js → chunk-A2CF6PFH.js} +19 -11
  28. package/dist/tsup/chunk-A2CF6PFH.js.map +1 -0
  29. package/dist/tsup/{chunk-75UE45DE.js → chunk-BRH4PQS5.js} +436 -21
  30. package/dist/tsup/chunk-BRH4PQS5.js.map +1 -0
  31. package/dist/tsup/{chunk-2WMYYG4R.cjs → chunk-BTSDFFDC.cjs} +18 -11
  32. package/dist/tsup/chunk-BTSDFFDC.cjs.map +1 -0
  33. package/dist/tsup/{chunk-RIT7N3TX.js → chunk-D5WUPE47.js} +50 -3
  34. package/dist/tsup/chunk-D5WUPE47.js.map +1 -0
  35. package/dist/tsup/{chunk-4PX3ZKJR.js → chunk-DJUBJQEQ.js} +3 -3
  36. package/dist/tsup/chunk-DJUBJQEQ.js.map +1 -0
  37. package/dist/tsup/{chunk-3MHDOUD7.cjs → chunk-HDVZ6YZG.cjs} +197 -21
  38. package/dist/tsup/chunk-HDVZ6YZG.cjs.map +1 -0
  39. package/dist/tsup/{chunk-JZ7TWV65.js → chunk-JTHHCZCZ.js} +24 -1
  40. package/dist/tsup/chunk-JTHHCZCZ.js.map +1 -0
  41. package/dist/tsup/{chunk-ND567FR5.cjs → chunk-JUHXV3HF.cjs} +3 -3
  42. package/dist/tsup/chunk-JUHXV3HF.cjs.map +1 -0
  43. package/dist/tsup/chunk-JUWMP5O3.js +14 -0
  44. package/dist/tsup/chunk-JUWMP5O3.js.map +1 -0
  45. package/dist/tsup/{chunk-ZA7FLHKH.cjs → chunk-KVFIONKQ.cjs} +25 -2
  46. package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -0
  47. package/dist/tsup/{chunk-4FC7TVS6.cjs → chunk-MGI2VVF6.cjs} +39 -7
  48. package/dist/tsup/chunk-MGI2VVF6.cjs.map +1 -0
  49. package/dist/tsup/{chunk-NHUTYWKU.cjs → chunk-OTVJYZ2L.cjs} +1139 -470
  50. package/dist/tsup/chunk-OTVJYZ2L.cjs.map +1 -0
  51. package/dist/tsup/{chunk-VE2X4KMG.cjs → chunk-RTWH3AX3.cjs} +18 -10
  52. package/dist/tsup/chunk-RTWH3AX3.cjs.map +1 -0
  53. package/dist/tsup/{chunk-QAVN4QNO.cjs → chunk-TM76Z7XT.cjs} +7 -7
  54. package/dist/tsup/chunk-TM76Z7XT.cjs.map +1 -0
  55. package/dist/tsup/{chunk-AGDY6TKH.js → chunk-TRUHDXOU.js} +1023 -354
  56. package/dist/tsup/chunk-TRUHDXOU.js.map +1 -0
  57. package/dist/tsup/{chunk-XFYEVYHG.js → chunk-TSQTI6H6.js} +16 -9
  58. package/dist/tsup/chunk-TSQTI6H6.js.map +1 -0
  59. package/dist/tsup/{chunk-2CICCOBL.cjs → chunk-Z7E2G3JZ.cjs} +52 -5
  60. package/dist/tsup/chunk-Z7E2G3JZ.cjs.map +1 -0
  61. package/dist/tsup/{chunk-ZZ3WBRPD.js → chunk-ZOVJDAOW.js} +38 -6
  62. package/dist/tsup/chunk-ZOVJDAOW.js.map +1 -0
  63. package/dist/tsup/chunk-ZYK4B5WV.js +243 -0
  64. package/dist/tsup/chunk-ZYK4B5WV.js.map +1 -0
  65. package/dist/tsup/client/mod.cjs +8 -9
  66. package/dist/tsup/client/mod.cjs.map +1 -1
  67. package/dist/tsup/client/mod.d.cts +32 -6
  68. package/dist/tsup/client/mod.d.ts +32 -6
  69. package/dist/tsup/client/mod.js +7 -8
  70. package/dist/tsup/common/log.cjs +5 -3
  71. package/dist/tsup/common/log.cjs.map +1 -1
  72. package/dist/tsup/common/log.d.cts +5 -1
  73. package/dist/tsup/common/log.d.ts +5 -1
  74. package/dist/tsup/common/log.js +6 -4
  75. package/dist/tsup/common/websocket.cjs +4 -4
  76. package/dist/tsup/common/websocket.cjs.map +1 -1
  77. package/dist/tsup/common/websocket.js +3 -3
  78. package/dist/tsup/{config-BR1Nn0QQ.d.ts → config-B4erdavw.d.ts} +571 -65
  79. package/dist/tsup/{config-B0LNDrLY.d.ts → config-BfG1qpYz.d.cts} +80 -14
  80. package/dist/tsup/{config-B0LNDrLY.d.cts → config-BfG1qpYz.d.ts} +80 -14
  81. package/dist/tsup/{config-tCvkwzyN.d.cts → config-DK144OAw.d.cts} +571 -65
  82. package/dist/tsup/{context-oc9zhA3x.d.ts → context-Cvnf3BRe.d.cts} +3 -2
  83. package/dist/tsup/{context-D4WDwf9m.d.cts → context-Oxi6YWcG.d.ts} +3 -2
  84. package/dist/tsup/db/drizzle.cjs +127 -67
  85. package/dist/tsup/db/drizzle.cjs.map +1 -1
  86. package/dist/tsup/db/drizzle.d.cts +8 -4
  87. package/dist/tsup/db/drizzle.d.ts +8 -4
  88. package/dist/tsup/db/drizzle.js +127 -67
  89. package/dist/tsup/db/drizzle.js.map +1 -1
  90. package/dist/tsup/db/mod.cjs +6 -126
  91. package/dist/tsup/db/mod.cjs.map +1 -1
  92. package/dist/tsup/db/mod.d.cts +8 -4
  93. package/dist/tsup/db/mod.d.ts +8 -4
  94. package/dist/tsup/db/mod.js +5 -125
  95. package/dist/tsup/db/mod.js.map +1 -1
  96. package/dist/tsup/dynamic/mod.cjs +2 -2
  97. package/dist/tsup/dynamic/mod.cjs.map +1 -1
  98. package/dist/tsup/dynamic/mod.d.cts +6 -4
  99. package/dist/tsup/dynamic/mod.d.ts +6 -4
  100. package/dist/tsup/dynamic/mod.js +1 -1
  101. package/dist/tsup/inspector/mod.cjs +47 -12
  102. package/dist/tsup/inspector/mod.cjs.map +1 -1
  103. package/dist/tsup/inspector/mod.d.cts +26 -136
  104. package/dist/tsup/inspector/mod.d.ts +26 -136
  105. package/dist/tsup/inspector/mod.js +46 -11
  106. package/dist/tsup/inspector/mod.js.map +1 -1
  107. package/dist/tsup/inspector/workflow.cjs +21 -0
  108. package/dist/tsup/inspector/workflow.cjs.map +1 -0
  109. package/dist/tsup/inspector/workflow.d.cts +144 -0
  110. package/dist/tsup/inspector/workflow.d.ts +144 -0
  111. package/dist/tsup/inspector/workflow.js +21 -0
  112. package/dist/tsup/inspector/workflow.js.map +1 -0
  113. package/dist/tsup/inspector-tab/mod.cjs +2 -13
  114. package/dist/tsup/inspector-tab/mod.cjs.map +1 -1
  115. package/dist/tsup/inspector-tab/mod.d.cts +9 -17
  116. package/dist/tsup/inspector-tab/mod.d.ts +9 -17
  117. package/dist/tsup/inspector-tab/mod.js +1 -12
  118. package/dist/tsup/inspector-tab/mod.js.map +1 -1
  119. package/dist/tsup/mod.cjs +2724 -611
  120. package/dist/tsup/mod.cjs.map +1 -1
  121. package/dist/tsup/mod.d.cts +9 -7
  122. package/dist/tsup/mod.d.ts +9 -7
  123. package/dist/tsup/mod.js +2641 -528
  124. package/dist/tsup/mod.js.map +1 -1
  125. package/dist/tsup/test/mod.cjs +19 -17
  126. package/dist/tsup/test/mod.cjs.map +1 -1
  127. package/dist/tsup/test/mod.d.cts +6 -4
  128. package/dist/tsup/test/mod.d.ts +6 -4
  129. package/dist/tsup/test/mod.js +18 -16
  130. package/dist/tsup/test/mod.js.map +1 -1
  131. package/dist/tsup/unstable/migrations.cjs +101 -0
  132. package/dist/tsup/unstable/migrations.cjs.map +1 -0
  133. package/dist/tsup/unstable/migrations.d.cts +29 -0
  134. package/dist/tsup/unstable/migrations.d.ts +29 -0
  135. package/dist/tsup/unstable/migrations.js +101 -0
  136. package/dist/tsup/unstable/migrations.js.map +1 -0
  137. package/dist/tsup/{utils-CqDnC_PS.d.cts → utils-3rsE0JvI.d.cts} +25 -2
  138. package/dist/tsup/{utils-CqDnC_PS.d.ts → utils-3rsE0JvI.d.ts} +25 -2
  139. package/dist/tsup/utils-C1O-SklO.d.ts +162 -0
  140. package/dist/tsup/utils-C6b0aYUM.d.cts +162 -0
  141. package/dist/tsup/utils.cjs +7 -3
  142. package/dist/tsup/utils.cjs.map +1 -1
  143. package/dist/tsup/utils.d.cts +4 -147
  144. package/dist/tsup/utils.d.ts +4 -147
  145. package/dist/tsup/utils.js +6 -2
  146. package/dist/tsup/workflow/mod.cjs +260 -200
  147. package/dist/tsup/workflow/mod.cjs.map +1 -1
  148. package/dist/tsup/workflow/mod.d.cts +8 -6
  149. package/dist/tsup/workflow/mod.d.ts +8 -6
  150. package/dist/tsup/workflow/mod.js +249 -189
  151. package/dist/tsup/workflow/mod.js.map +1 -1
  152. package/package.json +34 -14
  153. package/src/actor/actions.ts +155 -0
  154. package/src/actor/config.ts +403 -43
  155. package/src/actor/definition.ts +26 -7
  156. package/src/actor/errors.ts +87 -5
  157. package/src/actor/keys.ts +86 -0
  158. package/src/actor/mod.ts +15 -1
  159. package/src/actor/tracing.ts +28 -0
  160. package/src/agent-os/index.ts +5 -65
  161. package/src/client/actor-common.ts +8 -15
  162. package/src/client/actor-conn.ts +135 -8
  163. package/src/client/actor-handle.ts +180 -42
  164. package/src/client/actor-query.ts +8 -1
  165. package/src/client/auth.ts +37 -0
  166. package/src/client/client.ts +89 -21
  167. package/src/client/config.ts +27 -2
  168. package/src/client/errors.ts +2 -1
  169. package/src/client/lifecycle-errors.ts +16 -1
  170. package/src/client/mod.ts +9 -0
  171. package/src/client/outbound-telemetry.ts +66 -0
  172. package/src/client/query.ts +2 -0
  173. package/src/client/queue.ts +3 -0
  174. package/src/client/raw-utils.ts +37 -8
  175. package/src/client/resolve-gateway-target.ts +2 -0
  176. package/src/client/retry-budget.ts +78 -0
  177. package/src/client/token-provider.ts +93 -0
  178. package/src/client/utils.ts +16 -2
  179. package/src/common/actor-router-consts.ts +5 -0
  180. package/src/common/actor-telemetry-context.ts +19 -0
  181. package/src/common/bare/generated/actor-runtime-socket-protocol/v1.ts +848 -0
  182. package/src/common/bare/generated/inspector/v5.ts +1016 -0
  183. package/src/common/bare/generated/inspector/v6.ts +1367 -0
  184. package/src/common/bare/transport/v1.ts +36 -0
  185. package/src/common/database/config.ts +108 -15
  186. package/src/common/database/mod.ts +247 -76
  187. package/src/common/database/native-database.ts +433 -23
  188. package/src/common/database/shared.ts +24 -0
  189. package/src/common/encoding.ts +31 -21
  190. package/src/common/fetch-like.ts +63 -0
  191. package/src/common/inspector-transport.ts +12 -2
  192. package/src/common/log.ts +14 -8
  193. package/src/common/otel-context.ts +99 -0
  194. package/src/common/router.ts +1 -1
  195. package/src/common/utils.ts +7 -19
  196. package/src/db/drizzle.ts +182 -80
  197. package/src/db/mod.ts +2 -0
  198. package/src/dynamic/isolate-runtime.ts +0 -2
  199. package/src/engine-api/actors.ts +3 -3
  200. package/src/engine-client/actor-http-client.ts +29 -20
  201. package/src/engine-client/actor-websocket-client.ts +6 -3
  202. package/src/engine-client/api-endpoints.ts +72 -14
  203. package/src/engine-client/driver.ts +8 -15
  204. package/src/engine-client/mod.ts +248 -112
  205. package/src/inspector/client.browser.ts +134 -16
  206. package/src/inspector/mod.ts +1 -1
  207. package/src/inspector/workflow.ts +61 -0
  208. package/src/inspector-tab/mod.ts +1 -15
  209. package/src/registry/config/envoy.ts +2 -18
  210. package/src/registry/config/index.ts +53 -61
  211. package/src/registry/index.ts +311 -21
  212. package/src/registry/napi-runtime.ts +583 -39
  213. package/src/registry/native-http.ts +225 -0
  214. package/src/registry/native.ts +1365 -414
  215. package/src/registry/run-handler-coordinator.ts +219 -0
  216. package/src/registry/runtime.ts +372 -7
  217. package/src/registry/wasm-runtime.ts +490 -21
  218. package/src/registry/write-through-proxy.ts +101 -0
  219. package/src/test/mod.ts +1 -19
  220. package/src/test/ready.ts +22 -0
  221. package/src/unstable/migrations.ts +141 -0
  222. package/src/utils/env-vars.ts +15 -6
  223. package/src/utils/node.ts +44 -28
  224. package/src/utils.ts +3 -0
  225. package/src/workflow/context.ts +9 -27
  226. package/src/workflow/driver.ts +253 -116
  227. package/src/workflow/inspector.ts +23 -24
  228. package/src/workflow/mod.ts +50 -72
  229. package/dist/tsup/chunk-2CICCOBL.cjs.map +0 -1
  230. package/dist/tsup/chunk-2WMYYG4R.cjs.map +0 -1
  231. package/dist/tsup/chunk-3MHDOUD7.cjs.map +0 -1
  232. package/dist/tsup/chunk-4FC7TVS6.cjs.map +0 -1
  233. package/dist/tsup/chunk-4PX3ZKJR.js.map +0 -1
  234. package/dist/tsup/chunk-75UE45DE.js.map +0 -1
  235. package/dist/tsup/chunk-7QKCGUTJ.cjs.map +0 -1
  236. package/dist/tsup/chunk-AGDY6TKH.js.map +0 -1
  237. package/dist/tsup/chunk-HXUEHHJF.js.map +0 -1
  238. package/dist/tsup/chunk-JZ7TWV65.js.map +0 -1
  239. package/dist/tsup/chunk-ND567FR5.cjs.map +0 -1
  240. package/dist/tsup/chunk-NHUTYWKU.cjs.map +0 -1
  241. package/dist/tsup/chunk-QAVN4QNO.cjs.map +0 -1
  242. package/dist/tsup/chunk-RIT7N3TX.js.map +0 -1
  243. package/dist/tsup/chunk-RV5MAFDT.cjs +0 -382
  244. package/dist/tsup/chunk-RV5MAFDT.cjs.map +0 -1
  245. package/dist/tsup/chunk-VE2X4KMG.cjs.map +0 -1
  246. package/dist/tsup/chunk-XFYEVYHG.js.map +0 -1
  247. package/dist/tsup/chunk-XHGDS3DZ.js +0 -382
  248. package/dist/tsup/chunk-XHGDS3DZ.js.map +0 -1
  249. package/dist/tsup/chunk-XIX5DOZN.js.map +0 -1
  250. package/dist/tsup/chunk-ZA7FLHKH.cjs.map +0 -1
  251. package/dist/tsup/chunk-ZZ3WBRPD.js.map +0 -1
  252. package/src/actor/driver.ts +0 -141
  253. package/src/actor/instance/mod.ts +0 -2484
  254. package/src/actor/keys.test.ts +0 -275
  255. package/src/actor/utils.test.ts +0 -48
  256. package/src/agent-os/actor/cron.ts +0 -84
  257. package/src/agent-os/actor/db.ts +0 -54
  258. package/src/agent-os/actor/filesystem.ts +0 -131
  259. package/src/agent-os/actor/index.ts +0 -285
  260. package/src/agent-os/actor/network.ts +0 -58
  261. package/src/agent-os/actor/preview.ts +0 -190
  262. package/src/agent-os/actor/process.ts +0 -177
  263. package/src/agent-os/actor/session.ts +0 -518
  264. package/src/agent-os/actor/shell.ts +0 -60
  265. package/src/agent-os/config.ts +0 -79
  266. package/src/agent-os/fs/database-vfs.ts +0 -624
  267. package/src/agent-os/types.ts +0 -148
  268. package/src/client/test.ts +0 -44
  269. package/src/common/database/mod.test.ts +0 -137
  270. package/src/common/database/native-database.test.ts +0 -211
  271. package/src/common/inline-websocket-adapter.test.ts +0 -51
  272. package/src/drivers/engine/actor-driver.ts +0 -2473
  273. package/src/registry/process-metrics.ts +0 -250
  274. package/src/registry/runtime.test.ts +0 -50
  275. package/src/utils/endpoint-parser.test.ts +0 -206
  276. package/src/utils.test.ts +0 -34
  277. /package/dist/tsup/{chunk-IICIOTML.js.map → chunk-3DONDAMG.js.map} +0 -0
@@ -0,0 +1,162 @@
1
+ import { Context, Handler } from 'hono';
2
+ import './utils-3rsE0JvI.js';
3
+ import { z } from 'zod/v4';
4
+
5
+ declare const EncodingSchema: z.ZodEnum<{
6
+ json: "json";
7
+ cbor: "cbor";
8
+ bare: "bare";
9
+ }>;
10
+ /**
11
+ * Encoding used to communicate between the client & actor.
12
+ */
13
+ type Encoding = z.infer<typeof EncodingSchema>;
14
+ /** Stringifies with compat for values that BARE & CBOR supports. */
15
+ declare function jsonStringifyCompat(input: any, space?: string | number): string;
16
+ /** Parses JSON with compat for values that BARE & CBOR supports. */
17
+ declare function jsonParseCompat(input: string): any;
18
+
19
+ /**
20
+ * Joins multiple abort signals into one.
21
+ *
22
+ * The returned signal aborts when the first input signal aborts.
23
+ * Uses `AbortSignal.any(...)` when available, with a runtime fallback.
24
+ *
25
+ * @experimental
26
+ */
27
+ declare function joinSignals(...signals: Array<AbortSignal | undefined | null>): AbortSignal;
28
+ /**
29
+ * Returns a promise that resolves after the given number of milliseconds.
30
+ *
31
+ * @experimental
32
+ */
33
+ declare function sleep(ms: number): Promise<void>;
34
+ /**
35
+ * Creates a fixed-rate interval tick function that can be awaited in a loop.
36
+ *
37
+ * @example
38
+ * const tick = interval(100);
39
+ * while (!c.aborted) {
40
+ * await tick();
41
+ * if (c.aborted) break;
42
+ * // ... game logic
43
+ * }
44
+ *
45
+ * @experimental
46
+ */
47
+ declare function interval(ms: number): () => Promise<void>;
48
+ declare const VERSION: string;
49
+ /**
50
+ * Builds the HTTP user agent used by this library.
51
+ *
52
+ * @experimental
53
+ */
54
+ declare function httpUserAgent(): string;
55
+ type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
56
+ type GetUpgradeWebSocket = () => UpgradeWebSocket;
57
+ /**
58
+ * Reads an environment variable from Deno or Node runtimes.
59
+ *
60
+ * @experimental
61
+ */
62
+ declare function getEnvUniversal(key: string): string | undefined;
63
+ /**
64
+ * Traces a debug value and returns it.
65
+ *
66
+ * @experimental
67
+ */
68
+ declare function dbg<T>(x: T): T;
69
+ /**
70
+ * Converts various ArrayBuffer-like types to Uint8Array.
71
+ * Handles ArrayBuffer, ArrayBufferView (including typed arrays), and passes through existing Uint8Array.
72
+ *
73
+ * @param data - The ArrayBuffer or ArrayBufferView to convert
74
+ * @returns A Uint8Array view of the data
75
+ *
76
+ * @experimental
77
+ */
78
+ declare function toUint8Array(data: ArrayBuffer | ArrayBufferView): Uint8Array;
79
+ type LongTimeoutHandle = {
80
+ abort: () => void;
81
+ };
82
+ /**
83
+ * Polyfill for Promise.withResolvers().
84
+ *
85
+ * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
86
+ *
87
+ * @experimental
88
+ */
89
+ declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
90
+ promise: Promise<T>;
91
+ resolve: (value: T | PromiseLike<T>) => void;
92
+ reject: (reason?: any) => void;
93
+ };
94
+ /**
95
+ * Sets a timeout that supports delays larger than the JavaScript timer limit.
96
+ *
97
+ * @experimental
98
+ */
99
+ declare function setLongTimeout(listener: () => void, after: number): LongTimeoutHandle;
100
+ /**
101
+ * A tiny utility that coalesces/enqueues async operations so only the latest
102
+ * queued task runs per cycle, while callers receive a promise that resolves
103
+ * when the task for the cycle they joined has completed.
104
+ */
105
+ declare class SinglePromiseQueue {
106
+ #private;
107
+ /** The currently running promise of #drainLoop. Do not await this, instead await `pending` to await the current cycle. */
108
+ runningDrainLoop?: Promise<void>;
109
+ /** Queue the next operation and return a promise that resolves when it flushes. */
110
+ enqueue(op: () => Promise<void>): Promise<void>;
111
+ }
112
+ /**
113
+ * Converts a Buffer or Uint8Array into an ArrayBuffer view.
114
+ *
115
+ * @experimental
116
+ */
117
+ declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
118
+ /**
119
+ * Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.
120
+ *
121
+ * @example
122
+ * combineUrlPath("http://localhost:8787/rivet", "/actors/action")
123
+ * // Returns: "http://localhost:8787/rivet/actors/action"
124
+ *
125
+ * @example
126
+ * combineUrlPath("http://localhost:8787/rivet", "/actors?type=foo", { namespace: "test" })
127
+ * // Returns: "http://localhost:8787/rivet/actors?type=foo&namespace=test"
128
+ *
129
+ * @param endpoint The base URL endpoint that may contain a path component
130
+ * @param path The path to append to the endpoint (may include query parameters)
131
+ * @param queryParams Optional additional query parameters to append
132
+ * @returns The properly combined URL string
133
+ *
134
+ * @experimental
135
+ */
136
+ declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
137
+ /**
138
+ * Compares two ArrayBuffer values by byte content.
139
+ *
140
+ * @experimental
141
+ */
142
+ declare function arrayBuffersEqual(buf1: ArrayBuffer, buf2: ArrayBuffer): boolean;
143
+ declare const EXTRA_ERROR_LOG: {
144
+ issues: string;
145
+ support: string;
146
+ version: string;
147
+ };
148
+ type Runtime = "deno" | "bun" | "node";
149
+ /**
150
+ * Detects the current JavaScript runtime from the user agent.
151
+ *
152
+ * @experimental
153
+ */
154
+ declare function detectRuntime(): Runtime;
155
+ type DeepReadonly<T> = {
156
+ readonly [K in keyof T]: T[K] extends object ? DeepReadonly<T[K]> : T[K];
157
+ };
158
+ type DeepMutable<T> = {
159
+ -readonly [K in keyof T]: T[K] extends object ? DeepMutable<T[K]> : T[K];
160
+ };
161
+
162
+ export { type DeepMutable as D, type Encoding as E, type GetUpgradeWebSocket as G, type LongTimeoutHandle as L, type Runtime as R, SinglePromiseQueue as S, type UpgradeWebSocket as U, VERSION as V, type DeepReadonly as a, EXTRA_ERROR_LOG as b, arrayBuffersEqual as c, bufferToArrayBuffer as d, combineUrlPath as e, dbg as f, detectRuntime as g, getEnvUniversal as h, httpUserAgent as i, interval as j, joinSignals as k, jsonParseCompat as l, jsonStringifyCompat as m, sleep as n, promiseWithResolvers as p, setLongTimeout as s, toUint8Array as t };
@@ -0,0 +1,162 @@
1
+ import { Context, Handler } from 'hono';
2
+ import './utils-3rsE0JvI.cjs';
3
+ import { z } from 'zod/v4';
4
+
5
+ declare const EncodingSchema: z.ZodEnum<{
6
+ json: "json";
7
+ cbor: "cbor";
8
+ bare: "bare";
9
+ }>;
10
+ /**
11
+ * Encoding used to communicate between the client & actor.
12
+ */
13
+ type Encoding = z.infer<typeof EncodingSchema>;
14
+ /** Stringifies with compat for values that BARE & CBOR supports. */
15
+ declare function jsonStringifyCompat(input: any, space?: string | number): string;
16
+ /** Parses JSON with compat for values that BARE & CBOR supports. */
17
+ declare function jsonParseCompat(input: string): any;
18
+
19
+ /**
20
+ * Joins multiple abort signals into one.
21
+ *
22
+ * The returned signal aborts when the first input signal aborts.
23
+ * Uses `AbortSignal.any(...)` when available, with a runtime fallback.
24
+ *
25
+ * @experimental
26
+ */
27
+ declare function joinSignals(...signals: Array<AbortSignal | undefined | null>): AbortSignal;
28
+ /**
29
+ * Returns a promise that resolves after the given number of milliseconds.
30
+ *
31
+ * @experimental
32
+ */
33
+ declare function sleep(ms: number): Promise<void>;
34
+ /**
35
+ * Creates a fixed-rate interval tick function that can be awaited in a loop.
36
+ *
37
+ * @example
38
+ * const tick = interval(100);
39
+ * while (!c.aborted) {
40
+ * await tick();
41
+ * if (c.aborted) break;
42
+ * // ... game logic
43
+ * }
44
+ *
45
+ * @experimental
46
+ */
47
+ declare function interval(ms: number): () => Promise<void>;
48
+ declare const VERSION: string;
49
+ /**
50
+ * Builds the HTTP user agent used by this library.
51
+ *
52
+ * @experimental
53
+ */
54
+ declare function httpUserAgent(): string;
55
+ type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
56
+ type GetUpgradeWebSocket = () => UpgradeWebSocket;
57
+ /**
58
+ * Reads an environment variable from Deno or Node runtimes.
59
+ *
60
+ * @experimental
61
+ */
62
+ declare function getEnvUniversal(key: string): string | undefined;
63
+ /**
64
+ * Traces a debug value and returns it.
65
+ *
66
+ * @experimental
67
+ */
68
+ declare function dbg<T>(x: T): T;
69
+ /**
70
+ * Converts various ArrayBuffer-like types to Uint8Array.
71
+ * Handles ArrayBuffer, ArrayBufferView (including typed arrays), and passes through existing Uint8Array.
72
+ *
73
+ * @param data - The ArrayBuffer or ArrayBufferView to convert
74
+ * @returns A Uint8Array view of the data
75
+ *
76
+ * @experimental
77
+ */
78
+ declare function toUint8Array(data: ArrayBuffer | ArrayBufferView): Uint8Array;
79
+ type LongTimeoutHandle = {
80
+ abort: () => void;
81
+ };
82
+ /**
83
+ * Polyfill for Promise.withResolvers().
84
+ *
85
+ * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
86
+ *
87
+ * @experimental
88
+ */
89
+ declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
90
+ promise: Promise<T>;
91
+ resolve: (value: T | PromiseLike<T>) => void;
92
+ reject: (reason?: any) => void;
93
+ };
94
+ /**
95
+ * Sets a timeout that supports delays larger than the JavaScript timer limit.
96
+ *
97
+ * @experimental
98
+ */
99
+ declare function setLongTimeout(listener: () => void, after: number): LongTimeoutHandle;
100
+ /**
101
+ * A tiny utility that coalesces/enqueues async operations so only the latest
102
+ * queued task runs per cycle, while callers receive a promise that resolves
103
+ * when the task for the cycle they joined has completed.
104
+ */
105
+ declare class SinglePromiseQueue {
106
+ #private;
107
+ /** The currently running promise of #drainLoop. Do not await this, instead await `pending` to await the current cycle. */
108
+ runningDrainLoop?: Promise<void>;
109
+ /** Queue the next operation and return a promise that resolves when it flushes. */
110
+ enqueue(op: () => Promise<void>): Promise<void>;
111
+ }
112
+ /**
113
+ * Converts a Buffer or Uint8Array into an ArrayBuffer view.
114
+ *
115
+ * @experimental
116
+ */
117
+ declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
118
+ /**
119
+ * Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.
120
+ *
121
+ * @example
122
+ * combineUrlPath("http://localhost:8787/rivet", "/actors/action")
123
+ * // Returns: "http://localhost:8787/rivet/actors/action"
124
+ *
125
+ * @example
126
+ * combineUrlPath("http://localhost:8787/rivet", "/actors?type=foo", { namespace: "test" })
127
+ * // Returns: "http://localhost:8787/rivet/actors?type=foo&namespace=test"
128
+ *
129
+ * @param endpoint The base URL endpoint that may contain a path component
130
+ * @param path The path to append to the endpoint (may include query parameters)
131
+ * @param queryParams Optional additional query parameters to append
132
+ * @returns The properly combined URL string
133
+ *
134
+ * @experimental
135
+ */
136
+ declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
137
+ /**
138
+ * Compares two ArrayBuffer values by byte content.
139
+ *
140
+ * @experimental
141
+ */
142
+ declare function arrayBuffersEqual(buf1: ArrayBuffer, buf2: ArrayBuffer): boolean;
143
+ declare const EXTRA_ERROR_LOG: {
144
+ issues: string;
145
+ support: string;
146
+ version: string;
147
+ };
148
+ type Runtime = "deno" | "bun" | "node";
149
+ /**
150
+ * Detects the current JavaScript runtime from the user agent.
151
+ *
152
+ * @experimental
153
+ */
154
+ declare function detectRuntime(): Runtime;
155
+ type DeepReadonly<T> = {
156
+ readonly [K in keyof T]: T[K] extends object ? DeepReadonly<T[K]> : T[K];
157
+ };
158
+ type DeepMutable<T> = {
159
+ -readonly [K in keyof T]: T[K] extends object ? DeepMutable<T[K]> : T[K];
160
+ };
161
+
162
+ export { type DeepMutable as D, type Encoding as E, type GetUpgradeWebSocket as G, type LongTimeoutHandle as L, type Runtime as R, SinglePromiseQueue as S, type UpgradeWebSocket as U, VERSION as V, type DeepReadonly as a, EXTRA_ERROR_LOG as b, arrayBuffersEqual as c, bufferToArrayBuffer as d, combineUrlPath as e, dbg as f, detectRuntime as g, getEnvUniversal as h, httpUserAgent as i, interval as j, joinSignals as k, jsonParseCompat as l, jsonStringifyCompat as m, sleep as n, promiseWithResolvers as p, setLongTimeout as s, toUint8Array as t };
@@ -17,10 +17,10 @@
17
17
 
18
18
 
19
19
 
20
- var _chunk7QKCGUTJcjs = require('./chunk-7QKCGUTJ.cjs');
21
- require('./chunk-4FC7TVS6.cjs');
22
20
 
23
21
 
22
+ var _chunk2MOLY6AMcjs = require('./chunk-2MOLY6AM.cjs');
23
+ require('./chunk-MGI2VVF6.cjs');
24
24
 
25
25
 
26
26
 
@@ -38,5 +38,9 @@ require('./chunk-4FC7TVS6.cjs');
38
38
 
39
39
 
40
40
 
41
- exports.EXTRA_ERROR_LOG = _chunk7QKCGUTJcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunk7QKCGUTJcjs.SinglePromiseQueue; exports.VERSION = _chunk7QKCGUTJcjs.VERSION; exports.arrayBuffersEqual = _chunk7QKCGUTJcjs.arrayBuffersEqual; exports.assertUnreachable = _chunk7QKCGUTJcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunk7QKCGUTJcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunk7QKCGUTJcjs.combineUrlPath; exports.dbg = _chunk7QKCGUTJcjs.dbg; exports.detectRuntime = _chunk7QKCGUTJcjs.detectRuntime; exports.getEnvUniversal = _chunk7QKCGUTJcjs.getEnvUniversal; exports.httpUserAgent = _chunk7QKCGUTJcjs.httpUserAgent; exports.interval = _chunk7QKCGUTJcjs.interval; exports.joinSignals = _chunk7QKCGUTJcjs.joinSignals; exports.promiseWithResolvers = _chunk7QKCGUTJcjs.promiseWithResolvers; exports.setLongTimeout = _chunk7QKCGUTJcjs.setLongTimeout; exports.sleep = _chunk7QKCGUTJcjs.sleep; exports.stringifyError = _chunk7QKCGUTJcjs.stringifyError; exports.toUint8Array = _chunk7QKCGUTJcjs.toUint8Array;
41
+
42
+
43
+
44
+
45
+ exports.EXTRA_ERROR_LOG = _chunk2MOLY6AMcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunk2MOLY6AMcjs.SinglePromiseQueue; exports.VERSION = _chunk2MOLY6AMcjs.VERSION; exports.arrayBuffersEqual = _chunk2MOLY6AMcjs.arrayBuffersEqual; exports.assertUnreachable = _chunk2MOLY6AMcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunk2MOLY6AMcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunk2MOLY6AMcjs.combineUrlPath; exports.dbg = _chunk2MOLY6AMcjs.dbg; exports.detectRuntime = _chunk2MOLY6AMcjs.detectRuntime; exports.getEnvUniversal = _chunk2MOLY6AMcjs.getEnvUniversal; exports.httpUserAgent = _chunk2MOLY6AMcjs.httpUserAgent; exports.interval = _chunk2MOLY6AMcjs.interval; exports.joinSignals = _chunk2MOLY6AMcjs.joinSignals; exports.jsonParseCompat = _chunk2MOLY6AMcjs.jsonParseCompat; exports.jsonStringifyCompat = _chunk2MOLY6AMcjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunk2MOLY6AMcjs.promiseWithResolvers; exports.setLongTimeout = _chunk2MOLY6AMcjs.setLongTimeout; exports.sleep = _chunk2MOLY6AMcjs.sleep; exports.stringifyError = _chunk2MOLY6AMcjs.stringifyError; exports.toUint8Array = _chunk2MOLY6AMcjs.toUint8Array;
42
46
  //# sourceMappingURL=utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/actors/actors/rivetkit-typescript/packages/rivetkit/dist/tsup/utils.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,mgCAAC","file":"/home/runner/work/actors/actors/rivetkit-typescript/packages/rivetkit/dist/tsup/utils.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/utils.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,qoCAAC","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/utils.cjs"}
@@ -1,148 +1,5 @@
1
- import { Context, Handler } from 'hono';
2
- export { d as assertUnreachable, s as stringifyError } from './utils-CqDnC_PS.cjs';
1
+ import 'hono';
2
+ export { d as assertUnreachable, s as stringifyError } from './utils-3rsE0JvI.cjs';
3
+ export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-C6b0aYUM.cjs';
3
4
  import 'hono/utils/http-status';
4
-
5
- /**
6
- * Joins multiple abort signals into one.
7
- *
8
- * The returned signal aborts when the first input signal aborts.
9
- * Uses `AbortSignal.any(...)` when available, with a runtime fallback.
10
- *
11
- * @experimental
12
- */
13
- declare function joinSignals(...signals: Array<AbortSignal | undefined | null>): AbortSignal;
14
- /**
15
- * Returns a promise that resolves after the given number of milliseconds.
16
- *
17
- * @experimental
18
- */
19
- declare function sleep(ms: number): Promise<void>;
20
- /**
21
- * Creates a fixed-rate interval tick function that can be awaited in a loop.
22
- *
23
- * @example
24
- * const tick = interval(100);
25
- * while (!c.aborted) {
26
- * await tick();
27
- * if (c.aborted) break;
28
- * // ... game logic
29
- * }
30
- *
31
- * @experimental
32
- */
33
- declare function interval(ms: number): () => Promise<void>;
34
- declare const VERSION: string;
35
- /**
36
- * Builds the HTTP user agent used by this library.
37
- *
38
- * @experimental
39
- */
40
- declare function httpUserAgent(): string;
41
- type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
42
- type GetUpgradeWebSocket = () => UpgradeWebSocket;
43
- /**
44
- * Reads an environment variable from Deno or Node runtimes.
45
- *
46
- * @experimental
47
- */
48
- declare function getEnvUniversal(key: string): string | undefined;
49
- /**
50
- * Traces a debug value and returns it.
51
- *
52
- * @experimental
53
- */
54
- declare function dbg<T>(x: T): T;
55
- /**
56
- * Converts various ArrayBuffer-like types to Uint8Array.
57
- * Handles ArrayBuffer, ArrayBufferView (including typed arrays), and passes through existing Uint8Array.
58
- *
59
- * @param data - The ArrayBuffer or ArrayBufferView to convert
60
- * @returns A Uint8Array view of the data
61
- *
62
- * @experimental
63
- */
64
- declare function toUint8Array(data: ArrayBuffer | ArrayBufferView): Uint8Array;
65
- type LongTimeoutHandle = {
66
- abort: () => void;
67
- };
68
- /**
69
- * Polyfill for Promise.withResolvers().
70
- *
71
- * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
72
- *
73
- * @experimental
74
- */
75
- declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
76
- promise: Promise<T>;
77
- resolve: (value: T | PromiseLike<T>) => void;
78
- reject: (reason?: any) => void;
79
- };
80
- /**
81
- * Sets a timeout that supports delays larger than the JavaScript timer limit.
82
- *
83
- * @experimental
84
- */
85
- declare function setLongTimeout(listener: () => void, after: number): LongTimeoutHandle;
86
- /**
87
- * A tiny utility that coalesces/enqueues async operations so only the latest
88
- * queued task runs per cycle, while callers receive a promise that resolves
89
- * when the task for the cycle they joined has completed.
90
- */
91
- declare class SinglePromiseQueue {
92
- #private;
93
- /** The currently running promise of #drainLoop. Do not await this, instead await `pending` to await the current cycle. */
94
- runningDrainLoop?: Promise<void>;
95
- /** Queue the next operation and return a promise that resolves when it flushes. */
96
- enqueue(op: () => Promise<void>): Promise<void>;
97
- }
98
- /**
99
- * Converts a Buffer or Uint8Array into an ArrayBuffer view.
100
- *
101
- * @experimental
102
- */
103
- declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
104
- /**
105
- * Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.
106
- *
107
- * @example
108
- * combineUrlPath("http://localhost:8787/rivet", "/actors/action")
109
- * // Returns: "http://localhost:8787/rivet/actors/action"
110
- *
111
- * @example
112
- * combineUrlPath("http://localhost:8787/rivet", "/actors?type=foo", { namespace: "test" })
113
- * // Returns: "http://localhost:8787/rivet/actors?type=foo&namespace=test"
114
- *
115
- * @param endpoint The base URL endpoint that may contain a path component
116
- * @param path The path to append to the endpoint (may include query parameters)
117
- * @param queryParams Optional additional query parameters to append
118
- * @returns The properly combined URL string
119
- *
120
- * @experimental
121
- */
122
- declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
123
- /**
124
- * Compares two ArrayBuffer values by byte content.
125
- *
126
- * @experimental
127
- */
128
- declare function arrayBuffersEqual(buf1: ArrayBuffer, buf2: ArrayBuffer): boolean;
129
- declare const EXTRA_ERROR_LOG: {
130
- issues: string;
131
- support: string;
132
- version: string;
133
- };
134
- type Runtime = "deno" | "bun" | "node";
135
- /**
136
- * Detects the current JavaScript runtime from the user agent.
137
- *
138
- * @experimental
139
- */
140
- declare function detectRuntime(): Runtime;
141
- type DeepReadonly<T> = {
142
- readonly [K in keyof T]: T[K] extends object ? DeepReadonly<T[K]> : T[K];
143
- };
144
- type DeepMutable<T> = {
145
- -readonly [K in keyof T]: T[K] extends object ? DeepMutable<T[K]> : T[K];
146
- };
147
-
148
- export { type DeepMutable, type DeepReadonly, EXTRA_ERROR_LOG, type GetUpgradeWebSocket, type LongTimeoutHandle, type Runtime, SinglePromiseQueue, type UpgradeWebSocket, VERSION, arrayBuffersEqual, bufferToArrayBuffer, combineUrlPath, dbg, detectRuntime, getEnvUniversal, httpUserAgent, interval, joinSignals, promiseWithResolvers, setLongTimeout, sleep, toUint8Array };
5
+ import 'zod/v4';
@@ -1,148 +1,5 @@
1
- import { Context, Handler } from 'hono';
2
- export { d as assertUnreachable, s as stringifyError } from './utils-CqDnC_PS.js';
1
+ import 'hono';
2
+ export { d as assertUnreachable, s as stringifyError } from './utils-3rsE0JvI.js';
3
+ export { D as DeepMutable, a as DeepReadonly, b as EXTRA_ERROR_LOG, G as GetUpgradeWebSocket, L as LongTimeoutHandle, R as Runtime, S as SinglePromiseQueue, U as UpgradeWebSocket, V as VERSION, c as arrayBuffersEqual, d as bufferToArrayBuffer, e as combineUrlPath, f as dbg, g as detectRuntime, h as getEnvUniversal, i as httpUserAgent, j as interval, k as joinSignals, l as jsonParseCompat, m as jsonStringifyCompat, p as promiseWithResolvers, s as setLongTimeout, n as sleep, t as toUint8Array } from './utils-C1O-SklO.js';
3
4
  import 'hono/utils/http-status';
4
-
5
- /**
6
- * Joins multiple abort signals into one.
7
- *
8
- * The returned signal aborts when the first input signal aborts.
9
- * Uses `AbortSignal.any(...)` when available, with a runtime fallback.
10
- *
11
- * @experimental
12
- */
13
- declare function joinSignals(...signals: Array<AbortSignal | undefined | null>): AbortSignal;
14
- /**
15
- * Returns a promise that resolves after the given number of milliseconds.
16
- *
17
- * @experimental
18
- */
19
- declare function sleep(ms: number): Promise<void>;
20
- /**
21
- * Creates a fixed-rate interval tick function that can be awaited in a loop.
22
- *
23
- * @example
24
- * const tick = interval(100);
25
- * while (!c.aborted) {
26
- * await tick();
27
- * if (c.aborted) break;
28
- * // ... game logic
29
- * }
30
- *
31
- * @experimental
32
- */
33
- declare function interval(ms: number): () => Promise<void>;
34
- declare const VERSION: string;
35
- /**
36
- * Builds the HTTP user agent used by this library.
37
- *
38
- * @experimental
39
- */
40
- declare function httpUserAgent(): string;
41
- type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
42
- type GetUpgradeWebSocket = () => UpgradeWebSocket;
43
- /**
44
- * Reads an environment variable from Deno or Node runtimes.
45
- *
46
- * @experimental
47
- */
48
- declare function getEnvUniversal(key: string): string | undefined;
49
- /**
50
- * Traces a debug value and returns it.
51
- *
52
- * @experimental
53
- */
54
- declare function dbg<T>(x: T): T;
55
- /**
56
- * Converts various ArrayBuffer-like types to Uint8Array.
57
- * Handles ArrayBuffer, ArrayBufferView (including typed arrays), and passes through existing Uint8Array.
58
- *
59
- * @param data - The ArrayBuffer or ArrayBufferView to convert
60
- * @returns A Uint8Array view of the data
61
- *
62
- * @experimental
63
- */
64
- declare function toUint8Array(data: ArrayBuffer | ArrayBufferView): Uint8Array;
65
- type LongTimeoutHandle = {
66
- abort: () => void;
67
- };
68
- /**
69
- * Polyfill for Promise.withResolvers().
70
- *
71
- * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.
72
- *
73
- * @experimental
74
- */
75
- declare function promiseWithResolvers<T>(onReject: (reason?: any) => void): {
76
- promise: Promise<T>;
77
- resolve: (value: T | PromiseLike<T>) => void;
78
- reject: (reason?: any) => void;
79
- };
80
- /**
81
- * Sets a timeout that supports delays larger than the JavaScript timer limit.
82
- *
83
- * @experimental
84
- */
85
- declare function setLongTimeout(listener: () => void, after: number): LongTimeoutHandle;
86
- /**
87
- * A tiny utility that coalesces/enqueues async operations so only the latest
88
- * queued task runs per cycle, while callers receive a promise that resolves
89
- * when the task for the cycle they joined has completed.
90
- */
91
- declare class SinglePromiseQueue {
92
- #private;
93
- /** The currently running promise of #drainLoop. Do not await this, instead await `pending` to await the current cycle. */
94
- runningDrainLoop?: Promise<void>;
95
- /** Queue the next operation and return a promise that resolves when it flushes. */
96
- enqueue(op: () => Promise<void>): Promise<void>;
97
- }
98
- /**
99
- * Converts a Buffer or Uint8Array into an ArrayBuffer view.
100
- *
101
- * @experimental
102
- */
103
- declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
104
- /**
105
- * Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.
106
- *
107
- * @example
108
- * combineUrlPath("http://localhost:8787/rivet", "/actors/action")
109
- * // Returns: "http://localhost:8787/rivet/actors/action"
110
- *
111
- * @example
112
- * combineUrlPath("http://localhost:8787/rivet", "/actors?type=foo", { namespace: "test" })
113
- * // Returns: "http://localhost:8787/rivet/actors?type=foo&namespace=test"
114
- *
115
- * @param endpoint The base URL endpoint that may contain a path component
116
- * @param path The path to append to the endpoint (may include query parameters)
117
- * @param queryParams Optional additional query parameters to append
118
- * @returns The properly combined URL string
119
- *
120
- * @experimental
121
- */
122
- declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
123
- /**
124
- * Compares two ArrayBuffer values by byte content.
125
- *
126
- * @experimental
127
- */
128
- declare function arrayBuffersEqual(buf1: ArrayBuffer, buf2: ArrayBuffer): boolean;
129
- declare const EXTRA_ERROR_LOG: {
130
- issues: string;
131
- support: string;
132
- version: string;
133
- };
134
- type Runtime = "deno" | "bun" | "node";
135
- /**
136
- * Detects the current JavaScript runtime from the user agent.
137
- *
138
- * @experimental
139
- */
140
- declare function detectRuntime(): Runtime;
141
- type DeepReadonly<T> = {
142
- readonly [K in keyof T]: T[K] extends object ? DeepReadonly<T[K]> : T[K];
143
- };
144
- type DeepMutable<T> = {
145
- -readonly [K in keyof T]: T[K] extends object ? DeepMutable<T[K]> : T[K];
146
- };
147
-
148
- export { type DeepMutable, type DeepReadonly, EXTRA_ERROR_LOG, type GetUpgradeWebSocket, type LongTimeoutHandle, type Runtime, SinglePromiseQueue, type UpgradeWebSocket, VERSION, arrayBuffersEqual, bufferToArrayBuffer, combineUrlPath, dbg, detectRuntime, getEnvUniversal, httpUserAgent, interval, joinSignals, promiseWithResolvers, setLongTimeout, sleep, toUint8Array };
5
+ import 'zod/v4';
@@ -12,13 +12,15 @@ import {
12
12
  httpUserAgent,
13
13
  interval,
14
14
  joinSignals,
15
+ jsonParseCompat,
16
+ jsonStringifyCompat,
15
17
  promiseWithResolvers,
16
18
  setLongTimeout,
17
19
  sleep,
18
20
  stringifyError,
19
21
  toUint8Array
20
- } from "./chunk-75UE45DE.js";
21
- import "./chunk-ZZ3WBRPD.js";
22
+ } from "./chunk-BRH4PQS5.js";
23
+ import "./chunk-ZOVJDAOW.js";
22
24
  export {
23
25
  EXTRA_ERROR_LOG,
24
26
  SinglePromiseQueue,
@@ -33,6 +35,8 @@ export {
33
35
  httpUserAgent,
34
36
  interval,
35
37
  joinSignals,
38
+ jsonParseCompat,
39
+ jsonStringifyCompat,
36
40
  promiseWithResolvers,
37
41
  setLongTimeout,
38
42
  sleep,