rivetkit 2.3.0-rc.9 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/dist/browser/client.d.ts +498 -62
  2. package/dist/browser/client.js +227 -171
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +50 -20
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/actor/errors.cjs +2 -2
  7. package/dist/tsup/actor/errors.d.cts +1 -1
  8. package/dist/tsup/actor/errors.d.ts +1 -1
  9. package/dist/tsup/actor/errors.js +1 -1
  10. package/dist/tsup/agent-os/index.cjs +2163 -2087
  11. package/dist/tsup/agent-os/index.cjs.map +1 -1
  12. package/dist/tsup/agent-os/index.d.cts +496 -69
  13. package/dist/tsup/agent-os/index.d.ts +496 -69
  14. package/dist/tsup/agent-os/index.js +2163 -2087
  15. package/dist/tsup/agent-os/index.js.map +1 -1
  16. package/dist/tsup/{chunk-W7EYSYVI.js → chunk-2OTRTA3J.js} +134 -20
  17. package/dist/tsup/chunk-2OTRTA3J.js.map +1 -0
  18. package/dist/tsup/{chunk-VJFRBJVQ.cjs → chunk-3677IIOV.cjs} +138 -24
  19. package/dist/tsup/chunk-3677IIOV.cjs.map +1 -0
  20. package/dist/tsup/{chunk-4CGA6QJO.cjs → chunk-47HHIEXH.cjs} +24 -9
  21. package/dist/tsup/chunk-47HHIEXH.cjs.map +1 -0
  22. package/dist/tsup/{chunk-F3Q5BFQ6.js → chunk-4JDSFJS5.js} +66 -79
  23. package/dist/tsup/chunk-4JDSFJS5.js.map +1 -0
  24. package/dist/tsup/{chunk-GVTOE34S.cjs → chunk-7QKCIVAY.cjs} +222 -235
  25. package/dist/tsup/chunk-7QKCIVAY.cjs.map +1 -0
  26. package/dist/tsup/{chunk-CPA4Y3RG.cjs → chunk-B6VUNZUD.cjs} +10 -10
  27. package/dist/tsup/chunk-B6VUNZUD.cjs.map +1 -0
  28. package/dist/tsup/{chunk-H37XQU3I.js → chunk-BEI24WTI.js} +2 -2
  29. package/dist/tsup/{chunk-KIWH5H3K.js → chunk-BRP62GZC.js} +3 -3
  30. package/dist/tsup/chunk-BRP62GZC.js.map +1 -0
  31. package/dist/tsup/{chunk-T6YVRM4K.js → chunk-DPIMKYNB.js} +63 -2
  32. package/dist/tsup/chunk-DPIMKYNB.js.map +1 -0
  33. package/dist/tsup/{chunk-Y5NSCZA2.cjs → chunk-DXXJPH55.cjs} +44 -15
  34. package/dist/tsup/chunk-DXXJPH55.cjs.map +1 -0
  35. package/dist/tsup/{chunk-3YY5S6TV.js → chunk-HXUEHHJF.js} +2 -2
  36. package/dist/tsup/chunk-HXUEHHJF.js.map +1 -0
  37. package/dist/tsup/{chunk-4WPEZBK4.cjs → chunk-I4LN3FNT.cjs} +10 -10
  38. package/dist/tsup/chunk-I4LN3FNT.cjs.map +1 -0
  39. package/dist/tsup/{chunk-PCBNKI2J.js → chunk-JZ7TWV65.js} +1 -1
  40. package/dist/tsup/chunk-JZ7TWV65.js.map +1 -0
  41. package/dist/tsup/{chunk-QAZLM4WT.cjs → chunk-KORQB2IR.cjs} +3 -3
  42. package/dist/tsup/{chunk-QAZLM4WT.cjs.map → chunk-KORQB2IR.cjs.map} +1 -1
  43. package/dist/tsup/{chunk-MALSPBAF.cjs → chunk-LVTBW2RE.cjs} +3 -3
  44. package/dist/tsup/{chunk-MALSPBAF.cjs.map → chunk-LVTBW2RE.cjs.map} +1 -1
  45. package/dist/tsup/{chunk-H7P7WR2Y.js → chunk-MEHBWPLJ.js} +6 -6
  46. package/dist/tsup/chunk-MEHBWPLJ.js.map +1 -0
  47. package/dist/tsup/{chunk-WQ4HNA4W.cjs → chunk-NIY3RSPX.cjs} +64 -3
  48. package/dist/tsup/chunk-NIY3RSPX.cjs.map +1 -0
  49. package/dist/tsup/{chunk-MMMEZM5J.js → chunk-P2GNQ4RN.js} +4 -4
  50. package/dist/tsup/chunk-P2GNQ4RN.js.map +1 -0
  51. package/dist/tsup/{chunk-KJTA3ATT.js → chunk-UMZVD6DQ.js} +22 -7
  52. package/dist/tsup/chunk-UMZVD6DQ.js.map +1 -0
  53. package/dist/tsup/{chunk-LD5YASJU.cjs → chunk-VE2X4KMG.cjs} +2 -2
  54. package/dist/tsup/{chunk-LD5YASJU.cjs.map → chunk-VE2X4KMG.cjs.map} +1 -1
  55. package/dist/tsup/{chunk-VRCIXJRN.js → chunk-VTTFNQQI.js} +36 -7
  56. package/dist/tsup/chunk-VTTFNQQI.js.map +1 -0
  57. package/dist/tsup/{chunk-2NDZ7JCR.cjs → chunk-ZA7FLHKH.cjs} +1 -1
  58. package/dist/tsup/chunk-ZA7FLHKH.cjs.map +1 -0
  59. package/dist/tsup/client/mod.cjs +9 -9
  60. package/dist/tsup/client/mod.d.cts +5 -5
  61. package/dist/tsup/client/mod.d.ts +5 -5
  62. package/dist/tsup/client/mod.js +8 -8
  63. package/dist/tsup/common/log.cjs +3 -3
  64. package/dist/tsup/common/log.js +2 -2
  65. package/dist/tsup/common/websocket.cjs +4 -4
  66. package/dist/tsup/common/websocket.js +3 -3
  67. package/dist/tsup/{config-0Ta55UV0.d.ts → config-BxWAw3iH.d.ts} +529 -23
  68. package/dist/tsup/{config-Ca8dN4cS.d.cts → config-CZQQ-mso.d.cts} +529 -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/{context-B_IWbWne.d.ts → context-Bw7xq8w3.d.cts} +8 -8
  72. package/dist/tsup/{context-CUrQ9MHc.d.cts → context-D8QA76sV.d.ts} +8 -8
  73. package/dist/tsup/db/drizzle.cjs +3 -3
  74. package/dist/tsup/db/drizzle.d.cts +1 -1
  75. package/dist/tsup/db/drizzle.d.ts +1 -1
  76. package/dist/tsup/db/drizzle.js +1 -1
  77. package/dist/tsup/db/mod.cjs +2 -2
  78. package/dist/tsup/db/mod.d.cts +2 -2
  79. package/dist/tsup/db/mod.d.ts +2 -2
  80. package/dist/tsup/db/mod.js +1 -1
  81. package/dist/tsup/dynamic/mod.cjs +24 -0
  82. package/dist/tsup/dynamic/mod.cjs.map +1 -0
  83. package/dist/tsup/dynamic/mod.d.cts +37 -0
  84. package/dist/tsup/dynamic/mod.d.ts +37 -0
  85. package/dist/tsup/dynamic/mod.js +24 -0
  86. package/dist/tsup/dynamic/mod.js.map +1 -0
  87. package/dist/tsup/inspector/mod.cjs +6 -6
  88. package/dist/tsup/inspector/mod.js +5 -5
  89. package/dist/tsup/inspector-tab/mod.cjs +173 -0
  90. package/dist/tsup/inspector-tab/mod.cjs.map +1 -0
  91. package/dist/tsup/inspector-tab/mod.d.cts +250 -0
  92. package/dist/tsup/inspector-tab/mod.d.ts +250 -0
  93. package/dist/tsup/inspector-tab/mod.js +173 -0
  94. package/dist/tsup/inspector-tab/mod.js.map +1 -0
  95. package/dist/tsup/mod.cjs +730 -336
  96. package/dist/tsup/mod.cjs.map +1 -1
  97. package/dist/tsup/mod.d.cts +5 -5
  98. package/dist/tsup/mod.d.ts +5 -5
  99. package/dist/tsup/mod.js +633 -239
  100. package/dist/tsup/mod.js.map +1 -1
  101. package/dist/tsup/test/mod.cjs +21 -18
  102. package/dist/tsup/test/mod.cjs.map +1 -1
  103. package/dist/tsup/test/mod.d.cts +4 -4
  104. package/dist/tsup/test/mod.d.ts +4 -4
  105. package/dist/tsup/test/mod.js +18 -15
  106. package/dist/tsup/test/mod.js.map +1 -1
  107. package/dist/tsup/{utils-DVekpm4I.d.cts → utils-DQosb24I.d.cts} +1 -1
  108. package/dist/tsup/{utils-DVekpm4I.d.ts → utils-DQosb24I.d.ts} +1 -1
  109. package/dist/tsup/utils.cjs +3 -3
  110. package/dist/tsup/utils.d.cts +1 -1
  111. package/dist/tsup/utils.d.ts +1 -1
  112. package/dist/tsup/utils.js +2 -2
  113. package/dist/tsup/workflow/mod.cjs +307 -282
  114. package/dist/tsup/workflow/mod.cjs.map +1 -1
  115. package/dist/tsup/workflow/mod.d.cts +6 -6
  116. package/dist/tsup/workflow/mod.d.ts +6 -6
  117. package/dist/tsup/workflow/mod.js +501 -476
  118. package/dist/tsup/workflow/mod.js.map +1 -1
  119. package/package.json +32 -11
  120. package/src/actor/config.ts +159 -51
  121. package/src/actor/contexts/index.ts +7 -2
  122. package/src/actor/definition.ts +17 -19
  123. package/src/actor/driver.ts +3 -3
  124. package/src/actor/errors.ts +9 -3
  125. package/src/actor/instance/mod.ts +26 -34
  126. package/src/actor/keys.ts +1 -1
  127. package/src/actor/mod.ts +22 -20
  128. package/src/actor/schema.ts +2 -2
  129. package/src/agent-os/actor/index.ts +38 -18
  130. package/src/agent-os/actor/preview.ts +1 -2
  131. package/src/agent-os/actor/session.ts +2 -2
  132. package/src/agent-os/config.ts +1 -1
  133. package/src/agent-os/fs/database-vfs.ts +1 -1
  134. package/src/agent-os/index.ts +16 -15
  135. package/src/client/actor-common.ts +87 -54
  136. package/src/client/actor-conn.ts +8 -36
  137. package/src/client/actor-handle.ts +69 -51
  138. package/src/client/actor-query.ts +5 -5
  139. package/src/client/errors.ts +1 -1
  140. package/src/client/lifecycle-errors.ts +2 -4
  141. package/src/client/query.ts +1 -1
  142. package/src/client/queue.ts +8 -3
  143. package/src/client/raw-utils.ts +8 -6
  144. package/src/client/resolve-gateway-target.ts +1 -1
  145. package/src/client/utils.ts +2 -7
  146. package/src/common/actor-websocket.ts +3 -1
  147. package/src/common/bare/actor-persist/v1.ts +205 -163
  148. package/src/common/bare/actor-persist/v2.ts +265 -213
  149. package/src/common/bare/actor-persist/v3.ts +176 -172
  150. package/src/common/bare/actor-persist/v4.ts +254 -253
  151. package/src/common/bare/transport/v1.ts +659 -543
  152. package/src/common/client-protocol-versioned.ts +66 -64
  153. package/src/common/database/config.ts +2 -8
  154. package/src/common/database/native-database.ts +1 -1
  155. package/src/common/database/shared.ts +1 -0
  156. package/src/common/encoding.ts +250 -16
  157. package/src/common/engine.ts +28 -1
  158. package/src/common/eventsource.ts +1 -1
  159. package/src/common/inline-websocket-adapter.ts +14 -13
  160. package/src/common/log.ts +1 -0
  161. package/src/common/router.ts +13 -17
  162. package/src/common/utils.ts +1 -150
  163. package/src/common/websocket-interface.ts +1 -1
  164. package/src/db/mod.ts +1 -1
  165. package/src/devtools-loader/index.ts +4 -7
  166. package/src/devtools-loader/serve-devtools.ts +26 -0
  167. package/src/drivers/engine/actor-driver.ts +58 -56
  168. package/src/dynamic/instance.ts +32 -0
  169. package/src/dynamic/internal.ts +50 -0
  170. package/src/dynamic/isolate-runtime.ts +66 -0
  171. package/src/dynamic/mod.ts +32 -0
  172. package/src/engine-client/actor-http-client.ts +3 -3
  173. package/src/engine-client/actor-websocket-client.ts +6 -5
  174. package/src/engine-client/api-endpoints.ts +51 -2
  175. package/src/engine-client/api-utils.ts +2 -2
  176. package/src/engine-client/driver.ts +1 -1
  177. package/src/engine-client/mod.ts +6 -3
  178. package/src/engine-client/ws-proxy.ts +9 -4
  179. package/src/inspector/client.browser.ts +5 -11
  180. package/src/inspector/mod.ts +1 -3
  181. package/src/inspector-tab/mod.ts +315 -0
  182. package/src/registry/config/envoy.ts +1 -2
  183. package/src/registry/config/index.ts +40 -16
  184. package/src/registry/index.ts +154 -74
  185. package/src/registry/napi-runtime.ts +13 -2
  186. package/src/registry/native-validation.ts +10 -12
  187. package/src/registry/native.ts +367 -181
  188. package/src/registry/process-metrics.ts +250 -0
  189. package/src/registry/runtime.ts +41 -1
  190. package/src/registry/wasm-runtime.ts +18 -2
  191. package/src/registry/write-through-proxy.ts +40 -0
  192. package/src/serde.ts +2 -2
  193. package/src/serverless/configure.ts +18 -7
  194. package/src/test/mod.ts +11 -8
  195. package/src/utils/endpoint-parser.ts +1 -1
  196. package/src/utils/env-vars.ts +6 -0
  197. package/src/utils/router.ts +1 -1
  198. package/src/utils/serve.ts +4 -5
  199. package/src/utils.ts +1 -2
  200. package/src/workflow/context.ts +61 -33
  201. package/src/workflow/driver.ts +4 -6
  202. package/src/workflow/inspector.ts +4 -3
  203. package/src/workflow/mod.ts +15 -17
  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-T6YVRM4K.js.map +0 -1
  217. package/dist/tsup/chunk-VJFRBJVQ.cjs.map +0 -1
  218. package/dist/tsup/chunk-VRCIXJRN.js.map +0 -1
  219. package/dist/tsup/chunk-W7EYSYVI.js.map +0 -1
  220. package/dist/tsup/chunk-WQ4HNA4W.cjs.map +0 -1
  221. package/dist/tsup/chunk-Y5NSCZA2.cjs.map +0 -1
  222. /package/dist/tsup/{chunk-H37XQU3I.js.map → chunk-BEI24WTI.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.cjs';
2
+ import { A as AnyDatabaseProvider, d as SqliteNativeMetrics, I as InferDatabaseClient } from './config-D49x8NpL.cjs';
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.cjs';
10
- import { R as RivetError } from './utils-DVekpm4I.cjs';
10
+ import { R as RivetError } from './utils-DQosb24I.cjs';
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,335 @@ 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 RuntimeServerlessRequest {
764
+ method: string;
765
+ url: string;
766
+ headers: Record<string, string>;
767
+ body: RuntimeBytes;
768
+ }
769
+ interface RuntimeServerlessResponseHead {
770
+ status: number;
771
+ headers: Record<string, string>;
772
+ }
773
+ interface RuntimeRegistryRouteResponse {
774
+ status: number;
775
+ headers: Record<string, string>;
776
+ body: RuntimeBytes;
777
+ }
778
+ type RuntimeServerlessStreamEvent = {
779
+ kind: "chunk";
780
+ chunk?: RuntimeBytes;
781
+ } | {
782
+ kind: "end";
783
+ error?: {
784
+ group: string;
785
+ code: string;
786
+ message: string;
787
+ };
788
+ };
789
+ type RuntimeServerlessStreamCallback = (error: unknown, event?: RuntimeServerlessStreamEvent) => unknown;
790
+ type RuntimeWebSocketEvent = {
791
+ kind: "message";
792
+ data: string | RuntimeBytes;
793
+ binary: boolean;
794
+ messageIndex?: number;
795
+ } | {
796
+ kind: "close";
797
+ code: number;
798
+ reason: string;
799
+ wasClean: boolean;
800
+ };
801
+ interface CoreRuntime {
802
+ readonly kind: "napi" | "wasm";
803
+ createRegistry(): RegistryHandle;
804
+ registerActor(registry: RegistryHandle, name: string, factory: ActorFactoryHandle): void;
805
+ serveRegistry(registry: RegistryHandle, config: RuntimeServeConfig): Promise<void>;
806
+ shutdownRegistry(registry: RegistryHandle): Promise<void>;
807
+ registryActorStopThresholdMs?(registry: RegistryHandle): Promise<number | undefined>;
808
+ handleServerlessRequest(registry: RegistryHandle, req: RuntimeServerlessRequest, onStreamEvent: RuntimeServerlessStreamCallback, cancelToken: CancellationTokenHandle, config: RuntimeServeConfig): Promise<RuntimeServerlessResponseHead>;
809
+ registryHealth?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
810
+ registryMetadata?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
811
+ registryMetrics?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
812
+ createActorFactory(callbacks: object, config?: RuntimeActorConfig | undefined | null): ActorFactoryHandle;
813
+ createCancellationToken(): CancellationTokenHandle;
814
+ cancellationTokenAborted(token: CancellationTokenHandle): boolean;
815
+ cancelCancellationToken(token: CancellationTokenHandle): void;
816
+ onCancellationTokenCancelled(token: CancellationTokenHandle, callback: (...args: unknown[]) => unknown): void;
817
+ actorState(ctx: ActorContextHandle): RuntimeBytes;
818
+ actorBeginOnStateChange(ctx: ActorContextHandle): void;
819
+ actorEndOnStateChange(ctx: ActorContextHandle): void;
820
+ actorSetAlarm(ctx: ActorContextHandle, timestampMs?: number | undefined | null): void;
821
+ actorRequestSave(ctx: ActorContextHandle, opts?: RuntimeRequestSaveOpts | undefined | null): void;
822
+ actorRequestSaveAndWait(ctx: ActorContextHandle, opts?: RuntimeRequestSaveOpts | undefined | null): Promise<void>;
823
+ actorInspectorSnapshot(ctx: ActorContextHandle): RuntimeInspectorSnapshot;
824
+ actorDecodeInspectorRequest(ctx: ActorContextHandle, bytes: RuntimeBytes, advertisedVersion: number): RuntimeBytes;
825
+ actorEncodeInspectorResponse(ctx: ActorContextHandle, bytes: RuntimeBytes, targetVersion: number): RuntimeBytes;
826
+ actorVerifyInspectorAuth(ctx: ActorContextHandle, bearerToken?: string | undefined | null): Promise<void>;
827
+ actorQueueHibernationRemoval(ctx: ActorContextHandle, connId: string): void;
828
+ actorTakePendingHibernationChanges(ctx: ActorContextHandle): string[];
829
+ actorDirtyHibernatableConns(ctx: ActorContextHandle): ConnHandle[];
830
+ actorSaveState(ctx: ActorContextHandle, payload: RuntimeStateDeltaPayload): Promise<void>;
831
+ actorId(ctx: ActorContextHandle): string;
832
+ actorName(ctx: ActorContextHandle): string;
833
+ actorKey(ctx: ActorContextHandle): RuntimeActorKeySegment[];
834
+ actorRegion(ctx: ActorContextHandle): string;
835
+ actorSleep(ctx: ActorContextHandle): void;
836
+ actorDestroy(ctx: ActorContextHandle): void;
837
+ actorAbortSignal(ctx: ActorContextHandle): AbortSignal;
838
+ actorConns(ctx: ActorContextHandle): ConnHandle[];
839
+ actorConnectConn(ctx: ActorContextHandle, params: RuntimeBytes, request?: RuntimeHttpRequest | undefined | null): Promise<ConnHandle>;
840
+ actorBroadcast(ctx: ActorContextHandle, name: string, args: RuntimeBytes): void;
841
+ actorWaitUntil(ctx: ActorContextHandle, promise: Promise<unknown>): void;
842
+ actorWaitForTrackedShutdownWork(ctx: ActorContextHandle): Promise<boolean>;
843
+ actorWaitForTrackedShutdownWorkUnbounded(ctx: ActorContextHandle): Promise<void>;
844
+ actorKeepAwake(ctx: ActorContextHandle, promise: Promise<unknown>): void;
845
+ actorBeginKeepAwake(ctx: ActorContextHandle): number;
846
+ actorEndKeepAwake(ctx: ActorContextHandle, regionId: number): void;
847
+ actorRegisterTask(ctx: ActorContextHandle, promise: Promise<unknown>): void;
848
+ actorRuntimeState(ctx: ActorContextHandle): object;
849
+ actorClearRuntimeState(ctx: ActorContextHandle): void;
850
+ actorRestartRunHandler(ctx: ActorContextHandle): void;
851
+ actorBeginWebsocketCallback(ctx: ActorContextHandle): number;
852
+ actorEndWebsocketCallback(ctx: ActorContextHandle, regionId: number): void;
853
+ actorKvGet(ctx: ActorContextHandle, key: RuntimeBytes): Promise<RuntimeBytes | null>;
854
+ actorKvPut(ctx: ActorContextHandle, key: RuntimeBytes, value: RuntimeBytes): Promise<void>;
855
+ actorKvDelete(ctx: ActorContextHandle, key: RuntimeBytes): Promise<void>;
856
+ actorKvDeleteRange(ctx: ActorContextHandle, start: RuntimeBytes, end: RuntimeBytes): Promise<void>;
857
+ actorKvListPrefix(ctx: ActorContextHandle, prefix: RuntimeBytes, options?: RuntimeKvListOptions | undefined | null): Promise<RuntimeKvEntry[]>;
858
+ actorKvListRange(ctx: ActorContextHandle, start: RuntimeBytes, end: RuntimeBytes, options?: RuntimeKvListOptions | undefined | null): Promise<RuntimeKvEntry[]>;
859
+ actorKvBatchGet(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<Array<RuntimeBytes | undefined | null>>;
860
+ actorKvBatchPut(ctx: ActorContextHandle, entries: RuntimeKvEntry[]): Promise<void>;
861
+ actorKvBatchDelete(ctx: ActorContextHandle, keys: RuntimeBytes[]): Promise<void>;
862
+ actorSqlExec(ctx: ActorContextHandle, sql: string): Promise<RuntimeSqlExecResult>;
863
+ actorSqlExecute(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlExecuteResult>;
864
+ actorSqlQuery(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlQueryResult>;
865
+ actorSqlRun(ctx: ActorContextHandle, sql: string, params?: RuntimeSqlBindParams): Promise<RuntimeSqlRunResult>;
866
+ actorSqlMetrics(ctx: ActorContextHandle): SqliteNativeMetrics | null;
867
+ actorSqlTakeLastKvError(ctx: ActorContextHandle): string | null;
868
+ actorSqlClose(ctx: ActorContextHandle): Promise<void>;
869
+ actorQueueSend(ctx: ActorContextHandle, name: string, body: RuntimeBytes): Promise<RuntimeQueueMessage>;
870
+ actorQueueNextBatch(ctx: ActorContextHandle, options?: RuntimeQueueNextBatchOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage[]>;
871
+ actorQueueWaitForNames(ctx: ActorContextHandle, names: string[], options?: RuntimeQueueWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeQueueMessage>;
872
+ actorQueueWaitForNamesAvailable(ctx: ActorContextHandle, names: string[], options?: RuntimeQueueWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<void>;
873
+ actorQueueEnqueueAndWait(ctx: ActorContextHandle, name: string, body: RuntimeBytes, options?: RuntimeQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationTokenHandle | undefined | null): Promise<RuntimeBytes | null>;
874
+ actorQueueTryNextBatch(ctx: ActorContextHandle, options?: RuntimeQueueTryNextBatchOptions | undefined | null): RuntimeQueueMessage[];
875
+ actorQueueMaxSize(ctx: ActorContextHandle): number;
876
+ actorQueueInspectMessages(ctx: ActorContextHandle): Promise<RuntimeQueueInspectMessage[]>;
877
+ actorScheduleAfter(ctx: ActorContextHandle, durationMs: number, actionName: string, args: RuntimeBytes): void;
878
+ actorScheduleAt(ctx: ActorContextHandle, timestampMs: number, actionName: string, args: RuntimeBytes): void;
879
+ connId(conn: ConnHandle): string;
880
+ connParams(conn: ConnHandle): RuntimeBytes;
881
+ connState(conn: ConnHandle): RuntimeBytes;
882
+ connSetState(conn: ConnHandle, state: RuntimeBytes): void;
883
+ connIsHibernatable(conn: ConnHandle): boolean;
884
+ connSend(conn: ConnHandle, name: string, args: RuntimeBytes): void;
885
+ connDisconnect(conn: ConnHandle, reason?: string | undefined | null): Promise<void>;
886
+ webSocketSend(ws: WebSocketHandle, data: RuntimeBytes, binary: boolean): void;
887
+ webSocketClose(ws: WebSocketHandle, code?: number | undefined | null, reason?: string | undefined | null): Promise<void>;
888
+ webSocketSetEventCallback(ws: WebSocketHandle, callback: (event: RuntimeWebSocketEvent) => void): void;
889
+ }
890
+
891
+ declare function buildConfiguredRegistry(config: RegistryConfig): Promise<{
892
+ runtime: CoreRuntime;
893
+ registry: RegistryHandle;
894
+ serveConfig: RuntimeServeConfig;
895
+ }>;
896
+
560
897
  type FetchHandler = (request: Request, ...args: any) => Response | Promise<Response>;
561
898
  interface ServerlessHandler {
562
899
  fetch: FetchHandler;
@@ -566,12 +903,20 @@ interface RegistryRoutes {
566
903
  metadata(): Promise<Response>;
567
904
  prometheusMetrics(request?: Request): Promise<Response>;
568
905
  }
906
+ /**
907
+ * Injectable dependencies for {@link Registry}. Production code uses the
908
+ * defaults. Tests override `buildConfiguredRegistry` to drive lifecycle
909
+ * orchestration against a fake `CoreRuntime` without an engine.
910
+ */
911
+ interface RegistryDeps {
912
+ buildConfiguredRegistry: typeof buildConfiguredRegistry;
913
+ }
569
914
  declare class Registry<A extends RegistryActors> {
570
915
  #private;
571
916
  readonly routes: RegistryRoutes;
572
917
  get config(): RegistryConfigInput<A>;
573
918
  parseConfig(): RegistryConfig;
574
- constructor(config: RegistryConfigInput<A>);
919
+ constructor(config: RegistryConfigInput<A>, deps?: Partial<RegistryDeps>);
575
920
  /**
576
921
  * Handle an incoming HTTP request for serverless deployments.
577
922
  *
@@ -592,6 +937,46 @@ declare class Registry<A extends RegistryActors> {
592
937
  * ```
593
938
  */
594
939
  serve(): ServerlessHandler;
940
+ /**
941
+ * Starts an HTTP server that dispatches every request through the
942
+ * serverless handler. Uses `crossPlatformServe` to pick the right
943
+ * runtime (Node, Bun, Deno).
944
+ *
945
+ * @param opts.port Port to listen on. Defaults to 3000.
946
+ * @param opts.publicDir If set, serves static files from this directory
947
+ * before falling through to the registry handler.
948
+ *
949
+ * @example
950
+ * ```ts
951
+ * await registry.listen();
952
+ * await registry.listen({ port: 8080, publicDir: "./public" });
953
+ * ```
954
+ */
955
+ listen(opts?: {
956
+ port?: number;
957
+ publicDir?: string;
958
+ }): Promise<void>;
959
+ /**
960
+ * Gracefully drains all live registries.
961
+ *
962
+ * Programmatic counterpart to the SIGINT/SIGTERM handlers: tears down
963
+ * every live `CoreRegistry` (both `start()` and `handler()` modes) and
964
+ * waits for the serve promise to resolve, all bounded by the shutdown
965
+ * grace period. Unlike a signal-driven shutdown, this does not re-raise a
966
+ * signal or exit the process. The caller owns process lifetime.
967
+ *
968
+ * Idempotent: concurrent or repeated calls share a single drain. Safe to
969
+ * call even if nothing has been started.
970
+ *
971
+ * @example
972
+ * ```ts
973
+ * const registry = setup({ use: { counter } });
974
+ * registry.start();
975
+ * // ...later, on your own shutdown trigger:
976
+ * await registry.shutdown();
977
+ * ```
978
+ */
979
+ shutdown(): Promise<void>;
595
980
  startEnvoy(): void;
596
981
  /**
597
982
  * Starts the actor envoy for standalone server deployments.
@@ -631,6 +1016,12 @@ interface QueueSendResult<TResponse = unknown> {
631
1016
  * @returns {Promise<Response>}
632
1017
  */
633
1018
  type ActorActionFunction<Args extends Array<unknown> = unknown[], Response = unknown> = (...args: Args extends [unknown, ...infer Rest] ? Rest : Args) => Promise<Response>;
1019
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1020
+ type LooseEventSubscribe = (eventName: string, callback: (...args: any[]) => void) => () => void;
1021
+ type ActorActionMap<R> = {
1022
+ [K in keyof NonNullable<R>]: NonNullable<R>[K] extends (...args: infer Args) => infer Return ? ActorActionFunction<Args, Awaited<Return>> : never;
1023
+ };
1024
+ type ActionsOf<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, any, any, infer R> ? R : never;
634
1025
  interface ActorGatewayOptions {
635
1026
  skipReadyWait?: boolean;
636
1027
  }
@@ -643,9 +1034,7 @@ type ActorWebSocketOptions = ActorGatewayOptions;
643
1034
  /**
644
1035
  * Maps action methods from actor definition to typed function signatures.
645
1036
  */
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;
1037
+ type ActorDefinitionActions<AD extends AnyActorDefinition> = IsAny<AD> extends true ? Record<string, ActorActionFunction<any[], any>> : ActorActionMap<ActionsOf<AD>>;
649
1038
  type ActorQueueSend<TQueues extends QueueSchemaConfig> = {
650
1039
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options: QueueSendWaitOptions): Promise<QueueSendResult<InferQueueCompleteMap<TQueues>[K]>>;
651
1040
  <K extends keyof TQueues & string>(name: K, body: InferSchemaMap<TQueues>[K], options?: QueueSendNoWaitOptions): Promise<void>;
@@ -656,13 +1045,31 @@ type ActorEventSubscribe<TEvents extends EventSchemaConfig> = {
656
1045
  <K extends keyof TEvents & string>(eventName: K, callback: (...args: InferEventArgs<InferSchemaMap<TEvents>[K]>) => void): () => void;
657
1046
  (eventName: keyof TEvents extends never ? string : never, callback: (...args: any[]) => void): () => void;
658
1047
  };
659
- type ActorDefinitionQueueSend<AD extends AnyActorDefinition> = AD extends BaseActorDefinition<any, any, any, any, any, any, any, infer Q, any> ? Q extends QueueSchemaConfig ? {
1048
+ type ActorDefinitionQueueSend<AD extends AnyActorDefinition> = IsAny<AD> extends true ? {
1049
+ send: ActorQueueSend<Record<string, any>>;
1050
+ } : AD extends {
1051
+ config: {
1052
+ queues?: infer Q;
1053
+ };
1054
+ } ? Q extends QueueSchemaConfig ? {
660
1055
  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 ? {
1056
+ } : {} : AD extends BaseActorDefinition<any, any, any, any, any, any, any, infer Q, any> ? Q extends QueueSchemaConfig ? {
1057
+ send: ActorQueueSend<Q>;
1058
+ } : {} : {};
1059
+ type ActorDefinitionEventSubscriptions<AD extends AnyActorDefinition> = IsAny<AD> extends true ? {
1060
+ on: LooseEventSubscribe;
1061
+ once: LooseEventSubscribe;
1062
+ } : AD extends {
1063
+ config: {
1064
+ events?: infer E;
1065
+ };
1066
+ } ? E extends EventSchemaConfig ? {
663
1067
  on: ActorEventSubscribe<E>;
664
1068
  once: ActorEventSubscribe<E>;
665
- } : never : never;
1069
+ } : {} : AD extends BaseActorDefinition<any, any, any, any, any, any, infer E, any, any> ? E extends EventSchemaConfig ? {
1070
+ on: ActorEventSubscribe<E>;
1071
+ once: ActorEventSubscribe<E>;
1072
+ } : {} : {};
666
1073
 
667
1074
  type ActorResolutionState = ActorQuery;
668
1075
 
@@ -1120,6 +1527,7 @@ declare function createClientWithDriver<A extends Registry<any>>(driver: EngineC
1120
1527
 
1121
1528
  declare const DEFAULT_SLEEP_GRACE_PERIOD = 15000;
1122
1529
  declare const ACTOR_CONTEXT_INTERNAL_SYMBOL: unique symbol;
1530
+ declare const RAW_STATE_SYMBOL: unique symbol;
1123
1531
  declare const CONN_DRIVER_SYMBOL: unique symbol;
1124
1532
  declare const CONN_STATE_MANAGER_SYMBOL: unique symbol;
1125
1533
  interface ActorLogger {
@@ -1154,6 +1562,10 @@ type ActorKvListOptions<T extends ActorKvValueType = "text", K extends ActorKvKe
1154
1562
  limit?: number;
1155
1563
  };
1156
1564
  type ActorClientFor<T> = T extends Registry<any> ? Client<T> : T;
1565
+ /**
1566
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`c.db` / `c.sql`)
1567
+ * or actor state instead.
1568
+ */
1157
1569
  interface ActorKv {
1158
1570
  get<T extends ActorKvValueType = "text">(key: Uint8Array | string, options?: ActorKvValueOptions<T>): Promise<ActorKvValueTypeMap[T] | null>;
1159
1571
  put<T extends ActorKvValueType = "text">(key: Uint8Array | string, value: Uint8Array | string | ArrayBuffer, options?: ActorKvValueOptions<T>): Promise<void>;
@@ -1236,7 +1648,7 @@ interface ActorQueue<TQueues extends QueueSchemaConfig = Record<never, never>> {
1236
1648
  iter<const TName extends QueueFilterName<TQueues>, const TCompletable extends boolean = false>(opts?: QueueIterOptions<TName, TCompletable>): AsyncIterable<any>;
1237
1649
  [key: string]: any;
1238
1650
  }
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>> {
1651
+ 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
1652
  id: string;
1241
1653
  params: TConnParams;
1242
1654
  state: TConnState;
@@ -1248,8 +1660,14 @@ interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TV
1248
1660
  type AnyConn = Conn<any, any, any, any, any, any, any, any>;
1249
1661
  interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
1250
1662
  [ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
1663
+ /** Returns the raw unwrapped state without the write-through proxy. */
1664
+ [RAW_STATE_SYMBOL](): TState;
1251
1665
  state: TState;
1252
1666
  vars: TVars;
1667
+ /**
1668
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`db` / `sql`)
1669
+ * or actor state instead.
1670
+ */
1253
1671
  readonly kv: ActorKv;
1254
1672
  readonly db: InferDatabaseClient<TDatabase>;
1255
1673
  readonly schedule: ActorSchedule;
@@ -1315,6 +1733,75 @@ interface WorkflowInspectorConfig<THistory = unknown> {
1315
1733
  interface RunInspectorConfig<THistory = unknown> {
1316
1734
  workflow?: WorkflowInspectorConfig<THistory>;
1317
1735
  }
1736
+ /**
1737
+ * Built-in inspector tabs the dashboard ships. Used to validate
1738
+ * `hidden: true` entries and reject custom-tab ids that collide with
1739
+ * a built-in.
1740
+ */
1741
+ declare const BUILTIN_INSPECTOR_TAB_IDS: readonly ["workflow", "database", "state", "queue", "connections", "console"];
1742
+ declare const BuiltinInspectorTabIdSchema: z.ZodEnum<{
1743
+ workflow: "workflow";
1744
+ state: "state";
1745
+ database: "database";
1746
+ queue: "queue";
1747
+ connections: "connections";
1748
+ console: "console";
1749
+ }>;
1750
+ declare const CustomInspectorTabEntrySchema: z.ZodObject<{
1751
+ id: z.ZodString;
1752
+ label: z.ZodString;
1753
+ source: z.ZodString;
1754
+ icon: z.ZodOptional<z.ZodString>;
1755
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1756
+ }, z.core.$strict>;
1757
+ declare const HideInspectorTabEntrySchema: z.ZodObject<{
1758
+ id: z.ZodEnum<{
1759
+ workflow: "workflow";
1760
+ state: "state";
1761
+ database: "database";
1762
+ queue: "queue";
1763
+ connections: "connections";
1764
+ console: "console";
1765
+ }>;
1766
+ hidden: z.ZodLiteral<true>;
1767
+ }, z.core.$strict>;
1768
+ declare const InspectorTabEntrySchema: z.ZodUnion<readonly [z.ZodObject<{
1769
+ id: z.ZodString;
1770
+ label: z.ZodString;
1771
+ source: z.ZodString;
1772
+ icon: z.ZodOptional<z.ZodString>;
1773
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1774
+ }, z.core.$strict>, z.ZodObject<{
1775
+ id: z.ZodEnum<{
1776
+ workflow: "workflow";
1777
+ state: "state";
1778
+ database: "database";
1779
+ queue: "queue";
1780
+ connections: "connections";
1781
+ console: "console";
1782
+ }>;
1783
+ hidden: z.ZodLiteral<true>;
1784
+ }, z.core.$strict>]>;
1785
+ declare const ActorInspectorConfigSchema: z.ZodObject<{
1786
+ tabs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1787
+ id: z.ZodString;
1788
+ label: z.ZodString;
1789
+ source: z.ZodString;
1790
+ icon: z.ZodOptional<z.ZodString>;
1791
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1792
+ }, z.core.$strict>, z.ZodObject<{
1793
+ id: z.ZodEnum<{
1794
+ workflow: "workflow";
1795
+ state: "state";
1796
+ database: "database";
1797
+ queue: "queue";
1798
+ connections: "connections";
1799
+ console: "console";
1800
+ }>;
1801
+ hidden: z.ZodLiteral<true>;
1802
+ }, z.core.$strict>]>>>;
1803
+ }, z.core.$strict>;
1804
+ type ActorInspectorConfig = z.input<typeof ActorInspectorConfigSchema>;
1318
1805
  declare const RunConfigSchema: z.ZodObject<{
1319
1806
  name: z.ZodOptional<z.ZodString>;
1320
1807
  icon: z.ZodOptional<z.ZodString>;
@@ -1456,8 +1943,27 @@ declare const ActorConfigSchema: z.ZodObject<{
1456
1943
  preloadMaxWorkflowBytes: z.ZodOptional<z.ZodNumber>;
1457
1944
  preloadMaxConnectionsBytes: z.ZodOptional<z.ZodNumber>;
1458
1945
  }, z.core.$strict>>;
1946
+ inspector: z.ZodOptional<z.ZodObject<{
1947
+ tabs: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1948
+ id: z.ZodString;
1949
+ label: z.ZodString;
1950
+ source: z.ZodString;
1951
+ icon: z.ZodOptional<z.ZodString>;
1952
+ hidden: z.ZodOptional<z.ZodLiteral<false>>;
1953
+ }, z.core.$strict>, z.ZodObject<{
1954
+ id: z.ZodEnum<{
1955
+ workflow: "workflow";
1956
+ state: "state";
1957
+ database: "database";
1958
+ queue: "queue";
1959
+ connections: "connections";
1960
+ console: "console";
1961
+ }>;
1962
+ hidden: z.ZodLiteral<true>;
1963
+ }, z.core.$strict>]>>>;
1964
+ }, z.core.$strict>>;
1459
1965
  }, z.core.$strict>;
1460
- type CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1966
+ type CreateState<TState, _TConnParams, _TConnState, _TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1461
1967
  state: TState;
1462
1968
  } | {
1463
1969
  createState: (c: CreateContext<TState, TInput, TDatabase, TEvents, TQueues>, input: TInput) => TState | Promise<TState>;
@@ -1470,7 +1976,7 @@ type CreateConnState<TState, TConnParams, TConnState, TVars, TInput, TDatabase e
1470
1976
  /**
1471
1977
  * @experimental
1472
1978
  */
1473
- type CreateVars<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1979
+ type CreateVars<TState, _TConnParams, _TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig, TQueues extends QueueSchemaConfig> = {
1474
1980
  /**
1475
1981
  * @experimental
1476
1982
  */
@@ -1660,7 +2166,7 @@ type ActorDatabaseConfig<TDatabase extends AnyDatabaseProvider> = {
1660
2166
  */
1661
2167
  db: TDatabase;
1662
2168
  } | 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>;
2169
+ 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
2170
  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
2171
  types?: ActorTypes<TState, TConnParams, TConnState, TVars, TInput, TDatabase>;
1666
2172
  } & 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 +2245,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
1739
2245
  }, z.core.$strip>>;
1740
2246
  }, z.core.$strip>;
1741
2247
 
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 };
2248
+ 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, getRunInspectorConfig 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, event as aZ, getRunFunction 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, getRunMetadata as b0, isStaticActorDefinition as b1, isStaticActorInstance as b2, lookupInRegistry as b3, queue as b4, setup as b5, test as b6, type ActorAccessor as b7, type ActorActionFunction as b8, type ActorActionOptions as b9, type ActorConn as ba, ActorConnRaw as bb, type ActorConnStatus as bc, type ActorConnectOptions as bd, type ActorGatewayOptions as be, type ActorHandle as bf, ActorHandleRaw as bg, ClientRaw as bh, type ConnectionStateCallback as bi, type CreateOptions as bj, type CreateRequest as bk, type EventUnsubscribe as bl, type ExtractActorsFromRegistry as bm, type ExtractRegistryFromClient as bn, type GetOptions as bo, type GetWithIdOptions as bp, type QueryOptions as bq, type Region as br, type StatusChangeCallback as bs, type InferSchemaMap as bt, type InferEventArgs as bu, 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 };