rivetkit 2.0.8 → 2.0.10

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 (125) hide show
  1. package/dist/tsup/{chunk-2FAWAPRT.js → chunk-346X2XU4.js} +2 -2
  2. package/dist/tsup/{chunk-SFRRXLRM.js → chunk-7E5K3375.js} +2 -2
  3. package/dist/tsup/{chunk-3WRAGTDC.cjs → chunk-CA3X5M6H.cjs} +92 -39
  4. package/dist/tsup/{chunk-PVKV2O2E.js.map → chunk-CA3X5M6H.cjs.map} +1 -1
  5. package/dist/tsup/{chunk-L5MHM6JJ.cjs → chunk-DVPXSB4B.cjs} +12 -12
  6. package/dist/tsup/{chunk-L5MHM6JJ.cjs.map → chunk-DVPXSB4B.cjs.map} +1 -1
  7. package/dist/tsup/{chunk-DQVVH5ZK.cjs → chunk-GIFHYL7A.cjs} +5 -6
  8. package/dist/tsup/chunk-GIFHYL7A.cjs.map +1 -0
  9. package/dist/tsup/{chunk-N7OVEOMU.js → chunk-H7E2UU23.js} +38 -15
  10. package/dist/tsup/chunk-H7E2UU23.js.map +1 -0
  11. package/dist/tsup/{chunk-A6TV3QU6.js → chunk-HI55LHM3.js} +5 -6
  12. package/dist/tsup/chunk-HI55LHM3.js.map +1 -0
  13. package/dist/tsup/{chunk-FGOZELKN.cjs → chunk-I3FB346I.cjs} +112 -58
  14. package/dist/tsup/chunk-I3FB346I.cjs.map +1 -0
  15. package/dist/tsup/{chunk-DOZBWJRI.js → chunk-KGDZYQYE.js} +2 -2
  16. package/dist/tsup/{chunk-KYEEAVJO.cjs → chunk-KH5WFDUK.cjs} +6 -6
  17. package/dist/tsup/{chunk-KYEEAVJO.cjs.map → chunk-KH5WFDUK.cjs.map} +1 -1
  18. package/dist/tsup/{chunk-WP7YG7S5.js → chunk-KL4V2ULR.js} +5 -4
  19. package/dist/tsup/chunk-KL4V2ULR.js.map +1 -0
  20. package/dist/tsup/{chunk-S6EAEZQA.js → chunk-MLQIYKAZ.js} +106 -52
  21. package/dist/tsup/chunk-MLQIYKAZ.js.map +1 -0
  22. package/dist/tsup/{chunk-3ZMJUIL3.js → chunk-N3A5GYJU.js} +3 -3
  23. package/dist/tsup/{chunk-CKSA7NOS.cjs → chunk-PDFL7FBL.cjs} +717 -380
  24. package/dist/tsup/chunk-PDFL7FBL.cjs.map +1 -0
  25. package/dist/tsup/{chunk-ESD2JX3L.cjs → chunk-PPLR53PP.cjs} +3 -3
  26. package/dist/tsup/{chunk-ESD2JX3L.cjs.map → chunk-PPLR53PP.cjs.map} +1 -1
  27. package/dist/tsup/{chunk-6INXQCH7.cjs → chunk-PSCDCEXM.cjs} +17 -12
  28. package/dist/tsup/chunk-PSCDCEXM.cjs.map +1 -0
  29. package/dist/tsup/{chunk-PVKV2O2E.js → chunk-QRFXXTLG.js} +96 -43
  30. package/dist/tsup/chunk-QRFXXTLG.js.map +1 -0
  31. package/dist/tsup/{chunk-RM2V2IRK.js → chunk-R2S45MO6.js} +14 -9
  32. package/dist/tsup/chunk-R2S45MO6.js.map +1 -0
  33. package/dist/tsup/{chunk-QGUQB3NC.cjs → chunk-SIWYIRXP.cjs} +7 -6
  34. package/dist/tsup/chunk-SIWYIRXP.cjs.map +1 -0
  35. package/dist/tsup/{chunk-E77RVI3P.js → chunk-VJRXZPTT.js} +601 -264
  36. package/dist/tsup/chunk-VJRXZPTT.js.map +1 -0
  37. package/dist/tsup/{chunk-KDNB2BQX.cjs → chunk-VZMXAZKC.cjs} +229 -206
  38. package/dist/tsup/chunk-VZMXAZKC.cjs.map +1 -0
  39. package/dist/tsup/{chunk-TPJNKVFB.cjs → chunk-YKVTF7MP.cjs} +7 -7
  40. package/dist/tsup/{chunk-TPJNKVFB.cjs.map → chunk-YKVTF7MP.cjs.map} +1 -1
  41. package/dist/tsup/client/mod.cjs +9 -9
  42. package/dist/tsup/client/mod.d.cts +2 -2
  43. package/dist/tsup/client/mod.d.ts +2 -2
  44. package/dist/tsup/client/mod.js +8 -8
  45. package/dist/tsup/common/log.cjs +3 -3
  46. package/dist/tsup/common/log.js +2 -2
  47. package/dist/tsup/common/websocket.cjs +4 -4
  48. package/dist/tsup/common/websocket.js +3 -3
  49. package/dist/tsup/{conn-ChAuuTr0.d.cts → conn-Cc9WHuN4.d.cts} +196 -185
  50. package/dist/tsup/{conn-CjUkMEcm.d.ts → conn-DfPG71FA.d.ts} +196 -185
  51. package/dist/tsup/driver-helpers/mod.cjs +7 -5
  52. package/dist/tsup/driver-helpers/mod.cjs.map +1 -1
  53. package/dist/tsup/driver-helpers/mod.d.cts +4 -2
  54. package/dist/tsup/driver-helpers/mod.d.ts +4 -2
  55. package/dist/tsup/driver-helpers/mod.js +9 -7
  56. package/dist/tsup/driver-test-suite/mod.cjs +116 -102
  57. package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
  58. package/dist/tsup/driver-test-suite/mod.d.cts +3 -2
  59. package/dist/tsup/driver-test-suite/mod.d.ts +3 -2
  60. package/dist/tsup/driver-test-suite/mod.js +61 -47
  61. package/dist/tsup/driver-test-suite/mod.js.map +1 -1
  62. package/dist/tsup/inspector/mod.cjs +6 -6
  63. package/dist/tsup/inspector/mod.d.cts +6 -6
  64. package/dist/tsup/inspector/mod.d.ts +6 -6
  65. package/dist/tsup/inspector/mod.js +5 -5
  66. package/dist/tsup/mod.cjs +10 -10
  67. package/dist/tsup/mod.d.cts +8 -39
  68. package/dist/tsup/mod.d.ts +8 -39
  69. package/dist/tsup/mod.js +9 -9
  70. package/dist/tsup/test/mod.cjs +11 -11
  71. package/dist/tsup/test/mod.d.cts +1 -1
  72. package/dist/tsup/test/mod.d.ts +1 -1
  73. package/dist/tsup/test/mod.js +10 -10
  74. package/dist/tsup/utils.cjs +2 -2
  75. package/dist/tsup/utils.d.cts +2 -1
  76. package/dist/tsup/utils.d.ts +2 -1
  77. package/dist/tsup/utils.js +1 -1
  78. package/package.json +4 -5
  79. package/src/actor/driver.ts +2 -2
  80. package/src/actor/instance.ts +4 -4
  81. package/src/actor/protocol/serde.ts +75 -3
  82. package/src/actor/router-endpoints.ts +6 -6
  83. package/src/actor/router.ts +2 -2
  84. package/src/client/actor-conn.ts +24 -3
  85. package/src/client/config.ts +18 -25
  86. package/src/driver-helpers/mod.ts +5 -1
  87. package/src/driver-test-suite/mod.ts +65 -43
  88. package/src/driver-test-suite/utils.ts +4 -1
  89. package/src/drivers/default.ts +11 -9
  90. package/src/drivers/engine/actor-driver.ts +40 -39
  91. package/src/drivers/engine/config.ts +9 -22
  92. package/src/drivers/engine/mod.ts +9 -8
  93. package/src/drivers/file-system/global-state.ts +4 -4
  94. package/src/engine-process/log.ts +5 -0
  95. package/src/engine-process/mod.ts +316 -0
  96. package/src/inspector/utils.ts +6 -4
  97. package/src/manager/driver.ts +3 -3
  98. package/src/manager/gateway.ts +29 -11
  99. package/src/manager/router-schema.ts +20 -0
  100. package/src/manager/router.ts +139 -58
  101. package/src/registry/mod.ts +146 -120
  102. package/src/registry/run-config.ts +116 -47
  103. package/src/registry/serve.ts +3 -1
  104. package/src/remote-manager-driver/mod.ts +3 -2
  105. package/src/serde.ts +18 -3
  106. package/src/test/config.ts +2 -2
  107. package/src/test/mod.ts +6 -3
  108. package/src/utils.ts +2 -0
  109. package/dist/tsup/chunk-3WRAGTDC.cjs.map +0 -1
  110. package/dist/tsup/chunk-6INXQCH7.cjs.map +0 -1
  111. package/dist/tsup/chunk-A6TV3QU6.js.map +0 -1
  112. package/dist/tsup/chunk-CKSA7NOS.cjs.map +0 -1
  113. package/dist/tsup/chunk-DQVVH5ZK.cjs.map +0 -1
  114. package/dist/tsup/chunk-E77RVI3P.js.map +0 -1
  115. package/dist/tsup/chunk-FGOZELKN.cjs.map +0 -1
  116. package/dist/tsup/chunk-KDNB2BQX.cjs.map +0 -1
  117. package/dist/tsup/chunk-N7OVEOMU.js.map +0 -1
  118. package/dist/tsup/chunk-QGUQB3NC.cjs.map +0 -1
  119. package/dist/tsup/chunk-RM2V2IRK.js.map +0 -1
  120. package/dist/tsup/chunk-S6EAEZQA.js.map +0 -1
  121. package/dist/tsup/chunk-WP7YG7S5.js.map +0 -1
  122. /package/dist/tsup/{chunk-2FAWAPRT.js.map → chunk-346X2XU4.js.map} +0 -0
  123. /package/dist/tsup/{chunk-SFRRXLRM.js.map → chunk-7E5K3375.js.map} +0 -0
  124. /package/dist/tsup/{chunk-DOZBWJRI.js.map → chunk-KGDZYQYE.js.map} +0 -0
  125. /package/dist/tsup/{chunk-3ZMJUIL3.js.map → chunk-N3A5GYJU.js.map} +0 -0
