rivetkit 0.0.0-codex-fix-engine-ui-build-base.aec1405 → 0.0.0-codex-rivetkit-cli-preview.e0b3ae0

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 (102) hide show
  1. package/dist/browser/client.d.ts +16 -0
  2. package/dist/browser/client.js +2 -2
  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/actor/errors.d.cts +1 -1
  7. package/dist/tsup/actor/errors.d.ts +1 -1
  8. package/dist/tsup/agent-os/index.cjs +1 -1
  9. package/dist/tsup/agent-os/index.cjs.map +1 -1
  10. package/dist/tsup/agent-os/index.d.cts +16 -0
  11. package/dist/tsup/agent-os/index.d.ts +16 -0
  12. package/dist/tsup/agent-os/index.js +1 -1
  13. package/dist/tsup/agent-os/index.js.map +1 -1
  14. package/dist/tsup/{chunk-ZSJVOE76.cjs → chunk-3LC3BY25.cjs} +7 -7
  15. package/dist/tsup/{chunk-ZSJVOE76.cjs.map → chunk-3LC3BY25.cjs.map} +1 -1
  16. package/dist/tsup/{chunk-PT6PN7RZ.js → chunk-3NZLRLYI.js} +3 -3
  17. package/dist/tsup/{chunk-DCAQEZO6.cjs → chunk-5HPDYH2D.cjs} +10 -3
  18. package/dist/tsup/chunk-5HPDYH2D.cjs.map +1 -0
  19. package/dist/tsup/{chunk-IFMTKFQV.js → chunk-67DIWJVD.js} +4 -4
  20. package/dist/tsup/{chunk-HAEJDJSQ.cjs → chunk-7XEVE6NM.cjs} +4 -4
  21. package/dist/tsup/{chunk-HAEJDJSQ.cjs.map → chunk-7XEVE6NM.cjs.map} +1 -1
  22. package/dist/tsup/{chunk-F454HCI7.js → chunk-AWIPTEN7.js} +9 -2
  23. package/dist/tsup/chunk-AWIPTEN7.js.map +1 -0
  24. package/dist/tsup/{chunk-CMJVDEDE.js → chunk-BSA37OX7.js} +2 -2
  25. package/dist/tsup/{chunk-SZHZSNPS.cjs → chunk-CSJI7IRZ.cjs} +5 -5
  26. package/dist/tsup/{chunk-SZHZSNPS.cjs.map → chunk-CSJI7IRZ.cjs.map} +1 -1
  27. package/dist/tsup/{chunk-2WQQZFYZ.js → chunk-DPIMKYNB.js} +1 -1
  28. package/dist/tsup/chunk-DPIMKYNB.js.map +1 -0
  29. package/dist/tsup/{chunk-RGV6A7NC.cjs → chunk-ERIDC7PA.cjs} +3 -3
  30. package/dist/tsup/{chunk-RGV6A7NC.cjs.map → chunk-ERIDC7PA.cjs.map} +1 -1
  31. package/dist/tsup/{chunk-KR36C74E.cjs → chunk-NIOC52DM.cjs} +10 -10
  32. package/dist/tsup/{chunk-KR36C74E.cjs.map → chunk-NIOC52DM.cjs.map} +1 -1
  33. package/dist/tsup/{chunk-MWNKF5OP.cjs → chunk-NIY3RSPX.cjs} +1 -1
  34. package/dist/tsup/chunk-NIY3RSPX.cjs.map +1 -0
  35. package/dist/tsup/{chunk-EUIYU7BE.js → chunk-PNMCWNDX.js} +2 -2
  36. package/dist/tsup/{chunk-DF4LSVO4.js → chunk-RYFFWSOD.js} +5 -5
  37. package/dist/tsup/{chunk-DF4LSVO4.js.map → chunk-RYFFWSOD.js.map} +1 -1
  38. package/dist/tsup/{chunk-PAL2SCK4.cjs → chunk-UUMTOQPC.cjs} +140 -140
  39. package/dist/tsup/{chunk-PAL2SCK4.cjs.map → chunk-UUMTOQPC.cjs.map} +1 -1
  40. package/dist/tsup/{chunk-IB3DGSJZ.js → chunk-WCSMKOHR.js} +2 -2
  41. package/dist/tsup/client/mod.cjs +6 -6
  42. package/dist/tsup/client/mod.d.cts +3 -3
  43. package/dist/tsup/client/mod.d.ts +3 -3
  44. package/dist/tsup/client/mod.js +5 -5
  45. package/dist/tsup/common/log.cjs +2 -2
  46. package/dist/tsup/common/log.js +1 -1
  47. package/dist/tsup/common/websocket.cjs +3 -3
  48. package/dist/tsup/common/websocket.js +2 -2
  49. package/dist/tsup/{config-DJU_K3QZ.d.ts → config-BxWAw3iH.d.ts} +17 -1
  50. package/dist/tsup/{config-B7TlE3x5.d.cts → config-CZQQ-mso.d.cts} +17 -1
  51. package/dist/tsup/{context-CWRUBQJc.d.cts → context-Bw7xq8w3.d.cts} +1 -1
  52. package/dist/tsup/{context-BsCziuYX.d.ts → context-D8QA76sV.d.ts} +1 -1
  53. package/dist/tsup/dynamic/mod.cjs +2 -2
  54. package/dist/tsup/dynamic/mod.d.cts +2 -2
  55. package/dist/tsup/dynamic/mod.d.ts +2 -2
  56. package/dist/tsup/dynamic/mod.js +1 -1
  57. package/dist/tsup/inspector/mod.cjs +5 -5
  58. package/dist/tsup/inspector/mod.js +4 -4
  59. package/dist/tsup/inspector-tab/mod.cjs +2 -2
  60. package/dist/tsup/inspector-tab/mod.d.cts +3 -3
  61. package/dist/tsup/inspector-tab/mod.d.ts +3 -3
  62. package/dist/tsup/inspector-tab/mod.js +1 -1
  63. package/dist/tsup/mod.cjs +130 -79
  64. package/dist/tsup/mod.cjs.map +1 -1
  65. package/dist/tsup/mod.d.cts +4 -4
  66. package/dist/tsup/mod.d.ts +4 -4
  67. package/dist/tsup/mod.js +63 -12
  68. package/dist/tsup/mod.js.map +1 -1
  69. package/dist/tsup/test/mod.cjs +9 -9
  70. package/dist/tsup/test/mod.d.cts +2 -2
  71. package/dist/tsup/test/mod.d.ts +2 -2
  72. package/dist/tsup/test/mod.js +5 -5
  73. package/dist/tsup/{utils-DVekpm4I.d.cts → utils-DQosb24I.d.cts} +1 -1
  74. package/dist/tsup/{utils-DVekpm4I.d.ts → utils-DQosb24I.d.ts} +1 -1
  75. package/dist/tsup/utils.cjs +2 -2
  76. package/dist/tsup/utils.d.cts +1 -1
  77. package/dist/tsup/utils.d.ts +1 -1
  78. package/dist/tsup/utils.js +1 -1
  79. package/dist/tsup/workflow/mod.cjs +11 -11
  80. package/dist/tsup/workflow/mod.d.cts +4 -4
  81. package/dist/tsup/workflow/mod.d.ts +4 -4
  82. package/dist/tsup/workflow/mod.js +5 -5
  83. package/package.json +8 -8
  84. package/src/actor/config.ts +8 -0
  85. package/src/actor/instance/mod.ts +4 -4
  86. package/src/actor/mod.ts +2 -0
  87. package/src/common/engine.ts +28 -1
  88. package/src/engine-client/actor-http-client.ts +2 -2
  89. package/src/registry/config/index.ts +37 -7
  90. package/src/registry/index.ts +4 -2
  91. package/src/registry/native.ts +37 -7
  92. package/src/registry/runtime.ts +4 -0
  93. package/src/utils/env-vars.ts +6 -0
  94. package/dist/tsup/chunk-2WQQZFYZ.js.map +0 -1
  95. package/dist/tsup/chunk-DCAQEZO6.cjs.map +0 -1
  96. package/dist/tsup/chunk-F454HCI7.js.map +0 -1
  97. package/dist/tsup/chunk-MWNKF5OP.cjs.map +0 -1
  98. /package/dist/tsup/{chunk-PT6PN7RZ.js.map → chunk-3NZLRLYI.js.map} +0 -0
  99. /package/dist/tsup/{chunk-IFMTKFQV.js.map → chunk-67DIWJVD.js.map} +0 -0
  100. /package/dist/tsup/{chunk-CMJVDEDE.js.map → chunk-BSA37OX7.js.map} +0 -0
  101. /package/dist/tsup/{chunk-EUIYU7BE.js.map → chunk-PNMCWNDX.js.map} +0 -0
  102. /package/dist/tsup/{chunk-IB3DGSJZ.js.map → chunk-WCSMKOHR.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 _chunkHAEJDJSQcjs = require('./chunk-HAEJDJSQ.cjs');
3
+ var _chunk7XEVE6NMcjs = require('./chunk-7XEVE6NM.cjs');
4
4
 
5
5
 
6
6
 
@@ -9,7 +9,7 @@ var _chunkHAEJDJSQcjs = require('./chunk-HAEJDJSQ.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkMWNKF5OPcjs = require('./chunk-MWNKF5OP.cjs');
12
+ var _chunkNIY3RSPXcjs = require('./chunk-NIY3RSPX.cjs');
13
13
 
14
14
 
15
15
 
@@ -19,7 +19,7 @@ var _chunkMWNKF5OPcjs = require('./chunk-MWNKF5OP.cjs');
19
19
 
20
20
 
21
21
 
22
- var _chunkPAL2SCK4cjs = require('./chunk-PAL2SCK4.cjs');
22
+ var _chunkUUMTOQPCcjs = require('./chunk-UUMTOQPC.cjs');
23
23
 
24
24
 
25
25
 
@@ -32,9 +32,9 @@ var _chunkVE2X4KMGcjs = require('./chunk-VE2X4KMG.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkSZHZSNPScjs = require('./chunk-SZHZSNPS.cjs');
35
+ var _chunkCSJI7IRZcjs = require('./chunk-CSJI7IRZ.cjs');
36
36
  require('./chunk-ZA7FLHKH.cjs');
37
- require('./chunk-RGV6A7NC.cjs');
37
+ require('./chunk-ERIDC7PA.cjs');
38
38
 
39
39
 
40
40
 
@@ -59,7 +59,9 @@ require('./chunk-RGV6A7NC.cjs');
59
59
 
60
60
 
61
61
 
62
- var _chunkDCAQEZO6cjs = require('./chunk-DCAQEZO6.cjs');
62
+
63
+
64
+ var _chunk5HPDYH2Dcjs = require('./chunk-5HPDYH2D.cjs');
63
65
 
64
66
 
65
67
 
@@ -74,7 +76,7 @@ var _chunkKORQB2IRcjs = require('./chunk-KORQB2IR.cjs');
74
76
 
75
77
  // src/actor/log.ts
76
78
  function loggerWithoutContext() {
77
- return _chunkDCAQEZO6cjs.getLogger.call(void 0, "actor-runtime");
79
+ return _chunk5HPDYH2Dcjs.getLogger.call(void 0, "actor-runtime");
78
80
  }
79
81
 
80
82
  // src/actor/definition.ts
@@ -107,7 +109,7 @@ function actor(input) {
107
109
  warnDeprecatedShutdownTimeoutKeys(
108
110
  input == null ? void 0 : input.options
109
111
  );
110
- const config = _chunkMWNKF5OPcjs.ActorConfigSchema.parse(input);
112
+ const config = _chunkNIY3RSPXcjs.ActorConfigSchema.parse(input);
111
113
  return new ActorDefinition(config);
112
114
  }
113
115
  function isStaticActorDefinition(definition) {
@@ -206,7 +208,7 @@ function validateSchemaSync(schemas, key, data) {
206
208
  var _virtualwebsocket = require('@rivetkit/virtual-websocket');
207
209
  var _ws = require('hono/ws');
208
210
  function logger() {
209
- return _chunkDCAQEZO6cjs.getLogger.call(void 0, "inline-websocket-adapter");
211
+ return _chunk5HPDYH2Dcjs.getLogger.call(void 0, "inline-websocket-adapter");
210
212
  }
211
213
  var InlineWebSocketAdapter = class {
212
214
  #handler;
@@ -360,12 +362,27 @@ var InlineWebSocketAdapter = class {
360
362
  var _hono = require('hono');
361
363
 
362
364
  // src/common/engine.ts
365
+ var ENGINE_HOST = "127.0.0.1";
363
366
  var ENGINE_PORT = 6420;
364
- var ENGINE_ENDPOINT = `http://127.0.0.1:${ENGINE_PORT}`;
367
+ var ENGINE_ENDPOINT = buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT);
368
+ function buildEngineEndpoint(host, port) {
369
+ const urlHost = host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
370
+ return `http://${urlHost}:${port}`;
371
+ }
372
+ function isLocalEngineEndpoint(endpoint) {
373
+ let url;
374
+ try {
375
+ url = new URL(endpoint);
376
+ } catch (e) {
377
+ return false;
378
+ }
379
+ const hostname = url.hostname.toLowerCase();
380
+ return hostname === "localhost" || hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]" || hostname === "::1" || hostname === "[::1]" || /^127(?:\.\d{1,3}){0,3}$/.test(hostname);
381
+ }
365
382
 
366
383
  // src/registry/log.ts
367
384
  function logger2() {
368
- return _chunkDCAQEZO6cjs.getLogger.call(void 0, "registry");
385
+ return _chunk5HPDYH2Dcjs.getLogger.call(void 0, "registry");
369
386
  }
370
387
 
371
388
  // src/serverless/configure.ts
@@ -411,8 +428,8 @@ async function configureServerlessPool(config) {
411
428
  );
412
429
  }
413
430
  const customConfig = config.configurePool;
414
- const clientConfig = _chunkPAL2SCK4cjs.convertRegistryConfigToClientConfig.call(void 0, config);
415
- const dcsRes = await _chunkPAL2SCK4cjs.getDatacenters.call(void 0, clientConfig);
431
+ const clientConfig = _chunkUUMTOQPCcjs.convertRegistryConfigToClientConfig.call(void 0, config);
432
+ const dcsRes = await _chunkUUMTOQPCcjs.getDatacenters.call(void 0, clientConfig);
416
433
  const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
417
434
  const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
418
435
  const headers = {
@@ -434,7 +451,7 @@ async function configureServerlessPool(config) {
434
451
  metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
435
452
  drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
436
453
  };
437
- await _chunkPAL2SCK4cjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
454
+ await _chunkUUMTOQPCcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
438
455
  datacenters: Object.fromEntries(
439
456
  dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
440
457
  )
@@ -451,7 +468,7 @@ async function configureServerlessPool(config) {
451
468
  logger2().warn({
452
469
  msg: "serverless pool configuration attempt failed",
453
470
  attempts,
454
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, error)
471
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, error)
455
472
  });
456
473
  await sleep(CONFIGURE_RETRY_DELAY_MS);
457
474
  }
@@ -459,7 +476,7 @@ async function configureServerlessPool(config) {
459
476
  logger2().error({
460
477
  msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
461
478
  attempts,
462
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, lastError)
479
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, lastError)
463
480
  });
464
481
  throw lastError;
465
482
  }
@@ -467,7 +484,7 @@ async function configureServerlessPool(config) {
467
484
  // src/utils/serve.ts
468
485
  var _getport = require('get-port'); var _getport2 = _interopRequireDefault(_getport);
469
486
  var serveStaticLoaderPromises = {};
470
- async function crossPlatformServe(config, httpPort, app, runtime = _chunkDCAQEZO6cjs.detectRuntime.call(void 0, )) {
487
+ async function crossPlatformServe(config, httpPort, app, runtime = _chunk5HPDYH2Dcjs.detectRuntime.call(void 0, )) {
471
488
  logger2().debug({ msg: "detected runtime for serve", runtime });
472
489
  switch (runtime) {
473
490
  case "deno":
@@ -518,7 +535,7 @@ async function serveNode(config, httpPort, app) {
518
535
  } catch (err) {
519
536
  logger2().error({
520
537
  msg: "failed to import @hono/node-server. please run 'npm install @hono/node-server @hono/node-ws'",
521
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, err)
538
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, err)
522
539
  });
523
540
  process.exit(1);
524
541
  }
@@ -533,7 +550,7 @@ async function serveNode(config, httpPort, app) {
533
550
  } catch (err) {
534
551
  logger2().error({
535
552
  msg: "failed to import @hono/node-ws. please run 'npm install @hono/node-server @hono/node-ws'",
536
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, err)
553
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, err)
537
554
  });
538
555
  process.exit(1);
539
556
  }
@@ -564,7 +581,7 @@ async function serveDeno(config, httpPort, app) {
564
581
  } catch (err) {
565
582
  logger2().error({
566
583
  msg: "failed to import hono/deno",
567
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, err)
584
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, err)
568
585
  });
