rivetkit 2.3.0-rc.6 → 2.3.0-rc.7

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 (122) hide show
  1. package/dist/browser/client.d.ts +37 -8
  2. package/dist/browser/client.js +64 -34
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +4 -3
  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.js +1 -1
  8. package/dist/tsup/agent-os/index.cjs +7 -5
  9. package/dist/tsup/agent-os/index.cjs.map +1 -1
  10. package/dist/tsup/agent-os/index.d.cts +26 -5
  11. package/dist/tsup/agent-os/index.d.ts +26 -5
  12. package/dist/tsup/agent-os/index.js +7 -5
  13. package/dist/tsup/agent-os/index.js.map +1 -1
  14. package/dist/tsup/{chunk-2G64KSZQ.cjs → chunk-2H4ISA4Y.cjs} +10 -10
  15. package/dist/tsup/chunk-2H4ISA4Y.cjs.map +1 -0
  16. package/dist/tsup/{chunk-ZI5QJMKO.js → chunk-4DJMFOSU.js} +2 -2
  17. package/dist/tsup/{chunk-RTC2AZGB.js → chunk-4LTY5TOO.js} +132 -4
  18. package/dist/tsup/chunk-4LTY5TOO.js.map +1 -0
  19. package/dist/tsup/{chunk-DEO7MMWQ.js → chunk-52TPEKEC.js} +2 -2
  20. package/dist/tsup/{chunk-HTR4YLNT.cjs → chunk-55E7IR6D.cjs} +4 -4
  21. package/dist/tsup/{chunk-HTR4YLNT.cjs.map → chunk-55E7IR6D.cjs.map} +1 -1
  22. package/dist/tsup/{chunk-QAZLM4WT.cjs → chunk-63WNTDRC.cjs} +3 -3
  23. package/dist/tsup/{chunk-QAZLM4WT.cjs.map → chunk-63WNTDRC.cjs.map} +1 -1
  24. package/dist/tsup/{chunk-EMO6E3PJ.js → chunk-CMV6N5OX.js} +3 -3
  25. package/dist/tsup/{chunk-T6YVRM4K.js → chunk-D5G75T7J.js} +3 -1
  26. package/dist/tsup/chunk-D5G75T7J.js.map +1 -0
  27. package/dist/tsup/{chunk-LIXXFXVR.cjs → chunk-FEOG44WH.cjs} +137 -9
  28. package/dist/tsup/chunk-FEOG44WH.cjs.map +1 -0
  29. package/dist/tsup/{chunk-M5C7YNI5.cjs → chunk-G5HUSWP4.cjs} +8 -8
  30. package/dist/tsup/{chunk-M5C7YNI5.cjs.map → chunk-G5HUSWP4.cjs.map} +1 -1
  31. package/dist/tsup/{chunk-6S25NVAP.js → chunk-HERL2VQ2.js} +7 -5
  32. package/dist/tsup/chunk-HERL2VQ2.js.map +1 -0
  33. package/dist/tsup/{chunk-JALSAX7Z.cjs → chunk-SJLPZEA3.cjs} +3 -3
  34. package/dist/tsup/{chunk-JALSAX7Z.cjs.map → chunk-SJLPZEA3.cjs.map} +1 -1
  35. package/dist/tsup/{chunk-WQ4HNA4W.cjs → chunk-SRNOPUC6.cjs} +4 -2
  36. package/dist/tsup/chunk-SRNOPUC6.cjs.map +1 -0
  37. package/dist/tsup/{chunk-KIWH5H3K.js → chunk-TMLOKTRB.js} +3 -3
  38. package/dist/tsup/chunk-TMLOKTRB.js.map +1 -0
  39. package/dist/tsup/{chunk-CAF6JDJE.js → chunk-VFIY6GWO.js} +4 -4
  40. package/dist/tsup/chunk-VFIY6GWO.js.map +1 -0
  41. package/dist/tsup/{chunk-FLODVLYW.js → chunk-VJ4Y4WBT.js} +10 -34
  42. package/dist/tsup/chunk-VJ4Y4WBT.js.map +1 -0
  43. package/dist/tsup/{chunk-K5BA2LEO.cjs → chunk-X6HIFXNK.cjs} +14 -12
  44. package/dist/tsup/chunk-X6HIFXNK.cjs.map +1 -0
  45. package/dist/tsup/{chunk-ENK7C66G.cjs → chunk-ZGPX6KAH.cjs} +169 -193
  46. package/dist/tsup/chunk-ZGPX6KAH.cjs.map +1 -0
  47. package/dist/tsup/client/mod.cjs +7 -7
  48. package/dist/tsup/client/mod.d.cts +2 -2
  49. package/dist/tsup/client/mod.d.ts +2 -2
  50. package/dist/tsup/client/mod.js +6 -6
  51. package/dist/tsup/common/log.cjs +3 -3
  52. package/dist/tsup/common/log.js +2 -2
  53. package/dist/tsup/common/websocket.cjs +4 -4
  54. package/dist/tsup/common/websocket.js +3 -3
  55. package/dist/tsup/{config-0Ta55UV0.d.ts → config-Ak1lv4gF.d.ts} +27 -6
  56. package/dist/tsup/{config-Ca8dN4cS.d.cts → config-DU_xj4qZ.d.cts} +27 -6
  57. package/dist/tsup/{context-B_IWbWne.d.ts → context-DAAp4Lpg.d.ts} +1 -1
  58. package/dist/tsup/{context-CUrQ9MHc.d.cts → context-Dt_L55q8.d.cts} +1 -1
  59. package/dist/tsup/inspector/mod.cjs +6 -6
  60. package/dist/tsup/inspector/mod.js +5 -5
  61. package/dist/tsup/mod.cjs +470 -316
  62. package/dist/tsup/mod.cjs.map +1 -1
  63. package/dist/tsup/mod.d.cts +3 -3
  64. package/dist/tsup/mod.d.ts +3 -3
  65. package/dist/tsup/mod.js +391 -237
  66. package/dist/tsup/mod.js.map +1 -1
  67. package/dist/tsup/process-metrics-NW754INA.js +118 -0
  68. package/dist/tsup/process-metrics-NW754INA.js.map +1 -0
  69. package/dist/tsup/process-metrics-TYAGKCEJ.cjs +118 -0
  70. package/dist/tsup/process-metrics-TYAGKCEJ.cjs.map +1 -0
  71. package/dist/tsup/test/mod.cjs +10 -10
  72. package/dist/tsup/test/mod.d.cts +1 -1
  73. package/dist/tsup/test/mod.d.ts +1 -1
  74. package/dist/tsup/test/mod.js +6 -6
  75. package/dist/tsup/utils.cjs +3 -3
  76. package/dist/tsup/utils.js +2 -2
  77. package/dist/tsup/workflow/mod.cjs +41 -16
  78. package/dist/tsup/workflow/mod.cjs.map +1 -1
  79. package/dist/tsup/workflow/mod.d.cts +3 -3
  80. package/dist/tsup/workflow/mod.d.ts +3 -3
  81. package/dist/tsup/workflow/mod.js +35 -10
  82. package/dist/tsup/workflow/mod.js.map +1 -1
  83. package/package.json +11 -10
  84. package/src/actor/config.ts +3 -0
  85. package/src/actor/errors.ts +2 -2
  86. package/src/agent-os/actor/session.ts +2 -2
  87. package/src/client/actor-conn.ts +6 -34
  88. package/src/client/actor-handle.ts +2 -1
  89. package/src/client/queue.ts +2 -1
  90. package/src/client/utils.ts +0 -1
  91. package/src/common/encoding.ts +243 -5
  92. package/src/common/inline-websocket-adapter.ts +12 -12
  93. package/src/common/log.ts +1 -0
  94. package/src/common/router.ts +2 -2
  95. package/src/common/utils.ts +0 -148
  96. package/src/drivers/engine/actor-driver.ts +11 -11
  97. package/src/engine-client/actor-websocket-client.ts +2 -1
  98. package/src/engine-client/mod.ts +3 -2
  99. package/src/registry/index.ts +46 -109
  100. package/src/registry/napi-runtime.ts +11 -34
  101. package/src/registry/native.ts +193 -104
  102. package/src/registry/process-metrics.ts +183 -0
  103. package/src/registry/runtime.ts +5 -12
  104. package/src/registry/wasm-runtime.ts +2 -13
  105. package/src/registry/write-through-proxy.ts +40 -0
  106. package/src/serde.ts +2 -2
  107. package/src/workflow/context.ts +32 -5
  108. package/src/workflow/inspector.ts +2 -1
  109. package/dist/tsup/chunk-2G64KSZQ.cjs.map +0 -1
  110. package/dist/tsup/chunk-6S25NVAP.js.map +0 -1
  111. package/dist/tsup/chunk-CAF6JDJE.js.map +0 -1
  112. package/dist/tsup/chunk-ENK7C66G.cjs.map +0 -1
  113. package/dist/tsup/chunk-FLODVLYW.js.map +0 -1
  114. package/dist/tsup/chunk-K5BA2LEO.cjs.map +0 -1
  115. package/dist/tsup/chunk-KIWH5H3K.js.map +0 -1
  116. package/dist/tsup/chunk-LIXXFXVR.cjs.map +0 -1
  117. package/dist/tsup/chunk-RTC2AZGB.js.map +0 -1
  118. package/dist/tsup/chunk-T6YVRM4K.js.map +0 -1
  119. package/dist/tsup/chunk-WQ4HNA4W.cjs.map +0 -1
  120. /package/dist/tsup/{chunk-ZI5QJMKO.js.map → chunk-4DJMFOSU.js.map} +0 -0
  121. /package/dist/tsup/{chunk-DEO7MMWQ.js.map → chunk-52TPEKEC.js.map} +0 -0
  122. /package/dist/tsup/{chunk-EMO6E3PJ.js.map → chunk-CMV6N5OX.js.map} +0 -0
