@valerypopoff/rivet2-core 2.8.0 → 2.10.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 +508 -320
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/interpolationRuntime.cjs.map +2 -2
- package/dist/esm/model/GraphPreprocessor.js +11 -0
- package/dist/esm/model/GraphProcessor.js +60 -3
- package/dist/esm/model/LegacyChatEditorCache.js +50 -0
- package/dist/esm/model/NodeExclusionPolicy.js +1 -0
- package/dist/esm/model/Nodes.js +6 -0
- package/dist/esm/model/StreamingOutputWatch.js +18 -18
- package/dist/esm/model/chat-v2/chatV2Shared.js +2 -1
- package/dist/esm/model/chat-v2/llmChatV2NodeEditors.js +2 -1
- package/dist/esm/model/nodes/ChatNodeBase.js +18 -13
- package/dist/esm/model/nodes/CoalesceNewNode.js +22 -0
- package/dist/esm/model/nodes/CoalesceNode.js +15 -133
- package/dist/esm/model/nodes/CoalesceNodeBase.js +131 -0
- package/dist/esm/model/nodes/GraphCallPathNode.js +42 -0
- package/dist/esm/model/nodes/StopWatchingStreamingOutputNode.js +2 -0
- package/dist/esm/plugins/anthropic/nodes/ChatAnthropicNode.js +17 -15
- package/dist/esm/plugins/google/google.js +8 -128
- package/dist/esm/plugins/google/googleGenerativeAi.js +101 -0
- package/dist/esm/plugins/google/nodes/ChatGoogleNode.js +36 -15
- package/dist/types/model/GraphPreprocessor.d.ts +2 -0
- package/dist/types/model/GraphProcessor.d.ts +3 -1
- package/dist/types/model/LegacyChatEditorCache.d.ts +39 -0
- package/dist/types/model/Nodes.d.ts +4 -2
- package/dist/types/model/ProcessContext.d.ts +2 -0
- package/dist/types/model/StreamingOutputWatch.d.ts +13 -11
- package/dist/types/model/chat-v2/chatV2Shared.d.ts +1 -0
- package/dist/types/model/nodes/CoalesceNewNode.d.ts +10 -0
- package/dist/types/model/nodes/CoalesceNode.d.ts +9 -15
- package/dist/types/model/nodes/CoalesceNodeBase.d.ts +19 -0
- package/dist/types/model/nodes/GraphCallPathNode.d.ts +12 -0
- package/dist/types/plugins/google/google.d.ts +3 -110
- package/dist/types/plugins/google/googleGenerativeAi.d.ts +110 -0
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -54,6 +54,7 @@ __export(src_exports, {
|
|
|
54
54
|
ChatV2ProviderTimeoutError: () => ChatV2ProviderTimeoutError,
|
|
55
55
|
ChatV2ResponseValidationError: () => ChatV2ResponseValidationError,
|
|
56
56
|
ChunkNodeImpl: () => ChunkNodeImpl,
|
|
57
|
+
CoalesceNewNodeImpl: () => CoalesceNewNodeImpl,
|
|
57
58
|
CoalesceNodeImpl: () => CoalesceNodeImpl,
|
|
58
59
|
CodeNewNodeImpl: () => CodeNewNodeImpl,
|
|
59
60
|
CodeNodeImpl: () => CodeNodeImpl,
|
|
@@ -97,6 +98,7 @@ __export(src_exports, {
|
|
|
97
98
|
GetStoredValueNodeImpl: () => GetStoredValueNodeImpl,
|
|
98
99
|
GptFunctionNodeImpl: () => GptFunctionNodeImpl,
|
|
99
100
|
GptTokenizerTokenizer: () => GptTokenizerTokenizer,
|
|
101
|
+
GraphCallPathNodeImpl: () => GraphCallPathNodeImpl,
|
|
100
102
|
GraphInputNodeImpl: () => GraphInputNodeImpl,
|
|
101
103
|
GraphOutputNodeImpl: () => GraphOutputNodeImpl,
|
|
102
104
|
GraphProcessor: () => GraphProcessor,
|
|
@@ -177,6 +179,7 @@ __export(src_exports, {
|
|
|
177
179
|
Rivet: () => Rivet,
|
|
178
180
|
RivetLLMProfileHealthPolicyError: () => RivetLLMProfileHealthPolicyError,
|
|
179
181
|
RivetStoredValueController: () => RivetStoredValueController,
|
|
182
|
+
STREAM_RESPONSE_HELPER_MESSAGE: () => STREAM_RESPONSE_HELPER_MESSAGE,
|
|
180
183
|
SearchKnowledgeNodeImpl: () => SearchKnowledgeNodeImpl,
|
|
181
184
|
SetGlobalNodeImpl: () => SetGlobalNodeImpl,
|
|
182
185
|
SetStoredValueNodeImpl: () => SetStoredValueNodeImpl,
|
|
@@ -252,6 +255,8 @@ __export(src_exports, {
|
|
|
252
255
|
cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
|
|
253
256
|
cloneRivetStoredValue: () => cloneRivetStoredValue,
|
|
254
257
|
cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
|
|
258
|
+
coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
|
|
259
|
+
coalesceNewNode: () => coalesceNewNode,
|
|
255
260
|
coalesceNode: () => coalesceNode,
|
|
256
261
|
codeNewNode: () => codeNewNode,
|
|
257
262
|
codeNode: () => codeNode,
|
|
@@ -427,6 +432,7 @@ __export(src_exports, {
|
|
|
427
432
|
googlePlugin: () => googlePlugin,
|
|
428
433
|
googleThinkingLevelOptions: () => googleThinkingLevelOptions,
|
|
429
434
|
gptFunctionNode: () => gptFunctionNode,
|
|
435
|
+
graphCallPathNode: () => graphCallPathNode,
|
|
430
436
|
graphInputNode: () => graphInputNode,
|
|
431
437
|
graphOutputNode: () => graphOutputNode,
|
|
432
438
|
graphReferenceNode: () => graphReferenceNode,
|
|
@@ -710,6 +716,7 @@ __export(exports_exports, {
|
|
|
710
716
|
ChatV2ProviderTimeoutError: () => ChatV2ProviderTimeoutError,
|
|
711
717
|
ChatV2ResponseValidationError: () => ChatV2ResponseValidationError,
|
|
712
718
|
ChunkNodeImpl: () => ChunkNodeImpl,
|
|
719
|
+
CoalesceNewNodeImpl: () => CoalesceNewNodeImpl,
|
|
713
720
|
CoalesceNodeImpl: () => CoalesceNodeImpl,
|
|
714
721
|
CodeNewNodeImpl: () => CodeNewNodeImpl,
|
|
715
722
|
CodeNodeImpl: () => CodeNodeImpl,
|
|
@@ -753,6 +760,7 @@ __export(exports_exports, {
|
|
|
753
760
|
GetStoredValueNodeImpl: () => GetStoredValueNodeImpl,
|
|
754
761
|
GptFunctionNodeImpl: () => GptFunctionNodeImpl,
|
|
755
762
|
GptTokenizerTokenizer: () => GptTokenizerTokenizer,
|
|
763
|
+
GraphCallPathNodeImpl: () => GraphCallPathNodeImpl,
|
|
756
764
|
GraphInputNodeImpl: () => GraphInputNodeImpl,
|
|
757
765
|
GraphOutputNodeImpl: () => GraphOutputNodeImpl,
|
|
758
766
|
GraphProcessor: () => GraphProcessor,
|
|
@@ -832,6 +840,7 @@ __export(exports_exports, {
|
|
|
832
840
|
ReportProgressNodeImpl: () => ReportProgressNodeImpl,
|
|
833
841
|
RivetLLMProfileHealthPolicyError: () => RivetLLMProfileHealthPolicyError,
|
|
834
842
|
RivetStoredValueController: () => RivetStoredValueController,
|
|
843
|
+
STREAM_RESPONSE_HELPER_MESSAGE: () => STREAM_RESPONSE_HELPER_MESSAGE,
|
|
835
844
|
SearchKnowledgeNodeImpl: () => SearchKnowledgeNodeImpl,
|
|
836
845
|
SetGlobalNodeImpl: () => SetGlobalNodeImpl,
|
|
837
846
|
SetStoredValueNodeImpl: () => SetStoredValueNodeImpl,
|
|
@@ -907,6 +916,8 @@ __export(exports_exports, {
|
|
|
907
916
|
cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
|
|
908
917
|
cloneRivetStoredValue: () => cloneRivetStoredValue,
|
|
909
918
|
cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
|
|
919
|
+
coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
|
|
920
|
+
coalesceNewNode: () => coalesceNewNode,
|
|
910
921
|
coalesceNode: () => coalesceNode,
|
|
911
922
|
codeNewNode: () => codeNewNode,
|
|
912
923
|
codeNode: () => codeNode,
|
|
@@ -1082,6 +1093,7 @@ __export(exports_exports, {
|
|
|
1082
1093
|
googlePlugin: () => googlePlugin,
|
|
1083
1094
|
googleThinkingLevelOptions: () => googleThinkingLevelOptions,
|
|
1084
1095
|
gptFunctionNode: () => gptFunctionNode,
|
|
1096
|
+
graphCallPathNode: () => graphCallPathNode,
|
|
1085
1097
|
graphInputNode: () => graphInputNode,
|
|
1086
1098
|
graphOutputNode: () => graphOutputNode,
|
|
1087
1099
|
graphReferenceNode: () => graphReferenceNode,
|
|
@@ -1347,6 +1359,7 @@ var exhaustiveTuple = () => (
|
|
|
1347
1359
|
);
|
|
1348
1360
|
|
|
1349
1361
|
// src/model/chat-v2/chatV2Shared.ts
|
|
1362
|
+
var STREAM_RESPONSE_HELPER_MESSAGE = "Shows streamed response updates in the editor, including direct consumer previews. Ordinary consumers run after the final response; Watch Streaming Output branches can run during streaming.";
|
|
1350
1363
|
function createChatV2CommonNodeData(overrides = {}) {
|
|
1351
1364
|
return {
|
|
1352
1365
|
model: "gpt-4o",
|
|
@@ -1637,7 +1650,7 @@ function getCommonChatV2Editors(modelOptions) {
|
|
|
1637
1650
|
type: "toggle",
|
|
1638
1651
|
label: "Stream response",
|
|
1639
1652
|
dataKey: "useAsGraphPartialOutput",
|
|
1640
|
-
helperMessage:
|
|
1653
|
+
helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
|
|
1641
1654
|
}
|
|
1642
1655
|
]
|
|
1643
1656
|
}
|
|
@@ -6704,6 +6717,7 @@ function preprocessGraphState(options2) {
|
|
|
6704
6717
|
connections[connection.outputNodeId].push(connection);
|
|
6705
6718
|
}
|
|
6706
6719
|
const definitions = loadInputOutputDefinitions({
|
|
6720
|
+
inputAnchorDefinitions: options2.inputAnchorDefinitions,
|
|
6707
6721
|
connections,
|
|
6708
6722
|
loadedProjects,
|
|
6709
6723
|
nodeInstances,
|
|
@@ -6763,10 +6777,16 @@ function toReusableGraphExecutionPlan(preprocessedGraph) {
|
|
|
6763
6777
|
};
|
|
6764
6778
|
}
|
|
6765
6779
|
function loadInputOutputDefinitions(options2) {
|
|
6780
|
+
var _a, _b;
|
|
6766
6781
|
const { connections, definitionContext, loadedProjects, nodeInstances, nodesById, project, warnOnInvalidGraph } = options2;
|
|
6767
6782
|
const definitions = {};
|
|
6768
6783
|
if (!definitionContext) {
|
|
6769
6784
|
for (const node of values(nodesById)) {
|
|
6785
|
+
const anchorDefinitions = (_a = options2.inputAnchorDefinitions) == null ? void 0 : _a[node.id];
|
|
6786
|
+
if (anchorDefinitions) {
|
|
6787
|
+
definitions[node.id] = anchorDefinitions;
|
|
6788
|
+
continue;
|
|
6789
|
+
}
|
|
6770
6790
|
const connectionsForNode = connections[node.id] ?? [];
|
|
6771
6791
|
const inputDefinitions = nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
|
|
6772
6792
|
connectionsForNode,
|
|
@@ -6822,6 +6842,11 @@ function loadInputOutputDefinitions(options2) {
|
|
|
6822
6842
|
return definitions;
|
|
6823
6843
|
}
|
|
6824
6844
|
for (const node of values(nodesById)) {
|
|
6845
|
+
const anchorDefinitions = (_b = options2.inputAnchorDefinitions) == null ? void 0 : _b[node.id];
|
|
6846
|
+
if (anchorDefinitions) {
|
|
6847
|
+
definitions[node.id] = anchorDefinitions;
|
|
6848
|
+
continue;
|
|
6849
|
+
}
|
|
6825
6850
|
const connectionsForNode = connections[node.id] ?? [];
|
|
6826
6851
|
const nodeDefinitionContext = usesGraphBoundaryDefinitionContext(node) ? definitionContext : void 0;
|
|
6827
6852
|
const inputDefinitions = nodeDefinitionContext ? nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
|
|
@@ -6997,7 +7022,7 @@ function buildGraphExecutionPlan(options2) {
|
|
|
6997
7022
|
}
|
|
6998
7023
|
|
|
6999
7024
|
// src/model/GraphBoundaryCache.ts
|
|
7000
|
-
function getGraphBoundary(project, graphId2,
|
|
7025
|
+
function getGraphBoundary(project, graphId2, cache) {
|
|
7001
7026
|
if (!graphId2) {
|
|
7002
7027
|
return void 0;
|
|
7003
7028
|
}
|
|
@@ -7005,15 +7030,15 @@ function getGraphBoundary(project, graphId2, cache4) {
|
|
|
7005
7030
|
if (!graph) {
|
|
7006
7031
|
return void 0;
|
|
7007
7032
|
}
|
|
7008
|
-
if (!
|
|
7033
|
+
if (!cache) {
|
|
7009
7034
|
return deriveGraphBoundary(graph);
|
|
7010
7035
|
}
|
|
7011
|
-
const cached =
|
|
7036
|
+
const cached = cache.get(graph);
|
|
7012
7037
|
if (cached) {
|
|
7013
7038
|
return cached;
|
|
7014
7039
|
}
|
|
7015
7040
|
const boundary = deriveGraphBoundary(graph);
|
|
7016
|
-
|
|
7041
|
+
cache.set(graph, boundary);
|
|
7017
7042
|
return boundary;
|
|
7018
7043
|
}
|
|
7019
7044
|
function applyGraphBoundaryPortOrder(boundaryItems, portOrder) {
|
|
@@ -8969,6 +8994,7 @@ var nodesAllowedToConsumeExcludedValue = /* @__PURE__ */ new Set([
|
|
|
8969
8994
|
"if",
|
|
8970
8995
|
"ifElse",
|
|
8971
8996
|
"coalesce",
|
|
8997
|
+
"coalesceNew",
|
|
8972
8998
|
"graphOutput",
|
|
8973
8999
|
"raceInputs",
|
|
8974
9000
|
"loopController"
|
|
@@ -9799,7 +9825,6 @@ var StreamingOutputWatch = class {
|
|
|
9799
9825
|
#options;
|
|
9800
9826
|
#run;
|
|
9801
9827
|
#onFailure;
|
|
9802
|
-
#requiresAcceptedStop;
|
|
9803
9828
|
#queue = [];
|
|
9804
9829
|
#activeRuns = /* @__PURE__ */ new Set();
|
|
9805
9830
|
#timer;
|
|
@@ -9813,7 +9838,7 @@ var StreamingOutputWatch = class {
|
|
|
9813
9838
|
#coalescedUpdates = 0;
|
|
9814
9839
|
#droppedUpdates = 0;
|
|
9815
9840
|
#maximumQueuedUpdates = 0;
|
|
9816
|
-
constructor(options2, run, onFailure
|
|
9841
|
+
constructor(options2, run, onFailure) {
|
|
9817
9842
|
this.#options = {
|
|
9818
9843
|
triggerMode: options2.triggerMode === "interval" ? "interval" : "every-update",
|
|
9819
9844
|
executionMode: options2.executionMode === "parallel" ? "parallel" : "sequential",
|
|
@@ -9836,7 +9861,6 @@ var StreamingOutputWatch = class {
|
|
|
9836
9861
|
};
|
|
9837
9862
|
this.#run = run;
|
|
9838
9863
|
this.#onFailure = onFailure;
|
|
9839
|
-
this.#requiresAcceptedStop = requiresAcceptedStop;
|
|
9840
9864
|
}
|
|
9841
9865
|
get hasPending() {
|
|
9842
9866
|
return this.#activeRuns.size > 0 || !this.#stopped && (this.#queue.length > 0 || this.#timer != null);
|
|
@@ -9851,6 +9875,15 @@ var StreamingOutputWatch = class {
|
|
|
9851
9875
|
get isSettled() {
|
|
9852
9876
|
return !this.hasPending && (this.#stopped || this.#failure != null || this.#producerFinished);
|
|
9853
9877
|
}
|
|
9878
|
+
/**
|
|
9879
|
+
* The producer delivered its final snapshot and every scheduled invocation
|
|
9880
|
+
* settled without cancellation or failure. The scheduler deliberately does
|
|
9881
|
+
* not infer graph topology; GraphProcessor decides whether this means a
|
|
9882
|
+
* parent Stop must be excluded.
|
|
9883
|
+
*/
|
|
9884
|
+
get finishedNormally() {
|
|
9885
|
+
return !this.#stopped && this.#failure == null && this.#producerFinished && this.#finalSnapshotSettled && !this.hasPending;
|
|
9886
|
+
}
|
|
9854
9887
|
get runtimeSummary() {
|
|
9855
9888
|
return {
|
|
9856
9889
|
receivedUpdates: this.#receivedUpdates,
|
|
@@ -9860,14 +9893,6 @@ var StreamingOutputWatch = class {
|
|
|
9860
9893
|
...this.#failureKind === void 0 ? {} : { failureKind: this.#failureKind }
|
|
9861
9894
|
};
|
|
9862
9895
|
}
|
|
9863
|
-
/**
|
|
9864
|
-
* A Stop boundary can enqueue ordinary parent-graph work when its node
|
|
9865
|
-
* completes. Until it settles, its result is not safe to expose
|
|
9866
|
-
* through the foreground-output boundary.
|
|
9867
|
-
*/
|
|
9868
|
-
get canAffectForegroundOutputs() {
|
|
9869
|
-
return this.#requiresAcceptedStop;
|
|
9870
|
-
}
|
|
9871
9896
|
publish(snapshot) {
|
|
9872
9897
|
if (this.#stopped || this.#failure || this.#producerFinished) {
|
|
9873
9898
|
return;
|
|
@@ -9919,12 +9944,6 @@ var StreamingOutputWatch = class {
|
|
|
9919
9944
|
}
|
|
9920
9945
|
await Promise.all([...this.#activeRuns].map((run) => run.promise));
|
|
9921
9946
|
}
|
|
9922
|
-
if (this.#producerFinished && this.#finalSnapshotSettled && !this.#stopped && this.#requiresAcceptedStop) {
|
|
9923
|
-
this.#fail(
|
|
9924
|
-
new Error("The watched streaming output completed before Stop Watching Streaming Output accepted a value."),
|
|
9925
|
-
"missing-stop"
|
|
9926
|
-
);
|
|
9927
|
-
}
|
|
9928
9947
|
}
|
|
9929
9948
|
#scheduleInterval() {
|
|
9930
9949
|
if (this.#timer != null) {
|
|
@@ -11242,6 +11261,7 @@ var NotAllowedCodeRunner = class {
|
|
|
11242
11261
|
// src/model/GraphProcessor.ts
|
|
11243
11262
|
var graphProcessorGraphOverride = Symbol("graphProcessorGraphOverride");
|
|
11244
11263
|
var consumedAsyncBranchTriggerOverride = Symbol("consumedAsyncBranchTriggerOverride");
|
|
11264
|
+
var asyncBranchInputAnchorsOverride = Symbol("asyncBranchInputAnchorsOverride");
|
|
11245
11265
|
var consumedStreamingWatchNodeOverride = Symbol("consumedStreamingWatchNodeOverride");
|
|
11246
11266
|
function isNamedGraphBoundaryCaller(node) {
|
|
11247
11267
|
return node.type === "subGraph" || node.type === "referencedGraphAlias";
|
|
@@ -11356,6 +11376,7 @@ function replaceRecordContents(target, source) {
|
|
|
11356
11376
|
var GraphProcessor = class _GraphProcessor {
|
|
11357
11377
|
// Per-instance state
|
|
11358
11378
|
#graph;
|
|
11379
|
+
#graphCallPath;
|
|
11359
11380
|
#project;
|
|
11360
11381
|
#nodesById;
|
|
11361
11382
|
#nodeInstances;
|
|
@@ -11379,6 +11400,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11379
11400
|
#effectiveConnectionsForRun;
|
|
11380
11401
|
#asyncBranchPlansByTriggerNodeId = /* @__PURE__ */ new Map();
|
|
11381
11402
|
#consumedAsyncBranchTriggerNodeId;
|
|
11403
|
+
#asyncBranchInputAnchors;
|
|
11382
11404
|
#streamingWatchPlansBySourceNodeId = /* @__PURE__ */ new Map();
|
|
11383
11405
|
#streamingWatchPlansByWatchNodeId = /* @__PURE__ */ new Map();
|
|
11384
11406
|
#streamingOutputWatches = /* @__PURE__ */ new Map();
|
|
@@ -11428,6 +11450,11 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11428
11450
|
#graphOutputs = void 0;
|
|
11429
11451
|
#executionCache = void 0;
|
|
11430
11452
|
#queuedNodes = void 0;
|
|
11453
|
+
/**
|
|
11454
|
+
* Nodes deferred only because Run To reached its initial scheduler quiescence.
|
|
11455
|
+
* A streaming Stop can legitimately resume one of those selected paths later.
|
|
11456
|
+
*/
|
|
11457
|
+
#deferredRunToIgnoredNodes = void 0;
|
|
11431
11458
|
#loopControllersSeen = void 0;
|
|
11432
11459
|
#subprocessors = void 0;
|
|
11433
11460
|
#contextValues = void 0;
|
|
@@ -11509,12 +11536,14 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11509
11536
|
}
|
|
11510
11537
|
}
|
|
11511
11538
|
constructor(project, graphId2, registry, includeTrace, options2) {
|
|
11539
|
+
var _a;
|
|
11512
11540
|
this.#project = project;
|
|
11513
11541
|
const graph = (options2 == null ? void 0 : options2[graphProcessorGraphOverride]) ?? resolveProcessorGraph(project, graphId2);
|
|
11514
11542
|
if (!graph) {
|
|
11515
11543
|
throw new Error(`Graph ${graphId2} not found in project`);
|
|
11516
11544
|
}
|
|
11517
11545
|
this.#graph = graph;
|
|
11546
|
+
this.#graphCallPath = Object.freeze([((_a = graph.metadata) == null ? void 0 : _a.name) || "(Unnamed Graph)"]);
|
|
11518
11547
|
this.#includeTrace = includeTrace;
|
|
11519
11548
|
this.#nodeInstances = {};
|
|
11520
11549
|
this.#connections = {};
|
|
@@ -11528,6 +11557,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11528
11557
|
this.#runtimeProfiler = options2 == null ? void 0 : options2.runtimeProfiler;
|
|
11529
11558
|
this.#captureNodeTimings = (options2 == null ? void 0 : options2.captureNodeTimings) ?? false;
|
|
11530
11559
|
this.#consumedAsyncBranchTriggerNodeId = options2 == null ? void 0 : options2[consumedAsyncBranchTriggerOverride];
|
|
11560
|
+
this.#asyncBranchInputAnchors = options2 == null ? void 0 : options2[asyncBranchInputAnchorsOverride];
|
|
11531
11561
|
this.#consumedStreamingWatchNodeId = options2 == null ? void 0 : options2[consumedStreamingWatchNodeOverride];
|
|
11532
11562
|
this.#emitter.bindMethods(this, ["on", "off", "once", "onAny", "offAny"]);
|
|
11533
11563
|
this.setExternalFunction("echo", async (value) => ({ type: "any", value }));
|
|
@@ -11552,6 +11582,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11552
11582
|
return;
|
|
11553
11583
|
}
|
|
11554
11584
|
const preprocessedGraph = preprocessGraphState({
|
|
11585
|
+
inputAnchorDefinitions: this.#asyncBranchInputAnchors,
|
|
11555
11586
|
graph: this.#graph,
|
|
11556
11587
|
loadedProjects: this.#loadedProjects,
|
|
11557
11588
|
project: this.#project,
|
|
@@ -11874,6 +11905,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11874
11905
|
this.#graphOutputs = ((_b = this.#sharedRunStateOverride) == null ? void 0 : _b.graphOutputs) ?? {};
|
|
11875
11906
|
this.#executionCache ??= /* @__PURE__ */ new Map();
|
|
11876
11907
|
this.#queuedNodes = /* @__PURE__ */ new Set();
|
|
11908
|
+
this.#deferredRunToIgnoredNodes = /* @__PURE__ */ new Set();
|
|
11877
11909
|
this.#connectedToolContinuationHost.reset();
|
|
11878
11910
|
this.#continuationCompletionOwnerByNodeId = /* @__PURE__ */ new Map();
|
|
11879
11911
|
this.#effectiveConnectionsForRun = void 0;
|
|
@@ -12087,6 +12119,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12087
12119
|
graphInputNodeValues: this.#graphInputNodeValues,
|
|
12088
12120
|
graphInputs: this.#graphInputs,
|
|
12089
12121
|
graphOutputs: this.#graphOutputs,
|
|
12122
|
+
graphCallPath: this.#graphCallPath,
|
|
12090
12123
|
onChatV2CallFinished: (event) => {
|
|
12091
12124
|
try {
|
|
12092
12125
|
const observerResult = hostChatV2Observer == null ? void 0 : hostChatV2Observer(event);
|
|
@@ -12350,8 +12383,9 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12350
12383
|
return;
|
|
12351
12384
|
}
|
|
12352
12385
|
for (const node of this.#executionGraphNodes) {
|
|
12353
|
-
if (this.#queuedNodes.has(node.id) === false) {
|
|
12386
|
+
if (this.#queuedNodes.has(node.id) === false && !this.#ignoreNodes.has(node.id)) {
|
|
12354
12387
|
this.#ignoreNodes.add(node.id);
|
|
12388
|
+
this.#deferredRunToIgnoredNodes.add(node.id);
|
|
12355
12389
|
}
|
|
12356
12390
|
}
|
|
12357
12391
|
}
|
|
@@ -12758,6 +12792,12 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12758
12792
|
}
|
|
12759
12793
|
#queueOutputNodes(node, outputNodes) {
|
|
12760
12794
|
const selectedOutputs = this.#graphOutputSelection ? outputNodes.filter((outputNode) => this.#isNodeSelected(outputNode.id)) : outputNodes;
|
|
12795
|
+
const relevantNodeIds = this.#getExecutionRelevantNodeIds();
|
|
12796
|
+
for (const outputNode of selectedOutputs) {
|
|
12797
|
+
if ((relevantNodeIds == null ? void 0 : relevantNodeIds.has(outputNode.id)) && this.#deferredRunToIgnoredNodes.delete(outputNode.id)) {
|
|
12798
|
+
this.#ignoreNodes.delete(outputNode.id);
|
|
12799
|
+
}
|
|
12800
|
+
}
|
|
12761
12801
|
void this.#processingQueue.addAll(
|
|
12762
12802
|
selectedOutputs.map((outputNode) => async () => {
|
|
12763
12803
|
this.#emitTraceEvent(`Trying to run output node from ${node.title}: ${outputNode.title} (${outputNode.id})`);
|
|
@@ -12830,7 +12870,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12830
12870
|
runtimeProfiler: this.#runtimeProfiler,
|
|
12831
12871
|
scheduler: this.#scheduler,
|
|
12832
12872
|
[graphProcessorGraphOverride]: plan.graph,
|
|
12833
|
-
[consumedAsyncBranchTriggerOverride]: triggerNode.id
|
|
12873
|
+
[consumedAsyncBranchTriggerOverride]: triggerNode.id,
|
|
12874
|
+
[asyncBranchInputAnchorsOverride]: Object.fromEntries(
|
|
12875
|
+
plan.graph.connections.filter((connection) => connection.inputNodeId === triggerNode.id).map((connection) => [connection.outputNodeId, this.#definitions[connection.outputNodeId]])
|
|
12876
|
+
)
|
|
12834
12877
|
});
|
|
12835
12878
|
onProcessorCreated(processor);
|
|
12836
12879
|
processor.executor = this.executor;
|
|
@@ -12839,6 +12882,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12839
12882
|
processor.#externalFunctions = this.#externalFunctions;
|
|
12840
12883
|
processor.#contextValues = this.#contextValues;
|
|
12841
12884
|
processor.#parent = sameGraphOwner;
|
|
12885
|
+
processor.#graphCallPath = this.#graphCallPath;
|
|
12842
12886
|
processor.#abortOwnerOverride = root;
|
|
12843
12887
|
processor.#suppressGraphPartialOutputs = true;
|
|
12844
12888
|
processor.#globals = this.#globals;
|
|
@@ -13645,6 +13689,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13645
13689
|
processor.#externalFunctions = this.#externalFunctions;
|
|
13646
13690
|
processor.#contextValues = this.#contextValues;
|
|
13647
13691
|
processor.#parent = this;
|
|
13692
|
+
processor.#graphCallPath = this.#graphCallPath;
|
|
13648
13693
|
processor.#abortOwnerOverride = this.#abortOwnerOverride ?? this;
|
|
13649
13694
|
processor.#sameGraphRunOwnerOverride = this.#sameGraphRunOwnerOverride ?? this;
|
|
13650
13695
|
processor.#globals = this.#globals;
|
|
@@ -13951,7 +13996,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13951
13996
|
watchNode,
|
|
13952
13997
|
nextUpdateIndex: 0,
|
|
13953
13998
|
history: new StreamingOutputWatchHistory(),
|
|
13954
|
-
historySummaryEmitted: false
|
|
13999
|
+
historySummaryEmitted: false,
|
|
14000
|
+
unmatchedStopResolved: false
|
|
13955
14001
|
};
|
|
13956
14002
|
const plans = this.#streamingWatchPlansBySourceNodeId.get(sourceNode.id) ?? [];
|
|
13957
14003
|
plans.push(plan);
|
|
@@ -13960,8 +14006,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13960
14006
|
const watch = new StreamingOutputWatch(
|
|
13961
14007
|
watchNode.data,
|
|
13962
14008
|
(snapshot, registerCancel) => this.#runStreamingOutputWatchInvocation(plan, snapshot, registerCancel),
|
|
13963
|
-
(error) => this.#recordStreamingWatchFailure(watchNode, error)
|
|
13964
|
-
{ requiresAcceptedStop: stopNodeId != null }
|
|
14009
|
+
(error) => this.#recordStreamingWatchFailure(watchNode, error)
|
|
13965
14010
|
);
|
|
13966
14011
|
this.#streamingOutputWatches.set(watchNode.id, watch);
|
|
13967
14012
|
for (const nodeId of [watchNode.id, ...branchNodeIds]) {
|
|
@@ -14238,6 +14283,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14238
14283
|
processor.#externalFunctions = this.#externalFunctions;
|
|
14239
14284
|
processor.#contextValues = this.#contextValues;
|
|
14240
14285
|
processor.#parent = this;
|
|
14286
|
+
processor.#graphCallPath = this.#graphCallPath;
|
|
14241
14287
|
processor.#abortOwnerOverride = root;
|
|
14242
14288
|
processor.#suppressGraphPartialOutputs = true;
|
|
14243
14289
|
processor.#globals = this.#globals;
|
|
@@ -14387,9 +14433,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14387
14433
|
return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending);
|
|
14388
14434
|
}
|
|
14389
14435
|
#hasUnresolvedForegroundOutputStreamingWatch() {
|
|
14390
|
-
return [...this.#streamingOutputWatches
|
|
14391
|
-
|
|
14392
|
-
|
|
14436
|
+
return [...this.#streamingOutputWatches].some(([watchNodeId, watch]) => {
|
|
14437
|
+
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
14438
|
+
return (plan == null ? void 0 : plan.stopNodeId) != null && !plan.unmatchedStopResolved && !watch.stopped;
|
|
14439
|
+
});
|
|
14393
14440
|
}
|
|
14394
14441
|
#hasDrainableStreamingOutputWatches() {
|
|
14395
14442
|
return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending && !watch.isAwaitingProducer);
|
|
@@ -14408,6 +14455,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14408
14455
|
await watch.drain();
|
|
14409
14456
|
}
|
|
14410
14457
|
await this.#processingQueue.onIdle();
|
|
14458
|
+
this.#resolveUnmatchedStreamingWatchStops();
|
|
14459
|
+
await this.#processingQueue.onIdle();
|
|
14411
14460
|
} while (this.#hasDrainableStreamingOutputWatches());
|
|
14412
14461
|
for (const [watchNodeId, watch] of this.#streamingOutputWatches) {
|
|
14413
14462
|
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
@@ -14423,7 +14472,27 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14423
14472
|
);
|
|
14424
14473
|
}
|
|
14425
14474
|
}
|
|
14475
|
+
#resolveUnmatchedStreamingWatchStops() {
|
|
14476
|
+
for (const [watchNodeId, watch] of this.#streamingOutputWatches) {
|
|
14477
|
+
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
14478
|
+
if (!(plan == null ? void 0 : plan.stopNodeId) || plan.unmatchedStopResolved || !watch.finishedNormally) {
|
|
14479
|
+
continue;
|
|
14480
|
+
}
|
|
14481
|
+
const stopNode = this.#nodesById[plan.stopNodeId];
|
|
14482
|
+
if (!stopNode) {
|
|
14483
|
+
throw new Error(`Watch Streaming Output "${plan.watchNode.title}" lost its Stop Watching Streaming Output node.`);
|
|
14484
|
+
}
|
|
14485
|
+
plan.unmatchedStopResolved = true;
|
|
14486
|
+
this.#excludeNode(
|
|
14487
|
+
stopNode,
|
|
14488
|
+
(0, import_non_secure7.nanoid)(),
|
|
14489
|
+
{},
|
|
14490
|
+
"stream completed without Stop Watching Streaming Output accepting a value"
|
|
14491
|
+
);
|
|
14492
|
+
}
|
|
14493
|
+
}
|
|
14426
14494
|
#prepareAsyncBranchTopology() {
|
|
14495
|
+
var _a;
|
|
14427
14496
|
const connections = this.#getEffectiveConnections().filter(
|
|
14428
14497
|
(connection) => this.#isDefinitionValidConnection(connection)
|
|
14429
14498
|
);
|
|
@@ -14440,6 +14509,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14440
14509
|
incomingByNodeId.set(connection.inputNodeId, incoming);
|
|
14441
14510
|
}
|
|
14442
14511
|
for (const triggerNode of Object.values(this.#nodesById)) {
|
|
14512
|
+
if ((_a = this.#asyncBranchInputAnchors) == null ? void 0 : _a[triggerNode.id]) continue;
|
|
14443
14513
|
if (triggerNode.type !== "startBackgroundBranch" || triggerNode.disabled || !isRelevant(triggerNode.id)) {
|
|
14444
14514
|
continue;
|
|
14445
14515
|
}
|
|
@@ -14662,7 +14732,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14662
14732
|
});
|
|
14663
14733
|
}
|
|
14664
14734
|
#createSubProcessor(node, index, processId, subGraphId, { signal, project } = {}) {
|
|
14665
|
-
var _a, _b;
|
|
14735
|
+
var _a, _b, _c;
|
|
14666
14736
|
const subprocessorProject = project ?? this.#project;
|
|
14667
14737
|
const subprocessorGraph = resolveProcessorGraph(subprocessorProject, subGraphId);
|
|
14668
14738
|
const initialExecutionPlan = subprocessorGraph && this.#canUseRuntimeExecutionPlanCacheFor(subprocessorProject, true) ? (_b = (_a = this.#runtimeCache) == null ? void 0 : _a.executionPlans) == null ? void 0 : _b.get(subprocessorGraph) : void 0;
|
|
@@ -14688,6 +14758,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14688
14758
|
processor.#externalFunctions = this.#externalFunctions;
|
|
14689
14759
|
processor.#contextValues = this.#contextValues;
|
|
14690
14760
|
processor.#parent = this;
|
|
14761
|
+
processor.#graphCallPath = Object.freeze([
|
|
14762
|
+
...this.#graphCallPath,
|
|
14763
|
+
((_c = processor.#graph.metadata) == null ? void 0 : _c.name) || "(Unnamed Graph)"
|
|
14764
|
+
]);
|
|
14691
14765
|
processor.#globals = this.#globals;
|
|
14692
14766
|
processor.#storedValueController = this.#storedValueController;
|
|
14693
14767
|
processor.#knowledgeStoreController = this.#knowledgeStoreController;
|
|
@@ -20065,8 +20139,42 @@ function audioFormatToMediaType(format) {
|
|
|
20065
20139
|
}
|
|
20066
20140
|
}
|
|
20067
20141
|
|
|
20142
|
+
// src/model/LegacyChatEditorCache.ts
|
|
20143
|
+
var import_crypto_js2 = __toESM(require("crypto-js"), 1);
|
|
20144
|
+
var import_safe_stable_stringify5 = __toESM(require("safe-stable-stringify"), 1);
|
|
20145
|
+
function buildLegacyChatEditorCacheKey(parts) {
|
|
20146
|
+
const serialized = (0, import_safe_stable_stringify5.default)({ cacheVersion: 1, ...parts }) ?? "";
|
|
20147
|
+
return `legacy-chat:v1:sha256:${import_crypto_js2.default.SHA256(serialized).toString(import_crypto_js2.default.enc.Hex)}`;
|
|
20148
|
+
}
|
|
20149
|
+
function resolveLegacyChatEditorCache(params) {
|
|
20150
|
+
var _a;
|
|
20151
|
+
if (!params.enabled) {
|
|
20152
|
+
return { cache: void 0, cachedOutputs: void 0 };
|
|
20153
|
+
}
|
|
20154
|
+
const cache = params.context.editorExecutionCache ?? params.context.executionCache;
|
|
20155
|
+
if (cache == null) {
|
|
20156
|
+
return { cache: void 0, cachedOutputs: void 0 };
|
|
20157
|
+
}
|
|
20158
|
+
const cacheKey = buildLegacyChatEditorCacheKey({
|
|
20159
|
+
graphId: (_a = params.context.execution) == null ? void 0 : _a.graphId,
|
|
20160
|
+
nodeId: params.context.node.id,
|
|
20161
|
+
nodeType: params.context.node.type,
|
|
20162
|
+
providerIdentity: params.providerIdentity,
|
|
20163
|
+
request: params.request
|
|
20164
|
+
});
|
|
20165
|
+
const cached = cache.get(cacheKey);
|
|
20166
|
+
return {
|
|
20167
|
+
cache: { cache, cacheKey },
|
|
20168
|
+
cachedOutputs: cached == null ? void 0 : cloneExecutionOutputs(cached)
|
|
20169
|
+
};
|
|
20170
|
+
}
|
|
20171
|
+
function writeLegacyChatEditorCache(cache, outputs) {
|
|
20172
|
+
if (cache != null) {
|
|
20173
|
+
cache.cache.set(cache.cacheKey, cloneExecutionOutputs(outputs));
|
|
20174
|
+
}
|
|
20175
|
+
}
|
|
20176
|
+
|
|
20068
20177
|
// src/model/nodes/ChatNodeBase.ts
|
|
20069
|
-
var cache = /* @__PURE__ */ new Map();
|
|
20070
20178
|
var ChatNodeBase = {
|
|
20071
20179
|
defaultData: () => ({
|
|
20072
20180
|
model: "gpt-5",
|
|
@@ -20707,9 +20815,9 @@ var ChatNodeBase = {
|
|
|
20707
20815
|
},
|
|
20708
20816
|
{
|
|
20709
20817
|
type: "toggle",
|
|
20710
|
-
label: "Cache
|
|
20818
|
+
label: "Cache outputs (editor only)",
|
|
20711
20819
|
dataKey: "cache",
|
|
20712
|
-
helperMessage: "
|
|
20820
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
20713
20821
|
},
|
|
20714
20822
|
{
|
|
20715
20823
|
type: "toggle",
|
|
@@ -20851,13 +20959,19 @@ var ChatNodeBase = {
|
|
|
20851
20959
|
options2.temperature = useTopP ? void 0 : temperature;
|
|
20852
20960
|
options2.max_tokens = maxTokens;
|
|
20853
20961
|
}
|
|
20854
|
-
const
|
|
20855
|
-
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
|
|
20859
|
-
|
|
20860
|
-
|
|
20962
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
20963
|
+
context,
|
|
20964
|
+
enabled: data.cache && !data.enableFunctionUse,
|
|
20965
|
+
providerIdentity: {
|
|
20966
|
+
apiKey: context.settings.openAiKey ?? "",
|
|
20967
|
+
organization: context.settings.openAiOrganization,
|
|
20968
|
+
headers: allAdditionalHeaders
|
|
20969
|
+
},
|
|
20970
|
+
request: options2
|
|
20971
|
+
});
|
|
20972
|
+
if (cachedOutputs != null) {
|
|
20973
|
+
(_a2 = context.markResultAsEditorCacheHit) == null ? void 0 : _a2.call(context);
|
|
20974
|
+
return cachedOutputs;
|
|
20861
20975
|
}
|
|
20862
20976
|
const startTime = Date.now();
|
|
20863
20977
|
if (isO1Beta || audio) {
|
|
@@ -20885,7 +20999,7 @@ var ChatNodeBase = {
|
|
|
20885
20999
|
durationMs: Date.now() - startTime
|
|
20886
21000
|
});
|
|
20887
21001
|
Object.freeze(output);
|
|
20888
|
-
cache
|
|
21002
|
+
writeLegacyChatEditorCache(cache, output);
|
|
20889
21003
|
return output;
|
|
20890
21004
|
}
|
|
20891
21005
|
const chunks = streamChatCompletions({
|
|
@@ -20917,7 +21031,7 @@ var ChatNodeBase = {
|
|
|
20917
21031
|
});
|
|
20918
21032
|
output["duration"] = { type: "number", value: Date.now() - startTime };
|
|
20919
21033
|
Object.freeze(output);
|
|
20920
|
-
cache
|
|
21034
|
+
writeLegacyChatEditorCache(cache, output);
|
|
20921
21035
|
return output;
|
|
20922
21036
|
},
|
|
20923
21037
|
{
|
|
@@ -21204,23 +21318,17 @@ var AnthropicError = class extends Error {
|
|
|
21204
21318
|
}
|
|
21205
21319
|
};
|
|
21206
21320
|
|
|
21207
|
-
// src/plugins/google/
|
|
21321
|
+
// src/plugins/google/googleGenerativeAi.ts
|
|
21208
21322
|
var import_genai = require("@google/genai");
|
|
21209
21323
|
var googleModelsDeprecated = {
|
|
21210
21324
|
"gemini-pro": {
|
|
21211
21325
|
maxTokens: 32760,
|
|
21212
|
-
cost: {
|
|
21213
|
-
prompt: NaN,
|
|
21214
|
-
completion: NaN
|
|
21215
|
-
},
|
|
21326
|
+
cost: { prompt: NaN, completion: NaN },
|
|
21216
21327
|
displayName: "Gemini Pro"
|
|
21217
21328
|
},
|
|
21218
21329
|
"gemini-pro-vision": {
|
|
21219
21330
|
maxTokens: 16384,
|
|
21220
|
-
cost: {
|
|
21221
|
-
prompt: NaN,
|
|
21222
|
-
completion: NaN
|
|
21223
|
-
},
|
|
21331
|
+
cost: { prompt: NaN, completion: NaN },
|
|
21224
21332
|
displayName: "Gemini Pro Vision"
|
|
21225
21333
|
}
|
|
21226
21334
|
};
|
|
@@ -21237,34 +21345,22 @@ var generativeAiGoogleModels = {
|
|
|
21237
21345
|
},
|
|
21238
21346
|
"gemini-2.5-flash": {
|
|
21239
21347
|
maxTokens: 1048576,
|
|
21240
|
-
cost: {
|
|
21241
|
-
prompt: 0.3 / 1e3,
|
|
21242
|
-
completion: 2.5 / 1e3
|
|
21243
|
-
},
|
|
21348
|
+
cost: { prompt: 0.3 / 1e3, completion: 2.5 / 1e3 },
|
|
21244
21349
|
displayName: "Gemini 2.5 Flash"
|
|
21245
21350
|
},
|
|
21246
21351
|
"gemini-2.5-flash-lite-preview-06-17": {
|
|
21247
21352
|
maxTokens: 1e6,
|
|
21248
|
-
cost: {
|
|
21249
|
-
prompt: 0.1 / 1e3,
|
|
21250
|
-
completion: 0.4 / 1e3
|
|
21251
|
-
},
|
|
21353
|
+
cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
|
|
21252
21354
|
displayName: "Gemini 2.5 Flash Lite Preview"
|
|
21253
21355
|
},
|
|
21254
21356
|
"gemini-2.0-flash": {
|
|
21255
21357
|
maxTokens: 1048576,
|
|
21256
|
-
cost: {
|
|
21257
|
-
prompt: 0.1 / 1e3,
|
|
21258
|
-
completion: 0.4 / 1e3
|
|
21259
|
-
},
|
|
21358
|
+
cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
|
|
21260
21359
|
displayName: "Gemini 2.0 Flash"
|
|
21261
21360
|
},
|
|
21262
21361
|
"gemini-2.0-flash-lite": {
|
|
21263
21362
|
maxTokens: 1048576,
|
|
21264
|
-
cost: {
|
|
21265
|
-
prompt: 0.075 / 1e3,
|
|
21266
|
-
completion: 0.3 / 1e3
|
|
21267
|
-
},
|
|
21363
|
+
cost: { prompt: 0.075 / 1e3, completion: 0.3 / 1e3 },
|
|
21268
21364
|
displayName: "Gemini 2.0 Flash Lite"
|
|
21269
21365
|
},
|
|
21270
21366
|
"gemini-1.5-pro": {
|
|
@@ -21288,18 +21384,6 @@ var generativeAiOptions = Object.entries(generativeAiGoogleModels).map(([id, { d
|
|
|
21288
21384
|
value: id,
|
|
21289
21385
|
label: displayName
|
|
21290
21386
|
}));
|
|
21291
|
-
function getVertexGenerativeModelOptions(options2) {
|
|
21292
|
-
return {
|
|
21293
|
-
model: options2.model,
|
|
21294
|
-
systemInstruction: options2.systemPrompt,
|
|
21295
|
-
generationConfig: {
|
|
21296
|
-
maxOutputTokens: options2.max_output_tokens,
|
|
21297
|
-
temperature: options2.temperature,
|
|
21298
|
-
topP: options2.top_p,
|
|
21299
|
-
topK: options2.top_k
|
|
21300
|
-
}
|
|
21301
|
-
};
|
|
21302
|
-
}
|
|
21303
21387
|
async function* streamGenerativeAi({
|
|
21304
21388
|
apiKey,
|
|
21305
21389
|
model,
|
|
@@ -21328,14 +21412,8 @@ async function* streamGenerativeAi({
|
|
|
21328
21412
|
topK,
|
|
21329
21413
|
tools,
|
|
21330
21414
|
abortSignal: signal,
|
|
21331
|
-
thinkingConfig: {
|
|
21332
|
-
|
|
21333
|
-
},
|
|
21334
|
-
httpOptions: {
|
|
21335
|
-
headers: {
|
|
21336
|
-
...additionalHeaders
|
|
21337
|
-
}
|
|
21338
|
-
}
|
|
21415
|
+
thinkingConfig: { thinkingBudget },
|
|
21416
|
+
httpOptions: { headers: { ...additionalHeaders } }
|
|
21339
21417
|
}
|
|
21340
21418
|
});
|
|
21341
21419
|
for await (const chunk of result) {
|
|
@@ -21358,6 +21436,20 @@ async function* streamGenerativeAi({
|
|
|
21358
21436
|
}
|
|
21359
21437
|
}
|
|
21360
21438
|
}
|
|
21439
|
+
|
|
21440
|
+
// src/plugins/google/google.ts
|
|
21441
|
+
function getVertexGenerativeModelOptions(options2) {
|
|
21442
|
+
return {
|
|
21443
|
+
model: options2.model,
|
|
21444
|
+
systemInstruction: options2.systemPrompt,
|
|
21445
|
+
generationConfig: {
|
|
21446
|
+
maxOutputTokens: options2.max_output_tokens,
|
|
21447
|
+
temperature: options2.temperature,
|
|
21448
|
+
topP: options2.top_p,
|
|
21449
|
+
topK: options2.top_k
|
|
21450
|
+
}
|
|
21451
|
+
};
|
|
21452
|
+
}
|
|
21361
21453
|
async function* streamChatCompletions3({
|
|
21362
21454
|
project,
|
|
21363
21455
|
location,
|
|
@@ -21373,8 +21465,11 @@ async function* streamChatCompletions3({
|
|
|
21373
21465
|
}) {
|
|
21374
21466
|
var _a, _b;
|
|
21375
21467
|
const { VertexAI } = await import("@google-cloud/vertexai");
|
|
21376
|
-
|
|
21377
|
-
|
|
21468
|
+
const vertexAi = new VertexAI({
|
|
21469
|
+
project,
|
|
21470
|
+
location,
|
|
21471
|
+
googleAuthOptions: { keyFilename: applicationCredentials }
|
|
21472
|
+
});
|
|
21378
21473
|
const generativeModel = vertexAi.preview.getGenerativeModel(
|
|
21379
21474
|
getVertexGenerativeModelOptions({
|
|
21380
21475
|
model,
|
|
@@ -22283,7 +22378,7 @@ function getResponseSettingsEditors() {
|
|
|
22283
22378
|
type: "toggle",
|
|
22284
22379
|
label: "Stream response",
|
|
22285
22380
|
dataKey: "useAsGraphPartialOutput",
|
|
22286
|
-
helperMessage:
|
|
22381
|
+
helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
|
|
22287
22382
|
},
|
|
22288
22383
|
{
|
|
22289
22384
|
type: "string",
|
|
@@ -26178,11 +26273,11 @@ function getLLMChatV2EditorCacheEligibility(data) {
|
|
|
26178
26273
|
}
|
|
26179
26274
|
|
|
26180
26275
|
// src/model/chat-v2/chatV2EditorCache.ts
|
|
26181
|
-
var
|
|
26182
|
-
var
|
|
26276
|
+
var import_safe_stable_stringify6 = __toESM(require("safe-stable-stringify"), 1);
|
|
26277
|
+
var import_crypto_js3 = __toESM(require("crypto-js"), 1);
|
|
26183
26278
|
function buildLLMChatV2EditorCacheKey(parts) {
|
|
26184
26279
|
const { cacheVersion = 3, ...keyParts } = parts;
|
|
26185
|
-
return (0,
|
|
26280
|
+
return (0, import_safe_stable_stringify6.default)({ cacheVersion, ...keyParts }) ?? "";
|
|
26186
26281
|
}
|
|
26187
26282
|
function cloneLLMChatV2EditorCacheOutputs(outputs) {
|
|
26188
26283
|
return cloneExecutionOutputs(outputs);
|
|
@@ -26191,7 +26286,7 @@ function fingerprintSecret(secret) {
|
|
|
26191
26286
|
if (!secret) {
|
|
26192
26287
|
return void 0;
|
|
26193
26288
|
}
|
|
26194
|
-
return `sha256:${
|
|
26289
|
+
return `sha256:${import_crypto_js3.default.SHA256(secret).toString(import_crypto_js3.default.enc.Hex)}`;
|
|
26195
26290
|
}
|
|
26196
26291
|
function fingerprintProviderConfigForCache(config) {
|
|
26197
26292
|
if (config.headers == null && config.endpointQuery == null) {
|
|
@@ -26215,7 +26310,7 @@ function fingerprintCustomProviderBaseURL(value) {
|
|
|
26215
26310
|
}
|
|
26216
26311
|
try {
|
|
26217
26312
|
const endpoint = normalizeOpenAICompatibleEndpoint(value);
|
|
26218
|
-
return (0,
|
|
26313
|
+
return (0, import_safe_stable_stringify6.default)({
|
|
26219
26314
|
baseURL: endpoint.baseURL,
|
|
26220
26315
|
endpointQuery: endpoint.endpointQuery.map(([key, queryValue]) => [key, fingerprintSecret(queryValue) ?? ""])
|
|
26221
26316
|
}) ?? "";
|
|
@@ -26243,7 +26338,7 @@ function fingerprintRuntimeValueForCache(value) {
|
|
|
26243
26338
|
if (value == null) {
|
|
26244
26339
|
return void 0;
|
|
26245
26340
|
}
|
|
26246
|
-
return fingerprintSecret((0,
|
|
26341
|
+
return fingerprintSecret((0, import_safe_stable_stringify6.default)(value) ?? "");
|
|
26247
26342
|
}
|
|
26248
26343
|
function fingerprintProfileChainForCache(data, profiles) {
|
|
26249
26344
|
if (profiles == null) {
|
|
@@ -31336,38 +31431,82 @@ var ContextNodeImpl = class extends NodeImpl {
|
|
|
31336
31431
|
};
|
|
31337
31432
|
var contextNode = nodeDefinition(ContextNodeImpl, "Context");
|
|
31338
31433
|
|
|
31434
|
+
// src/model/nodes/GraphCallPathNode.ts
|
|
31435
|
+
var GraphCallPathNodeImpl = class extends NodeImpl {
|
|
31436
|
+
static create() {
|
|
31437
|
+
return {
|
|
31438
|
+
id: newId(),
|
|
31439
|
+
type: "graphCallPath",
|
|
31440
|
+
title: "Graph Call Path",
|
|
31441
|
+
visualData: { x: 0, y: 0, width: 250 },
|
|
31442
|
+
data: {}
|
|
31443
|
+
};
|
|
31444
|
+
}
|
|
31445
|
+
getInputDefinitions() {
|
|
31446
|
+
return [];
|
|
31447
|
+
}
|
|
31448
|
+
getOutputDefinitions() {
|
|
31449
|
+
return [
|
|
31450
|
+
{ id: "currentGraphName", title: "Current Graph Name", dataType: "string" },
|
|
31451
|
+
{ id: "graphPath", title: "Graph Path", dataType: "string[]" }
|
|
31452
|
+
];
|
|
31453
|
+
}
|
|
31454
|
+
getEditors() {
|
|
31455
|
+
return [];
|
|
31456
|
+
}
|
|
31457
|
+
static getUIData() {
|
|
31458
|
+
return {
|
|
31459
|
+
contextMenuTitle: "Graph Call Path",
|
|
31460
|
+
infoBoxTitle: "Graph Call Path",
|
|
31461
|
+
infoBoxBody: "Returns the current graph name and the names of graph calls from the entry graph to this graph. Internal async and streaming branches do not add a graph hop.",
|
|
31462
|
+
group: ["Debug"]
|
|
31463
|
+
};
|
|
31464
|
+
}
|
|
31465
|
+
async process(_inputs, context) {
|
|
31466
|
+
const graphPath = [...context.graphCallPath];
|
|
31467
|
+
return {
|
|
31468
|
+
["currentGraphName"]: { type: "string", value: graphPath.at(-1) ?? "(Unnamed Graph)" },
|
|
31469
|
+
["graphPath"]: { type: "string[]", value: graphPath }
|
|
31470
|
+
};
|
|
31471
|
+
}
|
|
31472
|
+
};
|
|
31473
|
+
var graphCallPathNode = nodeDefinition(GraphCallPathNodeImpl, "Graph Call Path");
|
|
31474
|
+
|
|
31339
31475
|
// src/model/nodes/CoalesceNode.ts
|
|
31340
|
-
var import_non_secure38 = require("nanoid/non-secure");
|
|
31341
31476
|
var import_ts_dedent31 = require("ts-dedent");
|
|
31477
|
+
|
|
31478
|
+
// src/model/nodes/CoalesceNodeBase.ts
|
|
31479
|
+
var import_non_secure38 = require("nanoid/non-secure");
|
|
31342
31480
|
var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
|
|
31343
31481
|
var IGNORE_NULL_LABEL = "Ignore 'null'";
|
|
31344
31482
|
var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
|
|
31345
|
-
|
|
31346
|
-
|
|
31347
|
-
|
|
31348
|
-
|
|
31349
|
-
|
|
31350
|
-
|
|
31351
|
-
|
|
31352
|
-
|
|
31353
|
-
|
|
31354
|
-
|
|
31355
|
-
|
|
31356
|
-
|
|
31357
|
-
|
|
31358
|
-
|
|
31359
|
-
}
|
|
31360
|
-
};
|
|
31361
|
-
return chartNode;
|
|
31483
|
+
function createCoalesceNode(type, title) {
|
|
31484
|
+
return {
|
|
31485
|
+
type,
|
|
31486
|
+
title,
|
|
31487
|
+
id: (0, import_non_secure38.nanoid)(),
|
|
31488
|
+
data: {
|
|
31489
|
+
ignoreNull: false,
|
|
31490
|
+
ignoreUndefined: false
|
|
31491
|
+
},
|
|
31492
|
+
visualData: {
|
|
31493
|
+
x: 0,
|
|
31494
|
+
y: 0,
|
|
31495
|
+
width: 190
|
|
31496
|
+
}
|
|
31362
31497
|
};
|
|
31498
|
+
}
|
|
31499
|
+
var CoalesceNodeBase = class extends NodeImpl {
|
|
31363
31500
|
getInputDefinitions(connections) {
|
|
31364
31501
|
const inputs = [];
|
|
31365
31502
|
const inputCount = getNextVariadicPortIndex(connections, this.chartNode.id, "input", "strict-positive");
|
|
31366
|
-
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31503
|
+
if (this.includesLegacyConditionalInput) {
|
|
31504
|
+
inputs.push({
|
|
31505
|
+
dataType: "boolean",
|
|
31506
|
+
id: "conditional",
|
|
31507
|
+
title: "Conditional"
|
|
31508
|
+
});
|
|
31509
|
+
}
|
|
31371
31510
|
for (let i = 1; i <= inputCount; i++) {
|
|
31372
31511
|
inputs.push({
|
|
31373
31512
|
dataType: "any",
|
|
@@ -31410,21 +31549,9 @@ var CoalesceNodeImpl = class extends NodeImpl {
|
|
|
31410
31549
|
}
|
|
31411
31550
|
return ignoredValues.length > 0 ? ignoredValues.join("\n") : void 0;
|
|
31412
31551
|
}
|
|
31413
|
-
static getUIData() {
|
|
31414
|
-
return {
|
|
31415
|
-
infoBoxBody: import_ts_dedent31.dedent`
|
|
31416
|
-
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31417
|
-
|
|
31418
|
-
Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
|
|
31419
|
-
`,
|
|
31420
|
-
infoBoxTitle: "Coalesce Node",
|
|
31421
|
-
contextMenuTitle: "Coalesce",
|
|
31422
|
-
group: ["Logic"]
|
|
31423
|
-
};
|
|
31424
|
-
}
|
|
31425
31552
|
async process(inputData) {
|
|
31426
31553
|
const conditional = inputData["conditional"];
|
|
31427
|
-
if ((conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
|
|
31554
|
+
if (this.includesLegacyConditionalInput && (conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
|
|
31428
31555
|
return {
|
|
31429
31556
|
["output"]: {
|
|
31430
31557
|
type: "control-flow-excluded",
|
|
@@ -31471,7 +31598,46 @@ var CoalesceNodeImpl = class extends NodeImpl {
|
|
|
31471
31598
|
return this.data.ignoreNull === true && value === null || this.data.ignoreUndefined === true && value === void 0;
|
|
31472
31599
|
}
|
|
31473
31600
|
};
|
|
31474
|
-
|
|
31601
|
+
|
|
31602
|
+
// src/model/nodes/CoalesceNode.ts
|
|
31603
|
+
var coalesceLegacyDisplayName = "Coalesce (legacy)";
|
|
31604
|
+
var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
31605
|
+
includesLegacyConditionalInput = true;
|
|
31606
|
+
static create = () => createCoalesceNode("coalesce", coalesceLegacyDisplayName);
|
|
31607
|
+
static getUIData() {
|
|
31608
|
+
return {
|
|
31609
|
+
infoBoxBody: import_ts_dedent31.dedent`
|
|
31610
|
+
Legacy Coalesce node. Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31611
|
+
|
|
31612
|
+
Its Conditional input can exclude the node itself. New graphs should use Coalesce instead, which has the same fallback behavior without that port.
|
|
31613
|
+
`,
|
|
31614
|
+
infoBoxTitle: `${coalesceLegacyDisplayName} Node`,
|
|
31615
|
+
contextMenuTitle: coalesceLegacyDisplayName,
|
|
31616
|
+
group: ["Logic"]
|
|
31617
|
+
};
|
|
31618
|
+
}
|
|
31619
|
+
};
|
|
31620
|
+
var coalesceNode = nodeDefinition(CoalesceNodeImpl, coalesceLegacyDisplayName);
|
|
31621
|
+
|
|
31622
|
+
// src/model/nodes/CoalesceNewNode.ts
|
|
31623
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
31624
|
+
var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
31625
|
+
includesLegacyConditionalInput = false;
|
|
31626
|
+
static create = () => createCoalesceNode("coalesceNew", "Coalesce");
|
|
31627
|
+
static getUIData() {
|
|
31628
|
+
return {
|
|
31629
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
31630
|
+
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31631
|
+
|
|
31632
|
+
Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
|
|
31633
|
+
`,
|
|
31634
|
+
infoBoxTitle: "Coalesce Node",
|
|
31635
|
+
contextMenuTitle: "Coalesce",
|
|
31636
|
+
group: ["Logic"]
|
|
31637
|
+
};
|
|
31638
|
+
}
|
|
31639
|
+
};
|
|
31640
|
+
var coalesceNewNode = nodeDefinition(CoalesceNewNodeImpl, "Coalesce");
|
|
31475
31641
|
|
|
31476
31642
|
// src/model/nodes/DidRunNode.ts
|
|
31477
31643
|
var import_non_secure39 = require("nanoid/non-secure");
|
|
@@ -31550,7 +31716,7 @@ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
|
31550
31716
|
|
|
31551
31717
|
// src/model/nodes/PassthroughNode.ts
|
|
31552
31718
|
var import_non_secure40 = require("nanoid/non-secure");
|
|
31553
|
-
var
|
|
31719
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
31554
31720
|
var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
|
|
31555
31721
|
var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
|
|
31556
31722
|
var MAX_PASSTHROUGH_PORT_INDEX = 1e4;
|
|
@@ -31612,7 +31778,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31612
31778
|
}
|
|
31613
31779
|
static getUIData() {
|
|
31614
31780
|
return {
|
|
31615
|
-
infoBoxBody:
|
|
31781
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
31616
31782
|
Simply passes the input value to the output without any modifications.
|
|
31617
31783
|
`,
|
|
31618
31784
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -31635,7 +31801,7 @@ var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
|
31635
31801
|
|
|
31636
31802
|
// src/model/nodes/DataBusNode.ts
|
|
31637
31803
|
var import_non_secure41 = require("nanoid/non-secure");
|
|
31638
|
-
var
|
|
31804
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
31639
31805
|
function getConnectedChannelIndices(connections, nodeId) {
|
|
31640
31806
|
const channelIndices = /* @__PURE__ */ new Set();
|
|
31641
31807
|
for (const connection of connections) {
|
|
@@ -31695,7 +31861,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31695
31861
|
}
|
|
31696
31862
|
static getUIData() {
|
|
31697
31863
|
return {
|
|
31698
|
-
infoBoxBody:
|
|
31864
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
31699
31865
|
Organizes independent connections in a compact rail at the top of the
|
|
31700
31866
|
canvas. Data Bus channels are wiring topology, not executable nodes.
|
|
31701
31867
|
`,
|
|
@@ -31712,7 +31878,7 @@ var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
|
|
|
31712
31878
|
|
|
31713
31879
|
// src/model/nodes/StartBackgroundBranchNode.ts
|
|
31714
31880
|
var import_non_secure42 = require("nanoid/non-secure");
|
|
31715
|
-
var
|
|
31881
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
31716
31882
|
var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
31717
31883
|
static create = () => ({
|
|
31718
31884
|
type: "startBackgroundBranch",
|
|
@@ -31743,7 +31909,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31743
31909
|
}
|
|
31744
31910
|
static getUIData() {
|
|
31745
31911
|
return {
|
|
31746
|
-
infoBoxBody:
|
|
31912
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
31747
31913
|
Starts its downstream branch asynchronously. The foreground graph continues immediately, while the root run waits for the async branch before it ends.
|
|
31748
31914
|
`,
|
|
31749
31915
|
infoBoxTitle: "Start Async Branch Node",
|
|
@@ -31769,7 +31935,7 @@ var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "S
|
|
|
31769
31935
|
|
|
31770
31936
|
// src/model/nodes/WatchStreamingOutputNode.ts
|
|
31771
31937
|
var import_non_secure43 = require("nanoid/non-secure");
|
|
31772
|
-
var
|
|
31938
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
31773
31939
|
var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31774
31940
|
static create() {
|
|
31775
31941
|
return {
|
|
@@ -31808,7 +31974,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31808
31974
|
contextMenuTitle: "Watch Streaming Output",
|
|
31809
31975
|
group: ["Logic"],
|
|
31810
31976
|
infoBoxTitle: "Watch Streaming Output Node",
|
|
31811
|
-
infoBoxBody:
|
|
31977
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
31812
31978
|
Runs its downstream branch for streaming output snapshots. Without Stop Watching
|
|
31813
31979
|
Streaming Output, every snapshot runs the branch and the watch finishes with its
|
|
31814
31980
|
producer. Add one Stop node only when a chosen value must continue through the
|
|
@@ -31892,7 +32058,7 @@ var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Wat
|
|
|
31892
32058
|
|
|
31893
32059
|
// src/model/nodes/StopWatchingStreamingOutputNode.ts
|
|
31894
32060
|
var import_non_secure44 = require("nanoid/non-secure");
|
|
31895
|
-
var
|
|
32061
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
31896
32062
|
var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31897
32063
|
static create() {
|
|
31898
32064
|
return {
|
|
@@ -31914,10 +32080,12 @@ var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31914
32080
|
contextMenuTitle: "Stop Watching Streaming Output",
|
|
31915
32081
|
group: ["Logic"],
|
|
31916
32082
|
infoBoxTitle: "Stop Watching Streaming Output Node",
|
|
31917
|
-
infoBoxBody:
|
|
32083
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
31918
32084
|
Accepts a value from a Watch Streaming Output branch, stops future streaming
|
|
31919
32085
|
snapshots, and lets its completed output continue through the ordinary graph.
|
|
31920
32086
|
In parallel mode, the first completed branch to reach this node wins.
|
|
32087
|
+
If the stream ends without a value reaching this node, it is shown as Not ran
|
|
32088
|
+
and its ordinary downstream nodes receive the usual excluded value.
|
|
31921
32089
|
`
|
|
31922
32090
|
};
|
|
31923
32091
|
}
|
|
@@ -31943,7 +32111,7 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
|
|
|
31943
32111
|
|
|
31944
32112
|
// src/model/nodes/PopNode.ts
|
|
31945
32113
|
var import_non_secure45 = require("nanoid/non-secure");
|
|
31946
|
-
var
|
|
32114
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
31947
32115
|
var PopNodeImpl = class extends NodeImpl {
|
|
31948
32116
|
static create() {
|
|
31949
32117
|
const baseNode = {
|
|
@@ -31994,7 +32162,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
31994
32162
|
}
|
|
31995
32163
|
static getUIData() {
|
|
31996
32164
|
return {
|
|
31997
|
-
infoBoxBody:
|
|
32165
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
31998
32166
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
31999
32167
|
|
|
32000
32168
|
Can also be used to just extract the last value from an array.
|
|
@@ -32031,7 +32199,7 @@ var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
|
32031
32199
|
|
|
32032
32200
|
// src/model/nodes/SetGlobalNode.ts
|
|
32033
32201
|
var import_non_secure46 = require("nanoid/non-secure");
|
|
32034
|
-
var
|
|
32202
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
32035
32203
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
32036
32204
|
static create() {
|
|
32037
32205
|
const chartNode = {
|
|
@@ -32105,14 +32273,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32105
32273
|
];
|
|
32106
32274
|
}
|
|
32107
32275
|
getBody() {
|
|
32108
|
-
return
|
|
32276
|
+
return import_ts_dedent39.dedent`
|
|
32109
32277
|
${this.data.id}
|
|
32110
32278
|
Type: ${this.data.dataType}
|
|
32111
32279
|
`;
|
|
32112
32280
|
}
|
|
32113
32281
|
static getUIData() {
|
|
32114
32282
|
return {
|
|
32115
|
-
infoBoxBody:
|
|
32283
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
32116
32284
|
Sets a global value that is shared across all graphs and subgraphs. The id of the global value and the value itself are configured in this node.
|
|
32117
32285
|
`,
|
|
32118
32286
|
infoBoxTitle: "Set Global Node",
|
|
@@ -32149,7 +32317,7 @@ var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
|
32149
32317
|
|
|
32150
32318
|
// src/model/nodes/GetGlobalNode.ts
|
|
32151
32319
|
var import_non_secure47 = require("nanoid/non-secure");
|
|
32152
|
-
var
|
|
32320
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
32153
32321
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
32154
32322
|
static create() {
|
|
32155
32323
|
const chartNode = {
|
|
@@ -32233,7 +32401,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32233
32401
|
];
|
|
32234
32402
|
}
|
|
32235
32403
|
getBody() {
|
|
32236
|
-
return
|
|
32404
|
+
return import_ts_dedent40.dedent`
|
|
32237
32405
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
32238
32406
|
Type: ${this.data.dataType}
|
|
32239
32407
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -32241,7 +32409,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32241
32409
|
}
|
|
32242
32410
|
static getUIData() {
|
|
32243
32411
|
return {
|
|
32244
|
-
infoBoxBody:
|
|
32412
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
32245
32413
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
32246
32414
|
`,
|
|
32247
32415
|
infoBoxTitle: "Get Global Node",
|
|
@@ -32287,7 +32455,7 @@ var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
|
32287
32455
|
|
|
32288
32456
|
// src/model/nodes/SetStoredValueNode.ts
|
|
32289
32457
|
var import_non_secure48 = require("nanoid/non-secure");
|
|
32290
|
-
var
|
|
32458
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
32291
32459
|
|
|
32292
32460
|
// src/model/nodes/StoredValueNodeUtils.ts
|
|
32293
32461
|
var portableStoredValueScalarTypes = [
|
|
@@ -32390,7 +32558,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32390
32558
|
];
|
|
32391
32559
|
}
|
|
32392
32560
|
getBody() {
|
|
32393
|
-
return
|
|
32561
|
+
return import_ts_dedent41.dedent`
|
|
32394
32562
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32395
32563
|
Type: ${this.data.dataType}
|
|
32396
32564
|
`;
|
|
@@ -32422,7 +32590,7 @@ var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Valu
|
|
|
32422
32590
|
|
|
32423
32591
|
// src/model/nodes/GetStoredValueNode.ts
|
|
32424
32592
|
var import_non_secure49 = require("nanoid/non-secure");
|
|
32425
|
-
var
|
|
32593
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
32426
32594
|
var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
32427
32595
|
static create() {
|
|
32428
32596
|
return {
|
|
@@ -32483,7 +32651,7 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32483
32651
|
];
|
|
32484
32652
|
}
|
|
32485
32653
|
getBody() {
|
|
32486
|
-
return
|
|
32654
|
+
return import_ts_dedent42.dedent`
|
|
32487
32655
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32488
32656
|
Type: ${this.data.dataType}
|
|
32489
32657
|
${this.data.wait ? "Waits for an in-run Set" : ""}
|
|
@@ -32522,7 +32690,7 @@ var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Valu
|
|
|
32522
32690
|
|
|
32523
32691
|
// src/model/nodes/WaitForEventNode.ts
|
|
32524
32692
|
var import_non_secure50 = require("nanoid/non-secure");
|
|
32525
|
-
var
|
|
32693
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
32526
32694
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
32527
32695
|
static create() {
|
|
32528
32696
|
return {
|
|
@@ -32581,7 +32749,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32581
32749
|
}
|
|
32582
32750
|
static getUIData() {
|
|
32583
32751
|
return {
|
|
32584
|
-
infoBoxBody:
|
|
32752
|
+
infoBoxBody: import_ts_dedent43.dedent`
|
|
32585
32753
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
32586
32754
|
`,
|
|
32587
32755
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -32602,7 +32770,7 @@ var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
|
32602
32770
|
|
|
32603
32771
|
// src/model/nodes/ToolNode.ts
|
|
32604
32772
|
var import_non_secure51 = require("nanoid/non-secure");
|
|
32605
|
-
var
|
|
32773
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
32606
32774
|
var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
|
|
32607
32775
|
function getToolNodeBodyPreview(data) {
|
|
32608
32776
|
const [name = "", ...descriptionLines] = buildNodeBodyPreview(
|
|
@@ -32630,7 +32798,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32630
32798
|
name: "newTool",
|
|
32631
32799
|
description: "No description provided",
|
|
32632
32800
|
resultHandling: "continue",
|
|
32633
|
-
schema:
|
|
32801
|
+
schema: import_ts_dedent44.dedent`
|
|
32634
32802
|
{
|
|
32635
32803
|
"type": "object",
|
|
32636
32804
|
"properties": {}
|
|
@@ -32757,7 +32925,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32757
32925
|
}
|
|
32758
32926
|
static getUIData() {
|
|
32759
32927
|
return {
|
|
32760
|
-
infoBoxBody:
|
|
32928
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
32761
32929
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
32762
32930
|
`,
|
|
32763
32931
|
infoBoxTitle: "Tool Node",
|
|
@@ -32812,7 +32980,7 @@ var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
|
32812
32980
|
// src/model/nodes/ToYamlNode.ts
|
|
32813
32981
|
var import_non_secure52 = require("nanoid/non-secure");
|
|
32814
32982
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
32815
|
-
var
|
|
32983
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
32816
32984
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
32817
32985
|
static create() {
|
|
32818
32986
|
const chartNode = {
|
|
@@ -32849,7 +33017,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
32849
33017
|
}
|
|
32850
33018
|
static getUIData() {
|
|
32851
33019
|
return {
|
|
32852
|
-
infoBoxBody:
|
|
33020
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
32853
33021
|
Turns the input object into YAML text.
|
|
32854
33022
|
`,
|
|
32855
33023
|
infoBoxTitle: "To YAML Node",
|
|
@@ -32875,7 +33043,7 @@ var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
|
32875
33043
|
|
|
32876
33044
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
32877
33045
|
var import_non_secure53 = require("nanoid/non-secure");
|
|
32878
|
-
var
|
|
33046
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
32879
33047
|
|
|
32880
33048
|
// src/integrations/integrations.ts
|
|
32881
33049
|
var registeredIntegrations = {
|
|
@@ -32982,7 +33150,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
32982
33150
|
}
|
|
32983
33151
|
static getUIData() {
|
|
32984
33152
|
return {
|
|
32985
|
-
infoBoxBody:
|
|
33153
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
32986
33154
|
Gets a OpenAI vector embedding for the input text provided.
|
|
32987
33155
|
|
|
32988
33156
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -33014,7 +33182,7 @@ var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
|
33014
33182
|
|
|
33015
33183
|
// src/model/nodes/VectorStoreNode.ts
|
|
33016
33184
|
var import_non_secure54 = require("nanoid/non-secure");
|
|
33017
|
-
var
|
|
33185
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
33018
33186
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
33019
33187
|
static create() {
|
|
33020
33188
|
return {
|
|
@@ -33094,14 +33262,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33094
33262
|
];
|
|
33095
33263
|
}
|
|
33096
33264
|
getBody() {
|
|
33097
|
-
return
|
|
33265
|
+
return import_ts_dedent47.dedent`
|
|
33098
33266
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33099
33267
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
33100
33268
|
`;
|
|
33101
33269
|
}
|
|
33102
33270
|
static getUIData() {
|
|
33103
33271
|
return {
|
|
33104
|
-
infoBoxBody:
|
|
33272
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
33105
33273
|
Takes in a vector, as well as data to store with the vector. This data is stored in the configured vector DB integration for later retrieval.
|
|
33106
33274
|
`,
|
|
33107
33275
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -33137,7 +33305,7 @@ var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
|
33137
33305
|
|
|
33138
33306
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
33139
33307
|
var import_non_secure55 = require("nanoid/non-secure");
|
|
33140
|
-
var
|
|
33308
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
33141
33309
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
33142
33310
|
static create() {
|
|
33143
33311
|
return {
|
|
@@ -33224,7 +33392,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33224
33392
|
];
|
|
33225
33393
|
}
|
|
33226
33394
|
getBody() {
|
|
33227
|
-
return
|
|
33395
|
+
return import_ts_dedent48.dedent`
|
|
33228
33396
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33229
33397
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
33230
33398
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -33232,7 +33400,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33232
33400
|
}
|
|
33233
33401
|
static getUIData() {
|
|
33234
33402
|
return {
|
|
33235
|
-
infoBoxBody:
|
|
33403
|
+
infoBoxBody: import_ts_dedent48.dedent`
|
|
33236
33404
|
Performs a k-nearest neighbors search on the vectors stored in the configured vector DB integration. Takes in a vector and returns the k closest vectors and their corresponding data.
|
|
33237
33405
|
`,
|
|
33238
33406
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -33263,7 +33431,7 @@ var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl,
|
|
|
33263
33431
|
|
|
33264
33432
|
// src/model/nodes/KnowledgeSourceNode.ts
|
|
33265
33433
|
var import_non_secure56 = require("nanoid/non-secure");
|
|
33266
|
-
var
|
|
33434
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
33267
33435
|
var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33268
33436
|
static create() {
|
|
33269
33437
|
return {
|
|
@@ -33326,7 +33494,7 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33326
33494
|
getBody(context) {
|
|
33327
33495
|
var _a;
|
|
33328
33496
|
const connection = (_a = context.project.metadata.knowledgeStores) == null ? void 0 : _a[this.data.connectionId];
|
|
33329
|
-
return
|
|
33497
|
+
return import_ts_dedent49.dedent`
|
|
33330
33498
|
Store: ${this.data.useConnectionIdInput ? "(from input)" : ((connection == null ? void 0 : connection.displayName) ?? this.data.connectionId) || "(not selected)"}
|
|
33331
33499
|
Source: ${this.data.useSourceIdInput ? "(from input)" : this.data.sourceId || "(not set)"}
|
|
33332
33500
|
${this.data.useVersionInput || this.data.version ? "Exact version configured" : "Uses active version"}
|
|
@@ -33360,7 +33528,7 @@ var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Sou
|
|
|
33360
33528
|
|
|
33361
33529
|
// src/model/nodes/KnowledgeDocumentNode.ts
|
|
33362
33530
|
var import_non_secure57 = require("nanoid/non-secure");
|
|
33363
|
-
var
|
|
33531
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
33364
33532
|
var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
33365
33533
|
static create() {
|
|
33366
33534
|
return {
|
|
@@ -33415,7 +33583,7 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33415
33583
|
];
|
|
33416
33584
|
}
|
|
33417
33585
|
getBody() {
|
|
33418
|
-
return
|
|
33586
|
+
return import_ts_dedent50.dedent`
|
|
33419
33587
|
${this.data.useTextInput ? "Text from input" : `${this.data.text.length} characters`}
|
|
33420
33588
|
${this.data.useDocumentIdInput ? "ID from input" : this.data.documentId ? `ID: ${this.data.documentId}` : "ID generated from content"}
|
|
33421
33589
|
`;
|
|
@@ -33442,7 +33610,7 @@ var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge
|
|
|
33442
33610
|
|
|
33443
33611
|
// src/model/nodes/SyncKnowledgeSourceNode.ts
|
|
33444
33612
|
var import_non_secure58 = require("nanoid/non-secure");
|
|
33445
|
-
var
|
|
33613
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
33446
33614
|
var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33447
33615
|
static create() {
|
|
33448
33616
|
return {
|
|
@@ -33520,7 +33688,7 @@ var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33520
33688
|
];
|
|
33521
33689
|
}
|
|
33522
33690
|
getBody() {
|
|
33523
|
-
return
|
|
33691
|
+
return import_ts_dedent51.dedent`
|
|
33524
33692
|
${this.data.targetSize} ${this.data.chunkUnit}
|
|
33525
33693
|
${this.data.overlap} overlap
|
|
33526
33694
|
${this.data.includeTitle ? "Includes titles" : "Content only"}
|
|
@@ -33670,7 +33838,7 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
|
|
|
33670
33838
|
|
|
33671
33839
|
// src/model/nodes/SearchKnowledgeNode.ts
|
|
33672
33840
|
var import_non_secure60 = require("nanoid/non-secure");
|
|
33673
|
-
var
|
|
33841
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
33674
33842
|
var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
33675
33843
|
static create() {
|
|
33676
33844
|
return {
|
|
@@ -33739,7 +33907,7 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33739
33907
|
];
|
|
33740
33908
|
}
|
|
33741
33909
|
getBody() {
|
|
33742
|
-
return
|
|
33910
|
+
return import_ts_dedent52.dedent`
|
|
33743
33911
|
${this.data.topK} per query -> ${this.data.finalResultCount} final
|
|
33744
33912
|
Reranking: ${this.data.rerankMode}
|
|
33745
33913
|
`;
|
|
@@ -33797,7 +33965,7 @@ var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowle
|
|
|
33797
33965
|
|
|
33798
33966
|
// src/model/nodes/BuildKnowledgeContextNode.ts
|
|
33799
33967
|
var import_non_secure61 = require("nanoid/non-secure");
|
|
33800
|
-
var
|
|
33968
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
33801
33969
|
var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
33802
33970
|
static create() {
|
|
33803
33971
|
return {
|
|
@@ -33855,7 +34023,7 @@ var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
|
33855
34023
|
];
|
|
33856
34024
|
}
|
|
33857
34025
|
getBody() {
|
|
33858
|
-
return
|
|
34026
|
+
return import_ts_dedent53.dedent`
|
|
33859
34027
|
${this.data.budget} ${this.data.budgetUnit}
|
|
33860
34028
|
Up to ${this.data.maxItems} items
|
|
33861
34029
|
Citations: [${this.data.citationPrefix || "K"}1]
|
|
@@ -33940,7 +34108,7 @@ var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "B
|
|
|
33940
34108
|
var import_non_secure62 = require("nanoid/non-secure");
|
|
33941
34109
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
33942
34110
|
var import_ts_pattern3 = require("ts-pattern");
|
|
33943
|
-
var
|
|
34111
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
33944
34112
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
33945
34113
|
var HashNodeImpl = class extends NodeImpl {
|
|
33946
34114
|
static create() {
|
|
@@ -33998,7 +34166,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
33998
34166
|
}
|
|
33999
34167
|
static getUIData() {
|
|
34000
34168
|
return {
|
|
34001
|
-
infoBoxBody:
|
|
34169
|
+
infoBoxBody: import_ts_dedent54.dedent`
|
|
34002
34170
|
Computes a hash of the input value using the configured hash function.
|
|
34003
34171
|
`,
|
|
34004
34172
|
infoBoxTitle: "Hash Node",
|
|
@@ -34027,7 +34195,7 @@ var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
|
34027
34195
|
|
|
34028
34196
|
// src/model/nodes/AbortGraphNode.ts
|
|
34029
34197
|
var import_non_secure63 = require("nanoid/non-secure");
|
|
34030
|
-
var
|
|
34198
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
34031
34199
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
34032
34200
|
static create() {
|
|
34033
34201
|
const chartNode = {
|
|
@@ -34084,13 +34252,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34084
34252
|
];
|
|
34085
34253
|
}
|
|
34086
34254
|
getBody() {
|
|
34087
|
-
return
|
|
34255
|
+
return import_ts_dedent55.dedent`
|
|
34088
34256
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
34089
34257
|
`;
|
|
34090
34258
|
}
|
|
34091
34259
|
static getUIData() {
|
|
34092
34260
|
return {
|
|
34093
|
-
infoBoxBody:
|
|
34261
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
34094
34262
|
Aborts the execution of the entire graph immediately.
|
|
34095
34263
|
|
|
34096
34264
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -34116,7 +34284,7 @@ var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
|
34116
34284
|
|
|
34117
34285
|
// src/model/nodes/RaceInputsNode.ts
|
|
34118
34286
|
var import_non_secure64 = require("nanoid/non-secure");
|
|
34119
|
-
var
|
|
34287
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
34120
34288
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
34121
34289
|
static create() {
|
|
34122
34290
|
const chartNode = {
|
|
@@ -34158,7 +34326,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34158
34326
|
}
|
|
34159
34327
|
static getUIData() {
|
|
34160
34328
|
return {
|
|
34161
|
-
infoBoxBody:
|
|
34329
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
34162
34330
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
34163
34331
|
`,
|
|
34164
34332
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -34187,7 +34355,7 @@ var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
|
34187
34355
|
|
|
34188
34356
|
// src/model/nodes/ToJsonNode.ts
|
|
34189
34357
|
var import_non_secure65 = require("nanoid/non-secure");
|
|
34190
|
-
var
|
|
34358
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
34191
34359
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
34192
34360
|
static create() {
|
|
34193
34361
|
const chartNode = {
|
|
@@ -34238,7 +34406,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34238
34406
|
}
|
|
34239
34407
|
static getUIData() {
|
|
34240
34408
|
return {
|
|
34241
|
-
infoBoxBody:
|
|
34409
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
34242
34410
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
34243
34411
|
`,
|
|
34244
34412
|
infoBoxTitle: "To JSON Node",
|
|
@@ -34261,7 +34429,7 @@ var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
|
34261
34429
|
|
|
34262
34430
|
// src/model/nodes/JoinNode.ts
|
|
34263
34431
|
var import_non_secure66 = require("nanoid/non-secure");
|
|
34264
|
-
var
|
|
34432
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
34265
34433
|
var JoinNodeImpl = class extends NodeImpl {
|
|
34266
34434
|
static create = () => {
|
|
34267
34435
|
const chartNode = {
|
|
@@ -34329,7 +34497,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34329
34497
|
}
|
|
34330
34498
|
static getUIData() {
|
|
34331
34499
|
return {
|
|
34332
|
-
infoBoxBody:
|
|
34500
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
34333
34501
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
34334
34502
|
|
|
34335
34503
|
Defaults to a newline.
|
|
@@ -34368,7 +34536,7 @@ var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
|
34368
34536
|
// src/model/nodes/FilterNode.ts
|
|
34369
34537
|
var import_non_secure67 = require("nanoid/non-secure");
|
|
34370
34538
|
var import_lodash_es10 = require("lodash");
|
|
34371
|
-
var
|
|
34539
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
34372
34540
|
var FilterNodeImpl = class extends NodeImpl {
|
|
34373
34541
|
static create() {
|
|
34374
34542
|
const chartNode = {
|
|
@@ -34411,7 +34579,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34411
34579
|
}
|
|
34412
34580
|
static getUIData() {
|
|
34413
34581
|
return {
|
|
34414
|
-
infoBoxBody:
|
|
34582
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
34415
34583
|
Takes in both an array of values, and an array of booleans of the same length, and filters the array where the corresponding boolean is true.
|
|
34416
34584
|
`,
|
|
34417
34585
|
infoBoxTitle: "Filter Node",
|
|
@@ -34437,10 +34605,10 @@ var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
|
34437
34605
|
|
|
34438
34606
|
// src/model/nodes/JSFilterNode.ts
|
|
34439
34607
|
var import_non_secure68 = require("nanoid/non-secure");
|
|
34440
|
-
var
|
|
34608
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
34441
34609
|
|
|
34442
34610
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
34443
|
-
var
|
|
34611
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
34444
34612
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
34445
34613
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
34446
34614
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -34466,7 +34634,7 @@ function getJSListInterpolationContext(callbackBody) {
|
|
|
34466
34634
|
});
|
|
34467
34635
|
}
|
|
34468
34636
|
function buildJSListRuntimePreamble(interpolationContext) {
|
|
34469
|
-
return
|
|
34637
|
+
return import_ts_dedent60.dedent`
|
|
34470
34638
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
34471
34639
|
${buildJsValueInputClonePreamble({
|
|
34472
34640
|
cacheIdentifier: interpolationContext.cloneCacheIdentifier,
|
|
@@ -34511,7 +34679,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
|
|
|
34511
34679
|
function buildJSFilterWrapper(callbackBody) {
|
|
34512
34680
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34513
34681
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34514
|
-
return
|
|
34682
|
+
return import_ts_dedent60.dedent`
|
|
34515
34683
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34516
34684
|
|
|
34517
34685
|
if (!Array.isArray(array)) {
|
|
@@ -34547,7 +34715,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
34547
34715
|
function buildJSMapWrapper(callbackBody) {
|
|
34548
34716
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34549
34717
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34550
|
-
return
|
|
34718
|
+
return import_ts_dedent60.dedent`
|
|
34551
34719
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34552
34720
|
|
|
34553
34721
|
if (!Array.isArray(array)) {
|
|
@@ -34616,7 +34784,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
34616
34784
|
const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
|
|
34617
34785
|
return {
|
|
34618
34786
|
type: "colorized",
|
|
34619
|
-
text:
|
|
34787
|
+
text: import_ts_dedent60.dedent`
|
|
34620
34788
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
34621
34789
|
${indentLines(previewBody, " ")}
|
|
34622
34790
|
}
|
|
@@ -34700,7 +34868,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34700
34868
|
}
|
|
34701
34869
|
static getUIData() {
|
|
34702
34870
|
return {
|
|
34703
|
-
infoBoxBody:
|
|
34871
|
+
infoBoxBody: import_ts_dedent61.dedent`
|
|
34704
34872
|
Filters an input array using the body of a JavaScript callback.
|
|
34705
34873
|
|
|
34706
34874
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34729,7 +34897,7 @@ var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
|
34729
34897
|
|
|
34730
34898
|
// src/model/nodes/JSMapNode.ts
|
|
34731
34899
|
var import_non_secure69 = require("nanoid/non-secure");
|
|
34732
|
-
var
|
|
34900
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
34733
34901
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
34734
34902
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
34735
34903
|
static create() {
|
|
@@ -34768,7 +34936,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34768
34936
|
}
|
|
34769
34937
|
static getUIData() {
|
|
34770
34938
|
return {
|
|
34771
|
-
infoBoxBody:
|
|
34939
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
34772
34940
|
Maps an input array using the body of a JavaScript callback.
|
|
34773
34941
|
|
|
34774
34942
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34797,7 +34965,7 @@ var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
|
34797
34965
|
|
|
34798
34966
|
// src/model/nodes/ObjectNode.ts
|
|
34799
34967
|
var import_non_secure70 = require("nanoid/non-secure");
|
|
34800
|
-
var
|
|
34968
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
34801
34969
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
34802
34970
|
"key": "{{input}}"
|
|
34803
34971
|
}`;
|
|
@@ -34895,7 +35063,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
34895
35063
|
}
|
|
34896
35064
|
static getUIData() {
|
|
34897
35065
|
return {
|
|
34898
|
-
infoBoxBody:
|
|
35066
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
34899
35067
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
34900
35068
|
|
|
34901
35069
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -34977,7 +35145,7 @@ var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
|
34977
35145
|
|
|
34978
35146
|
// src/model/nodes/BooleanNode.ts
|
|
34979
35147
|
var import_non_secure71 = require("nanoid/non-secure");
|
|
34980
|
-
var
|
|
35148
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
34981
35149
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
34982
35150
|
static create() {
|
|
34983
35151
|
const chartNode = {
|
|
@@ -35021,7 +35189,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
35021
35189
|
}
|
|
35022
35190
|
static getUIData() {
|
|
35023
35191
|
return {
|
|
35024
|
-
infoBoxBody:
|
|
35192
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
35025
35193
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
35026
35194
|
`,
|
|
35027
35195
|
infoBoxTitle: "Bool Node",
|
|
@@ -35045,7 +35213,7 @@ var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
|
35045
35213
|
var import_non_secure72 = require("nanoid/non-secure");
|
|
35046
35214
|
var import_lodash_es11 = require("lodash");
|
|
35047
35215
|
var import_ts_pattern4 = require("ts-pattern");
|
|
35048
|
-
var
|
|
35216
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
35049
35217
|
var compareNodeComparisonFunctionOptions = [
|
|
35050
35218
|
{ label: "==", value: "==" },
|
|
35051
35219
|
{ label: "!=", value: "!=" },
|
|
@@ -35124,7 +35292,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35124
35292
|
}
|
|
35125
35293
|
static getUIData() {
|
|
35126
35294
|
return {
|
|
35127
|
-
infoBoxBody:
|
|
35295
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
35128
35296
|
Compares two values using the configured operator and outputs the result.
|
|
35129
35297
|
|
|
35130
35298
|
If the data types of the values do not match, then the B value is converted to the type of the A value.
|
|
@@ -35167,7 +35335,7 @@ var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
|
35167
35335
|
// src/model/nodes/EvaluateNode.ts
|
|
35168
35336
|
var import_non_secure73 = require("nanoid/non-secure");
|
|
35169
35337
|
var import_ts_pattern5 = require("ts-pattern");
|
|
35170
|
-
var
|
|
35338
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
35171
35339
|
var unaryOperation = ["abs", "negate"];
|
|
35172
35340
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
35173
35341
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -35253,7 +35421,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35253
35421
|
}
|
|
35254
35422
|
static getUIData() {
|
|
35255
35423
|
return {
|
|
35256
|
-
infoBoxBody:
|
|
35424
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
35257
35425
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
35258
35426
|
|
|
35259
35427
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -35290,7 +35458,7 @@ var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
|
35290
35458
|
|
|
35291
35459
|
// src/model/nodes/NumberNode.ts
|
|
35292
35460
|
var import_non_secure74 = require("nanoid/non-secure");
|
|
35293
|
-
var
|
|
35461
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
35294
35462
|
var NumberNodeImpl = class extends NodeImpl {
|
|
35295
35463
|
static create() {
|
|
35296
35464
|
const chartNode = {
|
|
@@ -35340,7 +35508,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35340
35508
|
}
|
|
35341
35509
|
static getUIData() {
|
|
35342
35510
|
return {
|
|
35343
|
-
infoBoxBody:
|
|
35511
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
35344
35512
|
Outputs a number constant, or converts an input value into a number.
|
|
35345
35513
|
|
|
35346
35514
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -35368,7 +35536,7 @@ var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
|
35368
35536
|
|
|
35369
35537
|
// src/model/nodes/RandomNumberNode.ts
|
|
35370
35538
|
var import_non_secure75 = require("nanoid/non-secure");
|
|
35371
|
-
var
|
|
35539
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
35372
35540
|
var randomNumberTypeOptions = [
|
|
35373
35541
|
{ value: false, label: "Float" },
|
|
35374
35542
|
{ value: true, label: "Integer" }
|
|
@@ -35436,7 +35604,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35436
35604
|
];
|
|
35437
35605
|
}
|
|
35438
35606
|
getBody() {
|
|
35439
|
-
return
|
|
35607
|
+
return import_ts_dedent68.dedent`
|
|
35440
35608
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
35441
35609
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
35442
35610
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -35445,7 +35613,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35445
35613
|
}
|
|
35446
35614
|
static getUIData() {
|
|
35447
35615
|
return {
|
|
35448
|
-
infoBoxBody:
|
|
35616
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
35449
35617
|
Outputs a random number between the configured min and max values.
|
|
35450
35618
|
|
|
35451
35619
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -35478,7 +35646,7 @@ var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
|
35478
35646
|
// src/model/nodes/ShuffleNode.ts
|
|
35479
35647
|
var import_non_secure76 = require("nanoid/non-secure");
|
|
35480
35648
|
var import_lodash_es12 = require("lodash");
|
|
35481
|
-
var
|
|
35649
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
35482
35650
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
35483
35651
|
static create() {
|
|
35484
35652
|
const chartNode = {
|
|
@@ -35514,7 +35682,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35514
35682
|
}
|
|
35515
35683
|
static getUIData() {
|
|
35516
35684
|
return {
|
|
35517
|
-
infoBoxBody:
|
|
35685
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
35518
35686
|
Shuffles the input array. Outputs the shuffled array.
|
|
35519
35687
|
`,
|
|
35520
35688
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -35539,7 +35707,7 @@ var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
|
35539
35707
|
|
|
35540
35708
|
// src/model/nodes/CommentNode.ts
|
|
35541
35709
|
var import_non_secure77 = require("nanoid/non-secure");
|
|
35542
|
-
var
|
|
35710
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
35543
35711
|
var CommentNodeImpl = class extends NodeImpl {
|
|
35544
35712
|
static create() {
|
|
35545
35713
|
const chartNode = {
|
|
@@ -35591,7 +35759,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35591
35759
|
}
|
|
35592
35760
|
static getUIData() {
|
|
35593
35761
|
return {
|
|
35594
|
-
infoBoxBody:
|
|
35762
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
35595
35763
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
35596
35764
|
`,
|
|
35597
35765
|
infoBoxTitle: "Comment Node",
|
|
@@ -36374,7 +36542,7 @@ var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
|
36374
36542
|
|
|
36375
36543
|
// src/model/nodes/DelayNode.ts
|
|
36376
36544
|
var import_non_secure81 = require("nanoid/non-secure");
|
|
36377
|
-
var
|
|
36545
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
36378
36546
|
var DelayNodeImpl = class extends NodeImpl {
|
|
36379
36547
|
static create() {
|
|
36380
36548
|
const chartNode = {
|
|
@@ -36425,7 +36593,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36425
36593
|
}
|
|
36426
36594
|
static getUIData() {
|
|
36427
36595
|
return {
|
|
36428
|
-
infoBoxBody:
|
|
36596
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
36429
36597
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
36430
36598
|
`,
|
|
36431
36599
|
infoBoxTitle: "Delay Node",
|
|
@@ -36463,7 +36631,7 @@ var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
|
36463
36631
|
|
|
36464
36632
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
36465
36633
|
var import_non_secure82 = require("nanoid/non-secure");
|
|
36466
|
-
var
|
|
36634
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
36467
36635
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
36468
36636
|
static create() {
|
|
36469
36637
|
return {
|
|
@@ -36523,7 +36691,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
36523
36691
|
}
|
|
36524
36692
|
static getUIData() {
|
|
36525
36693
|
return {
|
|
36526
|
-
infoBoxBody:
|
|
36694
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
36527
36695
|
Appends a row of data to the specified dataset.
|
|
36528
36696
|
`,
|
|
36529
36697
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -37074,7 +37242,7 @@ var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row")
|
|
|
37074
37242
|
|
|
37075
37243
|
// src/model/nodes/SliceNode.ts
|
|
37076
37244
|
var import_non_secure83 = require("nanoid/non-secure");
|
|
37077
|
-
var
|
|
37245
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
37078
37246
|
var SliceNodeImpl = class extends NodeImpl {
|
|
37079
37247
|
static create() {
|
|
37080
37248
|
const chartNode = {
|
|
@@ -37133,14 +37301,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37133
37301
|
];
|
|
37134
37302
|
}
|
|
37135
37303
|
getBody() {
|
|
37136
|
-
return
|
|
37304
|
+
return import_ts_dedent73.dedent`
|
|
37137
37305
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
37138
37306
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
37139
37307
|
`;
|
|
37140
37308
|
}
|
|
37141
37309
|
static getUIData() {
|
|
37142
37310
|
return {
|
|
37143
|
-
infoBoxBody:
|
|
37311
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
37144
37312
|
Slices an array from the start index for the count number of elements.
|
|
37145
37313
|
|
|
37146
37314
|
Useful for extracting a portion of an array.
|
|
@@ -37167,7 +37335,7 @@ var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
|
37167
37335
|
|
|
37168
37336
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
37169
37337
|
var import_non_secure84 = require("nanoid/non-secure");
|
|
37170
|
-
var
|
|
37338
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
37171
37339
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
37172
37340
|
static create() {
|
|
37173
37341
|
const chartNode = {
|
|
@@ -37214,7 +37382,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
37214
37382
|
}
|
|
37215
37383
|
static getUIData() {
|
|
37216
37384
|
return {
|
|
37217
|
-
infoBoxBody:
|
|
37385
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
37218
37386
|
Extracts the code blocks in the input Markdown text.
|
|
37219
37387
|
|
|
37220
37388
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -37546,7 +37714,7 @@ var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
|
37546
37714
|
|
|
37547
37715
|
// src/model/nodes/DestructureNode.ts
|
|
37548
37716
|
var import_non_secure87 = require("nanoid/non-secure");
|
|
37549
|
-
var
|
|
37717
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
37550
37718
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
37551
37719
|
static create() {
|
|
37552
37720
|
const chartNode = {
|
|
@@ -37614,7 +37782,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37614
37782
|
}
|
|
37615
37783
|
static getUIData() {
|
|
37616
37784
|
return {
|
|
37617
|
-
infoBoxBody:
|
|
37785
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
37618
37786
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
37619
37787
|
`,
|
|
37620
37788
|
infoBoxTitle: "Destructure Node",
|
|
@@ -37649,7 +37817,7 @@ var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
|
37649
37817
|
|
|
37650
37818
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
37651
37819
|
var import_non_secure88 = require("nanoid/non-secure");
|
|
37652
|
-
var
|
|
37820
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
37653
37821
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
37654
37822
|
static create() {
|
|
37655
37823
|
return {
|
|
@@ -37692,7 +37860,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
37692
37860
|
}
|
|
37693
37861
|
static getUIData() {
|
|
37694
37862
|
return {
|
|
37695
|
-
infoBoxBody:
|
|
37863
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
37696
37864
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
37697
37865
|
`,
|
|
37698
37866
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -37825,7 +37993,7 @@ var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
|
37825
37993
|
|
|
37826
37994
|
// src/model/nodes/GraphReferenceNode.ts
|
|
37827
37995
|
var import_non_secure89 = require("nanoid/non-secure");
|
|
37828
|
-
var
|
|
37996
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
37829
37997
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
37830
37998
|
static create() {
|
|
37831
37999
|
const chartNode = {
|
|
@@ -37880,7 +38048,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
37880
38048
|
}
|
|
37881
38049
|
static getUIData() {
|
|
37882
38050
|
return {
|
|
37883
|
-
infoBoxBody:
|
|
38051
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
37884
38052
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
37885
38053
|
`,
|
|
37886
38054
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -37947,7 +38115,7 @@ var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference
|
|
|
37947
38115
|
|
|
37948
38116
|
// src/model/nodes/CallGraphNode.ts
|
|
37949
38117
|
var import_non_secure90 = require("nanoid/non-secure");
|
|
37950
|
-
var
|
|
38118
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
37951
38119
|
|
|
37952
38120
|
// src/api/looseDataValue.ts
|
|
37953
38121
|
var import_lodash_es14 = require("lodash");
|
|
@@ -38023,7 +38191,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
38023
38191
|
}
|
|
38024
38192
|
static getUIData() {
|
|
38025
38193
|
return {
|
|
38026
|
-
infoBoxBody:
|
|
38194
|
+
infoBoxBody: import_ts_dedent78.dedent`
|
|
38027
38195
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
38028
38196
|
`,
|
|
38029
38197
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -38095,7 +38263,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
38095
38263
|
|
|
38096
38264
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
38097
38265
|
var import_nanoid = require("nanoid");
|
|
38098
|
-
var
|
|
38266
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
38099
38267
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
38100
38268
|
static create() {
|
|
38101
38269
|
const chartNode = {
|
|
@@ -38178,7 +38346,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
38178
38346
|
}
|
|
38179
38347
|
static getUIData() {
|
|
38180
38348
|
return {
|
|
38181
|
-
infoBoxBody:
|
|
38349
|
+
infoBoxBody: import_ts_dedent79.dedent`
|
|
38182
38350
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
38183
38351
|
`,
|
|
38184
38352
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -38494,7 +38662,7 @@ var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
|
38494
38662
|
|
|
38495
38663
|
// src/model/nodes/ChatLoopNode.ts
|
|
38496
38664
|
var import_non_secure93 = require("nanoid/non-secure");
|
|
38497
|
-
var
|
|
38665
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
38498
38666
|
var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
|
|
38499
38667
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
38500
38668
|
static create() {
|
|
@@ -38534,7 +38702,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38534
38702
|
}
|
|
38535
38703
|
static getUIData() {
|
|
38536
38704
|
return {
|
|
38537
|
-
infoBoxBody:
|
|
38705
|
+
infoBoxBody: import_ts_dedent80.dedent`
|
|
38538
38706
|
Creates an interactive chat loop with an AI model. The node will:
|
|
38539
38707
|
1. Send the initial prompt to the AI
|
|
38540
38708
|
2. Show the AI's response and prompt for user input
|
|
@@ -38635,7 +38803,7 @@ var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
|
|
|
38635
38803
|
|
|
38636
38804
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
38637
38805
|
var import_non_secure94 = require("nanoid/non-secure");
|
|
38638
|
-
var
|
|
38806
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
38639
38807
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
38640
38808
|
static create() {
|
|
38641
38809
|
return {
|
|
@@ -38750,7 +38918,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38750
38918
|
];
|
|
38751
38919
|
}
|
|
38752
38920
|
getBody() {
|
|
38753
|
-
return
|
|
38921
|
+
return import_ts_dedent81.dedent`
|
|
38754
38922
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
38755
38923
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
38756
38924
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -38759,7 +38927,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38759
38927
|
}
|
|
38760
38928
|
static getUIData() {
|
|
38761
38929
|
return {
|
|
38762
|
-
infoBoxBody:
|
|
38930
|
+
infoBoxBody: import_ts_dedent81.dedent`
|
|
38763
38931
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
38764
38932
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
38765
38933
|
`,
|
|
@@ -38833,7 +39001,7 @@ var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
|
38833
39001
|
|
|
38834
39002
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
38835
39003
|
var import_non_secure95 = require("nanoid/non-secure");
|
|
38836
|
-
var
|
|
39004
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
38837
39005
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
38838
39006
|
static create() {
|
|
38839
39007
|
const chartNode = {
|
|
@@ -38893,7 +39061,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
38893
39061
|
}
|
|
38894
39062
|
static getUIData() {
|
|
38895
39063
|
return {
|
|
38896
|
-
infoBoxBody:
|
|
39064
|
+
infoBoxBody: import_ts_dedent82.dedent`
|
|
38897
39065
|
Converts an array of objects into a markdown table format.
|
|
38898
39066
|
Input should be an array of objects with consistent keys.
|
|
38899
39067
|
`,
|
|
@@ -38945,7 +39113,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
38945
39113
|
|
|
38946
39114
|
// src/model/nodes/CronNode.ts
|
|
38947
39115
|
var import_nanoid2 = require("nanoid");
|
|
38948
|
-
var
|
|
39116
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
38949
39117
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
38950
39118
|
var CronNodeImpl = class extends NodeImpl {
|
|
38951
39119
|
static create() {
|
|
@@ -39015,7 +39183,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39015
39183
|
}
|
|
39016
39184
|
static getUIData() {
|
|
39017
39185
|
return {
|
|
39018
|
-
infoBoxBody:
|
|
39186
|
+
infoBoxBody: import_ts_dedent83.dedent`
|
|
39019
39187
|
Executes a subgraph on a schedule. Supports:
|
|
39020
39188
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
39021
39189
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -39055,7 +39223,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39055
39223
|
type: "string",
|
|
39056
39224
|
dataKey: "schedule",
|
|
39057
39225
|
label: "Schedule",
|
|
39058
|
-
helperMessage:
|
|
39226
|
+
helperMessage: import_ts_dedent83.dedent`
|
|
39059
39227
|
Examples:
|
|
39060
39228
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
39061
39229
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -39187,7 +39355,7 @@ var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
|
39187
39355
|
|
|
39188
39356
|
// src/model/nodes/ToTreeNode.ts
|
|
39189
39357
|
var import_non_secure96 = require("nanoid/non-secure");
|
|
39190
|
-
var
|
|
39358
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
39191
39359
|
var import_lodash_es15 = require("lodash");
|
|
39192
39360
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
39193
39361
|
static create() {
|
|
@@ -39249,7 +39417,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39249
39417
|
];
|
|
39250
39418
|
}
|
|
39251
39419
|
getBody() {
|
|
39252
|
-
return
|
|
39420
|
+
return import_ts_dedent84.dedent`
|
|
39253
39421
|
Format: ${this.data.format}
|
|
39254
39422
|
Children: ${this.data.childrenProperty}
|
|
39255
39423
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -39257,7 +39425,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39257
39425
|
}
|
|
39258
39426
|
static getUIData() {
|
|
39259
39427
|
return {
|
|
39260
|
-
infoBoxBody:
|
|
39428
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
39261
39429
|
Converts an array of objects into a tree structure and renders it as text.
|
|
39262
39430
|
|
|
39263
39431
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -39316,7 +39484,7 @@ var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
|
39316
39484
|
|
|
39317
39485
|
// src/model/nodes/LoopUntilNode.ts
|
|
39318
39486
|
var import_non_secure97 = require("nanoid/non-secure");
|
|
39319
|
-
var
|
|
39487
|
+
var import_ts_dedent85 = require("ts-dedent");
|
|
39320
39488
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
39321
39489
|
static create() {
|
|
39322
39490
|
const chartNode = {
|
|
@@ -39418,7 +39586,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
39418
39586
|
}
|
|
39419
39587
|
static getUIData() {
|
|
39420
39588
|
return {
|
|
39421
|
-
infoBoxBody:
|
|
39589
|
+
infoBoxBody: import_ts_dedent85.dedent`
|
|
39422
39590
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
39423
39591
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
39424
39592
|
maximum iterations.
|
|
@@ -39832,7 +40000,7 @@ var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
|
39832
40000
|
|
|
39833
40001
|
// src/model/nodes/MCPToolCallNode.ts
|
|
39834
40002
|
var import_non_secure98 = require("nanoid/non-secure");
|
|
39835
|
-
var
|
|
40003
|
+
var import_ts_dedent86 = require("ts-dedent");
|
|
39836
40004
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
39837
40005
|
static create() {
|
|
39838
40006
|
const chartNode = {
|
|
@@ -39851,7 +40019,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
39851
40019
|
serverUrl: "http://localhost:8080/mcp",
|
|
39852
40020
|
serverId: "",
|
|
39853
40021
|
toolName: "",
|
|
39854
|
-
toolArguments:
|
|
40022
|
+
toolArguments: import_ts_dedent86.dedent`
|
|
39855
40023
|
{
|
|
39856
40024
|
"key": "value"
|
|
39857
40025
|
}`,
|
|
@@ -39943,7 +40111,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
39943
40111
|
}
|
|
39944
40112
|
static getUIData() {
|
|
39945
40113
|
return {
|
|
39946
|
-
infoBoxBody:
|
|
40114
|
+
infoBoxBody: import_ts_dedent86.dedent`
|
|
39947
40115
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
39948
40116
|
`,
|
|
39949
40117
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -40161,7 +40329,7 @@ var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
|
40161
40329
|
|
|
40162
40330
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
40163
40331
|
var import_non_secure100 = require("nanoid/non-secure");
|
|
40164
|
-
var
|
|
40332
|
+
var import_ts_dedent87 = require("ts-dedent");
|
|
40165
40333
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
40166
40334
|
static create() {
|
|
40167
40335
|
const chartNode = {
|
|
@@ -40252,7 +40420,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
40252
40420
|
}
|
|
40253
40421
|
static getUIData() {
|
|
40254
40422
|
return {
|
|
40255
|
-
infoBoxBody:
|
|
40423
|
+
infoBoxBody: import_ts_dedent87.dedent`
|
|
40256
40424
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
40257
40425
|
`,
|
|
40258
40426
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -40369,7 +40537,7 @@ var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked
|
|
|
40369
40537
|
|
|
40370
40538
|
// src/model/Nodes.ts
|
|
40371
40539
|
var registerBuiltInNodes = (registry) => {
|
|
40372
|
-
return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(llmProfileNode).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(codeNewNode).register(expressionNode).register(matchNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(reportProgressNode).register(contextNode).register(coalesceNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(setStoredValueNode).register(getStoredValueNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(knowledgeSourceNode).register(knowledgeDocumentNode).register(syncKnowledgeSourceNode).register(getKnowledgeSourceStatusNode).register(searchKnowledgeNode).register(buildKnowledgeContextNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode).register(nodePrefabInstanceNode);
|
|
40540
|
+
return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(llmProfileNode).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(codeNewNode).register(expressionNode).register(matchNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(reportProgressNode).register(contextNode).register(graphCallPathNode).register(coalesceNode).register(coalesceNewNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(setStoredValueNode).register(getStoredValueNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(knowledgeSourceNode).register(knowledgeDocumentNode).register(syncKnowledgeSourceNode).register(getKnowledgeSourceStatusNode).register(searchKnowledgeNode).register(buildKnowledgeContextNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode).register(nodePrefabInstanceNode);
|
|
40373
40541
|
};
|
|
40374
40542
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
40375
40543
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -40536,8 +40704,8 @@ var OpenAIEmbeddingGenerator = class {
|
|
|
40536
40704
|
registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
|
|
40537
40705
|
|
|
40538
40706
|
// src/integrations/ManagedKnowledgeStore.ts
|
|
40539
|
-
var
|
|
40540
|
-
var
|
|
40707
|
+
var import_crypto_js4 = __toESM(require("crypto-js"), 1);
|
|
40708
|
+
var import_safe_stable_stringify7 = __toESM(require("safe-stable-stringify"), 1);
|
|
40541
40709
|
var MANAGED_SCHEMA_VERSION = "1";
|
|
40542
40710
|
var CHUNKER_VERSION = "1";
|
|
40543
40711
|
var ManagedKnowledgeStore = class {
|
|
@@ -40839,14 +41007,14 @@ async function waitForPromiseOrAbort(promise, signal) {
|
|
|
40839
41007
|
});
|
|
40840
41008
|
}
|
|
40841
41009
|
function createSourceVersion(documents, metadata, chunking) {
|
|
40842
|
-
const canonical = (0,
|
|
41010
|
+
const canonical = (0, import_safe_stable_stringify7.default)({
|
|
40843
41011
|
schemaVersion: MANAGED_SCHEMA_VERSION,
|
|
40844
41012
|
chunkerVersion: CHUNKER_VERSION,
|
|
40845
41013
|
documents,
|
|
40846
41014
|
metadata: metadata ?? {},
|
|
40847
41015
|
chunking
|
|
40848
41016
|
});
|
|
40849
|
-
const digest =
|
|
41017
|
+
const digest = import_crypto_js4.default.SHA256(canonical ?? "").toString(import_crypto_js4.default.enc.Hex);
|
|
40850
41018
|
return `ks${MANAGED_SCHEMA_VERSION}-${digest}`;
|
|
40851
41019
|
}
|
|
40852
41020
|
function normalizeChunkingOptions(options2) {
|
|
@@ -40866,7 +41034,7 @@ function normalizeChunkingOptions(options2) {
|
|
|
40866
41034
|
return { unit, targetSize, overlap, minimumBoundarySize, includeTitle: (options2 == null ? void 0 : options2.includeTitle) !== false };
|
|
40867
41035
|
}
|
|
40868
41036
|
function createManifestCommitId() {
|
|
40869
|
-
return
|
|
41037
|
+
return import_crypto_js4.default.lib.WordArray.random(16).toString(import_crypto_js4.default.enc.Hex);
|
|
40870
41038
|
}
|
|
40871
41039
|
async function chunkDocuments(documents, documentIds, version, options2, context) {
|
|
40872
41040
|
const chunks = [];
|
|
@@ -41034,7 +41202,7 @@ function validatePositiveInteger(value, label, minimum, maximum) {
|
|
|
41034
41202
|
}
|
|
41035
41203
|
}
|
|
41036
41204
|
function createShortHash(value) {
|
|
41037
|
-
return
|
|
41205
|
+
return import_crypto_js4.default.SHA256(value).toString(import_crypto_js4.default.enc.Hex).slice(0, 24);
|
|
41038
41206
|
}
|
|
41039
41207
|
function sameManifestActivation(actual, expected) {
|
|
41040
41208
|
return (actual == null ? void 0 : actual.activeVersion) === expected.activeVersion && actual.commitId === expected.commitId;
|
|
@@ -41532,7 +41700,7 @@ function isSocketRecordingTerminalEvent(event) {
|
|
|
41532
41700
|
|
|
41533
41701
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41534
41702
|
var import_non_secure103 = require("nanoid/non-secure");
|
|
41535
|
-
var
|
|
41703
|
+
var import_ts_dedent88 = require("ts-dedent");
|
|
41536
41704
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
41537
41705
|
|
|
41538
41706
|
// src/utils/assertNever.ts
|
|
@@ -41541,7 +41709,6 @@ function assertNever(x) {
|
|
|
41541
41709
|
}
|
|
41542
41710
|
|
|
41543
41711
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41544
|
-
var cache2 = /* @__PURE__ */ new Map();
|
|
41545
41712
|
var ChatAnthropicNodeImpl = {
|
|
41546
41713
|
create() {
|
|
41547
41714
|
const chartNode = {
|
|
@@ -41697,7 +41864,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41697
41864
|
getBody(data) {
|
|
41698
41865
|
var _a;
|
|
41699
41866
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
41700
|
-
return
|
|
41867
|
+
return import_ts_dedent88.dedent`
|
|
41701
41868
|
${modelName}
|
|
41702
41869
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
41703
41870
|
Max Tokens: ${data.maxTokens}
|
|
@@ -41786,8 +41953,9 @@ var ChatAnthropicNodeImpl = {
|
|
|
41786
41953
|
editors: [
|
|
41787
41954
|
{
|
|
41788
41955
|
type: "toggle",
|
|
41789
|
-
label: "Cache (
|
|
41790
|
-
dataKey: "cache"
|
|
41956
|
+
label: "Cache outputs (editor only)",
|
|
41957
|
+
dataKey: "cache",
|
|
41958
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
41791
41959
|
},
|
|
41792
41960
|
{
|
|
41793
41961
|
type: "toggle",
|
|
@@ -41822,7 +41990,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41822
41990
|
},
|
|
41823
41991
|
getUIData() {
|
|
41824
41992
|
return {
|
|
41825
|
-
infoBoxBody:
|
|
41993
|
+
infoBoxBody: import_ts_dedent88.dedent`
|
|
41826
41994
|
Legacy Anthropic chat node.
|
|
41827
41995
|
|
|
41828
41996
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -41891,6 +42059,10 @@ Assistant: ${content}`;
|
|
|
41891
42059
|
...context.settings.chatNodeHeaders,
|
|
41892
42060
|
...additionalHeaders
|
|
41893
42061
|
});
|
|
42062
|
+
const apiKey = context.getPluginConfig("anthropicApiKey");
|
|
42063
|
+
const defaultApiEndpoint = context.getPluginConfig("anthropicApiEndpoint") || "https://api.anthropic.com/v1";
|
|
42064
|
+
const configuredEndpoint = getInputOrData(data, inputs, "endpoint");
|
|
42065
|
+
const apiEndpoint = (configuredEndpoint == null ? void 0 : configuredEndpoint.trim()) ? configuredEndpoint : defaultApiEndpoint;
|
|
41894
42066
|
try {
|
|
41895
42067
|
return await (0, import_p_retry2.default)(
|
|
41896
42068
|
async () => {
|
|
@@ -41913,19 +42085,17 @@ Assistant: ${content}`;
|
|
|
41913
42085
|
messages,
|
|
41914
42086
|
tools: tools ? tools.map((tool) => ({ name: tool.name, description: tool.description, input_schema: tool.parameters })) : void 0
|
|
41915
42087
|
};
|
|
41916
|
-
const
|
|
41917
|
-
|
|
41918
|
-
|
|
41919
|
-
|
|
41920
|
-
|
|
41921
|
-
|
|
41922
|
-
|
|
42088
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
42089
|
+
context,
|
|
42090
|
+
enabled: data.cache && !data.enableToolUse,
|
|
42091
|
+
providerIdentity: { apiEndpoint, apiKey, headers: allAdditionalHeaders },
|
|
42092
|
+
request: useMessageApi ? messageOptions : completionOptions
|
|
42093
|
+
});
|
|
42094
|
+
if (cachedOutputs != null) {
|
|
42095
|
+
(_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
|
|
42096
|
+
return cachedOutputs;
|
|
41923
42097
|
}
|
|
41924
42098
|
const startTime = Date.now();
|
|
41925
|
-
const apiKey = context.getPluginConfig("anthropicApiKey");
|
|
41926
|
-
const defaultApiEndpoint = context.getPluginConfig("anthropicApiEndpoint") || "https://api.anthropic.com/v1";
|
|
41927
|
-
const configuredEndpoint = getInputOrData(data, inputs, "endpoint");
|
|
41928
|
-
const apiEndpoint = (configuredEndpoint == null ? void 0 : configuredEndpoint.trim()) ? configuredEndpoint : defaultApiEndpoint;
|
|
41929
42099
|
if (useMessageApi) {
|
|
41930
42100
|
const chunks = streamMessageApi({
|
|
41931
42101
|
apiEndpoint,
|
|
@@ -42091,7 +42261,7 @@ Assistant: ${content}`;
|
|
|
42091
42261
|
const duration = endTime - startTime;
|
|
42092
42262
|
output["duration"] = { type: "number", value: duration };
|
|
42093
42263
|
Object.freeze(output);
|
|
42094
|
-
|
|
42264
|
+
writeLegacyChatEditorCache(cache, output);
|
|
42095
42265
|
return output;
|
|
42096
42266
|
},
|
|
42097
42267
|
{
|
|
@@ -42295,7 +42465,7 @@ var anthropic_default = anthropicPlugin;
|
|
|
42295
42465
|
|
|
42296
42466
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
42297
42467
|
var import_non_secure104 = require("nanoid/non-secure");
|
|
42298
|
-
var
|
|
42468
|
+
var import_ts_dedent89 = require("ts-dedent");
|
|
42299
42469
|
var import_autoevals = require("autoevals");
|
|
42300
42470
|
var import_ts_pattern7 = require("ts-pattern");
|
|
42301
42471
|
var options = [
|
|
@@ -42429,7 +42599,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42429
42599
|
},
|
|
42430
42600
|
getUIData() {
|
|
42431
42601
|
return {
|
|
42432
|
-
infoBoxBody:
|
|
42602
|
+
infoBoxBody: import_ts_dedent89.dedent`
|
|
42433
42603
|
Evaluates the validity of a response using the autoevals library.
|
|
42434
42604
|
`,
|
|
42435
42605
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -42512,7 +42682,7 @@ var autoevals_default = autoevalsPlugin;
|
|
|
42512
42682
|
|
|
42513
42683
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
42514
42684
|
var import_non_secure105 = require("nanoid/non-secure");
|
|
42515
|
-
var
|
|
42685
|
+
var import_ts_dedent90 = require("ts-dedent");
|
|
42516
42686
|
|
|
42517
42687
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
42518
42688
|
var import_assemblyai = require("assemblyai");
|
|
@@ -42697,7 +42867,7 @@ var LemurQaNodeImpl = {
|
|
|
42697
42867
|
},
|
|
42698
42868
|
getUIData() {
|
|
42699
42869
|
return {
|
|
42700
|
-
infoBoxBody:
|
|
42870
|
+
infoBoxBody: import_ts_dedent90.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
42701
42871
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
42702
42872
|
contextMenuTitle: "LeMUR Q&A",
|
|
42703
42873
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42769,7 +42939,7 @@ var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
|
42769
42939
|
|
|
42770
42940
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
42771
42941
|
var import_non_secure106 = require("nanoid/non-secure");
|
|
42772
|
-
var
|
|
42942
|
+
var import_ts_dedent91 = require("ts-dedent");
|
|
42773
42943
|
var TranscribeAudioNodeImpl = {
|
|
42774
42944
|
create() {
|
|
42775
42945
|
const chartNode = {
|
|
@@ -42831,7 +43001,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
42831
43001
|
},
|
|
42832
43002
|
getUIData() {
|
|
42833
43003
|
return {
|
|
42834
|
-
infoBoxBody:
|
|
43004
|
+
infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI to transcribe audio`,
|
|
42835
43005
|
infoBoxTitle: "Transcribe Audio Node",
|
|
42836
43006
|
contextMenuTitle: "Transcribe Audio",
|
|
42837
43007
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42890,7 +43060,7 @@ function getAdditionalParameters(data) {
|
|
|
42890
43060
|
|
|
42891
43061
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
42892
43062
|
var import_non_secure107 = require("nanoid/non-secure");
|
|
42893
|
-
var
|
|
43063
|
+
var import_ts_dedent92 = require("ts-dedent");
|
|
42894
43064
|
var import_assemblyai3 = require("assemblyai");
|
|
42895
43065
|
var LemurSummaryNodeImpl = {
|
|
42896
43066
|
create() {
|
|
@@ -42943,7 +43113,7 @@ var LemurSummaryNodeImpl = {
|
|
|
42943
43113
|
},
|
|
42944
43114
|
getUIData() {
|
|
42945
43115
|
return {
|
|
42946
|
-
infoBoxBody:
|
|
43116
|
+
infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
42947
43117
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
42948
43118
|
contextMenuTitle: "LeMUR Summary",
|
|
42949
43119
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42968,7 +43138,7 @@ var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary
|
|
|
42968
43138
|
|
|
42969
43139
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
42970
43140
|
var import_non_secure108 = require("nanoid/non-secure");
|
|
42971
|
-
var
|
|
43141
|
+
var import_ts_dedent93 = require("ts-dedent");
|
|
42972
43142
|
var import_assemblyai4 = require("assemblyai");
|
|
42973
43143
|
var LemurTaskNodeImpl = {
|
|
42974
43144
|
create() {
|
|
@@ -43021,7 +43191,7 @@ var LemurTaskNodeImpl = {
|
|
|
43021
43191
|
},
|
|
43022
43192
|
getUIData() {
|
|
43023
43193
|
return {
|
|
43024
|
-
infoBoxBody:
|
|
43194
|
+
infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
43025
43195
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
43026
43196
|
contextMenuTitle: "LeMUR Custom Task",
|
|
43027
43197
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43047,7 +43217,7 @@ var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
|
43047
43217
|
|
|
43048
43218
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
43049
43219
|
var import_non_secure109 = require("nanoid/non-secure");
|
|
43050
|
-
var
|
|
43220
|
+
var import_ts_dedent94 = require("ts-dedent");
|
|
43051
43221
|
var LemurActionItemsNodeImpl = {
|
|
43052
43222
|
create() {
|
|
43053
43223
|
const chartNode = {
|
|
@@ -43099,7 +43269,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
43099
43269
|
},
|
|
43100
43270
|
getUIData() {
|
|
43101
43271
|
return {
|
|
43102
|
-
infoBoxBody:
|
|
43272
|
+
infoBoxBody: import_ts_dedent94.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
43103
43273
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
43104
43274
|
contextMenuTitle: "LeMUR Action Items",
|
|
43105
43275
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43388,7 +43558,7 @@ var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (H
|
|
|
43388
43558
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
43389
43559
|
var import_non_secure111 = require("nanoid/non-secure");
|
|
43390
43560
|
var import_inference2 = require("@huggingface/inference");
|
|
43391
|
-
var
|
|
43561
|
+
var import_ts_dedent95 = require("ts-dedent");
|
|
43392
43562
|
var TextToImageHuggingFaceNodeImpl = {
|
|
43393
43563
|
create() {
|
|
43394
43564
|
return {
|
|
@@ -43533,7 +43703,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
43533
43703
|
];
|
|
43534
43704
|
},
|
|
43535
43705
|
getBody(data) {
|
|
43536
|
-
return
|
|
43706
|
+
return import_ts_dedent95.dedent`
|
|
43537
43707
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
43538
43708
|
`;
|
|
43539
43709
|
},
|
|
@@ -43601,7 +43771,7 @@ var huggingFacePlugin = {
|
|
|
43601
43771
|
};
|
|
43602
43772
|
|
|
43603
43773
|
// src/plugins/pinecone/PineconeVectorDatabase.ts
|
|
43604
|
-
var
|
|
43774
|
+
var CryptoJS5 = __toESM(require("crypto-js"), 1);
|
|
43605
43775
|
var PineconeVectorDatabase = class {
|
|
43606
43776
|
#apiKey;
|
|
43607
43777
|
constructor(settings) {
|
|
@@ -43611,7 +43781,7 @@ var PineconeVectorDatabase = class {
|
|
|
43611
43781
|
async store(collection, vector, data, { id }) {
|
|
43612
43782
|
const collectionDetails = getCollection(coerceType(collection, "string"));
|
|
43613
43783
|
if (!id) {
|
|
43614
|
-
id =
|
|
43784
|
+
id = CryptoJS5.SHA256(vector.value.join(",")).toString(CryptoJS5.enc.Hex);
|
|
43615
43785
|
}
|
|
43616
43786
|
let metadata = {};
|
|
43617
43787
|
if (data.type === "object") {
|
|
@@ -43687,7 +43857,7 @@ function getCollection(collectionString) {
|
|
|
43687
43857
|
}
|
|
43688
43858
|
|
|
43689
43859
|
// src/plugins/pinecone/PineconeKnowledgeStore.ts
|
|
43690
|
-
var
|
|
43860
|
+
var import_crypto_js5 = __toESM(require("crypto-js"), 1);
|
|
43691
43861
|
var DEFAULT_API_VERSION = "2026-04";
|
|
43692
43862
|
var MANIFEST_RECORD_ID = "__rivet_manifest__";
|
|
43693
43863
|
var RESERVED_PREFIX = "rivet_";
|
|
@@ -43951,7 +44121,7 @@ var PineconeKnowledgeStoreDriver = class {
|
|
|
43951
44121
|
}
|
|
43952
44122
|
#namespace(sourceId) {
|
|
43953
44123
|
const readableSourceId = sourceId.replace(/[^a-zA-Z0-9._-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, 120) || "source";
|
|
43954
|
-
const sourceHash =
|
|
44124
|
+
const sourceHash = import_crypto_js5.default.SHA256(sourceId).toString(import_crypto_js5.default.enc.Hex).slice(0, 24);
|
|
43955
44125
|
const safeSourceId = `${readableSourceId}--${sourceHash}`;
|
|
43956
44126
|
const namespace = this.config.namespaceTemplate.replaceAll("{sourceId}", safeSourceId).trim();
|
|
43957
44127
|
if (!namespace) throw new Error("Pinecone Namespace Template produced an empty namespace.");
|
|
@@ -47074,7 +47244,7 @@ var openAIPlugin = {
|
|
|
47074
47244
|
|
|
47075
47245
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
47076
47246
|
var import_non_secure112 = require("nanoid/non-secure");
|
|
47077
|
-
var
|
|
47247
|
+
var import_ts_dedent96 = require("ts-dedent");
|
|
47078
47248
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
47079
47249
|
var import_ts_pattern8 = require("ts-pattern");
|
|
47080
47250
|
var import_genai2 = require("@google/genai");
|
|
@@ -47096,7 +47266,6 @@ function toGoogleSchemaType(type) {
|
|
|
47096
47266
|
return void 0;
|
|
47097
47267
|
}
|
|
47098
47268
|
}
|
|
47099
|
-
var cache3 = /* @__PURE__ */ new Map();
|
|
47100
47269
|
var ChatGoogleNodeImpl = {
|
|
47101
47270
|
create() {
|
|
47102
47271
|
const chartNode = {
|
|
@@ -47237,7 +47406,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47237
47406
|
},
|
|
47238
47407
|
getBody(data) {
|
|
47239
47408
|
var _a;
|
|
47240
|
-
return
|
|
47409
|
+
return import_ts_dedent96.dedent`
|
|
47241
47410
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
47242
47411
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
47243
47412
|
Max Tokens: ${data.maxTokens}
|
|
@@ -47304,8 +47473,9 @@ var ChatGoogleNodeImpl = {
|
|
|
47304
47473
|
},
|
|
47305
47474
|
{
|
|
47306
47475
|
type: "toggle",
|
|
47307
|
-
label: "Cache (
|
|
47308
|
-
dataKey: "cache"
|
|
47476
|
+
label: "Cache outputs (editor only)",
|
|
47477
|
+
dataKey: "cache",
|
|
47478
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
47309
47479
|
},
|
|
47310
47480
|
{
|
|
47311
47481
|
type: "toggle",
|
|
@@ -47324,7 +47494,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47324
47494
|
},
|
|
47325
47495
|
getUIData() {
|
|
47326
47496
|
return {
|
|
47327
|
-
infoBoxBody:
|
|
47497
|
+
infoBoxBody: import_ts_dedent96.dedent`
|
|
47328
47498
|
Legacy Google chat node.
|
|
47329
47499
|
|
|
47330
47500
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -47503,13 +47673,20 @@ var ChatGoogleNodeImpl = {
|
|
|
47503
47673
|
thinkingBudget,
|
|
47504
47674
|
additionalHeaders: allAdditionalHeaders
|
|
47505
47675
|
};
|
|
47506
|
-
const
|
|
47507
|
-
|
|
47508
|
-
|
|
47509
|
-
|
|
47510
|
-
|
|
47511
|
-
|
|
47512
|
-
|
|
47676
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
47677
|
+
context,
|
|
47678
|
+
enabled: data.cache && !data.useToolCalling,
|
|
47679
|
+
providerIdentity: apiKey ? { apiKey, headers: allAdditionalHeaders, transport: "generative-ai" } : {
|
|
47680
|
+
applicationCredentials,
|
|
47681
|
+
location,
|
|
47682
|
+
project,
|
|
47683
|
+
transport: "vertex-ai"
|
|
47684
|
+
},
|
|
47685
|
+
request: options2
|
|
47686
|
+
});
|
|
47687
|
+
if (cachedOutputs != null) {
|
|
47688
|
+
(_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
|
|
47689
|
+
return cachedOutputs;
|
|
47513
47690
|
}
|
|
47514
47691
|
const startTime = Date.now();
|
|
47515
47692
|
let chunks;
|
|
@@ -47606,7 +47783,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47606
47783
|
const duration = endTime - startTime;
|
|
47607
47784
|
output["duration"] = { type: "number", value: duration };
|
|
47608
47785
|
Object.freeze(output);
|
|
47609
|
-
|
|
47786
|
+
writeLegacyChatEditorCache(cache, output);
|
|
47610
47787
|
return output;
|
|
47611
47788
|
},
|
|
47612
47789
|
{
|
|
@@ -47618,13 +47795,18 @@ var ChatGoogleNodeImpl = {
|
|
|
47618
47795
|
randomize: true,
|
|
47619
47796
|
signal: context.signal,
|
|
47620
47797
|
onFailedAttempt(err) {
|
|
47798
|
+
var _a;
|
|
47621
47799
|
context.trace(`ChatGoogleNode failed, retrying: ${err.toString()}`);
|
|
47622
|
-
const
|
|
47623
|
-
|
|
47624
|
-
|
|
47800
|
+
const providerError = err.error ?? err;
|
|
47801
|
+
const googleError = providerError;
|
|
47802
|
+
const message = googleError.message ?? String(providerError);
|
|
47803
|
+
const messageStatus = (_a = /\bstatus:\s*(\d{3})\b/.exec(message)) == null ? void 0 : _a[1];
|
|
47804
|
+
const status = googleError.status ?? googleError.code ?? (messageStatus ? Number(messageStatus) : void 0);
|
|
47805
|
+
if (status && status >= 400 && status < 500) {
|
|
47806
|
+
if (status === 429) {
|
|
47625
47807
|
context.trace("Google API rate limit exceeded, retrying...");
|
|
47626
47808
|
} else {
|
|
47627
|
-
throw new Error(`Google API error: ${
|
|
47809
|
+
throw new Error(`Google API error: ${status} ${message}`);
|
|
47628
47810
|
}
|
|
47629
47811
|
}
|
|
47630
47812
|
if (context.signal.aborted) {
|
|
@@ -48238,6 +48420,7 @@ var Rivet = void 0;
|
|
|
48238
48420
|
ChatV2ProviderTimeoutError,
|
|
48239
48421
|
ChatV2ResponseValidationError,
|
|
48240
48422
|
ChunkNodeImpl,
|
|
48423
|
+
CoalesceNewNodeImpl,
|
|
48241
48424
|
CoalesceNodeImpl,
|
|
48242
48425
|
CodeNewNodeImpl,
|
|
48243
48426
|
CodeNodeImpl,
|
|
@@ -48281,6 +48464,7 @@ var Rivet = void 0;
|
|
|
48281
48464
|
GetStoredValueNodeImpl,
|
|
48282
48465
|
GptFunctionNodeImpl,
|
|
48283
48466
|
GptTokenizerTokenizer,
|
|
48467
|
+
GraphCallPathNodeImpl,
|
|
48284
48468
|
GraphInputNodeImpl,
|
|
48285
48469
|
GraphOutputNodeImpl,
|
|
48286
48470
|
GraphProcessor,
|
|
@@ -48361,6 +48545,7 @@ var Rivet = void 0;
|
|
|
48361
48545
|
Rivet,
|
|
48362
48546
|
RivetLLMProfileHealthPolicyError,
|
|
48363
48547
|
RivetStoredValueController,
|
|
48548
|
+
STREAM_RESPONSE_HELPER_MESSAGE,
|
|
48364
48549
|
SearchKnowledgeNodeImpl,
|
|
48365
48550
|
SetGlobalNodeImpl,
|
|
48366
48551
|
SetStoredValueNodeImpl,
|
|
@@ -48436,6 +48621,8 @@ var Rivet = void 0;
|
|
|
48436
48621
|
cloneFrozenNodeOutputsByGraph,
|
|
48437
48622
|
cloneRivetStoredValue,
|
|
48438
48623
|
cloneRivetStoredValueRecord,
|
|
48624
|
+
coalesceLegacyDisplayName,
|
|
48625
|
+
coalesceNewNode,
|
|
48439
48626
|
coalesceNode,
|
|
48440
48627
|
codeNewNode,
|
|
48441
48628
|
codeNode,
|
|
@@ -48611,6 +48798,7 @@ var Rivet = void 0;
|
|
|
48611
48798
|
googlePlugin,
|
|
48612
48799
|
googleThinkingLevelOptions,
|
|
48613
48800
|
gptFunctionNode,
|
|
48801
|
+
graphCallPathNode,
|
|
48614
48802
|
graphInputNode,
|
|
48615
48803
|
graphOutputNode,
|
|
48616
48804
|
graphReferenceNode,
|