@valerypopoff/rivet2-core 2.0.1 → 2.0.3

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.
@@ -57,6 +57,7 @@ __export(src_exports, {
57
57
  DelayNodeImpl: () => DelayNodeImpl,
58
58
  DelegateFunctionCallNodeImpl: () => DelegateFunctionCallNodeImpl,
59
59
  DestructureNodeImpl: () => DestructureNodeImpl,
60
+ DidRunNodeImpl: () => DidRunNodeImpl,
60
61
  DocumentNodeImpl: () => DocumentNodeImpl,
61
62
  EXPRESSION_OUTPUT_PORT_ID: () => EXPRESSION_OUTPUT_PORT_ID,
62
63
  EvaluateNodeImpl: () => EvaluateNodeImpl,
@@ -201,6 +202,7 @@ __export(src_exports, {
201
202
  deserializeProject: () => deserializeProject,
202
203
  destructureNode: () => destructureNode,
203
204
  detectSerializationVersion: () => detectSerializationVersion,
205
+ didRunNode: () => didRunNode,
204
206
  documentNode: () => documentNode,
205
207
  doubleCheckProject: () => doubleCheckProject,
206
208
  emptyNodeGraph: () => emptyNodeGraph,
@@ -271,6 +273,7 @@ __export(src_exports, {
271
273
  isArrayDataType: () => isArrayDataType,
272
274
  isArrayDataValue: () => isArrayDataValue,
273
275
  isBuiltInInputDefinition: () => isBuiltInInputDefinition,
276
+ isChatV2StructuredResponseFormat: () => isChatV2StructuredResponseFormat,
274
277
  isDataTypeAccepted: () => isDataTypeAccepted,
275
278
  isDataTypeCompatible: () => isDataTypeCompatible,
276
279
  isFunctionDataType: () => isFunctionDataType,
@@ -301,6 +304,7 @@ __export(src_exports, {
301
304
  mcpDiscoveryNode: () => mcpDiscoveryNode,
302
305
  mcpGetPromptNode: () => mcpGetPromptNode,
303
306
  mcpToolCallNode: () => mcpToolCallNode,
307
+ mergeCustomProviderResponseFormatOptions: () => mergeCustomProviderResponseFormatOptions,
304
308
  newId: () => newId,
305
309
  nodeDefinition: () => nodeDefinition,
306
310
  numberNode: () => numberNode,
@@ -408,6 +412,7 @@ __export(exports_exports, {
408
412
  DelayNodeImpl: () => DelayNodeImpl,
409
413
  DelegateFunctionCallNodeImpl: () => DelegateFunctionCallNodeImpl,
410
414
  DestructureNodeImpl: () => DestructureNodeImpl,
415
+ DidRunNodeImpl: () => DidRunNodeImpl,
411
416
  DocumentNodeImpl: () => DocumentNodeImpl,
412
417
  EXPRESSION_OUTPUT_PORT_ID: () => EXPRESSION_OUTPUT_PORT_ID,
413
418
  EvaluateNodeImpl: () => EvaluateNodeImpl,
@@ -551,6 +556,7 @@ __export(exports_exports, {
551
556
  deserializeProject: () => deserializeProject,
552
557
  destructureNode: () => destructureNode,
553
558
  detectSerializationVersion: () => detectSerializationVersion,
559
+ didRunNode: () => didRunNode,
554
560
  documentNode: () => documentNode,
555
561
  doubleCheckProject: () => doubleCheckProject,
556
562
  emptyNodeGraph: () => emptyNodeGraph,
@@ -621,6 +627,7 @@ __export(exports_exports, {
621
627
  isArrayDataType: () => isArrayDataType,
622
628
  isArrayDataValue: () => isArrayDataValue,
623
629
  isBuiltInInputDefinition: () => isBuiltInInputDefinition,
630
+ isChatV2StructuredResponseFormat: () => isChatV2StructuredResponseFormat,
624
631
  isDataTypeAccepted: () => isDataTypeAccepted,
625
632
  isDataTypeCompatible: () => isDataTypeCompatible,
626
633
  isFunctionDataType: () => isFunctionDataType,
@@ -651,6 +658,7 @@ __export(exports_exports, {
651
658
  mcpDiscoveryNode: () => mcpDiscoveryNode,
652
659
  mcpGetPromptNode: () => mcpGetPromptNode,
653
660
  mcpToolCallNode: () => mcpToolCallNode,
661
+ mergeCustomProviderResponseFormatOptions: () => mergeCustomProviderResponseFormatOptions,
654
662
  newId: () => newId,
655
663
  nodeDefinition: () => nodeDefinition,
656
664
  numberNode: () => numberNode,
@@ -2840,11 +2848,11 @@ function hasErroredInputNode(state, node, inputNodes, onTrace) {
2840
2848
  }
2841
2849
  return false;
2842
2850
  }
2843
- function areRequiredInputsConnected(state, node) {
2851
+ function getMissingRequiredInputs(state, node) {
2844
2852
  const connections = state.connections[node.id] ?? [];
2845
- return state.definitions[node.id].inputs.every((input) => {
2853
+ return state.definitions[node.id].inputs.filter((input) => {
2846
2854
  const connectionToInput = connections.find((conn) => conn.inputId === input.id && conn.inputNodeId === node.id);
2847
- return connectionToInput || !input.required;
2855
+ return input.required && !connectionToInput;
2848
2856
  });
2849
2857
  }
2850
2858
  function getWaitingForInputNode(state, node, inputNodes, inputValues) {
@@ -2874,6 +2882,26 @@ function isControlFlowExcluded(value) {
2874
2882
  }
2875
2883
 
2876
2884
  // src/model/SubprocessorBridge.ts
2885
+ function subscribeOwnGraphRunLifecycle(processor, onLifecycleEvent) {
2886
+ let ownGraphRunId;
2887
+ const unsubscribeGraphStart = processor.on("graphStart", (event) => {
2888
+ ownGraphRunId ??= event.execution.graphRunId;
2889
+ });
2890
+ const onPossibleLifecycleEvent = (event) => {
2891
+ if (ownGraphRunId != null && event.execution.graphRunId === ownGraphRunId) {
2892
+ onLifecycleEvent();
2893
+ }
2894
+ };
2895
+ const unsubscribeGraphFinish = processor.on("graphFinish", onPossibleLifecycleEvent);
2896
+ const unsubscribeGraphAbort = processor.on("graphAbort", onPossibleLifecycleEvent);
2897
+ const unsubscribeGraphError = processor.on("graphError", onPossibleLifecycleEvent);
2898
+ return () => {
2899
+ unsubscribeGraphStart();
2900
+ unsubscribeGraphFinish();
2901
+ unsubscribeGraphAbort();
2902
+ unsubscribeGraphError();
2903
+ };
2904
+ }
2877
2905
  function wireSubprocessorEvents(processor, parentEmitter, parentState) {
2878
2906
  const unsubscribers = [
2879
2907
  processor.on("nodeError", (event) => parentEmitter.emit("nodeError", event)),
@@ -2912,14 +2940,8 @@ function wireSubprocessorEvents(processor, parentEmitter, parentState) {
2912
2940
  }
2913
2941
  cleanedUp = true;
2914
2942
  unsubscribers.forEach((unsubscribe) => unsubscribe());
2915
- unsubscribeAny();
2916
- unsubscribeGraphFinish();
2917
- unsubscribeGraphAbort();
2918
- unsubscribeGraphError();
2919
2943
  };
2920
- const unsubscribeGraphFinish = processor.on("graphFinish", cleanup);
2921
- const unsubscribeGraphAbort = processor.on("graphAbort", cleanup);
2922
- const unsubscribeGraphError = processor.on("graphError", cleanup);
2944
+ unsubscribers.push(unsubscribeAny, subscribeOwnGraphRunLifecycle(processor, cleanup));
2923
2945
  }
2924
2946
  function wireSubprocessorLifecycle(processor, options2) {
2925
2947
  var _a;
@@ -2937,26 +2959,24 @@ function wireSubprocessorLifecycle(processor, options2) {
2937
2959
  };
2938
2960
  (_a = options2.signal) == null ? void 0 : _a.addEventListener("abort", abortFromSignal, { once: true });
2939
2961
  options2.parentAbortSignal.addEventListener("abort", abortFromParent, { once: true });
2940
- const unsubscribeParentPause = options2.onParentPause(pauseProcessor);
2941
- const unsubscribeParentResume = options2.onParentResume(resumeProcessor);
2962
+ const unsubscribers = [
2963
+ () => {
2964
+ var _a2;
2965
+ return (_a2 = options2.signal) == null ? void 0 : _a2.removeEventListener("abort", abortFromSignal);
2966
+ },
2967
+ () => options2.parentAbortSignal.removeEventListener("abort", abortFromParent),
2968
+ options2.onParentPause(pauseProcessor),
2969
+ options2.onParentResume(resumeProcessor)
2970
+ ];
2942
2971
  let cleanedUp = false;
2943
2972
  const cleanup = () => {
2944
- var _a2;
2945
2973
  if (cleanedUp) {
2946
2974
  return;
2947
2975
  }
2948
2976
  cleanedUp = true;
2949
- (_a2 = options2.signal) == null ? void 0 : _a2.removeEventListener("abort", abortFromSignal);
2950
- options2.parentAbortSignal.removeEventListener("abort", abortFromParent);
2951
- unsubscribeParentPause();
2952
- unsubscribeParentResume();
2953
- unsubscribeGraphFinish();
2954
- unsubscribeGraphAbort();
2955
- unsubscribeGraphError();
2977
+ unsubscribers.forEach((unsubscribe) => unsubscribe());
2956
2978
  };
2957
- const unsubscribeGraphFinish = processor.on("graphFinish", cleanup);
2958
- const unsubscribeGraphAbort = processor.on("graphAbort", cleanup);
2959
- const unsubscribeGraphError = processor.on("graphError", cleanup);
2979
+ unsubscribers.push(subscribeOwnGraphRunLifecycle(processor, cleanup));
2960
2980
  }
2961
2981
 
2962
2982
  // src/integrations/CodeRunner.ts
@@ -3543,9 +3563,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3543
3563
  trace ? (message) => this.#emitTraceEvent(message) : void 0
3544
3564
  );
3545
3565
  }
3546
- /** Returns true if all required inputs have connections. */
3547
- #areRequiredInputsConnected(node) {
3548
- return areRequiredInputsConnected(this.#executionState, node);
3566
+ /** Returns required inputs without connections. */
3567
+ #getMissingRequiredInputs(node) {
3568
+ return getMissingRequiredInputs(this.#executionState, node);
3549
3569
  }
3550
3570
  /** Accumulates cost from a node's output. */
3551
3571
  #accumulateCost(output) {
@@ -3570,10 +3590,7 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3570
3590
  if (this.#hasErroredInputNode(node, inputNodes)) {
3571
3591
  return;
3572
3592
  }
3573
- if (!this.#areRequiredInputsConnected(node)) {
3574
- return;
3575
- }
3576
- this.#emitTraceEvent(`Node ${node.title} has required inputs nodes: ${inputNodes.map((n) => n.title).join(", ")}`);
3593
+ this.#emitTraceEvent(`Node ${node.title} has input nodes: ${inputNodes.map((n) => n.title).join(", ")}`);
3577
3594
  const attachedData = this.#getAttachedDataTo(node);
3578
3595
  if (node.type === "raceInputs" || attachedData.races) {
3579
3596
  for (const inputNode of inputNodes) {
@@ -3607,6 +3624,10 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3607
3624
  if (this.#shouldSkipNodeProcessing(node, inputNodes)) {
3608
3625
  return;
3609
3626
  }
3627
+ const attachedData = this.#getAttachedDataTo(node);
3628
+ if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
3629
+ return;
3630
+ }
3610
3631
  const inputValues = this.#getInputValuesForNode(node);
3611
3632
  if (this.#excludedDueToControlFlow(node, inputValues, (0, import_non_secure4.nanoid)(), LOOP_NOT_BROKEN_SENTINEL)) {
3612
3633
  this.#emitTraceEvent(`Node ${node.title} is excluded due to control flow`);
@@ -3617,7 +3638,15 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3617
3638
  this.#emitTraceEvent(`Node ${node.title} is waiting for input node ${waitingForInputNode}`);
3618
3639
  return;
3619
3640
  }
3620
- const attachedData = this.#getAttachedDataTo(node);
3641
+ if (this.#excludedDueToControlFlow(node, inputValues, (0, import_non_secure4.nanoid)())) {
3642
+ this.#emitTraceEvent(`Node ${node.title} is excluded due to control flow`);
3643
+ return;
3644
+ }
3645
+ const missingRequiredInputs = this.#getMissingRequiredInputs(node);
3646
+ if (missingRequiredInputs.length > 0) {
3647
+ this.#excludeNodeWithMissingRequiredInputs(node, inputValues, missingRequiredInputs);
3648
+ return;
3649
+ }
3621
3650
  if (this.#beginNodeProcessing(node, attachedData) === false) {
3622
3651
  return;
3623
3652
  }
@@ -3665,28 +3694,37 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3665
3694
  if (this.#hasErroredInputNode(node, inputNodes, true)) {
3666
3695
  return true;
3667
3696
  }
3668
- if (!this.#areRequiredInputsConnected(node)) {
3669
- this.#emitTraceEvent(
3670
- `Node ${node.title} has required inputs nodes: ${inputNodes.map((n) => n.title).join(", ")}`
3671
- );
3672
- return true;
3673
- }
3674
3697
  return false;
3675
3698
  }
3699
+ #excludeNodeWithMissingRequiredInputs(node, inputValues, missingRequiredInputs) {
3700
+ const missingInputNames = missingRequiredInputs.map((input) => input.title || input.id).join(", ");
3701
+ const processId = (0, import_non_secure4.nanoid)();
3702
+ this.#emitTraceEvent(`Excluding node ${node.title} because required inputs are not connected: ${missingInputNames}`);
3703
+ this.#excludeNode(node, processId, inputValues, "missing required input");
3704
+ }
3676
3705
  #beginNodeProcessing(node, attachedData) {
3677
- var _a;
3678
- if ((_a = attachedData.races) == null ? void 0 : _a.completed) {
3679
- this.#emitTraceEvent(`Node ${node.title} is part of a race that was completed`);
3706
+ if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
3680
3707
  return false;
3681
3708
  }
3682
3709
  this.#currentlyProcessing.add(node.id);
3683
3710
  if (node.type === "loopController") {
3684
3711
  this.#loopControllersSeen.add(node.id);
3685
3712
  }
3713
+ this.#registerNodeInActiveLoop(node, attachedData);
3714
+ return true;
3715
+ }
3716
+ #shouldSkipCompletedRaceNode(node, attachedData) {
3717
+ var _a;
3718
+ if ((_a = attachedData.races) == null ? void 0 : _a.completed) {
3719
+ this.#emitTraceEvent(`Node ${node.title} is part of a race that was completed`);
3720
+ return true;
3721
+ }
3722
+ return false;
3723
+ }
3724
+ #registerNodeInActiveLoop(node, attachedData) {
3686
3725
  if (attachedData.loopInfo && attachedData.loopInfo.loopControllerId !== node.id) {
3687
3726
  attachedData.loopInfo.nodes.add(node.id);
3688
3727
  }
3689
- return true;
3690
3728
  }
3691
3729
  #handleLoopControllerPostProcess(node, attachedData) {
3692
3730
  var _a;
@@ -4068,16 +4106,14 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
4068
4106
  var _a;
4069
4107
  if (node.disabled) {
4070
4108
  this.#emitTraceEvent(`Excluding node ${node.title} because it's disabled`);
4071
- this.#visitedNodes.add(node.id);
4072
- this.#markAsExcluded(node, processId, inputValues, "disabled");
4109
+ this.#excludeNode(node, processId, inputValues, "disabled");
4073
4110
  return true;
4074
4111
  }
4075
4112
  if (node.isConditional && typeOfExclusion === void 0) {
4076
4113
  const ifValue = coerceTypeOptional(inputValues[IF_PORT.id], "boolean");
4077
4114
  if (ifValue === false) {
4078
4115
  this.#emitTraceEvent(`Excluding node ${node.title} because if port is false`);
4079
- this.#visitedNodes.add(node.id);
4080
- this.#markAsExcluded(node, processId, inputValues, "if port is false");
4116
+ this.#excludeNode(node, processId, inputValues, "if port is false");
4081
4117
  return true;
4082
4118
  }
4083
4119
  }
@@ -4106,13 +4142,23 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
4106
4142
  `Excluding node ${node.title} because of control flow. Input is has excluded value: ${(_a = controlFlowExcludedValues[0]) == null ? void 0 : _a[0]}`
4107
4143
  );
4108
4144
  }
4109
- this.#visitedNodes.add(node.id);
4110
- this.#markAsExcluded(node, processId, inputValues, "input is excluded value");
4145
+ this.#excludeNode(node, processId, inputValues, "input is excluded value");
4111
4146
  }
4112
4147
  return true;
4113
4148
  }
4114
4149
  return false;
4115
4150
  }
4151
+ #excludeNode(node, processId, inputValues, reason) {
4152
+ const attachedData = this.#getAttachedDataTo(node);
4153
+ this.#registerNodeInActiveLoop(node, attachedData);
4154
+ this.#visitedNodes.add(node.id);
4155
+ this.#markAsExcluded(node, processId, inputValues, reason);
4156
+ this.#currentlyProcessing.delete(node.id);
4157
+ this.#remainingNodes.delete(node.id);
4158
+ const outputNodes = getOutputNodesFrom(this.#executionState, node);
4159
+ this.#propagateAttachedDataToOutputNodes(node, attachedData, outputNodes.connectionsToNodes);
4160
+ this.#queueOutputNodes(node, outputNodes.nodes);
4161
+ }
4116
4162
  #markAsExcluded(node, processId, inputValues, reason) {
4117
4163
  const outputs = {};
4118
4164
  for (const output of this.#definitions[node.id].outputs) {
@@ -8401,6 +8447,9 @@ function hasLLMChatV2BuiltInToolsEnabled(data) {
8401
8447
 
8402
8448
  // src/model/chat-v2/chatV2ResponseFormat.ts
8403
8449
  var import_ai = require("ai");
8450
+ function isChatV2StructuredResponseFormat(responseFormat) {
8451
+ return responseFormat === "json" || responseFormat === "json_schema";
8452
+ }
8404
8453
  function getResponseSchema(inputs) {
8405
8454
  const responseSchemaInput = inputs["responseSchema"];
8406
8455
  if ((responseSchemaInput == null ? void 0 : responseSchemaInput.type) === "gpt-function") {
@@ -8412,6 +8461,40 @@ function normalizeOptionalString(value) {
8412
8461
  const trimmed = value == null ? void 0 : value.trim();
8413
8462
  return trimmed ? trimmed : void 0;
8414
8463
  }
8464
+ function toJsonValue(value, path = "Response Schema", seen = /* @__PURE__ */ new WeakSet()) {
8465
+ if (value === void 0) {
8466
+ throw new Error(`${path} must be JSON-compatible; undefined values are not supported.`);
8467
+ }
8468
+ if (value === null || typeof value === "string" || typeof value === "boolean") {
8469
+ return value;
8470
+ }
8471
+ if (typeof value === "number") {
8472
+ if (!Number.isFinite(value)) {
8473
+ throw new Error(`${path} must be JSON-compatible; non-finite numbers are not supported.`);
8474
+ }
8475
+ return value;
8476
+ }
8477
+ if (Array.isArray(value)) {
8478
+ return value.map((item, index) => toJsonValue(item, `${path}[${index}]`, seen));
8479
+ }
8480
+ if (typeof value === "object") {
8481
+ const prototype = Object.getPrototypeOf(value);
8482
+ if (prototype !== Object.prototype && prototype !== null) {
8483
+ throw new Error(`${path} must be JSON-compatible; only plain objects are supported.`);
8484
+ }
8485
+ if (seen.has(value)) {
8486
+ throw new Error(`${path} must be JSON-compatible; circular references are not supported.`);
8487
+ }
8488
+ seen.add(value);
8489
+ const jsonObject = {};
8490
+ for (const [key, item] of Object.entries(value)) {
8491
+ jsonObject[key] = toJsonValue(item, `${path}.${key}`, seen);
8492
+ }
8493
+ seen.delete(value);
8494
+ return jsonObject;
8495
+ }
8496
+ throw new Error(`${path} must be JSON-compatible; ${typeof value} values are not supported.`);
8497
+ }
8415
8498
  function resolveChatV2ResponseFormatParameters(data, inputs) {
8416
8499
  const responseFormat = data.responseFormat ?? "";
8417
8500
  if (!responseFormat) {
@@ -8452,11 +8535,47 @@ function createChatV2ResponseOutput(parameters) {
8452
8535
  });
8453
8536
  }
8454
8537
  return import_ai.Output.object({
8455
- schema: (0, import_ai.jsonSchema)(parameters.schema),
8538
+ schema: (0, import_ai.jsonSchema)(toJsonValue(parameters.schema)),
8456
8539
  name: parameters.schemaName,
8457
8540
  description: parameters.schemaDescription
8458
8541
  });
8459
8542
  }
8543
+ function mergeCustomProviderResponseFormatOptions(provider, providerOptions, parameters) {
8544
+ if (provider !== "custom" || parameters == null) {
8545
+ return providerOptions;
8546
+ }
8547
+ const customOptions = (providerOptions == null ? void 0 : providerOptions.custom) ?? {};
8548
+ if (parameters.responseFormat === "json") {
8549
+ return {
8550
+ ...providerOptions,
8551
+ custom: {
8552
+ ...customOptions,
8553
+ response_format: { type: "json_object" }
8554
+ }
8555
+ };
8556
+ }
8557
+ if (parameters.responseFormat !== "json_schema") {
8558
+ return providerOptions;
8559
+ }
8560
+ const jsonSchemaOptions = {
8561
+ name: parameters.schemaName,
8562
+ strict: true,
8563
+ schema: toJsonValue(parameters.schema)
8564
+ };
8565
+ if (parameters.schemaDescription != null) {
8566
+ jsonSchemaOptions.description = parameters.schemaDescription;
8567
+ }
8568
+ return {
8569
+ ...providerOptions,
8570
+ custom: {
8571
+ ...customOptions,
8572
+ response_format: {
8573
+ type: "json_schema",
8574
+ json_schema: jsonSchemaOptions
8575
+ }
8576
+ }
8577
+ };
8578
+ }
8460
8579
 
8461
8580
  // src/model/chat-v2/chatV2FeatureCompatibility.ts
8462
8581
  var LLM_CHAT_V2_TOOL_RESPONSE_FORMAT_CONFLICT_COPY = {
@@ -8467,7 +8586,7 @@ var LLM_CHAT_V2_TOOL_RESPONSE_FORMAT_CONFLICT_COPY = {
8467
8586
  ]
8468
8587
  };
8469
8588
  function isLLMChatV2StructuredResponseFormat(responseFormat) {
8470
- return responseFormat === "json" || responseFormat === "json_schema";
8589
+ return isChatV2StructuredResponseFormat(responseFormat);
8471
8590
  }
8472
8591
  function hasLLMChatV2ToolResponseFormatConflict(data) {
8473
8592
  return !!data.useToolCalling && isLLMChatV2StructuredResponseFormat(data.responseFormat);
@@ -8835,9 +8954,13 @@ async function resolveLLMChatV2RuntimeConfig(params) {
8835
8954
  const prompt = inputs["prompt"];
8836
8955
  const systemPrompt = inputs["systemPrompt"];
8837
8956
  const functions = data.useToolCalling && inputs["functions"] != null ? coerceTypeOptional(inputs["functions"], "gpt-function[]") : void 0;
8838
- const providerOptions = resolveLLMChatV2RuntimeProviderOptions(data, inputs);
8839
8957
  const toolChoice = resolveLLMChatV2ToolChoice(data);
8840
8958
  const responseFormatParameters = resolveChatV2ResponseFormatParameters(data, inputs);
8959
+ const providerOptions = mergeCustomProviderResponseFormatOptions(
8960
+ provider,
8961
+ resolveLLMChatV2RuntimeProviderOptions(data, inputs),
8962
+ responseFormatParameters
8963
+ );
8841
8964
  const generationParameters = resolveLLMChatV2GenerationParameters(data, inputs);
8842
8965
  const runOptions = {
8843
8966
  provider,
@@ -8849,6 +8972,7 @@ async function resolveLLMChatV2RuntimeConfig(params) {
8849
8972
  additionalTools: resolveLLMChatV2BuiltInTools(data, context, providerConfig, apiKey),
8850
8973
  ...generationParameters,
8851
8974
  responseOutput: createChatV2ResponseOutput(responseFormatParameters),
8975
+ responseFormat: responseFormatParameters == null ? void 0 : responseFormatParameters.responseFormat,
8852
8976
  outputUsage: data.outputUsage,
8853
8977
  outputReasoning: data.outputReasoning,
8854
8978
  outputRequestStatus: data.outputRequestStatus,
@@ -8894,15 +9018,36 @@ async function resolveLLMChatV2RuntimeConfig(params) {
8894
9018
  var import_ai2 = require("ai");
8895
9019
 
8896
9020
  // src/model/chat/aiSdkStreaming.ts
8897
- async function consumeAiSdkStream(fullStream, onPartialOutputs) {
9021
+ function buildResponseText(textBlocks, dedupeDuplicateTextBlocks) {
9022
+ const blockTexts = Array.from(textBlocks.values()).filter((text) => text.length > 0);
9023
+ if (blockTexts.length === 0) {
9024
+ return "";
9025
+ }
9026
+ if (dedupeDuplicateTextBlocks && blockTexts.length > 1) {
9027
+ const longestText = blockTexts.reduce((longest, text) => text.length > longest.length ? text : longest);
9028
+ if (blockTexts.every((text) => longestText.startsWith(text))) {
9029
+ return longestText;
9030
+ }
9031
+ }
9032
+ return blockTexts.join("");
9033
+ }
9034
+ async function consumeAiSdkStream(fullStream, onPartialOutputs, options2 = {}) {
8898
9035
  let responseText = "";
8899
9036
  let reasoning = "";
8900
9037
  const functionCalls = [];
8901
9038
  let usage;
9039
+ const textBlocks = /* @__PURE__ */ new Map();
8902
9040
  for await (const part of fullStream) {
8903
9041
  switch (part.type) {
9042
+ case "text-start": {
9043
+ if (!textBlocks.has(part.id)) {
9044
+ textBlocks.set(part.id, "");
9045
+ }
9046
+ break;
9047
+ }
8904
9048
  case "text-delta": {
8905
- responseText += part.text;
9049
+ textBlocks.set(part.id, `${textBlocks.get(part.id) ?? ""}${part.text}`);
9050
+ responseText = buildResponseText(textBlocks, !!options2.dedupeDuplicateTextBlocks);
8906
9051
  onPartialOutputs(responseText, functionCalls);
8907
9052
  break;
8908
9053
  }
@@ -8954,6 +9099,7 @@ function defaultStreamExecutor(args) {
8954
9099
  finishReason: "finishReason" in result ? keepPromiseHandled(
8955
9100
  Promise.resolve(result.finishReason).then((value) => value == null ? void 0 : String(value))
8956
9101
  ) : void 0,
9102
+ output: args.output != null && "output" in result ? keepPromiseHandled(Promise.resolve(result.output)) : void 0,
8957
9103
  providerMetadata: "providerMetadata" in result ? keepPromiseHandled(
8958
9104
  Promise.resolve(result.providerMetadata)
8959
9105
  ) : void 0,
@@ -8964,6 +9110,36 @@ function defaultStreamExecutor(args) {
8964
9110
  async function resolveOptionalValue(value) {
8965
9111
  return value == null ? void 0 : await value;
8966
9112
  }
9113
+ async function resolveOptionalStructuredOutput(value) {
9114
+ if (value == null) {
9115
+ return void 0;
9116
+ }
9117
+ try {
9118
+ return await value;
9119
+ } catch {
9120
+ return void 0;
9121
+ }
9122
+ }
9123
+ function collapseRepeatedStructuredJsonText(responseText) {
9124
+ if (responseText.length === 0 || responseText.length % 2 !== 0) {
9125
+ return responseText;
9126
+ }
9127
+ const midpoint = responseText.length / 2;
9128
+ const firstHalf = responseText.slice(0, midpoint);
9129
+ const firstNonWhitespaceCharacter = firstHalf.trimStart()[0];
9130
+ if (firstHalf !== responseText.slice(midpoint)) {
9131
+ return responseText;
9132
+ }
9133
+ if (firstNonWhitespaceCharacter !== "{" && firstNonWhitespaceCharacter !== "[") {
9134
+ return responseText;
9135
+ }
9136
+ try {
9137
+ JSON.parse(firstHalf);
9138
+ return firstHalf;
9139
+ } catch {
9140
+ return responseText;
9141
+ }
9142
+ }
8967
9143
  async function executeStream(options2, executor) {
8968
9144
  const args = {
8969
9145
  model: options2.model,
@@ -8997,15 +9173,28 @@ async function executeStream(options2, executor) {
8997
9173
  args.abortSignal = options2.abortSignal;
8998
9174
  const handle = await executor(args);
8999
9175
  markOptionalPromiseHandled(handle.finishReason);
9176
+ markOptionalPromiseHandled(handle.output);
9000
9177
  markOptionalPromiseHandled(handle.providerMetadata);
9001
9178
  markOptionalPromiseHandled(handle.requestStatus);
9002
9179
  markOptionalPromiseHandled(handle.usage);
9003
- const streamed = await consumeAiSdkStream(handle.fullStream, (text, functionCalls) => {
9004
- var _a;
9005
- (_a = options2.onPartialOutput) == null ? void 0 : _a.call(options2, { text, functionCalls });
9006
- });
9180
+ const isStructuredOutput = isChatV2StructuredResponseFormat(options2.responseFormat);
9181
+ const streamed = await consumeAiSdkStream(
9182
+ handle.fullStream,
9183
+ (text, functionCalls) => {
9184
+ var _a;
9185
+ (_a = options2.onPartialOutput) == null ? void 0 : _a.call(options2, {
9186
+ text: isStructuredOutput ? collapseRepeatedStructuredJsonText(text) : text,
9187
+ functionCalls
9188
+ });
9189
+ },
9190
+ {
9191
+ dedupeDuplicateTextBlocks: isStructuredOutput
9192
+ }
9193
+ );
9194
+ const responseText = isStructuredOutput ? collapseRepeatedStructuredJsonText(streamed.responseText) : streamed.responseText;
9007
9195
  return {
9008
- responseText: streamed.responseText,
9196
+ responseText,
9197
+ structuredOutput: options2.responseOutput != null ? await resolveOptionalStructuredOutput(handle.output) : void 0,
9009
9198
  functionCalls: streamed.functionCalls,
9010
9199
  usage: streamed.usage ?? await resolveOptionalValue(handle.usage),
9011
9200
  reasoning: streamed.reasoning,
@@ -9508,9 +9697,23 @@ function normalizeUsage(usage, options2) {
9508
9697
  totalCost: calculateChatV2Cost(options2.provider, options2.modelId, promptTokens, completionTokens)
9509
9698
  };
9510
9699
  }
9511
- function buildCommonOutputs(requestMessages, response, functionCalls, usage, reasoning, requestStatus, responseError, requestStatuses, requestErrors, options2) {
9700
+ function tryParseStructuredResponseText(response) {
9701
+ try {
9702
+ return JSON.parse(response);
9703
+ } catch {
9704
+ return void 0;
9705
+ }
9706
+ }
9707
+ function buildResponseOutput(response, structuredOutput, responseFormat) {
9708
+ if (!isChatV2StructuredResponseFormat(responseFormat)) {
9709
+ return { type: "string", value: response };
9710
+ }
9711
+ const parsedOutput = structuredOutput !== void 0 ? structuredOutput : tryParseStructuredResponseText(response);
9712
+ return parsedOutput !== void 0 ? inferType(parsedOutput) : { type: "string", value: response };
9713
+ }
9714
+ function buildCommonOutputs(requestMessages, response, structuredOutput, functionCalls, usage, reasoning, requestStatus, responseError, requestStatuses, requestErrors, options2) {
9512
9715
  const outputs = {
9513
- ["response"]: { type: "string", value: response },
9716
+ ["response"]: buildResponseOutput(response, structuredOutput, options2.responseFormat),
9514
9717
  ["in-messages"]: { type: "chat-message[]", value: requestMessages },
9515
9718
  ["all-messages"]: createAssistantMessagesOutput(requestMessages, response, functionCalls, {
9516
9719
  functionCallMode: options2.functionCallMode
@@ -9542,13 +9745,7 @@ function buildCommonOutputs(requestMessages, response, functionCalls, usage, rea
9542
9745
  };
9543
9746
  }
9544
9747
  if (options2.outputReasoning) {
9545
- outputs["reasoning"] = Array.isArray(reasoning) ? {
9546
- type: "string[]",
9547
- value: reasoning
9548
- } : {
9549
- type: "string",
9550
- value: reasoning
9551
- };
9748
+ outputs["reasoning"] = buildReasoningOutput(reasoning);
9552
9749
  }
9553
9750
  if (options2.outputRequestStatus) {
9554
9751
  if (options2.retryOnNon200) {
@@ -9573,6 +9770,26 @@ function buildCommonOutputs(requestMessages, response, functionCalls, usage, rea
9573
9770
  }
9574
9771
  return outputs;
9575
9772
  }
9773
+ function buildReasoningOutput(reasoning) {
9774
+ if (Array.isArray(reasoning)) {
9775
+ const nonEmptyReasoning = reasoning.filter((part) => typeof part === "string" && part.trim().length > 0);
9776
+ return nonEmptyReasoning.length > 0 ? {
9777
+ type: "string[]",
9778
+ value: nonEmptyReasoning
9779
+ } : {
9780
+ type: "control-flow-excluded",
9781
+ value: void 0
9782
+ };
9783
+ }
9784
+ const reasoningText = typeof reasoning === "string" ? reasoning : "";
9785
+ return reasoningText.trim().length > 0 ? {
9786
+ type: "string",
9787
+ value: reasoningText
9788
+ } : {
9789
+ type: "control-flow-excluded",
9790
+ value: void 0
9791
+ };
9792
+ }
9576
9793
  function getProviderFailureMessage(error) {
9577
9794
  if (error instanceof Error) {
9578
9795
  return error.message;
@@ -9758,6 +9975,7 @@ async function runChatV2Pipeline(options2) {
9758
9975
  stopSequences: options2.stopSequences,
9759
9976
  seed: options2.seed,
9760
9977
  responseOutput: options2.responseOutput,
9978
+ responseFormat: options2.responseFormat,
9761
9979
  providerOptions: options2.providerOptions,
9762
9980
  toolChoice: options2.toolChoice,
9763
9981
  abortSignal: options2.context.signal,
@@ -9766,14 +9984,27 @@ async function runChatV2Pipeline(options2) {
9766
9984
  var _a, _b;
9767
9985
  (_b = (_a = options2.context).onPartialOutputs) == null ? void 0 : _b.call(
9768
9986
  _a,
9769
- buildCommonOutputs(requestMessages, text, functionCalls, void 0, "", void 0, void 0, [], [], {
9770
- outputUsage: false,
9771
- outputReasoning: false,
9772
- outputRequestStatus: false,
9773
- includeFunctionCalls: options2.includeFunctionCalls,
9774
- functionCallMode: options2.functionCallMode,
9775
- retryOnNon200: false
9776
- })
9987
+ buildCommonOutputs(
9988
+ requestMessages,
9989
+ text,
9990
+ void 0,
9991
+ functionCalls,
9992
+ void 0,
9993
+ "",
9994
+ void 0,
9995
+ void 0,
9996
+ [],
9997
+ [],
9998
+ {
9999
+ outputUsage: false,
10000
+ outputReasoning: false,
10001
+ outputRequestStatus: false,
10002
+ includeFunctionCalls: options2.includeFunctionCalls,
10003
+ functionCallMode: options2.functionCallMode,
10004
+ retryOnNon200: false,
10005
+ responseFormat: void 0
10006
+ }
10007
+ )
9777
10008
  );
9778
10009
  }
9779
10010
  },
@@ -9810,6 +10041,7 @@ async function runChatV2Pipeline(options2) {
9810
10041
  const commonOutputs = buildCommonOutputs(
9811
10042
  requestMessages,
9812
10043
  streamed.result.responseText,
10044
+ streamed.result.structuredOutput,
9813
10045
  streamed.result.functionCalls,
9814
10046
  usage,
9815
10047
  streamed.result.reasoning,
@@ -9823,7 +10055,8 @@ async function runChatV2Pipeline(options2) {
9823
10055
  outputRequestStatus: options2.outputRequestStatus,
9824
10056
  includeFunctionCalls: options2.includeFunctionCalls,
9825
10057
  functionCallMode: options2.functionCallMode,
9826
- retryOnNon200: options2.retryOnNon200
10058
+ retryOnNon200: options2.retryOnNon200,
10059
+ responseFormat: options2.responseFormat
9827
10060
  }
9828
10061
  );
9829
10062
  const allMessagesOutput = commonOutputs["all-messages"];
@@ -9886,7 +10119,7 @@ function applyAccumulatedUsage(result, usage, outputUsage) {
9886
10119
  }
9887
10120
  function appendReasoningRound(accumulated, reasoning) {
9888
10121
  const roundReasoning = Array.isArray(reasoning) ? reasoning : [reasoning];
9889
- const nonEmptyReasoning = roundReasoning.map((part) => part.trim()).filter((part) => part.length > 0);
10122
+ const nonEmptyReasoning = roundReasoning.filter((part) => typeof part === "string").map((part) => part.trim()).filter((part) => part.length > 0);
9890
10123
  if (nonEmptyReasoning.length === 0) {
9891
10124
  return;
9892
10125
  }
@@ -10240,6 +10473,21 @@ var LLMChatV2NodeImpl = class extends NodeImpl {
10240
10473
  includeUsage: this.data.outputUsage,
10241
10474
  includeReasoning: this.data.outputReasoning
10242
10475
  });
10476
+ const responseOutput = outputs.find((output) => output.id === "response");
10477
+ if (responseOutput != null && isLLMChatV2StructuredResponseFormat(this.data.responseFormat)) {
10478
+ responseOutput.dataType = [
10479
+ "object",
10480
+ "object[]",
10481
+ "any",
10482
+ "any[]",
10483
+ "string",
10484
+ "string[]",
10485
+ "number",
10486
+ "number[]",
10487
+ "boolean",
10488
+ "boolean[]"
10489
+ ];
10490
+ }
10243
10491
  if (this.data.outputRequestStatus) {
10244
10492
  outputs.push(
10245
10493
  {
@@ -10974,35 +11222,35 @@ var CodeNodeImpl = class extends NodeImpl {
10974
11222
  },
10975
11223
  {
10976
11224
  type: "group",
10977
- label: "Runtime Permissions",
11225
+ label: "Runtime permissions",
10978
11226
  defaultOpen: true,
10979
11227
  editors: [
10980
11228
  {
10981
11229
  type: "toggle",
10982
- label: "fetch",
11230
+ label: 'Allow "fetch"',
10983
11231
  dataKey: "allowFetch"
10984
11232
  },
10985
11233
  {
10986
11234
  type: "toggle",
10987
- label: "Rivet",
11235
+ label: 'Allow "Rivet"',
10988
11236
  dataKey: "allowRivet"
10989
11237
  },
10990
11238
  {
10991
11239
  type: "toggle",
10992
- label: "console",
11240
+ label: 'Allow "console"',
10993
11241
  dataKey: "allowConsole"
10994
11242
  },
10995
11243
  {
10996
11244
  type: "toggle",
10997
- label: "require",
11245
+ label: 'Allow "require"',
10998
11246
  dataKey: "allowRequire",
10999
- helperMessage: "This is only available when using the Node executor."
11247
+ helperMessage: "Only available with the Node executor"
11000
11248
  },
11001
11249
  {
11002
11250
  type: "toggle",
11003
- label: "process",
11251
+ label: 'Allow "process"',
11004
11252
  dataKey: "allowProcess",
11005
- helperMessage: "This is only available when using the Node executor."
11253
+ helperMessage: "Only available with the Node executor"
11006
11254
  }
11007
11255
  ]
11008
11256
  }
@@ -12864,7 +13112,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12864
13112
  {
12865
13113
  id: "input",
12866
13114
  title: "Input",
12867
- dataType: "string",
13115
+ dataType: "any",
12868
13116
  required: true,
12869
13117
  coerced: false
12870
13118
  }
@@ -12887,9 +13135,9 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12887
13135
  static getUIData() {
12888
13136
  return {
12889
13137
  infoBoxBody: import_ts_dedent21.dedent`
12890
- Finds and parses the first JSON object in the input text.
13138
+ Finds and parses the first JSON object in input text, or passes through an already-structured input object.
12891
13139
 
12892
- Outputs the parsed object.
13140
+ Outputs the parsed or passed-through object.
12893
13141
  `,
12894
13142
  infoBoxTitle: "Extract JSON Node",
12895
13143
  contextMenuTitle: "Extract JSON",
@@ -12897,19 +13145,27 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12897
13145
  };
12898
13146
  }
12899
13147
  async process(inputs) {
12900
- const inputString = expectType(inputs["input"], "string");
13148
+ const input = inputs["input"];
13149
+ if (isStructuredJsonInput(input)) {
13150
+ return createMatchedOutput(input.value);
13151
+ }
13152
+ let inputString;
13153
+ if ((input == null ? void 0 : input.type) === "any") {
13154
+ if (isJsonOutputValue(input.value)) {
13155
+ return createMatchedOutput(input.value);
13156
+ }
13157
+ if (typeof input.value !== "string") {
13158
+ throw new Error(`Expected value of type string or object but got any`);
13159
+ }
13160
+ inputString = input.value;
13161
+ } else if ((input == null ? void 0 : input.type) === "string") {
13162
+ inputString = input.value;
13163
+ } else {
13164
+ throw new Error(`Expected value of type string or object but got ${input == null ? void 0 : input.type}`);
13165
+ }
12901
13166
  try {
12902
13167
  const parsed = JSON.parse(inputString);
12903
- return {
12904
- ["output"]: {
12905
- type: "object",
12906
- value: parsed
12907
- },
12908
- ["noMatch"]: {
12909
- type: "control-flow-excluded",
12910
- value: void 0
12911
- }
12912
- };
13168
+ return createMatchedOutput(parsed);
12913
13169
  } catch (_err) {
12914
13170
  }
12915
13171
  const firstBracket = inputString.indexOf("{");
@@ -12919,7 +13175,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12919
13175
  const firstIndex = firstBracket >= 0 && firstSquareBracket >= 0 ? Math.min(firstBracket, firstSquareBracket) : firstBracket >= 0 ? firstBracket : firstSquareBracket;
12920
13176
  const lastIndex = lastBracket >= 0 && lastSquareBracket >= 0 ? Math.max(lastBracket, lastSquareBracket) : lastBracket >= 0 ? lastBracket : lastSquareBracket;
12921
13177
  const substring = inputString.substring(firstIndex, lastIndex + 1);
12922
- let jsonObject = void 0;
13178
+ let jsonObject;
12923
13179
  try {
12924
13180
  jsonObject = JSON.parse(substring);
12925
13181
  } catch (err) {
@@ -12934,19 +13190,28 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12934
13190
  }
12935
13191
  };
12936
13192
  }
12937
- return {
12938
- ["output"]: {
12939
- type: "object",
12940
- value: jsonObject
12941
- },
12942
- ["noMatch"]: {
12943
- type: "control-flow-excluded",
12944
- value: void 0
12945
- }
12946
- };
13193
+ return createMatchedOutput(jsonObject);
12947
13194
  }
12948
13195
  };
12949
13196
  var extractJsonNode = nodeDefinition(ExtractJsonNodeImpl, "Extract JSON");
13197
+ function isStructuredJsonInput(value) {
13198
+ return (value == null ? void 0 : value.type) === "object" || (value == null ? void 0 : value.type) === "object[]" || (value == null ? void 0 : value.type) === "any[]";
13199
+ }
13200
+ function isJsonOutputValue(value) {
13201
+ return value != null && typeof value === "object";
13202
+ }
13203
+ function createMatchedOutput(value) {
13204
+ return {
13205
+ ["output"]: {
13206
+ type: "object",
13207
+ value
13208
+ },
13209
+ ["noMatch"]: {
13210
+ type: "control-flow-excluded",
13211
+ value: void 0
13212
+ }
13213
+ };
13214
+ }
12950
13215
 
12951
13216
  // src/model/nodes/AssemblePromptNode.ts
12952
13217
  var import_non_secure24 = require("nanoid/non-secure");
@@ -14061,20 +14326,29 @@ var ContextNodeImpl = class extends NodeImpl {
14061
14326
  };
14062
14327
  }
14063
14328
  async process(inputs, context) {
14064
- const contextValue = context.contextValues[this.data.id];
14065
- if (contextValue !== void 0) {
14329
+ var _a;
14330
+ const contextValue = ((_a = context.contextValues) == null ? void 0 : _a[this.data.id]) == null ? void 0 : coerceTypeOptional(context.contextValues[this.data.id], this.data.dataType);
14331
+ if (contextValue != null) {
14066
14332
  return {
14067
- ["data"]: contextValue
14333
+ ["data"]: {
14334
+ type: this.data.dataType,
14335
+ value: contextValue
14336
+ }
14068
14337
  };
14069
14338
  }
14070
14339
  let defaultValue;
14071
14340
  if (this.data.useDefaultValueInput) {
14072
- defaultValue = inputs["default"];
14073
- } else {
14074
- defaultValue = { type: this.data.dataType, value: this.data.defaultValue };
14341
+ const defaultInputValue = inputs["default"];
14342
+ defaultValue = defaultInputValue == null ? void 0 : coerceTypeOptional(defaultInputValue, this.data.dataType);
14343
+ }
14344
+ if (defaultValue == null) {
14345
+ defaultValue = coerceTypeOptional(inferType(this.data.defaultValue), this.data.dataType) ?? getDefaultValue(this.data.dataType);
14075
14346
  }
14076
14347
  return {
14077
- ["data"]: defaultValue
14348
+ ["data"]: {
14349
+ type: this.data.dataType,
14350
+ value: defaultValue
14351
+ }
14078
14352
  };
14079
14353
  }
14080
14354
  };
@@ -14181,27 +14455,26 @@ var CoalesceNodeImpl = class extends NodeImpl {
14181
14455
  };
14182
14456
  var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
14183
14457
 
14184
- // src/model/nodes/PassthroughNode.ts
14458
+ // src/model/nodes/DidRunNode.ts
14185
14459
  var import_non_secure33 = require("nanoid/non-secure");
14186
14460
  var import_ts_dedent31 = require("ts-dedent");
14187
- var PassthroughNodeImpl = class extends NodeImpl {
14188
- static create = () => {
14189
- const chartNode = {
14190
- type: "passthrough",
14191
- title: "Passthrough",
14461
+ var DidRunNodeImpl = class extends NodeImpl {
14462
+ static create() {
14463
+ return {
14464
+ type: "didRun",
14465
+ title: "Did Run",
14192
14466
  id: (0, import_non_secure33.nanoid)(),
14193
14467
  data: {},
14194
14468
  visualData: {
14195
14469
  x: 0,
14196
14470
  y: 0,
14197
- width: 175
14471
+ width: 250
14198
14472
  }
14199
14473
  };
14200
- return chartNode;
14201
- };
14474
+ }
14202
14475
  getInputDefinitions(connections) {
14203
- const inputs = [];
14204
14476
  const inputCount = this.#getInputPortCount(connections);
14477
+ const inputs = [];
14205
14478
  for (let i = 1; i <= inputCount; i++) {
14206
14479
  inputs.push({
14207
14480
  dataType: "any",
@@ -14211,28 +14484,28 @@ var PassthroughNodeImpl = class extends NodeImpl {
14211
14484
  }
14212
14485
  return inputs;
14213
14486
  }
14214
- getOutputDefinitions(connections) {
14215
- const outputs = [];
14216
- const inputCount = this.#getInputPortCount(connections);
14217
- for (let i = 1; i <= inputCount - 1; i++) {
14218
- outputs.push({
14219
- dataType: "any",
14220
- id: `output${i}`,
14221
- title: `Output ${i}`
14222
- });
14223
- }
14224
- return outputs;
14487
+ getOutputDefinitions() {
14488
+ return [
14489
+ {
14490
+ dataType: "boolean",
14491
+ id: "ran",
14492
+ title: "Ran"
14493
+ }
14494
+ ];
14225
14495
  }
14226
14496
  static getUIData() {
14227
14497
  return {
14228
14498
  infoBoxBody: import_ts_dedent31.dedent`
14229
- Simply passes the input value to the output without any modifications.
14499
+ Outputs true when all connected inputs have run. Falsy or empty values still count as having run, so this is useful for adapting "did this branch run at all?" into a boolean If port.
14230
14500
  `,
14231
- infoBoxTitle: "Passthrough Node",
14232
- contextMenuTitle: "Passthrough",
14501
+ infoBoxTitle: "Did Run Node",
14502
+ contextMenuTitle: "Did Run",
14233
14503
  group: ["Logic"]
14234
14504
  };
14235
14505
  }
14506
+ getBody() {
14507
+ return "Outputs true when all connected inputs have run. Falsy or empty values still count";
14508
+ }
14236
14509
  #getInputPortCount(connections) {
14237
14510
  const inputNodeId = this.chartNode.id;
14238
14511
  const inputConnections = connections.filter(
@@ -14240,34 +14513,120 @@ var PassthroughNodeImpl = class extends NodeImpl {
14240
14513
  );
14241
14514
  let maxInputNumber = 0;
14242
14515
  for (const connection of inputConnections) {
14243
- const messageNumber = parseInt(connection.inputId.replace("input", ""), 10);
14244
- if (messageNumber > maxInputNumber) {
14245
- maxInputNumber = messageNumber;
14516
+ const inputNumber = parseInt(connection.inputId.replace("input", ""), 10);
14517
+ if (inputNumber > maxInputNumber) {
14518
+ maxInputNumber = inputNumber;
14246
14519
  }
14247
14520
  }
14248
14521
  return maxInputNumber + 1;
14249
14522
  }
14250
14523
  async process(inputData) {
14251
- const inputCount = Object.keys(inputData).filter((key) => key.startsWith("input")).length;
14252
- const outputs = {};
14253
- for (let i = 1; i <= inputCount; i++) {
14254
- const input = inputData[`input${i}`];
14255
- outputs[`output${i}`] = input;
14524
+ const hasDynamicInput = Object.keys(inputData).some((key) => key.startsWith("input"));
14525
+ if (!hasDynamicInput) {
14526
+ return {
14527
+ ["ran"]: {
14528
+ type: "control-flow-excluded",
14529
+ value: void 0
14530
+ }
14531
+ };
14256
14532
  }
14257
- return outputs;
14258
- }
14259
- };
14260
- var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
14533
+ return {
14534
+ ["ran"]: {
14535
+ type: "boolean",
14536
+ value: true
14537
+ }
14538
+ };
14539
+ }
14540
+ };
14541
+ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
14261
14542
 
14262
- // src/model/nodes/PopNode.ts
14543
+ // src/model/nodes/PassthroughNode.ts
14263
14544
  var import_non_secure34 = require("nanoid/non-secure");
14264
14545
  var import_ts_dedent32 = require("ts-dedent");
14546
+ var PassthroughNodeImpl = class extends NodeImpl {
14547
+ static create = () => {
14548
+ const chartNode = {
14549
+ type: "passthrough",
14550
+ title: "Passthrough",
14551
+ id: (0, import_non_secure34.nanoid)(),
14552
+ data: {},
14553
+ visualData: {
14554
+ x: 0,
14555
+ y: 0,
14556
+ width: 175
14557
+ }
14558
+ };
14559
+ return chartNode;
14560
+ };
14561
+ getInputDefinitions(connections) {
14562
+ const inputs = [];
14563
+ const inputCount = this.#getInputPortCount(connections);
14564
+ for (let i = 1; i <= inputCount; i++) {
14565
+ inputs.push({
14566
+ dataType: "any",
14567
+ id: `input${i}`,
14568
+ title: `Input ${i}`
14569
+ });
14570
+ }
14571
+ return inputs;
14572
+ }
14573
+ getOutputDefinitions(connections) {
14574
+ const outputs = [];
14575
+ const inputCount = this.#getInputPortCount(connections);
14576
+ for (let i = 1; i <= inputCount - 1; i++) {
14577
+ outputs.push({
14578
+ dataType: "any",
14579
+ id: `output${i}`,
14580
+ title: `Output ${i}`
14581
+ });
14582
+ }
14583
+ return outputs;
14584
+ }
14585
+ static getUIData() {
14586
+ return {
14587
+ infoBoxBody: import_ts_dedent32.dedent`
14588
+ Simply passes the input value to the output without any modifications.
14589
+ `,
14590
+ infoBoxTitle: "Passthrough Node",
14591
+ contextMenuTitle: "Passthrough",
14592
+ group: ["Logic"]
14593
+ };
14594
+ }
14595
+ #getInputPortCount(connections) {
14596
+ const inputNodeId = this.chartNode.id;
14597
+ const inputConnections = connections.filter(
14598
+ (connection) => connection.inputNodeId === inputNodeId && connection.inputId.startsWith("input")
14599
+ );
14600
+ let maxInputNumber = 0;
14601
+ for (const connection of inputConnections) {
14602
+ const messageNumber = parseInt(connection.inputId.replace("input", ""), 10);
14603
+ if (messageNumber > maxInputNumber) {
14604
+ maxInputNumber = messageNumber;
14605
+ }
14606
+ }
14607
+ return maxInputNumber + 1;
14608
+ }
14609
+ async process(inputData) {
14610
+ const inputCount = Object.keys(inputData).filter((key) => key.startsWith("input")).length;
14611
+ const outputs = {};
14612
+ for (let i = 1; i <= inputCount; i++) {
14613
+ const input = inputData[`input${i}`];
14614
+ outputs[`output${i}`] = input;
14615
+ }
14616
+ return outputs;
14617
+ }
14618
+ };
14619
+ var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
14620
+
14621
+ // src/model/nodes/PopNode.ts
14622
+ var import_non_secure35 = require("nanoid/non-secure");
14623
+ var import_ts_dedent33 = require("ts-dedent");
14265
14624
  var PopNodeImpl = class extends NodeImpl {
14266
14625
  static create() {
14267
14626
  const baseNode = {
14268
14627
  type: "pop",
14269
14628
  title: "Pop",
14270
- id: (0, import_non_secure34.nanoid)(),
14629
+ id: (0, import_non_secure35.nanoid)(),
14271
14630
  visualData: {
14272
14631
  x: 0,
14273
14632
  y: 0,
@@ -14312,7 +14671,7 @@ var PopNodeImpl = class extends NodeImpl {
14312
14671
  }
14313
14672
  static getUIData() {
14314
14673
  return {
14315
- infoBoxBody: import_ts_dedent32.dedent`
14674
+ infoBoxBody: import_ts_dedent33.dedent`
14316
14675
  Pops the last value off the input array and outputs the new array and the popped value.
14317
14676
 
14318
14677
  Can also be used to just extract the last value from an array.
@@ -14348,14 +14707,14 @@ var PopNodeImpl = class extends NodeImpl {
14348
14707
  var popNode = nodeDefinition(PopNodeImpl, "Pop");
14349
14708
 
14350
14709
  // src/model/nodes/SetGlobalNode.ts
14351
- var import_non_secure35 = require("nanoid/non-secure");
14352
- var import_ts_dedent33 = require("ts-dedent");
14710
+ var import_non_secure36 = require("nanoid/non-secure");
14711
+ var import_ts_dedent34 = require("ts-dedent");
14353
14712
  var SetGlobalNodeImpl = class extends NodeImpl {
14354
14713
  static create() {
14355
14714
  const chartNode = {
14356
14715
  type: "setGlobal",
14357
14716
  title: "Set Global",
14358
- id: (0, import_non_secure35.nanoid)(),
14717
+ id: (0, import_non_secure36.nanoid)(),
14359
14718
  visualData: {
14360
14719
  x: 0,
14361
14720
  y: 0,
@@ -14422,14 +14781,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
14422
14781
  ];
14423
14782
  }
14424
14783
  getBody() {
14425
- return import_ts_dedent33.dedent`
14784
+ return import_ts_dedent34.dedent`
14426
14785
  ${this.data.id}
14427
14786
  Type: ${this.data.dataType}
14428
14787
  `;
14429
14788
  }
14430
14789
  static getUIData() {
14431
14790
  return {
14432
- infoBoxBody: import_ts_dedent33.dedent`
14791
+ infoBoxBody: import_ts_dedent34.dedent`
14433
14792
  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.
14434
14793
  `,
14435
14794
  infoBoxTitle: "Set Global Node",
@@ -14464,14 +14823,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
14464
14823
  var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
14465
14824
 
14466
14825
  // src/model/nodes/GetGlobalNode.ts
14467
- var import_non_secure36 = require("nanoid/non-secure");
14468
- var import_ts_dedent34 = require("ts-dedent");
14826
+ var import_non_secure37 = require("nanoid/non-secure");
14827
+ var import_ts_dedent35 = require("ts-dedent");
14469
14828
  var GetGlobalNodeImpl = class extends NodeImpl {
14470
14829
  static create() {
14471
14830
  const chartNode = {
14472
14831
  type: "getGlobal",
14473
14832
  title: "Get Global",
14474
- id: (0, import_non_secure36.nanoid)(),
14833
+ id: (0, import_non_secure37.nanoid)(),
14475
14834
  visualData: {
14476
14835
  x: 0,
14477
14836
  y: 0,
@@ -14540,7 +14899,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14540
14899
  ];
14541
14900
  }
14542
14901
  getBody() {
14543
- return import_ts_dedent34.dedent`
14902
+ return import_ts_dedent35.dedent`
14544
14903
  ${this.data.useIdInput ? "(ID from input)" : this.data.id}
14545
14904
  Type: ${this.data.dataType}
14546
14905
  ${this.data.wait ? "Waits for available data" : ""}
@@ -14548,7 +14907,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14548
14907
  }
14549
14908
  static getUIData() {
14550
14909
  return {
14551
- infoBoxBody: import_ts_dedent34.dedent`
14910
+ infoBoxBody: import_ts_dedent35.dedent`
14552
14911
  Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
14553
14912
  `,
14554
14913
  infoBoxTitle: "Get Global Node",
@@ -14595,12 +14954,12 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14595
14954
  var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
14596
14955
 
14597
14956
  // src/model/nodes/WaitForEventNode.ts
14598
- var import_non_secure37 = require("nanoid/non-secure");
14599
- var import_ts_dedent35 = require("ts-dedent");
14957
+ var import_non_secure38 = require("nanoid/non-secure");
14958
+ var import_ts_dedent36 = require("ts-dedent");
14600
14959
  var WaitForEventNodeImpl = class extends NodeImpl {
14601
14960
  static create() {
14602
14961
  return {
14603
- id: (0, import_non_secure37.nanoid)(),
14962
+ id: (0, import_non_secure38.nanoid)(),
14604
14963
  type: "waitForEvent",
14605
14964
  title: "Wait For Event",
14606
14965
  visualData: { x: 0, y: 0, width: 150 },
@@ -14655,7 +15014,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
14655
15014
  }
14656
15015
  static getUIData() {
14657
15016
  return {
14658
- infoBoxBody: import_ts_dedent35.dedent`
15017
+ infoBoxBody: import_ts_dedent36.dedent`
14659
15018
  Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
14660
15019
  `,
14661
15020
  infoBoxTitle: "Wait For Event Node",
@@ -14675,14 +15034,14 @@ var WaitForEventNodeImpl = class extends NodeImpl {
14675
15034
  var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
14676
15035
 
14677
15036
  // src/model/nodes/ToolNode.ts
14678
- var import_non_secure38 = require("nanoid/non-secure");
14679
- var import_ts_dedent36 = require("ts-dedent");
15037
+ var import_non_secure39 = require("nanoid/non-secure");
15038
+ var import_ts_dedent37 = require("ts-dedent");
14680
15039
  var GptFunctionNodeImpl = class extends NodeImpl {
14681
15040
  static create() {
14682
15041
  const chartNode = {
14683
15042
  type: "gptFunction",
14684
15043
  title: "Tool",
14685
- id: (0, import_non_secure38.nanoid)(),
15044
+ id: (0, import_non_secure39.nanoid)(),
14686
15045
  visualData: {
14687
15046
  x: 0,
14688
15047
  y: 0,
@@ -14691,7 +15050,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
14691
15050
  data: {
14692
15051
  name: "newTool",
14693
15052
  description: "No description provided",
14694
- schema: import_ts_dedent36.dedent`
15053
+ schema: import_ts_dedent37.dedent`
14695
15054
  {
14696
15055
  "type": "object",
14697
15056
  "properties": {}
@@ -14797,7 +15156,7 @@ ${this.data.description}`
14797
15156
  }
14798
15157
  static getUIData() {
14799
15158
  return {
14800
- infoBoxBody: import_ts_dedent36.dedent`
15159
+ infoBoxBody: import_ts_dedent37.dedent`
14801
15160
  Defines a tool, which is a method that the LLM can call in its responses.
14802
15161
  `,
14803
15162
  infoBoxTitle: "Tool Node",
@@ -14840,15 +15199,15 @@ ${this.data.description}`
14840
15199
  var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
14841
15200
 
14842
15201
  // src/model/nodes/ToYamlNode.ts
14843
- var import_non_secure39 = require("nanoid/non-secure");
15202
+ var import_non_secure40 = require("nanoid/non-secure");
14844
15203
  var import_yaml2 = __toESM(require("yaml"), 1);
14845
- var import_ts_dedent37 = require("ts-dedent");
15204
+ var import_ts_dedent38 = require("ts-dedent");
14846
15205
  var ToYamlNodeImpl = class extends NodeImpl {
14847
15206
  static create() {
14848
15207
  const chartNode = {
14849
15208
  type: "toYaml",
14850
15209
  title: "To YAML",
14851
- id: (0, import_non_secure39.nanoid)(),
15210
+ id: (0, import_non_secure40.nanoid)(),
14852
15211
  visualData: {
14853
15212
  x: 0,
14854
15213
  y: 0,
@@ -14879,7 +15238,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
14879
15238
  }
14880
15239
  static getUIData() {
14881
15240
  return {
14882
- infoBoxBody: import_ts_dedent37.dedent`
15241
+ infoBoxBody: import_ts_dedent38.dedent`
14883
15242
  Turns the input object into YAML text.
14884
15243
  `,
14885
15244
  infoBoxTitle: "To YAML Node",
@@ -14904,8 +15263,8 @@ var ToYamlNodeImpl = class extends NodeImpl {
14904
15263
  var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
14905
15264
 
14906
15265
  // src/model/nodes/GetEmbeddingNode.ts
14907
- var import_non_secure40 = require("nanoid/non-secure");
14908
- var import_ts_dedent38 = require("ts-dedent");
15266
+ var import_non_secure41 = require("nanoid/non-secure");
15267
+ var import_ts_dedent39 = require("ts-dedent");
14909
15268
 
14910
15269
  // src/integrations/integrations.ts
14911
15270
  var registeredIntegrations = {
@@ -14928,7 +15287,7 @@ function getIntegration(type, integrationKey, context) {
14928
15287
  var GetEmbeddingNodeImpl = class extends NodeImpl {
14929
15288
  static create() {
14930
15289
  return {
14931
- id: (0, import_non_secure40.nanoid)(),
15290
+ id: (0, import_non_secure41.nanoid)(),
14932
15291
  type: "getEmbedding",
14933
15292
  title: "Get Embedding",
14934
15293
  visualData: { x: 0, y: 0, width: 250 },
@@ -15012,7 +15371,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
15012
15371
  }
15013
15372
  static getUIData() {
15014
15373
  return {
15015
- infoBoxBody: import_ts_dedent38.dedent`
15374
+ infoBoxBody: import_ts_dedent39.dedent`
15016
15375
  Gets a OpenAI vector embedding for the input text provided.
15017
15376
 
15018
15377
  Can be used with the Vector Store and Vector KNN nodes.
@@ -15043,12 +15402,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
15043
15402
  var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
15044
15403
 
15045
15404
  // src/model/nodes/VectorStoreNode.ts
15046
- var import_non_secure41 = require("nanoid/non-secure");
15047
- var import_ts_dedent39 = require("ts-dedent");
15405
+ var import_non_secure42 = require("nanoid/non-secure");
15406
+ var import_ts_dedent40 = require("ts-dedent");
15048
15407
  var VectorStoreNodeImpl = class extends NodeImpl {
15049
15408
  static create() {
15050
15409
  return {
15051
- id: (0, import_non_secure41.nanoid)(),
15410
+ id: (0, import_non_secure42.nanoid)(),
15052
15411
  type: "vectorStore",
15053
15412
  title: "Vector Store",
15054
15413
  visualData: { x: 0, y: 0, width: 200 },
@@ -15124,14 +15483,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
15124
15483
  ];
15125
15484
  }
15126
15485
  getBody() {
15127
- return import_ts_dedent39.dedent`
15486
+ return import_ts_dedent40.dedent`
15128
15487
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
15129
15488
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
15130
15489
  `;
15131
15490
  }
15132
15491
  static getUIData() {
15133
15492
  return {
15134
- infoBoxBody: import_ts_dedent39.dedent`
15493
+ infoBoxBody: import_ts_dedent40.dedent`
15135
15494
  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.
15136
15495
  `,
15137
15496
  infoBoxTitle: "Vector Store Node",
@@ -15166,12 +15525,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
15166
15525
  var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
15167
15526
 
15168
15527
  // src/model/nodes/VectorNearestNeighborsNode.ts
15169
- var import_non_secure42 = require("nanoid/non-secure");
15170
- var import_ts_dedent40 = require("ts-dedent");
15528
+ var import_non_secure43 = require("nanoid/non-secure");
15529
+ var import_ts_dedent41 = require("ts-dedent");
15171
15530
  var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15172
15531
  static create() {
15173
15532
  return {
15174
- id: (0, import_non_secure42.nanoid)(),
15533
+ id: (0, import_non_secure43.nanoid)(),
15175
15534
  type: "vectorNearestNeighbors",
15176
15535
  title: "Vector KNN",
15177
15536
  visualData: { x: 0, y: 0, width: 200 },
@@ -15254,7 +15613,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15254
15613
  ];
15255
15614
  }
15256
15615
  getBody() {
15257
- return import_ts_dedent40.dedent`
15616
+ return import_ts_dedent41.dedent`
15258
15617
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
15259
15618
  K: ${this.data.useKInput ? "(using input)" : this.data.k}
15260
15619
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
@@ -15262,7 +15621,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15262
15621
  }
15263
15622
  static getUIData() {
15264
15623
  return {
15265
- infoBoxBody: import_ts_dedent40.dedent`
15624
+ infoBoxBody: import_ts_dedent41.dedent`
15266
15625
  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.
15267
15626
  `,
15268
15627
  infoBoxTitle: "Vector KNN Node",
@@ -15292,17 +15651,17 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15292
15651
  var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
15293
15652
 
15294
15653
  // src/model/nodes/HashNode.ts
15295
- var import_non_secure43 = require("nanoid/non-secure");
15654
+ var import_non_secure44 = require("nanoid/non-secure");
15296
15655
  var crypto = __toESM(require("crypto-js"), 1);
15297
15656
  var import_ts_pattern4 = require("ts-pattern");
15298
- var import_ts_dedent41 = require("ts-dedent");
15657
+ var import_ts_dedent42 = require("ts-dedent");
15299
15658
  var { SHA256, SHA512, MD5, SHA1 } = crypto;
15300
15659
  var HashNodeImpl = class extends NodeImpl {
15301
15660
  static create() {
15302
15661
  const chartNode = {
15303
15662
  type: "hash",
15304
15663
  title: "Hash",
15305
- id: (0, import_non_secure43.nanoid)(),
15664
+ id: (0, import_non_secure44.nanoid)(),
15306
15665
  visualData: {
15307
15666
  x: 0,
15308
15667
  y: 0,
@@ -15353,7 +15712,7 @@ var HashNodeImpl = class extends NodeImpl {
15353
15712
  }
15354
15713
  static getUIData() {
15355
15714
  return {
15356
- infoBoxBody: import_ts_dedent41.dedent`
15715
+ infoBoxBody: import_ts_dedent42.dedent`
15357
15716
  Computes a hash of the input value using the configured hash function.
15358
15717
  `,
15359
15718
  infoBoxTitle: "Hash Node",
@@ -15381,14 +15740,14 @@ var algorithmDisplayName = {
15381
15740
  var hashNode = nodeDefinition(HashNodeImpl, "Hash");
15382
15741
 
15383
15742
  // src/model/nodes/AbortGraphNode.ts
15384
- var import_non_secure44 = require("nanoid/non-secure");
15385
- var import_ts_dedent42 = require("ts-dedent");
15743
+ var import_non_secure45 = require("nanoid/non-secure");
15744
+ var import_ts_dedent43 = require("ts-dedent");
15386
15745
  var AbortGraphNodeImpl = class extends NodeImpl {
15387
15746
  static create() {
15388
15747
  const chartNode = {
15389
15748
  type: "abortGraph",
15390
15749
  title: "Abort Graph",
15391
- id: (0, import_non_secure44.nanoid)(),
15750
+ id: (0, import_non_secure45.nanoid)(),
15392
15751
  visualData: {
15393
15752
  x: 0,
15394
15753
  y: 0,
@@ -15439,13 +15798,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
15439
15798
  ];
15440
15799
  }
15441
15800
  getBody() {
15442
- return import_ts_dedent42.dedent`
15801
+ return import_ts_dedent43.dedent`
15443
15802
  ${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
15444
15803
  `;
15445
15804
  }
15446
15805
  static getUIData() {
15447
15806
  return {
15448
- infoBoxBody: import_ts_dedent42.dedent`
15807
+ infoBoxBody: import_ts_dedent43.dedent`
15449
15808
  Aborts the execution of the entire graph immediately.
15450
15809
 
15451
15810
  Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
@@ -15470,14 +15829,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
15470
15829
  var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
15471
15830
 
15472
15831
  // src/model/nodes/RaceInputsNode.ts
15473
- var import_non_secure45 = require("nanoid/non-secure");
15474
- var import_ts_dedent43 = require("ts-dedent");
15832
+ var import_non_secure46 = require("nanoid/non-secure");
15833
+ var import_ts_dedent44 = require("ts-dedent");
15475
15834
  var RaceInputsNodeImpl = class extends NodeImpl {
15476
15835
  static create() {
15477
15836
  const chartNode = {
15478
15837
  type: "raceInputs",
15479
15838
  title: "Race Inputs",
15480
- id: (0, import_non_secure45.nanoid)(),
15839
+ id: (0, import_non_secure46.nanoid)(),
15481
15840
  visualData: {
15482
15841
  x: 0,
15483
15842
  y: 0,
@@ -15527,7 +15886,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
15527
15886
  }
15528
15887
  static getUIData() {
15529
15888
  return {
15530
- infoBoxBody: import_ts_dedent43.dedent`
15889
+ infoBoxBody: import_ts_dedent44.dedent`
15531
15890
  Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
15532
15891
  `,
15533
15892
  infoBoxTitle: "Race Inputs Node",
@@ -15555,14 +15914,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
15555
15914
  var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
15556
15915
 
15557
15916
  // src/model/nodes/ToJsonNode.ts
15558
- var import_non_secure46 = require("nanoid/non-secure");
15559
- var import_ts_dedent44 = require("ts-dedent");
15917
+ var import_non_secure47 = require("nanoid/non-secure");
15918
+ var import_ts_dedent45 = require("ts-dedent");
15560
15919
  var ToJsonNodeImpl = class extends NodeImpl {
15561
15920
  static create() {
15562
15921
  const chartNode = {
15563
15922
  type: "toJson",
15564
15923
  title: "To JSON",
15565
- id: (0, import_non_secure46.nanoid)(),
15924
+ id: (0, import_non_secure47.nanoid)(),
15566
15925
  visualData: {
15567
15926
  x: 0,
15568
15927
  y: 0,
@@ -15607,7 +15966,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
15607
15966
  }
15608
15967
  static getUIData() {
15609
15968
  return {
15610
- infoBoxBody: import_ts_dedent44.dedent`
15969
+ infoBoxBody: import_ts_dedent45.dedent`
15611
15970
  Turns the input value into its JSON equivalent (stringifies the value).
15612
15971
  `,
15613
15972
  infoBoxTitle: "To JSON Node",
@@ -15629,14 +15988,14 @@ var ToJsonNodeImpl = class extends NodeImpl {
15629
15988
  var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
15630
15989
 
15631
15990
  // src/model/nodes/JoinNode.ts
15632
- var import_non_secure47 = require("nanoid/non-secure");
15633
- var import_ts_dedent45 = require("ts-dedent");
15991
+ var import_non_secure48 = require("nanoid/non-secure");
15992
+ var import_ts_dedent46 = require("ts-dedent");
15634
15993
  var JoinNodeImpl = class extends NodeImpl {
15635
15994
  static create = () => {
15636
15995
  const chartNode = {
15637
15996
  type: "join",
15638
15997
  title: "Join",
15639
- id: (0, import_non_secure47.nanoid)(),
15998
+ id: (0, import_non_secure48.nanoid)(),
15640
15999
  data: {
15641
16000
  flatten: true,
15642
16001
  joinString: "\n"
@@ -15712,7 +16071,7 @@ var JoinNodeImpl = class extends NodeImpl {
15712
16071
  }
15713
16072
  static getUIData() {
15714
16073
  return {
15715
- infoBoxBody: import_ts_dedent45.dedent`
16074
+ infoBoxBody: import_ts_dedent46.dedent`
15716
16075
  Takes an array of strings, and joins them using the configured delimiter.
15717
16076
 
15718
16077
  Defaults to a newline.
@@ -15749,15 +16108,15 @@ var JoinNodeImpl = class extends NodeImpl {
15749
16108
  var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
15750
16109
 
15751
16110
  // src/model/nodes/FilterNode.ts
15752
- var import_non_secure48 = require("nanoid/non-secure");
16111
+ var import_non_secure49 = require("nanoid/non-secure");
15753
16112
  var import_lodash_es13 = require("lodash");
15754
- var import_ts_dedent46 = require("ts-dedent");
16113
+ var import_ts_dedent47 = require("ts-dedent");
15755
16114
  var FilterNodeImpl = class extends NodeImpl {
15756
16115
  static create() {
15757
16116
  const chartNode = {
15758
16117
  type: "filter",
15759
16118
  title: "Filter",
15760
- id: (0, import_non_secure48.nanoid)(),
16119
+ id: (0, import_non_secure49.nanoid)(),
15761
16120
  visualData: {
15762
16121
  x: 0,
15763
16122
  y: 0,
@@ -15794,7 +16153,7 @@ var FilterNodeImpl = class extends NodeImpl {
15794
16153
  }
15795
16154
  static getUIData() {
15796
16155
  return {
15797
- infoBoxBody: import_ts_dedent46.dedent`
16156
+ infoBoxBody: import_ts_dedent47.dedent`
15798
16157
  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.
15799
16158
  `,
15800
16159
  infoBoxTitle: "Filter Node",
@@ -15819,11 +16178,11 @@ var FilterNodeImpl = class extends NodeImpl {
15819
16178
  var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
15820
16179
 
15821
16180
  // src/model/nodes/JSFilterNode.ts
15822
- var import_non_secure49 = require("nanoid/non-secure");
15823
- var import_ts_dedent48 = require("ts-dedent");
16181
+ var import_non_secure50 = require("nanoid/non-secure");
16182
+ var import_ts_dedent49 = require("ts-dedent");
15824
16183
 
15825
16184
  // src/model/nodes/jsListCallbackHelpers.ts
15826
- var import_ts_dedent47 = require("ts-dedent");
16185
+ var import_ts_dedent48 = require("ts-dedent");
15827
16186
  var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
15828
16187
  var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
15829
16188
  var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
@@ -15851,7 +16210,7 @@ function getJSListCallbackInterpolationInputNames(callbackBody) {
15851
16210
  }
15852
16211
  function buildJSListRuntimePreamble(callbackBody) {
15853
16212
  const inputNames = getJSListCallbackInterpolationInputNames(callbackBody);
15854
- return import_ts_dedent47.dedent`
16213
+ return import_ts_dedent48.dedent`
15855
16214
  const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
15856
16215
  ${buildCloneJsInputValueFunction()}
15857
16216
  const ${JS_LIST_INPUTS_IDENTIFIER} = Object.create(null);
@@ -15880,7 +16239,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
15880
16239
  }
15881
16240
  function buildJSFilterWrapper(callbackBody) {
15882
16241
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
15883
- return import_ts_dedent47.dedent`
16242
+ return import_ts_dedent48.dedent`
15884
16243
  ${buildJSListRuntimePreamble(callbackBody)}
15885
16244
 
15886
16245
  if (!Array.isArray(array)) {
@@ -15915,7 +16274,7 @@ function buildJSFilterWrapper(callbackBody) {
15915
16274
  }
15916
16275
  function buildJSMapWrapper(callbackBody) {
15917
16276
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
15918
- return import_ts_dedent47.dedent`
16277
+ return import_ts_dedent48.dedent`
15919
16278
  ${buildJSListRuntimePreamble(callbackBody)}
15920
16279
 
15921
16280
  if (!Array.isArray(array)) {
@@ -15987,7 +16346,7 @@ function getJSListNodeBody(callbackBody) {
15987
16346
  const previewBody = callbackBody.split("\n").slice(0, MAX_CALLBACK_PREVIEW_BODY_LINES).join("\n").trim();
15988
16347
  return {
15989
16348
  type: "colorized",
15990
- text: import_ts_dedent47.dedent`
16349
+ text: import_ts_dedent48.dedent`
15991
16350
  ${JS_LIST_CALLBACK_SIGNATURE} => {
15992
16351
  ${indentLines(previewBody, " ")}
15993
16352
  }
@@ -16035,7 +16394,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
16035
16394
  const chartNode = {
16036
16395
  type: "jsFilter",
16037
16396
  title: "JS Filter",
16038
- id: (0, import_non_secure49.nanoid)(),
16397
+ id: (0, import_non_secure50.nanoid)(),
16039
16398
  visualData: {
16040
16399
  x: 0,
16041
16400
  y: 0,
@@ -16067,7 +16426,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
16067
16426
  }
16068
16427
  static getUIData() {
16069
16428
  return {
16070
- infoBoxBody: import_ts_dedent48.dedent`
16429
+ infoBoxBody: import_ts_dedent49.dedent`
16071
16430
  Filters an input array using the body of a JavaScript callback.
16072
16431
 
16073
16432
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -16093,15 +16452,15 @@ var JSFilterNodeImpl = class extends NodeImpl {
16093
16452
  var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
16094
16453
 
16095
16454
  // src/model/nodes/JSMapNode.ts
16096
- var import_non_secure50 = require("nanoid/non-secure");
16097
- var import_ts_dedent49 = require("ts-dedent");
16455
+ var import_non_secure51 = require("nanoid/non-secure");
16456
+ var import_ts_dedent50 = require("ts-dedent");
16098
16457
  var DEFAULT_CALLBACK_BODY2 = "return item;";
16099
16458
  var JSMapNodeImpl = class extends NodeImpl {
16100
16459
  static create() {
16101
16460
  const chartNode = {
16102
16461
  type: "jsMap",
16103
16462
  title: "JS Map",
16104
- id: (0, import_non_secure50.nanoid)(),
16463
+ id: (0, import_non_secure51.nanoid)(),
16105
16464
  visualData: {
16106
16465
  x: 0,
16107
16466
  y: 0,
@@ -16133,7 +16492,7 @@ var JSMapNodeImpl = class extends NodeImpl {
16133
16492
  }
16134
16493
  static getUIData() {
16135
16494
  return {
16136
- infoBoxBody: import_ts_dedent49.dedent`
16495
+ infoBoxBody: import_ts_dedent50.dedent`
16137
16496
  Maps an input array using the body of a JavaScript callback.
16138
16497
 
16139
16498
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -16159,8 +16518,8 @@ var JSMapNodeImpl = class extends NodeImpl {
16159
16518
  var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
16160
16519
 
16161
16520
  // src/model/nodes/ObjectNode.ts
16162
- var import_non_secure51 = require("nanoid/non-secure");
16163
- var import_ts_dedent50 = require("ts-dedent");
16521
+ var import_non_secure52 = require("nanoid/non-secure");
16522
+ var import_ts_dedent51 = require("ts-dedent");
16164
16523
  var DEFAULT_JSON_TEMPLATE = `{
16165
16524
  "key": "{{input}}"
16166
16525
  }`;
@@ -16169,7 +16528,7 @@ var ObjectNodeImpl = class extends NodeImpl {
16169
16528
  const chartNode = {
16170
16529
  type: "object",
16171
16530
  title: "Object",
16172
- id: (0, import_non_secure51.nanoid)(),
16531
+ id: (0, import_non_secure52.nanoid)(),
16173
16532
  visualData: {
16174
16533
  x: 0,
16175
16534
  y: 0,
@@ -16219,7 +16578,7 @@ var ObjectNodeImpl = class extends NodeImpl {
16219
16578
  }
16220
16579
  static getUIData() {
16221
16580
  return {
16222
- infoBoxBody: import_ts_dedent50.dedent`
16581
+ infoBoxBody: import_ts_dedent51.dedent`
16223
16582
  Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
16224
16583
 
16225
16584
  Use double-quotes around the input values to escape them. String values are automatically escaped.
@@ -16313,14 +16672,14 @@ var ObjectNodeImpl = class extends NodeImpl {
16313
16672
  var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
16314
16673
 
16315
16674
  // src/model/nodes/BooleanNode.ts
16316
- var import_non_secure52 = require("nanoid/non-secure");
16317
- var import_ts_dedent51 = require("ts-dedent");
16675
+ var import_non_secure53 = require("nanoid/non-secure");
16676
+ var import_ts_dedent52 = require("ts-dedent");
16318
16677
  var BooleanNodeImpl = class extends NodeImpl {
16319
16678
  static create() {
16320
16679
  const chartNode = {
16321
16680
  type: "boolean",
16322
16681
  title: "Bool",
16323
- id: (0, import_non_secure52.nanoid)(),
16682
+ id: (0, import_non_secure53.nanoid)(),
16324
16683
  visualData: {
16325
16684
  x: 0,
16326
16685
  y: 0,
@@ -16358,7 +16717,7 @@ var BooleanNodeImpl = class extends NodeImpl {
16358
16717
  }
16359
16718
  static getUIData() {
16360
16719
  return {
16361
- infoBoxBody: import_ts_dedent51.dedent`
16720
+ infoBoxBody: import_ts_dedent52.dedent`
16362
16721
  Outputs a boolean constant, or converts an input value into a boolean.
16363
16722
  `,
16364
16723
  infoBoxTitle: "Bool Node",
@@ -16379,16 +16738,16 @@ var BooleanNodeImpl = class extends NodeImpl {
16379
16738
  var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
16380
16739
 
16381
16740
  // src/model/nodes/CompareNode.ts
16382
- var import_non_secure53 = require("nanoid/non-secure");
16741
+ var import_non_secure54 = require("nanoid/non-secure");
16383
16742
  var import_lodash_es14 = require("lodash");
16384
16743
  var import_ts_pattern5 = require("ts-pattern");
16385
- var import_ts_dedent52 = require("ts-dedent");
16744
+ var import_ts_dedent53 = require("ts-dedent");
16386
16745
  var CompareNodeImpl = class extends NodeImpl {
16387
16746
  static create() {
16388
16747
  const chartNode = {
16389
16748
  type: "compare",
16390
16749
  title: "Compare",
16391
- id: (0, import_non_secure53.nanoid)(),
16750
+ id: (0, import_non_secure54.nanoid)(),
16392
16751
  visualData: {
16393
16752
  x: 0,
16394
16753
  y: 0,
@@ -16460,7 +16819,7 @@ var CompareNodeImpl = class extends NodeImpl {
16460
16819
  }
16461
16820
  static getUIData() {
16462
16821
  return {
16463
- infoBoxBody: import_ts_dedent52.dedent`
16822
+ infoBoxBody: import_ts_dedent53.dedent`
16464
16823
  Compares two values using the configured operator and outputs the result.
16465
16824
 
16466
16825
  If the data types of the values do not match, then the B value is converted to the type of the A value.
@@ -16501,9 +16860,9 @@ var CompareNodeImpl = class extends NodeImpl {
16501
16860
  var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
16502
16861
 
16503
16862
  // src/model/nodes/EvaluateNode.ts
16504
- var import_non_secure54 = require("nanoid/non-secure");
16863
+ var import_non_secure55 = require("nanoid/non-secure");
16505
16864
  var import_ts_pattern6 = require("ts-pattern");
16506
- var import_ts_dedent53 = require("ts-dedent");
16865
+ var import_ts_dedent54 = require("ts-dedent");
16507
16866
  var unaryOperation = ["abs", "negate"];
16508
16867
  var isUnaryOp = (operation) => unaryOperation.includes(operation);
16509
16868
  var EvaluateNodeImpl = class extends NodeImpl {
@@ -16511,7 +16870,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
16511
16870
  const chartNode = {
16512
16871
  type: "evaluate",
16513
16872
  title: "Evaluate",
16514
- id: (0, import_non_secure54.nanoid)(),
16873
+ id: (0, import_non_secure55.nanoid)(),
16515
16874
  visualData: {
16516
16875
  x: 0,
16517
16876
  y: 0,
@@ -16589,7 +16948,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
16589
16948
  }
16590
16949
  static getUIData() {
16591
16950
  return {
16592
- infoBoxBody: import_ts_dedent53.dedent`
16951
+ infoBoxBody: import_ts_dedent54.dedent`
16593
16952
  Evaluates the configured mathematical operation on the input values and outputs the result.
16594
16953
 
16595
16954
  For more complex operations, you should use the \`Code\` node.
@@ -16625,14 +16984,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
16625
16984
  var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
16626
16985
 
16627
16986
  // src/model/nodes/NumberNode.ts
16628
- var import_non_secure55 = require("nanoid/non-secure");
16629
- var import_ts_dedent54 = require("ts-dedent");
16987
+ var import_non_secure56 = require("nanoid/non-secure");
16988
+ var import_ts_dedent55 = require("ts-dedent");
16630
16989
  var NumberNodeImpl = class extends NodeImpl {
16631
16990
  static create() {
16632
16991
  const chartNode = {
16633
16992
  type: "number",
16634
16993
  title: "Number",
16635
- id: (0, import_non_secure55.nanoid)(),
16994
+ id: (0, import_non_secure56.nanoid)(),
16636
16995
  visualData: {
16637
16996
  x: 0,
16638
16997
  y: 0,
@@ -16676,7 +17035,7 @@ var NumberNodeImpl = class extends NodeImpl {
16676
17035
  }
16677
17036
  static getUIData() {
16678
17037
  return {
16679
- infoBoxBody: import_ts_dedent54.dedent`
17038
+ infoBoxBody: import_ts_dedent55.dedent`
16680
17039
  Outputs a number constant, or converts an input value into a number.
16681
17040
 
16682
17041
  Can be configured to round the number to a certain number of decimal places.
@@ -16703,8 +17062,8 @@ var NumberNodeImpl = class extends NodeImpl {
16703
17062
  var numberNode = nodeDefinition(NumberNodeImpl, "Number");
16704
17063
 
16705
17064
  // src/model/nodes/RandomNumberNode.ts
16706
- var import_non_secure56 = require("nanoid/non-secure");
16707
- var import_ts_dedent55 = require("ts-dedent");
17065
+ var import_non_secure57 = require("nanoid/non-secure");
17066
+ var import_ts_dedent56 = require("ts-dedent");
16708
17067
  var randomNumberTypeOptions = [
16709
17068
  { value: false, label: "Float" },
16710
17069
  { value: true, label: "Integer" }
@@ -16714,7 +17073,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16714
17073
  const chartNode = {
16715
17074
  type: "randomNumber",
16716
17075
  title: "Random number",
16717
- id: (0, import_non_secure56.nanoid)(),
17076
+ id: (0, import_non_secure57.nanoid)(),
16718
17077
  visualData: {
16719
17078
  x: 0,
16720
17079
  y: 0,
@@ -16772,7 +17131,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16772
17131
  ];
16773
17132
  }
16774
17133
  getBody() {
16775
- return import_ts_dedent55.dedent`
17134
+ return import_ts_dedent56.dedent`
16776
17135
  Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
16777
17136
  Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
16778
17137
  ${this.data.integers ? "Integers" : "Floats"}
@@ -16781,7 +17140,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16781
17140
  }
16782
17141
  static getUIData() {
16783
17142
  return {
16784
- infoBoxBody: import_ts_dedent55.dedent`
17143
+ infoBoxBody: import_ts_dedent56.dedent`
16785
17144
  Outputs a random number between the configured min and max values.
16786
17145
 
16787
17146
  Can be configured to output only integers, and whether the max value is inclusive or exclusive.
@@ -16812,15 +17171,15 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16812
17171
  var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
16813
17172
 
16814
17173
  // src/model/nodes/ShuffleNode.ts
16815
- var import_non_secure57 = require("nanoid/non-secure");
17174
+ var import_non_secure58 = require("nanoid/non-secure");
16816
17175
  var import_lodash_es15 = require("lodash");
16817
- var import_ts_dedent56 = require("ts-dedent");
17176
+ var import_ts_dedent57 = require("ts-dedent");
16818
17177
  var ShuffleNodeImpl = class extends NodeImpl {
16819
17178
  static create() {
16820
17179
  const chartNode = {
16821
17180
  type: "shuffle",
16822
17181
  title: "Shuffle",
16823
- id: (0, import_non_secure57.nanoid)(),
17182
+ id: (0, import_non_secure58.nanoid)(),
16824
17183
  visualData: {
16825
17184
  x: 0,
16826
17185
  y: 0,
@@ -16850,7 +17209,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
16850
17209
  }
16851
17210
  static getUIData() {
16852
17211
  return {
16853
- infoBoxBody: import_ts_dedent56.dedent`
17212
+ infoBoxBody: import_ts_dedent57.dedent`
16854
17213
  Shuffles the input array. Outputs the shuffled array.
16855
17214
  `,
16856
17215
  infoBoxTitle: "Shuffle Node",
@@ -16874,14 +17233,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
16874
17233
  var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
16875
17234
 
16876
17235
  // src/model/nodes/CommentNode.ts
16877
- var import_non_secure58 = require("nanoid/non-secure");
16878
- var import_ts_dedent57 = require("ts-dedent");
17236
+ var import_non_secure59 = require("nanoid/non-secure");
17237
+ var import_ts_dedent58 = require("ts-dedent");
16879
17238
  var CommentNodeImpl = class extends NodeImpl {
16880
17239
  static create() {
16881
17240
  const chartNode = {
16882
17241
  type: "comment",
16883
17242
  title: "Comment",
16884
- id: (0, import_non_secure58.nanoid)(),
17243
+ id: (0, import_non_secure59.nanoid)(),
16885
17244
  visualData: {
16886
17245
  x: 0,
16887
17246
  y: 0,
@@ -16927,7 +17286,7 @@ var CommentNodeImpl = class extends NodeImpl {
16927
17286
  }
16928
17287
  static getUIData() {
16929
17288
  return {
16930
- infoBoxBody: import_ts_dedent57.dedent`
17289
+ infoBoxBody: import_ts_dedent58.dedent`
16931
17290
  A comment node is a node that does nothing. It is useful for adding notes to a graph.
16932
17291
  `,
16933
17292
  infoBoxTitle: "Comment Node",
@@ -16942,11 +17301,11 @@ var CommentNodeImpl = class extends NodeImpl {
16942
17301
  var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
16943
17302
 
16944
17303
  // src/model/nodes/ImageNode.ts
16945
- var import_non_secure59 = require("nanoid/non-secure");
17304
+ var import_non_secure60 = require("nanoid/non-secure");
16946
17305
  var ImageNodeImpl = class extends NodeImpl {
16947
17306
  static create() {
16948
17307
  return {
16949
- id: (0, import_non_secure59.nanoid)(),
17308
+ id: (0, import_non_secure60.nanoid)(),
16950
17309
  type: "image",
16951
17310
  title: "Image",
16952
17311
  visualData: { x: 0, y: 0, width: 250 },
@@ -17043,11 +17402,11 @@ var ImageNodeImpl = class extends NodeImpl {
17043
17402
  var imageNode = nodeDefinition(ImageNodeImpl, "Image");
17044
17403
 
17045
17404
  // src/model/nodes/AudioNode.ts
17046
- var import_non_secure60 = require("nanoid/non-secure");
17405
+ var import_non_secure61 = require("nanoid/non-secure");
17047
17406
  var AudioNodeImpl = class extends NodeImpl {
17048
17407
  static create() {
17049
17408
  return {
17050
- id: (0, import_non_secure60.nanoid)(),
17409
+ id: (0, import_non_secure61.nanoid)(),
17051
17410
  type: "audio",
17052
17411
  title: "Audio",
17053
17412
  visualData: { x: 0, y: 0, width: 300 },
@@ -17140,7 +17499,7 @@ var AudioNodeImpl = class extends NodeImpl {
17140
17499
  var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
17141
17500
 
17142
17501
  // src/model/nodes/HttpCallNode.ts
17143
- var import_non_secure61 = require("nanoid/non-secure");
17502
+ var import_non_secure62 = require("nanoid/non-secure");
17144
17503
  var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
17145
17504
  var REQUEST_ERROR_OUTPUT_ID = "requestError";
17146
17505
  var STATUS_CODE_OUTPUT_ID = "statusCode";
@@ -17369,7 +17728,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
17369
17728
  const chartNode = {
17370
17729
  type: "httpCall",
17371
17730
  title: "Http Call",
17372
- id: (0, import_non_secure61.nanoid)(),
17731
+ id: (0, import_non_secure62.nanoid)(),
17373
17732
  visualData: {
17374
17733
  x: 0,
17375
17734
  y: 0,
@@ -17709,14 +18068,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
17709
18068
  var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
17710
18069
 
17711
18070
  // src/model/nodes/DelayNode.ts
17712
- var import_non_secure62 = require("nanoid/non-secure");
17713
- var import_ts_dedent58 = require("ts-dedent");
18071
+ var import_non_secure63 = require("nanoid/non-secure");
18072
+ var import_ts_dedent59 = require("ts-dedent");
17714
18073
  var DelayNodeImpl = class extends NodeImpl {
17715
18074
  static create() {
17716
18075
  const chartNode = {
17717
18076
  type: "delay",
17718
18077
  title: "Delay",
17719
- id: (0, import_non_secure62.nanoid)(),
18078
+ id: (0, import_non_secure63.nanoid)(),
17720
18079
  visualData: {
17721
18080
  x: 0,
17722
18081
  y: 0,
@@ -17761,7 +18120,7 @@ var DelayNodeImpl = class extends NodeImpl {
17761
18120
  }
17762
18121
  static getUIData() {
17763
18122
  return {
17764
- infoBoxBody: import_ts_dedent58.dedent`
18123
+ infoBoxBody: import_ts_dedent59.dedent`
17765
18124
  Delays the execution and then passes the input value to the output without any modifications.
17766
18125
  `,
17767
18126
  infoBoxTitle: "Delay Node",
@@ -17812,12 +18171,12 @@ var DelayNodeImpl = class extends NodeImpl {
17812
18171
  var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
17813
18172
 
17814
18173
  // src/model/nodes/AppendToDatasetNode.ts
17815
- var import_non_secure63 = require("nanoid/non-secure");
17816
- var import_ts_dedent59 = require("ts-dedent");
18174
+ var import_non_secure64 = require("nanoid/non-secure");
18175
+ var import_ts_dedent60 = require("ts-dedent");
17817
18176
  var AppendToDatasetNodeImpl = class extends NodeImpl {
17818
18177
  static create() {
17819
18178
  return {
17820
- id: (0, import_non_secure63.nanoid)(),
18179
+ id: (0, import_non_secure64.nanoid)(),
17821
18180
  type: "appendToDataset",
17822
18181
  title: "Append to Dataset",
17823
18182
  visualData: { x: 0, y: 0, width: 250 },
@@ -17873,7 +18232,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
17873
18232
  }
17874
18233
  static getUIData() {
17875
18234
  return {
17876
- infoBoxBody: import_ts_dedent59.dedent`
18235
+ infoBoxBody: import_ts_dedent60.dedent`
17877
18236
  Appends a row of data to the specified dataset.
17878
18237
  `,
17879
18238
  infoBoxTitle: "Append to Dataset Node",
@@ -18423,14 +18782,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
18423
18782
  var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
18424
18783
 
18425
18784
  // src/model/nodes/SliceNode.ts
18426
- var import_non_secure64 = require("nanoid/non-secure");
18427
- var import_ts_dedent60 = require("ts-dedent");
18785
+ var import_non_secure65 = require("nanoid/non-secure");
18786
+ var import_ts_dedent61 = require("ts-dedent");
18428
18787
  var SliceNodeImpl = class extends NodeImpl {
18429
18788
  static create() {
18430
18789
  const chartNode = {
18431
18790
  type: "slice",
18432
18791
  title: "Slice",
18433
- id: (0, import_non_secure64.nanoid)(),
18792
+ id: (0, import_non_secure65.nanoid)(),
18434
18793
  visualData: {
18435
18794
  x: 0,
18436
18795
  y: 0,
@@ -18483,14 +18842,14 @@ var SliceNodeImpl = class extends NodeImpl {
18483
18842
  ];
18484
18843
  }
18485
18844
  getBody() {
18486
- return import_ts_dedent60.dedent`
18845
+ return import_ts_dedent61.dedent`
18487
18846
  Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
18488
18847
  Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
18489
18848
  `;
18490
18849
  }
18491
18850
  static getUIData() {
18492
18851
  return {
18493
- infoBoxBody: import_ts_dedent60.dedent`
18852
+ infoBoxBody: import_ts_dedent61.dedent`
18494
18853
  Slices an array from the start index for the count number of elements.
18495
18854
 
18496
18855
  Useful for extracting a portion of an array.
@@ -18516,14 +18875,14 @@ var SliceNodeImpl = class extends NodeImpl {
18516
18875
  var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
18517
18876
 
18518
18877
  // src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
18519
- var import_non_secure65 = require("nanoid/non-secure");
18520
- var import_ts_dedent61 = require("ts-dedent");
18878
+ var import_non_secure66 = require("nanoid/non-secure");
18879
+ var import_ts_dedent62 = require("ts-dedent");
18521
18880
  var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
18522
18881
  static create() {
18523
18882
  const chartNode = {
18524
18883
  type: "extractMarkdownCodeBlocks",
18525
18884
  title: "Extract Markdown Code Blocks",
18526
- id: (0, import_non_secure65.nanoid)(),
18885
+ id: (0, import_non_secure66.nanoid)(),
18527
18886
  visualData: {
18528
18887
  x: 0,
18529
18888
  y: 0,
@@ -18564,7 +18923,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
18564
18923
  }
18565
18924
  static getUIData() {
18566
18925
  return {
18567
- infoBoxBody: import_ts_dedent61.dedent`
18926
+ infoBoxBody: import_ts_dedent62.dedent`
18568
18927
  Extracts the code blocks in the input Markdown text.
18569
18928
 
18570
18929
  Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
@@ -18615,7 +18974,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
18615
18974
  );
18616
18975
 
18617
18976
  // src/model/nodes/AssembleMessageNode.ts
18618
- var import_non_secure66 = require("nanoid/non-secure");
18977
+ var import_non_secure67 = require("nanoid/non-secure");
18619
18978
  var import_lodash_es16 = require("lodash");
18620
18979
  var import_ts_pattern7 = require("ts-pattern");
18621
18980
  var messageTypeToTitle = {
@@ -18629,7 +18988,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
18629
18988
  const chartNode = {
18630
18989
  type: "assembleMessage",
18631
18990
  title: "Assemble Message",
18632
- id: (0, import_non_secure66.nanoid)(),
18991
+ id: (0, import_non_secure67.nanoid)(),
18633
18992
  visualData: {
18634
18993
  x: 0,
18635
18994
  y: 0,
@@ -18826,13 +19185,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
18826
19185
  var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
18827
19186
 
18828
19187
  // src/model/nodes/URLReferenceNode.ts
18829
- var import_non_secure67 = require("nanoid/non-secure");
19188
+ var import_non_secure68 = require("nanoid/non-secure");
18830
19189
  var UrlReferenceNodeImpl = class extends NodeImpl {
18831
19190
  static create() {
18832
19191
  const chartNode = {
18833
19192
  type: "urlReference",
18834
19193
  title: "URL Reference",
18835
- id: (0, import_non_secure67.nanoid)(),
19194
+ id: (0, import_non_secure68.nanoid)(),
18836
19195
  visualData: {
18837
19196
  x: 0,
18838
19197
  y: 0,
@@ -18901,15 +19260,15 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
18901
19260
  var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
18902
19261
 
18903
19262
  // src/model/nodes/DestructureNode.ts
18904
- var import_non_secure68 = require("nanoid/non-secure");
19263
+ var import_non_secure69 = require("nanoid/non-secure");
18905
19264
  var import_jsonpath_plus3 = require("jsonpath-plus");
18906
- var import_ts_dedent62 = require("ts-dedent");
19265
+ var import_ts_dedent63 = require("ts-dedent");
18907
19266
  var DestructureNodeImpl = class extends NodeImpl {
18908
19267
  static create() {
18909
19268
  const chartNode = {
18910
19269
  type: "destructure",
18911
19270
  title: "Destructure",
18912
- id: (0, import_non_secure68.nanoid)(),
19271
+ id: (0, import_non_secure69.nanoid)(),
18913
19272
  visualData: {
18914
19273
  x: 0,
18915
19274
  y: 0,
@@ -18917,7 +19276,7 @@ var DestructureNodeImpl = class extends NodeImpl {
18917
19276
  },
18918
19277
  data: {
18919
19278
  paths: ["$.value"],
18920
- pathPortIds: [(0, import_non_secure68.nanoid)()]
19279
+ pathPortIds: [(0, import_non_secure69.nanoid)()]
18921
19280
  }
18922
19281
  };
18923
19282
  return chartNode;
@@ -18971,7 +19330,7 @@ var DestructureNodeImpl = class extends NodeImpl {
18971
19330
  }
18972
19331
  static getUIData() {
18973
19332
  return {
18974
- infoBoxBody: import_ts_dedent62.dedent`
19333
+ infoBoxBody: import_ts_dedent63.dedent`
18975
19334
  Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
18976
19335
  `,
18977
19336
  infoBoxTitle: "Destructure Node",
@@ -19005,12 +19364,12 @@ var DestructureNodeImpl = class extends NodeImpl {
19005
19364
  var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
19006
19365
 
19007
19366
  // src/model/nodes/ReplaceDatasetNode.ts
19008
- var import_non_secure69 = require("nanoid/non-secure");
19009
- var import_ts_dedent63 = require("ts-dedent");
19367
+ var import_non_secure70 = require("nanoid/non-secure");
19368
+ var import_ts_dedent64 = require("ts-dedent");
19010
19369
  var ReplaceDatasetNodeImpl = class extends NodeImpl {
19011
19370
  static create() {
19012
19371
  return {
19013
- id: (0, import_non_secure69.nanoid)(),
19372
+ id: (0, import_non_secure70.nanoid)(),
19014
19373
  type: "replaceDataset",
19015
19374
  title: "Replace Dataset",
19016
19375
  visualData: { x: 0, y: 0, width: 250 },
@@ -19049,7 +19408,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
19049
19408
  }
19050
19409
  static getUIData() {
19051
19410
  return {
19052
- infoBoxBody: import_ts_dedent63.dedent`
19411
+ infoBoxBody: import_ts_dedent64.dedent`
19053
19412
  Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
19054
19413
  `,
19055
19414
  infoBoxTitle: "Replace Dataset Node",
@@ -19181,14 +19540,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
19181
19540
  var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
19182
19541
 
19183
19542
  // src/model/nodes/GraphReferenceNode.ts
19184
- var import_non_secure70 = require("nanoid/non-secure");
19185
- var import_ts_dedent64 = require("ts-dedent");
19543
+ var import_non_secure71 = require("nanoid/non-secure");
19544
+ var import_ts_dedent65 = require("ts-dedent");
19186
19545
  var GraphReferenceNodeImpl = class extends NodeImpl {
19187
19546
  static create() {
19188
19547
  const chartNode = {
19189
19548
  type: "graphReference",
19190
19549
  title: "Graph Reference",
19191
- id: (0, import_non_secure70.nanoid)(),
19550
+ id: (0, import_non_secure71.nanoid)(),
19192
19551
  visualData: {
19193
19552
  x: 0,
19194
19553
  y: 0,
@@ -19237,7 +19596,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
19237
19596
  }
19238
19597
  static getUIData() {
19239
19598
  return {
19240
- infoBoxBody: import_ts_dedent64.dedent`
19599
+ infoBoxBody: import_ts_dedent65.dedent`
19241
19600
  Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
19242
19601
  `,
19243
19602
  infoBoxTitle: "Graph Reference Node",
@@ -19303,8 +19662,8 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
19303
19662
  var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
19304
19663
 
19305
19664
  // src/model/nodes/CallGraphNode.ts
19306
- var import_non_secure71 = require("nanoid/non-secure");
19307
- var import_ts_dedent65 = require("ts-dedent");
19665
+ var import_non_secure72 = require("nanoid/non-secure");
19666
+ var import_ts_dedent66 = require("ts-dedent");
19308
19667
 
19309
19668
  // src/api/looseDataValue.ts
19310
19669
  var import_lodash_es17 = require("lodash");
@@ -19330,7 +19689,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
19330
19689
  const chartNode = {
19331
19690
  type: "callGraph",
19332
19691
  title: "Call Graph",
19333
- id: (0, import_non_secure71.nanoid)(),
19692
+ id: (0, import_non_secure72.nanoid)(),
19334
19693
  visualData: {
19335
19694
  x: 0,
19336
19695
  y: 0,
@@ -19380,7 +19739,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
19380
19739
  }
19381
19740
  static getUIData() {
19382
19741
  return {
19383
- infoBoxBody: import_ts_dedent65.dedent`
19742
+ infoBoxBody: import_ts_dedent66.dedent`
19384
19743
  Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
19385
19744
  `,
19386
19745
  infoBoxTitle: "Call Graph Node",
@@ -19452,7 +19811,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
19452
19811
 
19453
19812
  // src/model/nodes/DelegateFunctionCallNode.ts
19454
19813
  var import_nanoid = require("nanoid");
19455
- var import_ts_dedent66 = require("ts-dedent");
19814
+ var import_ts_dedent67 = require("ts-dedent");
19456
19815
  var DelegateFunctionCallNodeImpl = class extends NodeImpl {
19457
19816
  static create() {
19458
19817
  const chartNode = {
@@ -19504,7 +19863,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
19504
19863
  }
19505
19864
  static getUIData() {
19506
19865
  return {
19507
- infoBoxBody: import_ts_dedent66.dedent`
19866
+ infoBoxBody: import_ts_dedent67.dedent`
19508
19867
  Handles a tool call by delegating it to a different subgraph depending on the tool call.
19509
19868
  `,
19510
19869
  infoBoxTitle: "Delegate Tool Call Node",
@@ -19625,11 +19984,11 @@ function buildDelegatedToolCallOutputs(records) {
19625
19984
  var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
19626
19985
 
19627
19986
  // src/model/nodes/PlayAudioNode.ts
19628
- var import_non_secure72 = require("nanoid/non-secure");
19987
+ var import_non_secure73 = require("nanoid/non-secure");
19629
19988
  var PlayAudioNodeImpl = class extends NodeImpl {
19630
19989
  static create() {
19631
19990
  return {
19632
- id: (0, import_non_secure72.nanoid)(),
19991
+ id: (0, import_non_secure73.nanoid)(),
19633
19992
  type: "playAudio",
19634
19993
  title: "Play Audio",
19635
19994
  visualData: { x: 0, y: 0, width: 200 },
@@ -19683,11 +20042,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
19683
20042
  var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
19684
20043
 
19685
20044
  // src/model/nodes/DocumentNode.ts
19686
- var import_non_secure73 = require("nanoid/non-secure");
20045
+ var import_non_secure74 = require("nanoid/non-secure");
19687
20046
  var DocumentNodeImpl = class extends NodeImpl {
19688
20047
  static create() {
19689
20048
  return {
19690
- id: (0, import_non_secure73.nanoid)(),
20049
+ id: (0, import_non_secure74.nanoid)(),
19691
20050
  type: "document",
19692
20051
  title: "Document",
19693
20052
  visualData: { x: 0, y: 0, width: 300 },
@@ -19853,14 +20212,14 @@ var DocumentNodeImpl = class extends NodeImpl {
19853
20212
  var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
19854
20213
 
19855
20214
  // src/model/nodes/ChatLoopNode.ts
19856
- var import_non_secure74 = require("nanoid/non-secure");
19857
- var import_ts_dedent67 = require("ts-dedent");
20215
+ var import_non_secure75 = require("nanoid/non-secure");
20216
+ var import_ts_dedent68 = require("ts-dedent");
19858
20217
  var ChatLoopNodeImpl = class extends NodeImpl {
19859
20218
  static create() {
19860
20219
  const chartNode = {
19861
20220
  type: "chatLoop",
19862
20221
  title: "Chat Loop",
19863
- id: (0, import_non_secure74.nanoid)(),
20222
+ id: (0, import_non_secure75.nanoid)(),
19864
20223
  visualData: {
19865
20224
  x: 0,
19866
20225
  y: 0,
@@ -19893,7 +20252,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
19893
20252
  }
19894
20253
  static getUIData() {
19895
20254
  return {
19896
- infoBoxBody: import_ts_dedent67.dedent`
20255
+ infoBoxBody: import_ts_dedent68.dedent`
19897
20256
  Creates an interactive chat loop with an AI model. The node will:
19898
20257
  1. Send the initial prompt to the AI
19899
20258
  2. Show the AI's response and prompt for user input
@@ -19993,12 +20352,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
19993
20352
  var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, "Chat Loop");
19994
20353
 
19995
20354
  // src/model/nodes/ReadAllFilesNode.ts
19996
- var import_non_secure75 = require("nanoid/non-secure");
19997
- var import_ts_dedent68 = require("ts-dedent");
20355
+ var import_non_secure76 = require("nanoid/non-secure");
20356
+ var import_ts_dedent69 = require("ts-dedent");
19998
20357
  var ReadAllFilesNodeImpl = class extends NodeImpl {
19999
20358
  static create() {
20000
20359
  return {
20001
- id: (0, import_non_secure75.nanoid)(),
20360
+ id: (0, import_non_secure76.nanoid)(),
20002
20361
  type: "readAllFiles",
20003
20362
  title: "Read All Files",
20004
20363
  visualData: { x: 0, y: 0, width: 250 },
@@ -20109,7 +20468,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20109
20468
  ];
20110
20469
  }
20111
20470
  getBody() {
20112
- return import_ts_dedent68.dedent`
20471
+ return import_ts_dedent69.dedent`
20113
20472
  ${this.data.asBinary ? "Read as Binary" : "Read as Text"}
20114
20473
  Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
20115
20474
  Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
@@ -20118,7 +20477,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20118
20477
  }
20119
20478
  static getUIData() {
20120
20479
  return {
20121
- infoBoxBody: import_ts_dedent68.dedent`
20480
+ infoBoxBody: import_ts_dedent69.dedent`
20122
20481
  Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
20123
20482
  Each object has a 'path' (string) and 'content' (string or binary) property.
20124
20483
  `,
@@ -20191,14 +20550,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20191
20550
  var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
20192
20551
 
20193
20552
  // src/model/nodes/ToMarkdownTableNode.ts
20194
- var import_non_secure76 = require("nanoid/non-secure");
20195
- var import_ts_dedent69 = require("ts-dedent");
20553
+ var import_non_secure77 = require("nanoid/non-secure");
20554
+ var import_ts_dedent70 = require("ts-dedent");
20196
20555
  var ToMarkdownTableNodeImpl = class extends NodeImpl {
20197
20556
  static create() {
20198
20557
  const chartNode = {
20199
20558
  type: "toMarkdownTable",
20200
20559
  title: "To Markdown Table",
20201
- id: (0, import_non_secure76.nanoid)(),
20560
+ id: (0, import_non_secure77.nanoid)(),
20202
20561
  visualData: {
20203
20562
  x: 0,
20204
20563
  y: 0,
@@ -20254,7 +20613,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
20254
20613
  }
20255
20614
  static getUIData() {
20256
20615
  return {
20257
- infoBoxBody: import_ts_dedent69.dedent`
20616
+ infoBoxBody: import_ts_dedent70.dedent`
20258
20617
  Converts an array of objects into a markdown table format.
20259
20618
  Input should be an array of objects with consistent keys.
20260
20619
  `,
@@ -20306,7 +20665,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
20306
20665
 
20307
20666
  // src/model/nodes/CronNode.ts
20308
20667
  var import_nanoid2 = require("nanoid");
20309
- var import_ts_dedent70 = require("ts-dedent");
20668
+ var import_ts_dedent71 = require("ts-dedent");
20310
20669
  var cronParser = __toESM(require("cron-parser"), 1);
20311
20670
  var CronNodeImpl = class extends NodeImpl {
20312
20671
  static create() {
@@ -20376,7 +20735,7 @@ var CronNodeImpl = class extends NodeImpl {
20376
20735
  }
20377
20736
  static getUIData() {
20378
20737
  return {
20379
- infoBoxBody: import_ts_dedent70.dedent`
20738
+ infoBoxBody: import_ts_dedent71.dedent`
20380
20739
  Executes a subgraph on a schedule. Supports:
20381
20740
  - Natural language (e.g., "every 5 minutes", "daily at 3pm")
20382
20741
  - Cron expressions (e.g., "0 * * * *")
@@ -20416,7 +20775,7 @@ var CronNodeImpl = class extends NodeImpl {
20416
20775
  type: "string",
20417
20776
  dataKey: "schedule",
20418
20777
  label: "Schedule",
20419
- helperMessage: import_ts_dedent70.dedent`
20778
+ helperMessage: import_ts_dedent71.dedent`
20420
20779
  Examples:
20421
20780
  Cron: "*/5 * * * *", "0 15 * * *"
20422
20781
  Interval: "5 minutes", "1 hour", "7 days"
@@ -20547,15 +20906,15 @@ ${this.data.schedule}`;
20547
20906
  var cronNode = nodeDefinition(CronNodeImpl, "Cron");
20548
20907
 
20549
20908
  // src/model/nodes/ToTreeNode.ts
20550
- var import_non_secure77 = require("nanoid/non-secure");
20551
- var import_ts_dedent71 = require("ts-dedent");
20909
+ var import_non_secure78 = require("nanoid/non-secure");
20910
+ var import_ts_dedent72 = require("ts-dedent");
20552
20911
  var import_lodash_es18 = require("lodash");
20553
20912
  var ToTreeNodeImpl = class extends NodeImpl {
20554
20913
  static create() {
20555
20914
  const chartNode = {
20556
20915
  type: "toTree",
20557
20916
  title: "To Tree",
20558
- id: (0, import_non_secure77.nanoid)(),
20917
+ id: (0, import_non_secure78.nanoid)(),
20559
20918
  visualData: {
20560
20919
  x: 0,
20561
20920
  y: 0,
@@ -20610,7 +20969,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
20610
20969
  ];
20611
20970
  }
20612
20971
  getBody() {
20613
- return import_ts_dedent71.dedent`
20972
+ return import_ts_dedent72.dedent`
20614
20973
  Format: ${this.data.format}
20615
20974
  Children: ${this.data.childrenProperty}
20616
20975
  Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
@@ -20618,7 +20977,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
20618
20977
  }
20619
20978
  static getUIData() {
20620
20979
  return {
20621
- infoBoxBody: import_ts_dedent71.dedent`
20980
+ infoBoxBody: import_ts_dedent72.dedent`
20622
20981
  Converts an array of objects into a tree structure and renders it as text.
20623
20982
 
20624
20983
  The format field supports interpolation using {{property}} syntax to determine
@@ -20673,14 +21032,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
20673
21032
  var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
20674
21033
 
20675
21034
  // src/model/nodes/LoopUntilNode.ts
20676
- var import_non_secure78 = require("nanoid/non-secure");
20677
- var import_ts_dedent72 = require("ts-dedent");
21035
+ var import_non_secure79 = require("nanoid/non-secure");
21036
+ var import_ts_dedent73 = require("ts-dedent");
20678
21037
  var LoopUntilNodeImpl = class extends NodeImpl {
20679
21038
  static create() {
20680
21039
  const chartNode = {
20681
21040
  type: "loopUntil",
20682
21041
  title: "Loop Until",
20683
- id: (0, import_non_secure78.nanoid)(),
21042
+ id: (0, import_non_secure79.nanoid)(),
20684
21043
  visualData: {
20685
21044
  x: 0,
20686
21045
  y: 0,
@@ -20804,7 +21163,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
20804
21163
  }
20805
21164
  static getUIData() {
20806
21165
  return {
20807
- infoBoxBody: import_ts_dedent72.dedent`
21166
+ infoBoxBody: import_ts_dedent73.dedent`
20808
21167
  Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
20809
21168
  the inputs for the next iteration. Supports different stopping conditions and optional
20810
21169
  maximum iterations.
@@ -21162,14 +21521,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
21162
21521
  var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
21163
21522
 
21164
21523
  // src/model/nodes/MCPToolCallNode.ts
21165
- var import_non_secure79 = require("nanoid/non-secure");
21166
- var import_ts_dedent73 = require("ts-dedent");
21524
+ var import_non_secure80 = require("nanoid/non-secure");
21525
+ var import_ts_dedent74 = require("ts-dedent");
21167
21526
  var MCPToolCallNodeImpl = class extends NodeImpl {
21168
21527
  static create() {
21169
21528
  const chartNode = {
21170
21529
  type: "mcpToolCall",
21171
21530
  title: "MCP Tool Call",
21172
- id: (0, import_non_secure79.nanoid)(),
21531
+ id: (0, import_non_secure80.nanoid)(),
21173
21532
  visualData: {
21174
21533
  x: 0,
21175
21534
  y: 0,
@@ -21182,7 +21541,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21182
21541
  serverUrl: "http://localhost:8080/mcp",
21183
21542
  serverId: "",
21184
21543
  toolName: "",
21185
- toolArguments: import_ts_dedent73.dedent`
21544
+ toolArguments: import_ts_dedent74.dedent`
21186
21545
  {
21187
21546
  "key": "value"
21188
21547
  }`,
@@ -21322,7 +21681,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21322
21681
  }
21323
21682
  static getUIData() {
21324
21683
  return {
21325
- infoBoxBody: import_ts_dedent73.dedent`
21684
+ infoBoxBody: import_ts_dedent74.dedent`
21326
21685
  Connects to an MCP (Model Context Protocol) server and gets a tool call response.
21327
21686
  `,
21328
21687
  infoBoxTitle: "MCP Tool Call Node",
@@ -21411,13 +21770,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21411
21770
  var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
21412
21771
 
21413
21772
  // src/model/nodes/MCPGetPromptNode.ts
21414
- var import_non_secure80 = require("nanoid/non-secure");
21773
+ var import_non_secure81 = require("nanoid/non-secure");
21415
21774
  var MCPGetPromptNodeImpl = class extends NodeImpl {
21416
21775
  static create() {
21417
21776
  const chartNode = {
21418
21777
  type: "mcpGetPrompt",
21419
21778
  title: "MCP Get Prompt",
21420
- id: (0, import_non_secure80.nanoid)(),
21779
+ id: (0, import_non_secure81.nanoid)(),
21421
21780
  visualData: {
21422
21781
  x: 0,
21423
21782
  y: 0,
@@ -21633,15 +21992,15 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
21633
21992
  var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
21634
21993
 
21635
21994
  // src/model/nodes/ReferencedGraphAliasNode.ts
21636
- var import_non_secure81 = require("nanoid/non-secure");
21637
- var import_ts_dedent74 = require("ts-dedent");
21995
+ var import_non_secure82 = require("nanoid/non-secure");
21996
+ var import_ts_dedent75 = require("ts-dedent");
21638
21997
  var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
21639
21998
  static create() {
21640
21999
  const chartNode = {
21641
22000
  type: "referencedGraphAlias",
21642
22001
  title: "",
21643
22002
  // Always set initially by the editor
21644
- id: (0, import_non_secure81.nanoid)(),
22003
+ id: (0, import_non_secure82.nanoid)(),
21645
22004
  visualData: {
21646
22005
  x: 0,
21647
22006
  y: 0,
@@ -21748,7 +22107,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
21748
22107
  }
21749
22108
  static getUIData() {
21750
22109
  return {
21751
- infoBoxBody: import_ts_dedent74.dedent`
22110
+ infoBoxBody: import_ts_dedent75.dedent`
21752
22111
  References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
21753
22112
  `,
21754
22113
  infoBoxTitle: "Referenced Graph Alias Node",
@@ -21842,7 +22201,7 @@ var referencedGraphAliasNode = nodeDefinition(ReferencedGraphAliasNodeImpl, "Ref
21842
22201
 
21843
22202
  // src/model/Nodes.ts
21844
22203
  var registerBuiltInNodes = (registry) => {
21845
- return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).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(contextNode).register(coalesceNode).register(passthroughNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).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);
22204
+ return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).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(contextNode).register(coalesceNode).register(didRunNode).register(passthroughNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).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);
21846
22205
  };
21847
22206
  var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
21848
22207
  function resetGlobalRivetNodeRegistry() {
@@ -21933,7 +22292,7 @@ var OpenAIEmbeddingGenerator = class {
21933
22292
  registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
21934
22293
 
21935
22294
  // src/recording/ExecutionRecorder.ts
21936
- var import_non_secure82 = require("nanoid/non-secure");
22295
+ var import_non_secure83 = require("nanoid/non-secure");
21937
22296
  var import_emittery2 = __toESM(require("emittery-0-13"), 1);
21938
22297
  var import_lodash_es19 = require("lodash");
21939
22298
  var import_json_stream_es = require("json-stream-es");
@@ -22126,7 +22485,7 @@ function serializeToObject(recording) {
22126
22485
  const asString = uint8ArrayToBase64Sync(val);
22127
22486
  const existingAsset = Object.entries(serialized.assets).find(([, asset]) => asset === asString);
22128
22487
  if (!existingAsset) {
22129
- const id = (0, import_non_secure82.nanoid)();
22488
+ const id = (0, import_non_secure83.nanoid)();
22130
22489
  serialized.assets[id] = asString;
22131
22490
  return `$ASSET:${id}`;
22132
22491
  } else {
@@ -22185,7 +22544,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
22185
22544
  once = void 0;
22186
22545
  recordSocket(channel) {
22187
22546
  return new Promise((resolve) => {
22188
- this.recordingId = (0, import_non_secure82.nanoid)();
22547
+ this.recordingId = (0, import_non_secure83.nanoid)();
22189
22548
  const listener = (event) => {
22190
22549
  const { message, data } = JSON.parse(event.data);
22191
22550
  if (this.#includePartialOutputs === false && message === "partialOutput") {
@@ -22210,7 +22569,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
22210
22569
  });
22211
22570
  }
22212
22571
  record(processor) {
22213
- this.recordingId = (0, import_non_secure82.nanoid)();
22572
+ this.recordingId = (0, import_non_secure83.nanoid)();
22214
22573
  processor.onAny((event, data) => {
22215
22574
  if (this.#includePartialOutputs === false && event === "partialOutput") {
22216
22575
  return;
@@ -22266,8 +22625,8 @@ var ExecutionRecorder = class _ExecutionRecorder {
22266
22625
  };
22267
22626
 
22268
22627
  // src/plugins/anthropic/nodes/ChatAnthropicNode.ts
22269
- var import_non_secure83 = require("nanoid/non-secure");
22270
- var import_ts_dedent75 = require("ts-dedent");
22628
+ var import_non_secure84 = require("nanoid/non-secure");
22629
+ var import_ts_dedent76 = require("ts-dedent");
22271
22630
  var import_p_retry2 = __toESM(require("p-retry-4"), 1);
22272
22631
 
22273
22632
  // src/utils/assertNever.ts
@@ -22282,7 +22641,7 @@ var ChatAnthropicNodeImpl = {
22282
22641
  const chartNode = {
22283
22642
  type: "chatAnthropic",
22284
22643
  title: "Chat (Anthropic, Legacy)",
22285
- id: (0, import_non_secure83.nanoid)(),
22644
+ id: (0, import_non_secure84.nanoid)(),
22286
22645
  visualData: {
22287
22646
  x: 0,
22288
22647
  y: 0,
@@ -22426,7 +22785,7 @@ var ChatAnthropicNodeImpl = {
22426
22785
  getBody(data) {
22427
22786
  var _a;
22428
22787
  const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
22429
- return import_ts_dedent75.dedent`
22788
+ return import_ts_dedent76.dedent`
22430
22789
  ${modelName}
22431
22790
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
22432
22791
  Max Tokens: ${data.maxTokens}
@@ -22551,7 +22910,7 @@ var ChatAnthropicNodeImpl = {
22551
22910
  },
22552
22911
  getUIData() {
22553
22912
  return {
22554
- infoBoxBody: import_ts_dedent75.dedent`
22913
+ infoBoxBody: import_ts_dedent76.dedent`
22555
22914
  Legacy Anthropic chat node.
22556
22915
 
22557
22916
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -23024,8 +23383,8 @@ var anthropicPlugin = {
23024
23383
  var anthropic_default = anthropicPlugin;
23025
23384
 
23026
23385
  // src/plugins/autoevals/AutoEvalsNode.ts
23027
- var import_non_secure84 = require("nanoid/non-secure");
23028
- var import_ts_dedent76 = require("ts-dedent");
23386
+ var import_non_secure85 = require("nanoid/non-secure");
23387
+ var import_ts_dedent77 = require("ts-dedent");
23029
23388
  var import_autoevals = require("autoevals");
23030
23389
  var import_ts_pattern8 = require("ts-pattern");
23031
23390
  var options = [
@@ -23044,7 +23403,7 @@ var AutoEvalsNodeImpl = {
23044
23403
  const chartNode = {
23045
23404
  type: "autoevals",
23046
23405
  title: "Autoevals",
23047
- id: (0, import_non_secure84.nanoid)(),
23406
+ id: (0, import_non_secure85.nanoid)(),
23048
23407
  visualData: {
23049
23408
  x: 0,
23050
23409
  y: 0,
@@ -23159,7 +23518,7 @@ var AutoEvalsNodeImpl = {
23159
23518
  },
23160
23519
  getUIData() {
23161
23520
  return {
23162
- infoBoxBody: import_ts_dedent76.dedent`
23521
+ infoBoxBody: import_ts_dedent77.dedent`
23163
23522
  Evaluates the validity of a response using the autoevals library.
23164
23523
  `,
23165
23524
  infoBoxTitle: "Autoevals Node",
@@ -23239,8 +23598,8 @@ var autoevalsPlugin = {
23239
23598
  var autoevals_default = autoevalsPlugin;
23240
23599
 
23241
23600
  // src/plugins/assemblyAi/LemurQaNode.ts
23242
- var import_non_secure85 = require("nanoid/non-secure");
23243
- var import_ts_dedent77 = require("ts-dedent");
23601
+ var import_non_secure86 = require("nanoid/non-secure");
23602
+ var import_ts_dedent78 = require("ts-dedent");
23244
23603
 
23245
23604
  // src/plugins/assemblyAi/lemurHelpers.ts
23246
23605
  var import_assemblyai = require("assemblyai");
@@ -23360,7 +23719,7 @@ var LemurQaNodeImpl = {
23360
23719
  const chartNode = {
23361
23720
  type: "assemblyAiLemurQa",
23362
23721
  title: "LeMUR Question & Answers",
23363
- id: (0, import_non_secure85.nanoid)(),
23722
+ id: (0, import_non_secure86.nanoid)(),
23364
23723
  visualData: {
23365
23724
  x: 0,
23366
23725
  y: 0,
@@ -23426,7 +23785,7 @@ var LemurQaNodeImpl = {
23426
23785
  },
23427
23786
  getUIData() {
23428
23787
  return {
23429
- infoBoxBody: import_ts_dedent77.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
23788
+ infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
23430
23789
  infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
23431
23790
  contextMenuTitle: "LeMUR Q&A",
23432
23791
  group: ["AI", "AssemblyAI"]
@@ -23498,14 +23857,14 @@ function applyQuestionEditors(data, question) {
23498
23857
  var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
23499
23858
 
23500
23859
  // src/plugins/assemblyAi/TranscribeAudioNode.ts
23501
- var import_non_secure86 = require("nanoid/non-secure");
23502
- var import_ts_dedent78 = require("ts-dedent");
23860
+ var import_non_secure87 = require("nanoid/non-secure");
23861
+ var import_ts_dedent79 = require("ts-dedent");
23503
23862
  var TranscribeAudioNodeImpl = {
23504
23863
  create() {
23505
23864
  const chartNode = {
23506
23865
  type: "assemblyAiTranscribeAudio",
23507
23866
  title: "Transcribe Audio",
23508
- id: (0, import_non_secure86.nanoid)(),
23867
+ id: (0, import_non_secure87.nanoid)(),
23509
23868
  visualData: {
23510
23869
  x: 0,
23511
23870
  y: 0,
@@ -23561,7 +23920,7 @@ var TranscribeAudioNodeImpl = {
23561
23920
  },
23562
23921
  getUIData() {
23563
23922
  return {
23564
- infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI to transcribe audio`,
23923
+ infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI to transcribe audio`,
23565
23924
  infoBoxTitle: "Transcribe Audio Node",
23566
23925
  contextMenuTitle: "Transcribe Audio",
23567
23926
  group: ["AI", "AssemblyAI"]
@@ -23620,15 +23979,15 @@ function getAdditionalParameters(data) {
23620
23979
  }
23621
23980
 
23622
23981
  // src/plugins/assemblyAi/LemurSummaryNode.ts
23623
- var import_non_secure87 = require("nanoid/non-secure");
23624
- var import_ts_dedent79 = require("ts-dedent");
23982
+ var import_non_secure88 = require("nanoid/non-secure");
23983
+ var import_ts_dedent80 = require("ts-dedent");
23625
23984
  var import_assemblyai3 = require("assemblyai");
23626
23985
  var LemurSummaryNodeImpl = {
23627
23986
  create() {
23628
23987
  const chartNode = {
23629
23988
  type: "assemblyAiLemurSummary",
23630
23989
  title: "LeMUR Summary",
23631
- id: (0, import_non_secure87.nanoid)(),
23990
+ id: (0, import_non_secure88.nanoid)(),
23632
23991
  visualData: {
23633
23992
  x: 0,
23634
23993
  y: 0,
@@ -23674,7 +24033,7 @@ var LemurSummaryNodeImpl = {
23674
24033
  },
23675
24034
  getUIData() {
23676
24035
  return {
23677
- infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
24036
+ infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
23678
24037
  infoBoxTitle: "Use AssemblyAI LeMUR Summary",
23679
24038
  contextMenuTitle: "LeMUR Summary",
23680
24039
  group: ["AI", "AssemblyAI"]
@@ -23698,15 +24057,15 @@ var LemurSummaryNodeImpl = {
23698
24057
  var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
23699
24058
 
23700
24059
  // src/plugins/assemblyAi/LemurTaskNode.ts
23701
- var import_non_secure88 = require("nanoid/non-secure");
23702
- var import_ts_dedent80 = require("ts-dedent");
24060
+ var import_non_secure89 = require("nanoid/non-secure");
24061
+ var import_ts_dedent81 = require("ts-dedent");
23703
24062
  var import_assemblyai4 = require("assemblyai");
23704
24063
  var LemurTaskNodeImpl = {
23705
24064
  create() {
23706
24065
  const chartNode = {
23707
24066
  type: "assemblyAiLemurTask",
23708
24067
  title: "LeMUR Task",
23709
- id: (0, import_non_secure88.nanoid)(),
24068
+ id: (0, import_non_secure89.nanoid)(),
23710
24069
  visualData: {
23711
24070
  x: 0,
23712
24071
  y: 0,
@@ -23752,7 +24111,7 @@ var LemurTaskNodeImpl = {
23752
24111
  },
23753
24112
  getUIData() {
23754
24113
  return {
23755
- infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
24114
+ infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
23756
24115
  infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
23757
24116
  contextMenuTitle: "LeMUR Custom Task",
23758
24117
  group: ["AI", "AssemblyAI"]
@@ -23778,14 +24137,14 @@ var LemurTaskNodeImpl = {
23778
24137
  var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
23779
24138
 
23780
24139
  // src/plugins/assemblyAi/LemurActionItemsNode.ts
23781
- var import_non_secure89 = require("nanoid/non-secure");
23782
- var import_ts_dedent81 = require("ts-dedent");
24140
+ var import_non_secure90 = require("nanoid/non-secure");
24141
+ var import_ts_dedent82 = require("ts-dedent");
23783
24142
  var LemurActionItemsNodeImpl = {
23784
24143
  create() {
23785
24144
  const chartNode = {
23786
24145
  type: "assemblyAiLemurActionItems",
23787
24146
  title: "LeMUR Action Items",
23788
- id: (0, import_non_secure89.nanoid)(),
24147
+ id: (0, import_non_secure90.nanoid)(),
23789
24148
  visualData: {
23790
24149
  x: 0,
23791
24150
  y: 0,
@@ -23831,7 +24190,7 @@ var LemurActionItemsNodeImpl = {
23831
24190
  },
23832
24191
  getUIData() {
23833
24192
  return {
23834
- infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
24193
+ infoBoxBody: import_ts_dedent82.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
23835
24194
  infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
23836
24195
  contextMenuTitle: "LeMUR Action Items",
23837
24196
  group: ["AI", "AssemblyAI"]
@@ -23883,12 +24242,12 @@ var assemblyAiPlugin = {
23883
24242
  var assemblyAi_default = assemblyAiPlugin;
23884
24243
 
23885
24244
  // src/plugins/huggingface/nodes/ChatHuggingFace.ts
23886
- var import_non_secure90 = require("nanoid/non-secure");
24245
+ var import_non_secure91 = require("nanoid/non-secure");
23887
24246
  var import_inference = require("@huggingface/inference");
23888
24247
  var ChatHuggingFaceNodeImpl = {
23889
24248
  create() {
23890
24249
  return {
23891
- id: (0, import_non_secure90.nanoid)(),
24250
+ id: (0, import_non_secure91.nanoid)(),
23892
24251
  type: "chatHuggingFace",
23893
24252
  data: {
23894
24253
  model: "",
@@ -24118,13 +24477,13 @@ var ChatHuggingFaceNodeImpl = {
24118
24477
  var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
24119
24478
 
24120
24479
  // src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
24121
- var import_non_secure91 = require("nanoid/non-secure");
24480
+ var import_non_secure92 = require("nanoid/non-secure");
24122
24481
  var import_inference2 = require("@huggingface/inference");
24123
- var import_ts_dedent82 = require("ts-dedent");
24482
+ var import_ts_dedent83 = require("ts-dedent");
24124
24483
  var TextToImageHuggingFaceNodeImpl = {
24125
24484
  create() {
24126
24485
  return {
24127
- id: (0, import_non_secure91.nanoid)(),
24486
+ id: (0, import_non_secure92.nanoid)(),
24128
24487
  type: "textToImageHuggingFace",
24129
24488
  data: {
24130
24489
  model: "",
@@ -24265,7 +24624,7 @@ var TextToImageHuggingFaceNodeImpl = {
24265
24624
  ];
24266
24625
  },
24267
24626
  getBody(data) {
24268
- return import_ts_dedent82.dedent`
24627
+ return import_ts_dedent83.dedent`
24269
24628
  Model: ${data.useModelInput ? "(Using Input)" : data.model}
24270
24629
  `;
24271
24630
  },
@@ -24523,7 +24882,7 @@ function initializeGentrace(gentraceApiKey) {
24523
24882
  apiKey: gentraceApiKey
24524
24883
  });
24525
24884
  }
24526
- var runGentraceTests = async (gentracePipelineSlug, settings, project, graph, nativeApi) => {
24885
+ var runGentraceTests = async (gentracePipelineSlug, settings, project, graph, nativeApi, contextValues = {}) => {
24527
24886
  var _a, _b, _c;
24528
24887
  const gentraceApiKey = (_b = (_a = settings.pluginSettings) == null ? void 0 : _a.gentrace) == null ? void 0 : _b.gentraceApiKey;
24529
24888
  if (!gentraceApiKey) {
@@ -24551,13 +24910,15 @@ var runGentraceTests = async (gentracePipelineSlug, settings, project, graph, na
24551
24910
  const processor = new GraphProcessor(tempProject, graphId, globalRivetNodeRegistry);
24552
24911
  processor.executor = "browser";
24553
24912
  recorder.record(processor);
24913
+ const runContextValues = (0, import_lodash_es20.cloneDeep)(contextValues);
24554
24914
  await processor.processGraph(
24555
24915
  {
24556
24916
  settings,
24557
24917
  nativeApi,
24558
24918
  tokenizer: new GptTokenizerTokenizer()
24559
24919
  },
24560
- rivetFormattedInputs
24920
+ rivetFormattedInputs,
24921
+ runContextValues
24561
24922
  );
24562
24923
  const fullRecording = recorder.getRecording();
24563
24924
  const stepRuns = convertRecordingToStepRuns(fullRecording, project, graphId);
@@ -27438,8 +27799,8 @@ var openAIPlugin = {
27438
27799
  };
27439
27800
 
27440
27801
  // src/plugins/google/nodes/ChatGoogleNode.ts
27441
- var import_non_secure92 = require("nanoid/non-secure");
27442
- var import_ts_dedent83 = require("ts-dedent");
27802
+ var import_non_secure93 = require("nanoid/non-secure");
27803
+ var import_ts_dedent84 = require("ts-dedent");
27443
27804
  var import_p_retry3 = __toESM(require("p-retry-4"), 1);
27444
27805
  var import_ts_pattern9 = require("ts-pattern");
27445
27806
  var import_genai2 = require("@google/genai");
@@ -27467,7 +27828,7 @@ var ChatGoogleNodeImpl = {
27467
27828
  const chartNode = {
27468
27829
  type: "chatGoogle",
27469
27830
  title: "Chat (Google, Legacy)",
27470
- id: (0, import_non_secure92.nanoid)(),
27831
+ id: (0, import_non_secure93.nanoid)(),
27471
27832
  visualData: {
27472
27833
  x: 0,
27473
27834
  y: 0,
@@ -27602,7 +27963,7 @@ var ChatGoogleNodeImpl = {
27602
27963
  },
27603
27964
  getBody(data) {
27604
27965
  var _a;
27605
- return import_ts_dedent83.dedent`
27966
+ return import_ts_dedent84.dedent`
27606
27967
  ${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
27607
27968
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
27608
27969
  Max Tokens: ${data.maxTokens}
@@ -27689,7 +28050,7 @@ var ChatGoogleNodeImpl = {
27689
28050
  },
27690
28051
  getUIData() {
27691
28052
  return {
27692
- infoBoxBody: import_ts_dedent83.dedent`
28053
+ infoBoxBody: import_ts_dedent84.dedent`
27693
28054
  Legacy Google chat node.
27694
28055
 
27695
28056
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -28450,6 +28811,7 @@ var Rivet = void 0;
28450
28811
  DelayNodeImpl,
28451
28812
  DelegateFunctionCallNodeImpl,
28452
28813
  DestructureNodeImpl,
28814
+ DidRunNodeImpl,
28453
28815
  DocumentNodeImpl,
28454
28816
  EXPRESSION_OUTPUT_PORT_ID,
28455
28817
  EvaluateNodeImpl,
@@ -28594,6 +28956,7 @@ var Rivet = void 0;
28594
28956
  deserializeProject,
28595
28957
  destructureNode,
28596
28958
  detectSerializationVersion,
28959
+ didRunNode,
28597
28960
  documentNode,
28598
28961
  doubleCheckProject,
28599
28962
  emptyNodeGraph,
@@ -28664,6 +29027,7 @@ var Rivet = void 0;
28664
29027
  isArrayDataType,
28665
29028
  isArrayDataValue,
28666
29029
  isBuiltInInputDefinition,
29030
+ isChatV2StructuredResponseFormat,
28667
29031
  isDataTypeAccepted,
28668
29032
  isDataTypeCompatible,
28669
29033
  isFunctionDataType,
@@ -28694,6 +29058,7 @@ var Rivet = void 0;
28694
29058
  mcpDiscoveryNode,
28695
29059
  mcpGetPromptNode,
28696
29060
  mcpToolCallNode,
29061
+ mergeCustomProviderResponseFormatOptions,
28697
29062
  newId,
28698
29063
  nodeDefinition,
28699
29064
  numberNode,