rivetkit 0.0.0-sqlite-sync-3-0-1-release.95f6e2d → 0.0.0-sqlite-sync-3-0-1-final.5663d2f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/browser/client.d.ts +9 -0
  2. package/dist/browser/client.js +67 -7
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.js +4 -1
  5. package/dist/browser/inspector/client.js.map +1 -1
  6. package/dist/tsup/{chunk-62WFU3BQ.js → chunk-3ZKCK6NL.js} +69 -12
  7. package/dist/tsup/chunk-3ZKCK6NL.js.map +1 -0
  8. package/dist/tsup/{chunk-AQWZWR2P.cjs → chunk-6UDO6UYM.cjs} +9 -3
  9. package/dist/tsup/chunk-6UDO6UYM.cjs.map +1 -0
  10. package/dist/tsup/{chunk-VKXEBB3Z.cjs → chunk-C2NON6V4.cjs} +7 -7
  11. package/dist/tsup/{chunk-VKXEBB3Z.cjs.map → chunk-C2NON6V4.cjs.map} +1 -1
  12. package/dist/tsup/{chunk-E6HKVCPA.cjs → chunk-DGU2H5IJ.cjs} +3 -3
  13. package/dist/tsup/{chunk-E6HKVCPA.cjs.map → chunk-DGU2H5IJ.cjs.map} +1 -1
  14. package/dist/tsup/{chunk-HQHTTJW5.js → chunk-DU7V4SDK.js} +9 -3
  15. package/dist/tsup/chunk-DU7V4SDK.js.map +1 -0
  16. package/dist/tsup/{chunk-M5SQGPRJ.cjs → chunk-EKERHPCE.cjs} +4 -4
  17. package/dist/tsup/{chunk-M5SQGPRJ.cjs.map → chunk-EKERHPCE.cjs.map} +1 -1
  18. package/dist/tsup/{chunk-E4KDQJCR.cjs → chunk-G26OT2Q6.cjs} +3 -3
  19. package/dist/tsup/{chunk-E4KDQJCR.cjs.map → chunk-G26OT2Q6.cjs.map} +1 -1
  20. package/dist/tsup/{chunk-QE5MTZHB.js → chunk-GAFMEUAL.js} +3 -3
  21. package/dist/tsup/{chunk-QIIIRYN7.js → chunk-MT4SROQM.js} +2 -2
  22. package/dist/tsup/{chunk-QFZY2CK3.js → chunk-SEKTNJU6.js} +4 -4
  23. package/dist/tsup/{chunk-HDVZ6YZG.cjs → chunk-SSF2XC33.cjs} +1 -1
  24. package/dist/tsup/chunk-SSF2XC33.cjs.map +1 -0
  25. package/dist/tsup/{chunk-2HWY7FZU.js → chunk-T7DJZSPH.js} +2 -2
  26. package/dist/tsup/{chunk-ZMVYZ7ZI.js → chunk-TTMWSZZA.js} +2 -2
  27. package/dist/tsup/{chunk-6FEYCVZC.js → chunk-UXDASKP6.js} +1 -1
  28. package/dist/tsup/chunk-UXDASKP6.js.map +1 -0
  29. package/dist/tsup/{chunk-MYWNJP55.cjs → chunk-X567WA3N.cjs} +10 -10
  30. package/dist/tsup/{chunk-MYWNJP55.cjs.map → chunk-X567WA3N.cjs.map} +1 -1
  31. package/dist/tsup/{chunk-UHMB5FFB.cjs → chunk-XLD6TRSE.cjs} +3 -3
  32. package/dist/tsup/{chunk-UHMB5FFB.cjs.map → chunk-XLD6TRSE.cjs.map} +1 -1
  33. package/dist/tsup/{chunk-EQBUH25O.cjs → chunk-YJ2X5STT.cjs} +203 -146
  34. package/dist/tsup/chunk-YJ2X5STT.cjs.map +1 -0
  35. package/dist/tsup/{chunk-OWZ76NSH.js → chunk-YNAEH775.js} +2 -2
  36. package/dist/tsup/client/mod.cjs +5 -5
  37. package/dist/tsup/client/mod.d.cts +2 -2
  38. package/dist/tsup/client/mod.d.ts +2 -2
  39. package/dist/tsup/client/mod.js +4 -4
  40. package/dist/tsup/common/log.cjs +2 -2
  41. package/dist/tsup/common/log.js +1 -1
  42. package/dist/tsup/common/websocket.cjs +3 -3
  43. package/dist/tsup/common/websocket.js +2 -2
  44. package/dist/tsup/{config-B4erdavw.d.ts → config-CASGH-5t.d.ts} +2 -0
  45. package/dist/tsup/{config-DK144OAw.d.cts → config-RMLak20L.d.cts} +2 -0
  46. package/dist/tsup/{context-Oxi6YWcG.d.ts → context-C1tMYvV-.d.ts} +1 -1
  47. package/dist/tsup/{context-Cvnf3BRe.d.cts → context-CxNE2KvK.d.cts} +1 -1
  48. package/dist/tsup/db/drizzle.cjs +2 -2
  49. package/dist/tsup/db/drizzle.js +1 -1
  50. package/dist/tsup/db/mod.cjs +3 -3
  51. package/dist/tsup/db/mod.js +2 -2
  52. package/dist/tsup/dynamic/mod.cjs +2 -2
  53. package/dist/tsup/dynamic/mod.d.cts +1 -1
  54. package/dist/tsup/dynamic/mod.d.ts +1 -1
  55. package/dist/tsup/dynamic/mod.js +1 -1
  56. package/dist/tsup/inspector/mod.cjs +5 -5
  57. package/dist/tsup/inspector/mod.js +4 -4
  58. package/dist/tsup/inspector/workflow.cjs +4 -4
  59. package/dist/tsup/inspector/workflow.js +3 -3
  60. package/dist/tsup/inspector-tab/mod.cjs +2 -2
  61. package/dist/tsup/inspector-tab/mod.d.cts +2 -2
  62. package/dist/tsup/inspector-tab/mod.d.ts +2 -2
  63. package/dist/tsup/inspector-tab/mod.js +1 -1
  64. package/dist/tsup/mod.cjs +132 -124
  65. package/dist/tsup/mod.cjs.map +1 -1
  66. package/dist/tsup/mod.d.cts +3 -3
  67. package/dist/tsup/mod.d.ts +3 -3
  68. package/dist/tsup/mod.js +31 -23
  69. package/dist/tsup/mod.js.map +1 -1
  70. package/dist/tsup/test/mod.cjs +6 -6
  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 +4 -4
  74. package/dist/tsup/utils.cjs +2 -2
  75. package/dist/tsup/utils.js +1 -1
  76. package/dist/tsup/workflow/mod.cjs +10 -10
  77. package/dist/tsup/workflow/mod.d.cts +3 -3
  78. package/dist/tsup/workflow/mod.d.ts +3 -3
  79. package/dist/tsup/workflow/mod.js +5 -5
  80. package/package.json +12 -9
  81. package/src/actor/config.ts +2 -0
  82. package/src/client/actor-handle.ts +43 -7
  83. package/src/client/raw-utils.ts +17 -3
  84. package/src/client/utils.ts +4 -0
  85. package/src/registry/config/index.ts +7 -5
  86. package/src/registry/native.ts +24 -17
  87. package/src/registry/runtime.ts +1 -1
  88. package/src/utils/env-vars.ts +4 -2
  89. package/dist/tsup/chunk-62WFU3BQ.js.map +0 -1
  90. package/dist/tsup/chunk-6FEYCVZC.js.map +0 -1
  91. package/dist/tsup/chunk-AQWZWR2P.cjs.map +0 -1
  92. package/dist/tsup/chunk-EQBUH25O.cjs.map +0 -1
  93. package/dist/tsup/chunk-HDVZ6YZG.cjs.map +0 -1
  94. package/dist/tsup/chunk-HQHTTJW5.js.map +0 -1
  95. /package/dist/tsup/{chunk-QE5MTZHB.js.map → chunk-GAFMEUAL.js.map} +0 -0
  96. /package/dist/tsup/{chunk-QIIIRYN7.js.map → chunk-MT4SROQM.js.map} +0 -0
  97. /package/dist/tsup/{chunk-QFZY2CK3.js.map → chunk-SEKTNJU6.js.map} +0 -0
  98. /package/dist/tsup/{chunk-2HWY7FZU.js.map → chunk-T7DJZSPH.js.map} +0 -0
  99. /package/dist/tsup/{chunk-ZMVYZ7ZI.js.map → chunk-TTMWSZZA.js.map} +0 -0
  100. /package/dist/tsup/{chunk-OWZ76NSH.js.map → chunk-YNAEH775.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkVKXEBB3Zcjs = require('../chunk-VKXEBB3Z.cjs');
3
+ var _chunkC2NON6V4cjs = require('../chunk-C2NON6V4.cjs');
4
4
 
5
5
 
6
- var _chunkEQBUH25Ocjs = require('../chunk-EQBUH25O.cjs');
6
+ var _chunkYJ2X5STTcjs = require('../chunk-YJ2X5STT.cjs');
7
7
  require('../chunk-RTWH3AX3.cjs');
8
+ require('../chunk-G26OT2Q6.cjs');
8
9
  require('../chunk-KVFIONKQ.cjs');
9
- require('../chunk-E4KDQJCR.cjs');
10
- require('../chunk-AQWZWR2P.cjs');
10
+ require('../chunk-6UDO6UYM.cjs');
11
11
  require('../chunk-MGI2VVF6.cjs');
12
12
 
13
13
  // src/test/ready.ts
@@ -36,8 +36,8 @@ async function setupTest(c, registry) {
36
36
  registry.config.noWelcome = true;
37
37
  registry.start();
38
38
  await waitForRegistryReady(registry);
39
- const client = _chunkVKXEBB3Zcjs.createClient.call(void 0, {
40
- ..._chunkEQBUH25Ocjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
39
+ const client = _chunkC2NON6V4cjs.createClient.call(void 0, {
40
+ ..._chunkYJ2X5STTcjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
41
41
  disableMetadataLookup: false
42
42
  });
43
43
  c.onTestFinished(async () => {
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { aI as Registry, a6 as Client } from '../config-DK144OAw.cjs';
2
+ import { aI as Registry, a6 as Client } from '../config-RMLak20L.cjs';
3
3
  import 'zod/v4';
4
4
  import '../config-BfG1qpYz.cjs';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -1,5 +1,5 @@
1
1
  import { TestContext } from 'vitest';
2
- import { aI as Registry, a6 as Client } from '../config-B4erdavw.js';
2
+ import { aI as Registry, a6 as Client } from '../config-CASGH-5t.js';
3
3
  import 'zod/v4';
4
4
  import '../config-BfG1qpYz.js';
5
5
  import '@rivetkit/rivetkit-wasm';
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createClient
3
- } from "../chunk-QE5MTZHB.js";
3
+ } from "../chunk-GAFMEUAL.js";
4
4
  import {
5
5
  convertRegistryConfigToClientConfig
6
- } from "../chunk-62WFU3BQ.js";
6
+ } from "../chunk-3ZKCK6NL.js";
7
7
  import "../chunk-A2CF6PFH.js";
8
+ import "../chunk-YNAEH775.js";
8
9
  import "../chunk-JTHHCZCZ.js";
9
- import "../chunk-OWZ76NSH.js";
10
- import "../chunk-HQHTTJW5.js";
10
+ import "../chunk-DU7V4SDK.js";
11
11
  import "../chunk-ZOVJDAOW.js";
12
12
 
13
13
  // src/test/ready.ts
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkAQWZWR2Pcjs = require('./chunk-AQWZWR2P.cjs');
22
+ var _chunk6UDO6UYMcjs = require('./chunk-6UDO6UYM.cjs');
23
23
  require('./chunk-MGI2VVF6.cjs');
24
24
 
25
25
 
@@ -42,5 +42,5 @@ require('./chunk-MGI2VVF6.cjs');
42
42
 
43
43
 
44
44
 
45
- exports.EXTRA_ERROR_LOG = _chunkAQWZWR2Pcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkAQWZWR2Pcjs.SinglePromiseQueue; exports.VERSION = _chunkAQWZWR2Pcjs.VERSION; exports.arrayBuffersEqual = _chunkAQWZWR2Pcjs.arrayBuffersEqual; exports.assertUnreachable = _chunkAQWZWR2Pcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkAQWZWR2Pcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkAQWZWR2Pcjs.combineUrlPath; exports.dbg = _chunkAQWZWR2Pcjs.dbg; exports.detectRuntime = _chunkAQWZWR2Pcjs.detectRuntime; exports.getEnvUniversal = _chunkAQWZWR2Pcjs.getEnvUniversal; exports.httpUserAgent = _chunkAQWZWR2Pcjs.httpUserAgent; exports.interval = _chunkAQWZWR2Pcjs.interval; exports.joinSignals = _chunkAQWZWR2Pcjs.joinSignals; exports.jsonParseCompat = _chunkAQWZWR2Pcjs.jsonParseCompat; exports.jsonStringifyCompat = _chunkAQWZWR2Pcjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunkAQWZWR2Pcjs.promiseWithResolvers; exports.setLongTimeout = _chunkAQWZWR2Pcjs.setLongTimeout; exports.sleep = _chunkAQWZWR2Pcjs.sleep; exports.stringifyError = _chunkAQWZWR2Pcjs.stringifyError; exports.toUint8Array = _chunkAQWZWR2Pcjs.toUint8Array;
45
+ exports.EXTRA_ERROR_LOG = _chunk6UDO6UYMcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunk6UDO6UYMcjs.SinglePromiseQueue; exports.VERSION = _chunk6UDO6UYMcjs.VERSION; exports.arrayBuffersEqual = _chunk6UDO6UYMcjs.arrayBuffersEqual; exports.assertUnreachable = _chunk6UDO6UYMcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunk6UDO6UYMcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunk6UDO6UYMcjs.combineUrlPath; exports.dbg = _chunk6UDO6UYMcjs.dbg; exports.detectRuntime = _chunk6UDO6UYMcjs.detectRuntime; exports.getEnvUniversal = _chunk6UDO6UYMcjs.getEnvUniversal; exports.httpUserAgent = _chunk6UDO6UYMcjs.httpUserAgent; exports.interval = _chunk6UDO6UYMcjs.interval; exports.joinSignals = _chunk6UDO6UYMcjs.joinSignals; exports.jsonParseCompat = _chunk6UDO6UYMcjs.jsonParseCompat; exports.jsonStringifyCompat = _chunk6UDO6UYMcjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunk6UDO6UYMcjs.promiseWithResolvers; exports.setLongTimeout = _chunk6UDO6UYMcjs.setLongTimeout; exports.sleep = _chunk6UDO6UYMcjs.sleep; exports.stringifyError = _chunk6UDO6UYMcjs.stringifyError; exports.toUint8Array = _chunk6UDO6UYMcjs.toUint8Array;
46
46
  //# sourceMappingURL=utils.cjs.map
@@ -19,7 +19,7 @@ import {
19
19
  sleep,
20
20
  stringifyError,
21
21
  toUint8Array
22
- } from "./chunk-HQHTTJW5.js";
22
+ } from "./chunk-DU7V4SDK.js";
23
23
  import "./chunk-ZOVJDAOW.js";
24
24
  export {
25
25
  EXTRA_ERROR_LOG,
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2;
2
2
 
3
- var _chunkMYWNJP55cjs = require('../chunk-MYWNJP55.cjs');
4
- require('../chunk-E6HKVCPA.cjs');
5
- require('../chunk-M5SQGPRJ.cjs');
3
+ var _chunkX567WA3Ncjs = require('../chunk-X567WA3N.cjs');
4
+ require('../chunk-DGU2H5IJ.cjs');
5
+ require('../chunk-EKERHPCE.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunkHDVZ6YZGcjs = require('../chunk-HDVZ6YZG.cjs');
9
+ var _chunkSSF2XC33cjs = require('../chunk-SSF2XC33.cjs');
10
10
 
11
11
 
12
12
 
13
13
  var _chunkRTWH3AX3cjs = require('../chunk-RTWH3AX3.cjs');
14
14
 
15
15
 
16
- var _chunkAQWZWR2Pcjs = require('../chunk-AQWZWR2P.cjs');
16
+ var _chunk6UDO6UYMcjs = require('../chunk-6UDO6UYM.cjs');
17
17
 
18
18
 
19
19
 
@@ -746,13 +746,13 @@ function workflow(fn, options = {}) {
746
746
  function getWorkflowInspector(actorId) {
747
747
  let workflowInspector = workflowInspectors.get(actorId);
748
748
  if (!workflowInspector) {
749
- workflowInspector = _chunkMYWNJP55cjs.createWorkflowInspectorAdapter.call(void 0, );
749
+ workflowInspector = _chunkX567WA3Ncjs.createWorkflowInspectorAdapter.call(void 0, );
750
750
  workflowInspectors.set(actorId, workflowInspector);
751
751
  }
752
752
  return workflowInspector;
753
753
  }
754
754
  async function run(runCtx) {
755
- const actor = runCtx[_chunkHDVZ6YZGcjs.ACTOR_CONTEXT_INTERNAL_SYMBOL];
755
+ const actor = runCtx[_chunkSSF2XC33cjs.ACTOR_CONTEXT_INTERNAL_SYMBOL];
756
756
  _invariant2.default.call(void 0, actor, "workflow() requires an actor instance");
757
757
  const workflowInspector = getWorkflowInspector(actor.id);
758
758
  const driver = new ActorWorkflowDriver(actor, runCtx);
@@ -819,19 +819,19 @@ function workflow(fn, options = {}) {
819
819
  if (shouldRethrowWorkflowError(error)) {
820
820
  runCtx.log.error({
821
821
  msg: "workflow run failed",
822
- error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
822
+ error: _chunk6UDO6UYMcjs.stringifyError.call(void 0, error)
823
823
  });
824
824
  throw error;
825
825
  }
826
826
  runCtx.log.warn({
827
827
  msg: "workflow failed and will sleep until woken",
828
- error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
828
+ error: _chunk6UDO6UYMcjs.stringifyError.call(void 0, error)
829
829
  });
830
830
  } finally {
831
831
  runCtx.abortSignal.removeEventListener("abort", onAbort);
832
832
  }
833
833
  }
834
- return _chunkHDVZ6YZGcjs.defineRunHandler.call(void 0, run, {
834
+ return _chunkSSF2XC33cjs.defineRunHandler.call(void 0, run, {
835
835
  icon: "diagram-project",
836
836
  inspectorKind: "workflow",
837
837
  createInspector: ({ actorId, control }) => {
@@ -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-DK144OAw.cjs';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-RMLak20L.cjs';
4
4
  import { A as AnyDatabaseProvider } from '../config-BfG1qpYz.cjs';
5
- import { d as WorkflowContext } from '../context-Cvnf3BRe.cjs';
6
- export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-Cvnf3BRe.cjs';
5
+ import { d as WorkflowContext } from '../context-CxNE2KvK.cjs';
6
+ export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-CxNE2KvK.cjs';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -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-B4erdavw.js';
3
+ import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-CASGH-5t.js';
4
4
  import { A as AnyDatabaseProvider } from '../config-BfG1qpYz.js';
5
- import { d as WorkflowContext } from '../context-Oxi6YWcG.js';
6
- export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-Oxi6YWcG.js';
5
+ import { d as WorkflowContext } from '../context-C1tMYvV-.js';
6
+ export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-C1tMYvV-.js';
7
7
  import 'zod/v4';
8
8
  import '@rivetkit/rivetkit-wasm';
9
9
  import 'zod';
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  createWorkflowInspectorAdapter
3
- } from "../chunk-QFZY2CK3.js";
4
- import "../chunk-ZMVYZ7ZI.js";
5
- import "../chunk-2HWY7FZU.js";
3
+ } from "../chunk-SEKTNJU6.js";
4
+ import "../chunk-TTMWSZZA.js";
5
+ import "../chunk-T7DJZSPH.js";
6
6
  import {
7
7
  ACTOR_CONTEXT_INTERNAL_SYMBOL,
8
8
  defineRunHandler
9
- } from "../chunk-6FEYCVZC.js";
9
+ } from "../chunk-UXDASKP6.js";
10
10
  import {
11
11
  makeWorkflowKey,
12
12
  workflowStoragePrefix
13
13
  } from "../chunk-A2CF6PFH.js";
14
14
  import {
15
15
  stringifyError
16
- } from "../chunk-HQHTTJW5.js";
16
+ } from "../chunk-DU7V4SDK.js";
17
17
  import {
18
18
  RivetError,
19
19
  isActorAbortedError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivetkit",
3
- "version": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
3
+ "version": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
4
4
  "description": "Lightweight libraries for building stateful actors on edge platforms",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -211,15 +211,15 @@
211
211
  "@hono/zod-openapi": "^1.1.5",
212
212
  "@opentelemetry/api": "^1.1.0",
213
213
  "@rivetkit/bare-ts": "^0.6.2",
214
- "@rivetkit/engine-api-full": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
215
- "@rivetkit/engine-cli": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
216
- "@rivetkit/engine-envoy-protocol": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
214
+ "@rivetkit/engine-api-full": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
215
+ "@rivetkit/engine-cli": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
216
+ "@rivetkit/engine-envoy-protocol": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
217
217
  "@rivetkit/on-change": "6.0.1",
218
- "@rivetkit/rivetkit-napi": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
219
- "@rivetkit/rivetkit-wasm": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
220
- "@rivetkit/traces": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
221
- "@rivetkit/virtual-websocket": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
222
- "@rivetkit/workflow-engine": "0.0.0-sqlite-sync-3-0-1-release.95f6e2d",
218
+ "@rivetkit/rivetkit-napi": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
219
+ "@rivetkit/rivetkit-wasm": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
220
+ "@rivetkit/traces": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
221
+ "@rivetkit/virtual-websocket": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
222
+ "@rivetkit/workflow-engine": "0.0.0-sqlite-sync-3-0-1-final.5663d2f",
223
223
  "cbor-x": "^1.6.0",
224
224
  "drizzle-orm": "0.45.2",
225
225
  "hono": "^4.7.0",
@@ -248,6 +248,9 @@
248
248
  "vitest": "^3.1.1",
249
249
  "ws": "^8.18.1"
250
250
  },
251
+ "optionalDependencies": {
252
+ "@rivet-dev/services": "^0.2.5"
253
+ },
251
254
  "peerDependencies": {
252
255
  "drizzle-kit": "^0.31.2",
253
256
  "eventsource": "^4.0.0",
@@ -514,6 +514,8 @@ export type ActionContext<
514
514
  TEvents,
515
515
  TQueues
516
516
  > & {
517
+ /** Present only when a durable schedule or cron invokes this action. */
518
+ readonly scheduledFire?: ScheduledFireInfo;
517
519
  conn: Conn<
518
520
  TState,
519
521
  TConnParams,
@@ -200,8 +200,16 @@ export class ActorHandleRaw {
200
200
  },
201
201
  }).send(name, body, options as any);
202
202
  } catch (err) {
203
- const { group, code, message, metadata, rayId, actor } =
204
- deconstructError(err, true);
203
+ const {
204
+ group,
205
+ code,
206
+ message,
207
+ metadata,
208
+ rayId,
209
+ actor,
210
+ public: isPublic,
211
+ statusCode,
212
+ } = deconstructError(err, true);
205
213
 
206
214
  if (
207
215
  this.#shouldRetryQueueDispatchOverload(
@@ -272,6 +280,8 @@ export class ActorHandleRaw {
272
280
  }
273
281
 
274
282
  throw new ActorError(group, code, message, {
283
+ public: isPublic,
284
+ statusCode,
275
285
  metadata,
276
286
  rayId,
277
287
  actor,
@@ -434,8 +444,16 @@ export class ActorHandleRaw {
434
444
  }
435
445
  return output;
436
446
  } catch (err) {
437
- const { group, code, message, metadata, rayId, actor } =
438
- deconstructError(err, true);
447
+ const {
448
+ group,
449
+ code,
450
+ message,
451
+ metadata,
452
+ rayId,
453
+ actor,
454
+ public: isPublic,
455
+ statusCode,
456
+ } = deconstructError(err, true);
439
457
 
440
458
  if (
441
459
  await this.#shouldRetrySchedulingError(
@@ -476,7 +494,13 @@ export class ActorHandleRaw {
476
494
  "actor",
477
495
  "not_found",
478
496
  "The actor does not exist or was destroyed.",
479
- { metadata, rayId, actor },
497
+ {
498
+ public: true,
499
+ statusCode: 404,
500
+ metadata,
501
+ rayId,
502
+ actor,
503
+ },
480
504
  );
481
505
  }
482
506
 
@@ -498,6 +522,8 @@ export class ActorHandleRaw {
498
522
  }
499
523
 
500
524
  throw new ActorError(group, code, message, {
525
+ public: isPublic,
526
+ statusCode,
501
527
  metadata,
502
528
  rayId,
503
529
  actor,
@@ -779,8 +805,16 @@ export class ActorHandleRaw {
779
805
  }
780
806
  return response;
781
807
  } catch (err) {
782
- const { group, code, message, metadata, rayId, actor } =
783
- deconstructError(err, true);
808
+ const {
809
+ group,
810
+ code,
811
+ message,
812
+ metadata,
813
+ rayId,
814
+ actor,
815
+ public: isPublic,
816
+ statusCode,
817
+ } = deconstructError(err, true);
784
818
 
785
819
  if (
786
820
  await this.#shouldRetrySchedulingError(
@@ -828,6 +862,8 @@ export class ActorHandleRaw {
828
862
  }
829
863
 
830
864
  throw new ActorError(group, code, message, {
865
+ public: isPublic,
866
+ statusCode,
831
867
  metadata,
832
868
  rayId,
833
869
  actor,
@@ -129,9 +129,23 @@ export async function rawHttpFetch(
129
129
  return driver.sendRequest(target, proxyRequest, options);
130
130
  } catch (err) {
131
131
  // Standardize to ClientActorError instead of the native backend error
132
- const { group, code, message, metadata, rayId, actor } =
133
- deconstructError(err, true);
134
- throw new ActorError(group, code, message, { metadata, rayId, actor });
132
+ const {
133
+ group,
134
+ code,
135
+ message,
136
+ metadata,
137
+ rayId,
138
+ actor,
139
+ public: isPublic,
140
+ statusCode,
141
+ } = deconstructError(err, true);
142
+ throw new ActorError(group, code, message, {
143
+ public: isPublic,
144
+ statusCode,
145
+ metadata,
146
+ rayId,
147
+ actor,
148
+ });
135
149
  }
136
150
  }
137
151
 
@@ -169,6 +169,10 @@ export async function sendHttpRequest<
169
169
  }),
170
170
  );
171
171
  } catch (error) {
172
+ // Credential providers and custom transports can already supply a structured error.
173
+ if (ActorError.isRivetError(error)) {
174
+ throw error;
175
+ }
172
176
  throw new HttpRequestError(`Request failed: ${error}`, {
173
177
  cause: error,
174
178
  });
@@ -251,8 +251,8 @@ export const RegistryConfigSchema = z
251
251
  .default(() => getRivetRunEngineVersion() ?? VERSION),
252
252
  /**
253
253
  * Starts the first-party Services actor host when RivetKit manages
254
- * a local engine. Disabled by default. Set RIVET_RUN_SERVICES=1
255
- * or startServices: true to enable it.
254
+ * a local engine. Enabled by default for a managed local Engine. Set
255
+ * RIVET_RUN_SERVICES=0 or startServices: false to disable it.
256
256
  */
257
257
  startServices: z.boolean().optional(),
258
258
  /**
@@ -369,7 +369,9 @@ export const RegistryConfigSchema = z
369
369
  ? localEngineEndpoint
370
370
  : (parsedEndpoint?.endpoint ??
371
371
  (isDevEnv ? localEngineEndpoint : undefined));
372
- const startServices = config.startServices ?? getRivetRunServices();
372
+ const engineSpawn = !parsedEndpoint && Boolean(endpoint);
373
+ const startServices =
374
+ config.startServices ?? getRivetRunServices() ?? engineSpawn;
373
375
  const validateServerlessEndpoint = Boolean(
374
376
  config.startEngine || parsedEndpoint,
375
377
  );
@@ -419,7 +421,7 @@ export const RegistryConfigSchema = z
419
421
  ...config,
420
422
  sqlite,
421
423
  endpoint,
422
- engineSpawn: !parsedEndpoint && Boolean(endpoint),
424
+ engineSpawn,
423
425
  startServices,
424
426
  namespace,
425
427
  token,
@@ -656,7 +658,7 @@ export const DocRegistryConfigSchema = z
656
658
  .boolean()
657
659
  .optional()
658
660
  .describe(
659
- "Starts Services when RivetKit manages a local Engine. Disabled by default. Set RIVET_RUN_SERVICES=1 or startServices: true to enable.",
661
+ "Starts Services when RivetKit manages a local Engine. Enabled by default for a managed local Engine. Set RIVET_RUN_SERVICES=0 or startServices: false to disable.",
660
662
  ),
661
663
  configurePool: DocConfigurePoolSchema.describe(
662
664
  "Automatically configure serverless nodes in the engine.",
@@ -5552,6 +5552,11 @@ export function buildNativeFactory(
5552
5552
  conn != null
5553
5553
  ? makeConnCtx(ctx, conn, undefined, cancelToken)
5554
5554
  : makeActorCtx(ctx, undefined, cancelToken);
5555
+ if (scheduledFire) {
5556
+ Object.defineProperty(actorCtx, "scheduledFire", {
5557
+ value: scheduledFire,
5558
+ });
5559
+ }
5555
5560
  const runAction = async () => {
5556
5561
  try {
5557
5562
  return encodeValue(
@@ -5720,7 +5725,7 @@ export function buildNativeFactory(
5720
5725
 
5721
5726
  export async function buildServeConfig(
5722
5727
  config: RegistryConfig,
5723
- resolveServicesBinary = true,
5728
+ resolveNativeBinaries = true,
5724
5729
  ): Promise<RuntimeServeConfig> {
5725
5730
  if (!config.endpoint) {
5726
5731
  throw nativeEndpointNotConfiguredError();
@@ -5733,7 +5738,7 @@ export async function buildServeConfig(
5733
5738
  token: config.token,
5734
5739
  namespace: config.namespace,
5735
5740
  poolName: config.node.poolName,
5736
- startServices: resolveServicesBinary && config.startServices,
5741
+ startServices: resolveNativeBinaries && config.startServices,
5737
5742
  handleInspectorHttpInRuntime: true,
5738
5743
  serverlessBasePath: config.serverless.basePath,
5739
5744
  serverlessPackageVersion: VERSION,
@@ -5744,28 +5749,30 @@ export async function buildServeConfig(
5744
5749
  serverlessMaxStartPayloadBytes: config.serverless.maxStartPayloadBytes,
5745
5750
  };
5746
5751
 
5747
- // Always best-effort resolve the npm-installed engine binary and hand its
5748
- // path to the core. The core alone decides whether to actually spawn a local
5752
+ // For native runtimes, best-effort resolve the npm-installed engine binary
5753
+ // and hand its path to the core. The core decides whether to spawn a local
5749
5754
  // engine using the resolved spawn decision, so
5750
5755
  // JS must not duplicate that decision here. Only JS knows the npm
5751
5756
  // `node_modules` layout, so it resolves the path; if no binary is available
5752
5757
  // (remote-only install, unsupported platform, optional deps skipped), leave
5753
5758
  // it unset and let the core report `engine.binary_unavailable` if it actually
5754
5759
  // needs one.
5755
- try {
5756
- const { getEnginePath } = await loadEngineCli();
5757
- serveConfig.engineBinaryPath = getEnginePath();
5758
- } catch (error) {
5759
- // The npm-installed engine binary could not be resolved. The core still
5760
- // decides whether it needs to spawn a local engine; if it does, it will
5761
- // fail with engine.binary_unavailable (auto-download is off in the napi
5762
- // runtime). Warn so the cause is actionable.
5763
- logger().warn({
5764
- msg: "could not resolve a local engine binary; if a local engine must be spawned it will fail with engine.binary_unavailable — set RIVET_ENGINE_BINARY_PATH or install the @rivetkit/engine-cli platform package",
5765
- error: stringifyError(error),
5766
- });
5760
+ if (resolveNativeBinaries) {
5761
+ try {
5762
+ const { getEnginePath } = await loadEngineCli();
5763
+ serveConfig.engineBinaryPath = getEnginePath();
5764
+ } catch (error) {
5765
+ // The npm-installed engine binary could not be resolved. The core still
5766
+ // decides whether it needs to spawn a local engine; if it does, it will
5767
+ // fail with engine.binary_unavailable (auto-download is off in the napi
5768
+ // runtime). Warn so the cause is actionable.
5769
+ logger().warn({
5770
+ msg: "could not resolve a local engine binary; if a local engine must be spawned it will fail with engine.binary_unavailable — set RIVET_ENGINE_BINARY_PATH or install the @rivetkit/engine-cli platform package",
5771
+ error: stringifyError(error),
5772
+ });
5773
+ }
5767
5774
  }
5768
- if (resolveServicesBinary && config.startServices) {
5775
+ if (resolveNativeBinaries && config.startServices) {
5769
5776
  const servicesBinary = getEnvUniversal("RIVET_SERVICES_BINARY");
5770
5777
  if (servicesBinary) {
5771
5778
  serveConfig.servicesBinaryPath = servicesBinary;
@@ -937,7 +937,7 @@ export interface RuntimeBundle {
937
937
 
938
938
  export function servicesBinaryUnavailable(cause: unknown): Error {
939
939
  return new Error(
940
- "services.binary_unavailable: Install @rivet-dev/services yourself to run local Services, or set RIVET_SERVICES_BINARY to its executable path.",
940
+ "services.binary_unavailable: Install @rivet-dev/services to run local Services, set RIVET_SERVICES_BINARY to its executable path, or set RIVET_RUN_SERVICES=0 to disable Services.",
941
941
  { cause },
942
942
  );
943
943
  }
@@ -30,8 +30,10 @@ export const getRivetRunEnginePort = (): number | undefined => {
30
30
  };
31
31
  export const getRivetRunEngineVersion = (): string | undefined =>
32
32
  getEnvUniversal("RIVET_RUN_ENGINE_VERSION");
33
- export const getRivetRunServices = (): boolean =>
34
- getEnvUniversal("RIVET_RUN_SERVICES") === "1";
33
+ export const getRivetRunServices = (): boolean | undefined => {
34
+ const value = getEnvUniversal("RIVET_RUN_SERVICES");
35
+ return value === undefined ? undefined : value === "1";
36
+ };
35
37
  export const getRivetEnvoyKind = (): string | undefined =>
36
38
  getEnvUniversal("RIVET_NODE_KIND") ?? getEnvUniversal("RIVET_ENVOY_KIND");
37
39
  export const getRivetEnvoyVersion = (): number | undefined => {