@valerypopoff/rivet2-core 2.31.0 → 2.33.0
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/cjs/bundle.cjs +33 -23
- package/dist/cjs/bundle.cjs.map +3 -3
- package/dist/cjs/serialization.cjs +32 -4
- package/dist/cjs/serialization.cjs.map +3 -3
- package/dist/esm/model/NodePrefabResolver.js +13 -7
- package/dist/esm/serialization.js +1 -0
- package/dist/esm/utils/serialization/serialization_v4.js +27 -1
- package/dist/types/model/NodeBase.d.ts +2 -0
- package/dist/types/serialization.d.ts +1 -0
- package/dist/types/utils/serialization/serialization_v4.d.ts +3 -0
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -5449,6 +5449,7 @@ function fromSerializedNode(serializedNode) {
|
|
|
5449
5449
|
|
|
5450
5450
|
// src/utils/serialization/serialization_v4.ts
|
|
5451
5451
|
var import_lodash_es2 = require("lodash");
|
|
5452
|
+
var import_safe_stable_stringify3 = __toESM(require("safe-stable-stringify"), 1);
|
|
5452
5453
|
|
|
5453
5454
|
// src/model/chat-v2/llmChatV2NodeMigration.ts
|
|
5454
5455
|
function normalizeSerializedLLMTemperatureData(nodeType, data) {
|
|
@@ -5534,6 +5535,9 @@ function graphV4Deserializer(data) {
|
|
|
5534
5535
|
return fromSerializedGraph2(serializedGraph);
|
|
5535
5536
|
}
|
|
5536
5537
|
function projectV4Serializer(project, attachedData) {
|
|
5538
|
+
return wrapInYamlEnvelope(4, prepareSerializedProject(project, attachedData));
|
|
5539
|
+
}
|
|
5540
|
+
function prepareSerializedProject(project, attachedData) {
|
|
5537
5541
|
if (!isValidProjectStaticData(project.data)) {
|
|
5538
5542
|
throw new Error("Project data must be a record of static-data strings");
|
|
5539
5543
|
}
|
|
@@ -5547,7 +5551,7 @@ function projectV4Serializer(project, attachedData) {
|
|
|
5547
5551
|
path: void 0
|
|
5548
5552
|
}
|
|
5549
5553
|
};
|
|
5550
|
-
return
|
|
5554
|
+
return toSerializedProject(filteredProject, attachedData);
|
|
5551
5555
|
}
|
|
5552
5556
|
function graphV4Serializer(graph) {
|
|
5553
5557
|
return wrapInYamlEnvelope(4, toSerializedGraph(graph));
|
|
@@ -5667,6 +5671,7 @@ function toSerializedNode(node, allNodes, allConnections) {
|
|
|
5667
5671
|
return {
|
|
5668
5672
|
description: ((_a = node.description) == null ? void 0 : _a.trim()) ? node.description : void 0,
|
|
5669
5673
|
visualData: packVisualDataV4(node),
|
|
5674
|
+
dataBusChannelOrder: node.visualData.dataBusChannelOrder,
|
|
5670
5675
|
isSplitRun: node.isSplitRun ? true : void 0,
|
|
5671
5676
|
splitRunMax: node.isSplitRun ? node.splitRunMax : void 0,
|
|
5672
5677
|
splitRunConcurrency: node.isSplitRun ? node.splitRunConcurrency : void 0,
|
|
@@ -5702,7 +5707,8 @@ function fromSerializedNode2(serializedNode, serializedNodeInfo) {
|
|
|
5702
5707
|
y,
|
|
5703
5708
|
width,
|
|
5704
5709
|
zIndex,
|
|
5705
|
-
color
|
|
5710
|
+
color,
|
|
5711
|
+
...Array.isArray(serializedNode.dataBusChannelOrder) ? { dataBusChannelOrder: serializedNode.dataBusChannelOrder } : {}
|
|
5706
5712
|
},
|
|
5707
5713
|
data: serializedNode.data ?? {},
|
|
5708
5714
|
variants: serializedNode.variants ?? [],
|
|
@@ -6229,12 +6235,12 @@ function parseProviderJsonChunk(provider, chunk) {
|
|
|
6229
6235
|
}
|
|
6230
6236
|
|
|
6231
6237
|
// src/utils/projectComparison/connections.ts
|
|
6232
|
-
var
|
|
6238
|
+
var import_safe_stable_stringify5 = __toESM(require("safe-stable-stringify"), 1);
|
|
6233
6239
|
|
|
6234
6240
|
// src/utils/projectComparison/values.ts
|
|
6235
|
-
var
|
|
6241
|
+
var import_safe_stable_stringify4 = __toESM(require("safe-stable-stringify"), 1);
|
|
6236
6242
|
function areComparisonValuesEqual(left, right) {
|
|
6237
|
-
return (0,
|
|
6243
|
+
return (0, import_safe_stable_stringify4.default)(left) === (0, import_safe_stable_stringify4.default)(right);
|
|
6238
6244
|
}
|
|
6239
6245
|
function getChangedValueComparisons(path, before, after) {
|
|
6240
6246
|
if (areComparisonValuesEqual(before, after)) {
|
|
@@ -6279,7 +6285,7 @@ function formatComparisonPath(path) {
|
|
|
6279
6285
|
|
|
6280
6286
|
// src/utils/projectComparison/connections.ts
|
|
6281
6287
|
function getProjectConnectionComparisonKey(connection) {
|
|
6282
|
-
return (0,
|
|
6288
|
+
return (0, import_safe_stable_stringify5.default)([
|
|
6283
6289
|
connection.outputNodeId,
|
|
6284
6290
|
connection.outputId,
|
|
6285
6291
|
connection.inputNodeId,
|
|
@@ -7566,16 +7572,20 @@ function resolveNodePrefabInstance(project, node) {
|
|
|
7566
7572
|
title: `Missing library node (${prefabId})`
|
|
7567
7573
|
};
|
|
7568
7574
|
}
|
|
7575
|
+
const visualData = {
|
|
7576
|
+
...structuredClone(sourceNode.visualData),
|
|
7577
|
+
x: node.visualData.x,
|
|
7578
|
+
y: node.visualData.y,
|
|
7579
|
+
width: node.visualData.width ?? sourceNode.visualData.width,
|
|
7580
|
+
zIndex: node.visualData.zIndex
|
|
7581
|
+
};
|
|
7582
|
+
if (Array.isArray(node.visualData.dataBusChannelOrder))
|
|
7583
|
+
visualData.dataBusChannelOrder = [...node.visualData.dataBusChannelOrder];
|
|
7584
|
+
else delete visualData.dataBusChannelOrder;
|
|
7569
7585
|
return {
|
|
7570
7586
|
...structuredClone(sourceNode),
|
|
7571
7587
|
id: node.id,
|
|
7572
|
-
visualData
|
|
7573
|
-
...structuredClone(sourceNode.visualData),
|
|
7574
|
-
x: node.visualData.x,
|
|
7575
|
-
y: node.visualData.y,
|
|
7576
|
-
width: node.visualData.width ?? sourceNode.visualData.width,
|
|
7577
|
-
zIndex: node.visualData.zIndex
|
|
7578
|
-
}
|
|
7588
|
+
visualData
|
|
7579
7589
|
};
|
|
7580
7590
|
}
|
|
7581
7591
|
function detachNodePrefabInstance(project, node) {
|
|
@@ -22986,9 +22996,9 @@ function audioFormatToMediaType(format) {
|
|
|
22986
22996
|
|
|
22987
22997
|
// src/model/LegacyChatEditorCache.ts
|
|
22988
22998
|
var import_crypto_js2 = __toESM(require("crypto-js"), 1);
|
|
22989
|
-
var
|
|
22999
|
+
var import_safe_stable_stringify6 = __toESM(require("safe-stable-stringify"), 1);
|
|
22990
23000
|
function buildLegacyChatEditorCacheKey(parts) {
|
|
22991
|
-
const serialized = (0,
|
|
23001
|
+
const serialized = (0, import_safe_stable_stringify6.default)({ cacheVersion: 1, ...parts }) ?? "";
|
|
22992
23002
|
return `legacy-chat:v1:sha256:${import_crypto_js2.default.SHA256(serialized).toString(import_crypto_js2.default.enc.Hex)}`;
|
|
22993
23003
|
}
|
|
22994
23004
|
function resolveLegacyChatEditorCache(params) {
|
|
@@ -29391,11 +29401,11 @@ function getLLMChatV2EditorCacheEligibility(data) {
|
|
|
29391
29401
|
}
|
|
29392
29402
|
|
|
29393
29403
|
// src/model/chat-v2/chatV2EditorCache.ts
|
|
29394
|
-
var
|
|
29404
|
+
var import_safe_stable_stringify7 = __toESM(require("safe-stable-stringify"), 1);
|
|
29395
29405
|
var import_crypto_js3 = __toESM(require("crypto-js"), 1);
|
|
29396
29406
|
function buildLLMChatV2EditorCacheKey(parts) {
|
|
29397
29407
|
const { cacheVersion = 3, ...keyParts } = parts;
|
|
29398
|
-
return (0,
|
|
29408
|
+
return (0, import_safe_stable_stringify7.default)({ cacheVersion, ...keyParts }) ?? "";
|
|
29399
29409
|
}
|
|
29400
29410
|
function cloneLLMChatV2EditorCacheOutputs(outputs) {
|
|
29401
29411
|
return cloneExecutionOutputs(outputs);
|
|
@@ -29428,7 +29438,7 @@ function fingerprintCustomProviderBaseURL(value) {
|
|
|
29428
29438
|
}
|
|
29429
29439
|
try {
|
|
29430
29440
|
const endpoint = normalizeOpenAICompatibleEndpoint(value);
|
|
29431
|
-
return (0,
|
|
29441
|
+
return (0, import_safe_stable_stringify7.default)({
|
|
29432
29442
|
baseURL: endpoint.baseURL,
|
|
29433
29443
|
endpointQuery: endpoint.endpointQuery.map(([key, queryValue]) => [key, fingerprintSecret(queryValue) ?? ""])
|
|
29434
29444
|
}) ?? "";
|
|
@@ -29456,7 +29466,7 @@ function fingerprintRuntimeValueForCache(value) {
|
|
|
29456
29466
|
if (value == null) {
|
|
29457
29467
|
return void 0;
|
|
29458
29468
|
}
|
|
29459
|
-
return fingerprintSecret((0,
|
|
29469
|
+
return fingerprintSecret((0, import_safe_stable_stringify7.default)(value) ?? "");
|
|
29460
29470
|
}
|
|
29461
29471
|
function fingerprintProfileChainForCache(data, profiles) {
|
|
29462
29472
|
if (profiles == null) {
|
|
@@ -47036,7 +47046,7 @@ function getRetryDelayMs(retryAfter, attempt, deadline) {
|
|
|
47036
47046
|
|
|
47037
47047
|
// src/model/classifier/profile.ts
|
|
47038
47048
|
var import_crypto_js4 = __toESM(require("crypto-js"), 1);
|
|
47039
|
-
var
|
|
47049
|
+
var import_safe_stable_stringify8 = __toESM(require("safe-stable-stringify"), 1);
|
|
47040
47050
|
var DEFAULT_CLASSIFIER_PROFILE_RESPONSE_TIMEOUT_MS = 500;
|
|
47041
47051
|
var DEFAULT_CLASSIFIER_PROFILE_FAILURE_THRESHOLD = 3;
|
|
47042
47052
|
var DEFAULT_CLASSIFIER_PROFILE_FAILURE_WINDOW_MS = 3e5;
|
|
@@ -47173,7 +47183,7 @@ function resolveClassifierProfile(data, inputs, context) {
|
|
|
47173
47183
|
});
|
|
47174
47184
|
}
|
|
47175
47185
|
function classifierProfileHealthIdentity(profile, projectId, fallbackNodeId) {
|
|
47176
|
-
const hash = (value) => `sha256:${import_crypto_js4.default.SHA256((0,
|
|
47186
|
+
const hash = (value) => `sha256:${import_crypto_js4.default.SHA256((0, import_safe_stable_stringify8.default)(value) ?? "").toString(import_crypto_js4.default.enc.Hex)}`;
|
|
47177
47187
|
const configurationFingerprint = hash({
|
|
47178
47188
|
provider: profile.configuration.provider,
|
|
47179
47189
|
model: profile.configuration.model,
|
|
@@ -48833,7 +48843,7 @@ registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbed
|
|
|
48833
48843
|
|
|
48834
48844
|
// src/integrations/ManagedKnowledgeStore.ts
|
|
48835
48845
|
var import_crypto_js5 = __toESM(require("crypto-js"), 1);
|
|
48836
|
-
var
|
|
48846
|
+
var import_safe_stable_stringify9 = __toESM(require("safe-stable-stringify"), 1);
|
|
48837
48847
|
var MANAGED_SCHEMA_VERSION = "1";
|
|
48838
48848
|
var CHUNKER_VERSION = "1";
|
|
48839
48849
|
var ManagedKnowledgeStore = class {
|
|
@@ -49135,7 +49145,7 @@ async function waitForPromiseOrAbort(promise, signal) {
|
|
|
49135
49145
|
});
|
|
49136
49146
|
}
|
|
49137
49147
|
function createSourceVersion(documents, metadata, chunking) {
|
|
49138
|
-
const canonical = (0,
|
|
49148
|
+
const canonical = (0, import_safe_stable_stringify9.default)({
|
|
49139
49149
|
schemaVersion: MANAGED_SCHEMA_VERSION,
|
|
49140
49150
|
chunkerVersion: CHUNKER_VERSION,
|
|
49141
49151
|
documents,
|