@valerypopoff/rivet2-core 2.8.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.
Files changed (32) hide show
  1. package/dist/cjs/bundle.cjs +449 -319
  2. package/dist/cjs/bundle.cjs.map +4 -4
  3. package/dist/cjs/interpolationRuntime.cjs.map +2 -2
  4. package/dist/esm/model/GraphPreprocessor.js +11 -0
  5. package/dist/esm/model/GraphProcessor.js +50 -3
  6. package/dist/esm/model/LegacyChatEditorCache.js +50 -0
  7. package/dist/esm/model/NodeExclusionPolicy.js +1 -0
  8. package/dist/esm/model/Nodes.js +3 -0
  9. package/dist/esm/model/StreamingOutputWatch.js +18 -18
  10. package/dist/esm/model/chat-v2/chatV2Shared.js +2 -1
  11. package/dist/esm/model/chat-v2/llmChatV2NodeEditors.js +2 -1
  12. package/dist/esm/model/nodes/ChatNodeBase.js +18 -13
  13. package/dist/esm/model/nodes/CoalesceNewNode.js +22 -0
  14. package/dist/esm/model/nodes/CoalesceNode.js +15 -133
  15. package/dist/esm/model/nodes/CoalesceNodeBase.js +131 -0
  16. package/dist/esm/model/nodes/StopWatchingStreamingOutputNode.js +2 -0
  17. package/dist/esm/plugins/anthropic/nodes/ChatAnthropicNode.js +17 -15
  18. package/dist/esm/plugins/google/google.js +8 -128
  19. package/dist/esm/plugins/google/googleGenerativeAi.js +101 -0
  20. package/dist/esm/plugins/google/nodes/ChatGoogleNode.js +36 -15
  21. package/dist/types/model/GraphPreprocessor.d.ts +2 -0
  22. package/dist/types/model/GraphProcessor.d.ts +3 -1
  23. package/dist/types/model/LegacyChatEditorCache.d.ts +39 -0
  24. package/dist/types/model/Nodes.d.ts +3 -2
  25. package/dist/types/model/StreamingOutputWatch.d.ts +13 -11
  26. package/dist/types/model/chat-v2/chatV2Shared.d.ts +1 -0
  27. package/dist/types/model/nodes/CoalesceNewNode.d.ts +10 -0
  28. package/dist/types/model/nodes/CoalesceNode.d.ts +9 -15
  29. package/dist/types/model/nodes/CoalesceNodeBase.d.ts +19 -0
  30. package/dist/types/plugins/google/google.d.ts +3 -110
  31. package/dist/types/plugins/google/googleGenerativeAi.d.ts +110 -0
  32. package/package.json +1 -1
