rivetkit 2.3.0-rc.9 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/browser/client.d.ts +511 -62
  2. package/dist/browser/client.js +230 -174
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +53 -23
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/actor/errors.cjs +4 -2
  7. package/dist/tsup/actor/errors.cjs.map +1 -1
  8. package/dist/tsup/actor/errors.d.cts +1 -1
  9. package/dist/tsup/actor/errors.d.ts +1 -1
  10. package/dist/tsup/actor/errors.js +3 -1
  11. package/dist/tsup/agent-os/index.cjs +2163 -2087
  12. package/dist/tsup/agent-os/index.cjs.map +1 -1
  13. package/dist/tsup/agent-os/index.d.cts +509 -69
  14. package/dist/tsup/agent-os/index.d.ts +509 -69
  15. package/dist/tsup/agent-os/index.js +2163 -2087
  16. package/dist/tsup/agent-os/index.js.map +1 -1
  17. package/dist/tsup/{chunk-WQ4HNA4W.cjs → chunk-3MHDOUD7.cjs} +73 -3
  18. package/dist/tsup/chunk-3MHDOUD7.cjs.map +1 -0
  19. package/dist/tsup/{chunk-QAZLM4WT.cjs → chunk-4FC7TVS6.cjs} +8 -4
  20. package/dist/tsup/chunk-4FC7TVS6.cjs.map +1 -0
  21. package/dist/tsup/{chunk-4CGA6QJO.cjs → chunk-4UUEB43Y.cjs} +24 -9
  22. package/dist/tsup/chunk-4UUEB43Y.cjs.map +1 -0
  23. package/dist/tsup/{chunk-GVTOE34S.cjs → chunk-5IWLUJ6W.cjs} +222 -235
  24. package/dist/tsup/chunk-5IWLUJ6W.cjs.map +1 -0
  25. package/dist/tsup/{chunk-MMMEZM5J.js → chunk-H6VVZMWN.js} +4 -4
  26. package/dist/tsup/chunk-H6VVZMWN.js.map +1 -0
  27. package/dist/tsup/{chunk-3YY5S6TV.js → chunk-HXUEHHJF.js} +2 -2
  28. package/dist/tsup/chunk-HXUEHHJF.js.map +1 -0
  29. package/dist/tsup/{chunk-H7P7WR2Y.js → chunk-I35VSLEM.js} +6 -6
  30. package/dist/tsup/chunk-I35VSLEM.js.map +1 -0
  31. package/dist/tsup/{chunk-H37XQU3I.js → chunk-JBUZRPY5.js} +2 -2
  32. package/dist/tsup/{chunk-CPA4Y3RG.cjs → chunk-JLJJZYCJ.cjs} +10 -10
  33. package/dist/tsup/chunk-JLJJZYCJ.cjs.map +1 -0
  34. package/dist/tsup/{chunk-PCBNKI2J.js → chunk-JZ7TWV65.js} +1 -1
  35. package/dist/tsup/chunk-JZ7TWV65.js.map +1 -0
  36. package/dist/tsup/{chunk-VRCIXJRN.js → chunk-L2X3YFER.js} +64 -10
  37. package/dist/tsup/chunk-L2X3YFER.js.map +1 -0
  38. package/dist/tsup/{chunk-Y5NSCZA2.cjs → chunk-MNHKOS6L.cjs} +72 -18
  39. package/dist/tsup/chunk-MNHKOS6L.cjs.map +1 -0
  40. package/dist/tsup/{chunk-KJTA3ATT.js → chunk-NERUIBOT.js} +22 -7
  41. package/dist/tsup/chunk-NERUIBOT.js.map +1 -0
  42. package/dist/tsup/{chunk-4WPEZBK4.cjs → chunk-OST76LRW.cjs} +10 -10
  43. package/dist/tsup/chunk-OST76LRW.cjs.map +1 -0
  44. package/dist/tsup/{chunk-MALSPBAF.cjs → chunk-OZBCXBVP.cjs} +3 -3
  45. package/dist/tsup/{chunk-MALSPBAF.cjs.map → chunk-OZBCXBVP.cjs.map} +1 -1
  46. package/dist/tsup/{chunk-F3Q5BFQ6.js → chunk-PT6OIW5E.js} +66 -79
  47. package/dist/tsup/chunk-PT6OIW5E.js.map +1 -0
  48. package/dist/tsup/{chunk-W7EYSYVI.js → chunk-R6KPN5EW.js} +134 -20
  49. package/dist/tsup/chunk-R6KPN5EW.js.map +1 -0
  50. package/dist/tsup/{chunk-VJFRBJVQ.cjs → chunk-V5KMAMX3.cjs} +138 -24
  51. package/dist/tsup/chunk-V5KMAMX3.cjs.map +1 -0
  52. package/dist/tsup/{chunk-LD5YASJU.cjs → chunk-VE2X4KMG.cjs} +2 -2
  53. package/dist/tsup/{chunk-LD5YASJU.cjs.map → chunk-VE2X4KMG.cjs.map} +1 -1
  54. package/dist/tsup/{chunk-T6YVRM4K.js → chunk-XIX5DOZN.js} +72 -2
  55. package/dist/tsup/chunk-XIX5DOZN.js.map +1 -0
  56. package/dist/tsup/{chunk-2NDZ7JCR.cjs → chunk-ZA7FLHKH.cjs} +1 -1
  57. package/dist/tsup/chunk-ZA7FLHKH.cjs.map +1 -0
  58. package/dist/tsup/{chunk-KIWH5H3K.js → chunk-ZZ3WBRPD.js} +7 -3
  59. package/dist/tsup/chunk-ZZ3WBRPD.js.map +1 -0
  60. package/dist/tsup/client/mod.cjs +9 -9
  61. package/dist/tsup/client/mod.d.cts +5 -5
  62. package/dist/tsup/client/mod.d.ts +5 -5
  63. package/dist/tsup/client/mod.js +8 -8
  64. package/dist/tsup/common/log.cjs +3 -3
  65. package/dist/tsup/common/log.js +2 -2
  66. package/dist/tsup/common/websocket.cjs +4 -4
  67. package/dist/tsup/common/websocket.js +3 -3
  68. package/dist/tsup/{config-Ca8dN4cS.d.cts → config-CzvopP5m.d.cts} +544 -23
  69. package/dist/tsup/{config-CxjGYf4K.d.cts → config-D49x8NpL.d.cts} +1 -2
  70. package/dist/tsup/{config-CxjGYf4K.d.ts → config-D49x8NpL.d.ts} +1 -2
  71. package/dist/tsup/{config-0Ta55UV0.d.ts → config-DZuT7tcp.d.ts} +544 -23
  72. package/dist/tsup/context-CyAdY-aA.d.ts +128 -0
  73. package/dist/tsup/context-sNB28g0N.d.cts +128 -0
  74. package/dist/tsup/db/drizzle.cjs +3 -3
  75. package/dist/tsup/db/drizzle.d.cts +1 -1
  76. package/dist/tsup/db/drizzle.d.ts +1 -1
  77. package/dist/tsup/db/drizzle.js +1 -1
  78. package/dist/tsup/db/mod.cjs +2 -2
  79. package/dist/tsup/db/mod.d.cts +2 -2
  80. package/dist/tsup/db/mod.d.ts +2 -2
  81. package/dist/tsup/db/mod.js +1 -1
  82. package/dist/tsup/dynamic/mod.cjs +24 -0
  83. package/dist/tsup/dynamic/mod.cjs.map +1 -0
  84. package/dist/tsup/dynamic/mod.d.cts +37 -0
  85. package/dist/tsup/dynamic/mod.d.ts +37 -0
  86. package/dist/tsup/dynamic/mod.js +24 -0
  87. package/dist/tsup/dynamic/mod.js.map +1 -0
  88. package/dist/tsup/inspector/mod.cjs +6 -6
  89. package/dist/tsup/inspector/mod.js +5 -5
  90. package/dist/tsup/inspector-tab/mod.cjs +173 -0
  91. package/dist/tsup/inspector-tab/mod.cjs.map +1 -0
  92. package/dist/tsup/inspector-tab/mod.d.cts +250 -0
  93. package/dist/tsup/inspector-tab/mod.d.ts +250 -0
  94. package/dist/tsup/inspector-tab/mod.js +173 -0
  95. package/dist/tsup/inspector-tab/mod.js.map +1 -0
  96. package/dist/tsup/mod.cjs +758 -348
  97. package/dist/tsup/mod.cjs.map +1 -1
  98. package/dist/tsup/mod.d.cts +5 -5
  99. package/dist/tsup/mod.d.ts +5 -5
  100. package/dist/tsup/mod.js +662 -252
  101. package/dist/tsup/mod.js.map +1 -1
  102. package/dist/tsup/test/mod.cjs +21 -18
  103. package/dist/tsup/test/mod.cjs.map +1 -1
  104. package/dist/tsup/test/mod.d.cts +4 -4
  105. package/dist/tsup/test/mod.d.ts +4 -4
  106. package/dist/tsup/test/mod.js +18 -15
  107. package/dist/tsup/test/mod.js.map +1 -1
  108. package/dist/tsup/{utils-DVekpm4I.d.cts → utils-CqDnC_PS.d.cts} +2 -1
  109. package/dist/tsup/{utils-DVekpm4I.d.ts → utils-CqDnC_PS.d.ts} +2 -1
  110. package/dist/tsup/utils.cjs +3 -3
  111. package/dist/tsup/utils.d.cts +1 -1
  112. package/dist/tsup/utils.d.ts +1 -1
  113. package/dist/tsup/utils.js +2 -2
  114. package/dist/tsup/workflow/mod.cjs +383 -322
  115. package/dist/tsup/workflow/mod.cjs.map +1 -1
  116. package/dist/tsup/workflow/mod.d.cts +8 -8
  117. package/dist/tsup/workflow/mod.d.ts +8 -8
  118. package/dist/tsup/workflow/mod.js +360 -299
  119. package/dist/tsup/workflow/mod.js.map +1 -1
  120. package/package.json +35 -14
  121. package/src/actor/config.ts +173 -51
  122. package/src/actor/contexts/index.ts +7 -2
  123. package/src/actor/definition.ts +17 -19
  124. package/src/actor/driver.ts +3 -3
  125. package/src/actor/errors.ts +20 -3
  126. package/src/actor/instance/mod.ts +26 -34
  127. package/src/actor/keys.ts +1 -1
  128. package/src/actor/mod.ts +22 -20
  129. package/src/actor/schema.ts +2 -2
  130. package/src/agent-os/actor/index.ts +38 -18
  131. package/src/agent-os/actor/preview.ts +1 -2
  132. package/src/agent-os/actor/session.ts +2 -2
  133. package/src/agent-os/config.ts +1 -1
  134. package/src/agent-os/fs/database-vfs.ts +1 -1
  135. package/src/agent-os/index.ts +16 -15
  136. package/src/client/actor-common.ts +87 -54
  137. package/src/client/actor-conn.ts +8 -36
  138. package/src/client/actor-handle.ts +69 -51
  139. package/src/client/actor-query.ts +5 -5
  140. package/src/client/errors.ts +1 -1
  141. package/src/client/lifecycle-errors.ts +2 -4
  142. package/src/client/query.ts +1 -1
  143. package/src/client/queue.ts +8 -3
  144. package/src/client/raw-utils.ts +8 -6
  145. package/src/client/resolve-gateway-target.ts +1 -1
  146. package/src/client/utils.ts +2 -7
  147. package/src/common/actor-websocket.ts +3 -1
  148. package/src/common/bare/actor-persist/v1.ts +205 -163
  149. package/src/common/bare/actor-persist/v2.ts +265 -213
  150. package/src/common/bare/actor-persist/v3.ts +176 -172
  151. package/src/common/bare/actor-persist/v4.ts +254 -253
  152. package/src/common/bare/transport/v1.ts +659 -543
  153. package/src/common/client-protocol-versioned.ts +66 -64
  154. package/src/common/database/config.ts +2 -8
  155. package/src/common/database/native-database.ts +1 -1
  156. package/src/common/database/shared.ts +1 -0
  157. package/src/common/encoding.ts +250 -16
  158. package/src/common/engine.ts +28 -1
  159. package/src/common/eventsource.ts +1 -1
  160. package/src/common/inline-websocket-adapter.ts +14 -13
  161. package/src/common/log.ts +1 -0
  162. package/src/common/router.ts +13 -17
  163. package/src/common/utils.ts +1 -150
  164. package/src/common/websocket-interface.ts +1 -1
  165. package/src/db/mod.ts +1 -1
  166. package/src/devtools-loader/index.ts +4 -7
  167. package/src/devtools-loader/serve-devtools.ts +26 -0
  168. package/src/drivers/engine/actor-driver.ts +58 -56
  169. package/src/dynamic/instance.ts +32 -0
  170. package/src/dynamic/internal.ts +50 -0
  171. package/src/dynamic/isolate-runtime.ts +66 -0
  172. package/src/dynamic/mod.ts +32 -0
  173. package/src/engine-client/actor-http-client.ts +3 -3
  174. package/src/engine-client/actor-websocket-client.ts +6 -5
  175. package/src/engine-client/api-endpoints.ts +51 -2
  176. package/src/engine-client/api-utils.ts +2 -2
  177. package/src/engine-client/driver.ts +1 -1
  178. package/src/engine-client/mod.ts +6 -3
  179. package/src/engine-client/ws-proxy.ts +9 -4
  180. package/src/inspector/client.browser.ts +5 -11
  181. package/src/inspector/mod.ts +1 -3
  182. package/src/inspector-tab/mod.ts +315 -0
  183. package/src/registry/config/envoy.ts +1 -2
  184. package/src/registry/config/index.ts +40 -16
  185. package/src/registry/index.ts +209 -73
  186. package/src/registry/napi-runtime.ts +29 -2
  187. package/src/registry/native-validation.ts +10 -12
  188. package/src/registry/native.ts +433 -198
  189. package/src/registry/process-metrics.ts +250 -0
  190. package/src/registry/runtime.ts +52 -1
  191. package/src/registry/wasm-runtime.ts +29 -2
  192. package/src/registry/write-through-proxy.ts +40 -0
  193. package/src/serde.ts +2 -2
  194. package/src/serverless/configure.ts +18 -7
  195. package/src/test/mod.ts +11 -8
  196. package/src/utils/endpoint-parser.ts +1 -1
  197. package/src/utils/env-vars.ts +37 -0
  198. package/src/utils/router.ts +1 -1
  199. package/src/utils.ts +1 -2
  200. package/src/workflow/context.ts +699 -240
  201. package/src/workflow/driver.ts +23 -12
  202. package/src/workflow/inspector.ts +4 -3
  203. package/src/workflow/mod.ts +37 -23
  204. package/dist/tsup/chunk-2NDZ7JCR.cjs.map +0 -1
  205. package/dist/tsup/chunk-3YY5S6TV.js.map +0 -1
  206. package/dist/tsup/chunk-4CGA6QJO.cjs.map +0 -1
  207. package/dist/tsup/chunk-4WPEZBK4.cjs.map +0 -1
  208. package/dist/tsup/chunk-CPA4Y3RG.cjs.map +0 -1
  209. package/dist/tsup/chunk-F3Q5BFQ6.js.map +0 -1
  210. package/dist/tsup/chunk-GVTOE34S.cjs.map +0 -1
  211. package/dist/tsup/chunk-H7P7WR2Y.js.map +0 -1
  212. package/dist/tsup/chunk-KIWH5H3K.js.map +0 -1
  213. package/dist/tsup/chunk-KJTA3ATT.js.map +0 -1
  214. package/dist/tsup/chunk-MMMEZM5J.js.map +0 -1
  215. package/dist/tsup/chunk-PCBNKI2J.js.map +0 -1
  216. package/dist/tsup/chunk-QAZLM4WT.cjs.map +0 -1
  217. package/dist/tsup/chunk-T6YVRM4K.js.map +0 -1
  218. package/dist/tsup/chunk-VJFRBJVQ.cjs.map +0 -1
  219. package/dist/tsup/chunk-VRCIXJRN.js.map +0 -1
  220. package/dist/tsup/chunk-W7EYSYVI.js.map +0 -1
  221. package/dist/tsup/chunk-WQ4HNA4W.cjs.map +0 -1
  222. package/dist/tsup/chunk-Y5NSCZA2.cjs.map +0 -1
  223. package/dist/tsup/context-B_IWbWne.d.ts +0 -92
  224. package/dist/tsup/context-CUrQ9MHc.d.cts +0 -92
  225. package/src/utils/serve.ts +0 -217
  226. /package/dist/tsup/{chunk-H37XQU3I.js.map → chunk-JBUZRPY5.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod/v4';
2
- import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
3
- import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-CxjGYf4K.js';
2
+ import { A as AnyDatabaseProvider, d as SqliteNativeMetrics, I as InferDatabaseClient } from './config-D49x8NpL.js';
4
3
  import * as _rivetkit_rivetkit_wasm from '@rivetkit/rivetkit-wasm';
5
4
  import { z as z$1 } from 'zod';
6
5
  import { Logger } from 'pino';
6
+ import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
7
7
  import { StandardSchemaV1 } from '@standard-schema/spec';
8
8
  import { Context, Hono } from 'hono';
9
9
  import { GetUpgradeWebSocket } from './utils.js';
10
- import { R as RivetError } from './utils-DVekpm4I.js';
10
+ import { R as RivetError } from './utils-CqDnC_PS.js';
11
11
 
12
12
  declare const ActorKeySchema: z.ZodArray<z.ZodString>;
13
13
  type ActorKey = z.infer<typeof ActorKeySchema>;
@@ -70,7 +70,7 @@ declare const EncodingSchema: z.ZodEnum<{
70
70
  */
71
71
  type Encoding = z.infer<typeof EncodingSchema>;
72
72
 
73
- declare const ActorsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodCustom<BaseActorDefinition<any, any, any, any, any, any, any, any, any>, BaseActorDefinition<any, any, any, any, any, any, any, any, any>>>;
73
+ declare const ActorsSchema: z$1.ZodRecord<z$1.ZodString, z$1.ZodCustom<AnyActorDefinition, AnyActorDefinition>>;
74
74
  type RegistryActors = z$1.infer<typeof ActorsSchema>;
75
75
  declare const RuntimeKindSchema: z$1.ZodEnum<{
76
76
  auto: "auto";
@@ -167,6 +167,8 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
167
167
  httpPort: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
168
168
  httpHost: z$1.ZodOptional<z$1.ZodString>;
169
169
  startEngine: z$1.ZodDefault<z$1.ZodBoolean>;
170
+ engineHost: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
171
+ enginePort: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
170
172
  engineVersion: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
171
173
  configurePool: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodObject<{
172
174
  name: z$1.ZodOptional<z$1.ZodString>;
@@ -232,6 +234,8 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
232
234
  httpBasePath: string;
233
235
  httpPort: number;
234
236
  startEngine: boolean;
237
+ engineHost: string;
238
+ enginePort: number;
235
239
  engineVersion: string;
236
240
  envoy: {
237
241
  poolName: string;
@@ -283,6 +287,8 @@ declare const RegistryConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
283
287
  httpBasePath: string;
284
288
  httpPort: number;
285
289
  startEngine: boolean;
290
+ engineHost: string;
291
+ enginePort: number;
286
292
  engineVersion: string;
287
293
  serverless: {
288
294
  basePath: string;
@@ -444,7 +450,7 @@ interface QueueSchemaDefinition<TContext = any> {
444
450
  type EventSchema<TContext = any> = PrimitiveSchema | EventSchemaDefinition<TContext>;
445
451
  type QueueSchema = PrimitiveSchema | QueueSchemaDefinition<any> | QueueTypeToken<unknown, unknown, any>;
446
452
  type EventSchemaConfig<TContext = any> = Record<string, EventSchema<TContext>>;
447
- type QueueSchemaConfig<TContext = any> = Record<string, QueueSchema>;
453
+ type QueueSchemaConfig<_TContext = any> = Record<string, QueueSchema>;
448
454
  type InferSchema<T> = T extends QueueSchemaDefinition<any> ? InferSchema<T["message"]> : T extends QueueTypeToken<infer M, unknown, any> ? M : T extends EventSchemaDefinition<any> ? InferSchema<T["schema"]> : T extends StandardSchemaV1<any, infer O> ? O : T extends EventTypeToken<infer R, any> ? R : never;
449
455
  type InferSchemaMap<T extends Record<string, unknown>> = {
450
456
  [K in keyof T]: InferSchema<T[K]>;
@@ -455,15 +461,17 @@ type InferQueueCompleteMap<T extends QueueSchemaConfig> = {
455
461
  };
456
462
  type InferEventArgs<T> = T extends readonly unknown[] ? number extends T["length"] ? [T] : T : [T];
457
463
 
458
- interface BaseActorDefinition<S, CP, CS, V, I, DB extends AnyDatabaseProvider, E extends EventSchemaConfig = Record<never, never>, Q extends QueueSchemaConfig = Record<never, never>, R extends Actions<S, CP, CS, V, I, DB, E, Q> = Actions<S, CP, CS, V, I, DB, E, Q>> {
459
- readonly config: ActorConfig<S, CP, CS, V, I, DB, E, Q>;
464
+ interface BaseActorDefinition<S, CP, CS, V, I, DB extends AnyDatabaseProvider, E extends EventSchemaConfig = Record<never, never>, Q extends QueueSchemaConfig = Record<never, never>, _R extends Actions<S, CP, CS, V, I, DB, E, Q> = Actions<S, CP, CS, V, I, DB, E, Q>> {
465
+ readonly config: ActorConfig<S, CP, CS, V, I, DB, E, Q, _R>;
466
+ }
467
+ interface AnyActorDefinition {
468
+ readonly config: any;
460
469
  }
461
- type AnyActorDefinition = BaseActorDefinition<any, any, any, any, any, any, any, any, any>;
462
470
  type AnyStaticActorDefinition = ActorDefinition<any, any, any, any, any, any, any, any, any>;
463
471
  declare class ActorDefinition<S, CP, CS, V, I, DB extends AnyDatabaseProvider, E extends EventSchemaConfig = Record<never, never>, Q extends QueueSchemaConfig = Record<never, never>, R extends Actions<S, CP, CS, V, I, DB, E, Q> = Actions<S, CP, CS, V, I, DB, E, Q>> implements BaseActorDefinition<S, CP, CS, V, I, DB, E, Q, R> {
464
472
  #private;
465
- constructor(config: ActorConfig<S, CP, CS, V, I, DB, E, Q>);
466
- get config(): ActorConfig<S, CP, CS, V, I, DB, E, Q>;
473
+ constructor(config: ActorConfig<S, CP, CS, V, I, DB, E, Q, R>);
474
+ get config(): ActorConfig<S, CP, CS, V, I, DB, E, Q, R>;
467
475
  }
468
476
  interface BaseActorInstance<S = any, CP = any, CS = any, V = any, I = any, DB extends AnyDatabaseProvider = AnyDatabaseProvider, E extends EventSchemaConfig = Record<never, never>, Q extends QueueSchemaConfig = Record<never, never>> {
469
477
  id: string;
@@ -557,6 +565,341 @@ interface ActorOutput {
557
565
  error?: unknown;
558
566
  }
559
567
 
568
+ declare const handleBrand: unique symbol;
569
+ type OpaqueHandle<Name extends string> = {
570
+ readonly [handleBrand]: Name;
571
+ };
572
+ type RegistryHandle = OpaqueHandle<"registry">;
573
+ type ActorFactoryHandle = OpaqueHandle<"actorFactory">;
574
+ type ActorContextHandle = OpaqueHandle<"actorContext">;
575
+ type ConnHandle = OpaqueHandle<"conn">;
576
+ type WebSocketHandle = OpaqueHandle<"webSocket">;
577
+ type CancellationTokenHandle = OpaqueHandle<"cancellationToken">;
578
+ type RuntimeBytes = Uint8Array;
579
+ interface RuntimeActorKeySegment {
580
+ kind: string;
581
+ stringValue?: string;
582
+ numberValue?: number;
583
+ }
584
+ interface RuntimeHttpRequest {
585
+ method: string;
586
+ uri: string;
587
+ headers?: Record<string, string>;
588
+ body?: RuntimeBytes;
589
+ }
590
+ interface RuntimeStateDeltaPayload {
591
+ state?: RuntimeBytes;
592
+ connHibernation: Array<{
593
+ connId: string;
594
+ bytes: RuntimeBytes;
595
+ }>;
596
+ connHibernationRemoved: string[];
597
+ }
598
+ interface RuntimeRequestSaveOpts {
599
+ immediate?: boolean;
600
+ maxWaitMs?: number;
601
+ }
602
+ interface RuntimeInspectorSnapshot {
603
+ stateRevision: number;
604
+ connectionsRevision: number;
605
+ queueRevision: number;
606
+ activeConnections: number;
607
+ queueSize: number;
608
+ connectedClients: number;
609
+ }
610
+ interface RuntimeQueueMessage {
611
+ id(): bigint;
612
+ name(): string;
613
+ body(): RuntimeBytes;
614
+ createdAt(): number;
615
+ isCompletable(): boolean;
616
+ complete(response?: RuntimeBytes | undefined | null): Promise<void>;
617
+ }
618
+ interface RuntimeQueueInspectMessage {
619
+ id: number;
620
+ name: string;
621
+ createdAtMs: number;
622
+ }
623
+ interface RuntimeQueueNextBatchOptions {
624
+ names?: string[];
625
+ count?: number;
626
+ timeoutMs?: number;
627
+ completable?: boolean;
628
+ }
629
+ interface RuntimeQueueWaitOptions {
630
+ timeoutMs?: number;
631
+ completable?: boolean;
632
+ }
633
+ interface RuntimeQueueEnqueueAndWaitOptions {
634
+ timeoutMs?: number;
635
+ }
636
+ interface RuntimeQueueTryNextBatchOptions {
637
+ names?: string[];
638
+ count?: number;
639
+ completable?: boolean;
640
+ }
641
+ interface RuntimeKvListOptions {
642
+ reverse?: boolean;
643
+ limit?: number;
644
+ }
645
+ interface RuntimeKvEntry {
646
+ key: RuntimeBytes;
647
+ value: RuntimeBytes;
648
+ }
649
+ type RuntimeSqlBindNoValues = {
650
+ intValue?: never;
651
+ floatValue?: never;
652
+ textValue?: never;
653
+ blobValue?: never;
654
+ };
655
+ type RuntimeSqlBindParam = ({
656
+ kind: "null";
657
+ } & RuntimeSqlBindNoValues) | {
658
+ kind: "int";
659
+ intValue: number;
660
+ floatValue?: never;
661
+ textValue?: never;
662
+ blobValue?: never;
663
+ } | {
664
+ kind: "float";
665
+ intValue?: never;
666
+ floatValue: number;
667
+ textValue?: never;
668
+ blobValue?: never;
669
+ } | {
670
+ kind: "text";
671
+ intValue?: never;
672
+ floatValue?: never;
673
+ textValue: string;
674
+ blobValue?: never;
675
+ } | {
676
+ kind: "blob";
677
+ intValue?: never;
678
+ floatValue?: never;
679
+ textValue?: never;
680
+ blobValue: RuntimeBytes;
681
+ };
682
+ type RuntimeSqlBindParams = RuntimeSqlBindParam[] | null;
683
+ interface RuntimeSqlQueryResult {
684
+ columns: string[];
685
+ rows: unknown[][];
686
+ }
687
+ type RuntimeSqlExecResult = RuntimeSqlQueryResult;
688
+ interface RuntimeSqlExecuteResult extends RuntimeSqlQueryResult {
689
+ changes: number;
690
+ lastInsertRowId?: number | null;
691
+ }
692
+ interface RuntimeSqlRunResult {
693
+ changes: number;
694
+ }
695
+ interface RuntimeActorConfig {
696
+ name?: string;
697
+ icon?: string;
698
+ hasDatabase?: boolean;
699
+ remoteSqlite?: boolean;
700
+ hasState?: boolean;
701
+ canHibernateWebsocket?: boolean;
702
+ stateSaveIntervalMs?: number;
703
+ createStateTimeoutMs?: number;
704
+ onCreateTimeoutMs?: number;
705
+ createVarsTimeoutMs?: number;
706
+ createConnStateTimeoutMs?: number;
707
+ onBeforeConnectTimeoutMs?: number;
708
+ onConnectTimeoutMs?: number;
709
+ onMigrateTimeoutMs?: number;
710
+ onWakeTimeoutMs?: number;
711
+ onBeforeActorStartTimeoutMs?: number;
712
+ actionTimeoutMs?: number;
713
+ onRequestTimeoutMs?: number;
714
+ sleepTimeoutMs?: number;
715
+ noSleep?: boolean;
716
+ sleepGracePeriodMs?: number;
717
+ connectionLivenessTimeoutMs?: number;
718
+ connectionLivenessIntervalMs?: number;
719
+ maxQueueSize?: number;
720
+ maxQueueMessageSize?: number;
721
+ maxIncomingMessageSize?: number;
722
+ maxOutgoingMessageSize?: number;
723
+ preloadMaxWorkflowBytes?: number;
724
+ preloadMaxConnectionsBytes?: number;
725
+ actions?: Array<{
726
+ name: string;
727
+ }>;
728
+ inspectorTabs?: Array<RuntimeInspectorTabEntry>;
729
+ }
730
+ interface RuntimeInspectorTabEntry {
731
+ id: string;
732
+ /** Required for custom entries; omitted for built-in hides. */
733
+ label?: string;
734
+ /**
735
+ * Required for custom entries — absolute path to the source directory.
736
+ * Resolved on the TS side before being handed to the runtime.
737
+ */
738
+ source?: string;
739
+ /** Optional icon id for custom entries. */
740
+ icon?: string;
741
+ /** Set to true for built-in hide entries. */
742
+ hidden?: boolean;
743
+ }
744
+ interface RuntimeServeConfig {
745
+ version: number;
746
+ endpoint: string;
747
+ token?: string;
748
+ namespace: string;
749
+ poolName: string;
750
+ engineBinaryPath?: string;
751
+ engineHost?: string;
752
+ enginePort?: number;
753
+ handleInspectorHttpInRuntime?: boolean;
754
+ inspectorTestToken?: string;
755
+ serverlessBasePath?: string;
756
+ serverlessPackageVersion: string;
757
+ serverlessClientEndpoint?: string;
758
+ serverlessClientNamespace?: string;
759
+ serverlessClientToken?: string;
760
+ serverlessValidateEndpoint: boolean;
761
+ serverlessMaxStartPayloadBytes: number;
762
+ }
763
+ interface RuntimeListenerConfig {
764
+ port: number;
765
+ host?: string;
766
+ publicDir?: string;
767
+ }
768
+ interface RuntimeServerlessRequest {
769
+ method: string;
770
+ url: string;
771
+ headers: Record<string, string>;
772
+ body: RuntimeBytes;
773
+ }
774
+ interface RuntimeServerlessResponseHead {
775
+ status: number;
776
+ headers: Record<string, string>;
777
+ }
778
+ interface RuntimeRegistryRouteResponse {
779
+ status: number;
780
+ headers: Record<string, string>;
781
+ body: RuntimeBytes;
782
+ }
783
+ type RuntimeServerlessStreamEvent = {
784
+ kind: "chunk";
785
+ chunk?: RuntimeBytes;
786
+ } | {
787
+ kind: "end";
788
+ error?: {
789
+ group: string;
790
+ code: string;
791
+ message: string;
792
+ };
793
+ };
794
+ type RuntimeServerlessStreamCallback = (error: unknown, event?: RuntimeServerlessStreamEvent) => unknown;
795
+ type RuntimeWebSocketEvent = {
796
+ kind: "message";
797
+ data: string | RuntimeBytes;
798
+ binary: boolean;
799
+ messageIndex?: number;
800
+ } | {
801
+ kind: "close";
802
+ code: number;
803
+ reason: string;
804
+ wasClean: boolean;
805
+ };
806
+ interface CoreRuntime {
807
+ readonly kind: "napi" | "wasm";
808
+ createRegistry(): RegistryHandle;
809
+ registerActor(registry: RegistryHandle, name: string, factory: ActorFactoryHandle): void;
810
+ serveRegistry(registry: RegistryHandle, config: RuntimeServeConfig): Promise<void>;
811
+ shutdownRegistry(registry: RegistryHandle): Promise<void>;
812
+ registryActorStopThresholdMs?(registry: RegistryHandle): Promise<number | undefined>;
813
+ handleServerlessRequest(registry: RegistryHandle, req: RuntimeServerlessRequest, onStreamEvent: RuntimeServerlessStreamCallback, cancelToken: CancellationTokenHandle, config: RuntimeServeConfig): Promise<RuntimeServerlessResponseHead>;
814
+ serveListener(registry: RegistryHandle, listener: RuntimeListenerConfig, config: RuntimeServeConfig): Promise<void>;
815
+ registryHealth?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
816
+ registryMetadata?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
817
+ registryMetrics?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
818
+ createActorFactory(callbacks: object, config?: RuntimeActorConfig | undefined | null): ActorFactoryHandle;
819
+ createCancellationToken(): CancellationTokenHandle;
820
+ cancellationTokenAborted(token: CancellationTokenHandle): boolean;
821
+ cancelCancellationToken(token: CancellationTokenHandle): void;
822
+ onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): void;
823
+ actorState(ctx: ActorContextHandle): RuntimeBytes;
824
+ actorBeginOnStateChange(ctx: ActorContextHandle): void;
825
+ actorEndOnStateChange(ctx: ActorContextHandle): void;
826
+ actorSetAlarm(ctx: ActorContextHandle, timestampMs?: number | undefined | null): void;
827
+ actorRequestSave(ctx: ActorContextHandle, opts?: RuntimeRequestSaveOpts | undefined | null): void;
828
+ actorRequestSaveAndWait(ctx: ActorContextHandle, opts?: RuntimeRequestSaveOpts | undefined | null): Promise<void>;
829
+ actorInspectorSnapshot(ctx: ActorContextHandle): RuntimeInspectorSnapshot;
830
+ actorDecodeInspectorRequest(ctx: ActorContextHandle, bytes: RuntimeBytes, advertisedVersion: number): RuntimeBytes;
831
+ actorEncodeInspectorResponse(ctx: ActorContextHandle, bytes: RuntimeBytes, targetVersion: number): RuntimeBytes;
832
+ actorVerifyInspectorAuth(ctx: ActorContextHandle, bearerToken?: string | undefined | null): Promise<void>;
833
+ actorQueueHibernationRemoval(ctx: ActorContextHandle, connId: string): void;
834
+ actorTakePendingHibernationChanges(ctx: ActorContextHandle): string[];
835
+ actorDirtyHibernatableConns(ctx: ActorContextHandle): ConnHandle[];
836
+ actorSaveState(ctx: ActorContextHandle, payload: RuntimeStateDeltaPayload): Promise<void>;
837
+ actorId(ctx: ActorContextHandle): string;
838
+ actorName(ctx: ActorContextHandle): string;
839
+ actorKey(ctx: ActorContextHandle): RuntimeActorKeySegment[];
840
+ actorRegion(ctx: ActorContextHandle): string;
841
+ actorSleep(ctx: ActorContextHandle): void;
842
+ actorDestroy(ctx: ActorContextHandle): void;
843
+ actorAbortSignal(ctx: ActorContextHandle): AbortSignal;
844
+ actorConns(ctx: ActorContextHandle): ConnHandle[];
845
+ actorConnectConn(ctx: ActorContextHandle, params: RuntimeBytes, request?: RuntimeHttpRequest | undefined | null): Promise<ConnHandle>;
846
+ actorBroadcast(ctx: ActorContextHandle, name: string, args: RuntimeBytes): void;
847
+ actorWaitUntil(ctx: ActorContextHandle, promise: Promise<unknown>): void;
848
+ actorWaitForTrackedShutdownWork(ctx: ActorContextHandle): Promise<boolean>;
849
+ actorWaitForTrackedShutdownWorkUnbounded(ctx: ActorContextHandle): Promise<void>;
850
+ actorKeepAwake(ctx: ActorContextHandle, promise: Promise<unknown>): void;
851
+ actorBeginKeepAwake(ctx: ActorContextHandle): number;
852
+ actorEndKeepAwake(ctx: ActorContextHandle, regionId: number): void;
853
+ actorRegisterTask(ctx: ActorContextHandle, promise: Promise<unknown>): void;
854
+ actorRuntimeState(ctx: ActorContextHandle): object;
855
+ actorClearRuntimeState(ctx: ActorContextHandle): void;
856
+ actorRestartRunHandler(ctx: ActorContextHandle): void;
857
+ actorBeginWebsocketCallback(ctx: ActorContextHandle): number;
858
+ actorEndWebsocketCallback(ctx: ActorContextHandle, regionId: number): void;
859
+ actorKvGet(ctx: ActorContextHandle, key: RuntimeBytes): Promise<RuntimeBytes | null>;
860
+ actorKvPut(ctx: ActorContextHandle, key: RuntimeBytes, value: RuntimeBytes): Promise<void>;
861
+ actorKvDelete(ctx: ActorContextHandle, key: RuntimeBytes): Promise<void>;
862
+ actorKvDeleteRange(ctx: ActorContextHandle, start: RuntimeBytes, end: RuntimeBytes): Promise<void>;
863
+ actorKvListPrefix(ctx: ActorContextHandle, prefix: RuntimeBytes, options?: RuntimeKvListOptions | undefined | null): Promise<RuntimeKvEntry[]>;
864
+ actorKvListRange(ctx: ActorContextHandle, start: RuntimeBytes, end: RuntimeBytes, options?: RuntimeKvListOptions | undefined | null): Promise<RuntimeKvEntry[]>;
865
+ actorKvBatchGet(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<Array<RuntimeBytes | undefined | null>>;
866
+ actorKvBatchPut(ctx: ActorContextHandle, entries: RuntimeKvEntry[]): Promise<void>;
867
+ actorKvBatchDelete(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<void>;
868
+ actorSqlExec(ctx: ActorContextHandle, sql: string): Promise<RuntimeSqlExecResult>;
869
+ actorSqlExecute(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
870
+ actorSqlQuery(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlQueryResult>;
871
+ actorSqlRun(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlRunResult>;
872
+ actorSqlMetrics(ctx: ActorContextHandle): SqliteNativeMetrics | null;
873
+ actorSqlTakeLastKvError(ctx: ActorContextHandle): string | null;
874
+ actorSqlClose(ctx: ActorContextHandle): Promise<void>;
875
+ actorQueueSend(ctx: ActorContextHandle, name: string, body: RuntimeBytes): Promise<RuntimeQueueMessage>;
876
+ actorQueueNextBatch(ctx: ActorContextHandle, options?: RuntimeQueueNextBatchOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage[]>;
877
+ actorQueueWaitForNames(ctx: ActorContextHandle, names: string[], options?: RuntimeQueueWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage>;
878
+ actorQueueWaitForNamesAvailable(ctx: ActorContextHandle, names: string[], options?: RuntimeQueueWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<void>;
879
+ actorQueueEnqueueAndWait(ctx: ActorContextHandle, name: string, body: RuntimeBytes, options?: RuntimeQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeBytes | null>;
880
+ actorQueueTryNextBatch(ctx: ActorContextHandle, options?: RuntimeQueueTryNextBatchOptions | undefined | null): RuntimeQueueMessage[];
881
+ actorQueueMaxSize(ctx: ActorContextHandle): number;
882
+ actorQueueInspectMessages(ctx: ActorContextHandle): Promise<RuntimeQueueInspectMessage[]>;
883
+ actorScheduleAfter(ctx: ActorContextHandle, durationMs: number, actionName: string, args: RuntimeBytes): void;
884
+ actorScheduleAt(ctx: ActorContextHandle, timestampMs: number, actionName: string, args: RuntimeBytes): void;
885
+ connId(conn: ConnHandle): string;
886
+ connParams(conn: ConnHandle): RuntimeBytes;
887
+ connState(conn: ConnHandle): RuntimeBytes;
888
+ connSetState(conn: ConnHandle, state: RuntimeBytes): void;
889
+ connIsHibernatable(conn: ConnHandle): boolean;
890
+ connSend(conn: ConnHandle, name: string, args: RuntimeBytes): void;
891
+ connDisconnect(conn: ConnHandle, reason?: string | undefined | null): Promise<void>;
892
+ webSocketSend(ws: WebSocketHandle, data: RuntimeBytes, binary: boolean): void;
893
+ webSocketClose(ws: WebSocketHandle, code?: number | undefined | null, reason?: string | undefined | null): Promise<void>;
894
+ webSocketSetEventCallback(ws: WebSocketHandle, callback: (event: RuntimeWebSocketEvent) => void): void;
895
+ }
896
+
897
+ declare function buildConfiguredRegistry(config: RegistryConfig): Promise<{
898
+ runtime: CoreRuntime;
899
+ registry: RegistryHandle;
900
+ serveConfig: RuntimeServeConfig;
901
+ }>;
902
+
560
903
  type FetchHandler = (request: Request, ...args: any) => Response | Promise<Response>;
561
904
  interface ServerlessHandler {
562
905
  fetch: FetchHandler;
@@ -566,12 +909,20 @@ interface RegistryRoutes {
566
909
  metadata(): Promise<Response>;
567
910
  prometheusMetrics(request?: Request): Promise<Response>;
568
911
  }
912
+ /**
913
+ * Injectable dependencies for {@link Registry}. Production code uses the
914
+ * defaults. Tests override `buildConfiguredRegistry` to drive lifecycle
915
+ * orchestration against a fake `CoreRuntime` without an engine.
916
+ */
917
+ interface RegistryDeps {
918
+ buildConfiguredRegistry: typeof buildConfiguredRegistry;
919
+ }
569
920
  declare class Registry<A extends RegistryActors> {
570
921
  #private;
571
922
  readonly routes: RegistryRoutes;
572
923
  get config(): RegistryConfigInput<A>;
573
924
  parseConfig(): RegistryConfig;
574
- constructor(config: RegistryConfigInput<A>);
925
+ constructor(config: RegistryConfigInput<A>, deps?: Partial<RegistryDeps>);
575
926
  /**
576
927
  * Handle an incoming HTTP request for serverless deployments.
577
928
  *
@@ -592,10 +943,57 @@ declare class Registry<A extends RegistryActors> {
592
943
  * ```
593
944
  */
594
945
  serve(): ServerlessHandler;
946
+ /**
947
+ * Bind an HTTP listener provided by the native (Rust) runtime and serve
948
+ * the registry's serverless endpoints over it. Resolves only after the
949
+ * registry is shut down (SIGINT/SIGTERM or `nativeRegistry.shutdown()`).
950
+ *
951
+ * @param opts.port Port to listen on. Defaults to `process.env.RIVET_PORT`
952
+ * if set, otherwise 3000.
953
+ * @param opts.host Address to bind. Defaults to `0.0.0.0`.
954
+ * @param opts.publicDir If set, serves static files from this directory
955
+ * as a fallback below the framework routes.
956
+ *
957
+ * @example
958
+ * ```ts
959
+ * await registry.listen();
960
+ * await registry.listen({ port: 8080, publicDir: "./public" });
961
+ * ```
962
+ */
963
+ listen(opts?: {
964
+ port?: number;
965
+ host?: string;
966
+ publicDir?: string;
967
+ }): Promise<void>;
968
+ /**
969
+ * Gracefully drains all live registries.
970
+ *
971
+ * Programmatic counterpart to the SIGINT/SIGTERM handlers: tears down
972
+ * every live `CoreRegistry` (both `start()` and `handler()` modes) and
973
+ * waits for the serve promise to resolve, all bounded by the shutdown
974
+ * grace period. Unlike a signal-driven shutdown, this does not re-raise a
975
+ * signal or exit the process. The caller owns process lifetime.
976
+ *
977
+ * Idempotent: concurrent or repeated calls share a single drain. Safe to
978
+ * call even if nothing has been started.
979
+ *
980
+ * @example
981
+ * ```ts
982
+ * const registry = setup({ use: { counter } });
983
+ * registry.start();
984
+ * // ...later, on your own shutdown trigger:
985
+ * await registry.shutdown();
986
+ * ```
987
+ */
988
+ shutdown(): Promise<void>;
595
989
  startEnvoy(): void;
596
990
  /**
597
991
  * Starts the actor envoy for standalone server deployments.
598
992
  *
993
+ * Set `RIVETKIT_RUNTIME_MODE=serverless` to instead bind an HTTP listener
994
+ * via `listen()` (Mode B). Mode A (envoy) and Mode B (listener) are
995
+ * mutually exclusive per registry instance.
996
+ *
599
997
  * @example
600
998
  * ```ts
601
999
  * const registry = setup({ use: { counter } });
@@ -631,6 +1029,12 @@ interface QueueSendResult<TResponse = unknown> {
631
1029
  * @returns {Promise<Response>}
632
1030
  */
633
1031
  type ActorActionFunction<Args extends Array<unknown> = unknown[], Response = unknown> = (...args: Args extends [unknown, ...infer Rest] ? Rest : Args) => Promise<Response>;
1032
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1033
+ type LooseEventSubscribe = (eventName: string, callback: (...args: any[]) => void) => () => void;
1034
+ type ActorActionMap<R> = {
1035
+ [K in keyof NonNullable<R>]: NonNullable<R>[K] extends (...args: infer Args) => infer Return ? ActorActionFunction<Args, Awaited<Return>> : never;
1036
+ };
1037
+ type ActionsOf<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, any, any, infer R> ? R : never;
634
1038
  interface ActorGatewayOptions {
635
1039
  skipReadyWait?: boolean;
636
1040
  }
@@ -643,9 +1047,7 @@ type ActorWebSocketOptions = ActorGatewayOptions;
643
1047
  /**
644
1048
  * Maps action methods from actor definition to typed function signatures.
645
1049
  */
646
- type ActorDefinitionActions<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, any, any, infer R> ? {
647
- [K in keyof R]: R[K] extends (...args: infer Args) => infer Return ? ActorActionFunction<Args, Return> : never;
648
- } : never;
1050
+ type ActorDefinitionActions<AD extends AnyActorDefinition> = IsAny<AD> extends true ? Record<string, ActorActionFunction<any[], any>> : ActorActionMap<ActionsOf<AD>>;
649
1051
  type ActorQueueSend<TQueues extends QueueSchemaConfig> = {
650
1052
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options: QueueSendWaitOptions): Promise<QueueSendResult<InferQueueCompleteMap<TQueues>[K]>>;
651
1053
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options?: QueueSendNoWaitOptions): Promise<void>;
@@ -656,13 +1058,31 @@ type ActorEventSubscribe<TEvents extends EventSchemaConfig> = {
656
1058
  <K extends keyof TEvents & string>(eventName: K, callback: (...args: InferEventArgs<InferSchemaMap<TEvents>[K]>) => void): () => void;
657
1059
  (eventName: keyof TEvents extends never ? string : never, callback: (...args: any[]) => void): () => void;
658
1060
  };
659
- type ActorDefinitionQueueSend<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, any, infer Q, any> ? Q extends QueueSchemaConfig ? {
1061
+ type ActorDefinitionQueueSend<AD extends AnyActorDefinition> = IsAny<AD> extends true ? {
1062
+ send: ActorQueueSend<Record<string, any>>;
1063
+ } : AD extends {
1064
+ config: {
1065
+ queues?: infer Q;
1066
+ };
1067
+ } ? Q extends QueueSchemaConfig ? {
1068
+ send: ActorQueueSend<Q>;
1069
+ } : {} : AD extends BaseActorDefinition<any, any, any, any, any, any, any, infer Q, any> ? Q extends QueueSchemaConfig ? {
660
1070
  send: ActorQueueSend<Q>;
661
- } : never : never;
662
- type ActorDefinitionEventSubscriptions<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, infer E, any, any> ? E extends EventSchemaConfig ? {
1071
+ } : {} : {};
1072
+ type ActorDefinitionEventSubscriptions<AD extends AnyActorDefinition> = IsAny<AD> extends true ? {
1073
+ on: LooseEventSubscribe;
1074
+ once: LooseEventSubscribe;
1075
+ } : AD extends {
1076
+ config: {
1077
+ events?: infer E;
1078
+ };
1079
+ } ? E extends EventSchemaConfig ? {
663
1080
  on: ActorEventSubscribe<E>;
664
1081
  once: ActorEventSubscribe<E>;
665
- } : never : never;
1082
+ } : {} : AD extends BaseActorDefinition<any, any, any, any, any, any, infer E, any, any> ? E extends EventSchemaConfig ? {
1083
+ on: ActorEventSubscribe<E>;
1084
+ once: ActorEventSubscribe<E>;
1085
+ } : {} : {};
666
1086
 
667
1087
  type ActorResolutionState = ActorQuery;
668
1088
 
@@ -1120,6 +1540,7 @@ declare function createClientWithDriver<A extends Registry<any>>(driver: EngineC
1120
1540
 
1121
1541
  declare const DEFAULT_SLEEP_GRACE_PERIOD = 15000;
1122
1542
  declare const ACTOR_CONTEXT_INTERNAL_SYMBOL: unique symbol;
1543
+ declare const RAW_STATE_SYMBOL: unique symbol;
1123
1544
  declare const CONN_DRIVER_SYMBOL: unique symbol;
1124
1545
  declare const CONN_STATE_MANAGER_SYMBOL: unique symbol;
1125
1546
  interface ActorLogger {
@@ -1154,6 +1575,10 @@ type ActorKvListOptions<T extends ActorKvValueType = "text", K extends ActorKvKe
1154
1575
  limit?: number;
1155
1576
  };
1156
1577
  type ActorClientFor<T> = T extends Registry<any> ? Client<T> : T;
1578
+ /**
1579
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`c.db` / `c.sql`)
1580
+ * or actor state instead.
1581
+ */
1157
1582
  interface ActorKv {
1158
1583
  get<T extends ActorKvValueType = "text">(key: Uint8Array | string, options?: ActorKvValueOptions<T>): Promise<ActorKvValueTypeMap[T] | null>;
1159
1584
  put<T extends ActorKvValueType = "text">(key: Uint8Array | string, value: Uint8Array | string | ArrayBuffer, options?: ActorKvValueOptions<T>): Promise<void>;
@@ -1236,7 +1661,7 @@ interface ActorQueue<TQueues extends QueueSchemaConfig = Record<never, never>> {
1236
1661
  iter<const TName extends QueueFilterName<TQueues>, const TCompletable extends boolean = false>(opts?: QueueIterOptions<TName, TCompletable>): AsyncIterable<any>;
1237
1662
  [key: string]: any;
1238
1663
  }
1239
- interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TVars = unknown, TInput = unknown, TDatabase extends AnyDatabaseProvider = AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
1664
+ interface Conn<_TState = unknown, TConnParams = unknown, TConnState = unknown, _TVars = unknown, _TInput = unknown, _TDatabase extends AnyDatabaseProvider = AnyDatabaseProvider, _TEvents extends EventSchemaConfig = Record<never, never>, _TQueues extends QueueSchemaConfig = Record<never, never>> {
1240
1665
  id: string;
1241
1666
  params: TConnParams;
1242
1667
  state: TConnState;
@@ -1248,8 +1673,14 @@ interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TV
1248
1673
  type AnyConn = Conn<any, any, any, any, any, any, any, any>;
1249
1674
  interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
1250
1675
  [ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
1676
+ /** Returns the raw unwrapped state without the write-through proxy. */
1677
+ [RAW_STATE_SYMBOL](): TState;
1251
1678
  state: TState;
1252
1679
  vars: TVars;
1680
+ /**
1681
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`db` / `sql`)
1682
+ * or actor state instead.
1683
+ */
1253
1684
  readonly kv: ActorKv;
1254
1685
  readonly db: InferDatabaseClient<TDatabase>;
1255
1686
  readonly schedule: ActorSchedule;
@@ -1315,6 +1746,75 @@ interface WorkflowInspectorConfig<THistory = unknown> {
1315
1746
  interface RunInspectorConfig<THistory = unknown> {
1316
1747
  workflow?: WorkflowInspectorConfig<THistory>;
1317
1748
  }
1749
+ /**
1750
+ * Built-in inspector tabs the dashboard ships. Used to validate
1751
+ * `hidden: true` entries and reject custom-tab ids that collide with
1752
+ * a built-in.
1753
+ */
1754
+ declare const BUILTIN_INSPECTOR_TAB_IDS: readonly ["workflow", "database", "state", "queue", "connections", "console"];
1755
+ declare const BuiltinInspectorTabIdSchema: z.ZodEnum<{
1756
+ workflow: "workflow";
1757
+ state: "state";
1758
+ database: "database";
1759
+ queue: "queue";
1760
+ connections: "connections";
1761
+ console: "console";
1762
+ }>;
1763
+ declare const CustomInspectorTabEntrySchema: z.ZodObject<{
1764
+ id: z.ZodString;
1765
+ label: z.ZodString;
1766
+ source: z.ZodString;
1767
+ icon: z.ZodOptional<z.ZodString>;
1768
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1769
+ }, z.core.$strict>;
1770
+ declare const HideInspectorTabEntrySchema: z.ZodObject<{
1771
+ id: z.ZodEnum<{
1772
+ workflow: "workflow";
1773
+ state: "state";
1774
+ database: "database";
1775
+ queue: "queue";
1776
+ connections: "connections";
1777
+ console: "console";
1778
+ }>;
1779
+ hidden: z.ZodLiteral<true>;
1780
+ }, z.core.$strict>;
1781
+ declare const InspectorTabEntrySchema: z.ZodUnion<readonly [z.ZodObject<{
1782
+ id: z.ZodString;
1783
+ label: z.ZodString;
1784
+ source: z.ZodString;
1785
+ icon: z.ZodOptional<z.ZodString>;
1786
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1787
+ }, z.core.$strict>, z.ZodObject<{
1788
+ id: z.ZodEnum<{
1789
+ workflow: "workflow";
1790
+ state: "state";
1791
+ database: "database";
1792
+ queue: "queue";
1793
+ connections: "connections";
1794
+ console: "console";
1795
+ }>;
1796
+ hidden: z.ZodLiteral<true>;
1797
+ }, z.core.$strict>]>;
1798
+ declare const ActorInspectorConfigSchema: z.ZodObject<{
1799
+ tabs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1800
+ id: z.ZodString;
1801
+ label: z.ZodString;
1802
+ source: z.ZodString;
1803
+ icon: z.ZodOptional<z.ZodString>;
1804
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1805
+ }, z.core.$strict>, z.ZodObject<{
1806
+ id: z.ZodEnum<{
1807
+ workflow: "workflow";
1808
+ state: "state";
1809
+ database: "database";
1810
+ queue: "queue";
1811
+ connections: "connections";
1812
+ console: "console";
1813
+ }>;
1814
+ hidden: z.ZodLiteral<true>;
1815
+ }, z.core.$strict>]>>>;
1816
+ }, z.core.$strict>;
1817
+ type ActorInspectorConfig = z.input<typeof ActorInspectorConfigSchema>;
1318
1818
  declare const RunConfigSchema: z.ZodObject<{
1319
1819
  name: z.ZodOptional<z.ZodString>;
1320
1820
  icon: z.ZodOptional<z.ZodString>;
@@ -1342,6 +1842,8 @@ declare function getRunMetadata(run: ((...args: any[]) => any) | AnyRunConfig |
1342
1842
  };
1343
1843
  /** Extract run inspector configuration if provided. */
1344
1844
  declare function getRunInspectorConfig(run: ((...args: any[]) => any) | AnyRunConfig | undefined, actor?: unknown): RunInspectorConfig | undefined;
1845
+ /** Release per-actor inspector state for a destroyed actor, if the run handler registered a disposer. */
1846
+ declare function disposeRunInspector(run: ((...args: any[]) => any) | AnyRunConfig | undefined, actorId: string): void;
1345
1847
  declare const GlobalActorOptionsSchema: z.ZodPrefault<z.ZodObject<{
1346
1848
  name: z.ZodOptional<z.ZodString>;
1347
1849
  icon: z.ZodOptional<z.ZodString>;
@@ -1456,8 +1958,27 @@ declare const ActorConfigSchema: z.ZodObject<{
1456
1958
  preloadMaxWorkflowBytes: z.ZodOptional<z.ZodNumber>;
1457
1959
  preloadMaxConnectionsBytes: z.ZodOptional<z.ZodNumber>;
1458
1960
  }, z.core.$strict>>;
1961
+ inspector: z.ZodOptional<z.ZodObject<{
1962
+ tabs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1963
+ id: z.ZodString;
1964
+ label: z.ZodString;
1965
+ source: z.ZodString;
1966
+ icon: z.ZodOptional<z.ZodString>;
1967
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1968
+ }, z.core.$strict>, z.ZodObject<{
1969
+ id: z.ZodEnum<{
1970
+ workflow: "workflow";
1971
+ state: "state";
1972
+ database: "database";
1973
+ queue: "queue";
1974
+ connections: "connections";
1975
+ console: "console";
1976
+ }>;
1977
+ hidden: z.ZodLiteral<true>;
1978
+ }, z.core.$strict>]>>>;
1979
+ }, z.core.$strict>>;
1459
1980
  }, z.core.$strict>;
1460
- type CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1981
+ type CreateState<TState, _TConnParams, _TConnState, _TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1461
1982
  state: TState;
1462
1983
  } | {
1463
1984
  createState: (c: CreateContext<TState, TInput, TDatabase, TEvents, TQueues>, input: TInput) => TState | Promise<TState>;
@@ -1470,7 +1991,7 @@ type CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase e
1470
1991
  /**
1471
1992
  * @experimental
1472
1993
  */
1473
- type CreateVars<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1994
+ type CreateVars<TState, _TConnParams, _TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1474
1995
  /**
1475
1996
  * @experimental
1476
1997
  */
@@ -1660,7 +2181,7 @@ type ActorDatabaseConfig<TDatabase extends AnyDatabaseProvider> = {
1660
2181
  */
1661
2182
  db: TDatabase;
1662
2183
  } | Record<never, never>;
1663
- type ActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> = Omit<z.infer<typeof ActorConfigSchema>, "actions" | "events" | "queues" | "onCreate" | "onDestroy" | "onMigrate" | "onWake" | "onSleep" | "run" | "onStateChange" | "onBeforeConnect" | "onConnect" | "onDisconnect" | "onBeforeActionResponse" | "onRequest" | "onWebSocket" | "state" | "createState" | "connState" | "createConnState" | "vars" | "createVars" | "db"> & BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues, Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>> & CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateVars<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & ActorDatabaseConfig<TDatabase>;
2184
+ type ActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>, TActions extends Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> = Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues>> = Omit<z.infer<typeof ActorConfigSchema>, "actions" | "events" | "queues" | "onCreate" | "onDestroy" | "onMigrate" | "onWake" | "onSleep" | "run" | "onStateChange" | "onBeforeConnect" | "onConnect" | "onDisconnect" | "onBeforeActionResponse" | "onRequest" | "onWebSocket" | "state" | "createState" | "connState" | "createConnState" | "vars" | "createVars" | "db"> & BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues, TActions> & CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateVars<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & ActorDatabaseConfig<TDatabase>;
1664
2185
  type ActorConfigInput<TState = undefined, TConnParams = undefined, TConnState = undefined, TVars = undefined, TInput = undefined, TDatabase extends AnyDatabaseProvider = undefined, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>, TActions extends Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> = Record<never, never>> = {
1665
2186
  types?: ActorTypes<TState, TConnParams, TConnState, TVars, TInput, TDatabase>;
1666
2187
  } & Omit<z.input<typeof ActorConfigSchema>, "actions" | "events" | "queues" | "onCreate" | "onDestroy" | "onMigrate" | "onWake" | "onSleep" | "run" | "onStateChange" | "onBeforeConnect" | "onConnect" | "onDisconnect" | "onBeforeActionResponse" | "onRequest" | "onWebSocket" | "state" | "createState" | "connState" | "createConnState" | "vars" | "createVars" | "db"> & BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues, TActions> & CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & CreateVars<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TEvents, TQueues> & ActorDatabaseConfig<TDatabase>;
@@ -1739,4 +2260,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
1739
2260
  }, z.core.$strip>>;
1740
2261
  }, z.core.$strip>;
1741
2262
 
1742
- export { DocConfigurePoolSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorSchedule as F, type ActorTypes as G, ActorsSchema as H, type AnyActorInstance as I, type AnyClient as J, type AnyConn as K, type AnyStaticActorDefinition as L, type MigrateContext as M, type AnyStaticActorInstance as N, type AuthIntent as O, type BaseActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, CONN_DRIVER_SYMBOL as T, CONN_STATE_MANAGER_SYMBOL as U, type Client as V, type WakeContext as W, type Conn as X, DEFAULT_SLEEP_GRACE_PERIOD as Y, DocActorConfigSchema as Z, DocActorOptionsSchema as _, type ActionContext as a, type ActorActionFunction as a$, DocEnvoyConfigSchema as a0, DocRegistryConfigSchema as a1, DocServerlessConfigSchema as a2, DocSqliteConfigSchema as a3, type Encoding as a4, type FetchHandler as a5, type GlobalActorOptions as a6, type GlobalActorOptionsInput as a7, GlobalActorOptionsSchema as a8, type InspectorUnsubscribe as a9, type ServerlessHandler as aA, type SqliteBackend as aB, SqliteBackendSchema as aC, type SqliteConfig as aD, SqliteConfigSchema as aE, type TestConfig as aF, TestConfigSchema as aG, type Type as aH, type WasmRuntimeBindings as aI, type WasmRuntimeConfig as aJ, WasmRuntimeConfigSchema as aK, type WasmRuntimeInitInput as aL, type WorkflowInspectorConfig as aM, actor as aN, buildActorNames as aO, createClientWithDriver as aP, event as aQ, getRunFunction as aR, getRunInspectorConfig as aS, getRunMetadata as aT, isStaticActorDefinition as aU, isStaticActorInstance as aV, lookupInRegistry as aW, queue as aX, setup as aY, test as aZ, type ActorAccessor as a_, type InstanceActorOptions as aa, type InstanceActorOptionsInput as ab, InstanceActorOptionsSchema as ac, type QueueEnqueueAndWaitOptions as ad, type QueueFilterName as ae, type QueueIterOptions as af, type QueueMessageOf as ag, type QueueName as ah, type QueueNextBatchOptions as ai, type QueueNextOptions as aj, type QueueResultMessageForName as ak, type QueueTryNextBatchOptions as al, type QueueTryNextOptions as am, type QueueWaitOptions as an, RUN_FUNCTION_CONFIG_SYMBOL as ao, Registry as ap, type RegistryActors as aq, type RegistryConfig as ar, type RegistryConfigInput as as, RegistryConfigSchema as at, type RegistryRoutes as au, type RunConfig as av, RunConfigSchema as aw, type RunInspectorConfig as ax, type RuntimeKind as ay, RuntimeKindSchema as az, type BeforeActionResponseContext as b, type ActorActionOptions as b0, type ActorConn as b1, ActorConnRaw as b2, type ActorConnStatus as b3, type ActorConnectOptions as b4, type ActorGatewayOptions as b5, type ActorHandle as b6, ActorHandleRaw as b7, ClientRaw as b8, type ConnectionStateCallback as b9, type CreateOptions as ba, type CreateRequest as bb, type EventUnsubscribe as bc, type ExtractActorsFromRegistry as bd, type ExtractRegistryFromClient as be, type GetOptions as bf, type GetWithIdOptions as bg, type QueryOptions as bh, type Region as bi, type StatusChangeCallback as bj, type InferSchemaMap as bk, type InferEventArgs as bl, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type Actions as l, type ActorConfig as m, type ActorConfigInput as n, ActorConfigSchema as o, type ActorContext as p, type ActorContextOf as q, ActorDefinition as r, type ActorKey as s, type ActorKv as t, type ActorLogger as u, type ActorOptions as v, type ActorOptionsInput as w, ActorOptionsSchema as x, type ActorQuery as y, type ActorQueue as z };
2263
+ export { type Conn as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorQuery as F, type ActorQueue as G, type ActorSchedule as H, type ActorTypes as I, ActorsSchema as J, type AnyActorInstance as K, type AnyClient as L, type MigrateContext as M, type AnyConn as N, type AnyStaticActorDefinition as O, type AnyStaticActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, type AuthIntent as T, BUILTIN_INSPECTOR_TAB_IDS as U, type BaseActorInstance as V, type WakeContext as W, BuiltinInspectorTabIdSchema as X, CONN_DRIVER_SYMBOL as Y, CONN_STATE_MANAGER_SYMBOL as Z, type Client as _, type ActionContext as a, getRunFunction as a$, CustomInspectorTabEntrySchema as a0, DEFAULT_SLEEP_GRACE_PERIOD as a1, DocActorConfigSchema as a2, DocActorOptionsSchema as a3, DocConfigurePoolSchema as a4, DocEnvoyConfigSchema as a5, DocRegistryConfigSchema as a6, DocServerlessConfigSchema as a7, DocSqliteConfigSchema as a8, type Encoding as a9, type RegistryConfigInput as aA, RegistryConfigSchema as aB, type RegistryDeps as aC, type RegistryRoutes as aD, type RunConfig as aE, RunConfigSchema as aF, type RunInspectorConfig as aG, type RuntimeKind as aH, RuntimeKindSchema as aI, type ServerlessHandler as aJ, type SqliteBackend as aK, SqliteBackendSchema as aL, type SqliteConfig as aM, SqliteConfigSchema as aN, type TestConfig as aO, TestConfigSchema as aP, type Type as aQ, type WasmRuntimeBindings as aR, type WasmRuntimeConfig as aS, WasmRuntimeConfigSchema as aT, type WasmRuntimeInitInput as aU, type WorkflowInspectorConfig as aV, actor as aW, buildActorNames as aX, createClientWithDriver as aY, disposeRunInspector as aZ, event as a_, type FetchHandler as aa, type GlobalActorOptions as ab, type GlobalActorOptionsInput as ac, GlobalActorOptionsSchema as ad, HideInspectorTabEntrySchema as ae, InspectorTabEntrySchema as af, type InspectorUnsubscribe as ag, type InstanceActorOptions as ah, type InstanceActorOptionsInput as ai, InstanceActorOptionsSchema as aj, type QueueEnqueueAndWaitOptions as ak, type QueueFilterName as al, type QueueIterOptions as am, type QueueMessageOf as an, type QueueName as ao, type QueueNextBatchOptions as ap, type QueueNextOptions as aq, type QueueResultMessageForName as ar, type QueueTryNextBatchOptions as as, type QueueTryNextOptions as at, type QueueWaitOptions as au, RAW_STATE_SYMBOL as av, RUN_FUNCTION_CONFIG_SYMBOL as aw, Registry as ax, type RegistryActors as ay, type RegistryConfig as az, type BeforeActionResponseContext as b, getRunInspectorConfig as b0, getRunMetadata as b1, isStaticActorDefinition as b2, isStaticActorInstance as b3, lookupInRegistry as b4, queue as b5, setup as b6, test as b7, type ActorAccessor as b8, type ActorActionFunction as b9, type ActorActionOptions as ba, type ActorConn as bb, ActorConnRaw as bc, type ActorConnStatus as bd, type ActorConnectOptions as be, type ActorGatewayOptions as bf, type ActorHandle as bg, ActorHandleRaw as bh, ClientRaw as bi, type ConnectionStateCallback as bj, type CreateOptions as bk, type CreateRequest as bl, type EventUnsubscribe as bm, type ExtractActorsFromRegistry as bn, type ExtractRegistryFromClient as bo, type GetOptions as bp, type GetWithIdOptions as bq, type QueryOptions as br, type Region as bs, type StatusChangeCallback as bt, type InferEventArgs as bu, type InferSchemaMap as bv, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type Actions as l, type ActorConfig as m, type ActorConfigInput as n, ActorConfigSchema as o, type ActorContext as p, type ActorContextOf as q, ActorDefinition as r, type ActorInspectorConfig as s, ActorInspectorConfigSchema as t, type ActorKey as u, type ActorKv as v, type ActorLogger as w, type ActorOptions as x, type ActorOptionsInput as y, ActorOptionsSchema as z };