rivetkit 3.0.2 → 3.0.4

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 (88) hide show
  1. package/dist/browser/client.d.ts +8 -0
  2. package/dist/browser/client.js +1 -1
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +1 -1
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/{chunk-ANP7UCAM.js → chunk-2PHT2DGL.js} +6 -6
  7. package/dist/tsup/{chunk-BBEH6RML.cjs → chunk-3WZJFRCB.cjs} +3 -3
  8. package/dist/tsup/{chunk-BBEH6RML.cjs.map → chunk-3WZJFRCB.cjs.map} +1 -1
  9. package/dist/tsup/{chunk-M7KPJSGO.cjs → chunk-4L27QRHE.cjs} +3 -3
  10. package/dist/tsup/{chunk-M7KPJSGO.cjs.map → chunk-4L27QRHE.cjs.map} +1 -1
  11. package/dist/tsup/{chunk-47W6FHPJ.js → chunk-4YUA7CTJ.js} +2 -2
  12. package/dist/tsup/{chunk-UXDASKP6.js → chunk-A7Q5DJ2P.js} +3 -1
  13. package/dist/tsup/chunk-A7Q5DJ2P.js.map +1 -0
  14. package/dist/tsup/{chunk-HJWK46Z5.js → chunk-F5VDYHOA.js} +3 -3
  15. package/dist/tsup/{chunk-3RE23GTB.js → chunk-IIB4ZPZI.js} +2 -2
  16. package/dist/tsup/{chunk-3RE23GTB.js.map → chunk-IIB4ZPZI.js.map} +1 -1
  17. package/dist/tsup/{chunk-SSF2XC33.cjs → chunk-INFADXXI.cjs} +3 -1
  18. package/dist/tsup/chunk-INFADXXI.cjs.map +1 -0
  19. package/dist/tsup/{chunk-J7T52LN6.js → chunk-L3LCIZBH.js} +2 -2
  20. package/dist/tsup/{chunk-FR5QOAYE.cjs → chunk-LW57U7VQ.cjs} +10 -10
  21. package/dist/tsup/{chunk-FR5QOAYE.cjs.map → chunk-LW57U7VQ.cjs.map} +1 -1
  22. package/dist/tsup/{chunk-OF63EVJQ.js → chunk-NRTL2RDM.js} +2 -2
  23. package/dist/tsup/{chunk-3KVVYC5I.cjs → chunk-NXAFFMGH.cjs} +144 -144
  24. package/dist/tsup/{chunk-3KVVYC5I.cjs.map → chunk-NXAFFMGH.cjs.map} +1 -1
  25. package/dist/tsup/{chunk-ZAZAKYNQ.js → chunk-SIVNBXKO.js} +2 -2
  26. package/dist/tsup/{chunk-M3H37DUQ.cjs → chunk-SVEL5ZO3.cjs} +2 -2
  27. package/dist/tsup/{chunk-M3H37DUQ.cjs.map → chunk-SVEL5ZO3.cjs.map} +1 -1
  28. package/dist/tsup/{chunk-KF7ETIFK.cjs → chunk-T5Z3FG5Y.cjs} +3 -3
  29. package/dist/tsup/{chunk-KF7ETIFK.cjs.map → chunk-T5Z3FG5Y.cjs.map} +1 -1
  30. package/dist/tsup/{chunk-3C5KLO4V.cjs → chunk-UTNZZOMF.cjs} +4 -4
  31. package/dist/tsup/{chunk-3C5KLO4V.cjs.map → chunk-UTNZZOMF.cjs.map} +1 -1
  32. package/dist/tsup/{chunk-DVXMOEFT.cjs → chunk-UYBLHHFG.cjs} +7 -7
  33. package/dist/tsup/{chunk-DVXMOEFT.cjs.map → chunk-UYBLHHFG.cjs.map} +1 -1
  34. package/dist/tsup/{chunk-4ASLJWUQ.js → chunk-ZT7GZRFQ.js} +4 -4
  35. package/dist/tsup/client/mod.cjs +5 -5
  36. package/dist/tsup/client/mod.d.cts +2 -2
  37. package/dist/tsup/client/mod.d.ts +2 -2
  38. package/dist/tsup/client/mod.js +4 -4
  39. package/dist/tsup/common/log.cjs +2 -2
  40. package/dist/tsup/common/log.js +1 -1
  41. package/dist/tsup/common/websocket.cjs +3 -3
  42. package/dist/tsup/common/websocket.js +2 -2
  43. package/dist/tsup/{config-H6pJy_J1.d.cts → config-CM_AlRlT.d.cts} +8 -0
  44. package/dist/tsup/{config-BtUHYdoj.d.ts → config-DcUqgwcz.d.ts} +8 -0
  45. package/dist/tsup/{context-TWrKZjqf.d.cts → context-1BFHhiTs.d.cts} +1 -1
  46. package/dist/tsup/{context-DrDoMXSD.d.ts → context-Bws3ikEx.d.ts} +1 -1
  47. package/dist/tsup/db/drizzle.cjs +2 -2
  48. package/dist/tsup/db/drizzle.js +1 -1
  49. package/dist/tsup/db/mod.cjs +3 -3
  50. package/dist/tsup/db/mod.js +2 -2
  51. package/dist/tsup/dynamic/mod.cjs +2 -2
  52. package/dist/tsup/dynamic/mod.d.cts +1 -1
  53. package/dist/tsup/dynamic/mod.d.ts +1 -1
  54. package/dist/tsup/dynamic/mod.js +1 -1
  55. package/dist/tsup/inspector/mod.cjs +5 -5
  56. package/dist/tsup/inspector/mod.js +4 -4
  57. package/dist/tsup/inspector/workflow.cjs +4 -4
  58. package/dist/tsup/inspector/workflow.js +3 -3
  59. package/dist/tsup/inspector-tab/mod.cjs +2 -2
  60. package/dist/tsup/inspector-tab/mod.d.cts +2 -2
  61. package/dist/tsup/inspector-tab/mod.d.ts +2 -2
  62. package/dist/tsup/inspector-tab/mod.js +1 -1
  63. package/dist/tsup/mod.cjs +109 -109
  64. package/dist/tsup/mod.cjs.map +1 -1
  65. package/dist/tsup/mod.d.cts +3 -3
  66. package/dist/tsup/mod.d.ts +3 -3
  67. package/dist/tsup/mod.js +6 -6
  68. package/dist/tsup/test/mod.cjs +6 -6
  69. package/dist/tsup/test/mod.d.cts +1 -1
  70. package/dist/tsup/test/mod.d.ts +1 -1
  71. package/dist/tsup/test/mod.js +4 -4
  72. package/dist/tsup/utils.cjs +2 -2
  73. package/dist/tsup/utils.js +1 -1
  74. package/dist/tsup/workflow/mod.cjs +10 -10
  75. package/dist/tsup/workflow/mod.d.cts +3 -3
  76. package/dist/tsup/workflow/mod.d.ts +3 -3
  77. package/dist/tsup/workflow/mod.js +5 -5
  78. package/package.json +9 -9
  79. package/src/actor/config.ts +16 -2
  80. package/dist/tsup/chunk-SSF2XC33.cjs.map +0 -1
  81. package/dist/tsup/chunk-UXDASKP6.js.map +0 -1
  82. /package/dist/tsup/{chunk-ANP7UCAM.js.map → chunk-2PHT2DGL.js.map} +0 -0
  83. /package/dist/tsup/{chunk-47W6FHPJ.js.map → chunk-4YUA7CTJ.js.map} +0 -0
  84. /package/dist/tsup/{chunk-HJWK46Z5.js.map → chunk-F5VDYHOA.js.map} +0 -0
  85. /package/dist/tsup/{chunk-J7T52LN6.js.map → chunk-L3LCIZBH.js.map} +0 -0
  86. /package/dist/tsup/{chunk-OF63EVJQ.js.map → chunk-NRTL2RDM.js.map} +0 -0
  87. /package/dist/tsup/{chunk-ZAZAKYNQ.js.map → chunk-SIVNBXKO.js.map} +0 -0
  88. /package/dist/tsup/{chunk-4ASLJWUQ.js.map → chunk-ZT7GZRFQ.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 _chunk3C5KLO4Vcjs = require('./chunk-3C5KLO4V.cjs');
3
+ var _chunkUTNZZOMFcjs = require('./chunk-UTNZZOMF.cjs');
4
4
 
5
5
 
6
6
 
@@ -17,7 +17,7 @@ var _chunk3C5KLO4Vcjs = require('./chunk-3C5KLO4V.cjs');
17
17
 
18
18
 
19
19
 
20
- var _chunkSSF2XC33cjs = require('./chunk-SSF2XC33.cjs');
20
+ var _chunkINFADXXIcjs = require('./chunk-INFADXXI.cjs');
21
21
 
22
22
 
23
23
 
@@ -35,18 +35,18 @@ var _chunkSSF2XC33cjs = require('./chunk-SSF2XC33.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunk3KVVYC5Icjs = require('./chunk-3KVVYC5I.cjs');
38
+ var _chunkNXAFFMGHcjs = require('./chunk-NXAFFMGH.cjs');
39
39
 
40
40
 
41
41
 
42
42
  var _chunkRTWH3AX3cjs = require('./chunk-RTWH3AX3.cjs');
43
- require('./chunk-M7KPJSGO.cjs');
44
43
 
45
44
 
46
45
 
47
46
 
48
- var _chunkKF7ETIFKcjs = require('./chunk-KF7ETIFK.cjs');
47
+ var _chunkT5Z3FG5Ycjs = require('./chunk-T5Z3FG5Y.cjs');
49
48
  require('./chunk-KVFIONKQ.cjs');
49
+ require('./chunk-4L27QRHE.cjs');
50
50
 
51
51
 
52
52
 
@@ -80,7 +80,7 @@ require('./chunk-KVFIONKQ.cjs');
80
80
 
81
81
 
82
82
 
83
- var _chunkM3H37DUQcjs = require('./chunk-M3H37DUQ.cjs');
83
+ var _chunkSVEL5ZO3cjs = require('./chunk-SVEL5ZO3.cjs');
84
84
 
85
85
 
86
86
 
@@ -98,7 +98,7 @@ var _chunkMGI2VVF6cjs = require('./chunk-MGI2VVF6.cjs');
98
98
 
99
99
  // src/actor/log.ts
100
100
  function loggerWithoutContext() {
101
- return _chunkM3H37DUQcjs.getLogger.call(void 0, "actor-runtime");
101
+ return _chunkSVEL5ZO3cjs.getLogger.call(void 0, "actor-runtime");
102
102
  }
103
103
 
104
104
  // src/actor/definition.ts
@@ -138,10 +138,10 @@ function actor(input) {
138
138
  warnDeprecatedOptionKeys(
139
139
  input == null ? void 0 : input.options
140
140
  );
141
- const config = _chunkSSF2XC33cjs.ActorConfigSchema.parse(input);
142
- _chunkSSF2XC33cjs.flattenActionHandlers.call(void 0, config.actions);
143
- _chunkSSF2XC33cjs.flattenActionInputSchemas.call(void 0, config.actions, config.actionInputSchemas);
144
- _chunkSSF2XC33cjs.flattenActionTraceSamplers.call(void 0, config.actions, (_a = config.tracing) == null ? void 0 : _a.actions);
141
+ const config = _chunkINFADXXIcjs.ActorConfigSchema.parse(input);
142
+ _chunkINFADXXIcjs.flattenActionHandlers.call(void 0, config.actions);
143
+ _chunkINFADXXIcjs.flattenActionInputSchemas.call(void 0, config.actions, config.actionInputSchemas);
144
+ _chunkINFADXXIcjs.flattenActionTraceSamplers.call(void 0, config.actions, (_a = config.tracing) == null ? void 0 : _a.actions);
145
145
  return new ActorDefinition(config);
146
146
  }
147
147
  function isStaticActorDefinition(definition) {
@@ -240,7 +240,7 @@ function validateSchemaSync(schemas, key, data) {
240
240
  var _virtualwebsocket = require('@rivetkit/virtual-websocket');
241
241
  var _ws = require('hono/ws');
242
242
  function logger() {
243
- return _chunkM3H37DUQcjs.getLogger.call(void 0, "inline-websocket-adapter");
243
+ return _chunkSVEL5ZO3cjs.getLogger.call(void 0, "inline-websocket-adapter");
244
244
  }
245
245
  var InlineWebSocketAdapter = class {
246
246
  #handler;
@@ -392,7 +392,7 @@ var InlineWebSocketAdapter = class {
392
392
 
393
393
  // src/registry/log.ts
394
394
  function logger2() {
395
- return _chunkM3H37DUQcjs.getLogger.call(void 0, "registry");
395
+ return _chunkSVEL5ZO3cjs.getLogger.call(void 0, "registry");
396
396
  }
397
397
 
398
398
  // src/serverless/configure.ts
@@ -438,8 +438,8 @@ async function configureServerlessPool(config) {
438
438
  );
439
439
  }
440
440
  const customConfig = config.configurePool;
441
- const clientConfig = _chunk3KVVYC5Icjs.convertRegistryConfigToClientConfig.call(void 0, config);
442
- const dcsRes = await _chunk3KVVYC5Icjs.getDatacenters.call(void 0, clientConfig);
441
+ const clientConfig = _chunkNXAFFMGHcjs.convertRegistryConfigToClientConfig.call(void 0, config);
442
+ const dcsRes = await _chunkNXAFFMGHcjs.getDatacenters.call(void 0, clientConfig);
443
443
  const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
444
444
  const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
445
445
  const headers = {
@@ -461,7 +461,7 @@ async function configureServerlessPool(config) {
461
461
  metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
462
462
  drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
463
463
  };
464
- await _chunk3KVVYC5Icjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
464
+ await _chunkNXAFFMGHcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
465
465
  datacenters: Object.fromEntries(
466
466
  dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
467
467
  )
@@ -478,7 +478,7 @@ async function configureServerlessPool(config) {
478
478
  logger2().warn({
479
479
  msg: "serverless pool configuration attempt failed",
480
480
  attempts,
481
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, error)
481
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, error)
482
482
  });
483
483
  await sleep(CONFIGURE_RETRY_DELAY_MS);
484
484
  }
@@ -486,7 +486,7 @@ async function configureServerlessPool(config) {
486
486
  logger2().error({
487
487
  msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
488
488
  attempts,
489
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, lastError)
489
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, lastError)
490
490
  });
491
491
  throw lastError;
492
492
  }
@@ -497,10 +497,10 @@ var _zod = require('zod');
497
497
  // src/registry/config/envoy.ts
498
498
  var _v4 = require('zod/v4');
499
499
  var EnvoyConfigSchema = _v4.z.object({
500
- poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetPool.call(void 0, ), () => ( "default"))),
501
- version: _v4.z.number().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
500
+ poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetPool.call(void 0, ), () => ( "default"))),
501
+ version: _v4.z.number().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
502
502
  // Deprecated.