569
586
  process.exit(1);
570
587
  }
@@ -586,7 +603,7 @@ async function serveBun(config, httpPort, app) {
586
603
  } catch (err) {
587
604
  logger2().error({
588
605
  msg: "failed to import hono/bun",
589
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, err)
606
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, err)
590
607
  });
591
608
  process.exit(1);
592
609
  }
@@ -610,20 +627,20 @@ var _zod = require('zod');
610
627
  var _v4 = require('zod/v4');
611
628
  var warnedMissingVersion = false;
612
629
  var EnvoyConfigSchema = _v4.z.object({
613
- poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkDCAQEZO6cjs.getRivetPool.call(void 0, ), () => ( "default"))),
630
+ poolName: _v4.z.string().default(() => _nullishCoalesce(_chunk5HPDYH2Dcjs.getRivetPool.call(void 0, ), () => ( "default"))),
614
631
  version: _v4.z.number().default(() => {
615
- const version = _chunkDCAQEZO6cjs.getRivetEnvoyVersion.call(void 0, );
632
+ const version = _chunk5HPDYH2Dcjs.getRivetEnvoyVersion.call(void 0, );
616
633
  if (version !== void 0) return version;
617
- if (_chunkDCAQEZO6cjs.getNodeEnv.call(void 0, ) === "production" && !warnedMissingVersion) {
634
+ if (_chunk5HPDYH2Dcjs.getNodeEnv.call(void 0, ) === "production" && !warnedMissingVersion) {
618
635
  warnedMissingVersion = true;
619
- _chunkDCAQEZO6cjs.getLogger.call(void 0, "rivetkit").error(
636
+ _chunk5HPDYH2Dcjs.getLogger.call(void 0, "rivetkit").error(
620
637
  "RIVET_ENVOY_VERSION is not set. Actors will not be versioned, which means they won't be drained on deploy. This is only needed when self-hosting or using a custom envoy (not needed for Rivet Compute). Set this as a build arg in your Dockerfile. See https://rivet.dev/docs/actors/versions"
621
638
  );
622
639
  }
623
640
  return 1;
624
641
  }),
625
642
  // Deprecated.
626
- totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkDCAQEZO6cjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
643
+ totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunk5HPDYH2Dcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
627
644
  envoyKey: _v4.z.string().optional()
628
645
  });
