rivetkit 2.3.21 → 2.3.23

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 (100) hide show
  1. package/dist/browser/client.js +14 -4
  2. package/dist/browser/client.js.map +1 -1
  3. package/dist/browser/inspector/client.js +1 -1
  4. package/dist/browser/inspector/client.js.map +1 -1
  5. package/dist/tsup/actor/errors.cjs +2 -2
  6. package/dist/tsup/actor/errors.d.cts +1 -1
  7. package/dist/tsup/actor/errors.d.ts +1 -1
  8. package/dist/tsup/actor/errors.js +1 -1
  9. package/dist/tsup/agent-os/index.cjs +1 -1
  10. package/dist/tsup/agent-os/index.cjs.map +1 -1
  11. package/dist/tsup/agent-os/index.js +1 -1
  12. package/dist/tsup/agent-os/index.js.map +1 -1
  13. package/dist/tsup/{chunk-KWGN2ZBJ.cjs → chunk-3Y7MKDLZ.cjs} +10 -10
  14. package/dist/tsup/{chunk-KWGN2ZBJ.cjs.map → chunk-3Y7MKDLZ.cjs.map} +1 -1
  15. package/dist/tsup/{chunk-RGIZNZYO.js → chunk-674WU4L6.js} +3 -3
  16. package/dist/tsup/{chunk-RGIZNZYO.js.map → chunk-674WU4L6.js.map} +1 -1
  17. package/dist/tsup/{chunk-VMMXXVDO.js → chunk-7ZDC4XEA.js} +4 -4
  18. package/dist/tsup/{chunk-5IBUZFLP.js → chunk-CIWSGFQG.js} +2 -2
  19. package/dist/tsup/{chunk-LWSLKKZ5.cjs → chunk-CRZJ74SA.cjs} +3 -3
  20. package/dist/tsup/{chunk-LWSLKKZ5.cjs.map → chunk-CRZJ74SA.cjs.map} +1 -1
  21. package/dist/tsup/{chunk-NL2EIKK6.cjs → chunk-FVVRY42Y.cjs} +7 -7
  22. package/dist/tsup/{chunk-NL2EIKK6.cjs.map → chunk-FVVRY42Y.cjs.map} +1 -1
  23. package/dist/tsup/{chunk-B5SNXPSS.cjs → chunk-GZKR7ORE.cjs} +173 -173
  24. package/dist/tsup/{chunk-B5SNXPSS.cjs.map → chunk-GZKR7ORE.cjs.map} +1 -1
  25. package/dist/tsup/{chunk-5EGLHQJJ.js → chunk-HO6UA2RJ.js} +2 -2
  26. package/dist/tsup/{chunk-GHKQC4PD.cjs → chunk-JLM6TML2.cjs} +3 -3
  27. package/dist/tsup/{chunk-GHKQC4PD.cjs.map → chunk-JLM6TML2.cjs.map} +1 -1
  28. package/dist/tsup/{chunk-2CI2IEVN.js → chunk-KC3T3MMB.js} +2 -2
  29. package/dist/tsup/{chunk-PYRI75DL.js → chunk-LKNGMRIT.js} +7 -7
  30. package/dist/tsup/{chunk-JX2ITWAV.cjs → chunk-MGI2VVF6.cjs} +14 -4
  31. package/dist/tsup/chunk-MGI2VVF6.cjs.map +1 -0
  32. package/dist/tsup/{chunk-RFN3BG6D.js → chunk-UV5AN6YV.js} +3 -3
  33. package/dist/tsup/{chunk-6LRPYB4Q.cjs → chunk-VJNX5RCS.cjs} +4 -4
  34. package/dist/tsup/{chunk-6LRPYB4Q.cjs.map → chunk-VJNX5RCS.cjs.map} +1 -1
  35. package/dist/tsup/{chunk-ARGNQGYG.cjs → chunk-XUCVB6BD.cjs} +3 -3
  36. package/dist/tsup/{chunk-ARGNQGYG.cjs.map → chunk-XUCVB6BD.cjs.map} +1 -1
  37. package/dist/tsup/{chunk-CJXBGTVT.js → chunk-Z3Z5EOSP.js} +2 -2
  38. package/dist/tsup/{chunk-APOANSDG.cjs → chunk-Z7QK4HTR.cjs} +10 -10
  39. package/dist/tsup/{chunk-APOANSDG.cjs.map → chunk-Z7QK4HTR.cjs.map} +1 -1
  40. package/dist/tsup/{chunk-P2OFXH4G.js → chunk-ZOVJDAOW.js} +14 -4
  41. package/dist/tsup/chunk-ZOVJDAOW.js.map +1 -0
  42. package/dist/tsup/client/mod.cjs +6 -6
  43. package/dist/tsup/client/mod.d.cts +5 -5
  44. package/dist/tsup/client/mod.d.ts +5 -5
  45. package/dist/tsup/client/mod.js +5 -5
  46. package/dist/tsup/common/log.cjs +3 -3
  47. package/dist/tsup/common/log.js +2 -2
  48. package/dist/tsup/common/websocket.cjs +4 -4
  49. package/dist/tsup/common/websocket.js +3 -3
  50. package/dist/tsup/{config-Bc1nnvUl.d.ts → config-Cv6pjCt-.d.ts} +2 -2
  51. package/dist/tsup/{config-Do_0guSS.d.cts → config-osdJqQwX.d.cts} +2 -2
  52. package/dist/tsup/{context-oGQxZDPz.d.ts → context-CoVbKBuk.d.ts} +1 -1
  53. package/dist/tsup/{context-CgNkhjdY.d.cts → context-DpjrM7n7.d.cts} +1 -1
  54. package/dist/tsup/db/drizzle.cjs +3 -3
  55. package/dist/tsup/db/drizzle.js +2 -2
  56. package/dist/tsup/db/mod.cjs +4 -4
  57. package/dist/tsup/db/mod.js +3 -3
  58. package/dist/tsup/dynamic/mod.d.cts +3 -3
  59. package/dist/tsup/dynamic/mod.d.ts +3 -3
  60. package/dist/tsup/inspector/mod.cjs +6 -6
  61. package/dist/tsup/inspector/mod.js +5 -5
  62. package/dist/tsup/inspector/workflow.cjs +5 -5
  63. package/dist/tsup/inspector/workflow.js +4 -4
  64. package/dist/tsup/inspector-tab/mod.d.cts +4 -4
  65. package/dist/tsup/inspector-tab/mod.d.ts +4 -4
  66. package/dist/tsup/mod.cjs +149 -127
  67. package/dist/tsup/mod.cjs.map +1 -1
  68. package/dist/tsup/mod.d.cts +5 -5
  69. package/dist/tsup/mod.d.ts +5 -5
  70. package/dist/tsup/mod.js +32 -10
  71. package/dist/tsup/mod.js.map +1 -1
  72. package/dist/tsup/test/mod.cjs +7 -7
  73. package/dist/tsup/test/mod.d.cts +3 -3
  74. package/dist/tsup/test/mod.d.ts +3 -3
  75. package/dist/tsup/test/mod.js +5 -5
  76. package/dist/tsup/{utils-DsoDinPz.d.ts → utils-3rsE0JvI.d.cts} +12 -2
  77. package/dist/tsup/{utils-DsoDinPz.d.cts → utils-3rsE0JvI.d.ts} +12 -2
  78. package/dist/tsup/{utils-OQHBjfcM.d.ts → utils-C1O-SklO.d.ts} +1 -1
  79. package/dist/tsup/{utils-CNFeS-Dk.d.cts → utils-C6b0aYUM.d.cts} +1 -1
  80. package/dist/tsup/utils.cjs +3 -3
  81. package/dist/tsup/utils.d.cts +2 -2
  82. package/dist/tsup/utils.d.ts +2 -2
  83. package/dist/tsup/utils.js +2 -2
  84. package/dist/tsup/workflow/mod.cjs +11 -11
  85. package/dist/tsup/workflow/mod.d.cts +5 -5
  86. package/dist/tsup/workflow/mod.d.ts +5 -5
  87. package/dist/tsup/workflow/mod.js +5 -5
  88. package/package.json +9 -9
  89. package/src/actor/errors.ts +27 -4
  90. package/src/registry/native.ts +31 -3
  91. package/dist/tsup/chunk-JX2ITWAV.cjs.map +0 -1
  92. package/dist/tsup/chunk-P2OFXH4G.js.map +0 -1
  93. package/src/registry/process-metrics.ts +0 -250
  94. /package/dist/tsup/{chunk-VMMXXVDO.js.map → chunk-7ZDC4XEA.js.map} +0 -0
  95. /package/dist/tsup/{chunk-5IBUZFLP.js.map → chunk-CIWSGFQG.js.map} +0 -0
  96. /package/dist/tsup/{chunk-5EGLHQJJ.js.map → chunk-HO6UA2RJ.js.map} +0 -0
  97. /package/dist/tsup/{chunk-2CI2IEVN.js.map → chunk-KC3T3MMB.js.map} +0 -0
  98. /package/dist/tsup/{chunk-PYRI75DL.js.map → chunk-LKNGMRIT.js.map} +0 -0
  99. /package/dist/tsup/{chunk-RFN3BG6D.js.map → chunk-UV5AN6YV.js.map} +0 -0
  100. /package/dist/tsup/{chunk-CJXBGTVT.js.map → chunk-Z3Z5EOSP.js.map} +0 -0
