rivetkit 0.0.0-codex-rivetkit-quickstart-preview.7e0cd02 → 0.0.0-codex-rivetkit-quickstart-preview.d4284e1
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 +9 -6
- 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 +9 -6
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.js +9 -6
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-7JCRVCLG.js → chunk-2BWA26HM.js} +2 -2
- package/dist/tsup/{chunk-477CG44O.js → chunk-35RWY7CS.js} +3 -3
- package/dist/tsup/{chunk-NOOZB3MF.js → chunk-4HZZFRAX.js} +2 -2
- package/dist/tsup/{chunk-JBKNLGTL.cjs → chunk-5MJ2MVNP.cjs} +3 -3
- package/dist/tsup/{chunk-JBKNLGTL.cjs.map → chunk-5MJ2MVNP.cjs.map} +1 -1
- package/dist/tsup/{chunk-EXOFMCDL.js → chunk-67RJEZ3M.js} +7 -7
- package/dist/tsup/{chunk-FDEQTWHW.cjs → chunk-7PMBLCJK.cjs} +141 -141
- package/dist/tsup/{chunk-FDEQTWHW.cjs.map → chunk-7PMBLCJK.cjs.map} +1 -1
- package/dist/tsup/{chunk-EIQ7RY24.cjs → chunk-BY3T7UKA.cjs} +4 -4
- package/dist/tsup/{chunk-EIQ7RY24.cjs.map → chunk-BY3T7UKA.cjs.map} +1 -1
- package/dist/tsup/{chunk-7SCJUVRH.cjs → chunk-DBRYBVQK.cjs} +10 -10
- package/dist/tsup/{chunk-7SCJUVRH.cjs.map → chunk-DBRYBVQK.cjs.map} +1 -1
- package/dist/tsup/{chunk-H5CY23OP.cjs → chunk-FYRVE64R.cjs} +12 -8
- package/dist/tsup/chunk-FYRVE64R.cjs.map +1 -0
- package/dist/tsup/{chunk-XLHSCH3T.cjs → chunk-G7UIVI32.cjs} +5 -5
- package/dist/tsup/{chunk-XLHSCH3T.cjs.map → chunk-G7UIVI32.cjs.map} +1 -1
- package/dist/tsup/{chunk-6BV4OZDA.cjs → chunk-GOEOE2UX.cjs} +7 -7
- package/dist/tsup/{chunk-6BV4OZDA.cjs.map → chunk-GOEOE2UX.cjs.map} +1 -1
- package/dist/tsup/{chunk-7HJD6OOC.js → chunk-Q2Z22VKI.js} +2 -2
- package/dist/tsup/{chunk-XUPYQVCI.js → chunk-X7EOSG3F.js} +11 -7
- package/dist/tsup/chunk-X7EOSG3F.js.map +1 -0
- package/dist/tsup/{chunk-M4DPCXYN.js → chunk-YVLWAJLM.js} +4 -4
- 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 +4 -2
- package/dist/tsup/common/log.cjs.map +1 -1
- package/dist/tsup/common/log.d.cts +5 -1
- package/dist/tsup/common/log.d.ts +5 -1
- package/dist/tsup/common/log.js +5 -3
- 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 +66 -61
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +11 -6
- 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/common/log.ts +14 -8
- package/src/registry/index.ts +4 -0
- package/dist/tsup/chunk-H5CY23OP.cjs.map +0 -1
- package/dist/tsup/chunk-XUPYQVCI.js.map +0 -1
- /package/dist/tsup/{chunk-7JCRVCLG.js.map → chunk-2BWA26HM.js.map} +0 -0
- /package/dist/tsup/{chunk-477CG44O.js.map → chunk-35RWY7CS.js.map} +0 -0
- /package/dist/tsup/{chunk-NOOZB3MF.js.map → chunk-4HZZFRAX.js.map} +0 -0
- /package/dist/tsup/{chunk-EXOFMCDL.js.map → chunk-67RJEZ3M.js.map} +0 -0
- /package/dist/tsup/{chunk-7HJD6OOC.js.map → chunk-Q2Z22VKI.js.map} +0 -0
- /package/dist/tsup/{chunk-M4DPCXYN.js.map → chunk-YVLWAJLM.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
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; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDBRYBVQKcjs = require('../chunk-DBRYBVQK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
7
|
+
var _chunkBY3T7UKAcjs = require('../chunk-BY3T7UKA.cjs');
|
|
8
|
+
require('../chunk-G7UIVI32.cjs');
|
|
9
|
+
require('../chunk-FYRVE64R.cjs');
|
|
10
10
|
require('../chunk-ZXMKVBQ6.cjs');
|
|
11
11
|
require('../chunk-S3ZELDAP.cjs');
|
|
12
12
|
|
|
@@ -762,5 +762,5 @@ function decodeToClient(bytes) {
|
|
|
762
762
|
|
|
763
763
|
|
|
764
764
|
|
|
765
|
-
exports.createWorkflowInspectorAdapter =
|
|
765
|
+
exports.createWorkflowInspectorAdapter = _chunkDBRYBVQKcjs.createWorkflowInspectorAdapter; exports.decodeToClient = decodeToClient; exports.decodeToServer = decodeToServer; exports.decodeWorkflowHistoryTransport = _chunkBY3T7UKAcjs.decodeWorkflowHistoryTransport; exports.encodeToClient = encodeToClient; exports.encodeToServer = encodeToServer; exports.encodeWorkflowHistoryTransport = _chunkBY3T7UKAcjs.encodeWorkflowHistoryTransport; exports.readActionRequest = readActionRequest; exports.readActionResponse = readActionResponse; exports.readConnection = readConnection; exports.readConnectionsRequest = readConnectionsRequest; exports.readConnectionsResponse = readConnectionsResponse; exports.readConnectionsUpdated = readConnectionsUpdated; exports.readDatabaseSchemaRequest = readDatabaseSchemaRequest; exports.readDatabaseSchemaResponse = readDatabaseSchemaResponse; exports.readDatabaseTableRowsRequest = readDatabaseTableRowsRequest; exports.readDatabaseTableRowsResponse = readDatabaseTableRowsResponse; exports.readError = readError; exports.readInit = readInit; exports.readPatchStateRequest = readPatchStateRequest; exports.readQueueMessageSummary = readQueueMessageSummary; exports.readQueueRequest = readQueueRequest; exports.readQueueResponse = readQueueResponse; exports.readQueueStatus = readQueueStatus; exports.readQueueUpdated = readQueueUpdated; exports.readRpcsListRequest = readRpcsListRequest; exports.readRpcsListResponse = readRpcsListResponse; exports.readState = readState; exports.readStateRequest = readStateRequest; exports.readStateResponse = readStateResponse; exports.readStateUpdated = readStateUpdated; exports.readToClient = readToClient; exports.readToClientBody = readToClientBody; exports.readToServer = readToServer; exports.readToServerBody = readToServerBody; exports.readTraceQueryRequest = readTraceQueryRequest; exports.readTraceQueryResponse = readTraceQueryResponse; exports.readWorkflowHistory = readWorkflowHistory; exports.readWorkflowHistoryRequest = readWorkflowHistoryRequest; exports.readWorkflowHistoryResponse = readWorkflowHistoryResponse; exports.readWorkflowHistoryUpdated = readWorkflowHistoryUpdated; exports.readWorkflowReplayRequest = readWorkflowReplayRequest; exports.readWorkflowReplayResponse = readWorkflowReplayResponse; exports.writeActionRequest = writeActionRequest; exports.writeActionResponse = writeActionResponse; exports.writeConnection = writeConnection; exports.writeConnectionsRequest = writeConnectionsRequest; exports.writeConnectionsResponse = writeConnectionsResponse; exports.writeConnectionsUpdated = writeConnectionsUpdated; exports.writeDatabaseSchemaRequest = writeDatabaseSchemaRequest; exports.writeDatabaseSchemaResponse = writeDatabaseSchemaResponse; exports.writeDatabaseTableRowsRequest = writeDatabaseTableRowsRequest; exports.writeDatabaseTableRowsResponse = writeDatabaseTableRowsResponse; exports.writeError = writeError; exports.writeInit = writeInit; exports.writePatchStateRequest = writePatchStateRequest; exports.writeQueueMessageSummary = writeQueueMessageSummary; exports.writeQueueRequest = writeQueueRequest; exports.writeQueueResponse = writeQueueResponse; exports.writeQueueStatus = writeQueueStatus; exports.writeQueueUpdated = writeQueueUpdated; exports.writeRpcsListRequest = writeRpcsListRequest; exports.writeRpcsListResponse = writeRpcsListResponse; exports.writeState = writeState; exports.writeStateRequest = writeStateRequest; exports.writeStateResponse = writeStateResponse; exports.writeStateUpdated = writeStateUpdated; exports.writeToClient = writeToClient; exports.writeToClientBody = writeToClientBody; exports.writeToServer = writeToServer; exports.writeToServerBody = writeToServerBody; exports.writeTraceQueryRequest = writeTraceQueryRequest; exports.writeTraceQueryResponse = writeTraceQueryResponse; exports.writeWorkflowHistory = writeWorkflowHistory; exports.writeWorkflowHistoryRequest = writeWorkflowHistoryRequest; exports.writeWorkflowHistoryResponse = writeWorkflowHistoryResponse; exports.writeWorkflowHistoryUpdated = writeWorkflowHistoryUpdated; exports.writeWorkflowReplayRequest = writeWorkflowReplayRequest; exports.writeWorkflowReplayResponse = writeWorkflowReplayResponse;
|
|
766
766
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkflowInspectorAdapter
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YVLWAJLM.js";
|
|
4
4
|
import {
|
|
5
5
|
decodeWorkflowHistoryTransport,
|
|
6
6
|
encodeWorkflowHistoryTransport
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-Q2Z22VKI.js";
|
|
8
|
+
import "../chunk-4HZZFRAX.js";
|
|
9
|
+
import "../chunk-X7EOSG3F.js";
|
|
10
10
|
import "../chunk-FLWADOST.js";
|
|
11
11
|
|
|
12
12
|
// src/common/bare/generated/inspector/v4.ts
|
package/dist/tsup/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2; var _class3;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBY3T7UKAcjs = require('./chunk-BY3T7UKA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ var _chunkQILCFULWcjs = require('./chunk-QILCFULW.cjs');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk7PMBLCJKcjs = require('./chunk-7PMBLCJK.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -33,9 +33,9 @@ var _chunkDLX4NOQRcjs = require('./chunk-DLX4NOQR.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
require('./chunk-
|
|
38
|
-
|
|
36
|
+
var _chunkG7UIVI32cjs = require('./chunk-G7UIVI32.cjs');
|
|
37
|
+
require('./chunk-5MJ2MVNP.cjs');
|
|
38
|
+
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -64,7 +64,7 @@ require('./chunk-JBKNLGTL.cjs');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkFYRVE64Rcjs = require('./chunk-FYRVE64R.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
@@ -77,13 +77,14 @@ var _chunkH5CY23OPcjs = require('./chunk-H5CY23OP.cjs');
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
var _chunkZXMKVBQ6cjs = require('./chunk-ZXMKVBQ6.cjs');
|
|
80
|
+
require('./chunk-FP2IVSEW.cjs');
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
var _chunkS3ZELDAPcjs = require('./chunk-S3ZELDAP.cjs');
|
|
83
84
|
|
|
84
85
|
// src/actor/log.ts
|
|
85
86
|
function loggerWithoutContext() {
|
|
86
|
-
return
|
|
87
|
+
return _chunkFYRVE64Rcjs.getLogger.call(void 0, "actor-runtime");
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
// src/actor/definition.ts
|
|
@@ -215,7 +216,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
215
216
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
216
217
|
var _ws = require('hono/ws');
|
|
217
218
|
function logger() {
|
|
218
|
-
return
|
|
219
|
+
return _chunkFYRVE64Rcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
219
220
|
}
|
|
220
221
|
var InlineWebSocketAdapter = class {
|
|
221
222
|
#handler;
|
|
@@ -386,7 +387,7 @@ function isLocalEngineEndpoint(endpoint) {
|
|
|
386
387
|
|
|
387
388
|
// src/registry/log.ts
|
|
388
389
|
function logger2() {
|
|
389
|
-
return
|
|
390
|
+
return _chunkFYRVE64Rcjs.getLogger.call(void 0, "registry");
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
// src/serverless/configure.ts
|
|
@@ -445,8 +446,8 @@ async function configureServerlessPool(config) {
|
|
|
445
446
|
);
|
|
446
447
|
}
|
|
447
448
|
const customConfig = config.configurePool;
|
|
448
|
-
const clientConfig =
|
|
449
|
-
const dcsRes = await
|
|
449
|
+
const clientConfig = _chunk7PMBLCJKcjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
450
|
+
const dcsRes = await _chunk7PMBLCJKcjs.getDatacenters.call(void 0, clientConfig);
|
|
450
451
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
451
452
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
452
453
|
const headers = {
|
|
@@ -472,7 +473,7 @@ async function configureServerlessPool(config) {
|
|
|
472
473
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
473
474
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
474
475
|
};
|
|
475
|
-
await
|
|
476
|
+
await _chunk7PMBLCJKcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
476
477
|
datacenters: Object.fromEntries(
|
|
477
478
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
478
479
|
)
|
|
@@ -489,7 +490,7 @@ async function configureServerlessPool(config) {
|
|
|
489
490
|
logger2().warn({
|
|
490
491
|
msg: "serverless pool configuration attempt failed",
|
|
491
492
|
attempts,
|
|
492
|
-
error:
|
|
493
|
+
error: _chunkFYRVE64Rcjs.stringifyError.call(void 0, error)
|
|
493
494
|
});
|
|
494
495
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
495
496
|
}
|
|
@@ -497,7 +498,7 @@ async function configureServerlessPool(config) {
|
|
|
497
498
|
logger2().error({
|
|
498
499
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
499
500
|
attempts,
|
|
500
|
-
error:
|
|
501
|
+
error: _chunkFYRVE64Rcjs.stringifyError.call(void 0, lastError)
|
|
501
502
|
});
|
|
502
503
|
throw lastError;
|
|
503
504
|
}
|
|
@@ -509,20 +510,20 @@ var _zod = require('zod');
|
|
|
509
510
|
var _v4 = require('zod/v4');
|
|
510
511
|
var warnedMissingVersion = false;
|
|
511
512
|
var EnvoyConfigSchema = _v4.z.object({
|
|
512
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
513
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
513
514
|
version: _v4.z.number().default(() => {
|
|
514
|
-
const version =
|
|
515
|
+
const version = _chunkFYRVE64Rcjs.getRivetEnvoyVersion.call(void 0, );
|
|
515
516
|
if (version !== void 0) return version;
|
|
516
|
-
if (
|
|
517
|
+
if (_chunkFYRVE64Rcjs.getNodeEnv.call(void 0, ) === "production" && !warnedMissingVersion) {
|
|
517
518
|
warnedMissingVersion = true;
|
|
518
|
-
|
|
519
|
+
_chunkFYRVE64Rcjs.getLogger.call(void 0, "rivetkit").error(
|
|
519
520
|
"RIVET_ENVOY_VERSION is not set. Actors will not be versioned, which means they won't be drained on deploy. This is only needed when self-hosting or using a custom envoy (not needed for Rivet Compute). Set this as a build arg in your Dockerfile. See https://rivet.dev/docs/actors/versions"
|
|
520
521
|
);
|
|
521
522
|
}
|
|
522
523
|
return 1;
|
|
523
524
|
}),
|
|
524
525
|
// Deprecated.
|
|
525
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
526
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
526
527
|
envoyKey: _v4.z.string().optional()
|
|
527
528
|
});
|
|
528
529
|
|
|
@@ -560,7 +561,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
560
561
|
*
|
|
561
562
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
562
563
|
*/
|
|
563
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
564
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
564
565
|
/**
|
|
565
566
|
* Token that clients should use when connecting via the public endpoint.
|
|
566
567
|
*
|
|
@@ -568,7 +569,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
568
569
|
*
|
|
569
570
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
570
571
|
*/
|
|
571
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
572
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetPublicToken.call(void 0, ))))
|
|
572
573
|
// There is no publicNamespace config option because the frontend and backend
|
|
573
574
|
// cannot use different namespaces. The namespace is extracted from the
|
|
574
575
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -622,7 +623,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
622
623
|
* Runtime binding to use for RivetKit core.
|
|
623
624
|
* */
|
|
624
625
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
625
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
626
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetkitRuntime.call(void 0, )));
|
|
626
627
|
if (rawRuntime === void 0) {
|
|
627
628
|
return "auto";
|
|
628
629
|
}
|
|
@@ -659,7 +660,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
659
660
|
* */
|
|
660
661
|
logging: _zod.z.object({
|
|
661
662
|
baseLogger: _zod.z.custom().optional(),
|
|
662
|
-
level:
|
|
663
|
+
level: _chunkFYRVE64Rcjs.LogLevelSchema.optional()
|
|
663
664
|
}).optional().default(() => ({})),
|
|
664
665
|
// MARK: Routing
|
|
665
666
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -677,9 +678,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
677
678
|
*
|
|
678
679
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
679
680
|
*/
|
|
680
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
681
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
682
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
681
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetEngine.call(void 0, ))), () => ( _chunkFYRVE64Rcjs.getRivetEndpoint.call(void 0, )))),
|
|
682
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetToken.call(void 0, )))),
|
|
683
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkFYRVE64Rcjs.getRivetNamespace.call(void 0, )))),
|
|
683
684
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
684
685
|
// MARK: Client
|
|
685
686
|
// TODO:
|
|
@@ -719,21 +720,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
719
720
|
*
|
|
720
721
|
* Starts the full Rust engine process locally.
|
|
721
722
|
*/
|
|
722
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
723
|
+
startEngine: _zod.z.boolean().default(() => _chunkFYRVE64Rcjs.getRivetRunEngine.call(void 0, )),
|
|
723
724
|
/**
|
|
724
725
|
* @experimental
|
|
725
726
|
*
|
|
726
727
|
* Host to bind the spawned local engine process to.
|
|
727
728
|
*/
|
|
728
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
729
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetRunEngineHost.call(void 0, ), () => ( ENGINE_HOST))),
|
|
729
730
|
/**
|
|
730
731
|
* @experimental
|
|
731
732
|
*
|
|
732
733
|
* Port to bind the spawned local engine process to.
|
|
733
734
|
*/
|
|
734
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
735
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetRunEnginePort.call(void 0, ), () => ( ENGINE_PORT))),
|
|
735
736
|
/** @experimental */
|
|
736
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
737
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkFYRVE64Rcjs.VERSION))),
|
|
737
738
|
/**
|
|
738
739
|
* @experimental
|
|
739
740
|
*
|
|
@@ -781,7 +782,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
781
782
|
}))
|
|
782
783
|
}).transform((config, ctx) => {
|
|
783
784
|
var _a, _b, _c;
|
|
784
|
-
const isDevEnv =
|
|
785
|
+
const isDevEnv = _chunkFYRVE64Rcjs.isDev.call(void 0, );
|
|
785
786
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
786
787
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
787
788
|
ctx.addIssue({
|
|
@@ -791,7 +792,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
791
792
|
});
|
|
792
793
|
}
|
|
793
794
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
794
|
-
const parsedEndpoint = config.endpoint ?
|
|
795
|
+
const parsedEndpoint = config.endpoint ? _chunk7PMBLCJKcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
795
796
|
endpoint: config.endpoint,
|
|
796
797
|
path: ["endpoint"],
|
|
797
798
|
namespace: config.namespace,
|
|
@@ -819,7 +820,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
819
820
|
);
|
|
820
821
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
821
822
|
const token = _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token));
|
|
822
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
823
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunk7PMBLCJKcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
823
824
|
endpoint: config.serverless.publicEndpoint,
|
|
824
825
|
path: ["serverless", "publicEndpoint"]
|
|
825
826
|
}) : void 0;
|
|
@@ -947,7 +948,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
947
948
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
948
949
|
sqlite: DocSqliteConfigSchema,
|
|
949
950
|
logging: _zod.z.object({
|
|
950
|
-
level:
|
|
951
|
+
level: _chunkFYRVE64Rcjs.LogLevelSchema.optional().describe(
|
|
951
952
|
"Log level for RivetKit. Default: 'warn'"
|
|
952
953
|
)
|
|
953
954
|
}).optional().describe("Logging configuration."),
|
|
@@ -2670,7 +2671,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
2670
2671
|
}).catch((error) => {
|
|
2671
2672
|
logger2().warn({
|
|
2672
2673
|
msg: "deferred native sleep cleanup failed",
|
|
2673
|
-
error:
|
|
2674
|
+
error: _chunkFYRVE64Rcjs.stringifyError.call(void 0, error)
|
|
2674
2675
|
});
|
|
2675
2676
|
});
|
|
2676
2677
|
return;
|
|
@@ -2780,10 +2781,10 @@ function decodeValue(value) {
|
|
|
2780
2781
|
if (!value || value.length === 0) {
|
|
2781
2782
|
return void 0;
|
|
2782
2783
|
}
|
|
2783
|
-
return
|
|
2784
|
+
return _chunkG7UIVI32cjs.decodeCborCompat.call(void 0, value);
|
|
2784
2785
|
}
|
|
2785
2786
|
function encodeValue(value) {
|
|
2786
|
-
return
|
|
2787
|
+
return _chunkG7UIVI32cjs.encodeCborCompat.call(void 0, value);
|
|
2787
2788
|
}
|
|
2788
2789
|
function normalizeArgs(value) {
|
|
2789
2790
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -2819,7 +2820,7 @@ function isStructuredBridgeError(error) {
|
|
|
2819
2820
|
return _chunkZXMKVBQ6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
2820
2821
|
}
|
|
2821
2822
|
function encodeNativeCallbackError(error) {
|
|
2822
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
2823
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkFYRVE64Rcjs.deconstructError.call(void 0, error, true);
|
|
2823
2824
|
const bridgeError = new Error(_chunkZXMKVBQ6cjs.encodeBridgeRivetError.call(void 0, structuredError), {
|
|
2824
2825
|
cause: error instanceof Error ? error : void 0
|
|
2825
2826
|
});
|
|
@@ -2869,7 +2870,7 @@ function decodeWorkflowCbor(data) {
|
|
|
2869
2870
|
return null;
|
|
2870
2871
|
}
|
|
2871
2872
|
try {
|
|
2872
|
-
return
|
|
2873
|
+
return _chunkG7UIVI32cjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
2873
2874
|
} catch (e4) {
|
|
2874
2875
|
return null;
|
|
2875
2876
|
}
|
|
@@ -2974,7 +2975,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
2974
2975
|
if (data === null) {
|
|
2975
2976
|
return null;
|
|
2976
2977
|
}
|
|
2977
|
-
const history =
|
|
2978
|
+
const history = _chunkBY3T7UKAcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
2978
2979
|
return jsonSafe({
|
|
2979
2980
|
nameRegistry: [...history.nameRegistry],
|
|
2980
2981
|
entries: history.entries.map((entry) => ({
|
|
@@ -3115,12 +3116,12 @@ var NativeConnAdapter = class {
|
|
|
3115
3116
|
this.#writeState(nextValue, { writeNative: true });
|
|
3116
3117
|
},
|
|
3117
3118
|
(newValue) => {
|
|
3118
|
-
|
|
3119
|
+
_chunkG7UIVI32cjs.assertJsonCompatValue.call(void 0, newValue);
|
|
3119
3120
|
}
|
|
3120
3121
|
);
|
|
3121
3122
|
}
|
|
3122
3123
|
set state(value) {
|
|
3123
|
-
|
|
3124
|
+
_chunkG7UIVI32cjs.assertJsonCompatValue.call(void 0, value);
|
|
3124
3125
|
this.#writeState(value, { writeNative: true });
|
|
3125
3126
|
}
|
|
3126
3127
|
initializeState(value) {
|
|
@@ -4070,7 +4071,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4070
4071
|
},
|
|
4071
4072
|
(newValue) => {
|
|
4072
4073
|
this.#assertCanMutateState();
|
|
4073
|
-
|
|
4074
|
+
_chunkG7UIVI32cjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4074
4075
|
}
|
|
4075
4076
|
);
|
|
4076
4077
|
}
|
|
@@ -4081,7 +4082,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4081
4082
|
throw stateNotEnabledError();
|
|
4082
4083
|
}
|
|
4083
4084
|
this.#assertCanMutateState();
|
|
4084
|
-
|
|
4085
|
+
_chunkG7UIVI32cjs.assertJsonCompatValue.call(void 0, value);
|
|
4085
4086
|
this.#writeState(value, { scheduleSave: true });
|
|
4086
4087
|
}
|
|
4087
4088
|
initializeState(value) {
|
|
@@ -4346,7 +4347,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4346
4347
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
4347
4348
|
logger2().warn({
|
|
4348
4349
|
msg: "keepAwake promise rejected",
|
|
4349
|
-
error:
|
|
4350
|
+
error: _chunkFYRVE64Rcjs.stringifyError.call(void 0, error)
|
|
4350
4351
|
});
|
|
4351
4352
|
}).then(() => null);
|
|
4352
4353
|
try {
|
|
@@ -4801,9 +4802,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
4801
4802
|
const actionHandlers = Object.fromEntries(
|
|
4802
4803
|
Object.entries(_nullishCoalesce(config.actions, () => ( {}))).map(([name, handler]) => [name, handler])
|
|
4803
4804
|
);
|
|
4804
|
-
const createClient = () =>
|
|
4805
|
-
new (0,
|
|
4806
|
-
|
|
4805
|
+
const createClient = () => _chunk7PMBLCJKcjs.createClientWithDriver.call(void 0,
|
|
4806
|
+
new (0, _chunk7PMBLCJKcjs.RemoteEngineControlClient)(
|
|
4807
|
+
_chunk7PMBLCJKcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
4807
4808
|
),
|
|
4808
4809
|
{ encoding: "bare" }
|
|
4809
4810
|
);
|
|
@@ -5527,7 +5528,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
5527
5528
|
new Response(null, { status: 404 })
|
|
5528
5529
|
);
|
|
5529
5530
|
}
|
|
5530
|
-
const rawConnParams = jsRequest.headers.get(
|
|
5531
|
+
const rawConnParams = jsRequest.headers.get(_chunk7PMBLCJKcjs.HEADER_CONN_PARAMS);
|
|
5531
5532
|
let requestCtx;
|
|
5532
5533
|
let conn;
|
|
5533
5534
|
try {
|
|
@@ -5754,7 +5755,7 @@ async function buildServeConfig(config) {
|
|
|
5754
5755
|
poolName: config.envoy.poolName,
|
|
5755
5756
|
handleInspectorHttpInRuntime: true,
|
|
5756
5757
|
serverlessBasePath: config.serverless.basePath,
|
|
5757
|
-
serverlessPackageVersion:
|
|
5758
|
+
serverlessPackageVersion: _chunkFYRVE64Rcjs.VERSION,
|
|
5758
5759
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
5759
5760
|
serverlessClientNamespace: config.publicNamespace,
|
|
5760
5761
|
serverlessClientToken: config.publicToken,
|
|
@@ -5767,19 +5768,19 @@ async function buildServeConfig(config) {
|
|
|
5767
5768
|
} catch (error) {
|
|
5768
5769
|
logger2().warn({
|
|
5769
5770
|
msg: "could not resolve a local engine binary; if a local engine must be spawned it will fail with engine.binary_unavailable \u2014 set RIVET_ENGINE_BINARY_PATH or install the @rivetkit/engine-cli platform package",
|
|
5770
|
-
error:
|
|
5771
|
+
error: _chunkFYRVE64Rcjs.stringifyError.call(void 0, error)
|
|
5771
5772
|
});
|
|
5772
5773
|
}
|
|
5773
5774
|
serveConfig.engineHost = config.engineHost;
|
|
5774
5775
|
serveConfig.enginePort = config.enginePort;
|
|
5775
5776
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
5776
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
5777
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkFYRVE64Rcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
5777
5778
|
}
|
|
5778
5779
|
return serveConfig;
|
|
5779
5780
|
}
|
|
5780
5781
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
5781
5782
|
var _a;
|
|
5782
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
5783
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkFYRVE64Rcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
5783
5784
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
5784
5785
|
}
|
|
5785
5786
|
if (runtime.kind === "napi") {
|
|
@@ -5841,7 +5842,11 @@ var Registry = class {
|
|
|
5841
5842
|
#shutdownInFlight = null;
|
|
5842
5843
|
#signalHandlers = {};
|
|
5843
5844
|
constructor(config, deps) {
|
|
5845
|
+
var _a;
|
|
5844
5846
|
this.#config = config;
|
|
5847
|
+
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
5848
|
+
_chunkFYRVE64Rcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
5849
|
+
}
|
|
5845
5850
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
5846
5851
|
this.routes = {
|
|
5847
5852
|
health: () => this.#healthRoute(),
|
|
@@ -6064,8 +6069,8 @@ var Registry = class {
|
|
|
6064
6069
|
* ```
|
|
6065
6070
|
*/
|
|
6066
6071
|
async listen(opts = {}) {
|
|
6067
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
6068
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
6072
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkFYRVE64Rcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
6073
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkFYRVE64Rcjs.getRivetkitPublicDir.call(void 0, )));
|
|
6069
6074
|
const config = this.parseConfig();
|
|
6070
6075
|
const configuredRegistryPromise = buildConfiguredRegistry(config);
|
|
6071
6076
|
this.#runtimeServeConfiguredPromise = configuredRegistryPromise;
|
|
@@ -6093,7 +6098,7 @@ var Registry = class {
|
|
|
6093
6098
|
return jsonRouteResponse(503, {
|
|
6094
6099
|
status: "not_started",
|
|
6095
6100
|
runtime: "rivetkit",
|
|
6096
|
-
version:
|
|
6101
|
+
version: _chunkFYRVE64Rcjs.VERSION
|
|
6097
6102
|
});
|
|
6098
6103
|
}
|
|
6099
6104
|
const { runtime, registry } = configured;
|
|
@@ -6101,7 +6106,7 @@ var Registry = class {
|
|
|
6101
6106
|
return jsonRouteResponse(501, {
|
|
6102
6107
|
status: "unsupported",
|
|
6103
6108
|
runtime: "rivetkit",
|
|
6104
|
-
version:
|
|
6109
|
+
version: _chunkFYRVE64Rcjs.VERSION
|
|
6105
6110
|
});
|
|
6106
6111
|
}
|
|
6107
6112
|
const response = await runtime.registryHealth(registry);
|
|
@@ -6339,8 +6344,8 @@ var Registry = class {
|
|
|
6339
6344
|
* ```
|
|
6340
6345
|
*/
|
|
6341
6346
|
start() {
|
|
6342
|
-
if (
|
|
6343
|
-
const publicDir = _nullishCoalesce(
|
|
6347
|
+
if (_chunkFYRVE64Rcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
6348
|
+
const publicDir = _nullishCoalesce(_chunkFYRVE64Rcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
6344
6349
|
this.listen({ publicDir }).catch((error) => {
|
|
6345
6350
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
6346
6351
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -6361,7 +6366,7 @@ var Registry = class {
|
|
|
6361
6366
|
};
|
|
6362
6367
|
console.log();
|
|
6363
6368
|
console.log(
|
|
6364
|
-
` RivetKit ${
|
|
6369
|
+
` RivetKit ${_chunkFYRVE64Rcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
6365
6370
|
);
|
|
6366
6371
|
if (config.namespace !== "default") {
|
|
6367
6372
|
logLine("Namespace", config.namespace);
|
|
@@ -6436,5 +6441,5 @@ function setup(input) {
|
|
|
6436
6441
|
|
|
6437
6442
|
|
|
6438
6443
|
|
|
6439
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
6444
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunk7PMBLCJKcjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkZXMKVBQ6cjs.RivetError; exports.ActorsSchema = ActorsSchema; exports.DocConfigurePoolSchema = DocConfigurePoolSchema; exports.DocEnvoyConfigSchema = DocEnvoyConfigSchema; exports.DocRegistryConfigSchema = DocRegistryConfigSchema; exports.DocServerlessConfigSchema = DocServerlessConfigSchema; exports.DocSqliteConfigSchema = DocSqliteConfigSchema; exports.InlineWebSocketAdapter = InlineWebSocketAdapter; exports.Registry = Registry; exports.RegistryConfigSchema = RegistryConfigSchema; exports.RivetError = _chunkZXMKVBQ6cjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkZXMKVBQ6cjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunk7PMBLCJKcjs.createClientWithDriver; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkFYRVE64Rcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkFYRVE64Rcjs.toUint8Array;
|
|
6440
6445
|
//# sourceMappingURL=mod.cjs.map
|