rivetkit 2.3.0-rc.13 → 2.3.0-rc.15
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.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/agent-os/index.cjs +1 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.js +1 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-BSPS6NSN.cjs → chunk-3XH56YLI.cjs} +5 -5
- package/dist/tsup/{chunk-BSPS6NSN.cjs.map → chunk-3XH56YLI.cjs.map} +1 -1
- package/dist/tsup/{chunk-ISDKSSYR.cjs → chunk-3ZLK5QPM.cjs} +4 -4
- package/dist/tsup/{chunk-ISDKSSYR.cjs.map → chunk-3ZLK5QPM.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZI5CNA2Z.js → chunk-4DU63P3H.js} +2 -2
- package/dist/tsup/{chunk-33YE6XCI.js → chunk-6DWQ4GIW.js} +4 -4
- package/dist/tsup/{chunk-KWABEUUA.cjs → chunk-FYLD6HMH.cjs} +7 -7
- package/dist/tsup/{chunk-KWABEUUA.cjs.map → chunk-FYLD6HMH.cjs.map} +1 -1
- package/dist/tsup/{chunk-E5CLYAUZ.cjs → chunk-HMYIDZL2.cjs} +141 -141
- package/dist/tsup/{chunk-E5CLYAUZ.cjs.map → chunk-HMYIDZL2.cjs.map} +1 -1
- package/dist/tsup/{chunk-EBWOJRCC.cjs → chunk-HW5L2LUK.cjs} +2 -2
- package/dist/tsup/{chunk-EBWOJRCC.cjs.map → chunk-HW5L2LUK.cjs.map} +1 -1
- package/dist/tsup/{chunk-7OR3CHD5.cjs → chunk-HYNXIWBZ.cjs} +10 -10
- package/dist/tsup/{chunk-7OR3CHD5.cjs.map → chunk-HYNXIWBZ.cjs.map} +1 -1
- package/dist/tsup/{chunk-T44AVAGW.js → chunk-MVW3IQKA.js} +2 -2
- package/dist/tsup/{chunk-HHNYEQD3.js → chunk-RR3TYP75.js} +3 -3
- package/dist/tsup/{chunk-7XQCARVY.cjs → chunk-TINIJ6FD.cjs} +3 -3
- package/dist/tsup/{chunk-7XQCARVY.cjs.map → chunk-TINIJ6FD.cjs.map} +1 -1
- package/dist/tsup/{chunk-TCXEM6PA.js → chunk-UFMCFSDS.js} +2 -2
- package/dist/tsup/{chunk-J72WHUBC.js → chunk-W2IEVMNI.js} +7 -7
- package/dist/tsup/{chunk-IOUSQVXI.js → chunk-Y2BCRVFQ.js} +2 -2
- package/dist/tsup/{chunk-IOUSQVXI.js.map → chunk-Y2BCRVFQ.js.map} +1 -1
- package/dist/tsup/client/mod.cjs +7 -7
- package/dist/tsup/client/mod.cjs.map +1 -1
- package/dist/tsup/client/mod.js +6 -6
- 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/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/mod.cjs +70 -65
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +14 -9
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +10 -10
- package/dist/tsup/test/mod.js +6 -6
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +7 -7
- package/dist/tsup/workflow/mod.js +4 -4
- package/package.json +8 -8
- package/src/registry/native.ts +20 -3
- package/src/registry/runtime.ts +19 -3
- /package/dist/tsup/{chunk-ZI5CNA2Z.js.map → chunk-4DU63P3H.js.map} +0 -0
- /package/dist/tsup/{chunk-33YE6XCI.js.map → chunk-6DWQ4GIW.js.map} +0 -0
- /package/dist/tsup/{chunk-T44AVAGW.js.map → chunk-MVW3IQKA.js.map} +0 -0
- /package/dist/tsup/{chunk-HHNYEQD3.js.map → chunk-RR3TYP75.js.map} +0 -0
- /package/dist/tsup/{chunk-TCXEM6PA.js.map → chunk-UFMCFSDS.js.map} +0 -0
- /package/dist/tsup/{chunk-J72WHUBC.js.map → chunk-W2IEVMNI.js.map} +0 -0
package/dist/tsup/test/mod.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFYLD6HMHcjs = require('../chunk-FYLD6HMH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkHMYIDZL2cjs = require('../chunk-HMYIDZL2.cjs');
|
|
8
8
|
require('../chunk-VE2X4KMG.cjs');
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-7XQCARVY.cjs');
|
|
11
|
-
require('../chunk-EBWOJRCC.cjs');
|
|
12
|
-
require('../chunk-KORQB2IR.cjs');
|
|
9
|
+
require('../chunk-3XH56YLI.cjs');
|
|
13
10
|
require('../chunk-ZA7FLHKH.cjs');
|
|
11
|
+
require('../chunk-TINIJ6FD.cjs');
|
|
12
|
+
require('../chunk-HW5L2LUK.cjs');
|
|
13
|
+
require('../chunk-KORQB2IR.cjs');
|
|
14
14
|
|
|
15
15
|
// src/test/mod.ts
|
|
16
16
|
var _pretry = require('p-retry'); var _pretry2 = _interopRequireDefault(_pretry);
|
|
17
17
|
async function waitForRegistryReady(registry) {
|
|
18
|
-
const clientConfig =
|
|
18
|
+
const clientConfig = _chunkHMYIDZL2cjs.convertRegistryConfigToClientConfig.call(void 0,
|
|
19
19
|
registry.parseConfig()
|
|
20
20
|
);
|
|
21
21
|
await _pretry2.default.call(void 0,
|
|
22
22
|
async () => {
|
|
23
|
-
await
|
|
23
|
+
await _chunkHMYIDZL2cjs.getMetadata.call(void 0, clientConfig);
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
retries: 20,
|
|
@@ -34,8 +34,8 @@ async function setupTest(c, registry) {
|
|
|
34
34
|
registry.config.noWelcome = true;
|
|
35
35
|
registry.start();
|
|
36
36
|
await waitForRegistryReady(registry);
|
|
37
|
-
const client =
|
|
38
|
-
...
|
|
37
|
+
const client = _chunkFYLD6HMHcjs.createClient.call(void 0, {
|
|
38
|
+
..._chunkHMYIDZL2cjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
|
|
39
39
|
disableMetadataLookup: false
|
|
40
40
|
});
|
|
41
41
|
c.onTestFinished(async () => {
|
package/dist/tsup/test/mod.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RR3TYP75.js";
|
|
4
4
|
import {
|
|
5
5
|
convertRegistryConfigToClientConfig,
|
|
6
6
|
getMetadata
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-W2IEVMNI.js";
|
|
8
8
|
import "../chunk-HXUEHHJF.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-T44AVAGW.js";
|
|
11
|
-
import "../chunk-IOUSQVXI.js";
|
|
12
|
-
import "../chunk-BRP62GZC.js";
|
|
9
|
+
import "../chunk-4DU63P3H.js";
|
|
13
10
|
import "../chunk-JZ7TWV65.js";
|
|
11
|
+
import "../chunk-MVW3IQKA.js";
|
|
12
|
+
import "../chunk-Y2BCRVFQ.js";
|
|
13
|
+
import "../chunk-BRP62GZC.js";
|
|
14
14
|
|
|
15
15
|
// src/test/mod.ts
|
|
16
16
|
import pRetry from "p-retry";
|
package/dist/tsup/utils.cjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkHW5L2LUKcjs = require('./chunk-HW5L2LUK.cjs');
|
|
21
21
|
require('./chunk-KORQB2IR.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
@@ -38,5 +38,5 @@ require('./chunk-KORQB2IR.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
exports.EXTRA_ERROR_LOG =
|
|
41
|
+
exports.EXTRA_ERROR_LOG = _chunkHW5L2LUKcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkHW5L2LUKcjs.SinglePromiseQueue; exports.VERSION = _chunkHW5L2LUKcjs.VERSION; exports.arrayBuffersEqual = _chunkHW5L2LUKcjs.arrayBuffersEqual; exports.assertUnreachable = _chunkHW5L2LUKcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkHW5L2LUKcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkHW5L2LUKcjs.combineUrlPath; exports.dbg = _chunkHW5L2LUKcjs.dbg; exports.detectRuntime = _chunkHW5L2LUKcjs.detectRuntime; exports.getEnvUniversal = _chunkHW5L2LUKcjs.getEnvUniversal; exports.httpUserAgent = _chunkHW5L2LUKcjs.httpUserAgent; exports.interval = _chunkHW5L2LUKcjs.interval; exports.joinSignals = _chunkHW5L2LUKcjs.joinSignals; exports.promiseWithResolvers = _chunkHW5L2LUKcjs.promiseWithResolvers; exports.setLongTimeout = _chunkHW5L2LUKcjs.setLongTimeout; exports.sleep = _chunkHW5L2LUKcjs.sleep; exports.stringifyError = _chunkHW5L2LUKcjs.stringifyError; exports.toUint8Array = _chunkHW5L2LUKcjs.toUint8Array;
|
|
42
42
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/tsup/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class; var _class2;
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkHYNXIWBZcjs = require('../chunk-HYNXIWBZ.cjs');
|
|
4
|
+
require('../chunk-3ZLK5QPM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,10 +11,10 @@ var _chunkNIY3RSPXcjs = require('../chunk-NIY3RSPX.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkVE2X4KMGcjs = require('../chunk-VE2X4KMG.cjs');
|
|
14
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-3XH56YLI.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkHW5L2LUKcjs = require('../chunk-HW5L2LUK.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkKORQB2IRcjs = require('../chunk-KORQB2IR.cjs');
|
|
@@ -639,7 +639,7 @@ function workflow(fn, options = {}) {
|
|
|
639
639
|
function getWorkflowInspector(actorId) {
|
|
640
640
|
let workflowInspector = workflowInspectors.get(actorId);
|
|
641
641
|
if (!workflowInspector) {
|
|
642
|
-
workflowInspector =
|
|
642
|
+
workflowInspector = _chunkHYNXIWBZcjs.createWorkflowInspectorAdapter.call(void 0, );
|
|
643
643
|
workflowInspectors.set(actorId, workflowInspector);
|
|
644
644
|
}
|
|
645
645
|
return workflowInspector;
|
|
@@ -705,13 +705,13 @@ function workflow(fn, options = {}) {
|
|
|
705
705
|
if (shouldRethrowWorkflowError(error)) {
|
|
706
706
|
runCtx.log.error({
|
|
707
707
|
msg: "workflow run failed",
|
|
708
|
-
error:
|
|
708
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
709
709
|
});
|
|
710
710
|
throw error;
|
|
711
711
|
}
|
|
712
712
|
runCtx.log.warn({
|
|
713
713
|
msg: "workflow failed and will sleep until woken",
|
|
714
|
-
error:
|
|
714
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
715
715
|
});
|
|
716
716
|
} finally {
|
|
717
717
|
runCtx.abortSignal.removeEventListener("abort", onAbort);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkflowInspectorAdapter
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-6DWQ4GIW.js";
|
|
4
|
+
import "../chunk-UFMCFSDS.js";
|
|
5
5
|
import {
|
|
6
6
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
7
7
|
RAW_STATE_SYMBOL,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
makeWorkflowKey,
|
|
12
12
|
workflowStoragePrefix
|
|
13
13
|
} from "../chunk-HXUEHHJF.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-4DU63P3H.js";
|
|
15
15
|
import {
|
|
16
16
|
stringifyError
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-Y2BCRVFQ.js";
|
|
18
18
|
import {
|
|
19
19
|
RivetError
|
|
20
20
|
} from "../chunk-BRP62GZC.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rivetkit",
|
|
3
|
-
"version": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.15",
|
|
4
4
|
"description": "Lightweight libraries for building stateful actors on edge platforms",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -193,14 +193,14 @@
|
|
|
193
193
|
"@hono/zod-openapi": "^1.1.5",
|
|
194
194
|
"@rivet-dev/agent-os-core": "^0.1.1",
|
|
195
195
|
"@rivetkit/bare-ts": "^0.6.2",
|
|
196
|
-
"@rivetkit/engine-cli": "2.3.0-rc.
|
|
197
|
-
"@rivetkit/engine-envoy-protocol": "2.3.0-rc.
|
|
196
|
+
"@rivetkit/engine-cli": "2.3.0-rc.15",
|
|
197
|
+
"@rivetkit/engine-envoy-protocol": "2.3.0-rc.15",
|
|
198
198
|
"@rivetkit/on-change": "6.0.1",
|
|
199
|
-
"@rivetkit/rivetkit-napi": "2.3.0-rc.
|
|
200
|
-
"@rivetkit/rivetkit-wasm": "2.3.0-rc.
|
|
201
|
-
"@rivetkit/traces": "2.3.0-rc.
|
|
202
|
-
"@rivetkit/virtual-websocket": "2.3.0-rc.
|
|
203
|
-
"@rivetkit/workflow-engine": "2.3.0-rc.
|
|
199
|
+
"@rivetkit/rivetkit-napi": "2.3.0-rc.15",
|
|
200
|
+
"@rivetkit/rivetkit-wasm": "2.3.0-rc.15",
|
|
201
|
+
"@rivetkit/traces": "2.3.0-rc.15",
|
|
202
|
+
"@rivetkit/virtual-websocket": "2.3.0-rc.15",
|
|
203
|
+
"@rivetkit/workflow-engine": "2.3.0-rc.15",
|
|
204
204
|
"cbor-x": "^1.6.0",
|
|
205
205
|
"drizzle-orm": "^0.44.2",
|
|
206
206
|
"get-port": "^7.1.0",
|
package/src/registry/native.ts
CHANGED
|
@@ -4756,12 +4756,29 @@ export async function buildServeConfig(
|
|
|
4756
4756
|
serverlessMaxStartPayloadBytes: config.serverless.maxStartPayloadBytes,
|
|
4757
4757
|
};
|
|
4758
4758
|
|
|
4759
|
-
|
|
4759
|
+
// Always best-effort resolve the npm-installed engine binary and hand its
|
|
4760
|
+
// path to the core. The core alone decides whether to actually spawn a local
|
|
4761
|
+
// engine (its `should_manage_engine`, based on the endpoint + spawn mode), so
|
|
4762
|
+
// JS must not duplicate that decision here. Only JS knows the npm
|
|
4763
|
+
// `node_modules` layout, so it resolves the path; if no binary is available
|
|
4764
|
+
// (remote-only install, unsupported platform, optional deps skipped), leave
|
|
4765
|
+
// it unset and let the core report `engine.binary_unavailable` if it actually
|
|
4766
|
+
// needs one.
|
|
4767
|
+
try {
|
|
4760
4768
|
const { getEnginePath } = await loadEngineCli();
|
|
4761
4769
|
serveConfig.engineBinaryPath = getEnginePath();
|
|
4762
|
-
|
|
4763
|
-
|
|
4770
|
+
} catch (error) {
|
|
4771
|
+
// The npm-installed engine binary could not be resolved. The core still
|
|
4772
|
+
// decides whether it needs to spawn a local engine; if it does, it will
|
|
4773
|
+
// fail with engine.binary_unavailable (auto-download is off in the napi
|
|
4774
|
+
// runtime). Warn so the cause is actionable.
|
|
4775
|
+
logger().warn({
|
|
4776
|
+
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",
|
|
4777
|
+
error: stringifyError(error),
|
|
4778
|
+
});
|
|
4764
4779
|
}
|
|
4780
|
+
serveConfig.engineHost = config.engineHost;
|
|
4781
|
+
serveConfig.enginePort = config.enginePort;
|
|
4765
4782
|
if (config.test?.enabled) {
|
|
4766
4783
|
serveConfig.inspectorTestToken =
|
|
4767
4784
|
getEnvUniversal("_RIVET_TEST_INSPECTOR_TOKEN") ?? "token";
|
package/src/registry/runtime.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { stringifyError } from "@/common/utils";
|
|
1
2
|
import type { SqliteNativeMetrics } from "@/common/database/config";
|
|
2
3
|
import type { RegistryConfig } from "./config";
|
|
4
|
+
import { logger } from "./log";
|
|
3
5
|
|
|
4
6
|
declare const handleBrand: unique symbol;
|
|
5
7
|
|
|
@@ -599,11 +601,25 @@ export async function buildServeConfig(
|
|
|
599
601
|
serverlessMaxStartPayloadBytes: config.serverless.maxStartPayloadBytes,
|
|
600
602
|
};
|
|
601
603
|
|
|
602
|
-
|
|
604
|
+
// Always best-effort resolve the engine binary path and hand it to the core.
|
|
605
|
+
// The core alone decides whether to actually spawn a local engine, so JS must
|
|
606
|
+
// not duplicate that decision here. `loadEnginePath` throws when no binary is
|
|
607
|
+
// available (remote-only install, unsupported platform, optional deps
|
|
608
|
+
// skipped); in that case leave it unset and let the core report
|
|
609
|
+
// `engine.binary_unavailable` only if it actually needs one.
|
|
610
|
+
try {
|
|
603
611
|
serveConfig.engineBinaryPath = await loadEnginePath();
|
|
604
|
-
|
|
605
|
-
|
|
612
|
+
} catch (error) {
|
|
613
|
+
// The engine binary could not be resolved. The core still decides whether
|
|
614
|
+
// it needs to spawn a local engine; if it does, it will fail with
|
|
615
|
+
// engine.binary_unavailable (auto-download is off in the napi runtime).
|
|
616
|
+
logger().warn({
|
|
617
|
+
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",
|
|
618
|
+
error: stringifyError(error),
|
|
619
|
+
});
|
|
606
620
|
}
|
|
621
|
+
serveConfig.engineHost = config.engineHost;
|
|
622
|
+
serveConfig.enginePort = config.enginePort;
|
|
607
623
|
if (config.test?.enabled) {
|
|
608
624
|
serveConfig.inspectorTestToken =
|
|
609
625
|
process.env._RIVET_TEST_INSPECTOR_TOKEN ?? "token";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|