package/dist/tsup/mod.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2; var _class3;
2
2
 
3
- var _chunk6LRPYB4Qcjs = require('./chunk-6LRPYB4Q.cjs');
3
+ var _chunkVJNX5RCScjs = require('./chunk-VJNX5RCS.cjs');
4
4
 
5
5
 
6
6
 
@@ -35,18 +35,18 @@ var _chunkNWCAIWHLcjs = require('./chunk-NWCAIWHL.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunkB5SNXPSScjs = require('./chunk-B5SNXPSS.cjs');
38
+ var _chunkGZKR7OREcjs = require('./chunk-GZKR7ORE.cjs');
39
39
 
40
40
 
41
41
 
42
42
  var _chunkMYWZCDMLcjs = require('./chunk-MYWZCDML.cjs');
43
- require('./chunk-LWSLKKZ5.cjs');
44
43
 
45
44
 
46
45
 
47
46
 
48
- var _chunkGHKQC4PDcjs = require('./chunk-GHKQC4PD.cjs');
47
+ var _chunkJLM6TML2cjs = require('./chunk-JLM6TML2.cjs');
49
48
  require('./chunk-KVFIONKQ.cjs');
49
+ require('./chunk-CRZJ74SA.cjs');
50
50
 
51
51
 
52
52
 
@@ -80,7 +80,7 @@ require('./chunk-KVFIONKQ.cjs');
80
80
 
81
81
 
82
82
 
83
- var _chunkKWGN2ZBJcjs = require('./chunk-KWGN2ZBJ.cjs');
83
+ var _chunk3Y7MKDLZcjs = require('./chunk-3Y7MKDLZ.cjs');
84
84
 
85
85
 
86
86
 
@@ -93,11 +93,11 @@ var _chunkKWGN2ZBJcjs = require('./chunk-KWGN2ZBJ.cjs');
93
93
 
94
94
 
95
95
 
96
- var _chunkJX2ITWAVcjs = require('./chunk-JX2ITWAV.cjs');
96
+ var _chunkMGI2VVF6cjs = require('./chunk-MGI2VVF6.cjs');
97
97
 
98
98
  // src/actor/log.ts
99
99
  function loggerWithoutContext() {
100
- return _chunkKWGN2ZBJcjs.getLogger.call(void 0, "actor-runtime");
100
+ return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "actor-runtime");
101
101
  }
102
102
 
103
103
  // src/actor/definition.ts
@@ -222,7 +222,7 @@ function validateSchemaSync(schemas, key, data) {
222
222
  if (isStandardSchema(schema)) {
223
223
  const result = schema["~standard"].validate(data);
224
224
  if (isPromiseLike(result)) {
225
- throw _chunkJX2ITWAVcjs.unsupportedFeature.call(void 0, "async schema validation");
225
+ throw _chunkMGI2VVF6cjs.unsupportedFeature.call(void 0, "async schema validation");
226
226
  }
227
227
  if (result.issues) {
228
228
  return { success: false, issues: [...result.issues] };
@@ -239,7 +239,7 @@ function validateSchemaSync(schemas, key, data) {
239
239
  var _virtualwebsocket = require('@rivetkit/virtual-websocket');
240
240
  var _ws = require('hono/ws');
241
241
  function logger() {
242
- return _chunkKWGN2ZBJcjs.getLogger.call(void 0, "inline-websocket-adapter");
242
+ return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "inline-websocket-adapter");
243
243
  }
244
244
  var InlineWebSocketAdapter = class {
245
245
  #handler;
@@ -391,7 +391,7 @@ var InlineWebSocketAdapter = class {
391
391
 
392
392
  // src/registry/log.ts
393
393
  function logger2() {
394
- return _chunkKWGN2ZBJcjs.getLogger.call(void 0, "registry");
394
+ return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "registry");
395
395
  }
396
396
 
397
397
  // src/serverless/configure.ts
@@ -437,8 +437,8 @@ async function configureServerlessPool(config) {
437
437
  );
438
438
  }
439
439
  const customConfig = config.configurePool;
440
- const clientConfig = _chunkB5SNXPSScjs.convertRegistryConfigToClientConfig.call(void 0, config);
441
- const dcsRes = await _chunkB5SNXPSScjs.getDatacenters.call(void 0, clientConfig);
440
+ const clientConfig = _chunkGZKR7OREcjs.convertRegistryConfigToClientConfig.call(void 0, config);
441
+ const dcsRes = await _chunkGZKR7OREcjs.getDatacenters.call(void 0, clientConfig);
442
442
  const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
443
443
  const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
444
444
  const headers = {
@@ -460,7 +460,7 @@ async function configureServerlessPool(config) {
460
460
  metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
461
461
  drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
462
462
  };
463
- await _chunkB5SNXPSScjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
463
+ await _chunkGZKR7OREcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
464
464
  datacenters: Object.fromEntries(
465
465
  dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
466
466
  )
@@ -477,7 +477,7 @@ async function configureServerlessPool(config) {
477
477
  logger2().warn({
478
478
  msg: "serverless pool configuration attempt failed",
479
479
  attempts,
480
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
480
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
481
481
  });
482
482
  await sleep(CONFIGURE_RETRY_DELAY_MS);
483
483
  }
@@ -485,7 +485,7 @@ async function configureServerlessPool(config) {
485
485
  logger2().error({
486
486
  msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
487
487
  attempts,
488
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, lastError)
488
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, lastError)
489
489
  });
490
490
  throw lastError;
491
491
  }
@@ -496,10 +496,10 @@ var _zod = require('zod');
496
496
  // src/registry/config/envoy.ts
497
497
  var _v4 = require('zod/v4');
498
498
  var EnvoyConfigSchema = _v4.z.object({
499
- poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetPool.call(void 0, ), () => ( "default"))),
500
- version: _v4.z.number().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
499
+ poolName: _v4.z.string().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetPool.call(void 0, ), () => ( "default"))),
500
+ version: _v4.z.number().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
501
501
  // Deprecated.
502
- totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
502
+ totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
503
503
  envoyKey: _v4.z.string().optional()
504
504
  });
505
505
 
@@ -537,7 +537,7 @@ var ServerlessConfigSchema = _v4.z.object({
537
537
  *
538
538
  * Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
539
539
  */
540
- publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetPublicEndpoint.call(void 0, )))),
540
+ publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetPublicEndpoint.call(void 0, )))),
541
541
  /**
542
542
  * Token that clients should use when connecting via the public endpoint.
543
543
  *
@@ -545,7 +545,7 @@ var ServerlessConfigSchema = _v4.z.object({
545
545
  *
546
546
  * Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
547
547
  */