629
646
 
@@ -661,7 +678,7 @@ var ServerlessConfigSchema = _v4.z.object({
661
678
  *
662
679
  * Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
663
680
  */
664
- publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetPublicEndpoint.call(void 0, )))),
681
+ publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetPublicEndpoint.call(void 0, )))),
665
682
  /**
666
683
  * Token that clients should use when connecting via the public endpoint.
667
684
  *
@@ -669,7 +686,7 @@ var ServerlessConfigSchema = _v4.z.object({
669
686
  *
670
687
  * Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
671
688
  */
672
- publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetPublicToken.call(void 0, ))))
689
+ publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetPublicToken.call(void 0, ))))
673
690
  // There is no publicNamespace config option because the frontend and backend
674
691
  // cannot use different namespaces. The namespace is extracted from the
675
692
  // publicEndpoint URL auth syntax if provided.
@@ -723,7 +740,7 @@ var RegistryConfigSchema = _zod.z.object({
723
740
  * Runtime binding to use for RivetKit core.
724
741
  * */
725
742
  runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
726
- const rawRuntime = _nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetkitRuntime.call(void 0, )));
743
+ const rawRuntime = _nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetkitRuntime.call(void 0, )));
727
744
  if (rawRuntime === void 0) {
728
745
  return "auto";
729
746
  }