503
- totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
503
+ totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
504
504
  nodeKey: _v4.z.string().optional()
505
505
  });
506
506
 
@@ -538,7 +538,7 @@ var ServerlessConfigSchema = _v4.z.object({
538
538
  *
539
539
  * Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
540
540
  */
541
- publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetPublicEndpoint.call(void 0, )))),
541
+ publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetPublicEndpoint.call(void 0, )))),
542
542
  /**
543
543
  * Token that clients should use when connecting via the public endpoint.
544
544
  *
@@ -546,7 +546,7 @@ var ServerlessConfigSchema = _v4.z.object({
546
546
  *
547
547
  * Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
548
548
  */
549
- publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetPublicToken.call(void 0, ))))
549
+ publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetPublicToken.call(void 0, ))))
550
550
  // There is no publicNamespace config option because the frontend and backend
551
551
  // cannot use different namespaces. The namespace is extracted from the
552
552
  // publicEndpoint URL auth syntax if provided.
@@ -600,7 +600,7 @@ var RegistryConfigSchema = _zod.z.object({
600
600
  * Runtime binding to use for RivetKit core.
601
601
  * */
602
602
  runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
603
- const rawRuntime = _nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetkitRuntime.call(void 0, )));
603
+ const rawRuntime = _nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetkitRuntime.call(void 0, )));
604
604
  if (rawRuntime === void 0) {
605
605
  return "auto";
606
606
  }