548
- publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetPublicToken.call(void 0, ))))
548
+ publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetPublicToken.call(void 0, ))))
549
549
  // There is no publicNamespace config option because the frontend and backend
550
550
  // cannot use different namespaces. The namespace is extracted from the
551
551
  // publicEndpoint URL auth syntax if provided.
@@ -599,7 +599,7 @@ var RegistryConfigSchema = _zod.z.object({
599
599
  * Runtime binding to use for RivetKit core.
600
600
  * */
601
601
  runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
602
- const rawRuntime = _nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetkitRuntime.call(void 0, )));
602
+ const rawRuntime = _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetkitRuntime.call(void 0, )));
603
603
  if (rawRuntime === void 0) {
604
604
  return "auto";
605
605
  }
@@ -636,7 +636,7 @@ var RegistryConfigSchema = _zod.z.object({
636
636
  * */
637
637
  logging: _zod.z.object({
638
638
  baseLogger: _zod.z.custom().optional(),
639
- level: _chunkKWGN2ZBJcjs.LogLevelSchema.optional()
639
+ level: _chunk3Y7MKDLZcjs.LogLevelSchema.optional()
640
640
  }).optional().default(() => ({})),
641
641
  // MARK: Routing
642
642
  // // This is a function to allow for lazy configuration of upgradeWebSocket on the
@@ -654,9 +654,9 @@ var RegistryConfigSchema = _zod.z.object({
654
654
  *
655
655
  * Can also be set via RIVET_ENDPOINT environment variables.
656
656
  */
657
- endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetEngine.call(void 0, ))), () => ( _chunkKWGN2ZBJcjs.getRivetEndpoint.call(void 0, )))),
658
- token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetToken.call(void 0, )))),
659
- namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkKWGN2ZBJcjs.getRivetNamespace.call(void 0, )))),
657
+ endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetEngine.call(void 0, ))), () => ( _chunk3Y7MKDLZcjs.getRivetEndpoint.call(void 0, )))),
658
+ token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetToken.call(void 0, )))),
659
+ namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetNamespace.call(void 0, )))),
660
660
  headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
661
661
  // MARK: Client
662
662
  // TODO:
@@ -696,21 +696,21 @@ var RegistryConfigSchema = _zod.z.object({
696
696
  *
697
697
  * Starts the full Rust engine process locally.
698
698
  */
699
- startEngine: _zod.z.boolean().default(() => _chunkKWGN2ZBJcjs.getRivetRunEngine.call(void 0, )),
699
+ startEngine: _zod.z.boolean().default(() => _chunk3Y7MKDLZcjs.getRivetRunEngine.call(void 0, )),
700
700
  /**
701
701
  * @experimental
702
702
  *
703
703
  * Host to bind the spawned local engine process to.
704
704
  */
705
- engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkB5SNXPSScjs.ENGINE_HOST))),
705
+ engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkGZKR7OREcjs.ENGINE_HOST))),
706
706
  /**
707
707
  * @experimental
708
708
  *
709
709
  * Port to bind the spawned local engine process to.
710
710
  */
711
- enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkB5SNXPSScjs.ENGINE_PORT))),
711
+ enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkGZKR7OREcjs.ENGINE_PORT))),
712
712
  /** @experimental */
