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

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-CMJVDEDE.js → chunk-2QXFHVEN.js} +2 -2
  15. package/dist/tsup/{chunk-SZHZSNPS.cjs → chunk-6VZXVJYZ.cjs} +5 -5
  16. package/dist/tsup/{chunk-SZHZSNPS.cjs.map → chunk-6VZXVJYZ.cjs.map} +1 -1
  17. package/dist/tsup/{chunk-2WQQZFYZ.js → chunk-DPIMKYNB.js} +1 -1
  18. package/dist/tsup/chunk-DPIMKYNB.js.map +1 -0
  19. package/dist/tsup/{chunk-HAEJDJSQ.cjs → chunk-DZQGDGIN.cjs} +4 -4
  20. package/dist/tsup/{chunk-HAEJDJSQ.cjs.map → chunk-DZQGDGIN.cjs.map} +1 -1
  21. package/dist/tsup/{chunk-IB3DGSJZ.js → chunk-ECFRAMQD.js} +2 -2
  22. package/dist/tsup/{chunk-PAL2SCK4.cjs → chunk-EHZUN5MG.cjs} +140 -140
  23. package/dist/tsup/{chunk-PAL2SCK4.cjs.map → chunk-EHZUN5MG.cjs.map} +1 -1
  24. package/dist/tsup/{chunk-F454HCI7.js → chunk-IGJMQRB4.js} +9 -2
  25. package/dist/tsup/chunk-IGJMQRB4.js.map +1 -0
  26. package/dist/tsup/{chunk-IFMTKFQV.js → chunk-J7BFJSYQ.js} +4 -4
  27. package/dist/tsup/{chunk-EUIYU7BE.js → chunk-L7POWJNK.js} +2 -2
  28. package/dist/tsup/{chunk-KR36C74E.cjs → chunk-N3LBY42M.cjs} +10 -10
  29. package/dist/tsup/{chunk-KR36C74E.cjs.map → chunk-N3LBY42M.cjs.map} +1 -1
  30. package/dist/tsup/{chunk-MWNKF5OP.cjs → chunk-NIY3RSPX.cjs} +1 -1
  31. package/dist/tsup/chunk-NIY3RSPX.cjs.map +1 -0
  32. package/dist/tsup/{chunk-ZSJVOE76.cjs → chunk-RAGKYTA7.cjs} +7 -7
  33. package/dist/tsup/{chunk-ZSJVOE76.cjs.map → chunk-RAGKYTA7.cjs.map} +1 -1
  34. package/dist/tsup/{chunk-PT6PN7RZ.js → chunk-SQIH25ZX.js} +3 -3
  35. package/dist/tsup/{chunk-RGV6A7NC.cjs → chunk-TT4OKZXC.cjs} +3 -3
  36. package/dist/tsup/{chunk-RGV6A7NC.cjs.map → chunk-TT4OKZXC.cjs.map} +1 -1
  37. package/dist/tsup/{chunk-DCAQEZO6.cjs → chunk-TVLFO27D.cjs} +10 -3
  38. package/dist/tsup/chunk-TVLFO27D.cjs.map +1 -0
  39. package/dist/tsup/{chunk-DF4LSVO4.js → chunk-V7XWYC4T.js} +5 -5
  40. package/dist/tsup/{chunk-DF4LSVO4.js.map → chunk-V7XWYC4T.js.map} +1 -1
  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-CMJVDEDE.js.map → chunk-2QXFHVEN.js.map} +0 -0
  99. /package/dist/tsup/{chunk-IB3DGSJZ.js.map → chunk-ECFRAMQD.js.map} +0 -0
  100. /package/dist/tsup/{chunk-IFMTKFQV.js.map → chunk-J7BFJSYQ.js.map} +0 -0
  101. /package/dist/tsup/{chunk-EUIYU7BE.js.map → chunk-L7POWJNK.js.map} +0 -0
  102. /package/dist/tsup/{chunk-PT6PN7RZ.js.map → chunk-SQIH25ZX.js.map} +0 -0