@@ -929,6 +929,7 @@ type Client<A extends Registry<any>> = ClientRaw & {
929
929
  };
930
930
 
931
931
  declare const ACTOR_CONTEXT_INTERNAL_SYMBOL: unique symbol;
932
+ declare const RAW_STATE_SYMBOL: unique symbol;
932
933
  interface ActorLogger {
933
934
  level: any;
934
935
  fatal: any;
@@ -1048,6 +1049,8 @@ interface Conn<TState = unknown, TConnParams = unknown, TConnState = unknown, TV
1048
1049
  }
1049
1050
  interface ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
1050
1051
  [ACTOR_CONTEXT_INTERNAL_SYMBOL]?: unknown;
1052
+ /** Returns the raw unwrapped state without the write-through proxy. */
1053
+ [RAW_STATE_SYMBOL](): TState;
1051
1054
  state: TState;
1052
1055
  vars: TVars;
1053
1056
  readonly kv: ActorKv;
@@ -1406,7 +1409,11 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
1406
1409
  }>>, z$2.ZodTransform<"auto" | "native" | "wasm", "auto" | "native" | "wasm" | undefined>>;
1407
1410
  wasm: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
1408
1411
  bindings: z$2.ZodOptional<z$2.ZodCustom<typeof _rivetkit_rivetkit_wasm, typeof _rivetkit_rivetkit_wasm>>;