@@ -637,7 +637,7 @@ var RegistryConfigSchema = _zod.z.object({
637
637
  * */
638
638
  logging: _zod.z.object({
639
639
  baseLogger: _zod.z.custom().optional(),
640
- level: _chunkM3H37DUQcjs.LogLevelSchema.optional()
640
+ level: _chunkSVEL5ZO3cjs.LogLevelSchema.optional()
641
641
  }).optional().default(() => ({})),
642
642
  // MARK: Routing
643
643
  // // This is a function to allow for lazy configuration of upgradeWebSocket on the
@@ -655,9 +655,9 @@ var RegistryConfigSchema = _zod.z.object({
655
655
  *
656
656
  * Can also be set via RIVET_ENDPOINT environment variables.
657
657
  */
658
- endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetEngine.call(void 0, ))), () => ( _chunkM3H37DUQcjs.getRivetEndpoint.call(void 0, )))),
659
- token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetToken.call(void 0, )))),
660
- namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkM3H37DUQcjs.getRivetNamespace.call(void 0, )))),
658
+ endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetEngine.call(void 0, ))), () => ( _chunkSVEL5ZO3cjs.getRivetEndpoint.call(void 0, )))),
659
+ token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetToken.call(void 0, )))),
660
+ namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkSVEL5ZO3cjs.getRivetNamespace.call(void 0, )))),
661
661
  headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
662
662
  // MARK: Client
663
663
  // TODO:
@@ -697,21 +697,21 @@ var RegistryConfigSchema = _zod.z.object({
697
697
  *
698
698
  * Starts the full Rust engine process locally.
699
699
  */
700
- startEngine: _zod.z.boolean().default(() => _chunkM3H37DUQcjs.getRivetRunEngine.call(void 0, )),
700
+ startEngine: _zod.z.boolean().default(() => _chunkSVEL5ZO3cjs.getRivetRunEngine.call(void 0, )),
701
701
  /**
702
702
  * @experimental
703
703
  *
704
704
  * Host to bind the spawned local engine process to.
705
705
  */
706
- engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunk3KVVYC5Icjs.ENGINE_HOST))),
706
+ engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkNXAFFMGHcjs.ENGINE_HOST))),
707
707
  /**
708
708
  * @experimental
709
709
  *
710
710
  * Port to bind the spawned local engine process to.
711
711
  */
712
- enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunk3KVVYC5Icjs.ENGINE_PORT))),
712
+ enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkNXAFFMGHcjs.ENGINE_PORT))),
713
713
  /** @experimental */
