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.
- package/dist/browser/client.d.ts +9 -0
- package/dist/browser/client.js +67 -7
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +4 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-62WFU3BQ.js → chunk-3ZKCK6NL.js} +69 -12
- package/dist/tsup/chunk-3ZKCK6NL.js.map +1 -0
- package/dist/tsup/{chunk-AQWZWR2P.cjs → chunk-6UDO6UYM.cjs} +9 -3
- package/dist/tsup/chunk-6UDO6UYM.cjs.map +1 -0
- package/dist/tsup/{chunk-VKXEBB3Z.cjs → chunk-C2NON6V4.cjs} +7 -7
- package/dist/tsup/{chunk-VKXEBB3Z.cjs.map → chunk-C2NON6V4.cjs.map} +1 -1
- package/dist/tsup/{chunk-E6HKVCPA.cjs → chunk-DGU2H5IJ.cjs} +3 -3
- package/dist/tsup/{chunk-E6HKVCPA.cjs.map → chunk-DGU2H5IJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-HQHTTJW5.js → chunk-DU7V4SDK.js} +9 -3
- package/dist/tsup/chunk-DU7V4SDK.js.map +1 -0
- package/dist/tsup/{chunk-M5SQGPRJ.cjs → chunk-EKERHPCE.cjs} +4 -4
- package/dist/tsup/{chunk-M5SQGPRJ.cjs.map → chunk-EKERHPCE.cjs.map} +1 -1
- package/dist/tsup/{chunk-E4KDQJCR.cjs → chunk-G26OT2Q6.cjs} +3 -3
- package/dist/tsup/{chunk-E4KDQJCR.cjs.map → chunk-G26OT2Q6.cjs.map} +1 -1
- package/dist/tsup/{chunk-QE5MTZHB.js → chunk-GAFMEUAL.js} +3 -3
- package/dist/tsup/{chunk-QIIIRYN7.js → chunk-MT4SROQM.js} +2 -2
- package/dist/tsup/{chunk-QFZY2CK3.js → chunk-SEKTNJU6.js} +4 -4
- package/dist/tsup/{chunk-HDVZ6YZG.cjs → chunk-SSF2XC33.cjs} +1 -1
- package/dist/tsup/chunk-SSF2XC33.cjs.map +1 -0
- package/dist/tsup/{chunk-2HWY7FZU.js → chunk-T7DJZSPH.js} +2 -2
- package/dist/tsup/{chunk-ZMVYZ7ZI.js → chunk-TTMWSZZA.js} +2 -2
- package/dist/tsup/{chunk-6FEYCVZC.js → chunk-UXDASKP6.js} +1 -1
- package/dist/tsup/chunk-UXDASKP6.js.map +1 -0
- package/dist/tsup/{chunk-MYWNJP55.cjs → chunk-X567WA3N.cjs} +10 -10
- package/dist/tsup/{chunk-MYWNJP55.cjs.map → chunk-X567WA3N.cjs.map} +1 -1
- package/dist/tsup/{chunk-UHMB5FFB.cjs → chunk-XLD6TRSE.cjs} +3 -3
- package/dist/tsup/{chunk-UHMB5FFB.cjs.map → chunk-XLD6TRSE.cjs.map} +1 -1
- package/dist/tsup/{chunk-EQBUH25O.cjs → chunk-YJ2X5STT.cjs} +203 -146
- package/dist/tsup/chunk-YJ2X5STT.cjs.map +1 -0
- package/dist/tsup/{chunk-OWZ76NSH.js → chunk-YNAEH775.js} +2 -2
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-B4erdavw.d.ts → config-CASGH-5t.d.ts} +2 -0
- package/dist/tsup/{config-DK144OAw.d.cts → config-RMLak20L.d.cts} +2 -0
- package/dist/tsup/{context-Oxi6YWcG.d.ts → context-C1tMYvV-.d.ts} +1 -1
- package/dist/tsup/{context-Cvnf3BRe.d.cts → context-CxNE2KvK.d.cts} +1 -1
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.cjs +2 -2
- package/dist/tsup/dynamic/mod.d.cts +1 -1
- package/dist/tsup/dynamic/mod.d.ts +1 -1
- package/dist/tsup/dynamic/mod.js +1 -1
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/inspector-tab/mod.cjs +2 -2
- package/dist/tsup/inspector-tab/mod.d.cts +2 -2
- package/dist/tsup/inspector-tab/mod.d.ts +2 -2
- package/dist/tsup/inspector-tab/mod.js +1 -1
- package/dist/tsup/mod.cjs +132 -124
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +3 -3
- package/dist/tsup/mod.d.ts +3 -3
- package/dist/tsup/mod.js +31 -23
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +10 -10
- package/dist/tsup/workflow/mod.d.cts +3 -3
- package/dist/tsup/workflow/mod.d.ts +3 -3
- package/dist/tsup/workflow/mod.js +5 -5
- package/package.json +12 -9
- package/src/actor/config.ts +2 -0
- package/src/client/actor-handle.ts +43 -7
- package/src/client/raw-utils.ts +17 -3
- package/src/client/utils.ts +4 -0
- package/src/registry/config/index.ts +7 -5
- package/src/registry/native.ts +24 -17
- package/src/registry/runtime.ts +1 -1
- package/src/utils/env-vars.ts +4 -2
- package/dist/tsup/chunk-62WFU3BQ.js.map +0 -1
- package/dist/tsup/chunk-6FEYCVZC.js.map +0 -1
- package/dist/tsup/chunk-AQWZWR2P.cjs.map +0 -1
- package/dist/tsup/chunk-EQBUH25O.cjs.map +0 -1
- package/dist/tsup/chunk-HDVZ6YZG.cjs.map +0 -1
- package/dist/tsup/chunk-HQHTTJW5.js.map +0 -1
- /package/dist/tsup/{chunk-QE5MTZHB.js.map → chunk-GAFMEUAL.js.map} +0 -0
- /package/dist/tsup/{chunk-QIIIRYN7.js.map → chunk-MT4SROQM.js.map} +0 -0
- /package/dist/tsup/{chunk-QFZY2CK3.js.map → chunk-SEKTNJU6.js.map} +0 -0
- /package/dist/tsup/{chunk-2HWY7FZU.js.map → chunk-T7DJZSPH.js.map} +0 -0
- /package/dist/tsup/{chunk-ZMVYZ7ZI.js.map → chunk-TTMWSZZA.js.map} +0 -0
- /package/dist/tsup/{chunk-OWZ76NSH.js.map → chunk-YNAEH775.js.map} +0 -0
package/dist/tsup/test/mod.cjs
CHANGED
|
@@ -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
|
|
3
|
+
var _chunkC2NON6V4cjs = require('../chunk-C2NON6V4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
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-
|
|
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 =
|
|
40
|
-
...
|
|
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 () => {
|
package/dist/tsup/test/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TestContext } from 'vitest';
|
|
2
|
-
import { aI as Registry, a6 as Client } from '../config-
|
|
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';
|
package/dist/tsup/test/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TestContext } from 'vitest';
|
|
2
|
-
import { aI as Registry, a6 as Client } from '../config-
|
|
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';
|
package/dist/tsup/test/mod.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-GAFMEUAL.js";
|
|
4
4
|
import {
|
|
5
5
|
convertRegistryConfigToClientConfig
|
|
6
|
-
} from "../chunk-
|
|
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-
|
|
10
|
-
import "../chunk-HQHTTJW5.js";
|
|
10
|
+
import "../chunk-DU7V4SDK.js";
|
|
11
11
|
import "../chunk-ZOVJDAOW.js";
|
|
12
12
|
|
|
13
13
|
// src/test/ready.ts
|
package/dist/tsup/utils.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
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 =
|
|
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
|
package/dist/tsup/utils.js
CHANGED
|
@@ -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
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
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
|
|
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
|
|
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 =
|
|
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[
|
|
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:
|
|
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:
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
215
|
-
"@rivetkit/engine-cli": "0.0.0-sqlite-sync-3-0-1-
|
|
216
|
-
"@rivetkit/engine-envoy-protocol": "0.0.0-sqlite-sync-3-0-1-
|
|
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-
|
|
219
|
-
"@rivetkit/rivetkit-wasm": "0.0.0-sqlite-sync-3-0-1-
|
|
220
|
-
"@rivetkit/traces": "0.0.0-sqlite-sync-3-0-1-
|
|
221
|
-
"@rivetkit/virtual-websocket": "0.0.0-sqlite-sync-3-0-1-
|
|
222
|
-
"@rivetkit/workflow-engine": "0.0.0-sqlite-sync-3-0-1-
|
|
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",
|
package/src/actor/config.ts
CHANGED
|
@@ -200,8 +200,16 @@ export class ActorHandleRaw {
|
|
|
200
200
|
},
|
|
201
201
|
}).send(name, body, options as any);
|
|
202
202
|
} catch (err) {
|
|
203
|
-
const {
|
|
204
|
-
|
|
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 {
|
|
438
|
-
|
|
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
|
-
{
|
|
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 {
|
|
783
|
-
|
|
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,
|
package/src/client/raw-utils.ts
CHANGED
|
@@ -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 {
|
|
133
|
-
|
|
134
|
-
|
|
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
|
|
package/src/client/utils.ts
CHANGED
|
@@ -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.
|
|
255
|
-
* or startServices:
|
|
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
|
|
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
|
|
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.
|
|
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.",
|
package/src/registry/native.ts
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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
|
-
//
|
|
5748
|
-
// path to the core. The core
|
|
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
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
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 (
|
|
5775
|
+
if (resolveNativeBinaries && config.startServices) {
|
|
5769
5776
|
const servicesBinary = getEnvUniversal("RIVET_SERVICES_BINARY");
|
|
5770
5777
|
if (servicesBinary) {
|
|
5771
5778
|
serveConfig.servicesBinaryPath = servicesBinary;
|
package/src/registry/runtime.ts
CHANGED
|
@@ -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
|
|
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
|
}
|
package/src/utils/env-vars.ts
CHANGED
|
@@ -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")
|
|
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 => {
|