1409
- initInput: z$2.ZodOptional<z$2.ZodCustom<any, any>>;
1412
+ initInput: z$2.ZodOptional<z$2.ZodCustom<{
1413
+ module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
1414
+ } | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined, {
1415
+ module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
1416
+ } | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined>>;
1410
1417
  }, z$2.core.$strip>>>;
1411
1418
  sqlite: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodUnion<readonly [z$2.ZodEnum<{
1412
1419
  local: "local";
@@ -1497,7 +1504,9 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
1497
1504
  runtime: "auto" | "native" | "wasm";
1498
1505
  wasm: {
1499
1506
  bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
1500
- initInput?: any;
1507
+ initInput?: {
1508
+ module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
1509
+ } | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
1501
1510
  };
1502
1511
  noWelcome: boolean;
1503
1512
  logging: {
@@ -1542,7 +1551,9 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
1542
1551
  runtime: "auto" | "native" | "wasm";
1543
1552
  wasm: {
1544
1553
  bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
1545
- initInput?: any;
1554
+ initInput?: {
1555
+ module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
1556
+ } | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
1546
1557
  };
1547
1558
  sqlite: {
1548
1559
  backend: "local" | "remote";
@@ -1598,14 +1609,12 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
1598
1609
  interface ServerlessHandler {
1599
1610
  fetch: FetchHandler;
1600
1611
  }
1601
- interface RegistryRoutes {
1602
- health(): Promise<Response>;
1603
- metadata(): Promise<Response>;
1604
- prometheusMetrics(request?: Request): Promise<Response>;
1612
+ interface RegistryDiagnostics {
1613
+ mode: string;
1614
+ envoyActiveActorCount?: number | null;
1605
1615
  }
1606
1616
  declare class Registry<A extends RegistryActors> {
1607
1617
  #private;
1608
- readonly routes: RegistryRoutes;
1609
1618
  get config(): RegistryConfigInput<A>;
1610
1619
  parseConfig(): RegistryConfig;
1611
1620
  constructor(config: RegistryConfigInput<A>);
@@ -1629,6 +1638,26 @@ declare class Registry<A extends RegistryActors> {
1629
1638
  * ```
1630
1639
  */
1631
1640
  serve(): ServerlessHandler;
1641
+ /**
1642
+ * Starts an HTTP server that dispatches every request through the
1643
+ * serverless handler. Uses `crossPlatformServe` to pick the right
1644
+ * runtime (Node, Bun, Deno).
1645
+ *
1646
+ * @param opts.port Port to listen on. Defaults to 3000.
1647
+ * @param opts.publicDir If set, serves static files from this directory
1648
+ * before falling through to the registry handler.
1649
+ *
1650
+ * @example
1651
+ * ```ts
1652
+ * await registry.listen();
1653
+ * await registry.listen({ port: 8080, publicDir: "./public" });
1654
+ * ```
1655
+ */
1656
+ listen(opts?: {
1657
+ port?: number;
1658
+ publicDir?: string;
1659
+ }): Promise<void>;
1660
+ diagnostics(): Promise<RegistryDiagnostics>;
1632
1661
  startEnvoy(): void;
1633
1662
  /**
1634
1663
  * Starts the actor envoy for standalone server deployments.
@@ -200,7 +200,7 @@ function noopNext() {
200
200
  // package.json
201
201
  var package_default = {
202
202
  name: "rivetkit",
203
- version: "2.3.0-rc.6",
203
+ version: "2.3.0-rc.7",
204
204
  description: "Lightweight libraries for building stateful actors on edge platforms",
205
205
  license: "Apache-2.0",
206
206
  keywords: [
@@ -368,13 +368,14 @@ var package_default = {
368
368
  "actor-config-schema-gen": "tsx scripts/actor-config-schema-gen.ts"
369
369
  },
370
370
  dependencies: {
371
- "@rivet-dev/agent-os-core": "^0.1.1",
372
371
  "@hono/node-server": "^1.18.2",
373
372
  "@hono/node-ws": "^1.1.1",
374
373
  "@hono/zod-openapi": "^1.1.5",
374
+ "@rivet-dev/agent-os-core": "^0.1.1",
375
375
  "@rivetkit/bare-ts": "^0.6.2",
376
376
  "@rivetkit/engine-cli": "workspace:*",
377
377
  "@rivetkit/engine-envoy-protocol": "workspace:*",
378
+ "@rivetkit/on-change": "6.0.1",
378
379
  "@rivetkit/rivetkit-napi": "workspace:*",
379
380
  "@rivetkit/rivetkit-wasm": "workspace:*",
380
381
  "@rivetkit/traces": "workspace:*",
@@ -392,10 +393,10 @@ var package_default = {
392
393
  zod: "^4.1.0"
393
394
  },
394
395
  devDependencies: {
396
+ "@biomejs/biome": "^2.3",
395
397
  "@copilotkit/llmock": "^1.6.0",
396
398
  "@rivet-dev/agent-os-common": "*",
397
399
  "@rivet-dev/agent-os-pi": "^0.1.1",
398
- "@biomejs/biome": "^2.3",
399
400
  "@standard-schema/spec": "^1.0.0",
400
401
  "@types/invariant": "^2",
401
402
  "@types/node": "^22.13.1",
@@ -471,6 +472,7 @@ function configureDefaultLogger(logLevel) {
471
472
  messageKey: "msg",
472
473
  // Do not include pid/hostname in output
473
474
  base: {},
475
+ errorKey: "error",
474
476
  // Keep the numeric level so the logfmt sink can match Pino's levels.
475
477
  formatters: {
476
478
  level(_label, number) {
@@ -805,6 +807,10 @@ var JSON_COMPAT_BIGINT = "$BigInt";
805
807
  var JSON_COMPAT_ARRAY_BUFFER = "$ArrayBuffer";
806
808
  var JSON_COMPAT_UINT8_ARRAY = "$Uint8Array";
807
809
  var JSON_COMPAT_UNDEFINED = "$Undefined";
810
+ var JSON_COMPAT_SET = "$Set";
811
+ function isTypedArray(value) {
812
+ return value instanceof Uint8ClampedArray || value instanceof Uint16Array || value instanceof Uint32Array || value instanceof BigUint64Array || value instanceof Int8Array || value instanceof Int16Array || value instanceof Int32Array || value instanceof BigInt64Array || value instanceof Float32Array || value instanceof Float64Array;
813
+ }
808
814
  var EncodingSchema = z2.enum(["json", "cbor", "bare"]);
809
815
  async function inputDataToBuffer(data) {
810
816
  if (typeof data === "string") {
@@ -839,9 +845,15 @@ function isPlainObject(value) {
839
845
  return proto === Object.prototype || proto === null;
840
846
  }
841
847
  function encodeJsonCompatValue(input) {
848
+ if (input === null) {
849
+ return input;
850
+ }
842
851
  if (input === void 0) {
843
852
  return [JSON_COMPAT_UNDEFINED, 0];
844
853
  }
854
+ if (typeof input === "string" || typeof input === "number" || typeof input === "boolean") {
855
+ return input;
856
+ }
845
857
  if (typeof input === "bigint") {
846
858
  return [JSON_COMPAT_BIGINT, input.toString()];
847
859
  }
@@ -851,8 +863,32 @@ function encodeJsonCompatValue(input) {
851
863
  if (input instanceof Uint8Array) {
852
864
  return [JSON_COMPAT_UINT8_ARRAY, base64EncodeUint8Array(input)];
853
865
  }
866
+ if (isTypedArray(input)) {
867
+ return input;
868
+ }
869
+ if (input instanceof Date || input instanceof RegExp || input instanceof Error) {
870
+ return input;
871
+ }
872
+ if (input instanceof Set) {
873
+ const encoded = [...input.values()].map(
874
+ (v) => encodeJsonCompatValue(v)
875
+ );
876
+ return [JSON_COMPAT_SET, encoded];
877
+ }
878
+ if (input instanceof Map) {
879
+ const encoded = /* @__PURE__ */ new Map();
880
+ for (const [k, v] of input.entries()) {
881
+ encoded.set(
882
+ encodeJsonCompatValue(k),
883
+ encodeJsonCompatValue(v)
884
+ );
885
+ }
886
+ return encoded;
887
+ }
854
888
  if (Array.isArray(input)) {
855
- const encoded = input.map((value) => encodeJsonCompatValue(value));
889
+ const encoded = input.map(
890
+ (value) => encodeJsonCompatValue(value)
891
+ );
856
892
  if (encoded.length === 2 && typeof encoded[0] === "string" && encoded[0].startsWith("$")) {
857
893
  return ["$" + encoded[0], encoded[1]];
858
894
  }
@@ -865,7 +901,10 @@ function encodeJsonCompatValue(input) {
865
901
  }
866
902
  return encoded;
867
903
  }
868
- return input;
904
+ const typeName = typeof input === "object" && input !== null ? input.constructor?.name ?? typeof input : typeof input;
905
+ throw new TypeError(
906
+ `Value of type "${typeName}" is not CBOR serializable`
907
+ );
869
908
  }
870
909
  function reviveJsonCompatValue(input, options = {}) {
871
910
  if (typeof input === "bigint") {
@@ -874,6 +913,16 @@ function reviveJsonCompatValue(input, options = {}) {
874
913
  }
875
914
  return input;
876
915
  }
916
+ if (input instanceof Map) {
917
+ const revived = /* @__PURE__ */ new Map();
918
+ for (const [k, v] of input.entries()) {
919
+ revived.set(
920
+ reviveJsonCompatValue(k, options),
921
+ reviveJsonCompatValue(v, options)
922
+ );
923
+ }
924
+ return revived;
925
+ }
877
926
  if (Array.isArray(input)) {
878
927
  if (input.length === 2 && typeof input[0] === "string" && input[0].startsWith("$")) {
879
928
  if (input[0] === JSON_COMPAT_BIGINT) {
@@ -888,6 +937,12 @@ function reviveJsonCompatValue(input, options = {}) {
888
937
  if (input[0] === JSON_COMPAT_UNDEFINED) {
889
938
  return void 0;
890
939
  }
940
+ if (input[0] === JSON_COMPAT_SET) {
941
+ const items = input[1].map(
942
+ (v) => reviveJsonCompatValue(v, options)
943
+ );
944
+ return new Set(items);
945
+ }
891
946
  if (input[0].startsWith("$$")) {
892
947
  return [
893
948
  input[0].substring(1),
@@ -4695,7 +4750,6 @@ function createQueueSender(senderOptions) {
4695
4750
  }
4696
4751
 
4697
4752
  // src/client/actor-conn.ts
4698
- var DEFAULT_MAX_INCOMING_MESSAGE_SIZE = 65536;
4699
4753
  var CONNECT_SYMBOL = /* @__PURE__ */ Symbol("connect");
4700
4754
  var ActorConnRaw = class {
4701
4755
  #disposed = false;
@@ -4747,9 +4801,6 @@ var ActorConnRaw = class {
4747
4801
  this.#encoding = encoding;
4748
4802
  this.#actorResolutionState = actorResolutionState;
4749
4803
  this.#gatewayOptions = resolveActorGatewayOptions(gatewayOptions);
4750
- if ("getForId" in actorResolutionState) {
4751
- this.#actorId = actorResolutionState.getForId.actorId;
4752
- }
4753
4804
  this.#readyPromise = promiseWithResolvers(
4754
4805
  (reason) => logger2().warn({
4755
4806
  msg: "unhandled ready promise rejection",
@@ -4767,7 +4818,9 @@ var ActorConnRaw = class {
4767
4818
  );
4768
4819
  }
4769
4820
  });
4770
- this.#keepNodeAliveInterval = setInterval(() => 6e4);
4821
+ this.#keepNodeAliveInterval = setInterval(() => {
4822
+ }, 6e4);
4823
+ this.#keepNodeAliveInterval.unref?.();
4771
4824
  }
4772
4825
  #clearResolvedActorIdentity() {
4773
4826
  this.#actorId = void 0;
@@ -5575,31 +5628,8 @@ var ActorConnRaw = class {
5575
5628
  }
5576
5629
  }
5577
5630
  );
5578
- const serializedLength = messageLength(messageSerialized);
5579
- if (serializedLength > DEFAULT_MAX_INCOMING_MESSAGE_SIZE && message.body.tag === "ActionRequest") {
5580
- const actionId = Number(message.body.val.id);
5581
- const inFlight = this.#takeActionInFlight(actionId);
5582
- const error = new RivetError(
5583
- "message",
5584
- "incoming_too_long",
5585
- "Incoming message too long",
5586
- {
5587
- maxSize: DEFAULT_MAX_INCOMING_MESSAGE_SIZE,
5588
- actualSize: serializedLength
5589
- }
5590
- );
5591
- logger2().warn({
5592
- msg: "rejecting oversized connection action request",
5593
- actionId,
5594
- actionName: inFlight.name,
5595
- actualSize: serializedLength,
5596
- maxSize: DEFAULT_MAX_INCOMING_MESSAGE_SIZE
5597
- });
5598
- inFlight.reject(error);
5599
- this.#dispatchActorError(error);
5600
- return;
5601
- }
5602
5631
  this.#websocket.send(messageSerialized);
5632
+ const serializedLength = messageLength(messageSerialized);
5603
5633
  logger2().trace({
5604
5634
  msg: "sent websocket message",
5605
5635
  len: serializedLength