@@ -1,26 +1,26 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkZSJVOE76cjs = require('../chunk-ZSJVOE76.cjs');
3
+ var _chunkRAGKYTA7cjs = require('../chunk-RAGKYTA7.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkPAL2SCK4cjs = require('../chunk-PAL2SCK4.cjs');
7
+ var _chunkEHZUN5MGcjs = require('../chunk-EHZUN5MG.cjs');
8
8
  require('../chunk-VE2X4KMG.cjs');
9
- require('../chunk-SZHZSNPS.cjs');
9
+ require('../chunk-6VZXVJYZ.cjs');
10
10
  require('../chunk-ZA7FLHKH.cjs');
11
- require('../chunk-RGV6A7NC.cjs');
12
- require('../chunk-DCAQEZO6.cjs');
11
+ require('../chunk-TT4OKZXC.cjs');
12
+ require('../chunk-TVLFO27D.cjs');
13
13
  require('../chunk-KORQB2IR.cjs');
14
14
 
15
15
  // src/test/mod.ts
16
16
  var _pretry = require('p-retry'); var _pretry2 = _interopRequireDefault(_pretry);
17
17
  async function waitForRegistryReady(registry) {
18
- const clientConfig = _chunkPAL2SCK4cjs.convertRegistryConfigToClientConfig.call(void 0,
18
+ const clientConfig = _chunkEHZUN5MGcjs.convertRegistryConfigToClientConfig.call(void 0,
19
19
  registry.parseConfig()
20
20
  );
21
21
  await _pretry2.default.call(void 0,
22
22
  async () => {
23
- await _chunkPAL2SCK4cjs.getMetadata.call(void 0, clientConfig);
23
+ await _chunkEHZUN5MGcjs.getMetadata.call(void 0, clientConfig);
24
24
  },
25
25
  {
26
26
  retries: 20,
@@ -34,8 +34,8 @@ async function setupTest(c, registry) {
34
34
  registry.config.noWelcome = true;
35
35
  registry.start();
36
36
  await waitForRegistryReady(registry);
37
- const client = _chunkZSJVOE76cjs.createClient.call(void 0, {
38
- ..._chunkPAL2SCK4cjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
37
+ const client = _chunkRAGKYTA7cjs.createClient.call(void 0, {
38
+ ..._chunkEHZUN5MGcjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
39
39
  disableMetadataLookup: false
40
40
  });
41
41
  c.onTestFinished(async () => {
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { ax as Registry, _ as Client } from '../config-B7TlE3x5.cjs';
2
+ import { ax as Registry, _ as Client } from '../config-CZQQ-mso.cjs';
3
3
  import 'zod/v4';
4
4
  import '../config-D49x8NpL.cjs';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -9,7 +9,7 @@ import '@rivetkit/virtual-websocket';
9
9
  import '@standard-schema/spec';
10
10
  import 'hono';
11
11
  import '../utils.cjs';
12
- import '../utils-DVekpm4I.cjs';
12
+ import '../utils-DQosb24I.cjs';
13
13
  import 'hono/utils/http-status';
14
14
 
15
15
  interface SetupTestResult<A extends Registry<any>> {
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { ax as Registry, _ as Client } from '../config-DJU_K3QZ.js';
2
+ import { ax as Registry, _ as Client } from '../config-BxWAw3iH.js';
3
3
  import 'zod/v4';
4
4
  import '../config-D49x8NpL.js';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -9,7 +9,7 @@ import '@rivetkit/virtual-websocket';
9
9
  import '@standard-schema/spec';
10
10
  import 'hono';
11
11
  import '../utils.js';
12
- import '../utils-DVekpm4I.js';
12
+ import '../utils-DQosb24I.js';
13
13
  import 'hono/utils/http-status';
14
14
 
15
15
  interface SetupTestResult<A extends Registry<any>> {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  createClient
3
- } from "../chunk-PT6PN7RZ.js";
3
+ } from "../chunk-SQIH25ZX.js";
4
4
  import {
5
5
  convertRegistryConfigToClientConfig,
6
6
  getMetadata
7
- } from "../chunk-DF4LSVO4.js";
7
+ } from "../chunk-V7XWYC4T.js";
8
8
  import "../chunk-HXUEHHJF.js";
9
- import "../chunk-IB3DGSJZ.js";
9
+ import "../chunk-ECFRAMQD.js";
10
10
  import "../chunk-JZ7TWV65.js";
11
- import "../chunk-EUIYU7BE.js";
12
- import "../chunk-F454HCI7.js";
11
+ import "../chunk-L7POWJNK.js";
12
+ import "../chunk-IGJMQRB4.js";
13
13
  import "../chunk-BRP62GZC.js";
14
14
 
15
15
  // src/test/mod.ts
@@ -100,4 +100,4 @@ declare function stringifyError(error: unknown): string;
100
100
  /** Generates a `Next` handler to pass to middleware in order to be able to call arbitrary middleware. */
101
101
  declare function noopNext(): Next;
102
102
 
103
- export { type ActorRestartingOptions as A, BRIDGE_RIVET_ERROR_PREFIX as B, INTERNAL_ERROR_CODE as I, RivetError as R, UserError as U, type UserErrorOptions as a, assertUnreachable as b, type ActorSpecifier as c, type BridgeRivetErrorPayload as d, INTERNAL_ERROR_DESCRIPTION as e, type InternalErrorMetadata as f, type RivetErrorLike as g, type RivetErrorOptions as h, USER_ERROR_CODE as i, actorNotFound as j, actorRestarting as k, actorStopping as l, decodeBridgeRivetError as m, noopNext as n, decodeBridgeRivetErrorPayload as o, encodeBridgeRivetError as p, forbiddenError as q, internalError as r, stringifyError as s, invalidEncoding as t, invalidRequest as u, isRivetErrorCode as v, isRivetErrorLike as w, toRivetError as x, unsupportedFeature as y };
103
+ export { type ActorRestartingOptions as A, BRIDGE_RIVET_ERROR_PREFIX as B, INTERNAL_ERROR_CODE as I, RivetError as R, UserError as U, type RivetErrorLike as a, type RivetErrorOptions as b, type UserErrorOptions as c, assertUnreachable as d, type ActorSpecifier as e, type BridgeRivetErrorPayload as f, INTERNAL_ERROR_DESCRIPTION as g, type InternalErrorMetadata as h, USER_ERROR_CODE as i, actorNotFound as j, actorRestarting as k, actorStopping as l, decodeBridgeRivetError as m, noopNext as n, decodeBridgeRivetErrorPayload as o, encodeBridgeRivetError as p, forbiddenError as q, internalError as r, stringifyError as s, invalidEncoding as t, invalidRequest as u, isRivetErrorCode as v, isRivetErrorLike as w, toRivetError as x, unsupportedFeature as y };
@@ -100,4 +100,4 @@ declare function stringifyError(error: unknown): string;
100
100
  /** Generates a `Next` handler to pass to middleware in order to be able to call arbitrary middleware. */
101
101
  declare function noopNext(): Next;
102
102
 
103
- export { type ActorRestartingOptions as A, BRIDGE_RIVET_ERROR_PREFIX as B, INTERNAL_ERROR_CODE as I, RivetError as R, UserError as U, type UserErrorOptions as a, assertUnreachable as b, type ActorSpecifier as c, type BridgeRivetErrorPayload as d, INTERNAL_ERROR_DESCRIPTION as e, type InternalErrorMetadata as f, type RivetErrorLike as g, type RivetErrorOptions as h, USER_ERROR_CODE as i, actorNotFound as j, actorRestarting as k, actorStopping as l, decodeBridgeRivetError as m, noopNext as n, decodeBridgeRivetErrorPayload as o, encodeBridgeRivetError as p, forbiddenError as q, internalError as r, stringifyError as s, invalidEncoding as t, invalidRequest as u, isRivetErrorCode as v, isRivetErrorLike as w, toRivetError as x, unsupportedFeature as y };
103
+ export { type ActorRestartingOptions as A, BRIDGE_RIVET_ERROR_PREFIX as B, INTERNAL_ERROR_CODE as I, RivetError as R, UserError as U, type RivetErrorLike as a, type RivetErrorOptions as b, type UserErrorOptions as c, assertUnreachable as d, type ActorSpecifier as e, type BridgeRivetErrorPayload as f, INTERNAL_ERROR_DESCRIPTION as g, type InternalErrorMetadata as h, USER_ERROR_CODE as i, actorNotFound as j, actorRestarting as k, actorStopping as l, decodeBridgeRivetError as m, noopNext as n, decodeBridgeRivetErrorPayload as o, encodeBridgeRivetError as p, forbiddenError as q, internalError as r, stringifyError as s, invalidEncoding as t, invalidRequest as u, isRivetErrorCode as v, isRivetErrorLike as w, toRivetError as x, unsupportedFeature as y };
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
 
20
- var _chunkDCAQEZO6cjs = require('./chunk-DCAQEZO6.cjs');
20
+ var _chunkTVLFO27Dcjs = require('./chunk-TVLFO27D.cjs');
21
21
  require('./chunk-KORQB2IR.cjs');
22
22
 
23
23
 
@@ -38,5 +38,5 @@ require('./chunk-KORQB2IR.cjs');
38
38
 
39
39
 
40
40
 
41
- exports.EXTRA_ERROR_LOG = _chunkDCAQEZO6cjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkDCAQEZO6cjs.SinglePromiseQueue; exports.VERSION = _chunkDCAQEZO6cjs.VERSION; exports.arrayBuffersEqual = _chunkDCAQEZO6cjs.arrayBuffersEqual; exports.assertUnreachable = _chunkDCAQEZO6cjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkDCAQEZO6cjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkDCAQEZO6cjs.combineUrlPath; exports.dbg = _chunkDCAQEZO6cjs.dbg; exports.detectRuntime = _chunkDCAQEZO6cjs.detectRuntime; exports.getEnvUniversal = _chunkDCAQEZO6cjs.getEnvUniversal; exports.httpUserAgent = _chunkDCAQEZO6cjs.httpUserAgent; exports.interval = _chunkDCAQEZO6cjs.interval; exports.joinSignals = _chunkDCAQEZO6cjs.joinSignals; exports.promiseWithResolvers = _chunkDCAQEZO6cjs.promiseWithResolvers; exports.setLongTimeout = _chunkDCAQEZO6cjs.setLongTimeout; exports.sleep = _chunkDCAQEZO6cjs.sleep; exports.stringifyError = _chunkDCAQEZO6cjs.stringifyError; exports.toUint8Array = _chunkDCAQEZO6cjs.toUint8Array;
41
+ exports.EXTRA_ERROR_LOG = _chunkTVLFO27Dcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkTVLFO27Dcjs.SinglePromiseQueue; exports.VERSION = _chunkTVLFO27Dcjs.VERSION; exports.arrayBuffersEqual = _chunkTVLFO27Dcjs.arrayBuffersEqual; exports.assertUnreachable = _chunkTVLFO27Dcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkTVLFO27Dcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkTVLFO27Dcjs.combineUrlPath; exports.dbg = _chunkTVLFO27Dcjs.dbg; exports.detectRuntime = _chunkTVLFO27Dcjs.detectRuntime; exports.getEnvUniversal = _chunkTVLFO27Dcjs.getEnvUniversal; exports.httpUserAgent = _chunkTVLFO27Dcjs.httpUserAgent; exports.interval = _chunkTVLFO27Dcjs.interval; exports.joinSignals = _chunkTVLFO27Dcjs.joinSignals; exports.promiseWithResolvers = _chunkTVLFO27Dcjs.promiseWithResolvers; exports.setLongTimeout = _chunkTVLFO27Dcjs.setLongTimeout; exports.sleep = _chunkTVLFO27Dcjs.sleep; exports.stringifyError = _chunkTVLFO27Dcjs.stringifyError; exports.toUint8Array = _chunkTVLFO27Dcjs.toUint8Array;
42
42
  //# sourceMappingURL=utils.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { Context, Handler } from 'hono';
2
- export { b as assertUnreachable, s as stringifyError } from './utils-DVekpm4I.cjs';
2
+ export { d as assertUnreachable, s as stringifyError } from './utils-DQosb24I.cjs';
3
3
  import 'hono/utils/http-status';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Context, Handler } from 'hono';
2
- export { b as assertUnreachable, s as stringifyError } from './utils-DVekpm4I.js';
2
+ export { d as assertUnreachable, s as stringifyError } from './utils-DQosb24I.js';
3
3
  import 'hono/utils/http-status';
4
4
 
5
5
  /**
@@ -17,7 +17,7 @@ import {
17
17
  sleep,
18
18
  stringifyError,
19
19
  toUint8Array
20
- } from "./chunk-F454HCI7.js";
20
+ } from "./chunk-IGJMQRB4.js";
21
21
  import "./chunk-BRP62GZC.js";
22
22
  export {
23
23
  EXTRA_ERROR_LOG,
@@ -1,20 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;
2
2
 
3
- var _chunkKR36C74Ecjs = require('../chunk-KR36C74E.cjs');
4
- require('../chunk-HAEJDJSQ.cjs');
3
+ var _chunkN3LBY42Mcjs = require('../chunk-N3LBY42M.cjs');
4
+ require('../chunk-DZQGDGIN.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
- var _chunkMWNKF5OPcjs = require('../chunk-MWNKF5OP.cjs');
9
+ var _chunkNIY3RSPXcjs = require('../chunk-NIY3RSPX.cjs');
10
10
 
11
11
 
12
12
 
13
13
  var _chunkVE2X4KMGcjs = require('../chunk-VE2X4KMG.cjs');
14
- require('../chunk-SZHZSNPS.cjs');
14
+ require('../chunk-6VZXVJYZ.cjs');
15
15
 
16
16
 
17
- var _chunkDCAQEZO6cjs = require('../chunk-DCAQEZO6.cjs');
17
+ var _chunkTVLFO27Dcjs = require('../chunk-TVLFO27D.cjs');
18
18
 
19
19
 
20
20
  var _chunkKORQB2IRcjs = require('../chunk-KORQB2IR.cjs');
@@ -284,7 +284,7 @@ var ActorWorkflowContext = class _ActorWorkflowContext {
284
284
  async #withActorAccessAndStateRollback(run) {
285
285
  let stateSnapshot = null;
286
286
  try {
287
- stateSnapshot = { state: this.#runCtx[_chunkMWNKF5OPcjs.RAW_STATE_SYMBOL]() };
287
+ stateSnapshot = { state: this.#runCtx[_chunkNIY3RSPXcjs.RAW_STATE_SYMBOL]() };
288
288
  } catch (error) {
289
289
  this.#runCtx.log.debug({
290
290
  msg: "failed to get state, likely due to being stateless workflow",
@@ -639,13 +639,13 @@ function workflow(fn, options = {}) {
639
639
  function getWorkflowInspector(actorId) {
640
640
  let workflowInspector = workflowInspectors.get(actorId);
641
641
  if (!workflowInspector) {
642
- workflowInspector = _chunkKR36C74Ecjs.createWorkflowInspectorAdapter.call(void 0, );
642
+ workflowInspector = _chunkN3LBY42Mcjs.createWorkflowInspectorAdapter.call(void 0, );
643
643
  workflowInspectors.set(actorId, workflowInspector);
644
644
  }
645
645
  return workflowInspector;
646
646
  }
647
647
  async function run(runCtx) {
648
- const actor = runCtx[_chunkMWNKF5OPcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL];
648
+ const actor = runCtx[_chunkNIY3RSPXcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL];
649
649
  _invariant2.default.call(void 0, actor, "workflow() requires an actor instance");
650
650
  const workflowInspector = getWorkflowInspector(actor.id);
651
651
  const driver = new ActorWorkflowDriver(actor, runCtx);
@@ -705,20 +705,20 @@ function workflow(fn, options = {}) {
705
705
  if (shouldRethrowWorkflowError(error)) {
706
706
  runCtx.log.error({
707
707
  msg: "workflow run failed",
708
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, error)
708
+ error: _chunkTVLFO27Dcjs.stringifyError.call(void 0, error)
709
709
  });
710
710
  throw error;
711
711
  }
712
712
  runCtx.log.warn({
713
713
  msg: "workflow failed and will sleep until woken",
714
- error: _chunkDCAQEZO6cjs.stringifyError.call(void 0, error)
714
+ error: _chunkTVLFO27Dcjs.stringifyError.call(void 0, error)
715
715
  });
716
716
  } finally {
717
717
  runCtx.abortSignal.removeEventListener("abort", onAbort);
718
718
  }
719
719
  }
720
720
  const runWithConfig = run;
721
- runWithConfig[_chunkMWNKF5OPcjs.RUN_FUNCTION_CONFIG_SYMBOL] = {
721
+ runWithConfig[_chunkNIY3RSPXcjs.RUN_FUNCTION_CONFIG_SYMBOL] = {
722
722
  icon: "diagram-project",
723
723
  inspectorFactory: (actor) => {
724
724
  const actorId = resolveWorkflowInspectorActorId(actor);
@@ -1,9 +1,9 @@
1
1
  import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
2
2
  export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
3
- import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-B7TlE3x5.cjs';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-CZQQ-mso.cjs';
4
4
  import { A as AnyDatabaseProvider } from '../config-D49x8NpL.cjs';
5
- import { A as ActorWorkflowContext } from '../context-CWRUBQJc.cjs';
6
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from '../context-CWRUBQJc.cjs';
5
+ import { A as ActorWorkflowContext } from '../context-Bw7xq8w3.cjs';
6
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from '../context-Bw7xq8w3.cjs';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -12,7 +12,7 @@ import '@rivetkit/virtual-websocket';
12
12
  import '@standard-schema/spec';
13
13
  import 'hono';
14
14
  import '../utils.cjs';
15
- import '../utils-DVekpm4I.cjs';
15
+ import '../utils-DQosb24I.cjs';
16
16
  import 'hono/utils/http-status';
17
17
 
18
18
  interface WorkflowOptions<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
@@ -1,9 +1,9 @@
1
1
  import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
2
2
  export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
3
- import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-DJU_K3QZ.js';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-BxWAw3iH.js';
4
4
  import { A as AnyDatabaseProvider } from '../config-D49x8NpL.js';
5
- import { A as ActorWorkflowContext } from '../context-BsCziuYX.js';
6
- export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from '../context-BsCziuYX.js';
5
+ import { A as ActorWorkflowContext } from '../context-D8QA76sV.js';
6
+ export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from '../context-D8QA76sV.js';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -12,7 +12,7 @@ import '@rivetkit/virtual-websocket';
12
12
  import '@standard-schema/spec';
13
13
  import 'hono';
14
14
  import '../utils.js';
15
- import '../utils-DVekpm4I.js';
15
+ import '../utils-DQosb24I.js';
16
16
  import 'hono/utils/http-status';
17
17
 
18
18
  interface WorkflowOptions<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TEvents extends EventSchemaConfig = Record<never, never>, TQueues extends QueueSchemaConfig = Record<never, never>> {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  createWorkflowInspectorAdapter
3
- } from "../chunk-IFMTKFQV.js";
4
- import "../chunk-CMJVDEDE.js";
3
+ } from "../chunk-J7BFJSYQ.js";
4
+ import "../chunk-2QXFHVEN.js";
5
5
  import {
6
6
  ACTOR_CONTEXT_INTERNAL_SYMBOL,
7
7
  RAW_STATE_SYMBOL,
8
8
  RUN_FUNCTION_CONFIG_SYMBOL
9
- } from "../chunk-2WQQZFYZ.js";
9
+ } from "../chunk-DPIMKYNB.js";
10
10
  import {
11
11
  makeWorkflowKey,
12
12
  workflowStoragePrefix
13
13
  } from "../chunk-HXUEHHJF.js";
14
- import "../chunk-IB3DGSJZ.js";
14
+ import "../chunk-ECFRAMQD.js";
15
15
  import {
16
16
  stringifyError
17
- } from "../chunk-F454HCI7.js";
17
+ } from "../chunk-IGJMQRB4.js";
18
18
  import {
19
19
  RivetError
20
20
  } from "../chunk-BRP62GZC.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivetkit",
3
- "version": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
3
+ "version": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
4
4
  "description": "Lightweight libraries for building stateful actors on edge platforms",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -193,14 +193,14 @@
193
193
  "@hono/zod-openapi": "^1.1.5",
194
194
  "@rivet-dev/agent-os-core": "^0.1.1",
195
195
  "@rivetkit/bare-ts": "^0.6.2",
196
- "@rivetkit/engine-cli": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
197
- "@rivetkit/engine-envoy-protocol": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
196
+ "@rivetkit/engine-cli": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
197
+ "@rivetkit/engine-envoy-protocol": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
198
198
  "@rivetkit/on-change": "6.0.1",
199
- "@rivetkit/rivetkit-napi": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
200
- "@rivetkit/rivetkit-wasm": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
201
- "@rivetkit/traces": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
202
- "@rivetkit/virtual-websocket": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
203
- "@rivetkit/workflow-engine": "0.0.0-codex-fix-engine-ui-build-base.aec1405",
199
+ "@rivetkit/rivetkit-napi": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
200
+ "@rivetkit/rivetkit-wasm": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
201
+ "@rivetkit/traces": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
202
+ "@rivetkit/virtual-websocket": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
203
+ "@rivetkit/workflow-engine": "0.0.0-codex-rivetkit-cli-preview.5e414a8",
204
204
  "cbor-x": "^1.6.0",
205
205
  "drizzle-orm": "^0.44.2",
206
206
  "get-port": "^7.1.0",
@@ -62,6 +62,10 @@ type ActorKvListOptions<
62
62
 
63
63
  type ActorClientFor<T> = T extends Registry<any> ? Client<T> : T;
64
64
 
65
+ /**
66
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`c.db` / `c.sql`)
67
+ * or actor state instead.
68
+ */
65
69
  export interface ActorKv {
66
70
  get<T extends ActorKvValueType = "text">(
67
71
  key: Uint8Array | string,
@@ -305,6 +309,10 @@ export interface ActorContext<
305
309
  [RAW_STATE_SYMBOL](): TState;
306
310
  state: TState;
307
311
  vars: TVars;
312
+ /**
313
+ * @deprecated Actor KV is deprecated. Use embedded SQLite (`db` / `sql`)
314
+ * or actor state instead.
315
+ */
308
316
  readonly kv: ActorKv;
309
317
  readonly db: InferDatabaseClient<TDatabase>;
310
318
  readonly schedule: ActorSchedule;
@@ -1637,10 +1637,10 @@ export class ActorInstance<
1637
1637
  attributes?: Record<string, unknown>,
1638
1638
  ): Record<string, unknown> {
1639
1639
  return {
1640
- "rivet.actor.id": this.#actorId,
1641
- "rivet.actor.name": this.#name,
1642
- "rivet.actor.key": this.#actorKeyString,
1643
- "rivet.actor.region": this.#region,
1640
+ "rivet.actors.actor.id": this.#actorId,
1641
+ "rivet.actors.actor.name": this.#name,
1642
+ "rivet.actors.actor.key": this.#actorKeyString,
1643
+ "rivet.actors.actor.region": this.#region,
1644
1644
  ...(attributes ?? {}),
1645
1645
  };
1646
1646
  }
package/src/actor/mod.ts CHANGED
@@ -52,6 +52,8 @@ export {
52
52
  export {
53
53
  ActorError,
54
54
  RivetError,
55
+ type RivetErrorLike,
56
+ type RivetErrorOptions,
55
57
  UserError,
56
58
  type UserErrorOptions,
57
59
  } from "./errors";
@@ -1,2 +1,29 @@
1
+ export const ENGINE_HOST = "127.0.0.1";
1
2
  export const ENGINE_PORT = 6420;
2
- export const ENGINE_ENDPOINT = `http://127.0.0.1:${ENGINE_PORT}`;
3
+ export const ENGINE_ENDPOINT = buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT);
4
+
5
+ export function buildEngineEndpoint(host: string, port: number): string {
6
+ const urlHost =
7
+ host.includes(":") && !host.startsWith("[") ? `[${host}]` : host;
8
+ return `http://${urlHost}:${port}`;
9
+ }
10
+
11
+ export function isLocalEngineEndpoint(endpoint: string): boolean {
12
+ let url: URL;
13
+ try {
14
+ url = new URL(endpoint);
15
+ } catch {
16
+ return false;
17
+ }
18
+
19
+ const hostname = url.hostname.toLowerCase();
20
+ return (
21
+ hostname === "localhost" ||
22
+ hostname === "0.0.0.0" ||
23
+ hostname === "::" ||
24
+ hostname === "[::]" ||
25
+ hostname === "::1" ||
26
+ hostname === "[::1]" ||
27
+ /^127(?:\.\d{1,3}){0,3}$/.test(hostname)
28
+ );
29
+ }
@@ -34,9 +34,9 @@ export async function sendHttpRequestToGateway(
34
34
  bodyToSend = reqBody;
35
35
 
36
36
  // If this is a streaming request, we need to convert the headers
37
- // for the basic array buffer
37
+ // for the basic array buffer.
38
38
  guardHeaders.delete("transfer-encoding");
39
- guardHeaders.set("content-length", String(bodyToSend.byteLength));
39
+ guardHeaders.delete("content-length");
40
40
  }
41
41
  }
42
42
 
@@ -10,7 +10,7 @@ import {
10
10
  queueMetadataKey,
11
11
  workflowStoragePrefix,
12
12
  } from "@/actor/keys";
13
- import { ENGINE_ENDPOINT } from "@/common/engine";
13
+ import { buildEngineEndpoint, ENGINE_HOST, ENGINE_PORT } from "@/common/engine";
14
14
  import { type Logger, LogLevelSchema } from "@/common/log";
15
15
  import { VERSION } from "@/utils";
16
16
  import { tryParseEndpoint } from "@/utils/endpoint-parser";
@@ -20,6 +20,8 @@ import {
20
20
  getRivetkitRuntime,
21
21
  getRivetNamespace,
22
22
  getRivetRunEngine,
23
+ getRivetRunEngineHost,
24
+ getRivetRunEnginePort,
23
25
  getRivetRunEngineVersion,
24
26
  getRivetToken,
25
27
  isDev,
@@ -224,6 +226,27 @@ export const RegistryConfigSchema = z
224
226
  * Starts the full Rust engine process locally.
225
227
  */
226
228
  startEngine: z.boolean().default(() => getRivetRunEngine()),
229
+ /**
230
+ * @experimental
231
+ *
232
+ * Host to bind the spawned local engine process to.
233
+ */
234
+ engineHost: z
235
+ .string()
236
+ .optional()
237
+ .default(() => getRivetRunEngineHost() ?? ENGINE_HOST),
238
+ /**
239
+ * @experimental
240
+ *
241
+ * Port to bind the spawned local engine process to.
242
+ */
243
+ enginePort: z
244
+ .number()
245
+ .int()
246
+ .min(1)
247
+ .max(65_535)
248
+ .optional()
249
+ .default(() => getRivetRunEnginePort() ?? ENGINE_PORT),
227
250
  /** @experimental */
228
251
  engineVersion: z
229
252
  .string()
@@ -312,7 +335,9 @@ export const RegistryConfigSchema = z
312
335
  })
313
336
  : undefined;
314
337
 
315
- // Can't start a local engine and connect to a remote endpoint.
338
+ // RIVET_ENDPOINT configures what RivetKit connects to. Use
339
+ // engineHost/enginePort (or RIVET_RUN_ENGINE_HOST/PORT) to control the
340
+ // spawned local engine bind address.
316
341
  if (config.startEngine && parsedEndpoint) {
317
342
  ctx.addIssue({
318
343
  code: "custom",
@@ -329,12 +354,17 @@ export const RegistryConfigSchema = z
329
354
  });
330
355
  }
331
356
 
332
- // Flatten the endpoint and apply defaults for namespace/token
333
- // If startEngine is enabled, set endpoint to the engine endpoint.
357
+ // Flatten the endpoint and apply defaults for namespace/token.
358
+ const localEngineEndpoint = buildEngineEndpoint(
359
+ config.engineHost,
360
+ config.enginePort,
361
+ );
334
362
  const endpoint = config.startEngine
335
- ? ENGINE_ENDPOINT
363
+ ? localEngineEndpoint
336
364
  : (parsedEndpoint?.endpoint ??
337
- (isDevEnv ? ENGINE_ENDPOINT : undefined));
365
+ (isDevEnv
366
+ ? buildEngineEndpoint(ENGINE_HOST, ENGINE_PORT)
367
+ : undefined));
338
368
  const validateServerlessEndpoint = Boolean(
339
369
  config.startEngine || parsedEndpoint,
340
370
  );
@@ -367,7 +397,7 @@ export const RegistryConfigSchema = z
367
397
  // In dev mode, clients connect directly to the local Rivet Engine.
368
398
  const publicEndpoint =
369
399
  parsedPublicEndpoint?.endpoint ??
370
- (isDevEnv && config.startEngine ? ENGINE_ENDPOINT : undefined);
400
+ (isDevEnv && config.startEngine ? endpoint : undefined);
371
401
  // We extract publicNamespace to validate that it matches the backend
372
402
  // namespace (see validation above), not for functional use.
373
403
  const publicNamespace = parsedPublicEndpoint?.namespace;
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import { ENGINE_ENDPOINT } from "@/common/engine";
2
+ import { isLocalEngineEndpoint } from "@/common/engine";
3
3
  import { configureServerlessPool } from "@/serverless/configure";
4
4
  import { detectRuntime, VERSION } from "@/utils";
5
5
  import { crossPlatformServe, loadRuntimeServeStatic } from "@/utils/serve";
@@ -700,7 +700,9 @@ export class Registry<A extends RegistryActors> {
700
700
 
701
701
  if (config.endpoint) {
702
702
  const endpointType =
703
- config.endpoint === ENGINE_ENDPOINT ? "local native" : "remote";
703
+ config.startEngine || isLocalEngineEndpoint(config.endpoint)
704
+ ? "local native"
705
+ : "remote";
704
706
  logLine("Endpoint", `${config.endpoint} (${endpointType})`);
705
707
  }
706
708
 
@@ -630,6 +630,14 @@ function encodeValue(value: unknown): RuntimeBytes {
630
630
  return encodeCborCompat(value as JsonCompatValue);
631
631
  }
632
632
 
633
+ function normalizeArgs(value: unknown): unknown[] {
634
+ return Array.isArray(value)
635
+ ? value
636
+ : value === undefined || value === null
637
+ ? []
638
+ : [value];
639
+ }
640
+
633
641
  function unwrapTsfnPayload<T>(error: unknown, payload: T): T {
634
642
  if (error !== null && error !== undefined) {
635
643
  throw error;
@@ -1096,11 +1104,7 @@ function wrapNativeCallback<Args extends Array<unknown>, Result>(
1096
1104
 
1097
1105
  function decodeArgs(value?: RuntimeBytes | null): unknown[] {
1098
1106
  const decoded = decodeValue<unknown>(value);
1099
- return Array.isArray(decoded)
1100
- ? decoded
1101
- : decoded === undefined
1102
- ? []
1103
- : [decoded];
1107
+ return normalizeArgs(decoded);
1104
1108
  }
1105
1109
 
1106
1110
  function buildRequest(init: {
@@ -3837,14 +3841,38 @@ export function buildNativeFactory(
3837
3841
  404,
3838
3842
  );
3839
3843
  }
3840
- const body = (await jsRequest.json()) as { args?: unknown[] };
3844
+ const body = (await jsRequest.json()) as {
3845
+ args?: unknown;
3846
+ properties?: unknown;
3847
+ };
3848
+ if (body.args !== undefined && body.properties !== undefined) {
3849
+ return jsonResponse(
3850
+ { error: "use either args or properties, not both" },
3851
+ { status: 400 },
3852
+ );
3853
+ }
3854
+ if (
3855
+ body.properties !== undefined &&
3856
+ (body.properties === null ||
3857
+ typeof body.properties !== "object" ||
3858
+ Array.isArray(body.properties))
3859
+ ) {
3860
+ return jsonResponse(
3861
+ { error: "properties must be an object" },
3862
+ { status: 400 },
3863
+ );
3864
+ }
3865
+ const args =
3866
+ body.properties !== undefined
3867
+ ? [body.properties]
3868
+ : normalizeArgs(body.args);
3841
3869
  try {
3842
3870
  const output = await action(
3843
3871
  actorCtx,
3844
3872
  ...validateActionArgs(
3845
3873
  schemaConfig.actionInputSchemas,
3846
3874
  actionName,
3847
- body.args ?? [],
3875
+ args,
3848
3876
  ),
3849
3877
  );
3850
3878
  return jsonResponse({ output });
@@ -4731,6 +4759,8 @@ export async function buildServeConfig(
4731
4759
  if (config.startEngine) {
4732
4760
  const { getEnginePath } = await loadEngineCli();
4733
4761
  serveConfig.engineBinaryPath = getEnginePath();
4762
+ serveConfig.engineHost = config.engineHost;
4763
+ serveConfig.enginePort = config.enginePort;
4734
4764
  }
4735
4765
  if (config.test?.enabled) {
4736
4766
  serveConfig.inspectorTestToken =
@@ -250,6 +250,8 @@ export interface RuntimeServeConfig {
250
250
  namespace: string;
251
251
  poolName: string;
252
252
  engineBinaryPath?: string;
253
+ engineHost?: string;
254
+ enginePort?: number;
253
255
  handleInspectorHttpInRuntime?: boolean;
254
256
  inspectorTestToken?: string;
255
257
  serverlessBasePath?: string;
@@ -599,6 +601,8 @@ export async function buildServeConfig(
599
601
 
600
602
  if (config.startEngine) {
601
603
  serveConfig.engineBinaryPath = await loadEnginePath();
604
+ serveConfig.engineHost = config.engineHost;
605
+ serveConfig.enginePort = config.enginePort;
602
606
  }
603
607
  if (config.test?.enabled) {
604
608
  serveConfig.inspectorTestToken =