@@ -760,7 +777,7 @@ var RegistryConfigSchema = _zod.z.object({
760
777
  * */
761
778
  logging: _zod.z.object({
762
779
  baseLogger: _zod.z.custom().optional(),
763
- level: _chunkDCAQEZO6cjs.LogLevelSchema.optional()
780
+ level: _chunk5HPDYH2Dcjs.LogLevelSchema.optional()
764
781
  }).optional().default(() => ({})),
765
782
  // MARK: Routing
766
783
  // // This is a function to allow for lazy configuration of upgradeWebSocket on the
@@ -778,9 +795,9 @@ var RegistryConfigSchema = _zod.z.object({
778
795
  *
779
796
  * Can also be set via RIVET_ENDPOINT environment variables.
780
797
  */
781
- endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetEngine.call(void 0, ))), () => ( _chunkDCAQEZO6cjs.getRivetEndpoint.call(void 0, )))),
782
- token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetToken.call(void 0, )))),
783
- namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkDCAQEZO6cjs.getRivetNamespace.call(void 0, )))),
798
+ endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetEngine.call(void 0, ))), () => ( _chunk5HPDYH2Dcjs.getRivetEndpoint.call(void 0, )))),
799
+ token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetToken.call(void 0, )))),
800
+ namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk5HPDYH2Dcjs.getRivetNamespace.call(void 0, )))),
784
801
  headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
785
802
  // MARK: Client
786
803
  // TODO:
@@ -820,9 +837,21 @@ var RegistryConfigSchema = _zod.z.object({
820
837
  *
821
838
  * Starts the full Rust engine process locally.
822
839
  */
823
- startEngine: _zod.z.boolean().default(() => _chunkDCAQEZO6cjs.getRivetRunEngine.call(void 0, )),
840
+ startEngine: _zod.z.boolean().default(() => _chunk5HPDYH2Dcjs.getRivetRunEngine.call(void 0, )),
841
+ /**
842
+ * @experimental
843
+ *
844
+ * Host to bind the spawned local engine process to.
845
+ */
846
+ engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk5HPDYH2Dcjs.getRivetRunEngineHost.call(void 0, ), () => ( ENGINE_HOST))),
847
+ /**
848
+ * @experimental
849
+ *
850
+ * Port to bind the spawned local engine process to.
851
+ */
852
+ enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunk5HPDYH2Dcjs.getRivetRunEnginePort.call(void 0, ), () => ( ENGINE_PORT))),
824
853
  /** @experimental */