713
- engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkKWGN2ZBJcjs.VERSION))),
713
+ engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunk3Y7MKDLZcjs.VERSION))),
714
714
  /**
715
715
  * Starts the first-party Services actor host when RivetKit manages
716
716
  * a local engine. Defaults to the local-engine decision. Set
@@ -764,7 +764,7 @@ var RegistryConfigSchema = _zod.z.object({
764
764
  }))
765
765
  }).transform((config, ctx) => {
766
766
  var _a, _b, _c;
767
- const isDevEnv = _chunkKWGN2ZBJcjs.isDev.call(void 0, );
767
+ const isDevEnv = _chunk3Y7MKDLZcjs.isDev.call(void 0, );
768
768
  const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
769
769
  if (config.runtime === "wasm" && sqliteBackend === "local") {
770
770
  ctx.addIssue({
@@ -774,7 +774,7 @@ var RegistryConfigSchema = _zod.z.object({
774
774
  });
775
775
  }
776
776
  const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
777
- const parsedEndpoint = config.endpoint ? _chunkB5SNXPSScjs.tryParseEndpoint.call(void 0, ctx, {
777
+ const parsedEndpoint = config.endpoint ? _chunkGZKR7OREcjs.tryParseEndpoint.call(void 0, ctx, {
778
778
  endpoint: config.endpoint,
779
779
  path: ["endpoint"],
780
780
  namespace: config.namespace,
@@ -792,18 +792,18 @@ var RegistryConfigSchema = _zod.z.object({
792
792
  message: "configurePool requires either endpoint or startEngine"
793
793
  });
794
794
  }
795
- const localEngineEndpoint = _chunkB5SNXPSScjs.buildEngineEndpoint.call(void 0,
795
+ const localEngineEndpoint = _chunkGZKR7OREcjs.buildEngineEndpoint.call(void 0,
796
796
  config.engineHost,
797
797
  config.enginePort
798
798
  );
799
799
  const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? localEngineEndpoint : void 0)));
800
- const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkKWGN2ZBJcjs.getRivetRunServices.call(void 0, ))), () => ( Boolean(endpoint && _chunkB5SNXPSScjs.isLocalEngineEndpoint.call(void 0, endpoint))));
800
+ const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunk3Y7MKDLZcjs.getRivetRunServices.call(void 0, ))), () => ( Boolean(endpoint && _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, endpoint))));
801
801
  const validateServerlessEndpoint = Boolean(
802
802
  config.startEngine || parsedEndpoint
803
803
  );
804
804
  const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
805
- const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkB5SNXPSScjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
806
- const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkB5SNXPSScjs.tryParseEndpoint.call(void 0, ctx, {
805
+ const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
806
+ const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkGZKR7OREcjs.tryParseEndpoint.call(void 0, ctx, {
807
807
  endpoint: config.serverless.publicEndpoint,
808
808
  path: ["serverless", "publicEndpoint"]
809
809
  }) : void 0;
@@ -907,7 +907,7 @@ var DocRegistryConfigSchema = _zod.z.object({
907
907
  noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
908
908
  sqlite: DocSqliteConfigSchema,
909
909
  logging: _zod.z.object({
910
- level: _chunkKWGN2ZBJcjs.LogLevelSchema.optional().describe(
910
+ level: _chunk3Y7MKDLZcjs.LogLevelSchema.optional().describe(
911
911
  "Log level for RivetKit. Default: 'warn'"
912
912
  )
913
913
  }).optional().describe("Logging configuration."),
@@ -955,7 +955,7 @@ function shouldAttachNativeKvError(message) {
955
955
  function enrichNativeDatabaseError(database, error) {
956
956
  var _a;
957
957
  const bridgeReason = typeof error === "string" ? error : error instanceof Error ? error.message : void 0;
958
- const bridged = bridgeReason === void 0 ? void 0 : _chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, bridgeReason);
958
+ const bridged = bridgeReason === void 0 ? void 0 : _chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, bridgeReason);
959
959
  if (bridged) {
960
960
  throw bridged;
961
961
  }
@@ -1537,7 +1537,7 @@ var NapiCoreRuntime = (_class = class {
1537
1537
  if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
1538
1538
  return ownerCtx;
1539
1539
  }
1540
- const applicationSpan = _chunkB5SNXPSScjs.readActiveTraceHeaders.call(void 0, );
1540
+ const applicationSpan = _chunkGZKR7OREcjs.readActiveTraceHeaders.call(void 0, );
1541
1541
  if (!applicationSpan) {
1542
1542
  return active;
1543
1543
  }
@@ -1740,7 +1740,7 @@ var NapiCoreRuntime = (_class = class {
1740
1740
  const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
1741
1741
  return this.#invocationContext.run(
1742
1742
  nativeCtx,
1743
- () => _chunkB5SNXPSScjs.runWithActorInvocationSpan.call(void 0, span, run)
1743
+ () => _chunkGZKR7OREcjs.runWithActorInvocationSpan.call(void 0, span, run)
1744
1744
  );
1745
1745
  }
1746
1746
  actorInvocationTraceContext(ctx) {
@@ -1770,7 +1770,7 @@ var NapiCoreRuntime = (_class = class {
1770
1770
  run: (body) => this.#runAs(stepCtx, body),
1771
1771
  finish: (outcome, error) => step.finish(
1772
1772
  outcome,
1773
- error === void 0 ? void 0 : _chunkJX2ITWAVcjs.encodeErrorForBridge.call(void 0, error)
1773
+ error === void 0 ? void 0 : _chunkMGI2VVF6cjs.encodeErrorForBridge.call(void 0, error)
1774
1774
  )
1775
1775
  };
1776
1776
  },
@@ -2115,8 +2115,8 @@ function runtimeBytesToArrayBuffer(value) {
2115
2115
  function buildNativeHttpRequest(init) {
2116
2116
  var _a;
2117
2117
  const headers = new Headers(init.headers);
2118
- const originalUrl = headers.get(_chunkB5SNXPSScjs.HEADER_ORIGINAL_REQUEST_URL);
2119
- headers.delete(_chunkB5SNXPSScjs.HEADER_ORIGINAL_REQUEST_URL);
2118
+ const originalUrl = headers.get(_chunkGZKR7OREcjs.HEADER_ORIGINAL_REQUEST_URL);
2119
+ headers.delete(_chunkGZKR7OREcjs.HEADER_ORIGINAL_REQUEST_URL);
2120
2120
  const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
2121
2121
  const method2 = init.method.toUpperCase();
2122
2122
  const bodyForbidden = method2 === "GET" || method2 === "HEAD";
@@ -2195,7 +2195,7 @@ async function pumpResponseBody(reader, stream) {
2195
2195
  }
2196
2196
  } catch (error) {
2197
2197
  try {
2198
- await stream.error(_chunkKWGN2ZBJcjs.stringifyError.call(void 0, error));
2198
+ await stream.error(_chunk3Y7MKDLZcjs.stringifyError.call(void 0, error));
2199
2199
  } catch (streamError) {
2200
2200
  logger2().debug({
2201
2201
  msg: "failed to report native http response stream error",
@@ -2325,7 +2325,7 @@ function validateQueueComplete(schemas, name, response) {
2325
2325
  return result.data;
2326
2326
  }
2327
2327
  function validationError(target, issues) {
2328
- return new (0, _chunkJX2ITWAVcjs.RivetError)("actor", "validation_error", `Invalid ${target}`, {
2328
+ return new (0, _chunkMGI2VVF6cjs.RivetError)("actor", "validation_error", `Invalid ${target}`, {
2329
2329
  public: true,
2330
2330
  metadata: { issues }
2331
2331
  });
@@ -2333,7 +2333,7 @@ function validationError(target, issues) {
2333
2333
 
2334
2334
  // src/registry/run-handler-coordinator.ts
2335
2335
  function runUnavailable(actorId, reason) {
2336
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
2336
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
2337
2337
  "actor",
2338
2338
  "run_handler_unavailable",
2339
2339
  `Run handler control is unavailable for actor ${actorId}: ${reason}.`,
@@ -2554,16 +2554,16 @@ function normalizeQueueMessage(message) {
2554
2554
  }
2555
2555
  function normalizeWasmBridgeError(error) {
2556
2556
  if (typeof error === "string") {
2557
- return _nullishCoalesce(_chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error), () => ( error));
2557
+ return _nullishCoalesce(_chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error), () => ( error));
2558
2558
  }
2559
2559
  if (error instanceof Error) {
2560
- const bridged = _chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error.message);
2560
+ const bridged = _chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error.message);
2561
2561
  if (bridged) {
2562
2562
  return bridged;
2563
2563
  }
2564
2564
  }
2565
2565
  if (typeof error === "object" && error !== null && "reason" in error && typeof error.reason === "string") {
2566
- const bridged = _chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error.reason);
2566
+ const bridged = _chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error.reason);
2567
2567
  if (bridged) {
2568
2568
  return bridged;
2569
2569
  }
@@ -2585,7 +2585,7 @@ function callWasmSync(invoke) {
2585
2585
  }
2586
2586
  }
2587
2587
  function unsupportedWasmMethod(method2) {
2588
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
2588
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
2589
2589
  "runtime",
2590
2590
  "unsupported",
2591
2591
  `Unsupported wasm runtime method: ${method2}`,
@@ -3043,7 +3043,7 @@ var WasmCoreRuntime = (_class2 = class {
3043
3043
  await callWasm(() => database.close());
3044
3044
  }
3045
3045
  async actorRuntimeSocketProvision(_ctx) {
3046
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
3046
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
3047
3047
  "actor_runtime_socket",
3048
3048
  "unsupported",
3049
3049
  "Actor Runtime Socket is only available on Unix native runtimes.",
@@ -3412,7 +3412,7 @@ function loadedRuntimeKind(runtime) {
3412
3412
  case "wasm":
3413
3413
  return "wasm";
3414
3414
  }
3415
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
3415
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
3416
3416
  "config",
3417
3417
  "unknown_runtime",
3418
3418
  "RivetKit runtime must be NAPI or wasm.",
@@ -3433,16 +3433,16 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
3433
3433
  nativeError = error;
3434
3434
  logger2().warn({
3435
3435
  msg: "native runtime failed to load; falling back to wasm",
3436
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
3436
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
3437
3437
  });
3438
3438
  }
3439
3439
  try {
3440
3440
  return (await loaders.loadWasm(config.wasm)).runtime;
3441
3441
  } catch (wasmError) {
3442
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
3442
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
3443
3443
  "config",
3444
3444
  "runtime_unavailable",
3445
- `RivetKit could not load a core runtime. Native runtime: ${_chunkKWGN2ZBJcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkKWGN2ZBJcjs.stringifyError.call(void 0, wasmError)}`,
3445
+ `RivetKit could not load a core runtime. Native runtime: ${_chunk3Y7MKDLZcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunk3Y7MKDLZcjs.stringifyError.call(void 0, wasmError)}`,
3446
3446
  {
3447
3447
  public: true,
3448
3448
  statusCode: 500
@@ -3470,7 +3470,7 @@ function normalizeRuntimeConfigForKind(config, runtimeKind) {
3470
3470
  return config;
3471
3471
  }
3472
3472
  if (sqliteBackendForConfig(config) === "local") {
3473
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
3473
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
3474
3474
  "config",
3475
3475
  "wasm_local_sqlite",
3476
3476
  "WebAssembly runtime cannot use local SQLite. Use remote SQLite instead.",
@@ -3536,14 +3536,14 @@ function getNativeConnPersistState(runtime, ctx, conn) {
3536
3536
  return connState;
3537
3537
  }
3538
3538
  function stateMutationReentrantError() {
3539
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3539
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3540
3540
  "actor",
3541
3541
  "state_mutation_reentrant",
3542
3542
  "State mutations are not allowed inside onStateChange."
3543
3543
  );
3544
3544
  }
3545
3545
  function stateTransactionConflictError() {
3546
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3546
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3547
3547
  "actor",
3548
3548
  "state_transaction_conflict",
3549
3549
  "State cannot be mutated by another action while an experimental state-aware database transaction is active.",
@@ -3551,7 +3551,7 @@ function stateTransactionConflictError() {
3551
3551
  );
3552
3552
  }
3553
3553
  function databaseNotConfiguredError() {
3554
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3554
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3555
3555
  "actor",
3556
3556
  "database_not_configured",
3557
3557
  "database is not configured for this actor",
@@ -3559,7 +3559,7 @@ function databaseNotConfiguredError() {
3559
3559
  );
3560
3560
  }
3561
3561
  function databaseClientNotReadyError() {
3562
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3562
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3563
3563
  "actor",
3564
3564
  "database_client_not_ready",
3565
3565
  "actor database client was not initialized before user code ran. this is an internal lifecycle error; the migration callback should have pre-warmed the client. file an issue if you can reproduce.",
@@ -3567,7 +3567,7 @@ function databaseClientNotReadyError() {
3567
3567
  );
3568
3568
  }
3569
3569
  function runHandlerNotConfiguredError() {
3570
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3570
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3571
3571
  "actor",
3572
3572
  "run_handler_unavailable",
3573
3573
  "Cannot schedule a run wake because this actor does not define a run handler.",
@@ -3575,7 +3575,7 @@ function runHandlerNotConfiguredError() {
3575
3575
  );
3576
3576
  }
3577
3577
  function stateNotEnabledError() {
3578
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3578
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3579
3579
  "actor",
3580
3580
  "state_not_enabled",
3581
3581
  "State not enabled. Must implement `createState` or `state` to use state. (https://www.rivet.dev/docs/actors/state/#initializing-state)",
@@ -3583,7 +3583,7 @@ function stateNotEnabledError() {
3583
3583
  );
3584
3584
  }
3585
3585
  function nativeClientNotConfiguredError() {
3586
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3586
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3587
3587
  "native",
3588
3588
  "client_not_configured",
3589
3589
  "native actor client is not configured",
@@ -3591,7 +3591,7 @@ function nativeClientNotConfiguredError() {
3591
3591
  );
3592
3592
  }
3593
3593
  function nativeEndpointNotConfiguredError() {
3594
- return new (0, _chunkJX2ITWAVcjs.RivetError)(
3594
+ return new (0, _chunkMGI2VVF6cjs.RivetError)(
3595
3595
  "native",
3596
3596
  "endpoint_not_configured",
3597
3597
  "registry endpoint is required for native envoy startup",
@@ -3636,7 +3636,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
3636
3636
  }).catch((error) => {
3637
3637
  logger2().warn({
3638
3638
  msg: "deferred native sleep cleanup failed",
3639
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
3639
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
3640
3640
  });
3641
3641
  });
3642
3642
  return;
@@ -3799,10 +3799,10 @@ function decodeValue(value) {
3799
3799
  if (!value || value.length === 0) {
3800
3800
  return void 0;
3801
3801
  }
3802
- return _chunkKWGN2ZBJcjs.decodeCborCompat.call(void 0, value);
3802
+ return _chunk3Y7MKDLZcjs.decodeCborCompat.call(void 0, value);
3803
3803
  }
3804
3804
  function encodeValue(value) {
3805
- return _chunkKWGN2ZBJcjs.encodeCborCompat.call(void 0, value);
3805
+ return _chunk3Y7MKDLZcjs.encodeCborCompat.call(void 0, value);
3806
3806
  }
3807
3807
  function normalizeArgs(value) {
3808
3808
  return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
@@ -3815,16 +3815,16 @@ function unwrapTsfnPayload(error, payload) {
3815
3815
  }
3816
3816
  function normalizeNativeBridgeError(error) {
3817
3817
  if (typeof error === "string") {
3818
- return _nullishCoalesce(_chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error), () => ( error));
3818
+ return _nullishCoalesce(_chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error), () => ( error));
3819
3819
  }
3820
3820
  if (error instanceof Error) {
3821
- const bridged = _chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error.message);
3821
+ const bridged = _chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error.message);
3822
3822
  if (bridged) {
3823
3823
  return bridged;
3824
3824
  }
3825
3825
  }
3826
3826
  if (typeof error === "object" && error !== null && "reason" in error && typeof error.reason === "string") {
3827
- const bridged = _chunkJX2ITWAVcjs.decodeBridgeRivetError.call(void 0, error.reason);
3827
+ const bridged = _chunkMGI2VVF6cjs.decodeBridgeRivetError.call(void 0, error.reason);
3828
3828
  if (bridged) {
3829
3829
  return bridged;
3830
3830
  }
@@ -3832,14 +3832,25 @@ function normalizeNativeBridgeError(error) {
3832
3832
  return error;
3833
3833
  }
3834
3834
  function isStructuredBridgeError(error) {
3835
- if (error instanceof _chunkJX2ITWAVcjs.RivetError) {
3835
+ if (error instanceof _chunkMGI2VVF6cjs.RivetError) {
3836
3836
  return true;
3837
3837
  }
3838
- return _chunkJX2ITWAVcjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
3838
+ return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
3839
3839
  }
3840
3840
  function encodeNativeCallbackError(error) {
3841
- const structuredError = isStructuredBridgeError(error) ? error : _chunkKWGN2ZBJcjs.deconstructError.call(void 0, error, true);
3842
- const bridgeError = new Error(_chunkJX2ITWAVcjs.encodeBridgeRivetError.call(void 0, structuredError), {
3841
+ const structuredError = isStructuredBridgeError(error) ? error : _chunk3Y7MKDLZcjs.deconstructError.call(void 0, error, true);
3842
+ const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
3843
+ if (droppedMetadataCause !== void 0) {
3844
+ logger2().warn(
3845
+ {
3846
+ group: structuredError.group,
3847
+ code: structuredError.code,
3848
+ error: String(droppedMetadataCause)
3849
+ },
3850
+ "dropped error metadata that JSON cannot encode"
3851
+ );
3852
+ }
3853
+ const bridgeError = new Error(encoded, {
3843
3854
  cause: error instanceof Error ? error : void 0
3844
3855
  });
3845
3856
  return Object.assign(bridgeError, {
@@ -3864,9 +3875,9 @@ function callNativeSync(invoke) {
3864
3875
  }
3865
3876
  }
3866
3877
  function isClosedTaskRegistrationError(error) {
3867
- const metadata = error instanceof _chunkJX2ITWAVcjs.RivetError ? error.metadata : void 0;
3878
+ const metadata = error instanceof _chunkMGI2VVF6cjs.RivetError ? error.metadata : void 0;
3868
3879
  const metadataError = metadata && typeof metadata === "object" && "error" in metadata ? metadata.error : void 0;
3869
- return error instanceof _chunkJX2ITWAVcjs.RivetError && error.group === "core" && error.code === _chunkJX2ITWAVcjs.INTERNAL_ERROR_CODE && typeof metadataError === "string" && /actor task registration is (closed|not configured)/.test(metadataError);
3880
+ return error instanceof _chunkMGI2VVF6cjs.RivetError && error.group === "core" && error.code === _chunkMGI2VVF6cjs.INTERNAL_ERROR_CODE && typeof metadataError === "string" && /actor task registration is (closed|not configured)/.test(metadataError);
3870
3881
  }
3871
3882
  async function createCancellationTokenHandle(runtime, signal) {
3872
3883
  if (!signal) {
@@ -3889,7 +3900,7 @@ function decodeWorkflowCbor(data) {
3889
3900
  return null;
3890
3901
  }
3891
3902
  try {
3892
- return _chunkKWGN2ZBJcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
3903
+ return _chunk3Y7MKDLZcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
3893
3904
  } catch (e3) {
3894
3905
  return null;
3895
3906
  }
@@ -4002,7 +4013,7 @@ function serializeWorkflowHistoryForJson(data) {
4002
4013
  if (data === null) {
4003
4014
  return null;
4004
4015
  }
4005
- const history = _chunk6LRPYB4Qcjs.decodeWorkflowHistoryTransport.call(void 0, data);
4016
+ const history = _chunkVJNX5RCScjs.decodeWorkflowHistoryTransport.call(void 0, data);
4006
4017
  return jsonSafe({
4007
4018
  nameRegistry: [...history.nameRegistry],
4008
4019
  entries: history.entries.map((entry) => ({
@@ -4148,7 +4159,7 @@ var NativeConnAdapter = class {
4148
4159
  },
4149
4160
  (newValue) => {
4150
4161
  assertCurrentState();
4151
- _chunkKWGN2ZBJcjs.assertJsonCompatValue.call(void 0, newValue);
4162
+ _chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, newValue);
4152
4163
  }
4153
4164
  );
4154
4165
  }
@@ -4156,7 +4167,7 @@ var NativeConnAdapter = class {
4156
4167
  var _a;
4157
4168
  (_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
4158
4169
  const nextValue = unwrapWriteThroughProxy(value);
4159
- _chunkKWGN2ZBJcjs.assertJsonCompatValue.call(void 0, nextValue);
4170
+ _chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, nextValue);
4160
4171
  this.#writeState(nextValue, { writeNative: true });
4161
4172
  }
4162
4173
  initializeState(value) {
@@ -4539,7 +4550,7 @@ var NativeQueueAdapter = class {
4539
4550
  async nextBatch(options) {
4540
4551
  const completable = (options == null ? void 0 : options.completable) === true;
4541
4552
  if (this.#pendingCompletableMessageIds.size > 0) {
4542
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
4553
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
4543
4554
  "queue",
4544
4555
  "previous_message_not_completed",
4545
4556
  "Previous completable queue message is not completed. Call `message.complete(...)` before receiving the next message.",
@@ -4706,7 +4717,7 @@ var NativeQueueAdapter = class {
4706
4717
  }
4707
4718
  yield message;
4708
4719
  } catch (error) {
4709
- if (_chunkJX2ITWAVcjs.isActorAbortedError.call(void 0, error)) {
4720
+ if (_chunkMGI2VVF6cjs.isActorAbortedError.call(void 0, error)) {
4710
4721
  return;
4711
4722
  }
4712
4723
  throw error;
@@ -4727,7 +4738,7 @@ var NativeQueueAdapter = class {
4727
4738
  ...message,
4728
4739
  complete: async (response) => {
4729
4740
  if (typeof message.complete !== "function") {
4730
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
4741
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
4731
4742
  "queue",
4732
4743
  "complete_not_configured",
4733
4744
  `Queue '${message.name}' does not support completion responses.`,
@@ -4739,7 +4750,7 @@ var NativeQueueAdapter = class {
4739
4750
  );
4740
4751
  }
4741
4752
  if (completed) {
4742
- throw new (0, _chunkJX2ITWAVcjs.RivetError)(
4753
+ throw new (0, _chunkMGI2VVF6cjs.RivetError)(
4743
4754
  "queue",
4744
4755
  "already_completed",
4745
4756
  "Queue message was already completed.",
@@ -5176,7 +5187,10 @@ var ActorContextHandleAdapter = class {
5176
5187
  }
5177
5188
  this.#request = request;
5178
5189
  this[_chunkNWCAIWHLcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL] = new NativeWorkflowRuntimeAdapter(
5179
- this
5190
+ this,
5191
+ () => this.#logByInvocationScope.delete(
5192
+ _nullishCoalesce(this.#runtime.currentInvocationScope(), () => ( NO_INVOCATION_SCOPE))
5193
+ )
5180
5194
  );
5181
5195
  }
5182
5196
  get kv() {
@@ -5232,7 +5246,7 @@ var ActorContextHandleAdapter = class {
5232
5246
  },
5233
5247
  (newValue) => {
5234
5248
  assertCurrentState();
5235
- _chunkKWGN2ZBJcjs.assertJsonCompatValue.call(void 0, newValue);
5249
+ _chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, newValue);
5236
5250
  }
5237
5251
  );
5238
5252
  }
@@ -5244,7 +5258,7 @@ var ActorContextHandleAdapter = class {
5244
5258
  }
5245
5259
  this.#assertCanMutateState();
5246
5260
  const nextValue = unwrapWriteThroughProxy(value);
5247
- _chunkKWGN2ZBJcjs.assertJsonCompatValue.call(void 0, nextValue);
5261
+ _chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, nextValue);
5248
5262
  this.#writeState(nextValue, { scheduleSave: true });
5249
5263
  }
5250
5264
  initializeState(value) {
@@ -5348,7 +5362,10 @@ var ActorContextHandleAdapter = class {
5348
5362
  () => this.#runtime.actorInvocationTraceContext(this.#ctx)
5349
5363
  );
5350
5364
  }
5351
- /** Cached per invocation, because the `run` context outlives workflow runs and steps. */
5365
+ /**
5366
+ * Cached per invocation, because the `run` context outlives workflow runs and steps.
5367
+ * A workflow queue receive clears the entry, because the run's ray becomes the message's ray.
5368
+ */
5352
5369
  get log() {
5353
5370
  const scope = _nullishCoalesce(this.#runtime.currentInvocationScope(), () => ( NO_INVOCATION_SCOPE));
5354
5371
  const cached = this.#logByInvocationScope.get(scope);
@@ -5453,7 +5470,7 @@ var ActorContextHandleAdapter = class {
5453
5470
  log: {
5454
5471
  debug: (obj) => logger2().debug(obj)
5455
5472
  },
5456
- nativeDatabaseProvider: _chunkGHKQC4PDcjs.registerNativeStateTransactionOpener.call(void 0,
5473
+ nativeDatabaseProvider: _chunkJLM6TML2cjs.registerNativeStateTransactionOpener.call(void 0,
5457
5474
  {
5458
5475
  open: async (requestedActorId) => {
5459
5476
  void requestedActorId;
@@ -5476,7 +5493,7 @@ var ActorContextHandleAdapter = class {
5476
5493
  return this.#db;
5477
5494
  }
5478
5495
  #bindDatabaseClient(client) {
5479
- return _chunkGHKQC4PDcjs.bindNativeStateTransactionContext.call(void 0, client, {
5496
+ return _chunkJLM6TML2cjs.bindNativeStateTransactionContext.call(void 0, client, {
5480
5497
  enter: async () => await this.#enterStateTransaction(),
5481
5498
  exit: (scope) => this.#exitStateTransaction(
5482
5499
  scope
@@ -5680,7 +5697,7 @@ var ActorContextHandleAdapter = class {
5680
5697
  const trackedPromise = Promise.resolve(promise).catch((error) => {
5681
5698
  logger2().warn({
5682
5699
  msg: "keepAwake promise rejected",
5683
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
5700
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
5684
5701
  });
5685
5702
  }).then(() => null);
5686
5703
  try {
@@ -5895,13 +5912,15 @@ var ActorContextHandleAdapter = class {
5895
5912
  };
5896
5913
  var NativeWorkflowRuntimeAdapter = class {
5897
5914
  #ctx;
5915
+ #onMessagesReceived;
5898
5916
  #completions = /* @__PURE__ */ new Map();
5899
5917
 
5900
5918
 
5901
5919
 
5902
5920
 
5903
- constructor(ctx) {
5921
+ constructor(ctx, onMessagesReceived) {
5904
5922
  this.#ctx = ctx;
5923
+ this.#onMessagesReceived = onMessagesReceived;
5905
5924
  this.id = ctx.actorId;
5906
5925
  this.driver = {
5907
5926
  kvBatchGet: async (actorId, keys) => {
@@ -5941,6 +5960,9 @@ var NativeWorkflowRuntimeAdapter = class {
5941
5960
  timeout: _nullishCoalesce(timeout, () => ( 0)),
5942
5961
  completable
5943
5962
  });
5963
+ if (messages.length > 0) {
5964
+ this.#onMessagesReceived();
5965
+ }
5944
5966
  return messages.map(
5945
5967
  (message) => this.#wrapQueueMessage(message)
5946
5968
  );
@@ -6153,7 +6175,7 @@ function validateInspectorTabSource(tabId, resolved) {
6153
6175
  function buildNativeFactory(runtime, registryConfig, definition) {
6154
6176
  var _a;
6155
6177
  const config = definition.config;
6156
- const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkGHKQC4PDcjs.db.call(void 0, )));
6178
+ const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkJLM6TML2cjs.db.call(void 0, )));
6157
6179
  const actionHandlers = _chunkNWCAIWHLcjs.flattenActionHandlers.call(void 0, config.actions);
6158
6180
  const schemaConfig = {
6159
6181
  actionInputSchemas: _chunkNWCAIWHLcjs.flattenActionInputSchemas.call(void 0,
@@ -6164,9 +6186,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6164
6186
  events: config.events,
6165
6187
  queues: config.queues
6166
6188
  };
6167
- const createClient = (ctx) => _chunkB5SNXPSScjs.createClientWithDriver.call(void 0,
6168
- new (0, _chunkB5SNXPSScjs.RemoteEngineControlClient)(
6169
- _chunkB5SNXPSScjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
6189
+ const createClient = (ctx) => _chunkGZKR7OREcjs.createClientWithDriver.call(void 0,
6190
+ new (0, _chunkGZKR7OREcjs.RemoteEngineControlClient)(
6191
+ _chunkGZKR7OREcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
6170
6192
  ),
6171
6193
  {
6172
6194
  encoding: "bare",
@@ -6237,7 +6259,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6237
6259
  }
6238
6260
  });
6239
6261
  const errorResponse = (error, status) => {
6240
- const rivetError = _chunkJX2ITWAVcjs.toRivetError.call(void 0, error);
6262
+ const rivetError = _chunkMGI2VVF6cjs.toRivetError.call(void 0, error);
6241
6263
  return jsonResponse(
6242
6264
  {
6243
6265
  group: rivetError.group,
@@ -6337,7 +6359,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6337
6359
  body = await jsRequest.json();
6338
6360
  } catch (e4) {
6339
6361
  return errorResponse(
6340
- new (0, _chunkJX2ITWAVcjs.RivetError)(
6362
+ new (0, _chunkMGI2VVF6cjs.RivetError)(
6341
6363
  "actor",
6342
6364
  "invalid_request",
6343
6365
  "Invalid inspector JSON body",
@@ -6349,7 +6371,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6349
6371
  const name = _nullishCoalesce(body.name, () => ( ""));
6350
6372
  if (name === "") {
6351
6373
  return errorResponse(
6352
- new (0, _chunkJX2ITWAVcjs.RivetError)(
6374
+ new (0, _chunkMGI2VVF6cjs.RivetError)(
6353
6375
  "actor",
6354
6376
  "invalid_request",
6355
6377
  "Queue message name must not be empty",
@@ -6358,7 +6380,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6358
6380
  400
6359
6381
  );
6360
6382
  }
6361
- const cbor = _chunkKWGN2ZBJcjs.encodeCborCompat.call(void 0,
6383
+ const cbor = _chunk3Y7MKDLZcjs.encodeCborCompat.call(void 0,
6362
6384
  _nullishCoalesce(body.body, () => ( null))
6363
6385
  );
6364
6386
  const message = await runtime.actorQueueSend(ctx, name, cbor);
@@ -6523,7 +6545,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6523
6545
  const action = actionHandlers[actionName];
6524
6546
  if (!action) {
6525
6547
  return errorResponse(
6526
- new (0, _chunkJX2ITWAVcjs.RivetError)(
6548
+ new (0, _chunkMGI2VVF6cjs.RivetError)(
6527
6549
  "action",
6528
6550
  "action_not_found",
6529
6551
  `Action ${actionName} not found`
@@ -6896,7 +6918,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6896
6918
  );
6897
6919
  }
6898
6920
  if (!result) {
6899
- throw _chunkJX2ITWAVcjs.forbiddenError.call(void 0, );
6921
+ throw _chunkMGI2VVF6cjs.forbiddenError.call(void 0, );
6900
6922
  }
6901
6923
  } finally {
6902
6924
  await actorCtx.dispose();
@@ -6955,7 +6977,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6955
6977
  ...request,
6956
6978
  abortController: requestAbortController
6957
6979
  });
6958
- const rawConnParams = handlerRequest.headers.get(_chunkB5SNXPSScjs.HEADER_CONN_PARAMS);
6980
+ const rawConnParams = handlerRequest.headers.get(_chunkGZKR7OREcjs.HEADER_CONN_PARAMS);
6959
6981
  let requestCtx;
6960
6982
  let conn;
6961
6983
  let removeRequestAbortListener;
@@ -7012,7 +7034,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7012
7034
  requestCtx,
7013
7035
  handlerRequest
7014
7036
  );
7015
- if (!_chunkB5SNXPSScjs.isResponseLike.call(void 0, response)) {
7037
+ if (!_chunkGZKR7OREcjs.isResponseLike.call(void 0, response)) {
7016
7038
  throw new Error(
7017
7039
  "onRequest handler must return a Response"
7018
7040
  );
@@ -7107,7 +7129,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7107
7129
  var _a2;
7108
7130
  const { ctx } = unwrapTsfnPayload(error, payload);
7109
7131
  const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
7110
- return history == null ? void 0 : _chunkKWGN2ZBJcjs.toUint8Array.call(void 0, history);
7132
+ return history == null ? void 0 : _chunk3Y7MKDLZcjs.toUint8Array.call(void 0, history);
7111
7133
  }
7112
7134
  ) : void 0,
7113
7135
  replayWorkflow: _chunkNWCAIWHLcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
@@ -7121,7 +7143,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7121
7143
  return void 0;
7122
7144
  }
7123
7145
  const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
7124
- return history == null ? void 0 : _chunkKWGN2ZBJcjs.toUint8Array.call(void 0, history);
7146
+ return history == null ? void 0 : _chunk3Y7MKDLZcjs.toUint8Array.call(void 0, history);
7125
7147
  }
7126
7148
  ) : void 0,
7127
7149
  actions: Object.fromEntries(
@@ -7194,7 +7216,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7194
7216
  name
7195
7217
  );
7196
7218
  if (canPublish && !await canPublish(actorCtx)) {
7197
- throw _chunkJX2ITWAVcjs.forbiddenError.call(void 0, );
7219
+ throw _chunkMGI2VVF6cjs.forbiddenError.call(void 0, );
7198
7220
  }
7199
7221
  const decodedBody = decodeValue(body);
7200
7222
  if (wait) {
@@ -7257,7 +7279,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
7257
7279
  startServices: resolveServicesBinary && config.startServices,
7258
7280
  handleInspectorHttpInRuntime: true,
7259
7281
  serverlessBasePath: config.serverless.basePath,
7260
- serverlessPackageVersion: _chunkKWGN2ZBJcjs.VERSION,
7282
+ serverlessPackageVersion: _chunk3Y7MKDLZcjs.VERSION,
7261
7283
  serverlessClientEndpoint: config.publicEndpoint,
7262
7284
  serverlessClientNamespace: config.publicNamespace,
7263
7285
  serverlessClientToken: config.publicToken,
@@ -7270,7 +7292,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
7270
7292
  } catch (error) {
7271
7293
  logger2().warn({
7272
7294
  msg: "could not resolve a local engine binary; if a local engine must be spawned it will fail with engine.binary_unavailable \u2014 set RIVET_ENGINE_BINARY_PATH or install the @rivetkit/engine-cli platform package",
7273
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
7295
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
7274
7296
  });
7275
7297
  }
7276
7298
  if (resolveServicesBinary && config.startServices) {
@@ -7280,20 +7302,20 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
7280
7302
  } catch (error) {
7281
7303
  logger2().warn({
7282
7304
  msg: "could not resolve the Services binary; a local engine will fail with services.binary_unavailable \u2014 set RIVET_RUN_SERVICES=0 to disable Services or RIVET_SERVICES_BINARY to a local rivet-services binary",
7283
- error: _chunkKWGN2ZBJcjs.stringifyError.call(void 0, error)
7305
+ error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
7284
7306
  });
7285
7307
  }
7286
7308
  }
7287
7309
  serveConfig.engineHost = config.engineHost;
7288
7310
  serveConfig.enginePort = config.enginePort;
7289
7311
  if ((_a = config.test) == null ? void 0 : _a.enabled) {
7290
- serveConfig.inspectorTestToken = _nullishCoalesce(_chunkKWGN2ZBJcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
7312
+ serveConfig.inspectorTestToken = _nullishCoalesce(_chunk3Y7MKDLZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
7291
7313
  }
7292
7314
  return serveConfig;
7293
7315
  }
7294
7316
  async function buildRegistryWithRuntime(config, runtime) {
7295
7317
  var _a;
7296
- if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkKWGN2ZBJcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
7318
+ if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunk3Y7MKDLZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
7297
7319
  trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
7298
7320
  }
7299
7321
  if (runtime.kind === "napi") {
@@ -7360,7 +7382,7 @@ function createApplicationFetch(application, runtime) {
7360
7382
  signal: abortController.signal
7361
7383
  })
7362
7384
  );
7363
- if (!_chunkB5SNXPSScjs.isResponseLike.call(void 0, response)) {
7385
+ if (!_chunkGZKR7OREcjs.isResponseLike.call(void 0, response)) {
7364
7386
  throw new TypeError(
7365
7387
  "registry.listen() application fetch must return a Response"
7366
7388
  );
@@ -7410,7 +7432,7 @@ var Registry = class {
7410
7432
  var _a;
7411
7433
  this.#config = config;
7412
7434
  if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
7413
- _chunkKWGN2ZBJcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
7435
+ _chunk3Y7MKDLZcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
7414
7436
  }
7415
7437
  this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
7416
7438
  this.routes = {
@@ -7636,10 +7658,10 @@ var Registry = class {
7636
7658
  * ```
7637
7659
  */
7638
7660
  async listen(opts = {}) {
7639
- const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkKWGN2ZBJcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
7640
- const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkKWGN2ZBJcjs.getRivetkitPublicDir.call(void 0, )));
7661
+ const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunk3Y7MKDLZcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
7662
+ const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunk3Y7MKDLZcjs.getRivetkitPublicDir.call(void 0, )));
7641
7663
  const config = this.parseConfig();
7642
- if (opts.application && _chunkKWGN2ZBJcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
7664
+ if (opts.application && _chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
7643
7665
  if (config.runtime === "wasm") {
7644
7666
  throw new Error(
7645
7667
  "registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
@@ -7715,7 +7737,7 @@ var Registry = class {
7715
7737
  return jsonRouteResponse(503, {
7716
7738
  status: "not_started",
7717
7739
  runtime: "rivetkit",
7718
- version: _chunkKWGN2ZBJcjs.VERSION
7740
+ version: _chunk3Y7MKDLZcjs.VERSION
7719
7741
  });
7720
7742
  }
7721
7743
  const { runtime, registry } = configured;
@@ -7723,7 +7745,7 @@ var Registry = class {
7723
7745
  return jsonRouteResponse(501, {
7724
7746
  status: "unsupported",
7725
7747
  runtime: "rivetkit",
7726
- version: _chunkKWGN2ZBJcjs.VERSION
7748
+ version: _chunk3Y7MKDLZcjs.VERSION
7727
7749
  });
7728
7750
  }
7729
7751
  const response = await runtime.registryHealth(registry);
@@ -7797,14 +7819,14 @@ var Registry = class {
7797
7819
  var _a;
7798
7820
  if (!this.#runtimeServePromise) {
7799
7821
  const configuredEnvoyVersion = (_a = this.#config.envoy) == null ? void 0 : _a.version;
7800
- const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkKWGN2ZBJcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
7822
+ const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunk3Y7MKDLZcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
7801
7823
  logger2().info({
7802
7824
  msg: "starting rivetkit envoy",
7803
- rivetkitVersion: _chunkKWGN2ZBJcjs.VERSION,
7825
+ rivetkitVersion: _chunk3Y7MKDLZcjs.VERSION,
7804
7826
  envoyVersion: config.envoy.version,
7805
7827
  envoyVersionSource
7806
7828
  });
7807
- if (envoyVersionSource === "default" && _chunkKWGN2ZBJcjs.getNodeEnv.call(void 0, ) === "production") {
7829
+ if (envoyVersionSource === "default" && _chunk3Y7MKDLZcjs.getNodeEnv.call(void 0, ) === "production") {
7808
7830
  logger2().error({
7809
7831
  msg: "envoy version defaulted because neither config.envoy.version nor RIVET_ENVOY_VERSION is set; actors will not drain automatically across deploys. See https://rivet.dev/docs/actors/versions",
7810
7832
  envoyVersion: config.envoy.version,
@@ -7995,7 +8017,7 @@ var Registry = class {
7995
8017
  );
7996
8018
  }
7997
8019
  if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
7998
- if (_chunkKWGN2ZBJcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8020
+ if (_chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
7999
8021
  return Promise.reject(
8000
8022
  new Error(
8001
8023
  "registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
@@ -8065,8 +8087,8 @@ var Registry = class {
8065
8087
  * ```
8066
8088
  */
8067
8089
  start() {
8068
- if (_chunkKWGN2ZBJcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8069
- const publicDir = _nullishCoalesce(_chunkKWGN2ZBJcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
8090
+ if (_chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8091
+ const publicDir = _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
8070
8092
  this.listen({ publicDir }).catch((error) => {
8071
8093
  logger2().error({ error }, "auto-listen failed; exiting");
8072
8094
  if (typeof process !== "undefined" && typeof process.exit === "function") {
@@ -8087,13 +8109,13 @@ var Registry = class {
8087
8109
  };
8088
8110
  console.log();
8089
8111
  console.log(
8090
- ` RivetKit ${_chunkKWGN2ZBJcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
8112
+ ` RivetKit ${_chunk3Y7MKDLZcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
8091
8113
  );
8092
8114
  if (config.namespace !== "default") {
8093
8115
  logLine("Namespace", config.namespace);
8094
8116
  }
8095
8117
  if (config.endpoint) {
8096
- const endpointType = config.startEngine || _chunkB5SNXPSScjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
8118
+ const endpointType = config.startEngine || _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
8097
8119
  logLine("Endpoint", `${config.endpoint} (${endpointType})`);
8098
8120
  }
8099
8121
  if (kind === "serverless" && config.publicEndpoint) {
@@ -8163,5 +8185,5 @@ function setup(input) {
8163
8185
 
8164
8186
 
8165
8187
 
8166
- exports.ALLOWED_PUBLIC_HEADERS = _chunkB5SNXPSScjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkJX2ITWAVcjs.RivetError; exports.ActorsSchema = ActorsSchema; exports.DocConfigurePoolSchema = DocConfigurePoolSchema; exports.DocEnvoyConfigSchema = DocEnvoyConfigSchema; exports.DocRegistryConfigSchema = DocRegistryConfigSchema; exports.DocServerlessConfigSchema = DocServerlessConfigSchema; exports.DocSqliteConfigSchema = DocSqliteConfigSchema; exports.InlineWebSocketAdapter = InlineWebSocketAdapter; exports.Registry = Registry; exports.RegistryConfigSchema = RegistryConfigSchema; exports.RivetError = _chunkJX2ITWAVcjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkJX2ITWAVcjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkB5SNXPSScjs.createClientWithDriver; exports.defineRunHandler = _chunkNWCAIWHLcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkKWGN2ZBJcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkKWGN2ZBJcjs.toUint8Array;
8188
+ exports.ALLOWED_PUBLIC_HEADERS = _chunkGZKR7OREcjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkMGI2VVF6cjs.RivetError; exports.ActorsSchema = ActorsSchema; exports.DocConfigurePoolSchema = DocConfigurePoolSchema; exports.DocEnvoyConfigSchema = DocEnvoyConfigSchema; exports.DocRegistryConfigSchema = DocRegistryConfigSchema; exports.DocServerlessConfigSchema = DocServerlessConfigSchema; exports.DocSqliteConfigSchema = DocSqliteConfigSchema; exports.InlineWebSocketAdapter = InlineWebSocketAdapter; exports.Registry = Registry; exports.RegistryConfigSchema = RegistryConfigSchema; exports.RivetError = _chunkMGI2VVF6cjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkMGI2VVF6cjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkGZKR7OREcjs.createClientWithDriver; exports.defineRunHandler = _chunkNWCAIWHLcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunk3Y7MKDLZcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunk3Y7MKDLZcjs.toUint8Array;
8167
8189
  //# sourceMappingURL=mod.cjs.map