714
- engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkM3H37DUQcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkM3H37DUQcjs.VERSION))),
714
+ engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkSVEL5ZO3cjs.VERSION))),
715
715
  /**
716
716
  * Starts the first-party Services actor host when RivetKit manages
717
717
  * a local engine. Enabled by default for a managed local Engine. Set
@@ -768,7 +768,7 @@ var RegistryConfigSchema = _zod.z.object({
768
768
  }))
769
769
  }).transform((config, ctx) => {
770
770
  var _a, _b, _c;
771
- const isDevEnv = _chunkM3H37DUQcjs.isDev.call(void 0, );
771
+ const isDevEnv = _chunkSVEL5ZO3cjs.isDev.call(void 0, );
772
772
  const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
773
773
  if (config.runtime === "wasm" && sqliteBackend === "local") {
774
774
  ctx.addIssue({
@@ -778,7 +778,7 @@ var RegistryConfigSchema = _zod.z.object({
778
778
  });
779
779
  }
780
780
  const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
781
- const parsedEndpoint = config.endpoint ? _chunk3KVVYC5Icjs.tryParseEndpoint.call(void 0, ctx, {
781
+ const parsedEndpoint = config.endpoint ? _chunkNXAFFMGHcjs.tryParseEndpoint.call(void 0, ctx, {
782
782
  endpoint: config.endpoint,
783
783
  path: ["endpoint"],
784
784
  namespace: config.namespace,
@@ -797,19 +797,19 @@ var RegistryConfigSchema = _zod.z.object({
797
797
  path: ["configurePool"]
798
798
  });
799
799
  }
800
- const localEngineEndpoint = _chunk3KVVYC5Icjs.buildEngineEndpoint.call(void 0,
800
+ const localEngineEndpoint = _chunkNXAFFMGHcjs.buildEngineEndpoint.call(void 0,
801
801
  config.engineHost,
802
802
  config.enginePort
803
803
  );
804
804
  const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? localEngineEndpoint : void 0)));
805
805
  const engineSpawn = !parsedEndpoint && Boolean(endpoint);
806
- const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkM3H37DUQcjs.getRivetRunServices.call(void 0, ))), () => ( engineSpawn));
806
+ const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkSVEL5ZO3cjs.getRivetRunServices.call(void 0, ))), () => ( engineSpawn));
807
807
  const validateServerlessEndpoint = Boolean(
808
808
  config.startEngine || parsedEndpoint
809
809
  );
810
810
  const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
811
- const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunk3KVVYC5Icjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
812
- const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunk3KVVYC5Icjs.tryParseEndpoint.call(void 0, ctx, {
811
+ const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkNXAFFMGHcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
812
+ const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkNXAFFMGHcjs.tryParseEndpoint.call(void 0, ctx, {
813
813
  endpoint: config.serverless.publicEndpoint,
814
814
  path: ["serverless", "publicEndpoint"]
815
815
  }) : void 0;
@@ -846,7 +846,7 @@ function buildActorNames(config) {
846
846
  Object.keys(config.use).map((actorName) => {
847
847
  const definition = config.use[actorName];
848
848
  const options = _nullishCoalesce(definition.config.options, () => ( {}));
849
- const runMeta = _chunkSSF2XC33cjs.getRunMetadata.call(void 0, definition.config.run);
849
+ const runMeta = _chunkINFADXXIcjs.getRunMetadata.call(void 0, definition.config.run);
850
850
  const metadata = {};
851
851
  metadata.icon = _nullishCoalesce(options.icon, () => ( runMeta.icon));
852
852
  metadata.name = _nullishCoalesce(options.name, () => ( runMeta.name));
@@ -914,7 +914,7 @@ var DocRegistryConfigSchema = _zod.z.object({
914
914
  noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
915
915
  sqlite: DocSqliteConfigSchema,
916
916
  logging: _zod.z.object({
917
- level: _chunkM3H37DUQcjs.LogLevelSchema.optional().describe(
917
+ level: _chunkSVEL5ZO3cjs.LogLevelSchema.optional().describe(
918
918
  "Log level for RivetKit. Default: 'warn'"
919
919
  )
920
920
  }).optional().describe("Logging configuration."),
@@ -1554,7 +1554,7 @@ var NapiCoreRuntime = (_class = class {
1554
1554
  if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
1555
1555
  return ownerCtx;
1556
1556
  }
1557
- const applicationSpan = _chunk3KVVYC5Icjs.readActiveTraceHeaders.call(void 0, );
1557
+ const applicationSpan = _chunkNXAFFMGHcjs.readActiveTraceHeaders.call(void 0, );
1558
1558
  if (!applicationSpan) {
1559
1559
  return active;
1560
1560
  }
@@ -1767,7 +1767,7 @@ var NapiCoreRuntime = (_class = class {
1767
1767
  const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
1768
1768
  return this.#invocationContext.run(
1769
1769
  nativeCtx,
1770
- () => _chunk3KVVYC5Icjs.runWithActorInvocationSpan.call(void 0, span, run)
1770
+ () => _chunkNXAFFMGHcjs.runWithActorInvocationSpan.call(void 0, span, run)
1771
1771
  );
1772
1772
  }
1773
1773
  actorInvocationTraceContext(ctx) {
@@ -2142,8 +2142,8 @@ function runtimeBytesToArrayBuffer(value) {
2142
2142
  function buildNativeHttpRequest(init) {
2143
2143
  var _a;
2144
2144
  const headers = new Headers(init.headers);
2145
- const originalUrl = headers.get(_chunk3KVVYC5Icjs.HEADER_ORIGINAL_REQUEST_URL);
2146
- headers.delete(_chunk3KVVYC5Icjs.HEADER_ORIGINAL_REQUEST_URL);
2145
+ const originalUrl = headers.get(_chunkNXAFFMGHcjs.HEADER_ORIGINAL_REQUEST_URL);
2146
+ headers.delete(_chunkNXAFFMGHcjs.HEADER_ORIGINAL_REQUEST_URL);
2147
2147
  const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
2148
2148
  const method2 = init.method.toUpperCase();
2149
2149
  const bodyForbidden = method2 === "GET" || method2 === "HEAD";
@@ -2222,7 +2222,7 @@ async function pumpResponseBody(reader, stream) {
2222
2222
  }
2223
2223
  } catch (error) {
2224
2224
  try {
2225
- await stream.error(_chunkM3H37DUQcjs.stringifyError.call(void 0, error));
2225
+ await stream.error(_chunkSVEL5ZO3cjs.stringifyError.call(void 0, error));
2226
2226
  } catch (streamError) {
2227
2227
  logger2().debug({
2228
2228
  msg: "failed to report native http response stream error",
@@ -2390,7 +2390,7 @@ var RunHandlerCoordinator = class {
2390
2390
  this.#run = run;
2391
2391
  }
2392
2392
  get inspectorKind() {
2393
- return _chunkSSF2XC33cjs.getRunInspectorKind.call(void 0, this.#run);
2393
+ return _chunkINFADXXIcjs.getRunInspectorKind.call(void 0, this.#run);
2394
2394
  }
2395
2395
  async run(actorId, restart, callback) {
2396
2396
  const state = this.#getOrCreate(actorId);
@@ -2498,7 +2498,7 @@ var RunHandlerCoordinator = class {
2498
2498
  }
2499
2499
  #initializeInspector(actorId, state) {
2500
2500
  if (state.inspectorInitialized) return;
2501
- const inspector = _chunkSSF2XC33cjs.createRunInspector.call(void 0, this.#run, {
2501
+ const inspector = _chunkINFADXXIcjs.createRunInspector.call(void 0, this.#run, {
2502
2502
  actorId,
2503
2503
  control: this.#control(actorId, state)
2504
2504
  });
@@ -3461,7 +3461,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
3461
3461
  nativeError = error;
3462
3462
  logger2().warn({
3463
3463
  msg: "native runtime failed to load; falling back to wasm",
3464
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, error)
3464
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, error)
3465
3465
  });
3466
3466
  }
3467
3467
  try {
@@ -3470,7 +3470,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
3470
3470
  throw new (0, _chunkMGI2VVF6cjs.RivetError)(
3471
3471
  "config",
3472
3472
  "runtime_unavailable",
3473
- `RivetKit could not load a core runtime. Native runtime: ${_chunkM3H37DUQcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkM3H37DUQcjs.stringifyError.call(void 0, wasmError)}`,
3473
+ `RivetKit could not load a core runtime. Native runtime: ${_chunkSVEL5ZO3cjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkSVEL5ZO3cjs.stringifyError.call(void 0, wasmError)}`,
3474
3474
  {
3475
3475
  public: true,
3476
3476
  statusCode: 500
@@ -3678,7 +3678,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
3678
3678
  }).catch((error) => {
3679
3679
  logger2().warn({
3680
3680
  msg: "deferred native sleep cleanup failed",
3681
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, error)
3681
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, error)
3682
3682
  });
3683
3683
  });
3684
3684
  return;
@@ -3850,10 +3850,10 @@ function decodeValue(value) {
3850
3850
  if (!value || value.length === 0) {
3851
3851
  return void 0;
3852
3852
  }
3853
- return _chunkM3H37DUQcjs.decodeCborCompat.call(void 0, value);
3853
+ return _chunkSVEL5ZO3cjs.decodeCborCompat.call(void 0, value);
3854
3854
  }
3855
3855
  function encodeValue(value) {
3856
- return _chunkM3H37DUQcjs.encodeCborCompat.call(void 0, value);
3856
+ return _chunkSVEL5ZO3cjs.encodeCborCompat.call(void 0, value);
3857
3857
  }
3858
3858
  function normalizeArgs(value) {
3859
3859
  return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
@@ -3889,7 +3889,7 @@ function isStructuredBridgeError(error) {
3889
3889
  return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
3890
3890
  }
3891
3891
  function encodeNativeCallbackError(error) {
3892
- const structuredError = isStructuredBridgeError(error) ? error : _chunkM3H37DUQcjs.deconstructError.call(void 0, error, true);
3892
+ const structuredError = isStructuredBridgeError(error) ? error : _chunkSVEL5ZO3cjs.deconstructError.call(void 0, error, true);
3893
3893
  const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
3894
3894
  if (droppedMetadataCause !== void 0) {
3895
3895
  logger2().warn(
@@ -3951,7 +3951,7 @@ function decodeWorkflowCbor(data) {
3951
3951
  return null;
3952
3952
  }
3953
3953
  try {
3954
- return _chunkM3H37DUQcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
3954
+ return _chunkSVEL5ZO3cjs.decodeCborCompat.call(void 0, new Uint8Array(data));
3955
3955
  } catch (e3) {
3956
3956
  return null;
3957
3957
  }
@@ -4064,7 +4064,7 @@ function serializeWorkflowHistoryForJson(data) {
4064
4064
  if (data === null) {
4065
4065
  return null;
4066
4066
  }
4067
- const history = _chunk3C5KLO4Vcjs.decodeWorkflowHistoryTransport.call(void 0, data);
4067
+ const history = _chunkUTNZZOMFcjs.decodeWorkflowHistoryTransport.call(void 0, data);
4068
4068
  return jsonSafe({
4069
4069
  nameRegistry: [...history.nameRegistry],
4070
4070
  entries: history.entries.map((entry) => ({
@@ -4163,7 +4163,7 @@ var NativeConnAdapter = class {
4163
4163
  this.#ctx = ctx;
4164
4164
  this.#queueHibernationRemoval = queueHibernationRemoval;
4165
4165
  this.#assertCanMutateState = assertCanMutateState;
4166
- this[_chunkSSF2XC33cjs.CONN_STATE_MANAGER_SYMBOL] = {
4166
+ this[_chunkINFADXXIcjs.CONN_STATE_MANAGER_SYMBOL] = {
4167
4167
  stateEnabled: true,
4168
4168
  get state() {
4169
4169
  return thisConn.state;
@@ -4180,7 +4180,7 @@ var NativeConnAdapter = class {
4180
4180
  decodeValue(this.#runtime.connParams(this.#conn))
4181
4181
  );
4182
4182
  }
4183
- [_chunkSSF2XC33cjs.RAW_STATE_SYMBOL]() {
4183
+ [_chunkINFADXXIcjs.RAW_STATE_SYMBOL]() {
4184
4184
  return this.#readState();
4185
4185
  }
4186
4186
  get state() {
@@ -4210,7 +4210,7 @@ var NativeConnAdapter = class {
4210
4210
  },
4211
4211
  (newValue) => {
4212
4212
  assertCurrentState();
4213
- _chunkM3H37DUQcjs.assertJsonCompatValue.call(void 0, newValue);
4213
+ _chunkSVEL5ZO3cjs.assertJsonCompatValue.call(void 0, newValue);
4214
4214
  }
4215
4215
  );
4216
4216
  }
@@ -4218,7 +4218,7 @@ var NativeConnAdapter = class {
4218
4218
  var _a;
4219
4219
  (_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
4220
4220
  const nextValue = unwrapWriteThroughProxy(value);
4221
- _chunkM3H37DUQcjs.assertJsonCompatValue.call(void 0, nextValue);
4221
+ _chunkSVEL5ZO3cjs.assertJsonCompatValue.call(void 0, nextValue);
4222
4222
  this.#writeState(nextValue, { writeNative: true });
4223
4223
  }
4224
4224
  initializeState(value) {
@@ -5237,7 +5237,7 @@ var ActorContextHandleAdapter = class {
5237
5237
  this.#databaseProvider = databaseProvider;
5238
5238
  }
5239
5239
  this.#request = request;
5240
- this[_chunkSSF2XC33cjs.ACTOR_CONTEXT_INTERNAL_SYMBOL] = new NativeWorkflowRuntimeAdapter(
5240
+ this[_chunkINFADXXIcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL] = new NativeWorkflowRuntimeAdapter(
5241
5241
  this,
5242
5242
  () => this.#logByInvocationScope.delete(
5243
5243
  _nullishCoalesce(this.#runtime.currentInvocationScope(), () => ( NO_INVOCATION_SCOPE))
@@ -5270,7 +5270,7 @@ var ActorContextHandleAdapter = class {
5270
5270
  }
5271
5271
  throw databaseClientNotReadyError();
5272
5272
  }
5273
- [_chunkSSF2XC33cjs.RAW_STATE_SYMBOL]() {
5273
+ [_chunkINFADXXIcjs.RAW_STATE_SYMBOL]() {
5274
5274
  if (!this.#stateEnabled) {
5275
5275
  throw stateNotEnabledError();
5276
5276
  }
@@ -5297,7 +5297,7 @@ var ActorContextHandleAdapter = class {
5297
5297
  },
5298
5298
  (newValue) => {
5299
5299
  assertCurrentState();
5300
- _chunkM3H37DUQcjs.assertJsonCompatValue.call(void 0, newValue);
5300
+ _chunkSVEL5ZO3cjs.assertJsonCompatValue.call(void 0, newValue);
5301
5301
  }
5302
5302
  );
5303
5303
  }
@@ -5309,7 +5309,7 @@ var ActorContextHandleAdapter = class {
5309
5309
  }
5310
5310
  this.#assertCanMutateState();
5311
5311
  const nextValue = unwrapWriteThroughProxy(value);
5312
- _chunkM3H37DUQcjs.assertJsonCompatValue.call(void 0, nextValue);
5312
+ _chunkSVEL5ZO3cjs.assertJsonCompatValue.call(void 0, nextValue);
5313
5313
  this.#writeState(nextValue, { scheduleSave: true });
5314
5314
  }
5315
5315
  initializeState(value) {
@@ -5523,7 +5523,7 @@ var ActorContextHandleAdapter = class {
5523
5523
  log: {
5524
5524
  debug: (obj) => logger2().debug(obj)
5525
5525
  },
5526
- nativeDatabaseProvider: _chunkKF7ETIFKcjs.registerNativeStateTransactionOpener.call(void 0,
5526
+ nativeDatabaseProvider: _chunkT5Z3FG5Ycjs.registerNativeStateTransactionOpener.call(void 0,
5527
5527
  {
5528
5528
  open: async (requestedActorId) => {
5529
5529
  void requestedActorId;
@@ -5546,7 +5546,7 @@ var ActorContextHandleAdapter = class {
5546
5546
  return this.#db;
5547
5547
  }
5548
5548
  #bindDatabaseClient(client) {
5549
- return _chunkKF7ETIFKcjs.bindNativeStateTransactionContext.call(void 0, client, {
5549
+ return _chunkT5Z3FG5Ycjs.bindNativeStateTransactionContext.call(void 0, client, {
5550
5550
  enter: async () => await this.#enterStateTransaction(),
5551
5551
  exit: (scope) => this.#exitStateTransaction(
5552
5552
  scope
@@ -5750,7 +5750,7 @@ var ActorContextHandleAdapter = class {
5750
5750
  const trackedPromise = Promise.resolve(promise).catch((error) => {
5751
5751
  logger2().warn({
5752
5752
  msg: "keepAwake promise rejected",
5753
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, error)
5753
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, error)
5754
5754
  });
5755
5755
  }).then(() => null);
5756
5756
  try {
@@ -6130,7 +6130,7 @@ function buildActorTracingConfig(actions, tracing) {
6130
6130
  if (tracing === void 0) return void 0;
6131
6131
  return {
6132
6132
  sampler: tracing.sampler,
6133
- actions: _chunkSSF2XC33cjs.flattenActionTraceSamplers.call(void 0, actions, tracing.actions)
6133
+ actions: _chunkINFADXXIcjs.flattenActionTraceSamplers.call(void 0, actions, tracing.actions)
6134
6134
  };
6135
6135
  }
6136
6136
  function buildActorConfig(definition, registryConfig, runtimeKind) {
@@ -6172,7 +6172,7 @@ function buildActorConfig(definition, registryConfig, runtimeKind) {
6172
6172
  maxOutgoingMessageSize: registryConfig.maxOutgoingMessageSize,
6173
6173
  preloadMaxWorkflowBytes: options.preloadMaxWorkflowBytes,
6174
6174
  preloadMaxConnectionsBytes: options.preloadMaxConnectionsBytes,
6175
- actions: Object.keys(_chunkSSF2XC33cjs.flattenActionHandlers.call(void 0, config.actions)).sort().map((name) => ({ name })),
6175
+ actions: Object.keys(_chunkINFADXXIcjs.flattenActionHandlers.call(void 0, config.actions)).sort().map((name) => ({ name })),
6176
6176
  inspectorTabs: buildInspectorTabs(config.inspector, runtimeKind)
6177
6177
  };
6178
6178
  }
@@ -6248,10 +6248,10 @@ function validateInspectorTabSource(tabId, resolved) {
6248
6248
  function buildNativeFactory(runtime, registryConfig, definition) {
6249
6249
  var _a;
6250
6250
  const config = definition.config;
6251
- const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkKF7ETIFKcjs.db.call(void 0, )));
6252
- const actionHandlers = _chunkSSF2XC33cjs.flattenActionHandlers.call(void 0, config.actions);
6251
+ const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkT5Z3FG5Ycjs.db.call(void 0, )));
6252
+ const actionHandlers = _chunkINFADXXIcjs.flattenActionHandlers.call(void 0, config.actions);
6253
6253
  const schemaConfig = {
6254
- actionInputSchemas: _chunkSSF2XC33cjs.flattenActionInputSchemas.call(void 0,
6254
+ actionInputSchemas: _chunkINFADXXIcjs.flattenActionInputSchemas.call(void 0,
6255
6255
  config.actions,
6256
6256
  config.actionInputSchemas
6257
6257
  ),
@@ -6259,9 +6259,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6259
6259
  events: config.events,
6260
6260
  queues: config.queues
6261
6261
  };
6262
- const createClient = (ctx) => _chunk3KVVYC5Icjs.createClientWithDriver.call(void 0,
6263
- new (0, _chunk3KVVYC5Icjs.RemoteEngineControlClient)(
6264
- _chunk3KVVYC5Icjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
6262
+ const createClient = (ctx) => _chunkNXAFFMGHcjs.createClientWithDriver.call(void 0,
6263
+ new (0, _chunkNXAFFMGHcjs.RemoteEngineControlClient)(
6264
+ _chunkNXAFFMGHcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
6265
6265
  ),
6266
6266
  {
6267
6267
  encoding: "bare",
@@ -6273,13 +6273,13 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6273
6273
  )
6274
6274
  }
6275
6275
  );
6276
- const run = _chunkSSF2XC33cjs.getRunFunction.call(void 0, config.run);
6277
- const runHandlerCoordinator = _chunkSSF2XC33cjs.getRunInspectorKind.call(void 0, config.run) === "workflow" ? new RunHandlerCoordinator(config.run) : void 0;
6276
+ const run = _chunkINFADXXIcjs.getRunFunction.call(void 0, config.run);
6277
+ const runHandlerCoordinator = _chunkINFADXXIcjs.getRunInspectorKind.call(void 0, config.run) === "workflow" ? new RunHandlerCoordinator(config.run) : void 0;
6278
6278
  const getNativeWorkflowInspector = (ctx) => {
6279
6279
  var _a2, _b;
6280
6280
  const actorId = callNativeSync(() => runtime.actorId(ctx));
6281
6281
  const restart = () => callNativeSync(() => runtime.actorRestartRunHandler(ctx));
6282
- return _nullishCoalesce(((_a2 = runHandlerCoordinator == null ? void 0 : runHandlerCoordinator.getInspector(actorId, restart)) == null ? void 0 : _a2.workflow), () => ( ((_b = _chunkSSF2XC33cjs.getRunInspectorConfig.call(void 0, config.run, actorId)) == null ? void 0 : _b.workflow)));
6282
+ return _nullishCoalesce(((_a2 = runHandlerCoordinator == null ? void 0 : runHandlerCoordinator.getInspector(actorId, restart)) == null ? void 0 : _a2.workflow), () => ( ((_b = _chunkINFADXXIcjs.getRunInspectorConfig.call(void 0, config.run, actorId)) == null ? void 0 : _b.workflow)));
6283
6283
  };
6284
6284
  const onStateChange = typeof config.onStateChange === "function" ? (actorCtx, nextState) => {
6285
6285
  config.onStateChange(actorCtx, nextState);
@@ -6453,7 +6453,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6453
6453
  400
6454
6454
  );
6455
6455
  }
6456
- const cbor = _chunkM3H37DUQcjs.encodeCborCompat.call(void 0,
6456
+ const cbor = _chunkSVEL5ZO3cjs.encodeCborCompat.call(void 0,
6457
6457
  _nullishCoalesce(body.body, () => ( null))
6458
6458
  );
6459
6459
  const message = await runtime.actorQueueSend(ctx, name, cbor);
@@ -6821,7 +6821,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6821
6821
  );
6822
6822
  } finally {
6823
6823
  runHandlerCoordinator == null ? void 0 : runHandlerCoordinator.destroy(actorId);
6824
- _chunkSSF2XC33cjs.disposeRunInspector.call(void 0, config.run, actorId);
6824
+ _chunkINFADXXIcjs.disposeRunInspector.call(void 0, config.run, actorId);
6825
6825
  await actorCtx.dispose();
6826
6826
  }
6827
6827
  }
@@ -6833,7 +6833,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
6833
6833
  const actorCtx = makeActorCtx(ctx);
6834
6834
  const actorId = callNativeSync(() => runtime.actorId(ctx));
6835
6835
  runHandlerCoordinator == null ? void 0 : runHandlerCoordinator.destroy(actorId);
6836
- _chunkSSF2XC33cjs.disposeRunInspector.call(void 0, config.run, actorId);
6836
+ _chunkINFADXXIcjs.disposeRunInspector.call(void 0, config.run, actorId);
6837
6837
  try {
6838
6838
  if (typeof config.onDestroy === "function") {
6839
6839
  await config.onDestroy(actorCtx);
@@ -7050,7 +7050,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7050
7050
  ...request,
7051
7051
  abortController: requestAbortController
7052
7052
  });
7053
- const rawConnParams = handlerRequest.headers.get(_chunk3KVVYC5Icjs.HEADER_CONN_PARAMS);
7053
+ const rawConnParams = handlerRequest.headers.get(_chunkNXAFFMGHcjs.HEADER_CONN_PARAMS);
7054
7054
  let requestCtx;
7055
7055
  let conn;
7056
7056
  let removeRequestAbortListener;
@@ -7107,7 +7107,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7107
7107
  requestCtx,
7108
7108
  handlerRequest
7109
7109
  );
7110
- if (!_chunk3KVVYC5Icjs.isResponseLike.call(void 0, response)) {
7110
+ if (!_chunkNXAFFMGHcjs.isResponseLike.call(void 0, response)) {
7111
7111
  throw new Error(
7112
7112
  "onRequest handler must return a Response"
7113
7113
  );
@@ -7197,15 +7197,15 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7197
7197
  }
7198
7198
  );
7199
7199
  })(),
7200
- getWorkflowHistory: _chunkSSF2XC33cjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
7200
+ getWorkflowHistory: _chunkINFADXXIcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
7201
7201
  async (error, payload) => {
7202
7202
  var _a2;
7203
7203
  const { ctx } = unwrapTsfnPayload(error, payload);
7204
7204
  const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
7205
- return history == null ? void 0 : _chunkM3H37DUQcjs.toUint8Array.call(void 0, history);
7205
+ return history == null ? void 0 : _chunkSVEL5ZO3cjs.toUint8Array.call(void 0, history);
7206
7206
  }
7207
7207
  ) : void 0,
7208
- replayWorkflow: _chunkSSF2XC33cjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
7208
+ replayWorkflow: _chunkINFADXXIcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
7209
7209
  async (error, payload) => {
7210
7210
  const { ctx, entryId } = unwrapTsfnPayload(
7211
7211
  error,
@@ -7216,7 +7216,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
7216
7216
  return void 0;
7217
7217
  }
7218
7218
  const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
7219
- return history == null ? void 0 : _chunkM3H37DUQcjs.toUint8Array.call(void 0, history);
7219
+ return history == null ? void 0 : _chunkSVEL5ZO3cjs.toUint8Array.call(void 0, history);
7220
7220
  }
7221
7221
  ) : void 0,
7222
7222
  actions: Object.fromEntries(
@@ -7358,7 +7358,7 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
7358
7358
  startServices: resolveNativeBinaries && config.startServices,
7359
7359
  handleInspectorHttpInRuntime: true,
7360
7360
  serverlessBasePath: config.serverless.basePath,
7361
- serverlessPackageVersion: _chunkM3H37DUQcjs.VERSION,
7361
+ serverlessPackageVersion: _chunkSVEL5ZO3cjs.VERSION,
7362
7362
  serverlessClientEndpoint: config.publicEndpoint,
7363
7363
  serverlessClientNamespace: config.publicNamespace,
7364
7364
  serverlessClientToken: config.publicToken,
@@ -7372,12 +7372,12 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
7372
7372
  } catch (error) {
7373
7373
  logger2().warn({
7374
7374
  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",
7375
- error: _chunkM3H37DUQcjs.stringifyError.call(void 0, error)
7375
+ error: _chunkSVEL5ZO3cjs.stringifyError.call(void 0, error)
7376
7376
  });
7377
7377
  }
7378
7378
  }
7379
7379
  if (resolveNativeBinaries && config.startServices) {
7380
- const servicesBinary = _chunkM3H37DUQcjs.getEnvUniversal.call(void 0, "RIVET_SERVICES_BINARY");
7380
+ const servicesBinary = _chunkSVEL5ZO3cjs.getEnvUniversal.call(void 0, "RIVET_SERVICES_BINARY");
7381
7381
  if (servicesBinary) {
7382
7382
  serveConfig.servicesBinaryPath = servicesBinary;
7383
7383
  } else {
@@ -7392,13 +7392,13 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
7392
7392
  serveConfig.engineHost = config.engineHost;
7393
7393
  serveConfig.enginePort = config.enginePort;
7394
7394
  if ((_a = config.test) == null ? void 0 : _a.enabled) {
7395
- serveConfig.inspectorTestToken = _nullishCoalesce(_chunkM3H37DUQcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
7395
+ serveConfig.inspectorTestToken = _nullishCoalesce(_chunkSVEL5ZO3cjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
7396
7396
  }
7397
7397
  return serveConfig;
7398
7398
  }
7399
7399
  async function buildRegistryWithRuntime(config, runtime) {
7400
7400
  var _a;
7401
- if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkM3H37DUQcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
7401
+ if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkSVEL5ZO3cjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
7402
7402
  trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
7403
7403
  }
7404
7404
  if (runtime.kind === "napi") {
@@ -7471,7 +7471,7 @@ function createApplicationFetch(application, runtime) {
7471
7471
  signal: abortController.signal
7472
7472
  })
7473
7473
  );
7474
- if (!_chunk3KVVYC5Icjs.isResponseLike.call(void 0, response)) {
7474
+ if (!_chunkNXAFFMGHcjs.isResponseLike.call(void 0, response)) {
7475
7475
  throw new TypeError(
7476
7476
  "registry.listen() application fetch must return a Response"
7477
7477
  );
@@ -7526,7 +7526,7 @@ var Registry = class {
7526
7526
  var _a;
7527
7527
  this.#config = config;
7528
7528
  if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
7529
- _chunkM3H37DUQcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
7529
+ _chunkSVEL5ZO3cjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
7530
7530
  }
7531
7531
  this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
7532
7532
  this.routes = {
@@ -7758,10 +7758,10 @@ var Registry = class {
7758
7758
  if (!opts.application) {
7759
7759
  rejectServerless();
7760
7760
  }
7761
- const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkM3H37DUQcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
7762
- const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkM3H37DUQcjs.getRivetkitPublicDir.call(void 0, )));
7761
+ const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkSVEL5ZO3cjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
7762
+ const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkSVEL5ZO3cjs.getRivetkitPublicDir.call(void 0, )));
7763
7763
  const config = this.parseConfig();
7764
- if (opts.application && _chunkM3H37DUQcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
7764
+ if (opts.application && _chunkSVEL5ZO3cjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
7765
7765
  if (config.runtime === "wasm") {
7766
7766
  throw new Error(
7767
7767
  "registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
@@ -7837,7 +7837,7 @@ var Registry = class {
7837
7837
  return jsonRouteResponse(503, {
7838
7838
  status: "not_started",
7839
7839
  runtime: "rivetkit",
7840
- version: _chunkM3H37DUQcjs.VERSION
7840
+ version: _chunkSVEL5ZO3cjs.VERSION
7841
7841
  });
7842
7842
  }
7843
7843
  const { runtime, registry } = configured;
@@ -7845,7 +7845,7 @@ var Registry = class {
7845
7845
  return jsonRouteResponse(501, {
7846
7846
  status: "unsupported",
7847
7847
  runtime: "rivetkit",
7848
- version: _chunkM3H37DUQcjs.VERSION
7848
+ version: _chunkSVEL5ZO3cjs.VERSION
7849
7849
  });
7850
7850
  }
7851
7851
  const response = await runtime.registryHealth(registry);
@@ -7920,14 +7920,14 @@ var Registry = class {
7920
7920
  var _a;
7921
7921
  if (!this.#runtimeServePromise) {
7922
7922
  const configuredEnvoyVersion = (_a = this.#config.node) == null ? void 0 : _a.version;
7923
- const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkM3H37DUQcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
7923
+ const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkSVEL5ZO3cjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
7924
7924
  logger2().info({
7925
7925
  msg: "starting rivetkit envoy",
7926
- rivetkitVersion: _chunkM3H37DUQcjs.VERSION,
7926
+ rivetkitVersion: _chunkSVEL5ZO3cjs.VERSION,
7927
7927
  envoyVersion: config.node.version,
7928
7928
  envoyVersionSource
7929
7929
  });
7930
- if (envoyVersionSource === "default" && _chunkM3H37DUQcjs.getNodeEnv.call(void 0, ) === "production") {
7930
+ if (envoyVersionSource === "default" && _chunkSVEL5ZO3cjs.getNodeEnv.call(void 0, ) === "production") {
7931
7931
  logger2().error({
7932
7932
  msg: "node version defaulted because neither config.node.version nor RIVET_NODE_VERSION is set; actors will not drain automatically across deploys. See https://rivet.dev/docs/actors/versions",
7933
7933
  envoyVersion: config.node.version,
@@ -8031,7 +8031,7 @@ var Registry = class {
8031
8031
  const modeAPromise = this.#runtimeServeConfiguredPromise;
8032
8032
  const modeBPromise = this.#runtimeServerlessPromise;
8033
8033
  const runtimes = /* @__PURE__ */ new Set();
