@valerypopoff/rivet2-core 2.7.0 → 2.9.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 +514 -353
- 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 +84 -24
- package/dist/esm/model/LegacyChatEditorCache.js +50 -0
- package/dist/esm/model/NodeExclusionPolicy.js +1 -0
- package/dist/esm/model/Nodes.js +3 -0
- package/dist/esm/model/RecordingPlayer.js +20 -2
- package/dist/esm/model/StreamingOutputWatch.js +18 -18
- package/dist/esm/model/StreamingOutputWatchHistory.js +1 -0
- 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/ChatLoopNode.js +8 -4
- 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/CodeNewNode.js +1 -1
- package/dist/esm/model/nodes/ExpressionNode.js +1 -1
- package/dist/esm/model/nodes/LoopControllerNode.js +6 -4
- 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/esm/recording/ExecutionRecorder.js +2 -1
- package/dist/types/model/ExecutorProtocol.d.ts +1 -0
- package/dist/types/model/GraphPreprocessor.d.ts +2 -0
- package/dist/types/model/GraphProcessor.d.ts +5 -1
- package/dist/types/model/LegacyChatEditorCache.d.ts +39 -0
- package/dist/types/model/Nodes.d.ts +3 -2
- package/dist/types/model/StreamingOutputWatch.d.ts +13 -11
- package/dist/types/model/StreamingOutputWatchHistory.d.ts +2 -0
- package/dist/types/model/chat-v2/chatV2Shared.d.ts +1 -0
- package/dist/types/model/nodes/ChatLoopNode.d.ts +2 -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/LoopControllerNode.d.ts +2 -0
- package/dist/types/plugins/google/google.d.ts +3 -110
- package/dist/types/plugins/google/googleGenerativeAi.d.ts +110 -0
- package/dist/types/recording/RecordedEvents.d.ts +1 -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,
|
|
@@ -177,6 +178,7 @@ __export(src_exports, {
|
|
|
177
178
|
Rivet: () => Rivet,
|
|
178
179
|
RivetLLMProfileHealthPolicyError: () => RivetLLMProfileHealthPolicyError,
|
|
179
180
|
RivetStoredValueController: () => RivetStoredValueController,
|
|
181
|
+
STREAM_RESPONSE_HELPER_MESSAGE: () => STREAM_RESPONSE_HELPER_MESSAGE,
|
|
180
182
|
SearchKnowledgeNodeImpl: () => SearchKnowledgeNodeImpl,
|
|
181
183
|
SetGlobalNodeImpl: () => SetGlobalNodeImpl,
|
|
182
184
|
SetStoredValueNodeImpl: () => SetStoredValueNodeImpl,
|
|
@@ -239,6 +241,7 @@ __export(src_exports, {
|
|
|
239
241
|
canConsumeControlFlowExcludedInput: () => canConsumeControlFlowExcludedInput,
|
|
240
242
|
canRenderDataBusNode: () => canRenderDataBusNode,
|
|
241
243
|
canUseNodeAsPrefabSource: () => canUseNodeAsPrefabSource,
|
|
244
|
+
chatLoopLegacyDisplayName: () => chatLoopLegacyDisplayName,
|
|
242
245
|
chatLoopNode: () => chatLoopNode,
|
|
243
246
|
chatMessagesToModelMessages: () => chatMessagesToModelMessages,
|
|
244
247
|
chatNode: () => chatNode,
|
|
@@ -251,6 +254,8 @@ __export(src_exports, {
|
|
|
251
254
|
cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
|
|
252
255
|
cloneRivetStoredValue: () => cloneRivetStoredValue,
|
|
253
256
|
cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
|
|
257
|
+
coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
|
|
258
|
+
coalesceNewNode: () => coalesceNewNode,
|
|
254
259
|
coalesceNode: () => coalesceNode,
|
|
255
260
|
codeNewNode: () => codeNewNode,
|
|
256
261
|
codeNode: () => codeNode,
|
|
@@ -502,6 +507,7 @@ __export(src_exports, {
|
|
|
502
507
|
logRuntimeError: () => logRuntimeError,
|
|
503
508
|
logRuntimeInfo: () => logRuntimeInfo,
|
|
504
509
|
logRuntimeWarn: () => logRuntimeWarn,
|
|
510
|
+
loopControllerLegacyDisplayName: () => loopControllerLegacyDisplayName,
|
|
505
511
|
loopControllerNode: () => loopControllerNode,
|
|
506
512
|
loopUntilNode: () => loopUntilNode,
|
|
507
513
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
@@ -708,6 +714,7 @@ __export(exports_exports, {
|
|
|
708
714
|
ChatV2ProviderTimeoutError: () => ChatV2ProviderTimeoutError,
|
|
709
715
|
ChatV2ResponseValidationError: () => ChatV2ResponseValidationError,
|
|
710
716
|
ChunkNodeImpl: () => ChunkNodeImpl,
|
|
717
|
+
CoalesceNewNodeImpl: () => CoalesceNewNodeImpl,
|
|
711
718
|
CoalesceNodeImpl: () => CoalesceNodeImpl,
|
|
712
719
|
CodeNewNodeImpl: () => CodeNewNodeImpl,
|
|
713
720
|
CodeNodeImpl: () => CodeNodeImpl,
|
|
@@ -830,6 +837,7 @@ __export(exports_exports, {
|
|
|
830
837
|
ReportProgressNodeImpl: () => ReportProgressNodeImpl,
|
|
831
838
|
RivetLLMProfileHealthPolicyError: () => RivetLLMProfileHealthPolicyError,
|
|
832
839
|
RivetStoredValueController: () => RivetStoredValueController,
|
|
840
|
+
STREAM_RESPONSE_HELPER_MESSAGE: () => STREAM_RESPONSE_HELPER_MESSAGE,
|
|
833
841
|
SearchKnowledgeNodeImpl: () => SearchKnowledgeNodeImpl,
|
|
834
842
|
SetGlobalNodeImpl: () => SetGlobalNodeImpl,
|
|
835
843
|
SetStoredValueNodeImpl: () => SetStoredValueNodeImpl,
|
|
@@ -892,6 +900,7 @@ __export(exports_exports, {
|
|
|
892
900
|
canConsumeControlFlowExcludedInput: () => canConsumeControlFlowExcludedInput,
|
|
893
901
|
canRenderDataBusNode: () => canRenderDataBusNode,
|
|
894
902
|
canUseNodeAsPrefabSource: () => canUseNodeAsPrefabSource,
|
|
903
|
+
chatLoopLegacyDisplayName: () => chatLoopLegacyDisplayName,
|
|
895
904
|
chatLoopNode: () => chatLoopNode,
|
|
896
905
|
chatMessagesToModelMessages: () => chatMessagesToModelMessages,
|
|
897
906
|
chatNode: () => chatNode,
|
|
@@ -904,6 +913,8 @@ __export(exports_exports, {
|
|
|
904
913
|
cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
|
|
905
914
|
cloneRivetStoredValue: () => cloneRivetStoredValue,
|
|
906
915
|
cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
|
|
916
|
+
coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
|
|
917
|
+
coalesceNewNode: () => coalesceNewNode,
|
|
907
918
|
coalesceNode: () => coalesceNode,
|
|
908
919
|
codeNewNode: () => codeNewNode,
|
|
909
920
|
codeNode: () => codeNode,
|
|
@@ -1155,6 +1166,7 @@ __export(exports_exports, {
|
|
|
1155
1166
|
logRuntimeError: () => logRuntimeError,
|
|
1156
1167
|
logRuntimeInfo: () => logRuntimeInfo,
|
|
1157
1168
|
logRuntimeWarn: () => logRuntimeWarn,
|
|
1169
|
+
loopControllerLegacyDisplayName: () => loopControllerLegacyDisplayName,
|
|
1158
1170
|
loopControllerNode: () => loopControllerNode,
|
|
1159
1171
|
loopUntilNode: () => loopUntilNode,
|
|
1160
1172
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
@@ -1343,6 +1355,7 @@ var exhaustiveTuple = () => (
|
|
|
1343
1355
|
);
|
|
1344
1356
|
|
|
1345
1357
|
// src/model/chat-v2/chatV2Shared.ts
|
|
1358
|
+
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.";
|
|
1346
1359
|
function createChatV2CommonNodeData(overrides = {}) {
|
|
1347
1360
|
return {
|
|
1348
1361
|
model: "gpt-4o",
|
|
@@ -1633,7 +1646,7 @@ function getCommonChatV2Editors(modelOptions) {
|
|
|
1633
1646
|
type: "toggle",
|
|
1634
1647
|
label: "Stream response",
|
|
1635
1648
|
dataKey: "useAsGraphPartialOutput",
|
|
1636
|
-
helperMessage:
|
|
1649
|
+
helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
|
|
1637
1650
|
}
|
|
1638
1651
|
]
|
|
1639
1652
|
}
|
|
@@ -6700,6 +6713,7 @@ function preprocessGraphState(options2) {
|
|
|
6700
6713
|
connections[connection.outputNodeId].push(connection);
|
|
6701
6714
|
}
|
|
6702
6715
|
const definitions = loadInputOutputDefinitions({
|
|
6716
|
+
inputAnchorDefinitions: options2.inputAnchorDefinitions,
|
|
6703
6717
|
connections,
|
|
6704
6718
|
loadedProjects,
|
|
6705
6719
|
nodeInstances,
|
|
@@ -6759,10 +6773,16 @@ function toReusableGraphExecutionPlan(preprocessedGraph) {
|
|
|
6759
6773
|
};
|
|
6760
6774
|
}
|
|
6761
6775
|
function loadInputOutputDefinitions(options2) {
|
|
6776
|
+
var _a, _b;
|
|
6762
6777
|
const { connections, definitionContext, loadedProjects, nodeInstances, nodesById, project, warnOnInvalidGraph } = options2;
|
|
6763
6778
|
const definitions = {};
|
|
6764
6779
|
if (!definitionContext) {
|
|
6765
6780
|
for (const node of values(nodesById)) {
|
|
6781
|
+
const anchorDefinitions = (_a = options2.inputAnchorDefinitions) == null ? void 0 : _a[node.id];
|
|
6782
|
+
if (anchorDefinitions) {
|
|
6783
|
+
definitions[node.id] = anchorDefinitions;
|
|
6784
|
+
continue;
|
|
6785
|
+
}
|
|
6766
6786
|
const connectionsForNode = connections[node.id] ?? [];
|
|
6767
6787
|
const inputDefinitions = nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
|
|
6768
6788
|
connectionsForNode,
|
|
@@ -6818,6 +6838,11 @@ function loadInputOutputDefinitions(options2) {
|
|
|
6818
6838
|
return definitions;
|
|
6819
6839
|
}
|
|
6820
6840
|
for (const node of values(nodesById)) {
|
|
6841
|
+
const anchorDefinitions = (_b = options2.inputAnchorDefinitions) == null ? void 0 : _b[node.id];
|
|
6842
|
+
if (anchorDefinitions) {
|
|
6843
|
+
definitions[node.id] = anchorDefinitions;
|
|
6844
|
+
continue;
|
|
6845
|
+
}
|
|
6821
6846
|
const connectionsForNode = connections[node.id] ?? [];
|
|
6822
6847
|
const nodeDefinitionContext = usesGraphBoundaryDefinitionContext(node) ? definitionContext : void 0;
|
|
6823
6848
|
const inputDefinitions = nodeDefinitionContext ? nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
|
|
@@ -6993,7 +7018,7 @@ function buildGraphExecutionPlan(options2) {
|
|
|
6993
7018
|
}
|
|
6994
7019
|
|
|
6995
7020
|
// src/model/GraphBoundaryCache.ts
|
|
6996
|
-
function getGraphBoundary(project, graphId2,
|
|
7021
|
+
function getGraphBoundary(project, graphId2, cache) {
|
|
6997
7022
|
if (!graphId2) {
|
|
6998
7023
|
return void 0;
|
|
6999
7024
|
}
|
|
@@ -7001,15 +7026,15 @@ function getGraphBoundary(project, graphId2, cache4) {
|
|
|
7001
7026
|
if (!graph) {
|
|
7002
7027
|
return void 0;
|
|
7003
7028
|
}
|
|
7004
|
-
if (!
|
|
7029
|
+
if (!cache) {
|
|
7005
7030
|
return deriveGraphBoundary(graph);
|
|
7006
7031
|
}
|
|
7007
|
-
const cached =
|
|
7032
|
+
const cached = cache.get(graph);
|
|
7008
7033
|
if (cached) {
|
|
7009
7034
|
return cached;
|
|
7010
7035
|
}
|
|
7011
7036
|
const boundary = deriveGraphBoundary(graph);
|
|
7012
|
-
|
|
7037
|
+
cache.set(graph, boundary);
|
|
7013
7038
|
return boundary;
|
|
7014
7039
|
}
|
|
7015
7040
|
function applyGraphBoundaryPortOrder(boundaryItems, portOrder) {
|
|
@@ -7819,6 +7844,7 @@ async function replayExecutionRecording(options2) {
|
|
|
7819
7844
|
outputs: data.outputs,
|
|
7820
7845
|
processId: data.processId,
|
|
7821
7846
|
...data.resultOrigin === void 0 ? {} : { resultOrigin: data.resultOrigin },
|
|
7847
|
+
...data.streamingWatchTerminal ? { streamingWatchTerminal: true } : {},
|
|
7822
7848
|
execution
|
|
7823
7849
|
},
|
|
7824
7850
|
getRecordedDuration(
|
|
@@ -7895,10 +7921,22 @@ async function replayExecutionRecording(options2) {
|
|
|
7895
7921
|
}
|
|
7896
7922
|
case "streamingOutputWatchSummary": {
|
|
7897
7923
|
const { data } = event;
|
|
7924
|
+
const execution = getExecution(((_i = data.execution) == null ? void 0 : _i.graphId) ?? getGraphIdForNode(data.watchNodeId), data.execution);
|
|
7925
|
+
const selectedIteration = data.summary.selectedIteration;
|
|
7926
|
+
const summary = (selectedIteration == null ? void 0 : selectedIteration.graphRunId) != null && data.execution != null ? {
|
|
7927
|
+
...data.summary,
|
|
7928
|
+
selectedIteration: {
|
|
7929
|
+
...selectedIteration,
|
|
7930
|
+
graphRunId: getReplayExecution({
|
|
7931
|
+
...data.execution,
|
|
7932
|
+
graphRunId: selectedIteration.graphRunId
|
|
7933
|
+
}).graphRunId
|
|
7934
|
+
}
|
|
7935
|
+
} : data.summary;
|
|
7898
7936
|
emitReplayExecutionEvent("streamingOutputWatchSummary", {
|
|
7899
7937
|
watchNode: getNode(data.watchNodeId),
|
|
7900
|
-
summary
|
|
7901
|
-
execution
|
|
7938
|
+
summary,
|
|
7939
|
+
execution
|
|
7902
7940
|
});
|
|
7903
7941
|
break;
|
|
7904
7942
|
}
|
|
@@ -8952,6 +8990,7 @@ var nodesAllowedToConsumeExcludedValue = /* @__PURE__ */ new Set([
|
|
|
8952
8990
|
"if",
|
|
8953
8991
|
"ifElse",
|
|
8954
8992
|
"coalesce",
|
|
8993
|
+
"coalesceNew",
|
|
8955
8994
|
"graphOutput",
|
|
8956
8995
|
"raceInputs",
|
|
8957
8996
|
"loopController"
|
|
@@ -9782,7 +9821,6 @@ var StreamingOutputWatch = class {
|
|
|
9782
9821
|
#options;
|
|
9783
9822
|
#run;
|
|
9784
9823
|
#onFailure;
|
|
9785
|
-
#requiresAcceptedStop;
|
|
9786
9824
|
#queue = [];
|
|
9787
9825
|
#activeRuns = /* @__PURE__ */ new Set();
|
|
9788
9826
|
#timer;
|
|
@@ -9796,7 +9834,7 @@ var StreamingOutputWatch = class {
|
|
|
9796
9834
|
#coalescedUpdates = 0;
|
|
9797
9835
|
#droppedUpdates = 0;
|
|
9798
9836
|
#maximumQueuedUpdates = 0;
|
|
9799
|
-
constructor(options2, run, onFailure
|
|
9837
|
+
constructor(options2, run, onFailure) {
|
|
9800
9838
|
this.#options = {
|
|
9801
9839
|
triggerMode: options2.triggerMode === "interval" ? "interval" : "every-update",
|
|
9802
9840
|
executionMode: options2.executionMode === "parallel" ? "parallel" : "sequential",
|
|
@@ -9819,7 +9857,6 @@ var StreamingOutputWatch = class {
|
|
|
9819
9857
|
};
|
|
9820
9858
|
this.#run = run;
|
|
9821
9859
|
this.#onFailure = onFailure;
|
|
9822
|
-
this.#requiresAcceptedStop = requiresAcceptedStop;
|
|
9823
9860
|
}
|
|
9824
9861
|
get hasPending() {
|
|
9825
9862
|
return this.#activeRuns.size > 0 || !this.#stopped && (this.#queue.length > 0 || this.#timer != null);
|
|
@@ -9834,6 +9871,15 @@ var StreamingOutputWatch = class {
|
|
|
9834
9871
|
get isSettled() {
|
|
9835
9872
|
return !this.hasPending && (this.#stopped || this.#failure != null || this.#producerFinished);
|
|
9836
9873
|
}
|
|
9874
|
+
/**
|
|
9875
|
+
* The producer delivered its final snapshot and every scheduled invocation
|
|
9876
|
+
* settled without cancellation or failure. The scheduler deliberately does
|
|
9877
|
+
* not infer graph topology; GraphProcessor decides whether this means a
|
|
9878
|
+
* parent Stop must be excluded.
|
|
9879
|
+
*/
|
|
9880
|
+
get finishedNormally() {
|
|
9881
|
+
return !this.#stopped && this.#failure == null && this.#producerFinished && this.#finalSnapshotSettled && !this.hasPending;
|
|
9882
|
+
}
|
|
9837
9883
|
get runtimeSummary() {
|
|
9838
9884
|
return {
|
|
9839
9885
|
receivedUpdates: this.#receivedUpdates,
|
|
@@ -9843,14 +9889,6 @@ var StreamingOutputWatch = class {
|
|
|
9843
9889
|
...this.#failureKind === void 0 ? {} : { failureKind: this.#failureKind }
|
|
9844
9890
|
};
|
|
9845
9891
|
}
|
|
9846
|
-
/**
|
|
9847
|
-
* A Stop boundary can enqueue ordinary parent-graph work when its node
|
|
9848
|
-
* completes. Until it settles, its result is not safe to expose
|
|
9849
|
-
* through the foreground-output boundary.
|
|
9850
|
-
*/
|
|
9851
|
-
get canAffectForegroundOutputs() {
|
|
9852
|
-
return this.#requiresAcceptedStop;
|
|
9853
|
-
}
|
|
9854
9892
|
publish(snapshot) {
|
|
9855
9893
|
if (this.#stopped || this.#failure || this.#producerFinished) {
|
|
9856
9894
|
return;
|
|
@@ -9902,12 +9940,6 @@ var StreamingOutputWatch = class {
|
|
|
9902
9940
|
}
|
|
9903
9941
|
await Promise.all([...this.#activeRuns].map((run) => run.promise));
|
|
9904
9942
|
}
|
|
9905
|
-
if (this.#producerFinished && this.#finalSnapshotSettled && !this.#stopped && this.#requiresAcceptedStop) {
|
|
9906
|
-
this.#fail(
|
|
9907
|
-
new Error("The watched streaming output completed before Stop Watching Streaming Output accepted a value."),
|
|
9908
|
-
"missing-stop"
|
|
9909
|
-
);
|
|
9910
|
-
}
|
|
9911
9943
|
}
|
|
9912
9944
|
#scheduleInterval() {
|
|
9913
9945
|
if (this.#timer != null) {
|
|
@@ -10164,6 +10196,7 @@ var StreamingOutputWatchHistory = class {
|
|
|
10164
10196
|
omittedIterations: this.#startedIterations - retainedIterationUpdateIndexes.length,
|
|
10165
10197
|
retainedIterationUpdateIndexes,
|
|
10166
10198
|
selectedIteration: selected == null ? void 0 : {
|
|
10199
|
+
graphRunId: selected.graphRunId,
|
|
10167
10200
|
updateIndex: selected.updateIndex,
|
|
10168
10201
|
reason: selected === this.#firstFailure ? "failure" : selected === this.#stopWinner ? "stop" : "latest"
|
|
10169
10202
|
}
|
|
@@ -11224,6 +11257,7 @@ var NotAllowedCodeRunner = class {
|
|
|
11224
11257
|
// src/model/GraphProcessor.ts
|
|
11225
11258
|
var graphProcessorGraphOverride = Symbol("graphProcessorGraphOverride");
|
|
11226
11259
|
var consumedAsyncBranchTriggerOverride = Symbol("consumedAsyncBranchTriggerOverride");
|
|
11260
|
+
var asyncBranchInputAnchorsOverride = Symbol("asyncBranchInputAnchorsOverride");
|
|
11227
11261
|
var consumedStreamingWatchNodeOverride = Symbol("consumedStreamingWatchNodeOverride");
|
|
11228
11262
|
function isNamedGraphBoundaryCaller(node) {
|
|
11229
11263
|
return node.type === "subGraph" || node.type === "referencedGraphAlias";
|
|
@@ -11361,6 +11395,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11361
11395
|
#effectiveConnectionsForRun;
|
|
11362
11396
|
#asyncBranchPlansByTriggerNodeId = /* @__PURE__ */ new Map();
|
|
11363
11397
|
#consumedAsyncBranchTriggerNodeId;
|
|
11398
|
+
#asyncBranchInputAnchors;
|
|
11364
11399
|
#streamingWatchPlansBySourceNodeId = /* @__PURE__ */ new Map();
|
|
11365
11400
|
#streamingWatchPlansByWatchNodeId = /* @__PURE__ */ new Map();
|
|
11366
11401
|
#streamingOutputWatches = /* @__PURE__ */ new Map();
|
|
@@ -11410,6 +11445,11 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11410
11445
|
#graphOutputs = void 0;
|
|
11411
11446
|
#executionCache = void 0;
|
|
11412
11447
|
#queuedNodes = void 0;
|
|
11448
|
+
/**
|
|
11449
|
+
* Nodes deferred only because Run To reached its initial scheduler quiescence.
|
|
11450
|
+
* A streaming Stop can legitimately resume one of those selected paths later.
|
|
11451
|
+
*/
|
|
11452
|
+
#deferredRunToIgnoredNodes = void 0;
|
|
11413
11453
|
#loopControllersSeen = void 0;
|
|
11414
11454
|
#subprocessors = void 0;
|
|
11415
11455
|
#contextValues = void 0;
|
|
@@ -11510,6 +11550,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11510
11550
|
this.#runtimeProfiler = options2 == null ? void 0 : options2.runtimeProfiler;
|
|
11511
11551
|
this.#captureNodeTimings = (options2 == null ? void 0 : options2.captureNodeTimings) ?? false;
|
|
11512
11552
|
this.#consumedAsyncBranchTriggerNodeId = options2 == null ? void 0 : options2[consumedAsyncBranchTriggerOverride];
|
|
11553
|
+
this.#asyncBranchInputAnchors = options2 == null ? void 0 : options2[asyncBranchInputAnchorsOverride];
|
|
11513
11554
|
this.#consumedStreamingWatchNodeId = options2 == null ? void 0 : options2[consumedStreamingWatchNodeOverride];
|
|
11514
11555
|
this.#emitter.bindMethods(this, ["on", "off", "once", "onAny", "offAny"]);
|
|
11515
11556
|
this.setExternalFunction("echo", async (value) => ({ type: "any", value }));
|
|
@@ -11534,6 +11575,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11534
11575
|
return;
|
|
11535
11576
|
}
|
|
11536
11577
|
const preprocessedGraph = preprocessGraphState({
|
|
11578
|
+
inputAnchorDefinitions: this.#asyncBranchInputAnchors,
|
|
11537
11579
|
graph: this.#graph,
|
|
11538
11580
|
loadedProjects: this.#loadedProjects,
|
|
11539
11581
|
project: this.#project,
|
|
@@ -11856,6 +11898,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11856
11898
|
this.#graphOutputs = ((_b = this.#sharedRunStateOverride) == null ? void 0 : _b.graphOutputs) ?? {};
|
|
11857
11899
|
this.#executionCache ??= /* @__PURE__ */ new Map();
|
|
11858
11900
|
this.#queuedNodes = /* @__PURE__ */ new Set();
|
|
11901
|
+
this.#deferredRunToIgnoredNodes = /* @__PURE__ */ new Set();
|
|
11859
11902
|
this.#connectedToolContinuationHost.reset();
|
|
11860
11903
|
this.#continuationCompletionOwnerByNodeId = /* @__PURE__ */ new Map();
|
|
11861
11904
|
this.#effectiveConnectionsForRun = void 0;
|
|
@@ -12332,8 +12375,9 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12332
12375
|
return;
|
|
12333
12376
|
}
|
|
12334
12377
|
for (const node of this.#executionGraphNodes) {
|
|
12335
|
-
if (this.#queuedNodes.has(node.id) === false) {
|
|
12378
|
+
if (this.#queuedNodes.has(node.id) === false && !this.#ignoreNodes.has(node.id)) {
|
|
12336
12379
|
this.#ignoreNodes.add(node.id);
|
|
12380
|
+
this.#deferredRunToIgnoredNodes.add(node.id);
|
|
12337
12381
|
}
|
|
12338
12382
|
}
|
|
12339
12383
|
}
|
|
@@ -12740,6 +12784,12 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12740
12784
|
}
|
|
12741
12785
|
#queueOutputNodes(node, outputNodes) {
|
|
12742
12786
|
const selectedOutputs = this.#graphOutputSelection ? outputNodes.filter((outputNode) => this.#isNodeSelected(outputNode.id)) : outputNodes;
|
|
12787
|
+
const relevantNodeIds = this.#getExecutionRelevantNodeIds();
|
|
12788
|
+
for (const outputNode of selectedOutputs) {
|
|
12789
|
+
if ((relevantNodeIds == null ? void 0 : relevantNodeIds.has(outputNode.id)) && this.#deferredRunToIgnoredNodes.delete(outputNode.id)) {
|
|
12790
|
+
this.#ignoreNodes.delete(outputNode.id);
|
|
12791
|
+
}
|
|
12792
|
+
}
|
|
12743
12793
|
void this.#processingQueue.addAll(
|
|
12744
12794
|
selectedOutputs.map((outputNode) => async () => {
|
|
12745
12795
|
this.#emitTraceEvent(`Trying to run output node from ${node.title}: ${outputNode.title} (${outputNode.id})`);
|
|
@@ -12812,7 +12862,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12812
12862
|
runtimeProfiler: this.#runtimeProfiler,
|
|
12813
12863
|
scheduler: this.#scheduler,
|
|
12814
12864
|
[graphProcessorGraphOverride]: plan.graph,
|
|
12815
|
-
[consumedAsyncBranchTriggerOverride]: triggerNode.id
|
|
12865
|
+
[consumedAsyncBranchTriggerOverride]: triggerNode.id,
|
|
12866
|
+
[asyncBranchInputAnchorsOverride]: Object.fromEntries(
|
|
12867
|
+
plan.graph.connections.filter((connection) => connection.inputNodeId === triggerNode.id).map((connection) => [connection.outputNodeId, this.#definitions[connection.outputNodeId]])
|
|
12868
|
+
)
|
|
12816
12869
|
});
|
|
12817
12870
|
onProcessorCreated(processor);
|
|
12818
12871
|
processor.executor = this.executor;
|
|
@@ -12986,11 +13039,9 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12986
13039
|
emitDetached(this.#emitter, event, this.#withExecution(data));
|
|
12987
13040
|
return;
|
|
12988
13041
|
}
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
}
|
|
12993
|
-
});
|
|
13042
|
+
const stopClaim = event === "nodeFinish" ? this.#claimStreamingWatchStopFromInvocation(node, data.outputs) : void 0;
|
|
13043
|
+
const eventData = event === "nodeFinish" && stopClaim ? { ...data, streamingWatchTerminal: true } : data;
|
|
13044
|
+
return this.#emitter.emit(event, this.#withExecution(eventData)).then(() => stopClaim == null ? void 0 : stopClaim.commit());
|
|
12994
13045
|
},
|
|
12995
13046
|
startNodeTiming: this.#captureNodeTimings ? () => this.#startNodeTiming() : void 0,
|
|
12996
13047
|
finishNodeTiming: this.#captureNodeTimings ? (start) => this.#finishNodeTiming(start) : void 0
|
|
@@ -13083,6 +13134,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13083
13134
|
this.#visitedNodes.add(node.id);
|
|
13084
13135
|
this.#accumulateCost(outputValues);
|
|
13085
13136
|
this.#assertStreamingOutputWatchFinalOutputs(node, outputValues);
|
|
13137
|
+
const stopClaim = this.#claimStreamingWatchStopFromInvocation(node, outputValues);
|
|
13086
13138
|
await this.#emitter.emit(
|
|
13087
13139
|
"nodeFinish",
|
|
13088
13140
|
this.#withExecution(
|
|
@@ -13091,14 +13143,15 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13091
13143
|
node,
|
|
13092
13144
|
outputs: outputValues,
|
|
13093
13145
|
processId,
|
|
13094
|
-
resultOrigin
|
|
13146
|
+
resultOrigin,
|
|
13147
|
+
...stopClaim ? { streamingWatchTerminal: true } : {}
|
|
13095
13148
|
},
|
|
13096
13149
|
this.#finishNodeTiming(timingStart)
|
|
13097
13150
|
)
|
|
13098
13151
|
)
|
|
13099
13152
|
);
|
|
13100
13153
|
this.#finishStreamingOutputWatches(node, outputValues);
|
|
13101
|
-
|
|
13154
|
+
stopClaim == null ? void 0 : stopClaim.commit();
|
|
13102
13155
|
} catch (error) {
|
|
13103
13156
|
await this.#nodeErrored(
|
|
13104
13157
|
node,
|
|
@@ -13933,7 +13986,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13933
13986
|
watchNode,
|
|
13934
13987
|
nextUpdateIndex: 0,
|
|
13935
13988
|
history: new StreamingOutputWatchHistory(),
|
|
13936
|
-
historySummaryEmitted: false
|
|
13989
|
+
historySummaryEmitted: false,
|
|
13990
|
+
unmatchedStopResolved: false
|
|
13937
13991
|
};
|
|
13938
13992
|
const plans = this.#streamingWatchPlansBySourceNodeId.get(sourceNode.id) ?? [];
|
|
13939
13993
|
plans.push(plan);
|
|
@@ -13942,8 +13996,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13942
13996
|
const watch = new StreamingOutputWatch(
|
|
13943
13997
|
watchNode.data,
|
|
13944
13998
|
(snapshot, registerCancel) => this.#runStreamingOutputWatchInvocation(plan, snapshot, registerCancel),
|
|
13945
|
-
(error) => this.#recordStreamingWatchFailure(watchNode, error)
|
|
13946
|
-
{ requiresAcceptedStop: stopNodeId != null }
|
|
13999
|
+
(error) => this.#recordStreamingWatchFailure(watchNode, error)
|
|
13947
14000
|
);
|
|
13948
14001
|
this.#streamingOutputWatches.set(watchNode.id, watch);
|
|
13949
14002
|
for (const nodeId of [watchNode.id, ...branchNodeIds]) {
|
|
@@ -14242,7 +14295,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14242
14295
|
processor.#streamingWatchInvocation = {
|
|
14243
14296
|
plan,
|
|
14244
14297
|
historyIteration,
|
|
14245
|
-
|
|
14298
|
+
claimStop: (value) => this.#claimAcceptedStreamingWatchStop(plan, historyIteration, value, snapshot.updateIndex),
|
|
14246
14299
|
stopReached: false
|
|
14247
14300
|
};
|
|
14248
14301
|
processor.preloadNodeData(plan.watchNode.id, this.#materializeStreamingOutputWatchSnapshot(snapshot));
|
|
@@ -14315,21 +14368,22 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14315
14368
|
root.#subprocessors.delete(processor);
|
|
14316
14369
|
}
|
|
14317
14370
|
}
|
|
14318
|
-
#
|
|
14371
|
+
#claimStreamingWatchStopFromInvocation(node, outputs) {
|
|
14319
14372
|
const invocation = this.#streamingWatchInvocation;
|
|
14320
14373
|
const completedValue = outputs["value"];
|
|
14321
14374
|
if ((invocation == null ? void 0 : invocation.plan.stopNodeId) === node.id && invocation.stopReached && completedValue !== void 0 && !this.#getUnhandledErroredNodes().length) {
|
|
14322
|
-
invocation.
|
|
14375
|
+
return invocation.claimStop(completedValue);
|
|
14323
14376
|
}
|
|
14377
|
+
return void 0;
|
|
14324
14378
|
}
|
|
14325
|
-
#
|
|
14379
|
+
#claimAcceptedStreamingWatchStop(plan, historyIteration, value, updateIndex) {
|
|
14326
14380
|
const stopNodeId = plan.stopNodeId;
|
|
14327
14381
|
if (!stopNodeId) {
|
|
14328
|
-
return;
|
|
14382
|
+
return void 0;
|
|
14329
14383
|
}
|
|
14330
14384
|
const watch = this.#streamingOutputWatches.get(plan.watchNode.id);
|
|
14331
14385
|
if (!watch || watch.stopped) {
|
|
14332
|
-
return;
|
|
14386
|
+
return void 0;
|
|
14333
14387
|
}
|
|
14334
14388
|
plan.history.acceptStop(historyIteration);
|
|
14335
14389
|
watch.stop(updateIndex);
|
|
@@ -14338,13 +14392,20 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14338
14392
|
throw new Error(`Watch Streaming Output "${plan.watchNode.title}" lost its Stop Watching Streaming Output node.`);
|
|
14339
14393
|
}
|
|
14340
14394
|
const acceptedValue = cloneExecutionOutputs({ ["value"]: value })["value"];
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14395
|
+
let committed = false;
|
|
14396
|
+
return {
|
|
14397
|
+
commit: () => {
|
|
14398
|
+
if (committed) return;
|
|
14399
|
+
committed = true;
|
|
14400
|
+
this.#nodeResults.set(stopNode.id, { ["value"]: acceptedValue });
|
|
14401
|
+
this.#visitedNodes.add(stopNode.id);
|
|
14402
|
+
this.#remainingNodes.delete(stopNode.id);
|
|
14403
|
+
const attachedData = this.#getAttachedDataTo(stopNode);
|
|
14404
|
+
const outputNodes = getOutputNodesFrom(this.#executionState, stopNode);
|
|
14405
|
+
this.#propagateAttachedDataToOutputNodes(stopNode, attachedData, outputNodes.connectionsToNodes);
|
|
14406
|
+
this.#queueOutputNodes(stopNode, outputNodes.nodes);
|
|
14407
|
+
}
|
|
14408
|
+
};
|
|
14348
14409
|
}
|
|
14349
14410
|
#cancelStreamingOutputWatchesForSource(nodeId) {
|
|
14350
14411
|
var _a;
|
|
@@ -14361,9 +14422,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14361
14422
|
return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending);
|
|
14362
14423
|
}
|
|
14363
14424
|
#hasUnresolvedForegroundOutputStreamingWatch() {
|
|
14364
|
-
return [...this.#streamingOutputWatches
|
|
14365
|
-
|
|
14366
|
-
|
|
14425
|
+
return [...this.#streamingOutputWatches].some(([watchNodeId, watch]) => {
|
|
14426
|
+
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
14427
|
+
return (plan == null ? void 0 : plan.stopNodeId) != null && !plan.unmatchedStopResolved && !watch.stopped;
|
|
14428
|
+
});
|
|
14367
14429
|
}
|
|
14368
14430
|
#hasDrainableStreamingOutputWatches() {
|
|
14369
14431
|
return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending && !watch.isAwaitingProducer);
|
|
@@ -14382,6 +14444,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14382
14444
|
await watch.drain();
|
|
14383
14445
|
}
|
|
14384
14446
|
await this.#processingQueue.onIdle();
|
|
14447
|
+
this.#resolveUnmatchedStreamingWatchStops();
|
|
14448
|
+
await this.#processingQueue.onIdle();
|
|
14385
14449
|
} while (this.#hasDrainableStreamingOutputWatches());
|
|
14386
14450
|
for (const [watchNodeId, watch] of this.#streamingOutputWatches) {
|
|
14387
14451
|
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
@@ -14397,7 +14461,27 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14397
14461
|
);
|
|
14398
14462
|
}
|
|
14399
14463
|
}
|
|
14464
|
+
#resolveUnmatchedStreamingWatchStops() {
|
|
14465
|
+
for (const [watchNodeId, watch] of this.#streamingOutputWatches) {
|
|
14466
|
+
const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
|
|
14467
|
+
if (!(plan == null ? void 0 : plan.stopNodeId) || plan.unmatchedStopResolved || !watch.finishedNormally) {
|
|
14468
|
+
continue;
|
|
14469
|
+
}
|
|
14470
|
+
const stopNode = this.#nodesById[plan.stopNodeId];
|
|
14471
|
+
if (!stopNode) {
|
|
14472
|
+
throw new Error(`Watch Streaming Output "${plan.watchNode.title}" lost its Stop Watching Streaming Output node.`);
|
|
14473
|
+
}
|
|
14474
|
+
plan.unmatchedStopResolved = true;
|
|
14475
|
+
this.#excludeNode(
|
|
14476
|
+
stopNode,
|
|
14477
|
+
(0, import_non_secure7.nanoid)(),
|
|
14478
|
+
{},
|
|
14479
|
+
"stream completed without Stop Watching Streaming Output accepting a value"
|
|
14480
|
+
);
|
|
14481
|
+
}
|
|
14482
|
+
}
|
|
14400
14483
|
#prepareAsyncBranchTopology() {
|
|
14484
|
+
var _a;
|
|
14401
14485
|
const connections = this.#getEffectiveConnections().filter(
|
|
14402
14486
|
(connection) => this.#isDefinitionValidConnection(connection)
|
|
14403
14487
|
);
|
|
@@ -14414,6 +14498,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14414
14498
|
incomingByNodeId.set(connection.inputNodeId, incoming);
|
|
14415
14499
|
}
|
|
14416
14500
|
for (const triggerNode of Object.values(this.#nodesById)) {
|
|
14501
|
+
if ((_a = this.#asyncBranchInputAnchors) == null ? void 0 : _a[triggerNode.id]) continue;
|
|
14417
14502
|
if (triggerNode.type !== "startBackgroundBranch" || triggerNode.disabled || !isRelevant(triggerNode.id)) {
|
|
14418
14503
|
continue;
|
|
14419
14504
|
}
|
|
@@ -20039,8 +20124,42 @@ function audioFormatToMediaType(format) {
|
|
|
20039
20124
|
}
|
|
20040
20125
|
}
|
|
20041
20126
|
|
|
20127
|
+
// src/model/LegacyChatEditorCache.ts
|
|
20128
|
+
var import_crypto_js2 = __toESM(require("crypto-js"), 1);
|
|
20129
|
+
var import_safe_stable_stringify5 = __toESM(require("safe-stable-stringify"), 1);
|
|
20130
|
+
function buildLegacyChatEditorCacheKey(parts) {
|
|
20131
|
+
const serialized = (0, import_safe_stable_stringify5.default)({ cacheVersion: 1, ...parts }) ?? "";
|
|
20132
|
+
return `legacy-chat:v1:sha256:${import_crypto_js2.default.SHA256(serialized).toString(import_crypto_js2.default.enc.Hex)}`;
|
|
20133
|
+
}
|
|
20134
|
+
function resolveLegacyChatEditorCache(params) {
|
|
20135
|
+
var _a;
|
|
20136
|
+
if (!params.enabled) {
|
|
20137
|
+
return { cache: void 0, cachedOutputs: void 0 };
|
|
20138
|
+
}
|
|
20139
|
+
const cache = params.context.editorExecutionCache ?? params.context.executionCache;
|
|
20140
|
+
if (cache == null) {
|
|
20141
|
+
return { cache: void 0, cachedOutputs: void 0 };
|
|
20142
|
+
}
|
|
20143
|
+
const cacheKey = buildLegacyChatEditorCacheKey({
|
|
20144
|
+
graphId: (_a = params.context.execution) == null ? void 0 : _a.graphId,
|
|
20145
|
+
nodeId: params.context.node.id,
|
|
20146
|
+
nodeType: params.context.node.type,
|
|
20147
|
+
providerIdentity: params.providerIdentity,
|
|
20148
|
+
request: params.request
|
|
20149
|
+
});
|
|
20150
|
+
const cached = cache.get(cacheKey);
|
|
20151
|
+
return {
|
|
20152
|
+
cache: { cache, cacheKey },
|
|
20153
|
+
cachedOutputs: cached == null ? void 0 : cloneExecutionOutputs(cached)
|
|
20154
|
+
};
|
|
20155
|
+
}
|
|
20156
|
+
function writeLegacyChatEditorCache(cache, outputs) {
|
|
20157
|
+
if (cache != null) {
|
|
20158
|
+
cache.cache.set(cache.cacheKey, cloneExecutionOutputs(outputs));
|
|
20159
|
+
}
|
|
20160
|
+
}
|
|
20161
|
+
|
|
20042
20162
|
// src/model/nodes/ChatNodeBase.ts
|
|
20043
|
-
var cache = /* @__PURE__ */ new Map();
|
|
20044
20163
|
var ChatNodeBase = {
|
|
20045
20164
|
defaultData: () => ({
|
|
20046
20165
|
model: "gpt-5",
|
|
@@ -20681,9 +20800,9 @@ var ChatNodeBase = {
|
|
|
20681
20800
|
},
|
|
20682
20801
|
{
|
|
20683
20802
|
type: "toggle",
|
|
20684
|
-
label: "Cache
|
|
20803
|
+
label: "Cache outputs (editor only)",
|
|
20685
20804
|
dataKey: "cache",
|
|
20686
|
-
helperMessage: "
|
|
20805
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
20687
20806
|
},
|
|
20688
20807
|
{
|
|
20689
20808
|
type: "toggle",
|
|
@@ -20825,13 +20944,19 @@ var ChatNodeBase = {
|
|
|
20825
20944
|
options2.temperature = useTopP ? void 0 : temperature;
|
|
20826
20945
|
options2.max_tokens = maxTokens;
|
|
20827
20946
|
}
|
|
20828
|
-
const
|
|
20829
|
-
|
|
20830
|
-
|
|
20831
|
-
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20947
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
20948
|
+
context,
|
|
20949
|
+
enabled: data.cache && !data.enableFunctionUse,
|
|
20950
|
+
providerIdentity: {
|
|
20951
|
+
apiKey: context.settings.openAiKey ?? "",
|
|
20952
|
+
organization: context.settings.openAiOrganization,
|
|
20953
|
+
headers: allAdditionalHeaders
|
|
20954
|
+
},
|
|
20955
|
+
request: options2
|
|
20956
|
+
});
|
|
20957
|
+
if (cachedOutputs != null) {
|
|
20958
|
+
(_a2 = context.markResultAsEditorCacheHit) == null ? void 0 : _a2.call(context);
|
|
20959
|
+
return cachedOutputs;
|
|
20835
20960
|
}
|
|
20836
20961
|
const startTime = Date.now();
|
|
20837
20962
|
if (isO1Beta || audio) {
|
|
@@ -20859,7 +20984,7 @@ var ChatNodeBase = {
|
|
|
20859
20984
|
durationMs: Date.now() - startTime
|
|
20860
20985
|
});
|
|
20861
20986
|
Object.freeze(output);
|
|
20862
|
-
cache
|
|
20987
|
+
writeLegacyChatEditorCache(cache, output);
|
|
20863
20988
|
return output;
|
|
20864
20989
|
}
|
|
20865
20990
|
const chunks = streamChatCompletions({
|
|
@@ -20891,7 +21016,7 @@ var ChatNodeBase = {
|
|
|
20891
21016
|
});
|
|
20892
21017
|
output["duration"] = { type: "number", value: Date.now() - startTime };
|
|
20893
21018
|
Object.freeze(output);
|
|
20894
|
-
cache
|
|
21019
|
+
writeLegacyChatEditorCache(cache, output);
|
|
20895
21020
|
return output;
|
|
20896
21021
|
},
|
|
20897
21022
|
{
|
|
@@ -21178,23 +21303,17 @@ var AnthropicError = class extends Error {
|
|
|
21178
21303
|
}
|
|
21179
21304
|
};
|
|
21180
21305
|
|
|
21181
|
-
// src/plugins/google/
|
|
21306
|
+
// src/plugins/google/googleGenerativeAi.ts
|
|
21182
21307
|
var import_genai = require("@google/genai");
|
|
21183
21308
|
var googleModelsDeprecated = {
|
|
21184
21309
|
"gemini-pro": {
|
|
21185
21310
|
maxTokens: 32760,
|
|
21186
|
-
cost: {
|
|
21187
|
-
prompt: NaN,
|
|
21188
|
-
completion: NaN
|
|
21189
|
-
},
|
|
21311
|
+
cost: { prompt: NaN, completion: NaN },
|
|
21190
21312
|
displayName: "Gemini Pro"
|
|
21191
21313
|
},
|
|
21192
21314
|
"gemini-pro-vision": {
|
|
21193
21315
|
maxTokens: 16384,
|
|
21194
|
-
cost: {
|
|
21195
|
-
prompt: NaN,
|
|
21196
|
-
completion: NaN
|
|
21197
|
-
},
|
|
21316
|
+
cost: { prompt: NaN, completion: NaN },
|
|
21198
21317
|
displayName: "Gemini Pro Vision"
|
|
21199
21318
|
}
|
|
21200
21319
|
};
|
|
@@ -21211,34 +21330,22 @@ var generativeAiGoogleModels = {
|
|
|
21211
21330
|
},
|
|
21212
21331
|
"gemini-2.5-flash": {
|
|
21213
21332
|
maxTokens: 1048576,
|
|
21214
|
-
cost: {
|
|
21215
|
-
prompt: 0.3 / 1e3,
|
|
21216
|
-
completion: 2.5 / 1e3
|
|
21217
|
-
},
|
|
21333
|
+
cost: { prompt: 0.3 / 1e3, completion: 2.5 / 1e3 },
|
|
21218
21334
|
displayName: "Gemini 2.5 Flash"
|
|
21219
21335
|
},
|
|
21220
21336
|
"gemini-2.5-flash-lite-preview-06-17": {
|
|
21221
21337
|
maxTokens: 1e6,
|
|
21222
|
-
cost: {
|
|
21223
|
-
prompt: 0.1 / 1e3,
|
|
21224
|
-
completion: 0.4 / 1e3
|
|
21225
|
-
},
|
|
21338
|
+
cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
|
|
21226
21339
|
displayName: "Gemini 2.5 Flash Lite Preview"
|
|
21227
21340
|
},
|
|
21228
21341
|
"gemini-2.0-flash": {
|
|
21229
21342
|
maxTokens: 1048576,
|
|
21230
|
-
cost: {
|
|
21231
|
-
prompt: 0.1 / 1e3,
|
|
21232
|
-
completion: 0.4 / 1e3
|
|
21233
|
-
},
|
|
21343
|
+
cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
|
|
21234
21344
|
displayName: "Gemini 2.0 Flash"
|
|
21235
21345
|
},
|
|
21236
21346
|
"gemini-2.0-flash-lite": {
|
|
21237
21347
|
maxTokens: 1048576,
|
|
21238
|
-
cost: {
|
|
21239
|
-
prompt: 0.075 / 1e3,
|
|
21240
|
-
completion: 0.3 / 1e3
|
|
21241
|
-
},
|
|
21348
|
+
cost: { prompt: 0.075 / 1e3, completion: 0.3 / 1e3 },
|
|
21242
21349
|
displayName: "Gemini 2.0 Flash Lite"
|
|
21243
21350
|
},
|
|
21244
21351
|
"gemini-1.5-pro": {
|
|
@@ -21262,18 +21369,6 @@ var generativeAiOptions = Object.entries(generativeAiGoogleModels).map(([id, { d
|
|
|
21262
21369
|
value: id,
|
|
21263
21370
|
label: displayName
|
|
21264
21371
|
}));
|
|
21265
|
-
function getVertexGenerativeModelOptions(options2) {
|
|
21266
|
-
return {
|
|
21267
|
-
model: options2.model,
|
|
21268
|
-
systemInstruction: options2.systemPrompt,
|
|
21269
|
-
generationConfig: {
|
|
21270
|
-
maxOutputTokens: options2.max_output_tokens,
|
|
21271
|
-
temperature: options2.temperature,
|
|
21272
|
-
topP: options2.top_p,
|
|
21273
|
-
topK: options2.top_k
|
|
21274
|
-
}
|
|
21275
|
-
};
|
|
21276
|
-
}
|
|
21277
21372
|
async function* streamGenerativeAi({
|
|
21278
21373
|
apiKey,
|
|
21279
21374
|
model,
|
|
@@ -21302,14 +21397,8 @@ async function* streamGenerativeAi({
|
|
|
21302
21397
|
topK,
|
|
21303
21398
|
tools,
|
|
21304
21399
|
abortSignal: signal,
|
|
21305
|
-
thinkingConfig: {
|
|
21306
|
-
|
|
21307
|
-
},
|
|
21308
|
-
httpOptions: {
|
|
21309
|
-
headers: {
|
|
21310
|
-
...additionalHeaders
|
|
21311
|
-
}
|
|
21312
|
-
}
|
|
21400
|
+
thinkingConfig: { thinkingBudget },
|
|
21401
|
+
httpOptions: { headers: { ...additionalHeaders } }
|
|
21313
21402
|
}
|
|
21314
21403
|
});
|
|
21315
21404
|
for await (const chunk of result) {
|
|
@@ -21332,6 +21421,20 @@ async function* streamGenerativeAi({
|
|
|
21332
21421
|
}
|
|
21333
21422
|
}
|
|
21334
21423
|
}
|
|
21424
|
+
|
|
21425
|
+
// src/plugins/google/google.ts
|
|
21426
|
+
function getVertexGenerativeModelOptions(options2) {
|
|
21427
|
+
return {
|
|
21428
|
+
model: options2.model,
|
|
21429
|
+
systemInstruction: options2.systemPrompt,
|
|
21430
|
+
generationConfig: {
|
|
21431
|
+
maxOutputTokens: options2.max_output_tokens,
|
|
21432
|
+
temperature: options2.temperature,
|
|
21433
|
+
topP: options2.top_p,
|
|
21434
|
+
topK: options2.top_k
|
|
21435
|
+
}
|
|
21436
|
+
};
|
|
21437
|
+
}
|
|
21335
21438
|
async function* streamChatCompletions3({
|
|
21336
21439
|
project,
|
|
21337
21440
|
location,
|
|
@@ -21347,8 +21450,11 @@ async function* streamChatCompletions3({
|
|
|
21347
21450
|
}) {
|
|
21348
21451
|
var _a, _b;
|
|
21349
21452
|
const { VertexAI } = await import("@google-cloud/vertexai");
|
|
21350
|
-
|
|
21351
|
-
|
|
21453
|
+
const vertexAi = new VertexAI({
|
|
21454
|
+
project,
|
|
21455
|
+
location,
|
|
21456
|
+
googleAuthOptions: { keyFilename: applicationCredentials }
|
|
21457
|
+
});
|
|
21352
21458
|
const generativeModel = vertexAi.preview.getGenerativeModel(
|
|
21353
21459
|
getVertexGenerativeModelOptions({
|
|
21354
21460
|
model,
|
|
@@ -22257,7 +22363,7 @@ function getResponseSettingsEditors() {
|
|
|
22257
22363
|
type: "toggle",
|
|
22258
22364
|
label: "Stream response",
|
|
22259
22365
|
dataKey: "useAsGraphPartialOutput",
|
|
22260
|
-
helperMessage:
|
|
22366
|
+
helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
|
|
22261
22367
|
},
|
|
22262
22368
|
{
|
|
22263
22369
|
type: "string",
|
|
@@ -26152,11 +26258,11 @@ function getLLMChatV2EditorCacheEligibility(data) {
|
|
|
26152
26258
|
}
|
|
26153
26259
|
|
|
26154
26260
|
// src/model/chat-v2/chatV2EditorCache.ts
|
|
26155
|
-
var
|
|
26156
|
-
var
|
|
26261
|
+
var import_safe_stable_stringify6 = __toESM(require("safe-stable-stringify"), 1);
|
|
26262
|
+
var import_crypto_js3 = __toESM(require("crypto-js"), 1);
|
|
26157
26263
|
function buildLLMChatV2EditorCacheKey(parts) {
|
|
26158
26264
|
const { cacheVersion = 3, ...keyParts } = parts;
|
|
26159
|
-
return (0,
|
|
26265
|
+
return (0, import_safe_stable_stringify6.default)({ cacheVersion, ...keyParts }) ?? "";
|
|
26160
26266
|
}
|
|
26161
26267
|
function cloneLLMChatV2EditorCacheOutputs(outputs) {
|
|
26162
26268
|
return cloneExecutionOutputs(outputs);
|
|
@@ -26165,7 +26271,7 @@ function fingerprintSecret(secret) {
|
|
|
26165
26271
|
if (!secret) {
|
|
26166
26272
|
return void 0;
|
|
26167
26273
|
}
|
|
26168
|
-
return `sha256:${
|
|
26274
|
+
return `sha256:${import_crypto_js3.default.SHA256(secret).toString(import_crypto_js3.default.enc.Hex)}`;
|
|
26169
26275
|
}
|
|
26170
26276
|
function fingerprintProviderConfigForCache(config) {
|
|
26171
26277
|
if (config.headers == null && config.endpointQuery == null) {
|
|
@@ -26189,7 +26295,7 @@ function fingerprintCustomProviderBaseURL(value) {
|
|
|
26189
26295
|
}
|
|
26190
26296
|
try {
|
|
26191
26297
|
const endpoint = normalizeOpenAICompatibleEndpoint(value);
|
|
26192
|
-
return (0,
|
|
26298
|
+
return (0, import_safe_stable_stringify6.default)({
|
|
26193
26299
|
baseURL: endpoint.baseURL,
|
|
26194
26300
|
endpointQuery: endpoint.endpointQuery.map(([key, queryValue]) => [key, fingerprintSecret(queryValue) ?? ""])
|
|
26195
26301
|
}) ?? "";
|
|
@@ -26217,7 +26323,7 @@ function fingerprintRuntimeValueForCache(value) {
|
|
|
26217
26323
|
if (value == null) {
|
|
26218
26324
|
return void 0;
|
|
26219
26325
|
}
|
|
26220
|
-
return fingerprintSecret((0,
|
|
26326
|
+
return fingerprintSecret((0, import_safe_stable_stringify6.default)(value) ?? "");
|
|
26221
26327
|
}
|
|
26222
26328
|
function fingerprintProfileChainForCache(data, profiles) {
|
|
26223
26329
|
if (profiles == null) {
|
|
@@ -28428,7 +28534,7 @@ var CodeNewNodeImpl = class extends NodeImpl {
|
|
|
28428
28534
|
`,
|
|
28429
28535
|
infoBoxTitle: "Code Node",
|
|
28430
28536
|
contextMenuTitle: "Code",
|
|
28431
|
-
group: ["
|
|
28537
|
+
group: ["Code"]
|
|
28432
28538
|
};
|
|
28433
28539
|
}
|
|
28434
28540
|
async process(inputs, context) {
|
|
@@ -28571,7 +28677,7 @@ var ExpressionNodeImpl = class extends NodeImpl {
|
|
|
28571
28677
|
`,
|
|
28572
28678
|
infoBoxTitle: "Expression Node",
|
|
28573
28679
|
contextMenuTitle: "Expression",
|
|
28574
|
-
group: ["
|
|
28680
|
+
group: ["Code"]
|
|
28575
28681
|
};
|
|
28576
28682
|
}
|
|
28577
28683
|
async process(inputs, context) {
|
|
@@ -30478,11 +30584,12 @@ var extractYamlNode = nodeDefinition(ExtractYamlNodeImpl, "Extract YAML");
|
|
|
30478
30584
|
// src/model/nodes/LoopControllerNode.ts
|
|
30479
30585
|
var import_non_secure31 = require("nanoid/non-secure");
|
|
30480
30586
|
var import_ts_dedent25 = require("ts-dedent");
|
|
30587
|
+
var loopControllerLegacyDisplayName = "Loop Controller (legacy)";
|
|
30481
30588
|
var LoopControllerNodeImpl = class extends NodeImpl {
|
|
30482
30589
|
static create() {
|
|
30483
30590
|
const chartNode = {
|
|
30484
30591
|
type: "loopController",
|
|
30485
|
-
title:
|
|
30592
|
+
title: loopControllerLegacyDisplayName,
|
|
30486
30593
|
id: (0, import_non_secure31.nanoid)(),
|
|
30487
30594
|
visualData: {
|
|
30488
30595
|
x: 0,
|
|
@@ -30594,8 +30701,8 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30594
30701
|
|
|
30595
30702
|
If the "continue" input is falsey, then the "break" output will run.
|
|
30596
30703
|
`,
|
|
30597
|
-
infoBoxTitle:
|
|
30598
|
-
contextMenuTitle:
|
|
30704
|
+
infoBoxTitle: `${loopControllerLegacyDisplayName} Node`,
|
|
30705
|
+
contextMenuTitle: loopControllerLegacyDisplayName,
|
|
30599
30706
|
group: ["Logic"]
|
|
30600
30707
|
};
|
|
30601
30708
|
}
|
|
@@ -30658,7 +30765,7 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30658
30765
|
return output;
|
|
30659
30766
|
}
|
|
30660
30767
|
};
|
|
30661
|
-
var loopControllerNode = nodeDefinition(LoopControllerNodeImpl,
|
|
30768
|
+
var loopControllerNode = nodeDefinition(LoopControllerNodeImpl, loopControllerLegacyDisplayName);
|
|
30662
30769
|
|
|
30663
30770
|
// src/model/nodes/TrimChatMessagesNode.ts
|
|
30664
30771
|
var import_non_secure32 = require("nanoid/non-secure");
|
|
@@ -31310,37 +31417,40 @@ var ContextNodeImpl = class extends NodeImpl {
|
|
|
31310
31417
|
var contextNode = nodeDefinition(ContextNodeImpl, "Context");
|
|
31311
31418
|
|
|
31312
31419
|
// src/model/nodes/CoalesceNode.ts
|
|
31313
|
-
var import_non_secure38 = require("nanoid/non-secure");
|
|
31314
31420
|
var import_ts_dedent31 = require("ts-dedent");
|
|
31421
|
+
|
|
31422
|
+
// src/model/nodes/CoalesceNodeBase.ts
|
|
31423
|
+
var import_non_secure38 = require("nanoid/non-secure");
|
|
31315
31424
|
var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
|
|
31316
31425
|
var IGNORE_NULL_LABEL = "Ignore 'null'";
|
|
31317
31426
|
var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
|
|
31318
|
-
|
|
31319
|
-
|
|
31320
|
-
|
|
31321
|
-
|
|
31322
|
-
|
|
31323
|
-
|
|
31324
|
-
|
|
31325
|
-
|
|
31326
|
-
|
|
31327
|
-
|
|
31328
|
-
|
|
31329
|
-
|
|
31330
|
-
|
|
31331
|
-
|
|
31332
|
-
}
|
|
31333
|
-
};
|
|
31334
|
-
return chartNode;
|
|
31427
|
+
function createCoalesceNode(type, title) {
|
|
31428
|
+
return {
|
|
31429
|
+
type,
|
|
31430
|
+
title,
|
|
31431
|
+
id: (0, import_non_secure38.nanoid)(),
|
|
31432
|
+
data: {
|
|
31433
|
+
ignoreNull: false,
|
|
31434
|
+
ignoreUndefined: false
|
|
31435
|
+
},
|
|
31436
|
+
visualData: {
|
|
31437
|
+
x: 0,
|
|
31438
|
+
y: 0,
|
|
31439
|
+
width: 190
|
|
31440
|
+
}
|
|
31335
31441
|
};
|
|
31442
|
+
}
|
|
31443
|
+
var CoalesceNodeBase = class extends NodeImpl {
|
|
31336
31444
|
getInputDefinitions(connections) {
|
|
31337
31445
|
const inputs = [];
|
|
31338
31446
|
const inputCount = getNextVariadicPortIndex(connections, this.chartNode.id, "input", "strict-positive");
|
|
31339
|
-
|
|
31340
|
-
|
|
31341
|
-
|
|
31342
|
-
|
|
31343
|
-
|
|
31447
|
+
if (this.includesLegacyConditionalInput) {
|
|
31448
|
+
inputs.push({
|
|
31449
|
+
dataType: "boolean",
|
|
31450
|
+
id: "conditional",
|
|
31451
|
+
title: "Conditional"
|
|
31452
|
+
});
|
|
31453
|
+
}
|
|
31344
31454
|
for (let i = 1; i <= inputCount; i++) {
|
|
31345
31455
|
inputs.push({
|
|
31346
31456
|
dataType: "any",
|
|
@@ -31383,21 +31493,9 @@ var CoalesceNodeImpl = class extends NodeImpl {
|
|
|
31383
31493
|
}
|
|
31384
31494
|
return ignoredValues.length > 0 ? ignoredValues.join("\n") : void 0;
|
|
31385
31495
|
}
|
|
31386
|
-
static getUIData() {
|
|
31387
|
-
return {
|
|
31388
|
-
infoBoxBody: import_ts_dedent31.dedent`
|
|
31389
|
-
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31390
|
-
|
|
31391
|
-
Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
|
|
31392
|
-
`,
|
|
31393
|
-
infoBoxTitle: "Coalesce Node",
|
|
31394
|
-
contextMenuTitle: "Coalesce",
|
|
31395
|
-
group: ["Logic"]
|
|
31396
|
-
};
|
|
31397
|
-
}
|
|
31398
31496
|
async process(inputData) {
|
|
31399
31497
|
const conditional = inputData["conditional"];
|
|
31400
|
-
if ((conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
|
|
31498
|
+
if (this.includesLegacyConditionalInput && (conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
|
|
31401
31499
|
return {
|
|
31402
31500
|
["output"]: {
|
|
31403
31501
|
type: "control-flow-excluded",
|
|
@@ -31444,7 +31542,46 @@ var CoalesceNodeImpl = class extends NodeImpl {
|
|
|
31444
31542
|
return this.data.ignoreNull === true && value === null || this.data.ignoreUndefined === true && value === void 0;
|
|
31445
31543
|
}
|
|
31446
31544
|
};
|
|
31447
|
-
|
|
31545
|
+
|
|
31546
|
+
// src/model/nodes/CoalesceNode.ts
|
|
31547
|
+
var coalesceLegacyDisplayName = "Coalesce (legacy)";
|
|
31548
|
+
var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
31549
|
+
includesLegacyConditionalInput = true;
|
|
31550
|
+
static create = () => createCoalesceNode("coalesce", coalesceLegacyDisplayName);
|
|
31551
|
+
static getUIData() {
|
|
31552
|
+
return {
|
|
31553
|
+
infoBoxBody: import_ts_dedent31.dedent`
|
|
31554
|
+
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.
|
|
31555
|
+
|
|
31556
|
+
Its Conditional input can exclude the node itself. New graphs should use Coalesce instead, which has the same fallback behavior without that port.
|
|
31557
|
+
`,
|
|
31558
|
+
infoBoxTitle: `${coalesceLegacyDisplayName} Node`,
|
|
31559
|
+
contextMenuTitle: coalesceLegacyDisplayName,
|
|
31560
|
+
group: ["Logic"]
|
|
31561
|
+
};
|
|
31562
|
+
}
|
|
31563
|
+
};
|
|
31564
|
+
var coalesceNode = nodeDefinition(CoalesceNodeImpl, coalesceLegacyDisplayName);
|
|
31565
|
+
|
|
31566
|
+
// src/model/nodes/CoalesceNewNode.ts
|
|
31567
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
31568
|
+
var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
31569
|
+
includesLegacyConditionalInput = false;
|
|
31570
|
+
static create = () => createCoalesceNode("coalesceNew", "Coalesce");
|
|
31571
|
+
static getUIData() {
|
|
31572
|
+
return {
|
|
31573
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
31574
|
+
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31575
|
+
|
|
31576
|
+
Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
|
|
31577
|
+
`,
|
|
31578
|
+
infoBoxTitle: "Coalesce Node",
|
|
31579
|
+
contextMenuTitle: "Coalesce",
|
|
31580
|
+
group: ["Logic"]
|
|
31581
|
+
};
|
|
31582
|
+
}
|
|
31583
|
+
};
|
|
31584
|
+
var coalesceNewNode = nodeDefinition(CoalesceNewNodeImpl, "Coalesce");
|
|
31448
31585
|
|
|
31449
31586
|
// src/model/nodes/DidRunNode.ts
|
|
31450
31587
|
var import_non_secure39 = require("nanoid/non-secure");
|
|
@@ -31523,7 +31660,7 @@ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
|
31523
31660
|
|
|
31524
31661
|
// src/model/nodes/PassthroughNode.ts
|
|
31525
31662
|
var import_non_secure40 = require("nanoid/non-secure");
|
|
31526
|
-
var
|
|
31663
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
31527
31664
|
var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
|
|
31528
31665
|
var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
|
|
31529
31666
|
var MAX_PASSTHROUGH_PORT_INDEX = 1e4;
|
|
@@ -31585,7 +31722,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31585
31722
|
}
|
|
31586
31723
|
static getUIData() {
|
|
31587
31724
|
return {
|
|
31588
|
-
infoBoxBody:
|
|
31725
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
31589
31726
|
Simply passes the input value to the output without any modifications.
|
|
31590
31727
|
`,
|
|
31591
31728
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -31608,7 +31745,7 @@ var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
|
31608
31745
|
|
|
31609
31746
|
// src/model/nodes/DataBusNode.ts
|
|
31610
31747
|
var import_non_secure41 = require("nanoid/non-secure");
|
|
31611
|
-
var
|
|
31748
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
31612
31749
|
function getConnectedChannelIndices(connections, nodeId) {
|
|
31613
31750
|
const channelIndices = /* @__PURE__ */ new Set();
|
|
31614
31751
|
for (const connection of connections) {
|
|
@@ -31668,7 +31805,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31668
31805
|
}
|
|
31669
31806
|
static getUIData() {
|
|
31670
31807
|
return {
|
|
31671
|
-
infoBoxBody:
|
|
31808
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
31672
31809
|
Organizes independent connections in a compact rail at the top of the
|
|
31673
31810
|
canvas. Data Bus channels are wiring topology, not executable nodes.
|
|
31674
31811
|
`,
|
|
@@ -31685,7 +31822,7 @@ var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
|
|
|
31685
31822
|
|
|
31686
31823
|
// src/model/nodes/StartBackgroundBranchNode.ts
|
|
31687
31824
|
var import_non_secure42 = require("nanoid/non-secure");
|
|
31688
|
-
var
|
|
31825
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
31689
31826
|
var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
31690
31827
|
static create = () => ({
|
|
31691
31828
|
type: "startBackgroundBranch",
|
|
@@ -31716,7 +31853,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31716
31853
|
}
|
|
31717
31854
|
static getUIData() {
|
|
31718
31855
|
return {
|
|
31719
|
-
infoBoxBody:
|
|
31856
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
31720
31857
|
Starts its downstream branch asynchronously. The foreground graph continues immediately, while the root run waits for the async branch before it ends.
|
|
31721
31858
|
`,
|
|
31722
31859
|
infoBoxTitle: "Start Async Branch Node",
|
|
@@ -31742,7 +31879,7 @@ var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "S
|
|
|
31742
31879
|
|
|
31743
31880
|
// src/model/nodes/WatchStreamingOutputNode.ts
|
|
31744
31881
|
var import_non_secure43 = require("nanoid/non-secure");
|
|
31745
|
-
var
|
|
31882
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
31746
31883
|
var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31747
31884
|
static create() {
|
|
31748
31885
|
return {
|
|
@@ -31781,7 +31918,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31781
31918
|
contextMenuTitle: "Watch Streaming Output",
|
|
31782
31919
|
group: ["Logic"],
|
|
31783
31920
|
infoBoxTitle: "Watch Streaming Output Node",
|
|
31784
|
-
infoBoxBody:
|
|
31921
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
31785
31922
|
Runs its downstream branch for streaming output snapshots. Without Stop Watching
|
|
31786
31923
|
Streaming Output, every snapshot runs the branch and the watch finishes with its
|
|
31787
31924
|
producer. Add one Stop node only when a chosen value must continue through the
|
|
@@ -31865,7 +32002,7 @@ var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Wat
|
|
|
31865
32002
|
|
|
31866
32003
|
// src/model/nodes/StopWatchingStreamingOutputNode.ts
|
|
31867
32004
|
var import_non_secure44 = require("nanoid/non-secure");
|
|
31868
|
-
var
|
|
32005
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
31869
32006
|
var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31870
32007
|
static create() {
|
|
31871
32008
|
return {
|
|
@@ -31887,10 +32024,12 @@ var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31887
32024
|
contextMenuTitle: "Stop Watching Streaming Output",
|
|
31888
32025
|
group: ["Logic"],
|
|
31889
32026
|
infoBoxTitle: "Stop Watching Streaming Output Node",
|
|
31890
|
-
infoBoxBody:
|
|
32027
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
31891
32028
|
Accepts a value from a Watch Streaming Output branch, stops future streaming
|
|
31892
32029
|
snapshots, and lets its completed output continue through the ordinary graph.
|
|
31893
32030
|
In parallel mode, the first completed branch to reach this node wins.
|
|
32031
|
+
If the stream ends without a value reaching this node, it is shown as Not ran
|
|
32032
|
+
and its ordinary downstream nodes receive the usual excluded value.
|
|
31894
32033
|
`
|
|
31895
32034
|
};
|
|
31896
32035
|
}
|
|
@@ -31916,7 +32055,7 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
|
|
|
31916
32055
|
|
|
31917
32056
|
// src/model/nodes/PopNode.ts
|
|
31918
32057
|
var import_non_secure45 = require("nanoid/non-secure");
|
|
31919
|
-
var
|
|
32058
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
31920
32059
|
var PopNodeImpl = class extends NodeImpl {
|
|
31921
32060
|
static create() {
|
|
31922
32061
|
const baseNode = {
|
|
@@ -31967,7 +32106,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
31967
32106
|
}
|
|
31968
32107
|
static getUIData() {
|
|
31969
32108
|
return {
|
|
31970
|
-
infoBoxBody:
|
|
32109
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
31971
32110
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
31972
32111
|
|
|
31973
32112
|
Can also be used to just extract the last value from an array.
|
|
@@ -32004,7 +32143,7 @@ var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
|
32004
32143
|
|
|
32005
32144
|
// src/model/nodes/SetGlobalNode.ts
|
|
32006
32145
|
var import_non_secure46 = require("nanoid/non-secure");
|
|
32007
|
-
var
|
|
32146
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
32008
32147
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
32009
32148
|
static create() {
|
|
32010
32149
|
const chartNode = {
|
|
@@ -32078,14 +32217,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32078
32217
|
];
|
|
32079
32218
|
}
|
|
32080
32219
|
getBody() {
|
|
32081
|
-
return
|
|
32220
|
+
return import_ts_dedent39.dedent`
|
|
32082
32221
|
${this.data.id}
|
|
32083
32222
|
Type: ${this.data.dataType}
|
|
32084
32223
|
`;
|
|
32085
32224
|
}
|
|
32086
32225
|
static getUIData() {
|
|
32087
32226
|
return {
|
|
32088
|
-
infoBoxBody:
|
|
32227
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
32089
32228
|
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.
|
|
32090
32229
|
`,
|
|
32091
32230
|
infoBoxTitle: "Set Global Node",
|
|
@@ -32122,7 +32261,7 @@ var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
|
32122
32261
|
|
|
32123
32262
|
// src/model/nodes/GetGlobalNode.ts
|
|
32124
32263
|
var import_non_secure47 = require("nanoid/non-secure");
|
|
32125
|
-
var
|
|
32264
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
32126
32265
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
32127
32266
|
static create() {
|
|
32128
32267
|
const chartNode = {
|
|
@@ -32206,7 +32345,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32206
32345
|
];
|
|
32207
32346
|
}
|
|
32208
32347
|
getBody() {
|
|
32209
|
-
return
|
|
32348
|
+
return import_ts_dedent40.dedent`
|
|
32210
32349
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
32211
32350
|
Type: ${this.data.dataType}
|
|
32212
32351
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -32214,7 +32353,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32214
32353
|
}
|
|
32215
32354
|
static getUIData() {
|
|
32216
32355
|
return {
|
|
32217
|
-
infoBoxBody:
|
|
32356
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
32218
32357
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
32219
32358
|
`,
|
|
32220
32359
|
infoBoxTitle: "Get Global Node",
|
|
@@ -32260,7 +32399,7 @@ var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
|
32260
32399
|
|
|
32261
32400
|
// src/model/nodes/SetStoredValueNode.ts
|
|
32262
32401
|
var import_non_secure48 = require("nanoid/non-secure");
|
|
32263
|
-
var
|
|
32402
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
32264
32403
|
|
|
32265
32404
|
// src/model/nodes/StoredValueNodeUtils.ts
|
|
32266
32405
|
var portableStoredValueScalarTypes = [
|
|
@@ -32363,7 +32502,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32363
32502
|
];
|
|
32364
32503
|
}
|
|
32365
32504
|
getBody() {
|
|
32366
|
-
return
|
|
32505
|
+
return import_ts_dedent41.dedent`
|
|
32367
32506
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32368
32507
|
Type: ${this.data.dataType}
|
|
32369
32508
|
`;
|
|
@@ -32395,7 +32534,7 @@ var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Valu
|
|
|
32395
32534
|
|
|
32396
32535
|
// src/model/nodes/GetStoredValueNode.ts
|
|
32397
32536
|
var import_non_secure49 = require("nanoid/non-secure");
|
|
32398
|
-
var
|
|
32537
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
32399
32538
|
var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
32400
32539
|
static create() {
|
|
32401
32540
|
return {
|
|
@@ -32456,7 +32595,7 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32456
32595
|
];
|
|
32457
32596
|
}
|
|
32458
32597
|
getBody() {
|
|
32459
|
-
return
|
|
32598
|
+
return import_ts_dedent42.dedent`
|
|
32460
32599
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32461
32600
|
Type: ${this.data.dataType}
|
|
32462
32601
|
${this.data.wait ? "Waits for an in-run Set" : ""}
|
|
@@ -32495,7 +32634,7 @@ var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Valu
|
|
|
32495
32634
|
|
|
32496
32635
|
// src/model/nodes/WaitForEventNode.ts
|
|
32497
32636
|
var import_non_secure50 = require("nanoid/non-secure");
|
|
32498
|
-
var
|
|
32637
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
32499
32638
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
32500
32639
|
static create() {
|
|
32501
32640
|
return {
|
|
@@ -32554,7 +32693,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32554
32693
|
}
|
|
32555
32694
|
static getUIData() {
|
|
32556
32695
|
return {
|
|
32557
|
-
infoBoxBody:
|
|
32696
|
+
infoBoxBody: import_ts_dedent43.dedent`
|
|
32558
32697
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
32559
32698
|
`,
|
|
32560
32699
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -32575,7 +32714,7 @@ var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
|
32575
32714
|
|
|
32576
32715
|
// src/model/nodes/ToolNode.ts
|
|
32577
32716
|
var import_non_secure51 = require("nanoid/non-secure");
|
|
32578
|
-
var
|
|
32717
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
32579
32718
|
var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
|
|
32580
32719
|
function getToolNodeBodyPreview(data) {
|
|
32581
32720
|
const [name = "", ...descriptionLines] = buildNodeBodyPreview(
|
|
@@ -32603,7 +32742,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32603
32742
|
name: "newTool",
|
|
32604
32743
|
description: "No description provided",
|
|
32605
32744
|
resultHandling: "continue",
|
|
32606
|
-
schema:
|
|
32745
|
+
schema: import_ts_dedent44.dedent`
|
|
32607
32746
|
{
|
|
32608
32747
|
"type": "object",
|
|
32609
32748
|
"properties": {}
|
|
@@ -32730,7 +32869,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32730
32869
|
}
|
|
32731
32870
|
static getUIData() {
|
|
32732
32871
|
return {
|
|
32733
|
-
infoBoxBody:
|
|
32872
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
32734
32873
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
32735
32874
|
`,
|
|
32736
32875
|
infoBoxTitle: "Tool Node",
|
|
@@ -32785,7 +32924,7 @@ var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
|
32785
32924
|
// src/model/nodes/ToYamlNode.ts
|
|
32786
32925
|
var import_non_secure52 = require("nanoid/non-secure");
|
|
32787
32926
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
32788
|
-
var
|
|
32927
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
32789
32928
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
32790
32929
|
static create() {
|
|
32791
32930
|
const chartNode = {
|
|
@@ -32822,7 +32961,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
32822
32961
|
}
|
|
32823
32962
|
static getUIData() {
|
|
32824
32963
|
return {
|
|
32825
|
-
infoBoxBody:
|
|
32964
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
32826
32965
|
Turns the input object into YAML text.
|
|
32827
32966
|
`,
|
|
32828
32967
|
infoBoxTitle: "To YAML Node",
|
|
@@ -32848,7 +32987,7 @@ var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
|
32848
32987
|
|
|
32849
32988
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
32850
32989
|
var import_non_secure53 = require("nanoid/non-secure");
|
|
32851
|
-
var
|
|
32990
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
32852
32991
|
|
|
32853
32992
|
// src/integrations/integrations.ts
|
|
32854
32993
|
var registeredIntegrations = {
|
|
@@ -32955,7 +33094,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
32955
33094
|
}
|
|
32956
33095
|
static getUIData() {
|
|
32957
33096
|
return {
|
|
32958
|
-
infoBoxBody:
|
|
33097
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
32959
33098
|
Gets a OpenAI vector embedding for the input text provided.
|
|
32960
33099
|
|
|
32961
33100
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -32987,7 +33126,7 @@ var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
|
32987
33126
|
|
|
32988
33127
|
// src/model/nodes/VectorStoreNode.ts
|
|
32989
33128
|
var import_non_secure54 = require("nanoid/non-secure");
|
|
32990
|
-
var
|
|
33129
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
32991
33130
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
32992
33131
|
static create() {
|
|
32993
33132
|
return {
|
|
@@ -33067,14 +33206,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33067
33206
|
];
|
|
33068
33207
|
}
|
|
33069
33208
|
getBody() {
|
|
33070
|
-
return
|
|
33209
|
+
return import_ts_dedent47.dedent`
|
|
33071
33210
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33072
33211
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
33073
33212
|
`;
|
|
33074
33213
|
}
|
|
33075
33214
|
static getUIData() {
|
|
33076
33215
|
return {
|
|
33077
|
-
infoBoxBody:
|
|
33216
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
33078
33217
|
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.
|
|
33079
33218
|
`,
|
|
33080
33219
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -33110,7 +33249,7 @@ var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
|
33110
33249
|
|
|
33111
33250
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
33112
33251
|
var import_non_secure55 = require("nanoid/non-secure");
|
|
33113
|
-
var
|
|
33252
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
33114
33253
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
33115
33254
|
static create() {
|
|
33116
33255
|
return {
|
|
@@ -33197,7 +33336,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33197
33336
|
];
|
|
33198
33337
|
}
|
|
33199
33338
|
getBody() {
|
|
33200
|
-
return
|
|
33339
|
+
return import_ts_dedent48.dedent`
|
|
33201
33340
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33202
33341
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
33203
33342
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -33205,7 +33344,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33205
33344
|
}
|
|
33206
33345
|
static getUIData() {
|
|
33207
33346
|
return {
|
|
33208
|
-
infoBoxBody:
|
|
33347
|
+
infoBoxBody: import_ts_dedent48.dedent`
|
|
33209
33348
|
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.
|
|
33210
33349
|
`,
|
|
33211
33350
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -33236,7 +33375,7 @@ var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl,
|
|
|
33236
33375
|
|
|
33237
33376
|
// src/model/nodes/KnowledgeSourceNode.ts
|
|
33238
33377
|
var import_non_secure56 = require("nanoid/non-secure");
|
|
33239
|
-
var
|
|
33378
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
33240
33379
|
var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33241
33380
|
static create() {
|
|
33242
33381
|
return {
|
|
@@ -33299,7 +33438,7 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33299
33438
|
getBody(context) {
|
|
33300
33439
|
var _a;
|
|
33301
33440
|
const connection = (_a = context.project.metadata.knowledgeStores) == null ? void 0 : _a[this.data.connectionId];
|
|
33302
|
-
return
|
|
33441
|
+
return import_ts_dedent49.dedent`
|
|
33303
33442
|
Store: ${this.data.useConnectionIdInput ? "(from input)" : ((connection == null ? void 0 : connection.displayName) ?? this.data.connectionId) || "(not selected)"}
|
|
33304
33443
|
Source: ${this.data.useSourceIdInput ? "(from input)" : this.data.sourceId || "(not set)"}
|
|
33305
33444
|
${this.data.useVersionInput || this.data.version ? "Exact version configured" : "Uses active version"}
|
|
@@ -33333,7 +33472,7 @@ var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Sou
|
|
|
33333
33472
|
|
|
33334
33473
|
// src/model/nodes/KnowledgeDocumentNode.ts
|
|
33335
33474
|
var import_non_secure57 = require("nanoid/non-secure");
|
|
33336
|
-
var
|
|
33475
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
33337
33476
|
var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
33338
33477
|
static create() {
|
|
33339
33478
|
return {
|
|
@@ -33388,7 +33527,7 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33388
33527
|
];
|
|
33389
33528
|
}
|
|
33390
33529
|
getBody() {
|
|
33391
|
-
return
|
|
33530
|
+
return import_ts_dedent50.dedent`
|
|
33392
33531
|
${this.data.useTextInput ? "Text from input" : `${this.data.text.length} characters`}
|
|
33393
33532
|
${this.data.useDocumentIdInput ? "ID from input" : this.data.documentId ? `ID: ${this.data.documentId}` : "ID generated from content"}
|
|
33394
33533
|
`;
|
|
@@ -33415,7 +33554,7 @@ var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge
|
|
|
33415
33554
|
|
|
33416
33555
|
// src/model/nodes/SyncKnowledgeSourceNode.ts
|
|
33417
33556
|
var import_non_secure58 = require("nanoid/non-secure");
|
|
33418
|
-
var
|
|
33557
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
33419
33558
|
var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33420
33559
|
static create() {
|
|
33421
33560
|
return {
|
|
@@ -33493,7 +33632,7 @@ var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33493
33632
|
];
|
|
33494
33633
|
}
|
|
33495
33634
|
getBody() {
|
|
33496
|
-
return
|
|
33635
|
+
return import_ts_dedent51.dedent`
|
|
33497
33636
|
${this.data.targetSize} ${this.data.chunkUnit}
|
|
33498
33637
|
${this.data.overlap} overlap
|
|
33499
33638
|
${this.data.includeTitle ? "Includes titles" : "Content only"}
|
|
@@ -33643,7 +33782,7 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
|
|
|
33643
33782
|
|
|
33644
33783
|
// src/model/nodes/SearchKnowledgeNode.ts
|
|
33645
33784
|
var import_non_secure60 = require("nanoid/non-secure");
|
|
33646
|
-
var
|
|
33785
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
33647
33786
|
var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
33648
33787
|
static create() {
|
|
33649
33788
|
return {
|
|
@@ -33712,7 +33851,7 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33712
33851
|
];
|
|
33713
33852
|
}
|
|
33714
33853
|
getBody() {
|
|
33715
|
-
return
|
|
33854
|
+
return import_ts_dedent52.dedent`
|
|
33716
33855
|
${this.data.topK} per query -> ${this.data.finalResultCount} final
|
|
33717
33856
|
Reranking: ${this.data.rerankMode}
|
|
33718
33857
|
`;
|
|
@@ -33770,7 +33909,7 @@ var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowle
|
|
|
33770
33909
|
|
|
33771
33910
|
// src/model/nodes/BuildKnowledgeContextNode.ts
|
|
33772
33911
|
var import_non_secure61 = require("nanoid/non-secure");
|
|
33773
|
-
var
|
|
33912
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
33774
33913
|
var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
33775
33914
|
static create() {
|
|
33776
33915
|
return {
|
|
@@ -33828,7 +33967,7 @@ var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
|
33828
33967
|
];
|
|
33829
33968
|
}
|
|
33830
33969
|
getBody() {
|
|
33831
|
-
return
|
|
33970
|
+
return import_ts_dedent53.dedent`
|
|
33832
33971
|
${this.data.budget} ${this.data.budgetUnit}
|
|
33833
33972
|
Up to ${this.data.maxItems} items
|
|
33834
33973
|
Citations: [${this.data.citationPrefix || "K"}1]
|
|
@@ -33913,7 +34052,7 @@ var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "B
|
|
|
33913
34052
|
var import_non_secure62 = require("nanoid/non-secure");
|
|
33914
34053
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
33915
34054
|
var import_ts_pattern3 = require("ts-pattern");
|
|
33916
|
-
var
|
|
34055
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
33917
34056
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
33918
34057
|
var HashNodeImpl = class extends NodeImpl {
|
|
33919
34058
|
static create() {
|
|
@@ -33971,7 +34110,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
33971
34110
|
}
|
|
33972
34111
|
static getUIData() {
|
|
33973
34112
|
return {
|
|
33974
|
-
infoBoxBody:
|
|
34113
|
+
infoBoxBody: import_ts_dedent54.dedent`
|
|
33975
34114
|
Computes a hash of the input value using the configured hash function.
|
|
33976
34115
|
`,
|
|
33977
34116
|
infoBoxTitle: "Hash Node",
|
|
@@ -34000,7 +34139,7 @@ var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
|
34000
34139
|
|
|
34001
34140
|
// src/model/nodes/AbortGraphNode.ts
|
|
34002
34141
|
var import_non_secure63 = require("nanoid/non-secure");
|
|
34003
|
-
var
|
|
34142
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
34004
34143
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
34005
34144
|
static create() {
|
|
34006
34145
|
const chartNode = {
|
|
@@ -34057,13 +34196,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34057
34196
|
];
|
|
34058
34197
|
}
|
|
34059
34198
|
getBody() {
|
|
34060
|
-
return
|
|
34199
|
+
return import_ts_dedent55.dedent`
|
|
34061
34200
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
34062
34201
|
`;
|
|
34063
34202
|
}
|
|
34064
34203
|
static getUIData() {
|
|
34065
34204
|
return {
|
|
34066
|
-
infoBoxBody:
|
|
34205
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
34067
34206
|
Aborts the execution of the entire graph immediately.
|
|
34068
34207
|
|
|
34069
34208
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -34089,7 +34228,7 @@ var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
|
34089
34228
|
|
|
34090
34229
|
// src/model/nodes/RaceInputsNode.ts
|
|
34091
34230
|
var import_non_secure64 = require("nanoid/non-secure");
|
|
34092
|
-
var
|
|
34231
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
34093
34232
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
34094
34233
|
static create() {
|
|
34095
34234
|
const chartNode = {
|
|
@@ -34131,7 +34270,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34131
34270
|
}
|
|
34132
34271
|
static getUIData() {
|
|
34133
34272
|
return {
|
|
34134
|
-
infoBoxBody:
|
|
34273
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
34135
34274
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
34136
34275
|
`,
|
|
34137
34276
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -34160,7 +34299,7 @@ var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
|
34160
34299
|
|
|
34161
34300
|
// src/model/nodes/ToJsonNode.ts
|
|
34162
34301
|
var import_non_secure65 = require("nanoid/non-secure");
|
|
34163
|
-
var
|
|
34302
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
34164
34303
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
34165
34304
|
static create() {
|
|
34166
34305
|
const chartNode = {
|
|
@@ -34211,7 +34350,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34211
34350
|
}
|
|
34212
34351
|
static getUIData() {
|
|
34213
34352
|
return {
|
|
34214
|
-
infoBoxBody:
|
|
34353
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
34215
34354
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
34216
34355
|
`,
|
|
34217
34356
|
infoBoxTitle: "To JSON Node",
|
|
@@ -34234,7 +34373,7 @@ var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
|
34234
34373
|
|
|
34235
34374
|
// src/model/nodes/JoinNode.ts
|
|
34236
34375
|
var import_non_secure66 = require("nanoid/non-secure");
|
|
34237
|
-
var
|
|
34376
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
34238
34377
|
var JoinNodeImpl = class extends NodeImpl {
|
|
34239
34378
|
static create = () => {
|
|
34240
34379
|
const chartNode = {
|
|
@@ -34302,7 +34441,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34302
34441
|
}
|
|
34303
34442
|
static getUIData() {
|
|
34304
34443
|
return {
|
|
34305
|
-
infoBoxBody:
|
|
34444
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
34306
34445
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
34307
34446
|
|
|
34308
34447
|
Defaults to a newline.
|
|
@@ -34341,7 +34480,7 @@ var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
|
34341
34480
|
// src/model/nodes/FilterNode.ts
|
|
34342
34481
|
var import_non_secure67 = require("nanoid/non-secure");
|
|
34343
34482
|
var import_lodash_es10 = require("lodash");
|
|
34344
|
-
var
|
|
34483
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
34345
34484
|
var FilterNodeImpl = class extends NodeImpl {
|
|
34346
34485
|
static create() {
|
|
34347
34486
|
const chartNode = {
|
|
@@ -34384,7 +34523,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34384
34523
|
}
|
|
34385
34524
|
static getUIData() {
|
|
34386
34525
|
return {
|
|
34387
|
-
infoBoxBody:
|
|
34526
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
34388
34527
|
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.
|
|
34389
34528
|
`,
|
|
34390
34529
|
infoBoxTitle: "Filter Node",
|
|
@@ -34410,10 +34549,10 @@ var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
|
34410
34549
|
|
|
34411
34550
|
// src/model/nodes/JSFilterNode.ts
|
|
34412
34551
|
var import_non_secure68 = require("nanoid/non-secure");
|
|
34413
|
-
var
|
|
34552
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
34414
34553
|
|
|
34415
34554
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
34416
|
-
var
|
|
34555
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
34417
34556
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
34418
34557
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
34419
34558
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -34439,7 +34578,7 @@ function getJSListInterpolationContext(callbackBody) {
|
|
|
34439
34578
|
});
|
|
34440
34579
|
}
|
|
34441
34580
|
function buildJSListRuntimePreamble(interpolationContext) {
|
|
34442
|
-
return
|
|
34581
|
+
return import_ts_dedent60.dedent`
|
|
34443
34582
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
34444
34583
|
${buildJsValueInputClonePreamble({
|
|
34445
34584
|
cacheIdentifier: interpolationContext.cloneCacheIdentifier,
|
|
@@ -34484,7 +34623,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
|
|
|
34484
34623
|
function buildJSFilterWrapper(callbackBody) {
|
|
34485
34624
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34486
34625
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34487
|
-
return
|
|
34626
|
+
return import_ts_dedent60.dedent`
|
|
34488
34627
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34489
34628
|
|
|
34490
34629
|
if (!Array.isArray(array)) {
|
|
@@ -34520,7 +34659,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
34520
34659
|
function buildJSMapWrapper(callbackBody) {
|
|
34521
34660
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34522
34661
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34523
|
-
return
|
|
34662
|
+
return import_ts_dedent60.dedent`
|
|
34524
34663
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34525
34664
|
|
|
34526
34665
|
if (!Array.isArray(array)) {
|
|
@@ -34589,7 +34728,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
34589
34728
|
const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
|
|
34590
34729
|
return {
|
|
34591
34730
|
type: "colorized",
|
|
34592
|
-
text:
|
|
34731
|
+
text: import_ts_dedent60.dedent`
|
|
34593
34732
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
34594
34733
|
${indentLines(previewBody, " ")}
|
|
34595
34734
|
}
|
|
@@ -34673,7 +34812,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34673
34812
|
}
|
|
34674
34813
|
static getUIData() {
|
|
34675
34814
|
return {
|
|
34676
|
-
infoBoxBody:
|
|
34815
|
+
infoBoxBody: import_ts_dedent61.dedent`
|
|
34677
34816
|
Filters an input array using the body of a JavaScript callback.
|
|
34678
34817
|
|
|
34679
34818
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34702,7 +34841,7 @@ var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
|
34702
34841
|
|
|
34703
34842
|
// src/model/nodes/JSMapNode.ts
|
|
34704
34843
|
var import_non_secure69 = require("nanoid/non-secure");
|
|
34705
|
-
var
|
|
34844
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
34706
34845
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
34707
34846
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
34708
34847
|
static create() {
|
|
@@ -34741,7 +34880,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34741
34880
|
}
|
|
34742
34881
|
static getUIData() {
|
|
34743
34882
|
return {
|
|
34744
|
-
infoBoxBody:
|
|
34883
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
34745
34884
|
Maps an input array using the body of a JavaScript callback.
|
|
34746
34885
|
|
|
34747
34886
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34770,7 +34909,7 @@ var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
|
34770
34909
|
|
|
34771
34910
|
// src/model/nodes/ObjectNode.ts
|
|
34772
34911
|
var import_non_secure70 = require("nanoid/non-secure");
|
|
34773
|
-
var
|
|
34912
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
34774
34913
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
34775
34914
|
"key": "{{input}}"
|
|
34776
34915
|
}`;
|
|
@@ -34868,7 +35007,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
34868
35007
|
}
|
|
34869
35008
|
static getUIData() {
|
|
34870
35009
|
return {
|
|
34871
|
-
infoBoxBody:
|
|
35010
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
34872
35011
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
34873
35012
|
|
|
34874
35013
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -34950,7 +35089,7 @@ var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
|
34950
35089
|
|
|
34951
35090
|
// src/model/nodes/BooleanNode.ts
|
|
34952
35091
|
var import_non_secure71 = require("nanoid/non-secure");
|
|
34953
|
-
var
|
|
35092
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
34954
35093
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
34955
35094
|
static create() {
|
|
34956
35095
|
const chartNode = {
|
|
@@ -34994,7 +35133,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
34994
35133
|
}
|
|
34995
35134
|
static getUIData() {
|
|
34996
35135
|
return {
|
|
34997
|
-
infoBoxBody:
|
|
35136
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
34998
35137
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
34999
35138
|
`,
|
|
35000
35139
|
infoBoxTitle: "Bool Node",
|
|
@@ -35018,7 +35157,7 @@ var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
|
35018
35157
|
var import_non_secure72 = require("nanoid/non-secure");
|
|
35019
35158
|
var import_lodash_es11 = require("lodash");
|
|
35020
35159
|
var import_ts_pattern4 = require("ts-pattern");
|
|
35021
|
-
var
|
|
35160
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
35022
35161
|
var compareNodeComparisonFunctionOptions = [
|
|
35023
35162
|
{ label: "==", value: "==" },
|
|
35024
35163
|
{ label: "!=", value: "!=" },
|
|
@@ -35097,7 +35236,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35097
35236
|
}
|
|
35098
35237
|
static getUIData() {
|
|
35099
35238
|
return {
|
|
35100
|
-
infoBoxBody:
|
|
35239
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
35101
35240
|
Compares two values using the configured operator and outputs the result.
|
|
35102
35241
|
|
|
35103
35242
|
If the data types of the values do not match, then the B value is converted to the type of the A value.
|
|
@@ -35140,7 +35279,7 @@ var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
|
35140
35279
|
// src/model/nodes/EvaluateNode.ts
|
|
35141
35280
|
var import_non_secure73 = require("nanoid/non-secure");
|
|
35142
35281
|
var import_ts_pattern5 = require("ts-pattern");
|
|
35143
|
-
var
|
|
35282
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
35144
35283
|
var unaryOperation = ["abs", "negate"];
|
|
35145
35284
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
35146
35285
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -35226,7 +35365,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35226
35365
|
}
|
|
35227
35366
|
static getUIData() {
|
|
35228
35367
|
return {
|
|
35229
|
-
infoBoxBody:
|
|
35368
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
35230
35369
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
35231
35370
|
|
|
35232
35371
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -35263,7 +35402,7 @@ var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
|
35263
35402
|
|
|
35264
35403
|
// src/model/nodes/NumberNode.ts
|
|
35265
35404
|
var import_non_secure74 = require("nanoid/non-secure");
|
|
35266
|
-
var
|
|
35405
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
35267
35406
|
var NumberNodeImpl = class extends NodeImpl {
|
|
35268
35407
|
static create() {
|
|
35269
35408
|
const chartNode = {
|
|
@@ -35313,7 +35452,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35313
35452
|
}
|
|
35314
35453
|
static getUIData() {
|
|
35315
35454
|
return {
|
|
35316
|
-
infoBoxBody:
|
|
35455
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
35317
35456
|
Outputs a number constant, or converts an input value into a number.
|
|
35318
35457
|
|
|
35319
35458
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -35341,7 +35480,7 @@ var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
|
35341
35480
|
|
|
35342
35481
|
// src/model/nodes/RandomNumberNode.ts
|
|
35343
35482
|
var import_non_secure75 = require("nanoid/non-secure");
|
|
35344
|
-
var
|
|
35483
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
35345
35484
|
var randomNumberTypeOptions = [
|
|
35346
35485
|
{ value: false, label: "Float" },
|
|
35347
35486
|
{ value: true, label: "Integer" }
|
|
@@ -35409,7 +35548,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35409
35548
|
];
|
|
35410
35549
|
}
|
|
35411
35550
|
getBody() {
|
|
35412
|
-
return
|
|
35551
|
+
return import_ts_dedent68.dedent`
|
|
35413
35552
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
35414
35553
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
35415
35554
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -35418,7 +35557,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35418
35557
|
}
|
|
35419
35558
|
static getUIData() {
|
|
35420
35559
|
return {
|
|
35421
|
-
infoBoxBody:
|
|
35560
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
35422
35561
|
Outputs a random number between the configured min and max values.
|
|
35423
35562
|
|
|
35424
35563
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -35451,7 +35590,7 @@ var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
|
35451
35590
|
// src/model/nodes/ShuffleNode.ts
|
|
35452
35591
|
var import_non_secure76 = require("nanoid/non-secure");
|
|
35453
35592
|
var import_lodash_es12 = require("lodash");
|
|
35454
|
-
var
|
|
35593
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
35455
35594
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
35456
35595
|
static create() {
|
|
35457
35596
|
const chartNode = {
|
|
@@ -35487,7 +35626,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35487
35626
|
}
|
|
35488
35627
|
static getUIData() {
|
|
35489
35628
|
return {
|
|
35490
|
-
infoBoxBody:
|
|
35629
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
35491
35630
|
Shuffles the input array. Outputs the shuffled array.
|
|
35492
35631
|
`,
|
|
35493
35632
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -35512,7 +35651,7 @@ var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
|
35512
35651
|
|
|
35513
35652
|
// src/model/nodes/CommentNode.ts
|
|
35514
35653
|
var import_non_secure77 = require("nanoid/non-secure");
|
|
35515
|
-
var
|
|
35654
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
35516
35655
|
var CommentNodeImpl = class extends NodeImpl {
|
|
35517
35656
|
static create() {
|
|
35518
35657
|
const chartNode = {
|
|
@@ -35564,7 +35703,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35564
35703
|
}
|
|
35565
35704
|
static getUIData() {
|
|
35566
35705
|
return {
|
|
35567
|
-
infoBoxBody:
|
|
35706
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
35568
35707
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
35569
35708
|
`,
|
|
35570
35709
|
infoBoxTitle: "Comment Node",
|
|
@@ -36347,7 +36486,7 @@ var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
|
36347
36486
|
|
|
36348
36487
|
// src/model/nodes/DelayNode.ts
|
|
36349
36488
|
var import_non_secure81 = require("nanoid/non-secure");
|
|
36350
|
-
var
|
|
36489
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
36351
36490
|
var DelayNodeImpl = class extends NodeImpl {
|
|
36352
36491
|
static create() {
|
|
36353
36492
|
const chartNode = {
|
|
@@ -36398,7 +36537,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36398
36537
|
}
|
|
36399
36538
|
static getUIData() {
|
|
36400
36539
|
return {
|
|
36401
|
-
infoBoxBody:
|
|
36540
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
36402
36541
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
36403
36542
|
`,
|
|
36404
36543
|
infoBoxTitle: "Delay Node",
|
|
@@ -36436,7 +36575,7 @@ var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
|
36436
36575
|
|
|
36437
36576
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
36438
36577
|
var import_non_secure82 = require("nanoid/non-secure");
|
|
36439
|
-
var
|
|
36578
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
36440
36579
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
36441
36580
|
static create() {
|
|
36442
36581
|
return {
|
|
@@ -36496,7 +36635,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
36496
36635
|
}
|
|
36497
36636
|
static getUIData() {
|
|
36498
36637
|
return {
|
|
36499
|
-
infoBoxBody:
|
|
36638
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
36500
36639
|
Appends a row of data to the specified dataset.
|
|
36501
36640
|
`,
|
|
36502
36641
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -37047,7 +37186,7 @@ var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row")
|
|
|
37047
37186
|
|
|
37048
37187
|
// src/model/nodes/SliceNode.ts
|
|
37049
37188
|
var import_non_secure83 = require("nanoid/non-secure");
|
|
37050
|
-
var
|
|
37189
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
37051
37190
|
var SliceNodeImpl = class extends NodeImpl {
|
|
37052
37191
|
static create() {
|
|
37053
37192
|
const chartNode = {
|
|
@@ -37106,14 +37245,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37106
37245
|
];
|
|
37107
37246
|
}
|
|
37108
37247
|
getBody() {
|
|
37109
|
-
return
|
|
37248
|
+
return import_ts_dedent73.dedent`
|
|
37110
37249
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
37111
37250
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
37112
37251
|
`;
|
|
37113
37252
|
}
|
|
37114
37253
|
static getUIData() {
|
|
37115
37254
|
return {
|
|
37116
|
-
infoBoxBody:
|
|
37255
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
37117
37256
|
Slices an array from the start index for the count number of elements.
|
|
37118
37257
|
|
|
37119
37258
|
Useful for extracting a portion of an array.
|
|
@@ -37140,7 +37279,7 @@ var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
|
37140
37279
|
|
|
37141
37280
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
37142
37281
|
var import_non_secure84 = require("nanoid/non-secure");
|
|
37143
|
-
var
|
|
37282
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
37144
37283
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
37145
37284
|
static create() {
|
|
37146
37285
|
const chartNode = {
|
|
@@ -37187,7 +37326,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
37187
37326
|
}
|
|
37188
37327
|
static getUIData() {
|
|
37189
37328
|
return {
|
|
37190
|
-
infoBoxBody:
|
|
37329
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
37191
37330
|
Extracts the code blocks in the input Markdown text.
|
|
37192
37331
|
|
|
37193
37332
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -37519,7 +37658,7 @@ var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
|
37519
37658
|
|
|
37520
37659
|
// src/model/nodes/DestructureNode.ts
|
|
37521
37660
|
var import_non_secure87 = require("nanoid/non-secure");
|
|
37522
|
-
var
|
|
37661
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
37523
37662
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
37524
37663
|
static create() {
|
|
37525
37664
|
const chartNode = {
|
|
@@ -37587,7 +37726,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37587
37726
|
}
|
|
37588
37727
|
static getUIData() {
|
|
37589
37728
|
return {
|
|
37590
|
-
infoBoxBody:
|
|
37729
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
37591
37730
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
37592
37731
|
`,
|
|
37593
37732
|
infoBoxTitle: "Destructure Node",
|
|
@@ -37622,7 +37761,7 @@ var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
|
37622
37761
|
|
|
37623
37762
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
37624
37763
|
var import_non_secure88 = require("nanoid/non-secure");
|
|
37625
|
-
var
|
|
37764
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
37626
37765
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
37627
37766
|
static create() {
|
|
37628
37767
|
return {
|
|
@@ -37665,7 +37804,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
37665
37804
|
}
|
|
37666
37805
|
static getUIData() {
|
|
37667
37806
|
return {
|
|
37668
|
-
infoBoxBody:
|
|
37807
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
37669
37808
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
37670
37809
|
`,
|
|
37671
37810
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -37798,7 +37937,7 @@ var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
|
37798
37937
|
|
|
37799
37938
|
// src/model/nodes/GraphReferenceNode.ts
|
|
37800
37939
|
var import_non_secure89 = require("nanoid/non-secure");
|
|
37801
|
-
var
|
|
37940
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
37802
37941
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
37803
37942
|
static create() {
|
|
37804
37943
|
const chartNode = {
|
|
@@ -37853,7 +37992,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
37853
37992
|
}
|
|
37854
37993
|
static getUIData() {
|
|
37855
37994
|
return {
|
|
37856
|
-
infoBoxBody:
|
|
37995
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
37857
37996
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
37858
37997
|
`,
|
|
37859
37998
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -37920,7 +38059,7 @@ var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference
|
|
|
37920
38059
|
|
|
37921
38060
|
// src/model/nodes/CallGraphNode.ts
|
|
37922
38061
|
var import_non_secure90 = require("nanoid/non-secure");
|
|
37923
|
-
var
|
|
38062
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
37924
38063
|
|
|
37925
38064
|
// src/api/looseDataValue.ts
|
|
37926
38065
|
var import_lodash_es14 = require("lodash");
|
|
@@ -37996,7 +38135,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
37996
38135
|
}
|
|
37997
38136
|
static getUIData() {
|
|
37998
38137
|
return {
|
|
37999
|
-
infoBoxBody:
|
|
38138
|
+
infoBoxBody: import_ts_dedent78.dedent`
|
|
38000
38139
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
38001
38140
|
`,
|
|
38002
38141
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -38068,7 +38207,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
38068
38207
|
|
|
38069
38208
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
38070
38209
|
var import_nanoid = require("nanoid");
|
|
38071
|
-
var
|
|
38210
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
38072
38211
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
38073
38212
|
static create() {
|
|
38074
38213
|
const chartNode = {
|
|
@@ -38151,7 +38290,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
38151
38290
|
}
|
|
38152
38291
|
static getUIData() {
|
|
38153
38292
|
return {
|
|
38154
|
-
infoBoxBody:
|
|
38293
|
+
infoBoxBody: import_ts_dedent79.dedent`
|
|
38155
38294
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
38156
38295
|
`,
|
|
38157
38296
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -38467,12 +38606,13 @@ var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
|
38467
38606
|
|
|
38468
38607
|
// src/model/nodes/ChatLoopNode.ts
|
|
38469
38608
|
var import_non_secure93 = require("nanoid/non-secure");
|
|
38470
|
-
var
|
|
38609
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
38610
|
+
var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
|
|
38471
38611
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
38472
38612
|
static create() {
|
|
38473
38613
|
const chartNode = {
|
|
38474
38614
|
type: "chatLoop",
|
|
38475
|
-
title:
|
|
38615
|
+
title: chatLoopLegacyDisplayName,
|
|
38476
38616
|
id: (0, import_non_secure93.nanoid)(),
|
|
38477
38617
|
visualData: {
|
|
38478
38618
|
x: 0,
|
|
@@ -38506,7 +38646,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38506
38646
|
}
|
|
38507
38647
|
static getUIData() {
|
|
38508
38648
|
return {
|
|
38509
|
-
infoBoxBody:
|
|
38649
|
+
infoBoxBody: import_ts_dedent80.dedent`
|
|
38510
38650
|
Creates an interactive chat loop with an AI model. The node will:
|
|
38511
38651
|
1. Send the initial prompt to the AI
|
|
38512
38652
|
2. Show the AI's response and prompt for user input
|
|
@@ -38515,8 +38655,8 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38515
38655
|
|
|
38516
38656
|
The conversation history is maintained and sent with each new message.
|
|
38517
38657
|
`,
|
|
38518
|
-
contextMenuTitle:
|
|
38519
|
-
infoBoxTitle:
|
|
38658
|
+
contextMenuTitle: chatLoopLegacyDisplayName,
|
|
38659
|
+
infoBoxTitle: `${chatLoopLegacyDisplayName} Node`,
|
|
38520
38660
|
group: ["Convenience"]
|
|
38521
38661
|
};
|
|
38522
38662
|
}
|
|
@@ -38603,11 +38743,11 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38603
38743
|
};
|
|
38604
38744
|
}
|
|
38605
38745
|
};
|
|
38606
|
-
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl,
|
|
38746
|
+
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
|
|
38607
38747
|
|
|
38608
38748
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
38609
38749
|
var import_non_secure94 = require("nanoid/non-secure");
|
|
38610
|
-
var
|
|
38750
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
38611
38751
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
38612
38752
|
static create() {
|
|
38613
38753
|
return {
|
|
@@ -38722,7 +38862,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38722
38862
|
];
|
|
38723
38863
|
}
|
|
38724
38864
|
getBody() {
|
|
38725
|
-
return
|
|
38865
|
+
return import_ts_dedent81.dedent`
|
|
38726
38866
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
38727
38867
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
38728
38868
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -38731,7 +38871,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38731
38871
|
}
|
|
38732
38872
|
static getUIData() {
|
|
38733
38873
|
return {
|
|
38734
|
-
infoBoxBody:
|
|
38874
|
+
infoBoxBody: import_ts_dedent81.dedent`
|
|
38735
38875
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
38736
38876
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
38737
38877
|
`,
|
|
@@ -38805,7 +38945,7 @@ var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
|
38805
38945
|
|
|
38806
38946
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
38807
38947
|
var import_non_secure95 = require("nanoid/non-secure");
|
|
38808
|
-
var
|
|
38948
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
38809
38949
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
38810
38950
|
static create() {
|
|
38811
38951
|
const chartNode = {
|
|
@@ -38865,7 +39005,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
38865
39005
|
}
|
|
38866
39006
|
static getUIData() {
|
|
38867
39007
|
return {
|
|
38868
|
-
infoBoxBody:
|
|
39008
|
+
infoBoxBody: import_ts_dedent82.dedent`
|
|
38869
39009
|
Converts an array of objects into a markdown table format.
|
|
38870
39010
|
Input should be an array of objects with consistent keys.
|
|
38871
39011
|
`,
|
|
@@ -38917,7 +39057,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
38917
39057
|
|
|
38918
39058
|
// src/model/nodes/CronNode.ts
|
|
38919
39059
|
var import_nanoid2 = require("nanoid");
|
|
38920
|
-
var
|
|
39060
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
38921
39061
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
38922
39062
|
var CronNodeImpl = class extends NodeImpl {
|
|
38923
39063
|
static create() {
|
|
@@ -38987,7 +39127,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
38987
39127
|
}
|
|
38988
39128
|
static getUIData() {
|
|
38989
39129
|
return {
|
|
38990
|
-
infoBoxBody:
|
|
39130
|
+
infoBoxBody: import_ts_dedent83.dedent`
|
|
38991
39131
|
Executes a subgraph on a schedule. Supports:
|
|
38992
39132
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
38993
39133
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -39027,7 +39167,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39027
39167
|
type: "string",
|
|
39028
39168
|
dataKey: "schedule",
|
|
39029
39169
|
label: "Schedule",
|
|
39030
|
-
helperMessage:
|
|
39170
|
+
helperMessage: import_ts_dedent83.dedent`
|
|
39031
39171
|
Examples:
|
|
39032
39172
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
39033
39173
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -39159,7 +39299,7 @@ var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
|
39159
39299
|
|
|
39160
39300
|
// src/model/nodes/ToTreeNode.ts
|
|
39161
39301
|
var import_non_secure96 = require("nanoid/non-secure");
|
|
39162
|
-
var
|
|
39302
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
39163
39303
|
var import_lodash_es15 = require("lodash");
|
|
39164
39304
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
39165
39305
|
static create() {
|
|
@@ -39221,7 +39361,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39221
39361
|
];
|
|
39222
39362
|
}
|
|
39223
39363
|
getBody() {
|
|
39224
|
-
return
|
|
39364
|
+
return import_ts_dedent84.dedent`
|
|
39225
39365
|
Format: ${this.data.format}
|
|
39226
39366
|
Children: ${this.data.childrenProperty}
|
|
39227
39367
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -39229,7 +39369,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39229
39369
|
}
|
|
39230
39370
|
static getUIData() {
|
|
39231
39371
|
return {
|
|
39232
|
-
infoBoxBody:
|
|
39372
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
39233
39373
|
Converts an array of objects into a tree structure and renders it as text.
|
|
39234
39374
|
|
|
39235
39375
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -39288,7 +39428,7 @@ var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
|
39288
39428
|
|
|
39289
39429
|
// src/model/nodes/LoopUntilNode.ts
|
|
39290
39430
|
var import_non_secure97 = require("nanoid/non-secure");
|
|
39291
|
-
var
|
|
39431
|
+
var import_ts_dedent85 = require("ts-dedent");
|
|
39292
39432
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
39293
39433
|
static create() {
|
|
39294
39434
|
const chartNode = {
|
|
@@ -39390,7 +39530,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
39390
39530
|
}
|
|
39391
39531
|
static getUIData() {
|
|
39392
39532
|
return {
|
|
39393
|
-
infoBoxBody:
|
|
39533
|
+
infoBoxBody: import_ts_dedent85.dedent`
|
|
39394
39534
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
39395
39535
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
39396
39536
|
maximum iterations.
|
|
@@ -39804,7 +39944,7 @@ var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
|
39804
39944
|
|
|
39805
39945
|
// src/model/nodes/MCPToolCallNode.ts
|
|
39806
39946
|
var import_non_secure98 = require("nanoid/non-secure");
|
|
39807
|
-
var
|
|
39947
|
+
var import_ts_dedent86 = require("ts-dedent");
|
|
39808
39948
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
39809
39949
|
static create() {
|
|
39810
39950
|
const chartNode = {
|
|
@@ -39823,7 +39963,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
39823
39963
|
serverUrl: "http://localhost:8080/mcp",
|
|
39824
39964
|
serverId: "",
|
|
39825
39965
|
toolName: "",
|
|
39826
|
-
toolArguments:
|
|
39966
|
+
toolArguments: import_ts_dedent86.dedent`
|
|
39827
39967
|
{
|
|
39828
39968
|
"key": "value"
|
|
39829
39969
|
}`,
|
|
@@ -39915,7 +40055,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
39915
40055
|
}
|
|
39916
40056
|
static getUIData() {
|
|
39917
40057
|
return {
|
|
39918
|
-
infoBoxBody:
|
|
40058
|
+
infoBoxBody: import_ts_dedent86.dedent`
|
|
39919
40059
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
39920
40060
|
`,
|
|
39921
40061
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -40133,7 +40273,7 @@ var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
|
40133
40273
|
|
|
40134
40274
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
40135
40275
|
var import_non_secure100 = require("nanoid/non-secure");
|
|
40136
|
-
var
|
|
40276
|
+
var import_ts_dedent87 = require("ts-dedent");
|
|
40137
40277
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
40138
40278
|
static create() {
|
|
40139
40279
|
const chartNode = {
|
|
@@ -40224,7 +40364,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
40224
40364
|
}
|
|
40225
40365
|
static getUIData() {
|
|
40226
40366
|
return {
|
|
40227
|
-
infoBoxBody:
|
|
40367
|
+
infoBoxBody: import_ts_dedent87.dedent`
|
|
40228
40368
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
40229
40369
|
`,
|
|
40230
40370
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -40341,7 +40481,7 @@ var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked
|
|
|
40341
40481
|
|
|
40342
40482
|
// src/model/Nodes.ts
|
|
40343
40483
|
var registerBuiltInNodes = (registry) => {
|
|
40344
|
-
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);
|
|
40484
|
+
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(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);
|
|
40345
40485
|
};
|
|
40346
40486
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
40347
40487
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -40508,8 +40648,8 @@ var OpenAIEmbeddingGenerator = class {
|
|
|
40508
40648
|
registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
|
|
40509
40649
|
|
|
40510
40650
|
// src/integrations/ManagedKnowledgeStore.ts
|
|
40511
|
-
var
|
|
40512
|
-
var
|
|
40651
|
+
var import_crypto_js4 = __toESM(require("crypto-js"), 1);
|
|
40652
|
+
var import_safe_stable_stringify7 = __toESM(require("safe-stable-stringify"), 1);
|
|
40513
40653
|
var MANAGED_SCHEMA_VERSION = "1";
|
|
40514
40654
|
var CHUNKER_VERSION = "1";
|
|
40515
40655
|
var ManagedKnowledgeStore = class {
|
|
@@ -40811,14 +40951,14 @@ async function waitForPromiseOrAbort(promise, signal) {
|
|
|
40811
40951
|
});
|
|
40812
40952
|
}
|
|
40813
40953
|
function createSourceVersion(documents, metadata, chunking) {
|
|
40814
|
-
const canonical = (0,
|
|
40954
|
+
const canonical = (0, import_safe_stable_stringify7.default)({
|
|
40815
40955
|
schemaVersion: MANAGED_SCHEMA_VERSION,
|
|
40816
40956
|
chunkerVersion: CHUNKER_VERSION,
|
|
40817
40957
|
documents,
|
|
40818
40958
|
metadata: metadata ?? {},
|
|
40819
40959
|
chunking
|
|
40820
40960
|
});
|
|
40821
|
-
const digest =
|
|
40961
|
+
const digest = import_crypto_js4.default.SHA256(canonical ?? "").toString(import_crypto_js4.default.enc.Hex);
|
|
40822
40962
|
return `ks${MANAGED_SCHEMA_VERSION}-${digest}`;
|
|
40823
40963
|
}
|
|
40824
40964
|
function normalizeChunkingOptions(options2) {
|
|
@@ -40838,7 +40978,7 @@ function normalizeChunkingOptions(options2) {
|
|
|
40838
40978
|
return { unit, targetSize, overlap, minimumBoundarySize, includeTitle: (options2 == null ? void 0 : options2.includeTitle) !== false };
|
|
40839
40979
|
}
|
|
40840
40980
|
function createManifestCommitId() {
|
|
40841
|
-
return
|
|
40981
|
+
return import_crypto_js4.default.lib.WordArray.random(16).toString(import_crypto_js4.default.enc.Hex);
|
|
40842
40982
|
}
|
|
40843
40983
|
async function chunkDocuments(documents, documentIds, version, options2, context) {
|
|
40844
40984
|
const chunks = [];
|
|
@@ -41006,7 +41146,7 @@ function validatePositiveInteger(value, label, minimum, maximum) {
|
|
|
41006
41146
|
}
|
|
41007
41147
|
}
|
|
41008
41148
|
function createShortHash(value) {
|
|
41009
|
-
return
|
|
41149
|
+
return import_crypto_js4.default.SHA256(value).toString(import_crypto_js4.default.enc.Hex).slice(0, 24);
|
|
41010
41150
|
}
|
|
41011
41151
|
function sameManifestActivation(actual, expected) {
|
|
41012
41152
|
return (actual == null ? void 0 : actual.activeVersion) === expected.activeVersion && actual.commitId === expected.commitId;
|
|
@@ -41121,13 +41261,14 @@ var toRecordedEventMap = {
|
|
|
41121
41261
|
},
|
|
41122
41262
|
execution
|
|
41123
41263
|
),
|
|
41124
|
-
nodeFinish: ({ node, outputs, processId, resultOrigin, durationMs, splitRunDurationMs, execution }) => withExecution(
|
|
41264
|
+
nodeFinish: ({ node, outputs, processId, resultOrigin, durationMs, splitRunDurationMs, streamingWatchTerminal, execution }) => withExecution(
|
|
41125
41265
|
withDuration(
|
|
41126
41266
|
{
|
|
41127
41267
|
nodeId: node.id,
|
|
41128
41268
|
outputs,
|
|
41129
41269
|
processId,
|
|
41130
|
-
...resultOrigin === void 0 ? {} : { resultOrigin }
|
|
41270
|
+
...resultOrigin === void 0 ? {} : { resultOrigin },
|
|
41271
|
+
...streamingWatchTerminal ? { streamingWatchTerminal: true } : {}
|
|
41131
41272
|
},
|
|
41132
41273
|
durationMs,
|
|
41133
41274
|
splitRunDurationMs
|
|
@@ -41503,7 +41644,7 @@ function isSocketRecordingTerminalEvent(event) {
|
|
|
41503
41644
|
|
|
41504
41645
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41505
41646
|
var import_non_secure103 = require("nanoid/non-secure");
|
|
41506
|
-
var
|
|
41647
|
+
var import_ts_dedent88 = require("ts-dedent");
|
|
41507
41648
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
41508
41649
|
|
|
41509
41650
|
// src/utils/assertNever.ts
|
|
@@ -41512,7 +41653,6 @@ function assertNever(x) {
|
|
|
41512
41653
|
}
|
|
41513
41654
|
|
|
41514
41655
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41515
|
-
var cache2 = /* @__PURE__ */ new Map();
|
|
41516
41656
|
var ChatAnthropicNodeImpl = {
|
|
41517
41657
|
create() {
|
|
41518
41658
|
const chartNode = {
|
|
@@ -41668,7 +41808,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41668
41808
|
getBody(data) {
|
|
41669
41809
|
var _a;
|
|
41670
41810
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
41671
|
-
return
|
|
41811
|
+
return import_ts_dedent88.dedent`
|
|
41672
41812
|
${modelName}
|
|
41673
41813
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
41674
41814
|
Max Tokens: ${data.maxTokens}
|
|
@@ -41757,8 +41897,9 @@ var ChatAnthropicNodeImpl = {
|
|
|
41757
41897
|
editors: [
|
|
41758
41898
|
{
|
|
41759
41899
|
type: "toggle",
|
|
41760
|
-
label: "Cache (
|
|
41761
|
-
dataKey: "cache"
|
|
41900
|
+
label: "Cache outputs (editor only)",
|
|
41901
|
+
dataKey: "cache",
|
|
41902
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
41762
41903
|
},
|
|
41763
41904
|
{
|
|
41764
41905
|
type: "toggle",
|
|
@@ -41793,7 +41934,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41793
41934
|
},
|
|
41794
41935
|
getUIData() {
|
|
41795
41936
|
return {
|
|
41796
|
-
infoBoxBody:
|
|
41937
|
+
infoBoxBody: import_ts_dedent88.dedent`
|
|
41797
41938
|
Legacy Anthropic chat node.
|
|
41798
41939
|
|
|
41799
41940
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -41862,6 +42003,10 @@ Assistant: ${content}`;
|
|
|
41862
42003
|
...context.settings.chatNodeHeaders,
|
|
41863
42004
|
...additionalHeaders
|
|
41864
42005
|
});
|
|
42006
|
+
const apiKey = context.getPluginConfig("anthropicApiKey");
|
|
42007
|
+
const defaultApiEndpoint = context.getPluginConfig("anthropicApiEndpoint") || "https://api.anthropic.com/v1";
|
|
42008
|
+
const configuredEndpoint = getInputOrData(data, inputs, "endpoint");
|
|
42009
|
+
const apiEndpoint = (configuredEndpoint == null ? void 0 : configuredEndpoint.trim()) ? configuredEndpoint : defaultApiEndpoint;
|
|
41865
42010
|
try {
|
|
41866
42011
|
return await (0, import_p_retry2.default)(
|
|
41867
42012
|
async () => {
|
|
@@ -41884,19 +42029,17 @@ Assistant: ${content}`;
|
|
|
41884
42029
|
messages,
|
|
41885
42030
|
tools: tools ? tools.map((tool) => ({ name: tool.name, description: tool.description, input_schema: tool.parameters })) : void 0
|
|
41886
42031
|
};
|
|
41887
|
-
const
|
|
41888
|
-
|
|
41889
|
-
|
|
41890
|
-
|
|
41891
|
-
|
|
41892
|
-
|
|
41893
|
-
|
|
42032
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
42033
|
+
context,
|
|
42034
|
+
enabled: data.cache && !data.enableToolUse,
|
|
42035
|
+
providerIdentity: { apiEndpoint, apiKey, headers: allAdditionalHeaders },
|
|
42036
|
+
request: useMessageApi ? messageOptions : completionOptions
|
|
42037
|
+
});
|
|
42038
|
+
if (cachedOutputs != null) {
|
|
42039
|
+
(_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
|
|
42040
|
+
return cachedOutputs;
|
|
41894
42041
|
}
|
|
41895
42042
|
const startTime = Date.now();
|
|
41896
|
-
const apiKey = context.getPluginConfig("anthropicApiKey");
|
|
41897
|
-
const defaultApiEndpoint = context.getPluginConfig("anthropicApiEndpoint") || "https://api.anthropic.com/v1";
|
|
41898
|
-
const configuredEndpoint = getInputOrData(data, inputs, "endpoint");
|
|
41899
|
-
const apiEndpoint = (configuredEndpoint == null ? void 0 : configuredEndpoint.trim()) ? configuredEndpoint : defaultApiEndpoint;
|
|
41900
42043
|
if (useMessageApi) {
|
|
41901
42044
|
const chunks = streamMessageApi({
|
|
41902
42045
|
apiEndpoint,
|
|
@@ -42062,7 +42205,7 @@ Assistant: ${content}`;
|
|
|
42062
42205
|
const duration = endTime - startTime;
|
|
42063
42206
|
output["duration"] = { type: "number", value: duration };
|
|
42064
42207
|
Object.freeze(output);
|
|
42065
|
-
|
|
42208
|
+
writeLegacyChatEditorCache(cache, output);
|
|
42066
42209
|
return output;
|
|
42067
42210
|
},
|
|
42068
42211
|
{
|
|
@@ -42266,7 +42409,7 @@ var anthropic_default = anthropicPlugin;
|
|
|
42266
42409
|
|
|
42267
42410
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
42268
42411
|
var import_non_secure104 = require("nanoid/non-secure");
|
|
42269
|
-
var
|
|
42412
|
+
var import_ts_dedent89 = require("ts-dedent");
|
|
42270
42413
|
var import_autoevals = require("autoevals");
|
|
42271
42414
|
var import_ts_pattern7 = require("ts-pattern");
|
|
42272
42415
|
var options = [
|
|
@@ -42400,7 +42543,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42400
42543
|
},
|
|
42401
42544
|
getUIData() {
|
|
42402
42545
|
return {
|
|
42403
|
-
infoBoxBody:
|
|
42546
|
+
infoBoxBody: import_ts_dedent89.dedent`
|
|
42404
42547
|
Evaluates the validity of a response using the autoevals library.
|
|
42405
42548
|
`,
|
|
42406
42549
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -42483,7 +42626,7 @@ var autoevals_default = autoevalsPlugin;
|
|
|
42483
42626
|
|
|
42484
42627
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
42485
42628
|
var import_non_secure105 = require("nanoid/non-secure");
|
|
42486
|
-
var
|
|
42629
|
+
var import_ts_dedent90 = require("ts-dedent");
|
|
42487
42630
|
|
|
42488
42631
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
42489
42632
|
var import_assemblyai = require("assemblyai");
|
|
@@ -42668,7 +42811,7 @@ var LemurQaNodeImpl = {
|
|
|
42668
42811
|
},
|
|
42669
42812
|
getUIData() {
|
|
42670
42813
|
return {
|
|
42671
|
-
infoBoxBody:
|
|
42814
|
+
infoBoxBody: import_ts_dedent90.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
42672
42815
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
42673
42816
|
contextMenuTitle: "LeMUR Q&A",
|
|
42674
42817
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42740,7 +42883,7 @@ var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
|
42740
42883
|
|
|
42741
42884
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
42742
42885
|
var import_non_secure106 = require("nanoid/non-secure");
|
|
42743
|
-
var
|
|
42886
|
+
var import_ts_dedent91 = require("ts-dedent");
|
|
42744
42887
|
var TranscribeAudioNodeImpl = {
|
|
42745
42888
|
create() {
|
|
42746
42889
|
const chartNode = {
|
|
@@ -42802,7 +42945,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
42802
42945
|
},
|
|
42803
42946
|
getUIData() {
|
|
42804
42947
|
return {
|
|
42805
|
-
infoBoxBody:
|
|
42948
|
+
infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI to transcribe audio`,
|
|
42806
42949
|
infoBoxTitle: "Transcribe Audio Node",
|
|
42807
42950
|
contextMenuTitle: "Transcribe Audio",
|
|
42808
42951
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42861,7 +43004,7 @@ function getAdditionalParameters(data) {
|
|
|
42861
43004
|
|
|
42862
43005
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
42863
43006
|
var import_non_secure107 = require("nanoid/non-secure");
|
|
42864
|
-
var
|
|
43007
|
+
var import_ts_dedent92 = require("ts-dedent");
|
|
42865
43008
|
var import_assemblyai3 = require("assemblyai");
|
|
42866
43009
|
var LemurSummaryNodeImpl = {
|
|
42867
43010
|
create() {
|
|
@@ -42914,7 +43057,7 @@ var LemurSummaryNodeImpl = {
|
|
|
42914
43057
|
},
|
|
42915
43058
|
getUIData() {
|
|
42916
43059
|
return {
|
|
42917
|
-
infoBoxBody:
|
|
43060
|
+
infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
42918
43061
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
42919
43062
|
contextMenuTitle: "LeMUR Summary",
|
|
42920
43063
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42939,7 +43082,7 @@ var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary
|
|
|
42939
43082
|
|
|
42940
43083
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
42941
43084
|
var import_non_secure108 = require("nanoid/non-secure");
|
|
42942
|
-
var
|
|
43085
|
+
var import_ts_dedent93 = require("ts-dedent");
|
|
42943
43086
|
var import_assemblyai4 = require("assemblyai");
|
|
42944
43087
|
var LemurTaskNodeImpl = {
|
|
42945
43088
|
create() {
|
|
@@ -42992,7 +43135,7 @@ var LemurTaskNodeImpl = {
|
|
|
42992
43135
|
},
|
|
42993
43136
|
getUIData() {
|
|
42994
43137
|
return {
|
|
42995
|
-
infoBoxBody:
|
|
43138
|
+
infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
42996
43139
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
42997
43140
|
contextMenuTitle: "LeMUR Custom Task",
|
|
42998
43141
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43018,7 +43161,7 @@ var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
|
43018
43161
|
|
|
43019
43162
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
43020
43163
|
var import_non_secure109 = require("nanoid/non-secure");
|
|
43021
|
-
var
|
|
43164
|
+
var import_ts_dedent94 = require("ts-dedent");
|
|
43022
43165
|
var LemurActionItemsNodeImpl = {
|
|
43023
43166
|
create() {
|
|
43024
43167
|
const chartNode = {
|
|
@@ -43070,7 +43213,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
43070
43213
|
},
|
|
43071
43214
|
getUIData() {
|
|
43072
43215
|
return {
|
|
43073
|
-
infoBoxBody:
|
|
43216
|
+
infoBoxBody: import_ts_dedent94.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
43074
43217
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
43075
43218
|
contextMenuTitle: "LeMUR Action Items",
|
|
43076
43219
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43359,7 +43502,7 @@ var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (H
|
|
|
43359
43502
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
43360
43503
|
var import_non_secure111 = require("nanoid/non-secure");
|
|
43361
43504
|
var import_inference2 = require("@huggingface/inference");
|
|
43362
|
-
var
|
|
43505
|
+
var import_ts_dedent95 = require("ts-dedent");
|
|
43363
43506
|
var TextToImageHuggingFaceNodeImpl = {
|
|
43364
43507
|
create() {
|
|
43365
43508
|
return {
|
|
@@ -43504,7 +43647,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
43504
43647
|
];
|
|
43505
43648
|
},
|
|
43506
43649
|
getBody(data) {
|
|
43507
|
-
return
|
|
43650
|
+
return import_ts_dedent95.dedent`
|
|
43508
43651
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
43509
43652
|
`;
|
|
43510
43653
|
},
|
|
@@ -43572,7 +43715,7 @@ var huggingFacePlugin = {
|
|
|
43572
43715
|
};
|
|
43573
43716
|
|
|
43574
43717
|
// src/plugins/pinecone/PineconeVectorDatabase.ts
|
|
43575
|
-
var
|
|
43718
|
+
var CryptoJS5 = __toESM(require("crypto-js"), 1);
|
|
43576
43719
|
var PineconeVectorDatabase = class {
|
|
43577
43720
|
#apiKey;
|
|
43578
43721
|
constructor(settings) {
|
|
@@ -43582,7 +43725,7 @@ var PineconeVectorDatabase = class {
|
|
|
43582
43725
|
async store(collection, vector, data, { id }) {
|
|
43583
43726
|
const collectionDetails = getCollection(coerceType(collection, "string"));
|
|
43584
43727
|
if (!id) {
|
|
43585
|
-
id =
|
|
43728
|
+
id = CryptoJS5.SHA256(vector.value.join(",")).toString(CryptoJS5.enc.Hex);
|
|
43586
43729
|
}
|
|
43587
43730
|
let metadata = {};
|
|
43588
43731
|
if (data.type === "object") {
|
|
@@ -43658,7 +43801,7 @@ function getCollection(collectionString) {
|
|
|
43658
43801
|
}
|
|
43659
43802
|
|
|
43660
43803
|
// src/plugins/pinecone/PineconeKnowledgeStore.ts
|
|
43661
|
-
var
|
|
43804
|
+
var import_crypto_js5 = __toESM(require("crypto-js"), 1);
|
|
43662
43805
|
var DEFAULT_API_VERSION = "2026-04";
|
|
43663
43806
|
var MANIFEST_RECORD_ID = "__rivet_manifest__";
|
|
43664
43807
|
var RESERVED_PREFIX = "rivet_";
|
|
@@ -43922,7 +44065,7 @@ var PineconeKnowledgeStoreDriver = class {
|
|
|
43922
44065
|
}
|
|
43923
44066
|
#namespace(sourceId) {
|
|
43924
44067
|
const readableSourceId = sourceId.replace(/[^a-zA-Z0-9._-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, 120) || "source";
|
|
43925
|
-
const sourceHash =
|
|
44068
|
+
const sourceHash = import_crypto_js5.default.SHA256(sourceId).toString(import_crypto_js5.default.enc.Hex).slice(0, 24);
|
|
43926
44069
|
const safeSourceId = `${readableSourceId}--${sourceHash}`;
|
|
43927
44070
|
const namespace = this.config.namespaceTemplate.replaceAll("{sourceId}", safeSourceId).trim();
|
|
43928
44071
|
if (!namespace) throw new Error("Pinecone Namespace Template produced an empty namespace.");
|
|
@@ -47045,7 +47188,7 @@ var openAIPlugin = {
|
|
|
47045
47188
|
|
|
47046
47189
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
47047
47190
|
var import_non_secure112 = require("nanoid/non-secure");
|
|
47048
|
-
var
|
|
47191
|
+
var import_ts_dedent96 = require("ts-dedent");
|
|
47049
47192
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
47050
47193
|
var import_ts_pattern8 = require("ts-pattern");
|
|
47051
47194
|
var import_genai2 = require("@google/genai");
|
|
@@ -47067,7 +47210,6 @@ function toGoogleSchemaType(type) {
|
|
|
47067
47210
|
return void 0;
|
|
47068
47211
|
}
|
|
47069
47212
|
}
|
|
47070
|
-
var cache3 = /* @__PURE__ */ new Map();
|
|
47071
47213
|
var ChatGoogleNodeImpl = {
|
|
47072
47214
|
create() {
|
|
47073
47215
|
const chartNode = {
|
|
@@ -47208,7 +47350,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47208
47350
|
},
|
|
47209
47351
|
getBody(data) {
|
|
47210
47352
|
var _a;
|
|
47211
|
-
return
|
|
47353
|
+
return import_ts_dedent96.dedent`
|
|
47212
47354
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
47213
47355
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
47214
47356
|
Max Tokens: ${data.maxTokens}
|
|
@@ -47275,8 +47417,9 @@ var ChatGoogleNodeImpl = {
|
|
|
47275
47417
|
},
|
|
47276
47418
|
{
|
|
47277
47419
|
type: "toggle",
|
|
47278
|
-
label: "Cache (
|
|
47279
|
-
dataKey: "cache"
|
|
47420
|
+
label: "Cache outputs (editor only)",
|
|
47421
|
+
dataKey: "cache",
|
|
47422
|
+
helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
|
|
47280
47423
|
},
|
|
47281
47424
|
{
|
|
47282
47425
|
type: "toggle",
|
|
@@ -47295,7 +47438,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47295
47438
|
},
|
|
47296
47439
|
getUIData() {
|
|
47297
47440
|
return {
|
|
47298
|
-
infoBoxBody:
|
|
47441
|
+
infoBoxBody: import_ts_dedent96.dedent`
|
|
47299
47442
|
Legacy Google chat node.
|
|
47300
47443
|
|
|
47301
47444
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -47474,13 +47617,20 @@ var ChatGoogleNodeImpl = {
|
|
|
47474
47617
|
thinkingBudget,
|
|
47475
47618
|
additionalHeaders: allAdditionalHeaders
|
|
47476
47619
|
};
|
|
47477
|
-
const
|
|
47478
|
-
|
|
47479
|
-
|
|
47480
|
-
|
|
47481
|
-
|
|
47482
|
-
|
|
47483
|
-
|
|
47620
|
+
const { cache, cachedOutputs } = resolveLegacyChatEditorCache({
|
|
47621
|
+
context,
|
|
47622
|
+
enabled: data.cache && !data.useToolCalling,
|
|
47623
|
+
providerIdentity: apiKey ? { apiKey, headers: allAdditionalHeaders, transport: "generative-ai" } : {
|
|
47624
|
+
applicationCredentials,
|
|
47625
|
+
location,
|
|
47626
|
+
project,
|
|
47627
|
+
transport: "vertex-ai"
|
|
47628
|
+
},
|
|
47629
|
+
request: options2
|
|
47630
|
+
});
|
|
47631
|
+
if (cachedOutputs != null) {
|
|
47632
|
+
(_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
|
|
47633
|
+
return cachedOutputs;
|
|
47484
47634
|
}
|
|
47485
47635
|
const startTime = Date.now();
|
|
47486
47636
|
let chunks;
|
|
@@ -47577,7 +47727,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47577
47727
|
const duration = endTime - startTime;
|
|
47578
47728
|
output["duration"] = { type: "number", value: duration };
|
|
47579
47729
|
Object.freeze(output);
|
|
47580
|
-
|
|
47730
|
+
writeLegacyChatEditorCache(cache, output);
|
|
47581
47731
|
return output;
|
|
47582
47732
|
},
|
|
47583
47733
|
{
|
|
@@ -47589,13 +47739,18 @@ var ChatGoogleNodeImpl = {
|
|
|
47589
47739
|
randomize: true,
|
|
47590
47740
|
signal: context.signal,
|
|
47591
47741
|
onFailedAttempt(err) {
|
|
47742
|
+
var _a;
|
|
47592
47743
|
context.trace(`ChatGoogleNode failed, retrying: ${err.toString()}`);
|
|
47593
|
-
const
|
|
47594
|
-
|
|
47595
|
-
|
|
47744
|
+
const providerError = err.error ?? err;
|
|
47745
|
+
const googleError = providerError;
|
|
47746
|
+
const message = googleError.message ?? String(providerError);
|
|
47747
|
+
const messageStatus = (_a = /\bstatus:\s*(\d{3})\b/.exec(message)) == null ? void 0 : _a[1];
|
|
47748
|
+
const status = googleError.status ?? googleError.code ?? (messageStatus ? Number(messageStatus) : void 0);
|
|
47749
|
+
if (status && status >= 400 && status < 500) {
|
|
47750
|
+
if (status === 429) {
|
|
47596
47751
|
context.trace("Google API rate limit exceeded, retrying...");
|
|
47597
47752
|
} else {
|
|
47598
|
-
throw new Error(`Google API error: ${
|
|
47753
|
+
throw new Error(`Google API error: ${status} ${message}`);
|
|
47599
47754
|
}
|
|
47600
47755
|
}
|
|
47601
47756
|
if (context.signal.aborted) {
|
|
@@ -48209,6 +48364,7 @@ var Rivet = void 0;
|
|
|
48209
48364
|
ChatV2ProviderTimeoutError,
|
|
48210
48365
|
ChatV2ResponseValidationError,
|
|
48211
48366
|
ChunkNodeImpl,
|
|
48367
|
+
CoalesceNewNodeImpl,
|
|
48212
48368
|
CoalesceNodeImpl,
|
|
48213
48369
|
CodeNewNodeImpl,
|
|
48214
48370
|
CodeNodeImpl,
|
|
@@ -48332,6 +48488,7 @@ var Rivet = void 0;
|
|
|
48332
48488
|
Rivet,
|
|
48333
48489
|
RivetLLMProfileHealthPolicyError,
|
|
48334
48490
|
RivetStoredValueController,
|
|
48491
|
+
STREAM_RESPONSE_HELPER_MESSAGE,
|
|
48335
48492
|
SearchKnowledgeNodeImpl,
|
|
48336
48493
|
SetGlobalNodeImpl,
|
|
48337
48494
|
SetStoredValueNodeImpl,
|
|
@@ -48394,6 +48551,7 @@ var Rivet = void 0;
|
|
|
48394
48551
|
canConsumeControlFlowExcludedInput,
|
|
48395
48552
|
canRenderDataBusNode,
|
|
48396
48553
|
canUseNodeAsPrefabSource,
|
|
48554
|
+
chatLoopLegacyDisplayName,
|
|
48397
48555
|
chatLoopNode,
|
|
48398
48556
|
chatMessagesToModelMessages,
|
|
48399
48557
|
chatNode,
|
|
@@ -48406,6 +48564,8 @@ var Rivet = void 0;
|
|
|
48406
48564
|
cloneFrozenNodeOutputsByGraph,
|
|
48407
48565
|
cloneRivetStoredValue,
|
|
48408
48566
|
cloneRivetStoredValueRecord,
|
|
48567
|
+
coalesceLegacyDisplayName,
|
|
48568
|
+
coalesceNewNode,
|
|
48409
48569
|
coalesceNode,
|
|
48410
48570
|
codeNewNode,
|
|
48411
48571
|
codeNode,
|
|
@@ -48657,6 +48817,7 @@ var Rivet = void 0;
|
|
|
48657
48817
|
logRuntimeError,
|
|
48658
48818
|
logRuntimeInfo,
|
|
48659
48819
|
logRuntimeWarn,
|
|
48820
|
+
loopControllerLegacyDisplayName,
|
|
48660
48821
|
loopControllerNode,
|
|
48661
48822
|
loopUntilNode,
|
|
48662
48823
|
looseDataValueToDataValue,
|