@@ -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,
@@ -252,6 +254,8 @@ __export(src_exports, {
252
254
  cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
253
255
  cloneRivetStoredValue: () => cloneRivetStoredValue,
254
256
  cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
257
+ coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
258
+ coalesceNewNode: () => coalesceNewNode,
255
259
  coalesceNode: () => coalesceNode,
256
260
  codeNewNode: () => codeNewNode,
257
261
  codeNode: () => codeNode,
@@ -710,6 +714,7 @@ __export(exports_exports, {
710
714
  ChatV2ProviderTimeoutError: () => ChatV2ProviderTimeoutError,
711
715
  ChatV2ResponseValidationError: () => ChatV2ResponseValidationError,
712
716
  ChunkNodeImpl: () => ChunkNodeImpl,
717
+ CoalesceNewNodeImpl: () => CoalesceNewNodeImpl,
713
718
  CoalesceNodeImpl: () => CoalesceNodeImpl,
714
719
  CodeNewNodeImpl: () => CodeNewNodeImpl,
715
720
  CodeNodeImpl: () => CodeNodeImpl,
@@ -832,6 +837,7 @@ __export(exports_exports, {
832
837
  ReportProgressNodeImpl: () => ReportProgressNodeImpl,
833
838
  RivetLLMProfileHealthPolicyError: () => RivetLLMProfileHealthPolicyError,
834
839
  RivetStoredValueController: () => RivetStoredValueController,
840
+ STREAM_RESPONSE_HELPER_MESSAGE: () => STREAM_RESPONSE_HELPER_MESSAGE,
835
841
  SearchKnowledgeNodeImpl: () => SearchKnowledgeNodeImpl,
836
842
  SetGlobalNodeImpl: () => SetGlobalNodeImpl,
837
843
  SetStoredValueNodeImpl: () => SetStoredValueNodeImpl,
@@ -907,6 +913,8 @@ __export(exports_exports, {
907
913
  cloneFrozenNodeOutputsByGraph: () => cloneFrozenNodeOutputsByGraph,
908
914
  cloneRivetStoredValue: () => cloneRivetStoredValue,
909
915
  cloneRivetStoredValueRecord: () => cloneRivetStoredValueRecord,
916
+ coalesceLegacyDisplayName: () => coalesceLegacyDisplayName,
917
+ coalesceNewNode: () => coalesceNewNode,
910
918
  coalesceNode: () => coalesceNode,
911
919
  codeNewNode: () => codeNewNode,
912
920
  codeNode: () => codeNode,
@@ -1347,6 +1355,7 @@ var exhaustiveTuple = () => (
1347
1355
  );
1348
1356
 
1349
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.";
1350
1359
  function createChatV2CommonNodeData(overrides = {}) {
1351
1360
  return {
1352
1361
  model: "gpt-4o",
@@ -1637,7 +1646,7 @@ function getCommonChatV2Editors(modelOptions) {
1637
1646
  type: "toggle",
1638
1647
  label: "Stream response",
1639
1648
  dataKey: "useAsGraphPartialOutput",
1640
- helperMessage: "Shows streamed response updates in the node output while running in the editor. Other nodes only receive the final response after it is complete."
1649
+ helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
1641
1650
  }
1642
1651
  ]
1643
1652
  }
@@ -6704,6 +6713,7 @@ function preprocessGraphState(options2) {
6704
6713
  connections[connection.outputNodeId].push(connection);
6705
6714
  }
6706
6715
  const definitions = loadInputOutputDefinitions({
6716
+ inputAnchorDefinitions: options2.inputAnchorDefinitions,
6707
6717
  connections,
6708
6718
  loadedProjects,
6709
6719
  nodeInstances,
@@ -6763,10 +6773,16 @@ function toReusableGraphExecutionPlan(preprocessedGraph) {
6763
6773
  };
6764
6774
  }
6765
6775
  function loadInputOutputDefinitions(options2) {
6776
+ var _a, _b;
6766
6777
  const { connections, definitionContext, loadedProjects, nodeInstances, nodesById, project, warnOnInvalidGraph } = options2;
6767
6778
  const definitions = {};
6768
6779
  if (!definitionContext) {
6769
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
+ }
6770
6786
  const connectionsForNode = connections[node.id] ?? [];
6771
6787
  const inputDefinitions = nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
6772
6788
  connectionsForNode,
@@ -6822,6 +6838,11 @@ function loadInputOutputDefinitions(options2) {
6822
6838
  return definitions;
6823
6839
  }
6824
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
+ }
6825
6846
  const connectionsForNode = connections[node.id] ?? [];
6826
6847
  const nodeDefinitionContext = usesGraphBoundaryDefinitionContext(node) ? definitionContext : void 0;
6827
6848
  const inputDefinitions = nodeDefinitionContext ? nodeInstances[node.id].getInputDefinitionsIncludingBuiltIn(
@@ -6997,7 +7018,7 @@ function buildGraphExecutionPlan(options2) {
6997
7018
  }
6998
7019
 
6999
7020
  // src/model/GraphBoundaryCache.ts
7000
- function getGraphBoundary(project, graphId2, cache4) {
7021
+ function getGraphBoundary(project, graphId2, cache) {
7001
7022
  if (!graphId2) {
7002
7023
  return void 0;
7003
7024
  }
@@ -7005,15 +7026,15 @@ function getGraphBoundary(project, graphId2, cache4) {
7005
7026
  if (!graph) {
7006
7027
  return void 0;
7007
7028
  }
7008
- if (!cache4) {
7029
+ if (!cache) {
7009
7030
  return deriveGraphBoundary(graph);
7010
7031
  }
7011
- const cached = cache4.get(graph);
7032
+ const cached = cache.get(graph);
7012
7033
  if (cached) {
7013
7034
  return cached;
7014
7035
  }
7015
7036
  const boundary = deriveGraphBoundary(graph);
7016
- cache4.set(graph, boundary);
7037
+ cache.set(graph, boundary);
7017
7038
  return boundary;
7018
7039
  }
7019
7040
  function applyGraphBoundaryPortOrder(boundaryItems, portOrder) {
@@ -8969,6 +8990,7 @@ var nodesAllowedToConsumeExcludedValue = /* @__PURE__ */ new Set([
8969
8990
  "if",
8970
8991
  "ifElse",
8971
8992
  "coalesce",
8993
+ "coalesceNew",
8972
8994
  "graphOutput",
8973
8995
  "raceInputs",
8974
8996
  "loopController"
@@ -9799,7 +9821,6 @@ var StreamingOutputWatch = class {
9799
9821
  #options;
9800
9822
  #run;
9801
9823
  #onFailure;
9802
- #requiresAcceptedStop;
9803
9824
  #queue = [];
9804
9825
  #activeRuns = /* @__PURE__ */ new Set();
9805
9826
  #timer;
@@ -9813,7 +9834,7 @@ var StreamingOutputWatch = class {
9813
9834
  #coalescedUpdates = 0;
9814
9835
  #droppedUpdates = 0;
9815
9836
  #maximumQueuedUpdates = 0;
9816
- constructor(options2, run, onFailure, { requiresAcceptedStop = true } = {}) {
9837
+ constructor(options2, run, onFailure) {
9817
9838
  this.#options = {
9818
9839
  triggerMode: options2.triggerMode === "interval" ? "interval" : "every-update",
9819
9840
  executionMode: options2.executionMode === "parallel" ? "parallel" : "sequential",
@@ -9836,7 +9857,6 @@ var StreamingOutputWatch = class {
9836
9857
  };
9837
9858
  this.#run = run;
9838
9859
  this.#onFailure = onFailure;
9839
- this.#requiresAcceptedStop = requiresAcceptedStop;
9840
9860
  }
9841
9861
  get hasPending() {
9842
9862
  return this.#activeRuns.size > 0 || !this.#stopped && (this.#queue.length > 0 || this.#timer != null);
@@ -9851,6 +9871,15 @@ var StreamingOutputWatch = class {
9851
9871
  get isSettled() {
9852
9872
  return !this.hasPending && (this.#stopped || this.#failure != null || this.#producerFinished);
9853
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
+ }
9854
9883
  get runtimeSummary() {
9855
9884
  return {
9856
9885
  receivedUpdates: this.#receivedUpdates,
@@ -9860,14 +9889,6 @@ var StreamingOutputWatch = class {
9860
9889
  ...this.#failureKind === void 0 ? {} : { failureKind: this.#failureKind }
9861
9890
  };
9862
9891
  }
9863
- /**
9864
- * A Stop boundary can enqueue ordinary parent-graph work when its node
9865
- * completes. Until it settles, its result is not safe to expose
9866
- * through the foreground-output boundary.
9867
- */
9868
- get canAffectForegroundOutputs() {
9869
- return this.#requiresAcceptedStop;
9870
- }
9871
9892
  publish(snapshot) {
9872
9893
  if (this.#stopped || this.#failure || this.#producerFinished) {
9873
9894
  return;
@@ -9919,12 +9940,6 @@ var StreamingOutputWatch = class {
9919
9940
  }
9920
9941
  await Promise.all([...this.#activeRuns].map((run) => run.promise));
9921
9942
  }
9922
- if (this.#producerFinished && this.#finalSnapshotSettled && !this.#stopped && this.#requiresAcceptedStop) {
9923
- this.#fail(
9924
- new Error("The watched streaming output completed before Stop Watching Streaming Output accepted a value."),
9925
- "missing-stop"
9926
- );
9927
- }
9928
9943
  }
9929
9944
  #scheduleInterval() {
9930
9945
  if (this.#timer != null) {
@@ -11242,6 +11257,7 @@ var NotAllowedCodeRunner = class {
11242
11257
  // src/model/GraphProcessor.ts
11243
11258
  var graphProcessorGraphOverride = Symbol("graphProcessorGraphOverride");
11244
11259
  var consumedAsyncBranchTriggerOverride = Symbol("consumedAsyncBranchTriggerOverride");
11260
+ var asyncBranchInputAnchorsOverride = Symbol("asyncBranchInputAnchorsOverride");
11245
11261
  var consumedStreamingWatchNodeOverride = Symbol("consumedStreamingWatchNodeOverride");
11246
11262
  function isNamedGraphBoundaryCaller(node) {
11247
11263
  return node.type === "subGraph" || node.type === "referencedGraphAlias";
@@ -11379,6 +11395,7 @@ var GraphProcessor = class _GraphProcessor {
11379
11395
  #effectiveConnectionsForRun;
11380
11396
  #asyncBranchPlansByTriggerNodeId = /* @__PURE__ */ new Map();
11381
11397
  #consumedAsyncBranchTriggerNodeId;
11398
+ #asyncBranchInputAnchors;
11382
11399
  #streamingWatchPlansBySourceNodeId = /* @__PURE__ */ new Map();
11383
11400
  #streamingWatchPlansByWatchNodeId = /* @__PURE__ */ new Map();
11384
11401
  #streamingOutputWatches = /* @__PURE__ */ new Map();
@@ -11428,6 +11445,11 @@ var GraphProcessor = class _GraphProcessor {
11428
11445
  #graphOutputs = void 0;
11429
11446
  #executionCache = void 0;
11430
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;
11431
11453
  #loopControllersSeen = void 0;
11432
11454
  #subprocessors = void 0;
11433
11455
  #contextValues = void 0;
@@ -11528,6 +11550,7 @@ var GraphProcessor = class _GraphProcessor {
11528
11550
  this.#runtimeProfiler = options2 == null ? void 0 : options2.runtimeProfiler;
11529
11551
  this.#captureNodeTimings = (options2 == null ? void 0 : options2.captureNodeTimings) ?? false;
11530
11552
  this.#consumedAsyncBranchTriggerNodeId = options2 == null ? void 0 : options2[consumedAsyncBranchTriggerOverride];
11553
+ this.#asyncBranchInputAnchors = options2 == null ? void 0 : options2[asyncBranchInputAnchorsOverride];
11531
11554
  this.#consumedStreamingWatchNodeId = options2 == null ? void 0 : options2[consumedStreamingWatchNodeOverride];
11532
11555
  this.#emitter.bindMethods(this, ["on", "off", "once", "onAny", "offAny"]);
11533
11556
  this.setExternalFunction("echo", async (value) => ({ type: "any", value }));
@@ -11552,6 +11575,7 @@ var GraphProcessor = class _GraphProcessor {
11552
11575
  return;
11553
11576
  }
11554
11577
  const preprocessedGraph = preprocessGraphState({
11578
+ inputAnchorDefinitions: this.#asyncBranchInputAnchors,
11555
11579
  graph: this.#graph,
11556
11580
  loadedProjects: this.#loadedProjects,
11557
11581
  project: this.#project,
@@ -11874,6 +11898,7 @@ var GraphProcessor = class _GraphProcessor {
11874
11898
  this.#graphOutputs = ((_b = this.#sharedRunStateOverride) == null ? void 0 : _b.graphOutputs) ?? {};
11875
11899
  this.#executionCache ??= /* @__PURE__ */ new Map();
11876
11900
  this.#queuedNodes = /* @__PURE__ */ new Set();
11901
+ this.#deferredRunToIgnoredNodes = /* @__PURE__ */ new Set();
11877
11902
  this.#connectedToolContinuationHost.reset();
11878
11903
  this.#continuationCompletionOwnerByNodeId = /* @__PURE__ */ new Map();
11879
11904
  this.#effectiveConnectionsForRun = void 0;
@@ -12350,8 +12375,9 @@ var GraphProcessor = class _GraphProcessor {
12350
12375
  return;
12351
12376
  }
12352
12377
  for (const node of this.#executionGraphNodes) {
12353
- if (this.#queuedNodes.has(node.id) === false) {
12378
+ if (this.#queuedNodes.has(node.id) === false && !this.#ignoreNodes.has(node.id)) {
12354
12379
  this.#ignoreNodes.add(node.id);
12380
+ this.#deferredRunToIgnoredNodes.add(node.id);
12355
12381
  }
12356
12382
  }
12357
12383
  }
@@ -12758,6 +12784,12 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
12758
12784
  }
12759
12785
  #queueOutputNodes(node, outputNodes) {
12760
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
+ }
12761
12793
  void this.#processingQueue.addAll(
12762
12794
  selectedOutputs.map((outputNode) => async () => {
12763
12795
  this.#emitTraceEvent(`Trying to run output node from ${node.title}: ${outputNode.title} (${outputNode.id})`);
@@ -12830,7 +12862,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
12830
12862
  runtimeProfiler: this.#runtimeProfiler,
12831
12863
  scheduler: this.#scheduler,
12832
12864
  [graphProcessorGraphOverride]: plan.graph,
12833
- [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
+ )
12834
12869
  });
12835
12870
  onProcessorCreated(processor);
12836
12871
  processor.executor = this.executor;
@@ -13951,7 +13986,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
13951
13986
  watchNode,
13952
13987
  nextUpdateIndex: 0,
13953
13988
  history: new StreamingOutputWatchHistory(),
13954
- historySummaryEmitted: false
13989
+ historySummaryEmitted: false,
13990
+ unmatchedStopResolved: false
13955
13991
  };
13956
13992
  const plans = this.#streamingWatchPlansBySourceNodeId.get(sourceNode.id) ?? [];
13957
13993
  plans.push(plan);
@@ -13960,8 +13996,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
13960
13996
  const watch = new StreamingOutputWatch(
13961
13997
  watchNode.data,
13962
13998
  (snapshot, registerCancel) => this.#runStreamingOutputWatchInvocation(plan, snapshot, registerCancel),
13963
- (error) => this.#recordStreamingWatchFailure(watchNode, error),
13964
- { requiresAcceptedStop: stopNodeId != null }
13999
+ (error) => this.#recordStreamingWatchFailure(watchNode, error)
13965
14000
  );
13966
14001
  this.#streamingOutputWatches.set(watchNode.id, watch);
13967
14002
  for (const nodeId of [watchNode.id, ...branchNodeIds]) {
@@ -14387,9 +14422,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
14387
14422
  return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending);
14388
14423
  }
14389
14424
  #hasUnresolvedForegroundOutputStreamingWatch() {
14390
- return [...this.#streamingOutputWatches.values()].some(
14391
- (watch) => !watch.stopped && watch.canAffectForegroundOutputs
14392
- );
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
+ });
14393
14429
  }
14394
14430
  #hasDrainableStreamingOutputWatches() {
14395
14431
  return [...this.#streamingOutputWatches.values()].some((watch) => watch.hasPending && !watch.isAwaitingProducer);
@@ -14408,6 +14444,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
14408
14444
  await watch.drain();
14409
14445
  }
14410
14446
  await this.#processingQueue.onIdle();
14447
+ this.#resolveUnmatchedStreamingWatchStops();
14448
+ await this.#processingQueue.onIdle();
14411
14449
  } while (this.#hasDrainableStreamingOutputWatches());
14412
14450
  for (const [watchNodeId, watch] of this.#streamingOutputWatches) {
14413
14451
  const plan = this.#streamingWatchPlansByWatchNodeId.get(watchNodeId);
@@ -14423,7 +14461,27 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
14423
14461
  );
14424
14462
  }
14425
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
+ }
14426
14483
  #prepareAsyncBranchTopology() {
14484
+ var _a;
14427
14485
  const connections = this.#getEffectiveConnections().filter(
14428
14486
  (connection) => this.#isDefinitionValidConnection(connection)
14429
14487
  );
@@ -14440,6 +14498,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
14440
14498
  incomingByNodeId.set(connection.inputNodeId, incoming);
14441
14499
  }
14442
14500
  for (const triggerNode of Object.values(this.#nodesById)) {
14501
+ if ((_a = this.#asyncBranchInputAnchors) == null ? void 0 : _a[triggerNode.id]) continue;
14443
14502
  if (triggerNode.type !== "startBackgroundBranch" || triggerNode.disabled || !isRelevant(triggerNode.id)) {
14444
14503
  continue;
14445
14504
  }
@@ -20065,8 +20124,42 @@ function audioFormatToMediaType(format) {
20065
20124
  }
20066
20125
  }
20067
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
+
20068
20162
  // src/model/nodes/ChatNodeBase.ts
20069
- var cache = /* @__PURE__ */ new Map();
20070
20163
  var ChatNodeBase = {
20071
20164
  defaultData: () => ({
20072
20165
  model: "gpt-5",
@@ -20707,9 +20800,9 @@ var ChatNodeBase = {
20707
20800
  },
20708
20801
  {
20709
20802
  type: "toggle",
20710
- label: "Cache In Rivet",
20803
+ label: "Cache outputs (editor only)",
20711
20804
  dataKey: "cache",
20712
- helperMessage: "If on, requests with the same parameters and messages will be cached in Rivet, for immediate responses without an API call."
20805
+ helperMessage: "Reuses a matching ordinary chat response while this project remains open. Tool-capable requests always run normally."
20713
20806
  },
20714
20807
  {
20715
20808
  type: "toggle",
@@ -20851,13 +20944,19 @@ var ChatNodeBase = {
20851
20944
  options2.temperature = useTopP ? void 0 : temperature;
20852
20945
  options2.max_tokens = maxTokens;
20853
20946
  }
20854
- const cacheKey = JSON.stringify(options2);
20855
- if (data.cache) {
20856
- const cached = cache.get(cacheKey);
20857
- if (cached) {
20858
- (_a2 = context.markResultAsEditorCacheHit) == null ? void 0 : _a2.call(context);
20859
- return cached;
20860
- }
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;
20861
20960
  }
20862
20961
  const startTime = Date.now();
20863
20962
  if (isO1Beta || audio) {
@@ -20885,7 +20984,7 @@ var ChatNodeBase = {
20885
20984
  durationMs: Date.now() - startTime
20886
20985
  });
20887
20986
  Object.freeze(output);
20888
- cache.set(cacheKey, output);
20987
+ writeLegacyChatEditorCache(cache, output);
20889
20988
  return output;
20890
20989
  }
20891
20990
  const chunks = streamChatCompletions({
@@ -20917,7 +21016,7 @@ var ChatNodeBase = {
20917
21016
  });
20918
21017
  output["duration"] = { type: "number", value: Date.now() - startTime };
20919
21018
  Object.freeze(output);
20920
- cache.set(cacheKey, output);
21019
+ writeLegacyChatEditorCache(cache, output);
20921
21020
  return output;
20922
21021
  },
20923
21022
  {
@@ -21204,23 +21303,17 @@ var AnthropicError = class extends Error {
21204
21303
  }
21205
21304
  };
21206
21305
 
21207
- // src/plugins/google/google.ts
21306
+ // src/plugins/google/googleGenerativeAi.ts
21208
21307
  var import_genai = require("@google/genai");
21209
21308
  var googleModelsDeprecated = {
21210
21309
  "gemini-pro": {
21211
21310
  maxTokens: 32760,
21212
- cost: {
21213
- prompt: NaN,
21214
- completion: NaN
21215
- },
21311
+ cost: { prompt: NaN, completion: NaN },
21216
21312
  displayName: "Gemini Pro"
21217
21313
  },
21218
21314
  "gemini-pro-vision": {
21219
21315
  maxTokens: 16384,
21220
- cost: {
21221
- prompt: NaN,
21222
- completion: NaN
21223
- },
21316
+ cost: { prompt: NaN, completion: NaN },
21224
21317
  displayName: "Gemini Pro Vision"
21225
21318
  }
21226
21319
  };
@@ -21237,34 +21330,22 @@ var generativeAiGoogleModels = {
21237
21330
  },
21238
21331
  "gemini-2.5-flash": {
21239
21332
  maxTokens: 1048576,
21240
- cost: {
21241
- prompt: 0.3 / 1e3,
21242
- completion: 2.5 / 1e3
21243
- },
21333
+ cost: { prompt: 0.3 / 1e3, completion: 2.5 / 1e3 },
21244
21334
  displayName: "Gemini 2.5 Flash"
21245
21335
  },
21246
21336
  "gemini-2.5-flash-lite-preview-06-17": {
21247
21337
  maxTokens: 1e6,
21248
- cost: {
21249
- prompt: 0.1 / 1e3,
21250
- completion: 0.4 / 1e3
21251
- },
21338
+ cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
21252
21339
  displayName: "Gemini 2.5 Flash Lite Preview"
21253
21340
  },
21254
21341
  "gemini-2.0-flash": {
21255
21342
  maxTokens: 1048576,
21256
- cost: {
21257
- prompt: 0.1 / 1e3,
21258
- completion: 0.4 / 1e3
21259
- },
21343
+ cost: { prompt: 0.1 / 1e3, completion: 0.4 / 1e3 },
21260
21344
  displayName: "Gemini 2.0 Flash"
21261
21345
  },
21262
21346
  "gemini-2.0-flash-lite": {
21263
21347
  maxTokens: 1048576,
21264
- cost: {
21265
- prompt: 0.075 / 1e3,
21266
- completion: 0.3 / 1e3
21267
- },
21348
+ cost: { prompt: 0.075 / 1e3, completion: 0.3 / 1e3 },
21268
21349
  displayName: "Gemini 2.0 Flash Lite"
21269
21350
  },
21270
21351
  "gemini-1.5-pro": {
@@ -21288,18 +21369,6 @@ var generativeAiOptions = Object.entries(generativeAiGoogleModels).map(([id, { d
21288
21369
  value: id,
21289
21370
  label: displayName
21290
21371
  }));
21291
- function getVertexGenerativeModelOptions(options2) {
21292
- return {
21293
- model: options2.model,
21294
- systemInstruction: options2.systemPrompt,
21295
- generationConfig: {
21296
- maxOutputTokens: options2.max_output_tokens,
21297
- temperature: options2.temperature,
21298
- topP: options2.top_p,
21299
- topK: options2.top_k
21300
- }
21301
- };
21302
- }
21303
21372
  async function* streamGenerativeAi({
21304
21373
  apiKey,
21305
21374
  model,
@@ -21328,14 +21397,8 @@ async function* streamGenerativeAi({
21328
21397
  topK,
21329
21398
  tools,
21330
21399
  abortSignal: signal,
21331
- thinkingConfig: {
21332
- thinkingBudget
21333
- },
21334
- httpOptions: {
21335
- headers: {
21336
- ...additionalHeaders
21337
- }
21338
- }
21400
+ thinkingConfig: { thinkingBudget },
21401
+ httpOptions: { headers: { ...additionalHeaders } }
21339
21402
  }
21340
21403
  });
21341
21404
  for await (const chunk of result) {
@@ -21358,6 +21421,20 @@ async function* streamGenerativeAi({
21358
21421
  }
21359
21422
  }
21360
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
+ }
21361
21438
  async function* streamChatCompletions3({
21362
21439
  project,
21363
21440
  location,
@@ -21373,8 +21450,11 @@ async function* streamChatCompletions3({
21373
21450
  }) {
21374
21451
  var _a, _b;
21375
21452
  const { VertexAI } = await import("@google-cloud/vertexai");
21376
- process.env.GOOGLE_APPLICATION_CREDENTIALS = applicationCredentials;
21377
- const vertexAi = new VertexAI({ project, location });
21453
+ const vertexAi = new VertexAI({
21454
+ project,
21455
+ location,
21456
+ googleAuthOptions: { keyFilename: applicationCredentials }
21457
+ });
21378
21458
  const generativeModel = vertexAi.preview.getGenerativeModel(
21379
21459
  getVertexGenerativeModelOptions({
21380
21460
  model,
@@ -22283,7 +22363,7 @@ function getResponseSettingsEditors() {
22283
22363
  type: "toggle",
22284
22364
  label: "Stream response",
22285
22365
  dataKey: "useAsGraphPartialOutput",
22286
- helperMessage: "Shows streamed response updates in the node output while running in the editor. Other nodes only receive the final response after it is complete."
22366
+ helperMessage: STREAM_RESPONSE_HELPER_MESSAGE
22287
22367
  },
22288
22368
  {
22289
22369
  type: "string",
@@ -26178,11 +26258,11 @@ function getLLMChatV2EditorCacheEligibility(data) {
26178
26258
  }
26179
26259
 
26180
26260
  // src/model/chat-v2/chatV2EditorCache.ts
26181
- var import_safe_stable_stringify5 = __toESM(require("safe-stable-stringify"), 1);
26182
- var import_crypto_js2 = __toESM(require("crypto-js"), 1);
26261
+ var import_safe_stable_stringify6 = __toESM(require("safe-stable-stringify"), 1);
26262
+ var import_crypto_js3 = __toESM(require("crypto-js"), 1);
26183
26263
  function buildLLMChatV2EditorCacheKey(parts) {
26184
26264
  const { cacheVersion = 3, ...keyParts } = parts;
26185
- return (0, import_safe_stable_stringify5.default)({ cacheVersion, ...keyParts }) ?? "";
26265
+ return (0, import_safe_stable_stringify6.default)({ cacheVersion, ...keyParts }) ?? "";
26186
26266
  }
26187
26267
  function cloneLLMChatV2EditorCacheOutputs(outputs) {
26188
26268
  return cloneExecutionOutputs(outputs);
@@ -26191,7 +26271,7 @@ function fingerprintSecret(secret) {
26191
26271
  if (!secret) {
26192
26272
  return void 0;
26193
26273
  }
26194
- return `sha256:${import_crypto_js2.default.SHA256(secret).toString(import_crypto_js2.default.enc.Hex)}`;
26274
+ return `sha256:${import_crypto_js3.default.SHA256(secret).toString(import_crypto_js3.default.enc.Hex)}`;
26195
26275
  }
26196
26276
  function fingerprintProviderConfigForCache(config) {
26197
26277
  if (config.headers == null && config.endpointQuery == null) {
@@ -26215,7 +26295,7 @@ function fingerprintCustomProviderBaseURL(value) {
26215
26295
  }
26216
26296
  try {
26217
26297
  const endpoint = normalizeOpenAICompatibleEndpoint(value);
26218
- return (0, import_safe_stable_stringify5.default)({
26298
+ return (0, import_safe_stable_stringify6.default)({
26219
26299
  baseURL: endpoint.baseURL,
26220
26300
  endpointQuery: endpoint.endpointQuery.map(([key, queryValue]) => [key, fingerprintSecret(queryValue) ?? ""])
26221
26301
  }) ?? "";
@@ -26243,7 +26323,7 @@ function fingerprintRuntimeValueForCache(value) {
26243
26323
  if (value == null) {
26244
26324
  return void 0;
26245
26325
  }
26246
- return fingerprintSecret((0, import_safe_stable_stringify5.default)(value) ?? "");
26326
+ return fingerprintSecret((0, import_safe_stable_stringify6.default)(value) ?? "");
26247
26327
  }
26248
26328
  function fingerprintProfileChainForCache(data, profiles) {
26249
26329
  if (profiles == null) {
@@ -31337,37 +31417,40 @@ var ContextNodeImpl = class extends NodeImpl {
31337
31417
  var contextNode = nodeDefinition(ContextNodeImpl, "Context");
31338
31418
 
31339
31419
  // src/model/nodes/CoalesceNode.ts
31340
- var import_non_secure38 = require("nanoid/non-secure");
31341
31420
  var import_ts_dedent31 = require("ts-dedent");
31421
+
31422
+ // src/model/nodes/CoalesceNodeBase.ts
31423
+ var import_non_secure38 = require("nanoid/non-secure");
31342
31424
  var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
31343
31425
  var IGNORE_NULL_LABEL = "Ignore 'null'";
31344
31426
  var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
31345
- var CoalesceNodeImpl = class extends NodeImpl {
31346
- static create = () => {
31347
- const chartNode = {
31348
- type: "coalesce",
31349
- title: "Coalesce",
31350
- id: (0, import_non_secure38.nanoid)(),
31351
- data: {
31352
- ignoreNull: false,
31353
- ignoreUndefined: false
31354
- },
31355
- visualData: {
31356
- x: 0,
31357
- y: 0,
31358
- width: 190
31359
- }
31360
- };
31361
- 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
+ }
31362
31441
  };
31442
+ }
31443
+ var CoalesceNodeBase = class extends NodeImpl {
31363
31444
  getInputDefinitions(connections) {
31364
31445
  const inputs = [];
31365
31446
  const inputCount = getNextVariadicPortIndex(connections, this.chartNode.id, "input", "strict-positive");
31366
- inputs.push({
31367
- dataType: "boolean",
31368
- id: "conditional",
31369
- title: "Conditional"
31370
- });
31447
+ if (this.includesLegacyConditionalInput) {
31448
+ inputs.push({
31449
+ dataType: "boolean",
31450
+ id: "conditional",
31451
+ title: "Conditional"
31452
+ });
31453
+ }
31371
31454
  for (let i = 1; i <= inputCount; i++) {
31372
31455
  inputs.push({
31373
31456
  dataType: "any",
@@ -31410,21 +31493,9 @@ var CoalesceNodeImpl = class extends NodeImpl {
31410
31493
  }
31411
31494
  return ignoredValues.length > 0 ? ignoredValues.join("\n") : void 0;
31412
31495
  }
31413
- static getUIData() {
31414
- return {
31415
- infoBoxBody: import_ts_dedent31.dedent`
31416
- Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
31417
-
31418
- Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
31419
- `,
31420
- infoBoxTitle: "Coalesce Node",
31421
- contextMenuTitle: "Coalesce",
31422
- group: ["Logic"]
31423
- };
31424
- }
31425
31496
  async process(inputData) {
31426
31497
  const conditional = inputData["conditional"];
31427
- if ((conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
31498
+ if (this.includesLegacyConditionalInput && (conditional == null ? void 0 : conditional.type) === "control-flow-excluded") {
31428
31499
  return {
31429
31500
  ["output"]: {
31430
31501
  type: "control-flow-excluded",
@@ -31471,7 +31542,46 @@ var CoalesceNodeImpl = class extends NodeImpl {
31471
31542
  return this.data.ignoreNull === true && value === null || this.data.ignoreUndefined === true && value === void 0;
31472
31543
  }
31473
31544
  };
31474
- var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
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");
31475
31585
 
31476
31586
  // src/model/nodes/DidRunNode.ts
31477
31587
  var import_non_secure39 = require("nanoid/non-secure");
@@ -31550,7 +31660,7 @@ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
31550
31660
 
31551
31661
  // src/model/nodes/PassthroughNode.ts
31552
31662
  var import_non_secure40 = require("nanoid/non-secure");
31553
- var import_ts_dedent32 = require("ts-dedent");
31663
+ var import_ts_dedent33 = require("ts-dedent");
31554
31664
  var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
31555
31665
  var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
31556
31666
  var MAX_PASSTHROUGH_PORT_INDEX = 1e4;
@@ -31612,7 +31722,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
31612
31722
  }
31613
31723
  static getUIData() {
31614
31724
  return {
31615
- infoBoxBody: import_ts_dedent32.dedent`
31725
+ infoBoxBody: import_ts_dedent33.dedent`
31616
31726
  Simply passes the input value to the output without any modifications.
31617
31727
  `,
31618
31728
  infoBoxTitle: "Passthrough Node",
@@ -31635,7 +31745,7 @@ var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
31635
31745
 
31636
31746
  // src/model/nodes/DataBusNode.ts
31637
31747
  var import_non_secure41 = require("nanoid/non-secure");
31638
- var import_ts_dedent33 = require("ts-dedent");
31748
+ var import_ts_dedent34 = require("ts-dedent");
31639
31749
  function getConnectedChannelIndices(connections, nodeId) {
31640
31750
  const channelIndices = /* @__PURE__ */ new Set();
31641
31751
  for (const connection of connections) {
@@ -31695,7 +31805,7 @@ var DataBusNodeImpl = class extends NodeImpl {
31695
31805
  }
31696
31806
  static getUIData() {
31697
31807
  return {
31698
- infoBoxBody: import_ts_dedent33.dedent`
31808
+ infoBoxBody: import_ts_dedent34.dedent`
31699
31809
  Organizes independent connections in a compact rail at the top of the
31700
31810
  canvas. Data Bus channels are wiring topology, not executable nodes.
31701
31811
  `,
@@ -31712,7 +31822,7 @@ var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
31712
31822
 
31713
31823
  // src/model/nodes/StartBackgroundBranchNode.ts
31714
31824
  var import_non_secure42 = require("nanoid/non-secure");
31715
- var import_ts_dedent34 = require("ts-dedent");
31825
+ var import_ts_dedent35 = require("ts-dedent");
31716
31826
  var StartBackgroundBranchNodeImpl = class extends NodeImpl {
31717
31827
  static create = () => ({
31718
31828
  type: "startBackgroundBranch",
@@ -31743,7 +31853,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
31743
31853
  }
31744
31854
  static getUIData() {
31745
31855
  return {
31746
- infoBoxBody: import_ts_dedent34.dedent`
31856
+ infoBoxBody: import_ts_dedent35.dedent`
31747
31857
  Starts its downstream branch asynchronously. The foreground graph continues immediately, while the root run waits for the async branch before it ends.
31748
31858
  `,
31749
31859
  infoBoxTitle: "Start Async Branch Node",
@@ -31769,7 +31879,7 @@ var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "S
31769
31879
 
31770
31880
  // src/model/nodes/WatchStreamingOutputNode.ts
31771
31881
  var import_non_secure43 = require("nanoid/non-secure");
31772
- var import_ts_dedent35 = require("ts-dedent");
31882
+ var import_ts_dedent36 = require("ts-dedent");
31773
31883
  var WatchStreamingOutputNodeImpl = class extends NodeImpl {
31774
31884
  static create() {
31775
31885
  return {
@@ -31808,7 +31918,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
31808
31918
  contextMenuTitle: "Watch Streaming Output",
31809
31919
  group: ["Logic"],
31810
31920
  infoBoxTitle: "Watch Streaming Output Node",
31811
- infoBoxBody: import_ts_dedent35.dedent`
31921
+ infoBoxBody: import_ts_dedent36.dedent`
31812
31922
  Runs its downstream branch for streaming output snapshots. Without Stop Watching
31813
31923
  Streaming Output, every snapshot runs the branch and the watch finishes with its
31814
31924
  producer. Add one Stop node only when a chosen value must continue through the
@@ -31892,7 +32002,7 @@ var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Wat
31892
32002
 
31893
32003
  // src/model/nodes/StopWatchingStreamingOutputNode.ts
31894
32004
  var import_non_secure44 = require("nanoid/non-secure");
31895
- var import_ts_dedent36 = require("ts-dedent");
32005
+ var import_ts_dedent37 = require("ts-dedent");
31896
32006
  var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
31897
32007
  static create() {
31898
32008
  return {
@@ -31914,10 +32024,12 @@ var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
31914
32024
  contextMenuTitle: "Stop Watching Streaming Output",
31915
32025
  group: ["Logic"],
31916
32026
  infoBoxTitle: "Stop Watching Streaming Output Node",
31917
- infoBoxBody: import_ts_dedent36.dedent`
32027
+ infoBoxBody: import_ts_dedent37.dedent`
31918
32028
  Accepts a value from a Watch Streaming Output branch, stops future streaming
31919
32029
  snapshots, and lets its completed output continue through the ordinary graph.
31920
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.
31921
32033
  `
31922
32034
  };
31923
32035
  }
@@ -31943,7 +32055,7 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
31943
32055
 
31944
32056
  // src/model/nodes/PopNode.ts
31945
32057
  var import_non_secure45 = require("nanoid/non-secure");
31946
- var import_ts_dedent37 = require("ts-dedent");
32058
+ var import_ts_dedent38 = require("ts-dedent");
31947
32059
  var PopNodeImpl = class extends NodeImpl {
31948
32060
  static create() {
31949
32061
  const baseNode = {
@@ -31994,7 +32106,7 @@ var PopNodeImpl = class extends NodeImpl {
31994
32106
  }
31995
32107
  static getUIData() {
31996
32108
  return {
31997
- infoBoxBody: import_ts_dedent37.dedent`
32109
+ infoBoxBody: import_ts_dedent38.dedent`
31998
32110
  Pops the last value off the input array and outputs the new array and the popped value.
31999
32111
 
32000
32112
  Can also be used to just extract the last value from an array.
@@ -32031,7 +32143,7 @@ var popNode = nodeDefinition(PopNodeImpl, "Pop");
32031
32143
 
32032
32144
  // src/model/nodes/SetGlobalNode.ts
32033
32145
  var import_non_secure46 = require("nanoid/non-secure");
32034
- var import_ts_dedent38 = require("ts-dedent");
32146
+ var import_ts_dedent39 = require("ts-dedent");
32035
32147
  var SetGlobalNodeImpl = class extends NodeImpl {
32036
32148
  static create() {
32037
32149
  const chartNode = {
@@ -32105,14 +32217,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
32105
32217
  ];
32106
32218
  }
32107
32219
  getBody() {
32108
- return import_ts_dedent38.dedent`
32220
+ return import_ts_dedent39.dedent`
32109
32221
  ${this.data.id}
32110
32222
  Type: ${this.data.dataType}
32111
32223
  `;
32112
32224
  }
32113
32225
  static getUIData() {
32114
32226
  return {
32115
- infoBoxBody: import_ts_dedent38.dedent`
32227
+ infoBoxBody: import_ts_dedent39.dedent`
32116
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.
32117
32229
  `,
32118
32230
  infoBoxTitle: "Set Global Node",
@@ -32149,7 +32261,7 @@ var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
32149
32261
 
32150
32262
  // src/model/nodes/GetGlobalNode.ts
32151
32263
  var import_non_secure47 = require("nanoid/non-secure");
32152
- var import_ts_dedent39 = require("ts-dedent");
32264
+ var import_ts_dedent40 = require("ts-dedent");
32153
32265
  var GetGlobalNodeImpl = class extends NodeImpl {
32154
32266
  static create() {
32155
32267
  const chartNode = {
@@ -32233,7 +32345,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
32233
32345
  ];
32234
32346
  }
32235
32347
  getBody() {
32236
- return import_ts_dedent39.dedent`
32348
+ return import_ts_dedent40.dedent`
32237
32349
  ${this.data.useIdInput ? "(ID from input)" : this.data.id}
32238
32350
  Type: ${this.data.dataType}
32239
32351
  ${this.data.wait ? "Waits for available data" : ""}
@@ -32241,7 +32353,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
32241
32353
  }
32242
32354
  static getUIData() {
32243
32355
  return {
32244
- infoBoxBody: import_ts_dedent39.dedent`
32356
+ infoBoxBody: import_ts_dedent40.dedent`
32245
32357
  Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
32246
32358
  `,
32247
32359
  infoBoxTitle: "Get Global Node",
@@ -32287,7 +32399,7 @@ var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
32287
32399
 
32288
32400
  // src/model/nodes/SetStoredValueNode.ts
32289
32401
  var import_non_secure48 = require("nanoid/non-secure");
32290
- var import_ts_dedent40 = require("ts-dedent");
32402
+ var import_ts_dedent41 = require("ts-dedent");
32291
32403
 
32292
32404
  // src/model/nodes/StoredValueNodeUtils.ts
32293
32405
  var portableStoredValueScalarTypes = [
@@ -32390,7 +32502,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
32390
32502
  ];
32391
32503
  }
32392
32504
  getBody() {
32393
- return import_ts_dedent40.dedent`
32505
+ return import_ts_dedent41.dedent`
32394
32506
  ${this.data.useKeyInput ? "(Key from input)" : this.data.key}
32395
32507
  Type: ${this.data.dataType}
32396
32508
  `;
@@ -32422,7 +32534,7 @@ var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Valu
32422
32534
 
32423
32535
  // src/model/nodes/GetStoredValueNode.ts
32424
32536
  var import_non_secure49 = require("nanoid/non-secure");
32425
- var import_ts_dedent41 = require("ts-dedent");
32537
+ var import_ts_dedent42 = require("ts-dedent");
32426
32538
  var GetStoredValueNodeImpl = class extends NodeImpl {
32427
32539
  static create() {
32428
32540
  return {
@@ -32483,7 +32595,7 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
32483
32595
  ];
32484
32596
  }
32485
32597
  getBody() {
32486
- return import_ts_dedent41.dedent`
32598
+ return import_ts_dedent42.dedent`
32487
32599
  ${this.data.useKeyInput ? "(Key from input)" : this.data.key}
32488
32600
  Type: ${this.data.dataType}
32489
32601
  ${this.data.wait ? "Waits for an in-run Set" : ""}
@@ -32522,7 +32634,7 @@ var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Valu
32522
32634
 
32523
32635
  // src/model/nodes/WaitForEventNode.ts
32524
32636
  var import_non_secure50 = require("nanoid/non-secure");
32525
- var import_ts_dedent42 = require("ts-dedent");
32637
+ var import_ts_dedent43 = require("ts-dedent");
32526
32638
  var WaitForEventNodeImpl = class extends NodeImpl {
32527
32639
  static create() {
32528
32640
  return {
@@ -32581,7 +32693,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
32581
32693
  }
32582
32694
  static getUIData() {
32583
32695
  return {
32584
- infoBoxBody: import_ts_dedent42.dedent`
32696
+ infoBoxBody: import_ts_dedent43.dedent`
32585
32697
  Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
32586
32698
  `,
32587
32699
  infoBoxTitle: "Wait For Event Node",
@@ -32602,7 +32714,7 @@ var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
32602
32714
 
32603
32715
  // src/model/nodes/ToolNode.ts
32604
32716
  var import_non_secure51 = require("nanoid/non-secure");
32605
- var import_ts_dedent43 = require("ts-dedent");
32717
+ var import_ts_dedent44 = require("ts-dedent");
32606
32718
  var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
32607
32719
  function getToolNodeBodyPreview(data) {
32608
32720
  const [name = "", ...descriptionLines] = buildNodeBodyPreview(
@@ -32630,7 +32742,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
32630
32742
  name: "newTool",
32631
32743
  description: "No description provided",
32632
32744
  resultHandling: "continue",
32633
- schema: import_ts_dedent43.dedent`
32745
+ schema: import_ts_dedent44.dedent`
32634
32746
  {
32635
32747
  "type": "object",
32636
32748
  "properties": {}
@@ -32757,7 +32869,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
32757
32869
  }
32758
32870
  static getUIData() {
32759
32871
  return {
32760
- infoBoxBody: import_ts_dedent43.dedent`
32872
+ infoBoxBody: import_ts_dedent44.dedent`
32761
32873
  Defines a tool, which is a method that the LLM can call in its responses.
32762
32874
  `,
32763
32875
  infoBoxTitle: "Tool Node",
@@ -32812,7 +32924,7 @@ var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
32812
32924
  // src/model/nodes/ToYamlNode.ts
32813
32925
  var import_non_secure52 = require("nanoid/non-secure");
32814
32926
  var import_yaml2 = __toESM(require("yaml"), 1);
32815
- var import_ts_dedent44 = require("ts-dedent");
32927
+ var import_ts_dedent45 = require("ts-dedent");
32816
32928
  var ToYamlNodeImpl = class extends NodeImpl {
32817
32929
  static create() {
32818
32930
  const chartNode = {
@@ -32849,7 +32961,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
32849
32961
  }
32850
32962
  static getUIData() {
32851
32963
  return {
32852
- infoBoxBody: import_ts_dedent44.dedent`
32964
+ infoBoxBody: import_ts_dedent45.dedent`
32853
32965
  Turns the input object into YAML text.
32854
32966
  `,
32855
32967
  infoBoxTitle: "To YAML Node",
@@ -32875,7 +32987,7 @@ var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
32875
32987
 
32876
32988
  // src/model/nodes/GetEmbeddingNode.ts
32877
32989
  var import_non_secure53 = require("nanoid/non-secure");
32878
- var import_ts_dedent45 = require("ts-dedent");
32990
+ var import_ts_dedent46 = require("ts-dedent");
32879
32991
 
32880
32992
  // src/integrations/integrations.ts
32881
32993
  var registeredIntegrations = {
@@ -32982,7 +33094,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
32982
33094
  }
32983
33095
  static getUIData() {
32984
33096
  return {
32985
- infoBoxBody: import_ts_dedent45.dedent`
33097
+ infoBoxBody: import_ts_dedent46.dedent`
32986
33098
  Gets a OpenAI vector embedding for the input text provided.
32987
33099
 
32988
33100
  Can be used with the Vector Store and Vector KNN nodes.
@@ -33014,7 +33126,7 @@ var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
33014
33126
 
33015
33127
  // src/model/nodes/VectorStoreNode.ts
33016
33128
  var import_non_secure54 = require("nanoid/non-secure");
33017
- var import_ts_dedent46 = require("ts-dedent");
33129
+ var import_ts_dedent47 = require("ts-dedent");
33018
33130
  var VectorStoreNodeImpl = class extends NodeImpl {
33019
33131
  static create() {
33020
33132
  return {
@@ -33094,14 +33206,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
33094
33206
  ];
33095
33207
  }
33096
33208
  getBody() {
33097
- return import_ts_dedent46.dedent`
33209
+ return import_ts_dedent47.dedent`
33098
33210
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
33099
33211
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
33100
33212
  `;
33101
33213
  }
33102
33214
  static getUIData() {
33103
33215
  return {
33104
- infoBoxBody: import_ts_dedent46.dedent`
33216
+ infoBoxBody: import_ts_dedent47.dedent`
33105
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.
33106
33218
  `,
33107
33219
  infoBoxTitle: "Vector Store Node",
@@ -33137,7 +33249,7 @@ var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
33137
33249
 
33138
33250
  // src/model/nodes/VectorNearestNeighborsNode.ts
33139
33251
  var import_non_secure55 = require("nanoid/non-secure");
33140
- var import_ts_dedent47 = require("ts-dedent");
33252
+ var import_ts_dedent48 = require("ts-dedent");
33141
33253
  var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
33142
33254
  static create() {
33143
33255
  return {
@@ -33224,7 +33336,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
33224
33336
  ];
33225
33337
  }
33226
33338
  getBody() {
33227
- return import_ts_dedent47.dedent`
33339
+ return import_ts_dedent48.dedent`
33228
33340
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
33229
33341
  K: ${this.data.useKInput ? "(using input)" : this.data.k}
33230
33342
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
@@ -33232,7 +33344,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
33232
33344
  }
33233
33345
  static getUIData() {
33234
33346
  return {
33235
- infoBoxBody: import_ts_dedent47.dedent`
33347
+ infoBoxBody: import_ts_dedent48.dedent`
33236
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.
33237
33349
  `,
33238
33350
  infoBoxTitle: "Vector KNN Node",
@@ -33263,7 +33375,7 @@ var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl,
33263
33375
 
33264
33376
  // src/model/nodes/KnowledgeSourceNode.ts
33265
33377
  var import_non_secure56 = require("nanoid/non-secure");
33266
- var import_ts_dedent48 = require("ts-dedent");
33378
+ var import_ts_dedent49 = require("ts-dedent");
33267
33379
  var KnowledgeSourceNodeImpl = class extends NodeImpl {
33268
33380
  static create() {
33269
33381
  return {
@@ -33326,7 +33438,7 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
33326
33438
  getBody(context) {
33327
33439
  var _a;
33328
33440
  const connection = (_a = context.project.metadata.knowledgeStores) == null ? void 0 : _a[this.data.connectionId];
33329
- return import_ts_dedent48.dedent`
33441
+ return import_ts_dedent49.dedent`
33330
33442
  Store: ${this.data.useConnectionIdInput ? "(from input)" : ((connection == null ? void 0 : connection.displayName) ?? this.data.connectionId) || "(not selected)"}
33331
33443
  Source: ${this.data.useSourceIdInput ? "(from input)" : this.data.sourceId || "(not set)"}
33332
33444
  ${this.data.useVersionInput || this.data.version ? "Exact version configured" : "Uses active version"}
@@ -33360,7 +33472,7 @@ var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Sou
33360
33472
 
33361
33473
  // src/model/nodes/KnowledgeDocumentNode.ts
33362
33474
  var import_non_secure57 = require("nanoid/non-secure");
33363
- var import_ts_dedent49 = require("ts-dedent");
33475
+ var import_ts_dedent50 = require("ts-dedent");
33364
33476
  var KnowledgeDocumentNodeImpl = class extends NodeImpl {
33365
33477
  static create() {
33366
33478
  return {
@@ -33415,7 +33527,7 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
33415
33527
  ];
33416
33528
  }
33417
33529
  getBody() {
33418
- return import_ts_dedent49.dedent`
33530
+ return import_ts_dedent50.dedent`
33419
33531
  ${this.data.useTextInput ? "Text from input" : `${this.data.text.length} characters`}
33420
33532
  ${this.data.useDocumentIdInput ? "ID from input" : this.data.documentId ? `ID: ${this.data.documentId}` : "ID generated from content"}
33421
33533
  `;
@@ -33442,7 +33554,7 @@ var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge
33442
33554
 
33443
33555
  // src/model/nodes/SyncKnowledgeSourceNode.ts
33444
33556
  var import_non_secure58 = require("nanoid/non-secure");
33445
- var import_ts_dedent50 = require("ts-dedent");
33557
+ var import_ts_dedent51 = require("ts-dedent");
33446
33558
  var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
33447
33559
  static create() {
33448
33560
  return {
@@ -33520,7 +33632,7 @@ var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
33520
33632
  ];
33521
33633
  }
33522
33634
  getBody() {
33523
- return import_ts_dedent50.dedent`
33635
+ return import_ts_dedent51.dedent`
33524
33636
  ${this.data.targetSize} ${this.data.chunkUnit}
33525
33637
  ${this.data.overlap} overlap
33526
33638
  ${this.data.includeTitle ? "Includes titles" : "Content only"}
@@ -33670,7 +33782,7 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
33670
33782
 
33671
33783
  // src/model/nodes/SearchKnowledgeNode.ts
33672
33784
  var import_non_secure60 = require("nanoid/non-secure");
33673
- var import_ts_dedent51 = require("ts-dedent");
33785
+ var import_ts_dedent52 = require("ts-dedent");
33674
33786
  var SearchKnowledgeNodeImpl = class extends NodeImpl {
33675
33787
  static create() {
33676
33788
  return {
@@ -33739,7 +33851,7 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
33739
33851
  ];
33740
33852
  }
33741
33853
  getBody() {
33742
- return import_ts_dedent51.dedent`
33854
+ return import_ts_dedent52.dedent`
33743
33855
  ${this.data.topK} per query -> ${this.data.finalResultCount} final
33744
33856
  Reranking: ${this.data.rerankMode}
33745
33857
  `;
@@ -33797,7 +33909,7 @@ var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowle
33797
33909
 
33798
33910
  // src/model/nodes/BuildKnowledgeContextNode.ts
33799
33911
  var import_non_secure61 = require("nanoid/non-secure");
33800
- var import_ts_dedent52 = require("ts-dedent");
33912
+ var import_ts_dedent53 = require("ts-dedent");
33801
33913
  var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
33802
33914
  static create() {
33803
33915
  return {
@@ -33855,7 +33967,7 @@ var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
33855
33967
  ];
33856
33968
  }
33857
33969
  getBody() {
33858
- return import_ts_dedent52.dedent`
33970
+ return import_ts_dedent53.dedent`
33859
33971
  ${this.data.budget} ${this.data.budgetUnit}
33860
33972
  Up to ${this.data.maxItems} items
33861
33973
  Citations: [${this.data.citationPrefix || "K"}1]
@@ -33940,7 +34052,7 @@ var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "B
33940
34052
  var import_non_secure62 = require("nanoid/non-secure");
33941
34053
  var crypto = __toESM(require("crypto-js"), 1);
33942
34054
  var import_ts_pattern3 = require("ts-pattern");
33943
- var import_ts_dedent53 = require("ts-dedent");
34055
+ var import_ts_dedent54 = require("ts-dedent");
33944
34056
  var { SHA256, SHA512, MD5, SHA1 } = crypto;
33945
34057
  var HashNodeImpl = class extends NodeImpl {
33946
34058
  static create() {
@@ -33998,7 +34110,7 @@ var HashNodeImpl = class extends NodeImpl {
33998
34110
  }
33999
34111
  static getUIData() {
34000
34112
  return {
34001
- infoBoxBody: import_ts_dedent53.dedent`
34113
+ infoBoxBody: import_ts_dedent54.dedent`
34002
34114
  Computes a hash of the input value using the configured hash function.
34003
34115
  `,
34004
34116
  infoBoxTitle: "Hash Node",
@@ -34027,7 +34139,7 @@ var hashNode = nodeDefinition(HashNodeImpl, "Hash");
34027
34139
 
34028
34140
  // src/model/nodes/AbortGraphNode.ts
34029
34141
  var import_non_secure63 = require("nanoid/non-secure");
34030
- var import_ts_dedent54 = require("ts-dedent");
34142
+ var import_ts_dedent55 = require("ts-dedent");
34031
34143
  var AbortGraphNodeImpl = class extends NodeImpl {
34032
34144
  static create() {
34033
34145
  const chartNode = {
@@ -34084,13 +34196,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
34084
34196
  ];
34085
34197
  }
34086
34198
  getBody() {
34087
- return import_ts_dedent54.dedent`
34199
+ return import_ts_dedent55.dedent`
34088
34200
  ${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
34089
34201
  `;
34090
34202
  }
34091
34203
  static getUIData() {
34092
34204
  return {
34093
- infoBoxBody: import_ts_dedent54.dedent`
34205
+ infoBoxBody: import_ts_dedent55.dedent`
34094
34206
  Aborts the execution of the entire graph immediately.
34095
34207
 
34096
34208
  Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
@@ -34116,7 +34228,7 @@ var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
34116
34228
 
34117
34229
  // src/model/nodes/RaceInputsNode.ts
34118
34230
  var import_non_secure64 = require("nanoid/non-secure");
34119
- var import_ts_dedent55 = require("ts-dedent");
34231
+ var import_ts_dedent56 = require("ts-dedent");
34120
34232
  var RaceInputsNodeImpl = class extends NodeImpl {
34121
34233
  static create() {
34122
34234
  const chartNode = {
@@ -34158,7 +34270,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
34158
34270
  }
34159
34271
  static getUIData() {
34160
34272
  return {
34161
- infoBoxBody: import_ts_dedent55.dedent`
34273
+ infoBoxBody: import_ts_dedent56.dedent`
34162
34274
  Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
34163
34275
  `,
34164
34276
  infoBoxTitle: "Race Inputs Node",
@@ -34187,7 +34299,7 @@ var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
34187
34299
 
34188
34300
  // src/model/nodes/ToJsonNode.ts
34189
34301
  var import_non_secure65 = require("nanoid/non-secure");
34190
- var import_ts_dedent56 = require("ts-dedent");
34302
+ var import_ts_dedent57 = require("ts-dedent");
34191
34303
  var ToJsonNodeImpl = class extends NodeImpl {
34192
34304
  static create() {
34193
34305
  const chartNode = {
@@ -34238,7 +34350,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
34238
34350
  }
34239
34351
  static getUIData() {
34240
34352
  return {
34241
- infoBoxBody: import_ts_dedent56.dedent`
34353
+ infoBoxBody: import_ts_dedent57.dedent`
34242
34354
  Turns the input value into its JSON equivalent (stringifies the value).
34243
34355
  `,
34244
34356
  infoBoxTitle: "To JSON Node",
@@ -34261,7 +34373,7 @@ var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
34261
34373
 
34262
34374
  // src/model/nodes/JoinNode.ts
34263
34375
  var import_non_secure66 = require("nanoid/non-secure");
34264
- var import_ts_dedent57 = require("ts-dedent");
34376
+ var import_ts_dedent58 = require("ts-dedent");
34265
34377
  var JoinNodeImpl = class extends NodeImpl {
34266
34378
  static create = () => {
34267
34379
  const chartNode = {
@@ -34329,7 +34441,7 @@ var JoinNodeImpl = class extends NodeImpl {
34329
34441
  }
34330
34442
  static getUIData() {
34331
34443
  return {
34332
- infoBoxBody: import_ts_dedent57.dedent`
34444
+ infoBoxBody: import_ts_dedent58.dedent`
34333
34445
  Takes an array of strings, and joins them using the configured delimiter.
34334
34446
 
34335
34447
  Defaults to a newline.
@@ -34368,7 +34480,7 @@ var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
34368
34480
  // src/model/nodes/FilterNode.ts
34369
34481
  var import_non_secure67 = require("nanoid/non-secure");
34370
34482
  var import_lodash_es10 = require("lodash");
34371
- var import_ts_dedent58 = require("ts-dedent");
34483
+ var import_ts_dedent59 = require("ts-dedent");
34372
34484
  var FilterNodeImpl = class extends NodeImpl {
34373
34485
  static create() {
34374
34486
  const chartNode = {
@@ -34411,7 +34523,7 @@ var FilterNodeImpl = class extends NodeImpl {
34411
34523
  }
34412
34524
  static getUIData() {
34413
34525
  return {
34414
- infoBoxBody: import_ts_dedent58.dedent`
34526
+ infoBoxBody: import_ts_dedent59.dedent`
34415
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.
34416
34528
  `,
34417
34529
  infoBoxTitle: "Filter Node",
@@ -34437,10 +34549,10 @@ var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
34437
34549
 
34438
34550
  // src/model/nodes/JSFilterNode.ts
34439
34551
  var import_non_secure68 = require("nanoid/non-secure");
34440
- var import_ts_dedent60 = require("ts-dedent");
34552
+ var import_ts_dedent61 = require("ts-dedent");
34441
34553
 
34442
34554
  // src/model/nodes/jsListCallbackHelpers.ts
34443
- var import_ts_dedent59 = require("ts-dedent");
34555
+ var import_ts_dedent60 = require("ts-dedent");
34444
34556
  var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
34445
34557
  var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
34446
34558
  var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
@@ -34466,7 +34578,7 @@ function getJSListInterpolationContext(callbackBody) {
34466
34578
  });
34467
34579
  }
34468
34580
  function buildJSListRuntimePreamble(interpolationContext) {
34469
- return import_ts_dedent59.dedent`
34581
+ return import_ts_dedent60.dedent`
34470
34582
  const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
34471
34583
  ${buildJsValueInputClonePreamble({
34472
34584
  cacheIdentifier: interpolationContext.cloneCacheIdentifier,
@@ -34511,7 +34623,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
34511
34623
  function buildJSFilterWrapper(callbackBody) {
34512
34624
  const interpolationContext = getJSListInterpolationContext(callbackBody);
34513
34625
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
34514
- return import_ts_dedent59.dedent`
34626
+ return import_ts_dedent60.dedent`
34515
34627
  ${buildJSListRuntimePreamble(interpolationContext)}
34516
34628
 
34517
34629
  if (!Array.isArray(array)) {
@@ -34547,7 +34659,7 @@ function buildJSFilterWrapper(callbackBody) {
34547
34659
  function buildJSMapWrapper(callbackBody) {
34548
34660
  const interpolationContext = getJSListInterpolationContext(callbackBody);
34549
34661
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
34550
- return import_ts_dedent59.dedent`
34662
+ return import_ts_dedent60.dedent`
34551
34663
  ${buildJSListRuntimePreamble(interpolationContext)}
34552
34664
 
34553
34665
  if (!Array.isArray(array)) {
@@ -34616,7 +34728,7 @@ function getJSListNodeBody(callbackBody) {
34616
34728
  const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
34617
34729
  return {
34618
34730
  type: "colorized",
34619
- text: import_ts_dedent59.dedent`
34731
+ text: import_ts_dedent60.dedent`
34620
34732
  ${JS_LIST_CALLBACK_SIGNATURE} => {
34621
34733
  ${indentLines(previewBody, " ")}
34622
34734
  }
@@ -34700,7 +34812,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
34700
34812
  }
34701
34813
  static getUIData() {
34702
34814
  return {
34703
- infoBoxBody: import_ts_dedent60.dedent`
34815
+ infoBoxBody: import_ts_dedent61.dedent`
34704
34816
  Filters an input array using the body of a JavaScript callback.
34705
34817
 
34706
34818
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -34729,7 +34841,7 @@ var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
34729
34841
 
34730
34842
  // src/model/nodes/JSMapNode.ts
34731
34843
  var import_non_secure69 = require("nanoid/non-secure");
34732
- var import_ts_dedent61 = require("ts-dedent");
34844
+ var import_ts_dedent62 = require("ts-dedent");
34733
34845
  var DEFAULT_CALLBACK_BODY2 = "return item;";
34734
34846
  var JSMapNodeImpl = class extends NodeImpl {
34735
34847
  static create() {
@@ -34768,7 +34880,7 @@ var JSMapNodeImpl = class extends NodeImpl {
34768
34880
  }
34769
34881
  static getUIData() {
34770
34882
  return {
34771
- infoBoxBody: import_ts_dedent61.dedent`
34883
+ infoBoxBody: import_ts_dedent62.dedent`
34772
34884
  Maps an input array using the body of a JavaScript callback.
34773
34885
 
34774
34886
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -34797,7 +34909,7 @@ var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
34797
34909
 
34798
34910
  // src/model/nodes/ObjectNode.ts
34799
34911
  var import_non_secure70 = require("nanoid/non-secure");
34800
- var import_ts_dedent62 = require("ts-dedent");
34912
+ var import_ts_dedent63 = require("ts-dedent");
34801
34913
  var DEFAULT_JSON_TEMPLATE = `{
34802
34914
  "key": "{{input}}"
34803
34915
  }`;
@@ -34895,7 +35007,7 @@ var ObjectNodeImpl = class extends NodeImpl {
34895
35007
  }
34896
35008
  static getUIData() {
34897
35009
  return {
34898
- infoBoxBody: import_ts_dedent62.dedent`
35010
+ infoBoxBody: import_ts_dedent63.dedent`
34899
35011
  Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
34900
35012
 
34901
35013
  Use double-quotes around the input values to escape them. String values are automatically escaped.
@@ -34977,7 +35089,7 @@ var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
34977
35089
 
34978
35090
  // src/model/nodes/BooleanNode.ts
34979
35091
  var import_non_secure71 = require("nanoid/non-secure");
34980
- var import_ts_dedent63 = require("ts-dedent");
35092
+ var import_ts_dedent64 = require("ts-dedent");
34981
35093
  var BooleanNodeImpl = class extends NodeImpl {
34982
35094
  static create() {
34983
35095
  const chartNode = {
@@ -35021,7 +35133,7 @@ var BooleanNodeImpl = class extends NodeImpl {
35021
35133
  }
35022
35134
  static getUIData() {
35023
35135
  return {
35024
- infoBoxBody: import_ts_dedent63.dedent`
35136
+ infoBoxBody: import_ts_dedent64.dedent`
35025
35137
  Outputs a boolean constant, or converts an input value into a boolean.
35026
35138
  `,
35027
35139
  infoBoxTitle: "Bool Node",
@@ -35045,7 +35157,7 @@ var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
35045
35157
  var import_non_secure72 = require("nanoid/non-secure");
35046
35158
  var import_lodash_es11 = require("lodash");
35047
35159
  var import_ts_pattern4 = require("ts-pattern");
35048
- var import_ts_dedent64 = require("ts-dedent");
35160
+ var import_ts_dedent65 = require("ts-dedent");
35049
35161
  var compareNodeComparisonFunctionOptions = [
35050
35162
  { label: "==", value: "==" },
35051
35163
  { label: "!=", value: "!=" },
@@ -35124,7 +35236,7 @@ var CompareNodeImpl = class extends NodeImpl {
35124
35236
  }
35125
35237
  static getUIData() {
35126
35238
  return {
35127
- infoBoxBody: import_ts_dedent64.dedent`
35239
+ infoBoxBody: import_ts_dedent65.dedent`
35128
35240
  Compares two values using the configured operator and outputs the result.
35129
35241
 
35130
35242
  If the data types of the values do not match, then the B value is converted to the type of the A value.
@@ -35167,7 +35279,7 @@ var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
35167
35279
  // src/model/nodes/EvaluateNode.ts
35168
35280
  var import_non_secure73 = require("nanoid/non-secure");
35169
35281
  var import_ts_pattern5 = require("ts-pattern");
35170
- var import_ts_dedent65 = require("ts-dedent");
35282
+ var import_ts_dedent66 = require("ts-dedent");
35171
35283
  var unaryOperation = ["abs", "negate"];
35172
35284
  var isUnaryOp = (operation) => unaryOperation.includes(operation);
35173
35285
  var EvaluateNodeImpl = class extends NodeImpl {
@@ -35253,7 +35365,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
35253
35365
  }
35254
35366
  static getUIData() {
35255
35367
  return {
35256
- infoBoxBody: import_ts_dedent65.dedent`
35368
+ infoBoxBody: import_ts_dedent66.dedent`
35257
35369
  Evaluates the configured mathematical operation on the input values and outputs the result.
35258
35370
 
35259
35371
  For more complex operations, you should use the \`Code\` node.
@@ -35290,7 +35402,7 @@ var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
35290
35402
 
35291
35403
  // src/model/nodes/NumberNode.ts
35292
35404
  var import_non_secure74 = require("nanoid/non-secure");
35293
- var import_ts_dedent66 = require("ts-dedent");
35405
+ var import_ts_dedent67 = require("ts-dedent");
35294
35406
  var NumberNodeImpl = class extends NodeImpl {
35295
35407
  static create() {
35296
35408
  const chartNode = {
@@ -35340,7 +35452,7 @@ var NumberNodeImpl = class extends NodeImpl {
35340
35452
  }
35341
35453
  static getUIData() {
35342
35454
  return {
35343
- infoBoxBody: import_ts_dedent66.dedent`
35455
+ infoBoxBody: import_ts_dedent67.dedent`
35344
35456
  Outputs a number constant, or converts an input value into a number.
35345
35457
 
35346
35458
  Can be configured to round the number to a certain number of decimal places.
@@ -35368,7 +35480,7 @@ var numberNode = nodeDefinition(NumberNodeImpl, "Number");
35368
35480
 
35369
35481
  // src/model/nodes/RandomNumberNode.ts
35370
35482
  var import_non_secure75 = require("nanoid/non-secure");
35371
- var import_ts_dedent67 = require("ts-dedent");
35483
+ var import_ts_dedent68 = require("ts-dedent");
35372
35484
  var randomNumberTypeOptions = [
35373
35485
  { value: false, label: "Float" },
35374
35486
  { value: true, label: "Integer" }
@@ -35436,7 +35548,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
35436
35548
  ];
35437
35549
  }
35438
35550
  getBody() {
35439
- return import_ts_dedent67.dedent`
35551
+ return import_ts_dedent68.dedent`
35440
35552
  Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
35441
35553
  Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
35442
35554
  ${this.data.integers ? "Integers" : "Floats"}
@@ -35445,7 +35557,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
35445
35557
  }
35446
35558
  static getUIData() {
35447
35559
  return {
35448
- infoBoxBody: import_ts_dedent67.dedent`
35560
+ infoBoxBody: import_ts_dedent68.dedent`
35449
35561
  Outputs a random number between the configured min and max values.
35450
35562
 
35451
35563
  Can be configured to output only integers, and whether the max value is inclusive or exclusive.
@@ -35478,7 +35590,7 @@ var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
35478
35590
  // src/model/nodes/ShuffleNode.ts
35479
35591
  var import_non_secure76 = require("nanoid/non-secure");
35480
35592
  var import_lodash_es12 = require("lodash");
35481
- var import_ts_dedent68 = require("ts-dedent");
35593
+ var import_ts_dedent69 = require("ts-dedent");
35482
35594
  var ShuffleNodeImpl = class extends NodeImpl {
35483
35595
  static create() {
35484
35596
  const chartNode = {
@@ -35514,7 +35626,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
35514
35626
  }
35515
35627
  static getUIData() {
35516
35628
  return {
35517
- infoBoxBody: import_ts_dedent68.dedent`
35629
+ infoBoxBody: import_ts_dedent69.dedent`
35518
35630
  Shuffles the input array. Outputs the shuffled array.
35519
35631
  `,
35520
35632
  infoBoxTitle: "Shuffle Node",
@@ -35539,7 +35651,7 @@ var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
35539
35651
 
35540
35652
  // src/model/nodes/CommentNode.ts
35541
35653
  var import_non_secure77 = require("nanoid/non-secure");
35542
- var import_ts_dedent69 = require("ts-dedent");
35654
+ var import_ts_dedent70 = require("ts-dedent");
35543
35655
  var CommentNodeImpl = class extends NodeImpl {
35544
35656
  static create() {
35545
35657
  const chartNode = {
@@ -35591,7 +35703,7 @@ var CommentNodeImpl = class extends NodeImpl {
35591
35703
  }
35592
35704
  static getUIData() {
35593
35705
  return {
35594
- infoBoxBody: import_ts_dedent69.dedent`
35706
+ infoBoxBody: import_ts_dedent70.dedent`
35595
35707
  A comment node is a node that does nothing. It is useful for adding notes to a graph.
35596
35708
  `,
35597
35709
  infoBoxTitle: "Comment Node",
@@ -36374,7 +36486,7 @@ var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
36374
36486
 
36375
36487
  // src/model/nodes/DelayNode.ts
36376
36488
  var import_non_secure81 = require("nanoid/non-secure");
36377
- var import_ts_dedent70 = require("ts-dedent");
36489
+ var import_ts_dedent71 = require("ts-dedent");
36378
36490
  var DelayNodeImpl = class extends NodeImpl {
36379
36491
  static create() {
36380
36492
  const chartNode = {
@@ -36425,7 +36537,7 @@ var DelayNodeImpl = class extends NodeImpl {
36425
36537
  }
36426
36538
  static getUIData() {
36427
36539
  return {
36428
- infoBoxBody: import_ts_dedent70.dedent`
36540
+ infoBoxBody: import_ts_dedent71.dedent`
36429
36541
  Delays the execution and then passes the input value to the output without any modifications.
36430
36542
  `,
36431
36543
  infoBoxTitle: "Delay Node",
@@ -36463,7 +36575,7 @@ var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
36463
36575
 
36464
36576
  // src/model/nodes/AppendToDatasetNode.ts
36465
36577
  var import_non_secure82 = require("nanoid/non-secure");
36466
- var import_ts_dedent71 = require("ts-dedent");
36578
+ var import_ts_dedent72 = require("ts-dedent");
36467
36579
  var AppendToDatasetNodeImpl = class extends NodeImpl {
36468
36580
  static create() {
36469
36581
  return {
@@ -36523,7 +36635,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
36523
36635
  }
36524
36636
  static getUIData() {
36525
36637
  return {
36526
- infoBoxBody: import_ts_dedent71.dedent`
36638
+ infoBoxBody: import_ts_dedent72.dedent`
36527
36639
  Appends a row of data to the specified dataset.
36528
36640
  `,
36529
36641
  infoBoxTitle: "Append to Dataset Node",
@@ -37074,7 +37186,7 @@ var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row")
37074
37186
 
37075
37187
  // src/model/nodes/SliceNode.ts
37076
37188
  var import_non_secure83 = require("nanoid/non-secure");
37077
- var import_ts_dedent72 = require("ts-dedent");
37189
+ var import_ts_dedent73 = require("ts-dedent");
37078
37190
  var SliceNodeImpl = class extends NodeImpl {
37079
37191
  static create() {
37080
37192
  const chartNode = {
@@ -37133,14 +37245,14 @@ var SliceNodeImpl = class extends NodeImpl {
37133
37245
  ];
37134
37246
  }
37135
37247
  getBody() {
37136
- return import_ts_dedent72.dedent`
37248
+ return import_ts_dedent73.dedent`
37137
37249
  Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
37138
37250
  Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
37139
37251
  `;
37140
37252
  }
37141
37253
  static getUIData() {
37142
37254
  return {
37143
- infoBoxBody: import_ts_dedent72.dedent`
37255
+ infoBoxBody: import_ts_dedent73.dedent`
37144
37256
  Slices an array from the start index for the count number of elements.
37145
37257
 
37146
37258
  Useful for extracting a portion of an array.
@@ -37167,7 +37279,7 @@ var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
37167
37279
 
37168
37280
  // src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
37169
37281
  var import_non_secure84 = require("nanoid/non-secure");
37170
- var import_ts_dedent73 = require("ts-dedent");
37282
+ var import_ts_dedent74 = require("ts-dedent");
37171
37283
  var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
37172
37284
  static create() {
37173
37285
  const chartNode = {
@@ -37214,7 +37326,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
37214
37326
  }
37215
37327
  static getUIData() {
37216
37328
  return {
37217
- infoBoxBody: import_ts_dedent73.dedent`
37329
+ infoBoxBody: import_ts_dedent74.dedent`
37218
37330
  Extracts the code blocks in the input Markdown text.
37219
37331
 
37220
37332
  Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
@@ -37546,7 +37658,7 @@ var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
37546
37658
 
37547
37659
  // src/model/nodes/DestructureNode.ts
37548
37660
  var import_non_secure87 = require("nanoid/non-secure");
37549
- var import_ts_dedent74 = require("ts-dedent");
37661
+ var import_ts_dedent75 = require("ts-dedent");
37550
37662
  var DestructureNodeImpl = class extends NodeImpl {
37551
37663
  static create() {
37552
37664
  const chartNode = {
@@ -37614,7 +37726,7 @@ var DestructureNodeImpl = class extends NodeImpl {
37614
37726
  }
37615
37727
  static getUIData() {
37616
37728
  return {
37617
- infoBoxBody: import_ts_dedent74.dedent`
37729
+ infoBoxBody: import_ts_dedent75.dedent`
37618
37730
  Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
37619
37731
  `,
37620
37732
  infoBoxTitle: "Destructure Node",
@@ -37649,7 +37761,7 @@ var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
37649
37761
 
37650
37762
  // src/model/nodes/ReplaceDatasetNode.ts
37651
37763
  var import_non_secure88 = require("nanoid/non-secure");
37652
- var import_ts_dedent75 = require("ts-dedent");
37764
+ var import_ts_dedent76 = require("ts-dedent");
37653
37765
  var ReplaceDatasetNodeImpl = class extends NodeImpl {
37654
37766
  static create() {
37655
37767
  return {
@@ -37692,7 +37804,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
37692
37804
  }
37693
37805
  static getUIData() {
37694
37806
  return {
37695
- infoBoxBody: import_ts_dedent75.dedent`
37807
+ infoBoxBody: import_ts_dedent76.dedent`
37696
37808
  Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
37697
37809
  `,
37698
37810
  infoBoxTitle: "Replace Dataset Node",
@@ -37825,7 +37937,7 @@ var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
37825
37937
 
37826
37938
  // src/model/nodes/GraphReferenceNode.ts
37827
37939
  var import_non_secure89 = require("nanoid/non-secure");
37828
- var import_ts_dedent76 = require("ts-dedent");
37940
+ var import_ts_dedent77 = require("ts-dedent");
37829
37941
  var GraphReferenceNodeImpl = class extends NodeImpl {
37830
37942
  static create() {
37831
37943
  const chartNode = {
@@ -37880,7 +37992,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
37880
37992
  }
37881
37993
  static getUIData() {
37882
37994
  return {
37883
- infoBoxBody: import_ts_dedent76.dedent`
37995
+ infoBoxBody: import_ts_dedent77.dedent`
37884
37996
  Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
37885
37997
  `,
37886
37998
  infoBoxTitle: "Graph Reference Node",
@@ -37947,7 +38059,7 @@ var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference
37947
38059
 
37948
38060
  // src/model/nodes/CallGraphNode.ts
37949
38061
  var import_non_secure90 = require("nanoid/non-secure");
37950
- var import_ts_dedent77 = require("ts-dedent");
38062
+ var import_ts_dedent78 = require("ts-dedent");
37951
38063
 
37952
38064
  // src/api/looseDataValue.ts
37953
38065
  var import_lodash_es14 = require("lodash");
@@ -38023,7 +38135,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
38023
38135
  }
38024
38136
  static getUIData() {
38025
38137
  return {
38026
- infoBoxBody: import_ts_dedent77.dedent`
38138
+ infoBoxBody: import_ts_dedent78.dedent`
38027
38139
  Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
38028
38140
  `,
38029
38141
  infoBoxTitle: "Call Graph Node",
@@ -38095,7 +38207,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
38095
38207
 
38096
38208
  // src/model/nodes/DelegateFunctionCallNode.ts
38097
38209
  var import_nanoid = require("nanoid");
38098
- var import_ts_dedent78 = require("ts-dedent");
38210
+ var import_ts_dedent79 = require("ts-dedent");
38099
38211
  var DelegateFunctionCallNodeImpl = class extends NodeImpl {
38100
38212
  static create() {
38101
38213
  const chartNode = {
@@ -38178,7 +38290,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
38178
38290
  }
38179
38291
  static getUIData() {
38180
38292
  return {
38181
- infoBoxBody: import_ts_dedent78.dedent`
38293
+ infoBoxBody: import_ts_dedent79.dedent`
38182
38294
  Handles a tool call by delegating it to a different subgraph depending on the tool call.
38183
38295
  `,
38184
38296
  infoBoxTitle: "Delegate Tool Call Node",
@@ -38494,7 +38606,7 @@ var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
38494
38606
 
38495
38607
  // src/model/nodes/ChatLoopNode.ts
38496
38608
  var import_non_secure93 = require("nanoid/non-secure");
38497
- var import_ts_dedent79 = require("ts-dedent");
38609
+ var import_ts_dedent80 = require("ts-dedent");
38498
38610
  var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
38499
38611
  var ChatLoopNodeImpl = class extends NodeImpl {
38500
38612
  static create() {
@@ -38534,7 +38646,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
38534
38646
  }
38535
38647
  static getUIData() {
38536
38648
  return {
38537
- infoBoxBody: import_ts_dedent79.dedent`
38649
+ infoBoxBody: import_ts_dedent80.dedent`
38538
38650
  Creates an interactive chat loop with an AI model. The node will:
38539
38651
  1. Send the initial prompt to the AI
38540
38652
  2. Show the AI's response and prompt for user input
@@ -38635,7 +38747,7 @@ var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
38635
38747
 
38636
38748
  // src/model/nodes/ReadAllFilesNode.ts
38637
38749
  var import_non_secure94 = require("nanoid/non-secure");
38638
- var import_ts_dedent80 = require("ts-dedent");
38750
+ var import_ts_dedent81 = require("ts-dedent");
38639
38751
  var ReadAllFilesNodeImpl = class extends NodeImpl {
38640
38752
  static create() {
38641
38753
  return {
@@ -38750,7 +38862,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
38750
38862
  ];
38751
38863
  }
38752
38864
  getBody() {
38753
- return import_ts_dedent80.dedent`
38865
+ return import_ts_dedent81.dedent`
38754
38866
  ${this.data.asBinary ? "Read as Binary" : "Read as Text"}
38755
38867
  Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
38756
38868
  Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
@@ -38759,7 +38871,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
38759
38871
  }
38760
38872
  static getUIData() {
38761
38873
  return {
38762
- infoBoxBody: import_ts_dedent80.dedent`
38874
+ infoBoxBody: import_ts_dedent81.dedent`
38763
38875
  Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
38764
38876
  Each object has a 'path' (string) and 'content' (string or binary) property.
38765
38877
  `,
@@ -38833,7 +38945,7 @@ var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
38833
38945
 
38834
38946
  // src/model/nodes/ToMarkdownTableNode.ts
38835
38947
  var import_non_secure95 = require("nanoid/non-secure");
38836
- var import_ts_dedent81 = require("ts-dedent");
38948
+ var import_ts_dedent82 = require("ts-dedent");
38837
38949
  var ToMarkdownTableNodeImpl = class extends NodeImpl {
38838
38950
  static create() {
38839
38951
  const chartNode = {
@@ -38893,7 +39005,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
38893
39005
  }
38894
39006
  static getUIData() {
38895
39007
  return {
38896
- infoBoxBody: import_ts_dedent81.dedent`
39008
+ infoBoxBody: import_ts_dedent82.dedent`
38897
39009
  Converts an array of objects into a markdown table format.
38898
39010
  Input should be an array of objects with consistent keys.
38899
39011
  `,
@@ -38945,7 +39057,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
38945
39057
 
38946
39058
  // src/model/nodes/CronNode.ts
38947
39059
  var import_nanoid2 = require("nanoid");
38948
- var import_ts_dedent82 = require("ts-dedent");
39060
+ var import_ts_dedent83 = require("ts-dedent");
38949
39061
  var cronParser = __toESM(require("cron-parser"), 1);
38950
39062
  var CronNodeImpl = class extends NodeImpl {
38951
39063
  static create() {
@@ -39015,7 +39127,7 @@ var CronNodeImpl = class extends NodeImpl {
39015
39127
  }
39016
39128
  static getUIData() {
39017
39129
  return {
39018
- infoBoxBody: import_ts_dedent82.dedent`
39130
+ infoBoxBody: import_ts_dedent83.dedent`
39019
39131
  Executes a subgraph on a schedule. Supports:
39020
39132
  - Natural language (e.g., "every 5 minutes", "daily at 3pm")
39021
39133
  - Cron expressions (e.g., "0 * * * *")
@@ -39055,7 +39167,7 @@ var CronNodeImpl = class extends NodeImpl {
39055
39167
  type: "string",
39056
39168
  dataKey: "schedule",
39057
39169
  label: "Schedule",
39058
- helperMessage: import_ts_dedent82.dedent`
39170
+ helperMessage: import_ts_dedent83.dedent`
39059
39171
  Examples:
39060
39172
  Cron: "*/5 * * * *", "0 15 * * *"
39061
39173
  Interval: "5 minutes", "1 hour", "7 days"
@@ -39187,7 +39299,7 @@ var cronNode = nodeDefinition(CronNodeImpl, "Cron");
39187
39299
 
39188
39300
  // src/model/nodes/ToTreeNode.ts
39189
39301
  var import_non_secure96 = require("nanoid/non-secure");
39190
- var import_ts_dedent83 = require("ts-dedent");
39302
+ var import_ts_dedent84 = require("ts-dedent");
39191
39303
  var import_lodash_es15 = require("lodash");
39192
39304
  var ToTreeNodeImpl = class extends NodeImpl {
39193
39305
  static create() {
@@ -39249,7 +39361,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
39249
39361
  ];
39250
39362
  }
39251
39363
  getBody() {
39252
- return import_ts_dedent83.dedent`
39364
+ return import_ts_dedent84.dedent`
39253
39365
  Format: ${this.data.format}
39254
39366
  Children: ${this.data.childrenProperty}
39255
39367
  Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
@@ -39257,7 +39369,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
39257
39369
  }
39258
39370
  static getUIData() {
39259
39371
  return {
39260
- infoBoxBody: import_ts_dedent83.dedent`
39372
+ infoBoxBody: import_ts_dedent84.dedent`
39261
39373
  Converts an array of objects into a tree structure and renders it as text.
39262
39374
 
39263
39375
  The format field supports interpolation using {{property}} syntax to determine
@@ -39316,7 +39428,7 @@ var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
39316
39428
 
39317
39429
  // src/model/nodes/LoopUntilNode.ts
39318
39430
  var import_non_secure97 = require("nanoid/non-secure");
39319
- var import_ts_dedent84 = require("ts-dedent");
39431
+ var import_ts_dedent85 = require("ts-dedent");
39320
39432
  var LoopUntilNodeImpl = class extends NodeImpl {
39321
39433
  static create() {
39322
39434
  const chartNode = {
@@ -39418,7 +39530,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
39418
39530
  }
39419
39531
  static getUIData() {
39420
39532
  return {
39421
- infoBoxBody: import_ts_dedent84.dedent`
39533
+ infoBoxBody: import_ts_dedent85.dedent`
39422
39534
  Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
39423
39535
  the inputs for the next iteration. Supports different stopping conditions and optional
39424
39536
  maximum iterations.
@@ -39832,7 +39944,7 @@ var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
39832
39944
 
39833
39945
  // src/model/nodes/MCPToolCallNode.ts
39834
39946
  var import_non_secure98 = require("nanoid/non-secure");
39835
- var import_ts_dedent85 = require("ts-dedent");
39947
+ var import_ts_dedent86 = require("ts-dedent");
39836
39948
  var MCPToolCallNodeImpl = class extends NodeImpl {
39837
39949
  static create() {
39838
39950
  const chartNode = {
@@ -39851,7 +39963,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
39851
39963
  serverUrl: "http://localhost:8080/mcp",
39852
39964
  serverId: "",
39853
39965
  toolName: "",
39854
- toolArguments: import_ts_dedent85.dedent`
39966
+ toolArguments: import_ts_dedent86.dedent`
39855
39967
  {
39856
39968
  "key": "value"
39857
39969
  }`,
@@ -39943,7 +40055,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
39943
40055
  }
39944
40056
  static getUIData() {
39945
40057
  return {
39946
- infoBoxBody: import_ts_dedent85.dedent`
40058
+ infoBoxBody: import_ts_dedent86.dedent`
39947
40059
  Connects to an MCP (Model Context Protocol) server and gets a tool call response.
39948
40060
  `,
39949
40061
  infoBoxTitle: "MCP Tool Call Node",
@@ -40161,7 +40273,7 @@ var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
40161
40273
 
40162
40274
  // src/model/nodes/ReferencedGraphAliasNode.ts
40163
40275
  var import_non_secure100 = require("nanoid/non-secure");
40164
- var import_ts_dedent86 = require("ts-dedent");
40276
+ var import_ts_dedent87 = require("ts-dedent");
40165
40277
  var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
40166
40278
  static create() {
40167
40279
  const chartNode = {
@@ -40252,7 +40364,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
40252
40364
  }
40253
40365
  static getUIData() {
40254
40366
  return {
40255
- infoBoxBody: import_ts_dedent86.dedent`
40367
+ infoBoxBody: import_ts_dedent87.dedent`
40256
40368
  References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
40257
40369
  `,
40258
40370
  infoBoxTitle: "Referenced Graph Alias Node",
@@ -40369,7 +40481,7 @@ var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked
40369
40481
 
40370
40482
  // src/model/Nodes.ts
40371
40483
  var registerBuiltInNodes = (registry) => {
40372
- return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(llmProfileNode).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(codeNewNode).register(expressionNode).register(matchNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(reportProgressNode).register(contextNode).register(coalesceNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(setStoredValueNode).register(getStoredValueNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(knowledgeSourceNode).register(knowledgeDocumentNode).register(syncKnowledgeSourceNode).register(getKnowledgeSourceStatusNode).register(searchKnowledgeNode).register(buildKnowledgeContextNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode).register(nodePrefabInstanceNode);
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);
40373
40485
  };
40374
40486
  var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
40375
40487
  function resetGlobalRivetNodeRegistry() {
@@ -40536,8 +40648,8 @@ var OpenAIEmbeddingGenerator = class {
40536
40648
  registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
40537
40649
 
40538
40650
  // src/integrations/ManagedKnowledgeStore.ts
40539
- var import_crypto_js3 = __toESM(require("crypto-js"), 1);
40540
- var import_safe_stable_stringify6 = __toESM(require("safe-stable-stringify"), 1);
40651
+ var import_crypto_js4 = __toESM(require("crypto-js"), 1);
40652
+ var import_safe_stable_stringify7 = __toESM(require("safe-stable-stringify"), 1);
40541
40653
  var MANAGED_SCHEMA_VERSION = "1";
40542
40654
  var CHUNKER_VERSION = "1";
40543
40655
  var ManagedKnowledgeStore = class {
@@ -40839,14 +40951,14 @@ async function waitForPromiseOrAbort(promise, signal) {
40839
40951
  });
40840
40952
  }
40841
40953
  function createSourceVersion(documents, metadata, chunking) {
40842
- const canonical = (0, import_safe_stable_stringify6.default)({
40954
+ const canonical = (0, import_safe_stable_stringify7.default)({
40843
40955
  schemaVersion: MANAGED_SCHEMA_VERSION,
40844
40956
  chunkerVersion: CHUNKER_VERSION,
40845
40957
  documents,
40846
40958
  metadata: metadata ?? {},
40847
40959
  chunking
40848
40960
  });
40849
- const digest = import_crypto_js3.default.SHA256(canonical ?? "").toString(import_crypto_js3.default.enc.Hex);
40961
+ const digest = import_crypto_js4.default.SHA256(canonical ?? "").toString(import_crypto_js4.default.enc.Hex);
40850
40962
  return `ks${MANAGED_SCHEMA_VERSION}-${digest}`;
40851
40963
  }
40852
40964
  function normalizeChunkingOptions(options2) {
@@ -40866,7 +40978,7 @@ function normalizeChunkingOptions(options2) {
40866
40978
  return { unit, targetSize, overlap, minimumBoundarySize, includeTitle: (options2 == null ? void 0 : options2.includeTitle) !== false };
40867
40979
  }
40868
40980
  function createManifestCommitId() {
40869
- return import_crypto_js3.default.lib.WordArray.random(16).toString(import_crypto_js3.default.enc.Hex);
40981
+ return import_crypto_js4.default.lib.WordArray.random(16).toString(import_crypto_js4.default.enc.Hex);
40870
40982
  }
40871
40983
  async function chunkDocuments(documents, documentIds, version, options2, context) {
40872
40984
  const chunks = [];
@@ -41034,7 +41146,7 @@ function validatePositiveInteger(value, label, minimum, maximum) {
41034
41146
  }
41035
41147
  }
41036
41148
  function createShortHash(value) {
41037
- return import_crypto_js3.default.SHA256(value).toString(import_crypto_js3.default.enc.Hex).slice(0, 24);
41149
+ return import_crypto_js4.default.SHA256(value).toString(import_crypto_js4.default.enc.Hex).slice(0, 24);
41038
41150
  }
41039
41151
  function sameManifestActivation(actual, expected) {
41040
41152
  return (actual == null ? void 0 : actual.activeVersion) === expected.activeVersion && actual.commitId === expected.commitId;
@@ -41532,7 +41644,7 @@ function isSocketRecordingTerminalEvent(event) {
41532
41644
 
41533
41645
  // src/plugins/anthropic/nodes/ChatAnthropicNode.ts
41534
41646
  var import_non_secure103 = require("nanoid/non-secure");
41535
- var import_ts_dedent87 = require("ts-dedent");
41647
+ var import_ts_dedent88 = require("ts-dedent");
41536
41648
  var import_p_retry2 = __toESM(require("p-retry-4"), 1);
41537
41649
 
41538
41650
  // src/utils/assertNever.ts
@@ -41541,7 +41653,6 @@ function assertNever(x) {
41541
41653
  }
41542
41654
 
41543
41655
  // src/plugins/anthropic/nodes/ChatAnthropicNode.ts
41544
- var cache2 = /* @__PURE__ */ new Map();
41545
41656
  var ChatAnthropicNodeImpl = {
41546
41657
  create() {
41547
41658
  const chartNode = {
@@ -41697,7 +41808,7 @@ var ChatAnthropicNodeImpl = {
41697
41808
  getBody(data) {
41698
41809
  var _a;
41699
41810
  const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
41700
- return import_ts_dedent87.dedent`
41811
+ return import_ts_dedent88.dedent`
41701
41812
  ${modelName}
41702
41813
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
41703
41814
  Max Tokens: ${data.maxTokens}
@@ -41786,8 +41897,9 @@ var ChatAnthropicNodeImpl = {
41786
41897
  editors: [
41787
41898
  {
41788
41899
  type: "toggle",
41789
- label: "Cache (same inputs, same outputs)",
41790
- 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."
41791
41903
  },
41792
41904
  {
41793
41905
  type: "toggle",
@@ -41822,7 +41934,7 @@ var ChatAnthropicNodeImpl = {
41822
41934
  },
41823
41935
  getUIData() {
41824
41936
  return {
41825
- infoBoxBody: import_ts_dedent87.dedent`
41937
+ infoBoxBody: import_ts_dedent88.dedent`
41826
41938
  Legacy Anthropic chat node.
41827
41939
 
41828
41940
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -41891,6 +42003,10 @@ Assistant: ${content}`;
41891
42003
  ...context.settings.chatNodeHeaders,
41892
42004
  ...additionalHeaders
41893
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;
41894
42010
  try {
41895
42011
  return await (0, import_p_retry2.default)(
41896
42012
  async () => {
@@ -41913,19 +42029,17 @@ Assistant: ${content}`;
41913
42029
  messages,
41914
42030
  tools: tools ? tools.map((tool) => ({ name: tool.name, description: tool.description, input_schema: tool.parameters })) : void 0
41915
42031
  };
41916
- const cacheKey = JSON.stringify(useMessageApi ? messageOptions : completionOptions);
41917
- if (data.cache) {
41918
- const cached = cache2.get(cacheKey);
41919
- if (cached) {
41920
- (_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
41921
- return cached;
41922
- }
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;
41923
42041
  }
41924
42042
  const startTime = Date.now();
41925
- const apiKey = context.getPluginConfig("anthropicApiKey");
41926
- const defaultApiEndpoint = context.getPluginConfig("anthropicApiEndpoint") || "https://api.anthropic.com/v1";
41927
- const configuredEndpoint = getInputOrData(data, inputs, "endpoint");
41928
- const apiEndpoint = (configuredEndpoint == null ? void 0 : configuredEndpoint.trim()) ? configuredEndpoint : defaultApiEndpoint;
41929
42043
  if (useMessageApi) {
41930
42044
  const chunks = streamMessageApi({
41931
42045
  apiEndpoint,
@@ -42091,7 +42205,7 @@ Assistant: ${content}`;
42091
42205
  const duration = endTime - startTime;
42092
42206
  output["duration"] = { type: "number", value: duration };
42093
42207
  Object.freeze(output);
42094
- cache2.set(cacheKey, output);
42208
+ writeLegacyChatEditorCache(cache, output);
42095
42209
  return output;
42096
42210
  },
42097
42211
  {
@@ -42295,7 +42409,7 @@ var anthropic_default = anthropicPlugin;
42295
42409
 
42296
42410
  // src/plugins/autoevals/AutoEvalsNode.ts
42297
42411
  var import_non_secure104 = require("nanoid/non-secure");
42298
- var import_ts_dedent88 = require("ts-dedent");
42412
+ var import_ts_dedent89 = require("ts-dedent");
42299
42413
  var import_autoevals = require("autoevals");
42300
42414
  var import_ts_pattern7 = require("ts-pattern");
42301
42415
  var options = [
@@ -42429,7 +42543,7 @@ var AutoEvalsNodeImpl = {
42429
42543
  },
42430
42544
  getUIData() {
42431
42545
  return {
42432
- infoBoxBody: import_ts_dedent88.dedent`
42546
+ infoBoxBody: import_ts_dedent89.dedent`
42433
42547
  Evaluates the validity of a response using the autoevals library.
42434
42548
  `,
42435
42549
  infoBoxTitle: "Autoevals Node",
@@ -42512,7 +42626,7 @@ var autoevals_default = autoevalsPlugin;
42512
42626
 
42513
42627
  // src/plugins/assemblyAi/LemurQaNode.ts
42514
42628
  var import_non_secure105 = require("nanoid/non-secure");
42515
- var import_ts_dedent89 = require("ts-dedent");
42629
+ var import_ts_dedent90 = require("ts-dedent");
42516
42630
 
42517
42631
  // src/plugins/assemblyAi/lemurHelpers.ts
42518
42632
  var import_assemblyai = require("assemblyai");
@@ -42697,7 +42811,7 @@ var LemurQaNodeImpl = {
42697
42811
  },
42698
42812
  getUIData() {
42699
42813
  return {
42700
- infoBoxBody: import_ts_dedent89.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
42814
+ infoBoxBody: import_ts_dedent90.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
42701
42815
  infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
42702
42816
  contextMenuTitle: "LeMUR Q&A",
42703
42817
  group: ["AI", "AssemblyAI"]
@@ -42769,7 +42883,7 @@ var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
42769
42883
 
42770
42884
  // src/plugins/assemblyAi/TranscribeAudioNode.ts
42771
42885
  var import_non_secure106 = require("nanoid/non-secure");
42772
- var import_ts_dedent90 = require("ts-dedent");
42886
+ var import_ts_dedent91 = require("ts-dedent");
42773
42887
  var TranscribeAudioNodeImpl = {
42774
42888
  create() {
42775
42889
  const chartNode = {
@@ -42831,7 +42945,7 @@ var TranscribeAudioNodeImpl = {
42831
42945
  },
42832
42946
  getUIData() {
42833
42947
  return {
42834
- infoBoxBody: import_ts_dedent90.dedent`Use AssemblyAI to transcribe audio`,
42948
+ infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI to transcribe audio`,
42835
42949
  infoBoxTitle: "Transcribe Audio Node",
42836
42950
  contextMenuTitle: "Transcribe Audio",
42837
42951
  group: ["AI", "AssemblyAI"]
@@ -42890,7 +43004,7 @@ function getAdditionalParameters(data) {
42890
43004
 
42891
43005
  // src/plugins/assemblyAi/LemurSummaryNode.ts
42892
43006
  var import_non_secure107 = require("nanoid/non-secure");
42893
- var import_ts_dedent91 = require("ts-dedent");
43007
+ var import_ts_dedent92 = require("ts-dedent");
42894
43008
  var import_assemblyai3 = require("assemblyai");
42895
43009
  var LemurSummaryNodeImpl = {
42896
43010
  create() {
@@ -42943,7 +43057,7 @@ var LemurSummaryNodeImpl = {
42943
43057
  },
42944
43058
  getUIData() {
42945
43059
  return {
42946
- infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
43060
+ infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
42947
43061
  infoBoxTitle: "Use AssemblyAI LeMUR Summary",
42948
43062
  contextMenuTitle: "LeMUR Summary",
42949
43063
  group: ["AI", "AssemblyAI"]
@@ -42968,7 +43082,7 @@ var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary
42968
43082
 
42969
43083
  // src/plugins/assemblyAi/LemurTaskNode.ts
42970
43084
  var import_non_secure108 = require("nanoid/non-secure");
42971
- var import_ts_dedent92 = require("ts-dedent");
43085
+ var import_ts_dedent93 = require("ts-dedent");
42972
43086
  var import_assemblyai4 = require("assemblyai");
42973
43087
  var LemurTaskNodeImpl = {
42974
43088
  create() {
@@ -43021,7 +43135,7 @@ var LemurTaskNodeImpl = {
43021
43135
  },
43022
43136
  getUIData() {
43023
43137
  return {
43024
- infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
43138
+ infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
43025
43139
  infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
43026
43140
  contextMenuTitle: "LeMUR Custom Task",
43027
43141
  group: ["AI", "AssemblyAI"]
@@ -43047,7 +43161,7 @@ var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
43047
43161
 
43048
43162
  // src/plugins/assemblyAi/LemurActionItemsNode.ts
43049
43163
  var import_non_secure109 = require("nanoid/non-secure");
43050
- var import_ts_dedent93 = require("ts-dedent");
43164
+ var import_ts_dedent94 = require("ts-dedent");
43051
43165
  var LemurActionItemsNodeImpl = {
43052
43166
  create() {
43053
43167
  const chartNode = {
@@ -43099,7 +43213,7 @@ var LemurActionItemsNodeImpl = {
43099
43213
  },
43100
43214
  getUIData() {
43101
43215
  return {
43102
- infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
43216
+ infoBoxBody: import_ts_dedent94.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
43103
43217
  infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
43104
43218
  contextMenuTitle: "LeMUR Action Items",
43105
43219
  group: ["AI", "AssemblyAI"]
@@ -43388,7 +43502,7 @@ var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (H
43388
43502
  // src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
43389
43503
  var import_non_secure111 = require("nanoid/non-secure");
43390
43504
  var import_inference2 = require("@huggingface/inference");
43391
- var import_ts_dedent94 = require("ts-dedent");
43505
+ var import_ts_dedent95 = require("ts-dedent");
43392
43506
  var TextToImageHuggingFaceNodeImpl = {
43393
43507
  create() {
43394
43508
  return {
@@ -43533,7 +43647,7 @@ var TextToImageHuggingFaceNodeImpl = {
43533
43647
  ];
43534
43648
  },
43535
43649
  getBody(data) {
43536
- return import_ts_dedent94.dedent`
43650
+ return import_ts_dedent95.dedent`
43537
43651
  Model: ${data.useModelInput ? "(Using Input)" : data.model}
43538
43652
  `;
43539
43653
  },
@@ -43601,7 +43715,7 @@ var huggingFacePlugin = {
43601
43715
  };
43602
43716
 
43603
43717
  // src/plugins/pinecone/PineconeVectorDatabase.ts
43604
- var CryptoJS4 = __toESM(require("crypto-js"), 1);
43718
+ var CryptoJS5 = __toESM(require("crypto-js"), 1);
43605
43719
  var PineconeVectorDatabase = class {
43606
43720
  #apiKey;
43607
43721
  constructor(settings) {
@@ -43611,7 +43725,7 @@ var PineconeVectorDatabase = class {
43611
43725
  async store(collection, vector, data, { id }) {
43612
43726
  const collectionDetails = getCollection(coerceType(collection, "string"));
43613
43727
  if (!id) {
43614
- id = CryptoJS4.SHA256(vector.value.join(",")).toString(CryptoJS4.enc.Hex);
43728
+ id = CryptoJS5.SHA256(vector.value.join(",")).toString(CryptoJS5.enc.Hex);
43615
43729
  }
43616
43730
  let metadata = {};
43617
43731
  if (data.type === "object") {
@@ -43687,7 +43801,7 @@ function getCollection(collectionString) {
43687
43801
  }
43688
43802
 
43689
43803
  // src/plugins/pinecone/PineconeKnowledgeStore.ts
43690
- var import_crypto_js4 = __toESM(require("crypto-js"), 1);
43804
+ var import_crypto_js5 = __toESM(require("crypto-js"), 1);
43691
43805
  var DEFAULT_API_VERSION = "2026-04";
43692
43806
  var MANIFEST_RECORD_ID = "__rivet_manifest__";
43693
43807
  var RESERVED_PREFIX = "rivet_";
@@ -43951,7 +44065,7 @@ var PineconeKnowledgeStoreDriver = class {
43951
44065
  }
43952
44066
  #namespace(sourceId) {
43953
44067
  const readableSourceId = sourceId.replace(/[^a-zA-Z0-9._-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, 120) || "source";
43954
- const sourceHash = import_crypto_js4.default.SHA256(sourceId).toString(import_crypto_js4.default.enc.Hex).slice(0, 24);
44068
+ const sourceHash = import_crypto_js5.default.SHA256(sourceId).toString(import_crypto_js5.default.enc.Hex).slice(0, 24);
43955
44069
  const safeSourceId = `${readableSourceId}--${sourceHash}`;
43956
44070
  const namespace = this.config.namespaceTemplate.replaceAll("{sourceId}", safeSourceId).trim();
43957
44071
  if (!namespace) throw new Error("Pinecone Namespace Template produced an empty namespace.");
@@ -47074,7 +47188,7 @@ var openAIPlugin = {
47074
47188
 
47075
47189
  // src/plugins/google/nodes/ChatGoogleNode.ts
47076
47190
  var import_non_secure112 = require("nanoid/non-secure");
47077
- var import_ts_dedent95 = require("ts-dedent");
47191
+ var import_ts_dedent96 = require("ts-dedent");
47078
47192
  var import_p_retry3 = __toESM(require("p-retry-4"), 1);
47079
47193
  var import_ts_pattern8 = require("ts-pattern");
47080
47194
  var import_genai2 = require("@google/genai");
@@ -47096,7 +47210,6 @@ function toGoogleSchemaType(type) {
47096
47210
  return void 0;
47097
47211
  }
47098
47212
  }
47099
- var cache3 = /* @__PURE__ */ new Map();
47100
47213
  var ChatGoogleNodeImpl = {
47101
47214
  create() {
47102
47215
  const chartNode = {
@@ -47237,7 +47350,7 @@ var ChatGoogleNodeImpl = {
47237
47350
  },
47238
47351
  getBody(data) {
47239
47352
  var _a;
47240
- return import_ts_dedent95.dedent`
47353
+ return import_ts_dedent96.dedent`
47241
47354
  ${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
47242
47355
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
47243
47356
  Max Tokens: ${data.maxTokens}
@@ -47304,8 +47417,9 @@ var ChatGoogleNodeImpl = {
47304
47417
  },
47305
47418
  {
47306
47419
  type: "toggle",
47307
- label: "Cache (same inputs, same outputs)",
47308
- 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."
47309
47423
  },
47310
47424
  {
47311
47425
  type: "toggle",
@@ -47324,7 +47438,7 @@ var ChatGoogleNodeImpl = {
47324
47438
  },
47325
47439
  getUIData() {
47326
47440
  return {
47327
- infoBoxBody: import_ts_dedent95.dedent`
47441
+ infoBoxBody: import_ts_dedent96.dedent`
47328
47442
  Legacy Google chat node.
47329
47443
 
47330
47444
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -47503,13 +47617,20 @@ var ChatGoogleNodeImpl = {
47503
47617
  thinkingBudget,
47504
47618
  additionalHeaders: allAdditionalHeaders
47505
47619
  };
47506
- const cacheKey = JSON.stringify(options2);
47507
- if (data.cache) {
47508
- const cached = cache3.get(cacheKey);
47509
- if (cached) {
47510
- (_a = context.markResultAsEditorCacheHit) == null ? void 0 : _a.call(context);
47511
- return cached;
47512
- }
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;
47513
47634
  }
47514
47635
  const startTime = Date.now();
47515
47636
  let chunks;
@@ -47606,7 +47727,7 @@ var ChatGoogleNodeImpl = {
47606
47727
  const duration = endTime - startTime;
47607
47728
  output["duration"] = { type: "number", value: duration };
47608
47729
  Object.freeze(output);
47609
- cache3.set(cacheKey, output);
47730
+ writeLegacyChatEditorCache(cache, output);
47610
47731
  return output;
47611
47732
  },
47612
47733
  {
@@ -47618,13 +47739,18 @@ var ChatGoogleNodeImpl = {
47618
47739
  randomize: true,
47619
47740
  signal: context.signal,
47620
47741
  onFailedAttempt(err) {
47742
+ var _a;
47621
47743
  context.trace(`ChatGoogleNode failed, retrying: ${err.toString()}`);
47622
- const googleError = err;
47623
- if (googleError.status && googleError.status >= 400 && googleError.status < 500) {
47624
- if (googleError.status === 429) {
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) {
47625
47751
  context.trace("Google API rate limit exceeded, retrying...");
47626
47752
  } else {
47627
- throw new Error(`Google API error: ${googleError.status} ${googleError.message}`);
47753
+ throw new Error(`Google API error: ${status} ${message}`);
47628
47754
  }
47629
47755
  }
47630
47756
  if (context.signal.aborted) {
@@ -48238,6 +48364,7 @@ var Rivet = void 0;
48238
48364
  ChatV2ProviderTimeoutError,
48239
48365
  ChatV2ResponseValidationError,
48240
48366
  ChunkNodeImpl,
48367
+ CoalesceNewNodeImpl,
48241
48368
  CoalesceNodeImpl,
48242
48369
  CodeNewNodeImpl,
48243
48370
  CodeNodeImpl,
@@ -48361,6 +48488,7 @@ var Rivet = void 0;
48361
48488
  Rivet,
48362
48489
  RivetLLMProfileHealthPolicyError,
48363
48490
  RivetStoredValueController,
48491
+ STREAM_RESPONSE_HELPER_MESSAGE,
48364
48492
  SearchKnowledgeNodeImpl,
48365
48493
  SetGlobalNodeImpl,
48366
48494
  SetStoredValueNodeImpl,
@@ -48436,6 +48564,8 @@ var Rivet = void 0;
48436
48564
  cloneFrozenNodeOutputsByGraph,
48437
48565
  cloneRivetStoredValue,
48438
48566
  cloneRivetStoredValueRecord,
48567
+ coalesceLegacyDisplayName,
48568
+ coalesceNewNode,
48439
48569
  coalesceNode,
48440
48570
  codeNewNode,
48441
48571
  codeNode,