8034
- const localDevSignal = signalDriven && _chunkM3H37DUQcjs.getNodeEnv.call(void 0, ) !== "production" && config.engineSpawn && config.endpoint !== void 0 && _chunk3KVVYC5Icjs.isLocalEngineEndpoint.call(void 0, config.endpoint);
8034
+ const localDevSignal = signalDriven && _chunkSVEL5ZO3cjs.getNodeEnv.call(void 0, ) !== "production" && config.engineSpawn && config.endpoint !== void 0 && _chunkNXAFFMGHcjs.isLocalEngineEndpoint.call(void 0, config.endpoint);
8035
8035
  let gracePeriodMs = (_a = config.shutdown) == null ? void 0 : _a.gracePeriodMs;
8036
8036
  if (gracePeriodMs === void 0) {
8037
8037
  gracePeriodMs = localDevSignal ? LOCAL_DEV_SHUTDOWN_GRACE_PERIOD_MS : await _asyncNullishCoalesce(await this.#actorStopThresholdMs(
@@ -8143,7 +8143,7 @@ var Registry = class {
8143
8143
  }
8144
8144
  if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
8145
8145
  try {
8146
- if (_chunkM3H37DUQcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8146
+ if (_chunkSVEL5ZO3cjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8147
8147
  return Promise.reject(
8148
8148
  new Error(
8149
8149
  "registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
@@ -8167,7 +8167,7 @@ var Registry = class {
8167
8167
  if (!configuredRegistryPromise || !serveLifecyclePromise) {
8168
8168
  throw new Error("registry envoy startup did not initialize");
8169
8169
  }
8170
- const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 && _chunk3KVVYC5Icjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? LOCAL_ENGINE_READY_TIMEOUT_MS : REGISTRY_READY_TIMEOUT_MS;
8170
+ const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 && _chunkNXAFFMGHcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? LOCAL_ENGINE_READY_TIMEOUT_MS : REGISTRY_READY_TIMEOUT_MS;
8171
8171
  let timeout;
8172
8172
  const timeoutPromise = new Promise((_resolve, reject) => {
8173
8173
  var _a;
@@ -8217,8 +8217,8 @@ var Registry = class {
8217
8217
  * ```
8218
8218
  */
8219
8219
  start() {
8220
- if (_chunkM3H37DUQcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8221
- const publicDir = _nullishCoalesce(_chunkM3H37DUQcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
8220
+ if (_chunkSVEL5ZO3cjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
8221
+ const publicDir = _nullishCoalesce(_chunkSVEL5ZO3cjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
8222
8222
  this.listen({ publicDir }).catch((error) => {
8223
8223
  logger2().error({ error }, "auto-listen failed; exiting");
8224
8224
  if (typeof process !== "undefined" && typeof process.exit === "function") {
@@ -8334,13 +8334,13 @@ var Registry = class {
8334
8334
  };
8335
8335
  console.log();
8336
8336
  console.log(
8337
- ` RivetKit ${_chunkM3H37DUQcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
8337
+ ` RivetKit ${_chunkSVEL5ZO3cjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
8338
8338
  );
8339
8339
  if (config.namespace !== "default") {
8340
8340
  logLine("Namespace", config.namespace);
8341
8341
  }
8342
8342
  if (config.endpoint) {
8343
- const endpointType = config.startEngine || _chunk3KVVYC5Icjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
8343
+ const endpointType = config.startEngine || _chunkNXAFFMGHcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
8344
8344
  logLine("Endpoint", `${config.endpoint} (${endpointType})`);
8345
8345
  }
8346
8346
  if (kind === "serverless" && config.publicEndpoint) {
@@ -8410,5 +8410,5 @@ function setup(input) {
8410
8410
 
8411
8411
 
8412
8412
 
8413
- exports.ALLOWED_PUBLIC_HEADERS = _chunk3KVVYC5Icjs.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 = _chunk3KVVYC5Icjs.createClientWithDriver; exports.defineRunHandler = _chunkSSF2XC33cjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkM3H37DUQcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkM3H37DUQcjs.toUint8Array;
8413
+ exports.ALLOWED_PUBLIC_HEADERS = _chunkNXAFFMGHcjs.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 = _chunkNXAFFMGHcjs.createClientWithDriver; exports.defineRunHandler = _chunkINFADXXIcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkSVEL5ZO3cjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkSVEL5ZO3cjs.toUint8Array;
8414
8414
  //# sourceMappingURL=mod.cjs.map