@@ -1,29 +1,29 @@
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(); } }
2
2
 
3
- var _chunk6INXQCH7cjs = require('../chunk-6INXQCH7.cjs');
3
+ var _chunkPSCDCEXMcjs = require('../chunk-PSCDCEXM.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkCKSA7NOScjs = require('../chunk-CKSA7NOS.cjs');
7
+ var _chunkPDFL7FBLcjs = require('../chunk-PDFL7FBL.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkQGUQB3NCcjs = require('../chunk-QGUQB3NC.cjs');
12
+ var _chunkSIWYIRXPcjs = require('../chunk-SIWYIRXP.cjs');
13
13
 
14
14
 
15
- var _chunkKYEEAVJOcjs = require('../chunk-KYEEAVJO.cjs');
15
+ var _chunkKH5WFDUKcjs = require('../chunk-KH5WFDUK.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkKDNB2BQXcjs = require('../chunk-KDNB2BQX.cjs');
20
- require('../chunk-L5MHM6JJ.cjs');
19
+ var _chunkVZMXAZKCcjs = require('../chunk-VZMXAZKC.cjs');
20
+ require('../chunk-DVPXSB4B.cjs');
21
21
 
22
22
 
23
- var _chunkESD2JX3Lcjs = require('../chunk-ESD2JX3L.cjs');
23
+ var _chunkPPLR53PPcjs = require('../chunk-PPLR53PP.cjs');
24
24
 
25
25
 
26
- var _chunk3WRAGTDCcjs = require('../chunk-3WRAGTDC.cjs');
26
+ var _chunkCA3X5M6Hcjs = require('../chunk-CA3X5M6H.cjs');
27
27
 
28
28
 
29
29
 
@@ -34,13 +34,13 @@ var _chunk3WRAGTDCcjs = require('../chunk-3WRAGTDC.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunkFGOZELKNcjs = require('../chunk-FGOZELKN.cjs');
37
+ var _chunkI3FB346Icjs = require('../chunk-I3FB346I.cjs');
38
38
 
39
39
 
40
- var _chunkTPJNKVFBcjs = require('../chunk-TPJNKVFB.cjs');
40
+ var _chunkYKVTF7MPcjs = require('../chunk-YKVTF7MP.cjs');
41
41
 
42
42
 
43
- var _chunkDQVVH5ZKcjs = require('../chunk-DQVVH5ZK.cjs');
43
+ var _chunkGIFHYL7Acjs = require('../chunk-GIFHYL7A.cjs');
44
44
 
45
45
 
46
46
 
@@ -55,7 +55,7 @@ var _vitest = require('vitest');
55
55
 
56
56
  // src/driver-test-suite/log.ts
57
57
  function logger() {
58
- return _chunkTPJNKVFBcjs.getLogger.call(void 0, "test-suite");
58
+ return _chunkYKVTF7MPcjs.getLogger.call(void 0, "test-suite");
59
59
  }
60
60
 
61
61
  // src/driver-test-suite/tests/action-features.ts
@@ -106,7 +106,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
106
106
  const url = `${endpoint}/.test/inline-driver/send-request/${pathWithQuery}`;
107
107
  logger().debug({ msg: "rewriting http url", from: oldUrl, to: url });
108
108
  const headers = new Headers(actorRequest.headers);
109
- headers.set(_chunkFGOZELKNcjs.HEADER_ACTOR_ID, actorId);
109
+ headers.set(_chunkI3FB346Icjs.HEADER_ACTOR_ID, actorId);
110
110
  const response = await fetch(
111
111
  new Request(url, {
112
112
  method: actorRequest.method,
@@ -122,7 +122,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
122
122
  const errorData = await clonedResponse.json();
123
123
  if (errorData.error) {
124
124
  if (typeof errorData.error === "object") {
125
- throw new (0, _chunkKDNB2BQXcjs.ActorError)(
125
+ throw new (0, _chunkVZMXAZKCcjs.ActorError)(
126
126
  errorData.error.code,
127
127
  errorData.error.message,
128
128
  errorData.error.metadata
@@ -130,7 +130,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
130
130
  }
131
131
  }
132
132
  } catch (e) {
133
- if (!(e instanceof _chunkKDNB2BQXcjs.ActorError)) {
133
+ if (!(e instanceof _chunkVZMXAZKCcjs.ActorError)) {
134
134
  return response;
135
135
  }
136
136
  throw e;
@@ -139,7 +139,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
139
139
  return response;
140
140
  },
141
141
  async openWebSocket(path, actorId, encoding2, params, connId, connToken) {
142
- const WebSocket2 = await _chunkESD2JX3Lcjs.importWebSocket.call(void 0, );
142
+ const WebSocket2 = await _chunkPPLR53PPcjs.importWebSocket.call(void 0, );
143
143
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
144
144
  const wsUrl = new URL(
145
145
  `${endpoint}/.test/inline-driver/connect-websocket/ws`
@@ -152,16 +152,16 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
152
152
  const finalWsUrl = `${wsProtocol}//${wsUrl.host}${wsUrl.pathname}`;
153
153
  logger().debug({ msg: "connecting to websocket", url: finalWsUrl });
154
154
  const protocols = [];
155
- protocols.push(`${_chunkFGOZELKNcjs.WS_PROTOCOL_TARGET}actor`);
156
- protocols.push(`${_chunkFGOZELKNcjs.WS_PROTOCOL_ACTOR}${actorId}`);
157
- protocols.push(`${_chunkFGOZELKNcjs.WS_PROTOCOL_ENCODING}${encoding2}`);
158
- protocols.push(`${_chunkFGOZELKNcjs.WS_PROTOCOL_TRANSPORT}${transport}`);
155
+ protocols.push(`${_chunkI3FB346Icjs.WS_PROTOCOL_TARGET}actor`);
156
+ protocols.push(`${_chunkI3FB346Icjs.WS_PROTOCOL_ACTOR}${actorId}`);
157
+ protocols.push(`${_chunkI3FB346Icjs.WS_PROTOCOL_ENCODING}${encoding2}`);
158
+ protocols.push(`${_chunkI3FB346Icjs.WS_PROTOCOL_TRANSPORT}${transport}`);
159
159
  protocols.push(
160
- `${_chunkFGOZELKNcjs.WS_PROTOCOL_PATH}${encodeURIComponent(normalizedPath)}`
160
+ `${_chunkI3FB346Icjs.WS_PROTOCOL_PATH}${encodeURIComponent(normalizedPath)}`
161
161
  );
162
162
  if (params !== void 0) {
163
163
  protocols.push(
164
- `${_chunkFGOZELKNcjs.WS_PROTOCOL_CONN_PARAMS}${encodeURIComponent(JSON.stringify(params))}`
164
+ `${_chunkI3FB346Icjs.WS_PROTOCOL_CONN_PARAMS}${encodeURIComponent(JSON.stringify(params))}`
165
165
  );
166
166
  }
167
167
  const ws = new WebSocket2(finalWsUrl, protocols);
@@ -526,14 +526,14 @@ async function makeInlineRequest(endpoint, encoding, transport, method, args) {
526
526
  if ("ok" in callResponse) {
527
527
  return callResponse.ok;
528
528
  } else if ("err" in callResponse) {
529
- throw new (0, _chunkKDNB2BQXcjs.ActorError)(
529
+ throw new (0, _chunkVZMXAZKCcjs.ActorError)(
530
530
  callResponse.err.group,
531
531
  callResponse.err.code,
532
532
  callResponse.err.message,
533
533
  callResponse.err.metadata
534
534
  );
535
535
  } else {
536
- _chunkFGOZELKNcjs.assertUnreachable.call(void 0, callResponse);
536
+ _chunkI3FB346Icjs.assertUnreachable.call(void 0, callResponse);
537
537
  }
538
538
  }
539
539
 
@@ -548,25 +548,28 @@ async function setupDriverTest(c, driverTestConfig) {
548
548
  c.onTestFinished(cleanup);
549
549
  let client;
550
550
  if (driverTestConfig.clientType === "http") {
551
- client = _chunkKYEEAVJOcjs.createClient.call(void 0, {
551
+ client = _chunkKH5WFDUKcjs.createClient.call(void 0, {
552
552
  endpoint,
553
553
  namespace,
554
554
  runnerName,
555
- transport: driverTestConfig.transport
555
+ transport: driverTestConfig.transport,
556
+ encoding: driverTestConfig.encoding
556
557
  });
557
558
  } else if (driverTestConfig.clientType === "inline") {
558
559
  const transport = _nullishCoalesce(driverTestConfig.transport, () => ( "websocket"));
560
+ const encoding = _nullishCoalesce(driverTestConfig.encoding, () => ( "bare"));
559
561
  const managerDriver = createTestInlineClientDriver(
560
562
  endpoint,
561
- "bare",
563
+ encoding,
562
564
  transport
563
565
  );
564
- const runConfig = _chunk3WRAGTDCcjs.RunConfigSchema.parse({
565
- transport
566
+ const runConfig = _chunkCA3X5M6Hcjs.RunnerConfigSchema.parse({
567
+ transport,
568
+ encoding
566
569
  });
567
- client = _chunkKDNB2BQXcjs.createClientWithDriver.call(void 0, managerDriver, runConfig);
570
+ client = _chunkVZMXAZKCcjs.createClientWithDriver.call(void 0, managerDriver, runConfig);
568
571
  } else {
569
- _chunkFGOZELKNcjs.assertUnreachable.call(void 0, driverTestConfig.clientType);
572
+ _chunkI3FB346Icjs.assertUnreachable.call(void 0, driverTestConfig.clientType);
570
573
  }
571
574
  if (!driverTestConfig.HACK_skipCleanupNet) {
572
575
  c.onTestFinished(async () => await client.dispose());
@@ -1085,7 +1088,7 @@ function runActorScheduleTests(driverTestConfig) {
1085
1088
 
1086
1089
  // fixtures/driver-test-suite/sleep.ts
1087
1090
  var SLEEP_TIMEOUT = 1e3;
1088
- var sleep = _chunkCKSA7NOScjs.actor.call(void 0, {
1091
+ var sleep = _chunkPDFL7FBLcjs.actor.call(void 0, {
1089
1092
  state: { startCount: 0, sleepCount: 0 },
1090
1093
  onStart: (c) => {
1091
1094
  c.state.startCount += 1;
@@ -1111,7 +1114,7 @@ var sleep = _chunkCKSA7NOScjs.actor.call(void 0, {
1111
1114
  sleepTimeout: SLEEP_TIMEOUT
1112
1115
  }
1113
1116
  });
1114
- var sleepWithLongRpc = _chunkCKSA7NOScjs.actor.call(void 0, {
1117
+ var sleepWithLongRpc = _chunkPDFL7FBLcjs.actor.call(void 0, {
1115
1118
  state: { startCount: 0, sleepCount: 0 },
1116
1119
  createVars: () => ({}),
1117
1120
  onStart: (c) => {
@@ -1126,7 +1129,7 @@ var sleepWithLongRpc = _chunkCKSA7NOScjs.actor.call(void 0, {
1126
1129
  },
1127
1130
  longRunningRpc: async (c) => {
1128
1131
  c.log.info("starting long running rpc");
1129
- c.vars.longRunningResolve = _chunkDQVVH5ZKcjs.promiseWithResolvers.call(void 0, );
1132
+ c.vars.longRunningResolve = _chunkGIFHYL7Acjs.promiseWithResolvers.call(void 0, );
1130
1133
  c.broadcast("waiting");
1131
1134
  await c.vars.longRunningResolve.promise;
1132
1135
  c.log.info("finished long running rpc");
@@ -1140,7 +1143,7 @@ var sleepWithLongRpc = _chunkCKSA7NOScjs.actor.call(void 0, {
1140
1143
  sleepTimeout: SLEEP_TIMEOUT
1141
1144
  }
1142
1145
  });
1143
- var sleepWithRawHttp = _chunkCKSA7NOScjs.actor.call(void 0, {
1146
+ var sleepWithRawHttp = _chunkPDFL7FBLcjs.actor.call(void 0, {
1144
1147
  state: { startCount: 0, sleepCount: 0, requestCount: 0 },
1145
1148
  onStart: (c) => {
1146
1149
  c.state.startCount += 1;
@@ -1175,7 +1178,7 @@ var sleepWithRawHttp = _chunkCKSA7NOScjs.actor.call(void 0, {
1175
1178
  sleepTimeout: SLEEP_TIMEOUT
1176
1179
  }
1177
1180
  });
1178
- var sleepWithRawWebSocket = _chunkCKSA7NOScjs.actor.call(void 0, {
1181
+ var sleepWithRawWebSocket = _chunkPDFL7FBLcjs.actor.call(void 0, {
1179
1182
  state: { startCount: 0, sleepCount: 0, connectionCount: 0 },
1180
1183
  onStart: (c) => {
1181
1184
  c.state.startCount += 1;
@@ -1238,7 +1241,7 @@ var sleepWithRawWebSocket = _chunkCKSA7NOScjs.actor.call(void 0, {
1238
1241
  sleepTimeout: SLEEP_TIMEOUT
1239
1242
  }
1240
1243
  });
1241
- var sleepWithNoSleepOption = _chunkCKSA7NOScjs.actor.call(void 0, {
1244
+ var sleepWithNoSleepOption = _chunkPDFL7FBLcjs.actor.call(void 0, {
1242
1245
  state: { startCount: 0, sleepCount: 0 },
1243
1246
  onStart: (c) => {
1244
1247
  c.state.startCount += 1;
@@ -1948,7 +1951,7 @@ function runActorInspectorTests(driverTestConfig) {
1948
1951
  _vitest.describe.call(void 0, "Manager Inspector", () => {
1949
1952
  _vitest.test.call(void 0, "should respond to ping", async (c) => {
1950
1953
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
1951
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1954
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1952
1955
  headers: {
1953
1956
  Authorization: `Bearer token`
1954
1957
  }
@@ -1962,7 +1965,7 @@ function runActorInspectorTests(driverTestConfig) {
1962
1965
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
1963
1966
  await client.counter.create(["test-actor-1"]);
1964
1967
  await client.counter.create(["test-actor-2"]);
1965
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1968
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1966
1969
  headers: {
1967
1970
  Authorization: `Bearer token`
1968
1971
  }
@@ -1985,7 +1988,7 @@ function runActorInspectorTests(driverTestConfig) {
1985
1988
  const actorKey2 = ["test-cursor-2"];
1986
1989
  await client.counter.create(actorKey1);
1987
1990
  await client.counter.create(actorKey2);
1988
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1991
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1989
1992
  headers: {
1990
1993
  Authorization: `Bearer token`
1991
1994
  }
@@ -2010,7 +2013,7 @@ function runActorInspectorTests(driverTestConfig) {
2010
2013
  });
2011
2014
  _vitest.test.call(void 0, "should handle invalid limit parameter", async (c) => {
2012
2015
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2013
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2016
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2014
2017
  headers: {
2015
2018
  Authorization: `Bearer token`
2016
2019
  }
@@ -2022,7 +2025,7 @@ function runActorInspectorTests(driverTestConfig) {
2022
2025
  });
2023
2026
  _vitest.test.call(void 0, "should create a new actor", async (c) => {
2024
2027
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2025
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2028
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2026
2029
  headers: {
2027
2030
  Authorization: `Bearer token`
2028
2031
  }
@@ -2046,7 +2049,7 @@ function runActorInspectorTests(driverTestConfig) {
2046
2049
  });
2047
2050
  _vitest.test.call(void 0, "should get builds", async (c) => {
2048
2051
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2049
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2052
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2050
2053
  headers: {
2051
2054
  Authorization: `Bearer token`
2052
2055
  }
@@ -2064,7 +2067,7 @@ function runActorInspectorTests(driverTestConfig) {
2064
2067
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2065
2068
  const handle = await client.counter.create(["test-get-by-id"]);
2066
2069
  const actorId = await handle.resolve();
2067
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2070
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2068
2071
  headers: {
2069
2072
  Authorization: `Bearer token`
2070
2073
  }
@@ -2078,7 +2081,7 @@ function runActorInspectorTests(driverTestConfig) {
2078
2081
  });
2079
2082
  _vitest.test.call(void 0, "should return 404 for non-existent actor", async (c) => {
2080
2083
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2081
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2084
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2082
2085
  headers: {
2083
2086
  Authorization: `Bearer token`
2084
2087
  }
@@ -2094,7 +2097,7 @@ function runActorInspectorTests(driverTestConfig) {
2094
2097
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2095
2098
  const handle = await client.counter.create(["test-bootstrap"]);
2096
2099
  await handle.resolve();
2097
- const http = _chunkQGUQB3NCcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2100
+ const http = _chunkSIWYIRXPcjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2098
2101
  headers: {
2099
2102
  Authorization: `Bearer token`
2100
2103
  }
@@ -2116,10 +2119,10 @@ function runActorInspectorTests(driverTestConfig) {
2116
2119
  _vitest.test.call(void 0, "should handle actor not found", async (c) => {
2117
2120
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2118
2121
  const actorId = "non-existing";
2119
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2122
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2120
2123
  headers: {
2121
2124
  Authorization: `Bearer token`,
2122
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2125
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2123
2126
  getForId: { name: "counter", actorId }
2124
2127
  })
2125
2128
  }
@@ -2131,10 +2134,10 @@ function runActorInspectorTests(driverTestConfig) {
2131
2134
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2132
2135
  const handle = await client.counter.create(["test-ping"]);
2133
2136
  const actorId = await handle.resolve();
2134
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2137
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2135
2138
  headers: {
2136
2139
  Authorization: `Bearer token`,
2137
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2140
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2138
2141
  getForId: { name: "counter", actorId }
2139
2142
  })
2140
2143
  }
@@ -2149,10 +2152,10 @@ function runActorInspectorTests(driverTestConfig) {
2149
2152
  const handle = await client.counter.create(["test-state"]);
2150
2153
  const actorId = await handle.resolve();
2151
2154
  await handle.increment(5);
2152
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2155
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2153
2156
  headers: {
2154
2157
  Authorization: `Bearer token`,
2155
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2158
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2156
2159
  getForId: { name: "counter", actorId }
2157
2160
  })
2158
2161
  }
@@ -2171,10 +2174,10 @@ function runActorInspectorTests(driverTestConfig) {
2171
2174
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2172
2175
  const handle = await client.counter.create(["test-state-replace"]);
2173
2176
  const actorId = await handle.resolve();
2174
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2177
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2175
2178
  headers: {
2176
2179
  Authorization: `Bearer token`,
2177
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2180
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2178
2181
  getForId: { name: "counter", actorId }
2179
2182
  })
2180
2183
  }
@@ -2196,10 +2199,10 @@ function runActorInspectorTests(driverTestConfig) {
2196
2199
  const handle = await client.counter.create(["test-state-patch"]);
2197
2200
  const actorId = await handle.resolve();
2198
2201
  await handle.increment(3);
2199
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2202
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2200
2203
  headers: {
2201
2204
  Authorization: `Bearer token`,
2202
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2205
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2203
2206
  getForId: { name: "counter", actorId }
2204
2207
  })
2205
2208
  }
@@ -2230,10 +2233,10 @@ function runActorInspectorTests(driverTestConfig) {
2230
2233
  const actorId = await handle.resolve();
2231
2234
  handle.connect();
2232
2235
  await handle.increment(10);
2233
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2236
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2234
2237
  headers: {
2235
2238
  Authorization: `Bearer token`,
2236
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2239
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2237
2240
  getForId: { name: "counter", actorId }
2238
2241
  })
2239
2242
  }
@@ -2255,10 +2258,10 @@ function runActorInspectorTests(driverTestConfig) {
2255
2258
  const actorId = await handle.resolve();
2256
2259
  handle.connect();
2257
2260
  await handle.increment(10);
2258
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2261
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2259
2262
  headers: {
2260
2263
  Authorization: `Bearer token`,
2261
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2264
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2262
2265
  getForId: { name: "counter", actorId }
2263
2266
  })
2264
2267
  }
@@ -2281,10 +2284,10 @@ function runActorInspectorTests(driverTestConfig) {
2281
2284
  const actorId = await handle.resolve();
2282
2285
  handle.connect();
2283
2286
  await handle.increment(10);
2284
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2287
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2285
2288
  headers: {
2286
2289
  Authorization: `Bearer token`,
2287
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2290
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2288
2291
  getForId: { name: "counter", actorId }
2289
2292
  })
2290
2293
  }
@@ -2309,10 +2312,10 @@ function runActorInspectorTests(driverTestConfig) {
2309
2312
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2310
2313
  const handle = await client.counter.create(["test-rpcs"]);
2311
2314
  const actorId = await handle.resolve();
2312
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2315
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2313
2316
  headers: {
2314
2317
  Authorization: `Bearer token`,
2315
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2318
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2316
2319
  getForId: { name: "counter", actorId }
2317
2320
  })
2318
2321
  }
@@ -2330,10 +2333,10 @@ function runActorInspectorTests(driverTestConfig) {
2330
2333
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2331
2334
  const handle = await client.counter.create(["test-db"]);
2332
2335
  const actorId = await handle.resolve();
2333
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2336
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2334
2337
  headers: {
2335
2338
  Authorization: `Bearer token`,
2336
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2339
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2337
2340
  getForId: { name: "counter", actorId }
2338
2341
  })
2339
2342
  }
@@ -2354,10 +2357,10 @@ function runActorInspectorTests(driverTestConfig) {
2354
2357
  const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2355
2358
  const handle = await client.counter.create(["test-db-query"]);
2356
2359
  const actorId = await handle.resolve();
2357
- const http = _chunkQGUQB3NCcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2360
+ const http = _chunkSIWYIRXPcjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2358
2361
  headers: {
2359
2362
  Authorization: `Bearer token`,
2360
- [_chunkFGOZELKNcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2363
+ [_chunkI3FB346Icjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2361
2364
  getForId: { name: "counter", actorId }
2362
2365
  })
2363
2366
  }
@@ -3861,38 +3864,47 @@ function runDriverTests(driverTestConfigPartial) {
3861
3864
  var _a;
3862
3865
  const clientTypes = ((_a = driverTestConfigPartial.skip) == null ? void 0 : _a.inline) ? ["http"] : ["http", "inline"];
3863
3866
  for (const clientType of clientTypes) {
3864
- const driverTestConfig = {
3865
- ...driverTestConfigPartial,
3866
- clientType
3867
- };
3868
3867
  _vitest.describe.call(void 0, `client type (${clientType})`, () => {
3869
- var _a2;
3870
- runActorDriverTests(driverTestConfig);
3871
- runManagerDriverTests(driverTestConfig);
3872
- const transports = ((_a2 = driverTestConfig.skip) == null ? void 0 : _a2.sse) ? ["websocket"] : ["websocket", "sse"];
3873
- for (const transport of transports) {
3874
- _vitest.describe.call(void 0, `transport (${transport})`, () => {
3875
- runActorConnTests({
3876
- ...driverTestConfig,
3877
- transport
3878
- });
3879
- runActorConnStateTests({ ...driverTestConfig, transport });
3880
- runActorReconnectTests({ ...driverTestConfig, transport });
3881
- runRequestAccessTests({ ...driverTestConfig, transport });
3882
- runActorDriverTestsWithTransport({ ...driverTestConfig, transport });
3868
+ const encodings = ["bare", "cbor", "json"];
3869
+ for (const encoding of encodings) {
3870
+ _vitest.describe.call(void 0, `encoding (${encoding})`, () => {
3871
+ var _a2;
3872
+ const driverTestConfig = {
3873
+ ...driverTestConfigPartial,
3874
+ clientType,
3875
+ encoding
3876
+ };
3877
+ runActorDriverTests(driverTestConfig);
3878
+ runManagerDriverTests(driverTestConfig);
3879
+ const transports = ((_a2 = driverTestConfig.skip) == null ? void 0 : _a2.sse) ? ["websocket"] : ["websocket", "sse"];
3880
+ for (const transport of transports) {
3881
+ _vitest.describe.call(void 0, `transport (${transport})`, () => {
3882
+ runActorConnTests({
3883
+ ...driverTestConfig,
3884
+ transport
3885
+ });
3886
+ runActorConnStateTests({ ...driverTestConfig, transport });
3887
+ runActorReconnectTests({ ...driverTestConfig, transport });
3888
+ runRequestAccessTests({ ...driverTestConfig, transport });
3889
+ runActorDriverTestsWithTransport({
3890
+ ...driverTestConfig,
3891
+ transport
3892
+ });
3893
+ });
3894
+ }
3895
+ runActorHandleTests(driverTestConfig);
3896
+ runActionFeaturesTests(driverTestConfig);
3897
+ runActorVarsTests(driverTestConfig);
3898
+ runActorMetadataTests(driverTestConfig);
3899
+ runActorOnStateChangeTests(driverTestConfig);
3900
+ runActorErrorHandlingTests(driverTestConfig);
3901
+ runActorInlineClientTests(driverTestConfig);
3902
+ runRawHttpTests(driverTestConfig);
3903
+ runRawHttpRequestPropertiesTests(driverTestConfig);
3904
+ runRawWebSocketTests(driverTestConfig);
3905
+ runActorInspectorTests(driverTestConfig);
3883
3906
  });
3884
3907
  }
3885
- runActorHandleTests(driverTestConfig);
3886
- runActionFeaturesTests(driverTestConfig);
3887
- runActorVarsTests(driverTestConfig);
3888
- runActorMetadataTests(driverTestConfig);
3889
- runActorOnStateChangeTests(driverTestConfig);
3890
- runActorErrorHandlingTests(driverTestConfig);
3891
- runActorInlineClientTests(driverTestConfig);
3892
- runRawHttpTests(driverTestConfig);
3893
- runRawHttpRequestPropertiesTests(driverTestConfig);
3894
- runRawWebSocketTests(driverTestConfig);
3895
- runActorInspectorTests(driverTestConfig);
3896
3908
  });
3897
3909
  }
3898
3910
  }
@@ -3920,7 +3932,7 @@ async function createTestRuntime(registryPath, driverFactory) {
3920
3932
  };
3921
3933
  } else {
3922
3934
  let upgradeWebSocket;
3923
- const config = _chunk3WRAGTDCcjs.RunConfigSchema.parse({
3935
+ const config = _chunkCA3X5M6Hcjs.RunnerConfigSchema.parse({
3924
3936
  driver,
3925
3937
  getUpgradeWebSocket: () => upgradeWebSocket,
3926
3938
  inspector: {
@@ -3929,16 +3941,18 @@ async function createTestRuntime(registryPath, driverFactory) {
3929
3941
  }
3930
3942
  });
3931
3943
  const managerDriver = driver.manager(registry.config, config);
3932
- _chunkQGUQB3NCcjs.configureInspectorAccessToken.call(void 0, config, managerDriver);
3933
- const { router } = _chunkCKSA7NOScjs.createManagerRouter.call(void 0,
3944
+ const client = _chunkVZMXAZKCcjs.createClientWithDriver.call(void 0, managerDriver);
3945
+ _chunkSIWYIRXPcjs.configureInspectorAccessToken.call(void 0, config, managerDriver);
3946
+ const { router } = _chunkPDFL7FBLcjs.createManagerRouter.call(void 0,
3934
3947
  registry.config,
3935
3948
  config,
3936
3949
  managerDriver,
3937
- void 0
3950
+ driver,
3951
+ client
3938
3952
  );
3939
3953
  const nodeWebSocket = _nodews.createNodeWebSocket.call(void 0, { app: router });
3940
3954
  upgradeWebSocket = nodeWebSocket.upgradeWebSocket;
3941
- const port = await _chunk6INXQCH7cjs.getPort.call(void 0, );
3955
+ const port = await _chunkPSCDCEXMcjs.getPort.call(void 0, );
3942
3956
  const server = _nodeserver.serve.call(void 0, {
3943
3957
  fetch: router.fetch,
3944
3958
  hostname: "127.0.0.1",