825
- engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkDCAQEZO6cjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkDCAQEZO6cjs.VERSION))),
854
+ engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk5HPDYH2Dcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunk5HPDYH2Dcjs.VERSION))),
826
855
  /**
827
856
  * @experimental
828
857
  *
@@ -870,7 +899,7 @@ var RegistryConfigSchema = _zod.z.object({
870
899
  }))
871
900
  }).transform((config, ctx) => {
872
901
  var _a, _b, _c;
873
- const isDevEnv = _chunkDCAQEZO6cjs.isDev.call(void 0, );
902
+ const isDevEnv = _chunk5HPDYH2Dcjs.isDev.call(void 0, );
874
903
  const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
875
904
  if (config.runtime === "wasm" && sqliteBackend === "local") {
876
905
  ctx.addIssue({
@@ -880,7 +909,7 @@ var RegistryConfigSchema = _zod.z.object({
880
909
  });
881
910
  }
882
911
  const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
883
- const parsedEndpoint = config.endpoint ? _chunkPAL2SCK4cjs.tryParseEndpoint.call(void 0, ctx, {
912
+ const parsedEndpoint = config.endpoint ? _chunkUUMTOQPCcjs.tryParseEndpoint.call(void 0, ctx, {
884
913
  endpoint: config.endpoint,
885
914
  path: ["endpoint"],
886
915
  namespace: config.namespace,
@@ -898,13 +927,17 @@ var RegistryConfigSchema = _zod.z.object({
898
927
  message: "configurePool requires either endpoint or startEngine"
899
928
  });
900
929
  }
901
- const endpoint = config.startEngine ? ENGINE_ENDPOINT : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? ENGINE_ENDPOINT : void 0)));
930
+ const localEngineEndpoint = buildEngineEndpoint(
931
+ config.engineHost,
932
+ config.enginePort
933
+ );
934
+ const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT) : void 0)));
902
935
  const validateServerlessEndpoint = Boolean(
903
936
  config.startEngine || parsedEndpoint
904
937
  );
905
938
  const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
906
939
  const token = _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token));
907
- const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkPAL2SCK4cjs.tryParseEndpoint.call(void 0, ctx, {
940
+ const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkUUMTOQPCcjs.tryParseEndpoint.call(void 0, ctx, {
908
941
  endpoint: config.serverless.publicEndpoint,
909
942
  path: ["serverless", "publicEndpoint"]
910
943
  }) : void 0;
@@ -915,7 +948,7 @@ var RegistryConfigSchema = _zod.z.object({
915
948
  path: ["serverless", "publicEndpoint"]
916
949
  });
917
950
  }
918
- const publicEndpoint = _nullishCoalesce((parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.endpoint), () => ( (isDevEnv && config.startEngine ? ENGINE_ENDPOINT : void 0)));
951
+ const publicEndpoint = _nullishCoalesce((parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.endpoint), () => ( (isDevEnv && config.startEngine ? endpoint : void 0)));
919
952
  const publicNamespace = parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.namespace;
920
953
  const publicToken = _nullishCoalesce((parsedPublicEndpoint == null ? void 0 : parsedPublicEndpoint.token), () => ( config.serverless.publicToken));
921
954
  return {
@@ -939,7 +972,7 @@ function buildActorNames(config) {
939
972
  Object.keys(config.use).map((actorName) => {
940
973
  const definition = config.use[actorName];
941
974
  const options = _nullishCoalesce(definition.config.options, () => ( {}));
942
- const runMeta = _chunkMWNKF5OPcjs.getRunMetadata.call(void 0, definition.config.run);
975
+ const runMeta = _chunkNIY3RSPXcjs.getRunMetadata.call(void 0, definition.config.run);
943
976
  const metadata = {};
944
977
  metadata.icon = _nullishCoalesce(options.icon, () => ( runMeta.icon));
945
978
  metadata.name = _nullishCoalesce(options.name, () => ( runMeta.name));
@@ -1032,7 +1065,7 @@ var DocRegistryConfigSchema = _zod.z.object({
1032
1065
  noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
1033
1066
  sqlite: DocSqliteConfigSchema,
1034
1067
  logging: _zod.z.object({
1035
- level: _chunkDCAQEZO6cjs.LogLevelSchema.optional().describe(
1068
+ level: _chunk5HPDYH2Dcjs.LogLevelSchema.optional().describe(
1036
1069
  "Log level for RivetKit. Default: 'warn'"
1037
1070
  )
1038
1071
  }).optional().describe("Logging configuration."),
@@ -2457,7 +2490,7 @@ function trySetProcessEnv(key, value) {
2457
2490
  if (typeof process === "undefined") return;
2458
2491
  try {
2459
2492
  process.env[key] = value;
2460
- } catch (e) {
2493
+ } catch (e2) {
2461
2494
  }
2462
2495
  }
2463
2496
  function detectRuntimeHost() {
@@ -2494,7 +2527,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
2494
2527
  }
2495
2528
  try {
2496
2529
  return (await loaders.loadNative()).runtime;
2497
- } catch (e2) {
2530
+ } catch (e3) {
2498
2531
  return (await loaders.loadWasm(config.wasm)).runtime;
2499
2532
  }
2500
2533
  }
@@ -2668,7 +2701,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
2668
2701
  }).catch((error) => {
2669
2702
  logger2().warn({
2670
2703
  msg: "deferred native sleep cleanup failed",
2671
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, error)
2704
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, error)
2672
2705
  });
2673
2706
  });
2674
2707
  return;
@@ -2778,10 +2811,13 @@ function decodeValue(value) {
2778
2811
  if (!value || value.length === 0) {
2779
2812
  return void 0;
2780
2813
  }
2781
- return _chunkSZHZSNPScjs.decodeCborCompat.call(void 0, value);
2814
+ return _chunkCSJI7IRZcjs.decodeCborCompat.call(void 0, value);
2782
2815
  }
2783
2816
  function encodeValue(value) {
2784
- return _chunkSZHZSNPScjs.encodeCborCompat.call(void 0, value);
2817
+ return _chunkCSJI7IRZcjs.encodeCborCompat.call(void 0, value);
2818
+ }
2819
+ function normalizeArgs(value) {
2820
+ return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
2785
2821
  }
2786
2822
  function unwrapTsfnPayload(error, payload) {
2787
2823
  if (error !== null && error !== void 0) {
@@ -2814,7 +2850,7 @@ function isStructuredBridgeError(error) {
2814
2850
  return _chunkKORQB2IRcjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
2815
2851
  }
2816
2852
  function encodeNativeCallbackError(error) {
2817
- const structuredError = isStructuredBridgeError(error) ? error : _chunkDCAQEZO6cjs.deconstructError.call(void 0, error, true);
2853
+ const structuredError = isStructuredBridgeError(error) ? error : _chunk5HPDYH2Dcjs.deconstructError.call(void 0, error, true);
2818
2854
  const bridgeError = new Error(_chunkKORQB2IRcjs.encodeBridgeRivetError.call(void 0, structuredError), {
2819
2855
  cause: error instanceof Error ? error : void 0
2820
2856
  });
@@ -2864,8 +2900,8 @@ function decodeWorkflowCbor(data) {
2864
2900
  return null;
2865
2901
  }
2866
2902
  try {
2867
- return _chunkSZHZSNPScjs.decodeCborCompat.call(void 0, new Uint8Array(data));
2868
- } catch (e3) {
2903
+ return _chunkCSJI7IRZcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
2904
+ } catch (e4) {
2869
2905
  return null;
2870
2906
  }
2871
2907
  }
@@ -2969,7 +3005,7 @@ function serializeWorkflowHistoryForJson(data) {
2969
3005
  if (data === null) {
2970
3006
  return null;
2971
3007
  }
2972
- const history = _chunkHAEJDJSQcjs.decodeWorkflowHistoryTransport.call(void 0, data);
3008
+ const history = _chunk7XEVE6NMcjs.decodeWorkflowHistoryTransport.call(void 0, data);
2973
3009
  return jsonSafe({
2974
3010
  nameRegistry: [...history.nameRegistry],
2975
3011
  entries: history.entries.map((entry) => ({
@@ -3045,7 +3081,7 @@ function wrapNativeCallback(callback) {
3045
3081
  }
3046
3082
  function decodeArgs(value) {
3047
3083
  const decoded = decodeValue(value);
3048
- return Array.isArray(decoded) ? decoded : decoded === void 0 ? [] : [decoded];
3084
+ return normalizeArgs(decoded);
3049
3085
  }
3050
3086
  function buildRequest(init) {
3051
3087
  const url = init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString();
@@ -3082,7 +3118,7 @@ var NativeConnAdapter = class {
3082
3118
  this.#schemas = schemas;
3083
3119
  this.#ctx = ctx;
3084
3120
  this.#queueHibernationRemoval = queueHibernationRemoval;
3085
- this[_chunkMWNKF5OPcjs.CONN_STATE_MANAGER_SYMBOL] = {
3121
+ this[_chunkNIY3RSPXcjs.CONN_STATE_MANAGER_SYMBOL] = {
3086
3122
  stateEnabled: true,
3087
3123
  get state() {
3088
3124
  return thisConn.state;
@@ -3099,7 +3135,7 @@ var NativeConnAdapter = class {
3099
3135
  decodeValue(this.#runtime.connParams(this.#conn))
3100
3136
  );
3101
3137
  }
3102
- [_chunkMWNKF5OPcjs.RAW_STATE_SYMBOL]() {
3138
+ [_chunkNIY3RSPXcjs.RAW_STATE_SYMBOL]() {
3103
3139
  return this.#readState();
3104
3140
  }
3105
3141
  get state() {
@@ -3110,12 +3146,12 @@ var NativeConnAdapter = class {
3110
3146
  this.#writeState(nextValue, { writeNative: true });
3111
3147
  },
3112
3148
  (newValue) => {
3113
- _chunkSZHZSNPScjs.assertJsonCompatValue.call(void 0, newValue);
3149
+ _chunkCSJI7IRZcjs.assertJsonCompatValue.call(void 0, newValue);
3114
3150
  }
3115
3151
  );
3116
3152
  }
3117
3153
  set state(value) {
3118
- _chunkSZHZSNPScjs.assertJsonCompatValue.call(void 0, value);
3154
+ _chunkCSJI7IRZcjs.assertJsonCompatValue.call(void 0, value);
3119
3155
  this.#writeState(value, { writeNative: true });
3120
3156
  }
3121
3157
  initializeState(value) {
@@ -4013,7 +4049,7 @@ var ActorContextHandleAdapter = class {
4013
4049
  this.#databaseProvider = databaseProvider;
4014
4050
  }
4015
4051
  this.#request = request;
4016
- this[_chunkMWNKF5OPcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL] = new NativeWorkflowRuntimeAdapter(
4052
+ this[_chunkNIY3RSPXcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL] = new NativeWorkflowRuntimeAdapter(
4017
4053
  this
4018
4054
  );
4019
4055
  }
@@ -4044,7 +4080,7 @@ var ActorContextHandleAdapter = class {
4044
4080
  }
4045
4081
  throw databaseClientNotReadyError();
4046
4082
  }
4047
- [_chunkMWNKF5OPcjs.RAW_STATE_SYMBOL]() {
4083
+ [_chunkNIY3RSPXcjs.RAW_STATE_SYMBOL]() {
4048
4084
  if (!this.#stateEnabled) {
4049
4085
  throw stateNotEnabledError();
4050
4086
  }
@@ -4065,7 +4101,7 @@ var ActorContextHandleAdapter = class {
4065
4101
  },
4066
4102
  (newValue) => {
4067
4103
  this.#assertCanMutateState();
4068
- _chunkSZHZSNPScjs.assertJsonCompatValue.call(void 0, newValue);
4104
+ _chunkCSJI7IRZcjs.assertJsonCompatValue.call(void 0, newValue);
4069
4105
  }
4070
4106
  );
4071
4107
  }
@@ -4076,7 +4112,7 @@ var ActorContextHandleAdapter = class {
4076
4112
  throw stateNotEnabledError();
4077
4113
  }
4078
4114
  this.#assertCanMutateState();
4079
- _chunkSZHZSNPScjs.assertJsonCompatValue.call(void 0, value);
4115
+ _chunkCSJI7IRZcjs.assertJsonCompatValue.call(void 0, value);
4080
4116
  this.#writeState(value, { scheduleSave: true });
4081
4117
  }
4082
4118
  initializeState(value) {
@@ -4341,7 +4377,7 @@ var ActorContextHandleAdapter = class {
4341
4377
  const trackedPromise = Promise.resolve(promise).catch((error) => {
4342
4378
  logger2().warn({
4343
4379
  msg: "keepAwake promise rejected",
4344
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, error)
4380
+ error: _chunk5HPDYH2Dcjs.stringifyError.call(void 0, error)
4345
4381
  });
4346
4382
  }).then(() => null);
4347
4383
  try {
@@ -4776,9 +4812,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
4776
4812
  const actionHandlers = Object.fromEntries(
4777
4813
  Object.entries(_nullishCoalesce(config.actions, () => ( {}))).map(([name, handler]) => [name, handler])
4778
4814
  );
4779
- const createClient = () => _chunkPAL2SCK4cjs.createClientWithDriver.call(void 0,
4780
- new (0, _chunkPAL2SCK4cjs.RemoteEngineControlClient)(
4781
- _chunkPAL2SCK4cjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
4815
+ const createClient = () => _chunkUUMTOQPCcjs.createClientWithDriver.call(void 0,
4816
+ new (0, _chunkUUMTOQPCcjs.RemoteEngineControlClient)(
4817
+ _chunkUUMTOQPCcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
4782
4818
  ),
4783
4819
  { encoding: "bare" }
4784
4820
  );
@@ -4788,7 +4824,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
4788
4824
  ), () => ( false));
4789
4825
  const getNativeWorkflowInspector = (ctx) => {
4790
4826
  var _a2;
4791
- return (_a2 = _chunkMWNKF5OPcjs.getRunInspectorConfig.call(void 0,
4827
+ return (_a2 = _chunkNIY3RSPXcjs.getRunInspectorConfig.call(void 0,
4792
4828
  config.run,
4793
4829
  callNativeSync(() => runtime.actorId(ctx))
4794
4830
  )) == null ? void 0 : _a2.workflow;
@@ -5095,13 +5131,26 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5095
5131
  );
5096
5132
  }
5097
5133
  const body = await jsRequest.json();
5134
+ if (body.args !== void 0 && body.properties !== void 0) {
5135
+ return jsonResponse(
5136
+ { error: "use either args or properties, not both" },
5137
+ { status: 400 }
5138
+ );
5139
+ }
5140
+ if (body.properties !== void 0 && (body.properties === null || typeof body.properties !== "object" || Array.isArray(body.properties))) {
5141
+ return jsonResponse(
5142
+ { error: "properties must be an object" },
5143
+ { status: 400 }
5144
+ );
5145
+ }
5146
+ const args = body.properties !== void 0 ? [body.properties] : normalizeArgs(body.args);
5098
5147
  try {
5099
5148
  const output = await action(
5100
5149
  actorCtx,
5101
5150
  ...validateActionArgs(
5102
5151
  schemaConfig.actionInputSchemas,
5103
5152
  actionName,
5104
- _nullishCoalesce(body.args, () => ( []))
5153
+ args
5105
5154
  )
5106
5155
  );
5107
5156
  return jsonResponse({ output });
@@ -5483,7 +5532,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5483
5532
  new Response(null, { status: 404 })
5484
5533
  );
5485
5534
  }
5486
- const rawConnParams = jsRequest.headers.get(_chunkPAL2SCK4cjs.HEADER_CONN_PARAMS);
5535
+ const rawConnParams = jsRequest.headers.get(_chunkUUMTOQPCcjs.HEADER_CONN_PARAMS);
5487
5536
  let requestCtx;
5488
5537
  let conn;
5489
5538
  try {
@@ -5548,7 +5597,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5548
5597
  }
5549
5598
  ) : void 0,
5550
5599
  run: (() => {
5551
- const run = _chunkMWNKF5OPcjs.getRunFunction.call(void 0, config.run);
5600
+ const run = _chunkNIY3RSPXcjs.getRunFunction.call(void 0, config.run);
5552
5601
  if (!run) {
5553
5602
  return void 0;
5554
5603
  }
@@ -5567,7 +5616,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5567
5616
  }
5568
5617
  );
5569
5618
  })(),
5570
- getWorkflowHistory: _chunkMWNKF5OPcjs.getRunInspectorConfig.call(void 0, config.run) !== void 0 ? wrapNativeCallback(
5619
+ getWorkflowHistory: _chunkNIY3RSPXcjs.getRunInspectorConfig.call(void 0, config.run) !== void 0 ? wrapNativeCallback(
5571
5620
  async (error, payload) => {
5572
5621
  var _a2;
5573
5622
  const { ctx } = unwrapTsfnPayload(error, payload);
@@ -5575,7 +5624,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
5575
5624
  return history == null ? void 0 : encodeValue(history);
5576
5625
  }
5577
5626
  ) : void 0,
5578
- replayWorkflow: _chunkMWNKF5OPcjs.getRunInspectorConfig.call(void 0, config.run) !== void 0 ? wrapNativeCallback(
5627
+ replayWorkflow: _chunkNIY3RSPXcjs.getRunInspectorConfig.call(void 0, config.run) !== void 0 ? wrapNativeCallback(
5579
5628
  async (error, payload) => {
5580
5629
  const { ctx, entryId } = unwrapTsfnPayload(
5581
5630
  error,
@@ -5710,7 +5759,7 @@ async function buildServeConfig(config) {
5710
5759
  poolName: config.envoy.poolName,
5711
5760
  handleInspectorHttpInRuntime: true,
5712
5761
  serverlessBasePath: config.serverless.basePath,
5713
- serverlessPackageVersion: _chunkDCAQEZO6cjs.VERSION,
5762
+ serverlessPackageVersion: _chunk5HPDYH2Dcjs.VERSION,
5714
5763
  serverlessClientEndpoint: config.publicEndpoint,
5715
5764
  serverlessClientNamespace: config.publicNamespace,
5716
5765
  serverlessClientToken: config.publicToken,
@@ -5720,15 +5769,17 @@ async function buildServeConfig(config) {
5720
5769
  if (config.startEngine) {
5721
5770
  const { getEnginePath } = await loadEngineCli();
5722
5771
  serveConfig.engineBinaryPath = getEnginePath();
5772
+ serveConfig.engineHost = config.engineHost;
5773
+ serveConfig.enginePort = config.enginePort;
5723
5774
  }
5724
5775
  if ((_a = config.test) == null ? void 0 : _a.enabled) {
5725
- serveConfig.inspectorTestToken = _nullishCoalesce(_chunkDCAQEZO6cjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
5776
+ serveConfig.inspectorTestToken = _nullishCoalesce(_chunk5HPDYH2Dcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
5726
5777
  }
5727
5778
  return serveConfig;
5728
5779
  }
5729
5780
  async function buildRegistryWithRuntime(config, runtime) {
5730
5781
  var _a;
5731
- if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkDCAQEZO6cjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
5782
+ if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunk5HPDYH2Dcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
5732
5783
  trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
5733
5784
  }
5734
5785
  const registry = runtime.createRegistry();
@@ -6004,7 +6055,7 @@ var Registry = class {
6004
6055
  async listen(opts = {}) {
6005
6056
  const port = _nullishCoalesce(opts.port, () => ( 3e3));
6006
6057
  const config = this.parseConfig();
6007
- const runtime = _chunkDCAQEZO6cjs.detectRuntime.call(void 0, );
6058
+ const runtime = _chunk5HPDYH2Dcjs.detectRuntime.call(void 0, );
6008
6059
  const app = new (0, _hono.Hono)();
6009
6060
  if (opts.publicDir) {
6010
6061
  const serveStatic = await loadRuntimeServeStatic(runtime);
@@ -6022,7 +6073,7 @@ var Registry = class {
6022
6073
  return jsonRouteResponse(503, {
6023
6074
  status: "not_started",
6024
6075
  runtime: "rivetkit",
6025
- version: _chunkDCAQEZO6cjs.VERSION
6076
+ version: _chunk5HPDYH2Dcjs.VERSION
6026
6077
  });
6027
6078
  }
6028
6079
  const { runtime, registry } = configured;
@@ -6030,7 +6081,7 @@ var Registry = class {
6030
6081
  return jsonRouteResponse(501, {
6031
6082
  status: "unsupported",
6032
6083
  runtime: "rivetkit",
6033
- version: _chunkDCAQEZO6cjs.VERSION
6084
+ version: _chunk5HPDYH2Dcjs.VERSION
6034
6085
  });
6035
6086
  }
6036
6087
  const response = await runtime.registryHealth(registry);
@@ -6276,13 +6327,13 @@ var Registry = class {
6276
6327
  };
6277
6328
  console.log();
6278
6329
  console.log(
6279
- ` RivetKit ${_chunkDCAQEZO6cjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
6330
+ ` RivetKit ${_chunk5HPDYH2Dcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
6280
6331
  );
6281
6332
  if (config.namespace !== "default") {
6282
6333
  logLine("Namespace", config.namespace);
6283
6334
  }
6284
6335
  if (config.endpoint) {
6285
- const endpointType = config.endpoint === ENGINE_ENDPOINT ? "local native" : "remote";
6336
+ const endpointType = config.startEngine || isLocalEngineEndpoint(config.endpoint) ? "local native" : "remote";
6286
6337
  logLine("Endpoint", `${config.endpoint} (${endpointType})`);
6287
6338
  }
6288
6339
  if (kind === "serverless" && config.publicEndpoint) {
@@ -6344,5 +6395,5 @@ function setup(input) {
6344
6395
 
6345
6396
 
6346
6397
 
6347
- exports.ALLOWED_PUBLIC_HEADERS = _chunkPAL2SCK4cjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkKORQB2IRcjs.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 = _chunkKORQB2IRcjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkKORQB2IRcjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkPAL2SCK4cjs.createClientWithDriver; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkDCAQEZO6cjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkDCAQEZO6cjs.toUint8Array;
6398
+ exports.ALLOWED_PUBLIC_HEADERS = _chunkUUMTOQPCcjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkKORQB2IRcjs.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 = _chunkKORQB2IRcjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkKORQB2IRcjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkUUMTOQPCcjs.createClientWithDriver; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunk5HPDYH2Dcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunk5HPDYH2Dcjs.toUint8Array;
6348
6399
  //# sourceMappingURL=mod.cjs.map