@valerypopoff/rivet2-core 2.0.2 → 2.0.4

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,
@@ -409,6 +412,7 @@ __export(exports_exports, {
409
412
  DelayNodeImpl: () => DelayNodeImpl,
410
413
  DelegateFunctionCallNodeImpl: () => DelegateFunctionCallNodeImpl,
411
414
  DestructureNodeImpl: () => DestructureNodeImpl,
415
+ DidRunNodeImpl: () => DidRunNodeImpl,
412
416
  DocumentNodeImpl: () => DocumentNodeImpl,
413
417
  EXPRESSION_OUTPUT_PORT_ID: () => EXPRESSION_OUTPUT_PORT_ID,
414
418
  EvaluateNodeImpl: () => EvaluateNodeImpl,
@@ -552,6 +556,7 @@ __export(exports_exports, {
552
556
  deserializeProject: () => deserializeProject,
553
557
  destructureNode: () => destructureNode,
554
558
  detectSerializationVersion: () => detectSerializationVersion,
559
+ didRunNode: () => didRunNode,
555
560
  documentNode: () => documentNode,
556
561
  doubleCheckProject: () => doubleCheckProject,
557
562
  emptyNodeGraph: () => emptyNodeGraph,
@@ -622,6 +627,7 @@ __export(exports_exports, {
622
627
  isArrayDataType: () => isArrayDataType,
623
628
  isArrayDataValue: () => isArrayDataValue,
624
629
  isBuiltInInputDefinition: () => isBuiltInInputDefinition,
630
+ isChatV2StructuredResponseFormat: () => isChatV2StructuredResponseFormat,
625
631
  isDataTypeAccepted: () => isDataTypeAccepted,
626
632
  isDataTypeCompatible: () => isDataTypeCompatible,
627
633
  isFunctionDataType: () => isFunctionDataType,
@@ -2842,11 +2848,11 @@ function hasErroredInputNode(state, node, inputNodes, onTrace) {
2842
2848
  }
2843
2849
  return false;
2844
2850
  }
2845
- function areRequiredInputsConnected(state, node) {
2851
+ function getMissingRequiredInputs(state, node) {
2846
2852
  const connections = state.connections[node.id] ?? [];
2847
- return state.definitions[node.id].inputs.every((input) => {
2853
+ return state.definitions[node.id].inputs.filter((input) => {
2848
2854
  const connectionToInput = connections.find((conn) => conn.inputId === input.id && conn.inputNodeId === node.id);
2849
- return connectionToInput || !input.required;
2855
+ return input.required && !connectionToInput;
2850
2856
  });
2851
2857
  }
2852
2858
  function getWaitingForInputNode(state, node, inputNodes, inputValues) {
@@ -3557,9 +3563,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3557
3563
  trace ? (message) => this.#emitTraceEvent(message) : void 0
3558
3564
  );
3559
3565
  }
3560
- /** Returns true if all required inputs have connections. */
3561
- #areRequiredInputsConnected(node) {
3562
- return areRequiredInputsConnected(this.#executionState, node);
3566
+ /** Returns required inputs without connections. */
3567
+ #getMissingRequiredInputs(node) {
3568
+ return getMissingRequiredInputs(this.#executionState, node);
3563
3569
  }
3564
3570
  /** Accumulates cost from a node's output. */
3565
3571
  #accumulateCost(output) {
@@ -3584,10 +3590,7 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3584
3590
  if (this.#hasErroredInputNode(node, inputNodes)) {
3585
3591
  return;
3586
3592
  }
3587
- if (!this.#areRequiredInputsConnected(node)) {
3588
- return;
3589
- }
3590
- 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(", ")}`);
3591
3594
  const attachedData = this.#getAttachedDataTo(node);
3592
3595
  if (node.type === "raceInputs" || attachedData.races) {
3593
3596
  for (const inputNode of inputNodes) {
@@ -3621,6 +3624,10 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3621
3624
  if (this.#shouldSkipNodeProcessing(node, inputNodes)) {
3622
3625
  return;
3623
3626
  }
3627
+ const attachedData = this.#getAttachedDataTo(node);
3628
+ if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
3629
+ return;
3630
+ }
3624
3631
  const inputValues = this.#getInputValuesForNode(node);
3625
3632
  if (this.#excludedDueToControlFlow(node, inputValues, (0, import_non_secure4.nanoid)(), LOOP_NOT_BROKEN_SENTINEL)) {
3626
3633
  this.#emitTraceEvent(`Node ${node.title} is excluded due to control flow`);
@@ -3631,7 +3638,15 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3631
3638
  this.#emitTraceEvent(`Node ${node.title} is waiting for input node ${waitingForInputNode}`);
3632
3639
  return;
3633
3640
  }
3634
- 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
+ }
3635
3650
  if (this.#beginNodeProcessing(node, attachedData) === false) {
3636
3651
  return;
3637
3652
  }
@@ -3679,28 +3694,37 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
3679
3694
  if (this.#hasErroredInputNode(node, inputNodes, true)) {
3680
3695
  return true;
3681
3696
  }
3682
- if (!this.#areRequiredInputsConnected(node)) {
3683
- this.#emitTraceEvent(
3684
- `Node ${node.title} has required inputs nodes: ${inputNodes.map((n) => n.title).join(", ")}`
3685
- );
3686
- return true;
3687
- }
3688
3697
  return false;
3689
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
+ }
3690
3705
  #beginNodeProcessing(node, attachedData) {
3691
- var _a;
3692
- if ((_a = attachedData.races) == null ? void 0 : _a.completed) {
3693
- this.#emitTraceEvent(`Node ${node.title} is part of a race that was completed`);
3706
+ if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
3694
3707
  return false;
3695
3708
  }
3696
3709
  this.#currentlyProcessing.add(node.id);
3697
3710
  if (node.type === "loopController") {
3698
3711
  this.#loopControllersSeen.add(node.id);
3699
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) {
3700
3725
  if (attachedData.loopInfo && attachedData.loopInfo.loopControllerId !== node.id) {
3701
3726
  attachedData.loopInfo.nodes.add(node.id);
3702
3727
  }
3703
- return true;
3704
3728
  }
3705
3729
  #handleLoopControllerPostProcess(node, attachedData) {
3706
3730
  var _a;
@@ -4082,16 +4106,14 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
4082
4106
  var _a;
4083
4107
  if (node.disabled) {
4084
4108
  this.#emitTraceEvent(`Excluding node ${node.title} because it's disabled`);
4085
- this.#visitedNodes.add(node.id);
4086
- this.#markAsExcluded(node, processId, inputValues, "disabled");
4109
+ this.#excludeNode(node, processId, inputValues, "disabled");
4087
4110
  return true;
4088
4111
  }
4089
4112
  if (node.isConditional && typeOfExclusion === void 0) {
4090
4113
  const ifValue = coerceTypeOptional(inputValues[IF_PORT.id], "boolean");
4091
4114
  if (ifValue === false) {
4092
4115
  this.#emitTraceEvent(`Excluding node ${node.title} because if port is false`);
4093
- this.#visitedNodes.add(node.id);
4094
- this.#markAsExcluded(node, processId, inputValues, "if port is false");
4116
+ this.#excludeNode(node, processId, inputValues, "if port is false");
4095
4117
  return true;
4096
4118
  }
4097
4119
  }
@@ -4120,13 +4142,23 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
4120
4142
  `Excluding node ${node.title} because of control flow. Input is has excluded value: ${(_a = controlFlowExcludedValues[0]) == null ? void 0 : _a[0]}`
4121
4143
  );
4122
4144
  }
4123
- this.#visitedNodes.add(node.id);
4124
- this.#markAsExcluded(node, processId, inputValues, "input is excluded value");
4145
+ this.#excludeNode(node, processId, inputValues, "input is excluded value");
4125
4146
  }
4126
4147
  return true;
4127
4148
  }
4128
4149
  return false;
4129
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
+ }
4130
4162
  #markAsExcluded(node, processId, inputValues, reason) {
4131
4163
  const outputs = {};
4132
4164
  for (const output of this.#definitions[node.id].outputs) {
@@ -8415,6 +8447,9 @@ function hasLLMChatV2BuiltInToolsEnabled(data) {
8415
8447
 
8416
8448
  // src/model/chat-v2/chatV2ResponseFormat.ts
8417
8449
  var import_ai = require("ai");
8450
+ function isChatV2StructuredResponseFormat(responseFormat) {
8451
+ return responseFormat === "json" || responseFormat === "json_schema";
8452
+ }
8418
8453
  function getResponseSchema(inputs) {
8419
8454
  const responseSchemaInput = inputs["responseSchema"];
8420
8455
  if ((responseSchemaInput == null ? void 0 : responseSchemaInput.type) === "gpt-function") {
@@ -8551,7 +8586,7 @@ var LLM_CHAT_V2_TOOL_RESPONSE_FORMAT_CONFLICT_COPY = {
8551
8586
  ]
8552
8587
  };
8553
8588
  function isLLMChatV2StructuredResponseFormat(responseFormat) {
8554
- return responseFormat === "json" || responseFormat === "json_schema";
8589
+ return isChatV2StructuredResponseFormat(responseFormat);
8555
8590
  }
8556
8591
  function hasLLMChatV2ToolResponseFormatConflict(data) {
8557
8592
  return !!data.useToolCalling && isLLMChatV2StructuredResponseFormat(data.responseFormat);
@@ -8937,6 +8972,7 @@ async function resolveLLMChatV2RuntimeConfig(params) {
8937
8972
  additionalTools: resolveLLMChatV2BuiltInTools(data, context, providerConfig, apiKey),
8938
8973
  ...generationParameters,
8939
8974
  responseOutput: createChatV2ResponseOutput(responseFormatParameters),
8975
+ responseFormat: responseFormatParameters == null ? void 0 : responseFormatParameters.responseFormat,
8940
8976
  outputUsage: data.outputUsage,
8941
8977
  outputReasoning: data.outputReasoning,
8942
8978
  outputRequestStatus: data.outputRequestStatus,
@@ -8982,15 +9018,36 @@ async function resolveLLMChatV2RuntimeConfig(params) {
8982
9018
  var import_ai2 = require("ai");
8983
9019
 
8984
9020
  // src/model/chat/aiSdkStreaming.ts
8985
- 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 = {}) {
8986
9035
  let responseText = "";
8987
9036
  let reasoning = "";
8988
9037
  const functionCalls = [];
8989
9038
  let usage;
9039
+ const textBlocks = /* @__PURE__ */ new Map();
8990
9040
  for await (const part of fullStream) {
8991
9041
  switch (part.type) {
9042
+ case "text-start": {
9043
+ if (!textBlocks.has(part.id)) {
9044
+ textBlocks.set(part.id, "");
9045
+ }
9046
+ break;
9047
+ }
8992
9048
  case "text-delta": {
8993
- responseText += part.text;
9049
+ textBlocks.set(part.id, `${textBlocks.get(part.id) ?? ""}${part.text}`);
9050
+ responseText = buildResponseText(textBlocks, !!options2.dedupeDuplicateTextBlocks);
8994
9051
  onPartialOutputs(responseText, functionCalls);
8995
9052
  break;
8996
9053
  }
@@ -9042,6 +9099,7 @@ function defaultStreamExecutor(args) {
9042
9099
  finishReason: "finishReason" in result ? keepPromiseHandled(
9043
9100
  Promise.resolve(result.finishReason).then((value) => value == null ? void 0 : String(value))
9044
9101
  ) : void 0,
9102
+ output: args.output != null && "output" in result ? keepPromiseHandled(Promise.resolve(result.output)) : void 0,
9045
9103
  providerMetadata: "providerMetadata" in result ? keepPromiseHandled(
9046
9104
  Promise.resolve(result.providerMetadata)
9047
9105
  ) : void 0,
@@ -9052,6 +9110,36 @@ function defaultStreamExecutor(args) {
9052
9110
  async function resolveOptionalValue(value) {
9053
9111
  return value == null ? void 0 : await value;
9054
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
+ }
9055
9143
  async function executeStream(options2, executor) {
9056
9144
  const args = {
9057
9145
  model: options2.model,
@@ -9085,15 +9173,28 @@ async function executeStream(options2, executor) {
9085
9173
  args.abortSignal = options2.abortSignal;
9086
9174
  const handle = await executor(args);
9087
9175
  markOptionalPromiseHandled(handle.finishReason);
9176
+ markOptionalPromiseHandled(handle.output);
9088
9177
  markOptionalPromiseHandled(handle.providerMetadata);
9089
9178
  markOptionalPromiseHandled(handle.requestStatus);
9090
9179
  markOptionalPromiseHandled(handle.usage);
9091
- const streamed = await consumeAiSdkStream(handle.fullStream, (text, functionCalls) => {
9092
- var _a;
9093
- (_a = options2.onPartialOutput) == null ? void 0 : _a.call(options2, { text, functionCalls });
9094
- });
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;
9095
9195
  return {
9096
- responseText: streamed.responseText,
9196
+ responseText,
9197
+ structuredOutput: options2.responseOutput != null ? await resolveOptionalStructuredOutput(handle.output) : void 0,
9097
9198
  functionCalls: streamed.functionCalls,
9098
9199
  usage: streamed.usage ?? await resolveOptionalValue(handle.usage),
9099
9200
  reasoning: streamed.reasoning,
@@ -9596,9 +9697,23 @@ function normalizeUsage(usage, options2) {
9596
9697
  totalCost: calculateChatV2Cost(options2.provider, options2.modelId, promptTokens, completionTokens)
9597
9698
  };
9598
9699
  }
9599
- 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) {
9600
9715
  const outputs = {
9601
- ["response"]: { type: "string", value: response },
9716
+ ["response"]: buildResponseOutput(response, structuredOutput, options2.responseFormat),
9602
9717
  ["in-messages"]: { type: "chat-message[]", value: requestMessages },
9603
9718
  ["all-messages"]: createAssistantMessagesOutput(requestMessages, response, functionCalls, {
9604
9719
  functionCallMode: options2.functionCallMode
@@ -9860,6 +9975,7 @@ async function runChatV2Pipeline(options2) {
9860
9975
  stopSequences: options2.stopSequences,
9861
9976
  seed: options2.seed,
9862
9977
  responseOutput: options2.responseOutput,
9978
+ responseFormat: options2.responseFormat,
9863
9979
  providerOptions: options2.providerOptions,
9864
9980
  toolChoice: options2.toolChoice,
9865
9981
  abortSignal: options2.context.signal,
@@ -9868,14 +9984,27 @@ async function runChatV2Pipeline(options2) {
9868
9984
  var _a, _b;
9869
9985
  (_b = (_a = options2.context).onPartialOutputs) == null ? void 0 : _b.call(
9870
9986
  _a,
9871
- buildCommonOutputs(requestMessages, text, functionCalls, void 0, "", void 0, void 0, [], [], {
9872
- outputUsage: false,
9873
- outputReasoning: false,
9874
- outputRequestStatus: false,
9875
- includeFunctionCalls: options2.includeFunctionCalls,
9876
- functionCallMode: options2.functionCallMode,
9877
- retryOnNon200: false
9878
- })
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
+ )
9879
10008
  );
9880
10009
  }
9881
10010
  },
@@ -9912,6 +10041,7 @@ async function runChatV2Pipeline(options2) {
9912
10041
  const commonOutputs = buildCommonOutputs(
9913
10042
  requestMessages,
9914
10043
  streamed.result.responseText,
10044
+ streamed.result.structuredOutput,
9915
10045
  streamed.result.functionCalls,
9916
10046
  usage,
9917
10047
  streamed.result.reasoning,
@@ -9925,7 +10055,8 @@ async function runChatV2Pipeline(options2) {
9925
10055
  outputRequestStatus: options2.outputRequestStatus,
9926
10056
  includeFunctionCalls: options2.includeFunctionCalls,
9927
10057
  functionCallMode: options2.functionCallMode,
9928
- retryOnNon200: options2.retryOnNon200
10058
+ retryOnNon200: options2.retryOnNon200,
10059
+ responseFormat: options2.responseFormat
9929
10060
  }
9930
10061
  );
9931
10062
  const allMessagesOutput = commonOutputs["all-messages"];
@@ -10342,6 +10473,21 @@ var LLMChatV2NodeImpl = class extends NodeImpl {
10342
10473
  includeUsage: this.data.outputUsage,
10343
10474
  includeReasoning: this.data.outputReasoning
10344
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
+ }
10345
10491
  if (this.data.outputRequestStatus) {
10346
10492
  outputs.push(
10347
10493
  {
@@ -11076,35 +11222,35 @@ var CodeNodeImpl = class extends NodeImpl {
11076
11222
  },
11077
11223
  {
11078
11224
  type: "group",
11079
- label: "Runtime Permissions",
11225
+ label: "Runtime permissions",
11080
11226
  defaultOpen: true,
11081
11227
  editors: [
11082
11228
  {
11083
11229
  type: "toggle",
11084
- label: "fetch",
11230
+ label: 'Allow "fetch"',
11085
11231
  dataKey: "allowFetch"
11086
11232
  },
11087
11233
  {
11088
11234
  type: "toggle",
11089
- label: "Rivet",
11235
+ label: 'Allow "Rivet"',
11090
11236
  dataKey: "allowRivet"
11091
11237
  },
11092
11238
  {
11093
11239
  type: "toggle",
11094
- label: "console",
11240
+ label: 'Allow "console"',
11095
11241
  dataKey: "allowConsole"
11096
11242
  },
11097
11243
  {
11098
11244
  type: "toggle",
11099
- label: "require",
11245
+ label: 'Allow "require"',
11100
11246
  dataKey: "allowRequire",
11101
- helperMessage: "This is only available when using the Node executor."
11247
+ helperMessage: "Only available with the Node executor"
11102
11248
  },
11103
11249
  {
11104
11250
  type: "toggle",
11105
- label: "process",
11251
+ label: 'Allow "process"',
11106
11252
  dataKey: "allowProcess",
11107
- helperMessage: "This is only available when using the Node executor."
11253
+ helperMessage: "Only available with the Node executor"
11108
11254
  }
11109
11255
  ]
11110
11256
  }
@@ -11160,7 +11306,7 @@ var CodeNodeImpl = class extends NodeImpl {
11160
11306
  const missingOutputs = this.getOutputDefinitions().filter((output) => !(output.id in outputs));
11161
11307
  if (missingOutputs.length > 0) {
11162
11308
  throw new Error(
11163
- `Code node must return an object with output values for all outputs. To not run an output, return { "type": "control-flow-excluded", "value": undefiend }. To return undefined, return { "type": "any", "value": undefined }. Missing: ${missingOutputs.map((output) => output.id).join(", ")}`
11309
+ `Code node must return an object with output values for all outputs. To not run an output, return { "type": "control-flow-excluded", "value": undefined }. To return undefined, return { "type": "any", "value": undefined }. Missing: ${missingOutputs.map((output) => output.id).join(", ")}`
11164
11310
  );
11165
11311
  }
11166
11312
  return outputs;
@@ -12966,7 +13112,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12966
13112
  {
12967
13113
  id: "input",
12968
13114
  title: "Input",
12969
- dataType: "string",
13115
+ dataType: "any",
12970
13116
  required: true,
12971
13117
  coerced: false
12972
13118
  }
@@ -12989,9 +13135,9 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12989
13135
  static getUIData() {
12990
13136
  return {
12991
13137
  infoBoxBody: import_ts_dedent21.dedent`
12992
- 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.
12993
13139
 
12994
- Outputs the parsed object.
13140
+ Outputs the parsed or passed-through object.
12995
13141
  `,
12996
13142
  infoBoxTitle: "Extract JSON Node",
12997
13143
  contextMenuTitle: "Extract JSON",
@@ -12999,19 +13145,27 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
12999
13145
  };
13000
13146
  }
13001
13147
  async process(inputs) {
13002
- 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
+ }
13003
13166
  try {
13004
13167
  const parsed = JSON.parse(inputString);
13005
- return {
13006
- ["output"]: {
13007
- type: "object",
13008
- value: parsed
13009
- },
13010
- ["noMatch"]: {
13011
- type: "control-flow-excluded",
13012
- value: void 0
13013
- }
13014
- };
13168
+ return createMatchedOutput(parsed);
13015
13169
  } catch (_err) {
13016
13170
  }
13017
13171
  const firstBracket = inputString.indexOf("{");
@@ -13021,7 +13175,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
13021
13175
  const firstIndex = firstBracket >= 0 && firstSquareBracket >= 0 ? Math.min(firstBracket, firstSquareBracket) : firstBracket >= 0 ? firstBracket : firstSquareBracket;
13022
13176
  const lastIndex = lastBracket >= 0 && lastSquareBracket >= 0 ? Math.max(lastBracket, lastSquareBracket) : lastBracket >= 0 ? lastBracket : lastSquareBracket;
13023
13177
  const substring = inputString.substring(firstIndex, lastIndex + 1);
13024
- let jsonObject = void 0;
13178
+ let jsonObject;
13025
13179
  try {
13026
13180
  jsonObject = JSON.parse(substring);
13027
13181
  } catch (err) {
@@ -13036,19 +13190,28 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
13036
13190
  }
13037
13191
  };
13038
13192
  }
13039
- return {
13040
- ["output"]: {
13041
- type: "object",
13042
- value: jsonObject
13043
- },
13044
- ["noMatch"]: {
13045
- type: "control-flow-excluded",
13046
- value: void 0
13047
- }
13048
- };
13193
+ return createMatchedOutput(jsonObject);
13049
13194
  }
13050
13195
  };
13051
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
+ }
13052
13215
 
13053
13216
  // src/model/nodes/AssemblePromptNode.ts
13054
13217
  var import_non_secure24 = require("nanoid/non-secure");
@@ -14194,13 +14357,19 @@ var contextNode = nodeDefinition(ContextNodeImpl, "Context");
14194
14357
  // src/model/nodes/CoalesceNode.ts
14195
14358
  var import_non_secure32 = require("nanoid/non-secure");
14196
14359
  var import_ts_dedent30 = require("ts-dedent");
14360
+ var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
14361
+ var IGNORE_NULL_LABEL = "Ignore 'null'";
14362
+ var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
14197
14363
  var CoalesceNodeImpl = class extends NodeImpl {
14198
14364
  static create = () => {
14199
14365
  const chartNode = {
14200
14366
  type: "coalesce",
14201
14367
  title: "Coalesce",
14202
14368
  id: (0, import_non_secure32.nanoid)(),
14203
- data: {},
14369
+ data: {
14370
+ ignoreNull: false,
14371
+ ignoreUndefined: false
14372
+ },
14204
14373
  visualData: {
14205
14374
  x: 0,
14206
14375
  y: 0,
@@ -14235,10 +14404,36 @@ var CoalesceNodeImpl = class extends NodeImpl {
14235
14404
  }
14236
14405
  ];
14237
14406
  }
14407
+ getEditors() {
14408
+ return [
14409
+ {
14410
+ type: "toggle",
14411
+ label: IGNORE_NULL_LABEL,
14412
+ dataKey: "ignoreNull"
14413
+ },
14414
+ {
14415
+ type: "toggle",
14416
+ label: IGNORE_UNDEFINED_LABEL,
14417
+ dataKey: "ignoreUndefined"
14418
+ }
14419
+ ];
14420
+ }
14421
+ getBody() {
14422
+ const ignoredValues = [];
14423
+ if (this.data.ignoreNull) {
14424
+ ignoredValues.push(IGNORE_NULL_LABEL);
14425
+ }
14426
+ if (this.data.ignoreUndefined) {
14427
+ ignoredValues.push(IGNORE_UNDEFINED_LABEL);
14428
+ }
14429
+ return ignoredValues.length > 0 ? ignoredValues.join("\n") : void 0;
14430
+ }
14238
14431
  static getUIData() {
14239
14432
  return {
14240
14433
  infoBoxBody: import_ts_dedent30.dedent`
14241
- Takes in any number of inputs and outputs the first value that exists. Useful for consolidating branches after a Match node. This node can also "consume" the "Not Ran" value.
14434
+ Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
14435
+
14436
+ Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
14242
14437
  `,
14243
14438
  infoBoxTitle: "Coalesce Node",
14244
14439
  contextMenuTitle: "Coalesce",
@@ -14247,14 +14442,14 @@ var CoalesceNodeImpl = class extends NodeImpl {
14247
14442
  }
14248
14443
  #getInputPortCount(connections) {
14249
14444
  const inputNodeId = this.chartNode.id;
14250
- const inputConnections = connections.filter(
14251
- (connection) => connection.inputNodeId === inputNodeId && connection.inputId.startsWith("input")
14252
- );
14253
14445
  let maxInputNumber = 0;
14254
- for (const connection of inputConnections) {
14255
- const messageNumber = parseInt(connection.inputId.replace("input", ""), 10);
14256
- if (messageNumber > maxInputNumber) {
14257
- maxInputNumber = messageNumber;
14446
+ for (const connection of connections) {
14447
+ if (connection.inputNodeId !== inputNodeId) {
14448
+ continue;
14449
+ }
14450
+ const inputNumber = this.#getInputPortNumber(connection.inputId);
14451
+ if (inputNumber && inputNumber > maxInputNumber) {
14452
+ maxInputNumber = inputNumber;
14258
14453
  }
14259
14454
  }
14260
14455
  return maxInputNumber + 1;
@@ -14269,38 +14464,141 @@ var CoalesceNodeImpl = class extends NodeImpl {
14269
14464
  }
14270
14465
  };
14271
14466
  }
14272
- const inputCount = Object.keys(inputData).filter((key) => key.startsWith("input")).length;
14273
- const okInputValues = [];
14467
+ const inputCount = this.#getInputCountFromValues(inputData);
14274
14468
  for (let i = 1; i <= inputCount; i++) {
14275
14469
  const inputValue = inputData[`input${i}`];
14276
- if (inputValue && inputValue.type !== "control-flow-excluded" && unwrapDataValue(inputValue) != null) {
14277
- okInputValues.push(inputValue);
14470
+ if (inputValue && inputValue.type !== "control-flow-excluded" && !this.#shouldSkipInputValue(inputValue)) {
14471
+ return {
14472
+ ["output"]: inputValue
14473
+ };
14474
+ }
14475
+ }
14476
+ return {
14477
+ ["output"]: {
14478
+ type: "control-flow-excluded",
14479
+ value: void 0
14278
14480
  }
14481
+ };
14482
+ }
14483
+ #getInputCountFromValues(inputData) {
14484
+ let maxInputNumber = 0;
14485
+ for (const inputId of Object.keys(inputData)) {
14486
+ const inputNumber = this.#getInputPortNumber(inputId);
14487
+ if (inputNumber && inputNumber > maxInputNumber) {
14488
+ maxInputNumber = inputNumber;
14489
+ }
14490
+ }
14491
+ return maxInputNumber;
14492
+ }
14493
+ #getInputPortNumber(inputId) {
14494
+ const match10 = INPUT_PORT_ID_PATTERN.exec(inputId);
14495
+ if (!match10) {
14496
+ return void 0;
14497
+ }
14498
+ const inputNumber = Number(match10[1]);
14499
+ return Number.isSafeInteger(inputNumber) && inputNumber > 0 ? inputNumber : void 0;
14500
+ }
14501
+ #shouldSkipInputValue(inputValue) {
14502
+ const value = unwrapDataValue(inputValue).value;
14503
+ return this.data.ignoreNull === true && value === null || this.data.ignoreUndefined === true && value === void 0;
14504
+ }
14505
+ };
14506
+ var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
14507
+
14508
+ // src/model/nodes/DidRunNode.ts
14509
+ var import_non_secure33 = require("nanoid/non-secure");
14510
+ var import_ts_dedent31 = require("ts-dedent");
14511
+ var DidRunNodeImpl = class extends NodeImpl {
14512
+ static create() {
14513
+ return {
14514
+ type: "didRun",
14515
+ title: "Did Run",
14516
+ id: (0, import_non_secure33.nanoid)(),
14517
+ data: {},
14518
+ visualData: {
14519
+ x: 0,
14520
+ y: 0,
14521
+ width: 250
14522
+ }
14523
+ };
14524
+ }
14525
+ getInputDefinitions(connections) {
14526
+ const inputCount = this.#getInputPortCount(connections);
14527
+ const inputs = [];
14528
+ for (let i = 1; i <= inputCount; i++) {
14529
+ inputs.push({
14530
+ dataType: "any",
14531
+ id: `input${i}`,
14532
+ title: `Input ${i}`
14533
+ });
14279
14534
  }
14280
- if (okInputValues.length === 0) {
14535
+ return inputs;
14536
+ }
14537
+ getOutputDefinitions() {
14538
+ return [
14539
+ {
14540
+ dataType: "boolean",
14541
+ id: "ran",
14542
+ title: "Ran"
14543
+ }
14544
+ ];
14545
+ }
14546
+ static getUIData() {
14547
+ return {
14548
+ infoBoxBody: import_ts_dedent31.dedent`
14549
+ 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.
14550
+ `,
14551
+ infoBoxTitle: "Did Run Node",
14552
+ contextMenuTitle: "Did Run",
14553
+ group: ["Logic"]
14554
+ };
14555
+ }
14556
+ getBody() {
14557
+ return "Outputs true when all connected inputs have run. Falsy or empty values still count";
14558
+ }
14559
+ #getInputPortCount(connections) {
14560
+ const inputNodeId = this.chartNode.id;
14561
+ const inputConnections = connections.filter(
14562
+ (connection) => connection.inputNodeId === inputNodeId && connection.inputId.startsWith("input")
14563
+ );
14564
+ let maxInputNumber = 0;
14565
+ for (const connection of inputConnections) {
14566
+ const inputNumber = parseInt(connection.inputId.replace("input", ""), 10);
14567
+ if (inputNumber > maxInputNumber) {
14568
+ maxInputNumber = inputNumber;
14569
+ }
14570
+ }
14571
+ return maxInputNumber + 1;
14572
+ }
14573
+ async process(inputData) {
14574
+ const hasDynamicInput = Object.keys(inputData).some((key) => key.startsWith("input"));
14575
+ if (!hasDynamicInput) {
14281
14576
  return {
14282
- ["output"]: {
14577
+ ["ran"]: {
14283
14578
  type: "control-flow-excluded",
14284
14579
  value: void 0
14285
14580
  }
14286
14581
  };
14287
14582
  }
14288
14583
  return {
14289
- ["output"]: okInputValues[0]
14584
+ ["ran"]: {
14585
+ type: "boolean",
14586
+ value: true
14587
+ }
14290
14588
  };
14291
14589
  }
14292
14590
  };
14293
- var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
14591
+ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
14294
14592
 
14295
14593
  // src/model/nodes/PassthroughNode.ts
14296
- var import_non_secure33 = require("nanoid/non-secure");
14297
- var import_ts_dedent31 = require("ts-dedent");
14594
+ var import_non_secure34 = require("nanoid/non-secure");
14595
+ var import_ts_dedent32 = require("ts-dedent");
14298
14596
  var PassthroughNodeImpl = class extends NodeImpl {
14299
14597
  static create = () => {
14300
14598
  const chartNode = {
14301
14599
  type: "passthrough",
14302
14600
  title: "Passthrough",
14303
- id: (0, import_non_secure33.nanoid)(),
14601
+ id: (0, import_non_secure34.nanoid)(),
14304
14602
  data: {},
14305
14603
  visualData: {
14306
14604
  x: 0,
@@ -14336,7 +14634,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
14336
14634
  }
14337
14635
  static getUIData() {
14338
14636
  return {
14339
- infoBoxBody: import_ts_dedent31.dedent`
14637
+ infoBoxBody: import_ts_dedent32.dedent`
14340
14638
  Simply passes the input value to the output without any modifications.
14341
14639
  `,
14342
14640
  infoBoxTitle: "Passthrough Node",
@@ -14371,14 +14669,14 @@ var PassthroughNodeImpl = class extends NodeImpl {
14371
14669
  var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
14372
14670
 
14373
14671
  // src/model/nodes/PopNode.ts
14374
- var import_non_secure34 = require("nanoid/non-secure");
14375
- var import_ts_dedent32 = require("ts-dedent");
14672
+ var import_non_secure35 = require("nanoid/non-secure");
14673
+ var import_ts_dedent33 = require("ts-dedent");
14376
14674
  var PopNodeImpl = class extends NodeImpl {
14377
14675
  static create() {
14378
14676
  const baseNode = {
14379
14677
  type: "pop",
14380
14678
  title: "Pop",
14381
- id: (0, import_non_secure34.nanoid)(),
14679
+ id: (0, import_non_secure35.nanoid)(),
14382
14680
  visualData: {
14383
14681
  x: 0,
14384
14682
  y: 0,
@@ -14423,7 +14721,7 @@ var PopNodeImpl = class extends NodeImpl {
14423
14721
  }
14424
14722
  static getUIData() {
14425
14723
  return {
14426
- infoBoxBody: import_ts_dedent32.dedent`
14724
+ infoBoxBody: import_ts_dedent33.dedent`
14427
14725
  Pops the last value off the input array and outputs the new array and the popped value.
14428
14726
 
14429
14727
  Can also be used to just extract the last value from an array.
@@ -14459,14 +14757,14 @@ var PopNodeImpl = class extends NodeImpl {
14459
14757
  var popNode = nodeDefinition(PopNodeImpl, "Pop");
14460
14758
 
14461
14759
  // src/model/nodes/SetGlobalNode.ts
14462
- var import_non_secure35 = require("nanoid/non-secure");
14463
- var import_ts_dedent33 = require("ts-dedent");
14760
+ var import_non_secure36 = require("nanoid/non-secure");
14761
+ var import_ts_dedent34 = require("ts-dedent");
14464
14762
  var SetGlobalNodeImpl = class extends NodeImpl {
14465
14763
  static create() {
14466
14764
  const chartNode = {
14467
14765
  type: "setGlobal",
14468
14766
  title: "Set Global",
14469
- id: (0, import_non_secure35.nanoid)(),
14767
+ id: (0, import_non_secure36.nanoid)(),
14470
14768
  visualData: {
14471
14769
  x: 0,
14472
14770
  y: 0,
@@ -14533,14 +14831,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
14533
14831
  ];
14534
14832
  }
14535
14833
  getBody() {
14536
- return import_ts_dedent33.dedent`
14834
+ return import_ts_dedent34.dedent`
14537
14835
  ${this.data.id}
14538
14836
  Type: ${this.data.dataType}
14539
14837
  `;
14540
14838
  }
14541
14839
  static getUIData() {
14542
14840
  return {
14543
- infoBoxBody: import_ts_dedent33.dedent`
14841
+ infoBoxBody: import_ts_dedent34.dedent`
14544
14842
  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.
14545
14843
  `,
14546
14844
  infoBoxTitle: "Set Global Node",
@@ -14575,14 +14873,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
14575
14873
  var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
14576
14874
 
14577
14875
  // src/model/nodes/GetGlobalNode.ts
14578
- var import_non_secure36 = require("nanoid/non-secure");
14579
- var import_ts_dedent34 = require("ts-dedent");
14876
+ var import_non_secure37 = require("nanoid/non-secure");
14877
+ var import_ts_dedent35 = require("ts-dedent");
14580
14878
  var GetGlobalNodeImpl = class extends NodeImpl {
14581
14879
  static create() {
14582
14880
  const chartNode = {
14583
14881
  type: "getGlobal",
14584
14882
  title: "Get Global",
14585
- id: (0, import_non_secure36.nanoid)(),
14883
+ id: (0, import_non_secure37.nanoid)(),
14586
14884
  visualData: {
14587
14885
  x: 0,
14588
14886
  y: 0,
@@ -14651,7 +14949,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14651
14949
  ];
14652
14950
  }
14653
14951
  getBody() {
14654
- return import_ts_dedent34.dedent`
14952
+ return import_ts_dedent35.dedent`
14655
14953
  ${this.data.useIdInput ? "(ID from input)" : this.data.id}
14656
14954
  Type: ${this.data.dataType}
14657
14955
  ${this.data.wait ? "Waits for available data" : ""}
@@ -14659,7 +14957,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14659
14957
  }
14660
14958
  static getUIData() {
14661
14959
  return {
14662
- infoBoxBody: import_ts_dedent34.dedent`
14960
+ infoBoxBody: import_ts_dedent35.dedent`
14663
14961
  Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
14664
14962
  `,
14665
14963
  infoBoxTitle: "Get Global Node",
@@ -14706,12 +15004,12 @@ var GetGlobalNodeImpl = class extends NodeImpl {
14706
15004
  var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
14707
15005
 
14708
15006
  // src/model/nodes/WaitForEventNode.ts
14709
- var import_non_secure37 = require("nanoid/non-secure");
14710
- var import_ts_dedent35 = require("ts-dedent");
15007
+ var import_non_secure38 = require("nanoid/non-secure");
15008
+ var import_ts_dedent36 = require("ts-dedent");
14711
15009
  var WaitForEventNodeImpl = class extends NodeImpl {
14712
15010
  static create() {
14713
15011
  return {
14714
- id: (0, import_non_secure37.nanoid)(),
15012
+ id: (0, import_non_secure38.nanoid)(),
14715
15013
  type: "waitForEvent",
14716
15014
  title: "Wait For Event",
14717
15015
  visualData: { x: 0, y: 0, width: 150 },
@@ -14766,7 +15064,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
14766
15064
  }
14767
15065
  static getUIData() {
14768
15066
  return {
14769
- infoBoxBody: import_ts_dedent35.dedent`
15067
+ infoBoxBody: import_ts_dedent36.dedent`
14770
15068
  Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
14771
15069
  `,
14772
15070
  infoBoxTitle: "Wait For Event Node",
@@ -14786,14 +15084,14 @@ var WaitForEventNodeImpl = class extends NodeImpl {
14786
15084
  var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
14787
15085
 
14788
15086
  // src/model/nodes/ToolNode.ts
14789
- var import_non_secure38 = require("nanoid/non-secure");
14790
- var import_ts_dedent36 = require("ts-dedent");
15087
+ var import_non_secure39 = require("nanoid/non-secure");
15088
+ var import_ts_dedent37 = require("ts-dedent");
14791
15089
  var GptFunctionNodeImpl = class extends NodeImpl {
14792
15090
  static create() {
14793
15091
  const chartNode = {
14794
15092
  type: "gptFunction",
14795
15093
  title: "Tool",
14796
- id: (0, import_non_secure38.nanoid)(),
15094
+ id: (0, import_non_secure39.nanoid)(),
14797
15095
  visualData: {
14798
15096
  x: 0,
14799
15097
  y: 0,
@@ -14802,7 +15100,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
14802
15100
  data: {
14803
15101
  name: "newTool",
14804
15102
  description: "No description provided",
14805
- schema: import_ts_dedent36.dedent`
15103
+ schema: import_ts_dedent37.dedent`
14806
15104
  {
14807
15105
  "type": "object",
14808
15106
  "properties": {}
@@ -14908,7 +15206,7 @@ ${this.data.description}`
14908
15206
  }
14909
15207
  static getUIData() {
14910
15208
  return {
14911
- infoBoxBody: import_ts_dedent36.dedent`
15209
+ infoBoxBody: import_ts_dedent37.dedent`
14912
15210
  Defines a tool, which is a method that the LLM can call in its responses.
14913
15211
  `,
14914
15212
  infoBoxTitle: "Tool Node",
@@ -14951,15 +15249,15 @@ ${this.data.description}`
14951
15249
  var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
14952
15250
 
14953
15251
  // src/model/nodes/ToYamlNode.ts
14954
- var import_non_secure39 = require("nanoid/non-secure");
15252
+ var import_non_secure40 = require("nanoid/non-secure");
14955
15253
  var import_yaml2 = __toESM(require("yaml"), 1);
14956
- var import_ts_dedent37 = require("ts-dedent");
15254
+ var import_ts_dedent38 = require("ts-dedent");
14957
15255
  var ToYamlNodeImpl = class extends NodeImpl {
14958
15256
  static create() {
14959
15257
  const chartNode = {
14960
15258
  type: "toYaml",
14961
15259
  title: "To YAML",
14962
- id: (0, import_non_secure39.nanoid)(),
15260
+ id: (0, import_non_secure40.nanoid)(),
14963
15261
  visualData: {
14964
15262
  x: 0,
14965
15263
  y: 0,
@@ -14990,7 +15288,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
14990
15288
  }
14991
15289
  static getUIData() {
14992
15290
  return {
14993
- infoBoxBody: import_ts_dedent37.dedent`
15291
+ infoBoxBody: import_ts_dedent38.dedent`
14994
15292
  Turns the input object into YAML text.
14995
15293
  `,
14996
15294
  infoBoxTitle: "To YAML Node",
@@ -15015,8 +15313,8 @@ var ToYamlNodeImpl = class extends NodeImpl {
15015
15313
  var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
15016
15314
 
15017
15315
  // src/model/nodes/GetEmbeddingNode.ts
15018
- var import_non_secure40 = require("nanoid/non-secure");
15019
- var import_ts_dedent38 = require("ts-dedent");
15316
+ var import_non_secure41 = require("nanoid/non-secure");
15317
+ var import_ts_dedent39 = require("ts-dedent");
15020
15318
 
15021
15319
  // src/integrations/integrations.ts
15022
15320
  var registeredIntegrations = {
@@ -15039,7 +15337,7 @@ function getIntegration(type, integrationKey, context) {
15039
15337
  var GetEmbeddingNodeImpl = class extends NodeImpl {
15040
15338
  static create() {
15041
15339
  return {
15042
- id: (0, import_non_secure40.nanoid)(),
15340
+ id: (0, import_non_secure41.nanoid)(),
15043
15341
  type: "getEmbedding",
15044
15342
  title: "Get Embedding",
15045
15343
  visualData: { x: 0, y: 0, width: 250 },
@@ -15123,7 +15421,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
15123
15421
  }
15124
15422
  static getUIData() {
15125
15423
  return {
15126
- infoBoxBody: import_ts_dedent38.dedent`
15424
+ infoBoxBody: import_ts_dedent39.dedent`
15127
15425
  Gets a OpenAI vector embedding for the input text provided.
15128
15426
 
15129
15427
  Can be used with the Vector Store and Vector KNN nodes.
@@ -15154,12 +15452,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
15154
15452
  var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
15155
15453
 
15156
15454
  // src/model/nodes/VectorStoreNode.ts
15157
- var import_non_secure41 = require("nanoid/non-secure");
15158
- var import_ts_dedent39 = require("ts-dedent");
15455
+ var import_non_secure42 = require("nanoid/non-secure");
15456
+ var import_ts_dedent40 = require("ts-dedent");
15159
15457
  var VectorStoreNodeImpl = class extends NodeImpl {
15160
15458
  static create() {
15161
15459
  return {
15162
- id: (0, import_non_secure41.nanoid)(),
15460
+ id: (0, import_non_secure42.nanoid)(),
15163
15461
  type: "vectorStore",
15164
15462
  title: "Vector Store",
15165
15463
  visualData: { x: 0, y: 0, width: 200 },
@@ -15235,14 +15533,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
15235
15533
  ];
15236
15534
  }
15237
15535
  getBody() {
15238
- return import_ts_dedent39.dedent`
15536
+ return import_ts_dedent40.dedent`
15239
15537
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
15240
15538
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
15241
15539
  `;
15242
15540
  }
15243
15541
  static getUIData() {
15244
15542
  return {
15245
- infoBoxBody: import_ts_dedent39.dedent`
15543
+ infoBoxBody: import_ts_dedent40.dedent`
15246
15544
  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.
15247
15545
  `,
15248
15546
  infoBoxTitle: "Vector Store Node",
@@ -15277,12 +15575,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
15277
15575
  var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
15278
15576
 
15279
15577
  // src/model/nodes/VectorNearestNeighborsNode.ts
15280
- var import_non_secure42 = require("nanoid/non-secure");
15281
- var import_ts_dedent40 = require("ts-dedent");
15578
+ var import_non_secure43 = require("nanoid/non-secure");
15579
+ var import_ts_dedent41 = require("ts-dedent");
15282
15580
  var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15283
15581
  static create() {
15284
15582
  return {
15285
- id: (0, import_non_secure42.nanoid)(),
15583
+ id: (0, import_non_secure43.nanoid)(),
15286
15584
  type: "vectorNearestNeighbors",
15287
15585
  title: "Vector KNN",
15288
15586
  visualData: { x: 0, y: 0, width: 200 },
@@ -15365,7 +15663,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15365
15663
  ];
15366
15664
  }
15367
15665
  getBody() {
15368
- return import_ts_dedent40.dedent`
15666
+ return import_ts_dedent41.dedent`
15369
15667
  Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
15370
15668
  K: ${this.data.useKInput ? "(using input)" : this.data.k}
15371
15669
  Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
@@ -15373,7 +15671,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15373
15671
  }
15374
15672
  static getUIData() {
15375
15673
  return {
15376
- infoBoxBody: import_ts_dedent40.dedent`
15674
+ infoBoxBody: import_ts_dedent41.dedent`
15377
15675
  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.
15378
15676
  `,
15379
15677
  infoBoxTitle: "Vector KNN Node",
@@ -15403,17 +15701,17 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
15403
15701
  var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
15404
15702
 
15405
15703
  // src/model/nodes/HashNode.ts
15406
- var import_non_secure43 = require("nanoid/non-secure");
15704
+ var import_non_secure44 = require("nanoid/non-secure");
15407
15705
  var crypto = __toESM(require("crypto-js"), 1);
15408
15706
  var import_ts_pattern4 = require("ts-pattern");
15409
- var import_ts_dedent41 = require("ts-dedent");
15707
+ var import_ts_dedent42 = require("ts-dedent");
15410
15708
  var { SHA256, SHA512, MD5, SHA1 } = crypto;
15411
15709
  var HashNodeImpl = class extends NodeImpl {
15412
15710
  static create() {
15413
15711
  const chartNode = {
15414
15712
  type: "hash",
15415
15713
  title: "Hash",
15416
- id: (0, import_non_secure43.nanoid)(),
15714
+ id: (0, import_non_secure44.nanoid)(),
15417
15715
  visualData: {
15418
15716
  x: 0,
15419
15717
  y: 0,
@@ -15464,7 +15762,7 @@ var HashNodeImpl = class extends NodeImpl {
15464
15762
  }
15465
15763
  static getUIData() {
15466
15764
  return {
15467
- infoBoxBody: import_ts_dedent41.dedent`
15765
+ infoBoxBody: import_ts_dedent42.dedent`
15468
15766
  Computes a hash of the input value using the configured hash function.
15469
15767
  `,
15470
15768
  infoBoxTitle: "Hash Node",
@@ -15492,14 +15790,14 @@ var algorithmDisplayName = {
15492
15790
  var hashNode = nodeDefinition(HashNodeImpl, "Hash");
15493
15791
 
15494
15792
  // src/model/nodes/AbortGraphNode.ts
15495
- var import_non_secure44 = require("nanoid/non-secure");
15496
- var import_ts_dedent42 = require("ts-dedent");
15793
+ var import_non_secure45 = require("nanoid/non-secure");
15794
+ var import_ts_dedent43 = require("ts-dedent");
15497
15795
  var AbortGraphNodeImpl = class extends NodeImpl {
15498
15796
  static create() {
15499
15797
  const chartNode = {
15500
15798
  type: "abortGraph",
15501
15799
  title: "Abort Graph",
15502
- id: (0, import_non_secure44.nanoid)(),
15800
+ id: (0, import_non_secure45.nanoid)(),
15503
15801
  visualData: {
15504
15802
  x: 0,
15505
15803
  y: 0,
@@ -15550,13 +15848,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
15550
15848
  ];
15551
15849
  }
15552
15850
  getBody() {
15553
- return import_ts_dedent42.dedent`
15851
+ return import_ts_dedent43.dedent`
15554
15852
  ${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
15555
15853
  `;
15556
15854
  }
15557
15855
  static getUIData() {
15558
15856
  return {
15559
- infoBoxBody: import_ts_dedent42.dedent`
15857
+ infoBoxBody: import_ts_dedent43.dedent`
15560
15858
  Aborts the execution of the entire graph immediately.
15561
15859
 
15562
15860
  Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
@@ -15581,14 +15879,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
15581
15879
  var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
15582
15880
 
15583
15881
  // src/model/nodes/RaceInputsNode.ts
15584
- var import_non_secure45 = require("nanoid/non-secure");
15585
- var import_ts_dedent43 = require("ts-dedent");
15882
+ var import_non_secure46 = require("nanoid/non-secure");
15883
+ var import_ts_dedent44 = require("ts-dedent");
15586
15884
  var RaceInputsNodeImpl = class extends NodeImpl {
15587
15885
  static create() {
15588
15886
  const chartNode = {
15589
15887
  type: "raceInputs",
15590
15888
  title: "Race Inputs",
15591
- id: (0, import_non_secure45.nanoid)(),
15889
+ id: (0, import_non_secure46.nanoid)(),
15592
15890
  visualData: {
15593
15891
  x: 0,
15594
15892
  y: 0,
@@ -15638,7 +15936,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
15638
15936
  }
15639
15937
  static getUIData() {
15640
15938
  return {
15641
- infoBoxBody: import_ts_dedent43.dedent`
15939
+ infoBoxBody: import_ts_dedent44.dedent`
15642
15940
  Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
15643
15941
  `,
15644
15942
  infoBoxTitle: "Race Inputs Node",
@@ -15666,14 +15964,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
15666
15964
  var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
15667
15965
 
15668
15966
  // src/model/nodes/ToJsonNode.ts
15669
- var import_non_secure46 = require("nanoid/non-secure");
15670
- var import_ts_dedent44 = require("ts-dedent");
15967
+ var import_non_secure47 = require("nanoid/non-secure");
15968
+ var import_ts_dedent45 = require("ts-dedent");
15671
15969
  var ToJsonNodeImpl = class extends NodeImpl {
15672
15970
  static create() {
15673
15971
  const chartNode = {
15674
15972
  type: "toJson",
15675
15973
  title: "To JSON",
15676
- id: (0, import_non_secure46.nanoid)(),
15974
+ id: (0, import_non_secure47.nanoid)(),
15677
15975
  visualData: {
15678
15976
  x: 0,
15679
15977
  y: 0,
@@ -15718,7 +16016,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
15718
16016
  }
15719
16017
  static getUIData() {
15720
16018
  return {
15721
- infoBoxBody: import_ts_dedent44.dedent`
16019
+ infoBoxBody: import_ts_dedent45.dedent`
15722
16020
  Turns the input value into its JSON equivalent (stringifies the value).
15723
16021
  `,
15724
16022
  infoBoxTitle: "To JSON Node",
@@ -15740,14 +16038,14 @@ var ToJsonNodeImpl = class extends NodeImpl {
15740
16038
  var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
15741
16039
 
15742
16040
  // src/model/nodes/JoinNode.ts
15743
- var import_non_secure47 = require("nanoid/non-secure");
15744
- var import_ts_dedent45 = require("ts-dedent");
16041
+ var import_non_secure48 = require("nanoid/non-secure");
16042
+ var import_ts_dedent46 = require("ts-dedent");
15745
16043
  var JoinNodeImpl = class extends NodeImpl {
15746
16044
  static create = () => {
15747
16045
  const chartNode = {
15748
16046
  type: "join",
15749
16047
  title: "Join",
15750
- id: (0, import_non_secure47.nanoid)(),
16048
+ id: (0, import_non_secure48.nanoid)(),
15751
16049
  data: {
15752
16050
  flatten: true,
15753
16051
  joinString: "\n"
@@ -15823,7 +16121,7 @@ var JoinNodeImpl = class extends NodeImpl {
15823
16121
  }
15824
16122
  static getUIData() {
15825
16123
  return {
15826
- infoBoxBody: import_ts_dedent45.dedent`
16124
+ infoBoxBody: import_ts_dedent46.dedent`
15827
16125
  Takes an array of strings, and joins them using the configured delimiter.
15828
16126
 
15829
16127
  Defaults to a newline.
@@ -15860,15 +16158,15 @@ var JoinNodeImpl = class extends NodeImpl {
15860
16158
  var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
15861
16159
 
15862
16160
  // src/model/nodes/FilterNode.ts
15863
- var import_non_secure48 = require("nanoid/non-secure");
16161
+ var import_non_secure49 = require("nanoid/non-secure");
15864
16162
  var import_lodash_es13 = require("lodash");
15865
- var import_ts_dedent46 = require("ts-dedent");
16163
+ var import_ts_dedent47 = require("ts-dedent");
15866
16164
  var FilterNodeImpl = class extends NodeImpl {
15867
16165
  static create() {
15868
16166
  const chartNode = {
15869
16167
  type: "filter",
15870
16168
  title: "Filter",
15871
- id: (0, import_non_secure48.nanoid)(),
16169
+ id: (0, import_non_secure49.nanoid)(),
15872
16170
  visualData: {
15873
16171
  x: 0,
15874
16172
  y: 0,
@@ -15905,7 +16203,7 @@ var FilterNodeImpl = class extends NodeImpl {
15905
16203
  }
15906
16204
  static getUIData() {
15907
16205
  return {
15908
- infoBoxBody: import_ts_dedent46.dedent`
16206
+ infoBoxBody: import_ts_dedent47.dedent`
15909
16207
  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.
15910
16208
  `,
15911
16209
  infoBoxTitle: "Filter Node",
@@ -15930,11 +16228,11 @@ var FilterNodeImpl = class extends NodeImpl {
15930
16228
  var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
15931
16229
 
15932
16230
  // src/model/nodes/JSFilterNode.ts
15933
- var import_non_secure49 = require("nanoid/non-secure");
15934
- var import_ts_dedent48 = require("ts-dedent");
16231
+ var import_non_secure50 = require("nanoid/non-secure");
16232
+ var import_ts_dedent49 = require("ts-dedent");
15935
16233
 
15936
16234
  // src/model/nodes/jsListCallbackHelpers.ts
15937
- var import_ts_dedent47 = require("ts-dedent");
16235
+ var import_ts_dedent48 = require("ts-dedent");
15938
16236
  var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
15939
16237
  var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
15940
16238
  var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
@@ -15962,7 +16260,7 @@ function getJSListCallbackInterpolationInputNames(callbackBody) {
15962
16260
  }
15963
16261
  function buildJSListRuntimePreamble(callbackBody) {
15964
16262
  const inputNames = getJSListCallbackInterpolationInputNames(callbackBody);
15965
- return import_ts_dedent47.dedent`
16263
+ return import_ts_dedent48.dedent`
15966
16264
  const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
15967
16265
  ${buildCloneJsInputValueFunction()}
15968
16266
  const ${JS_LIST_INPUTS_IDENTIFIER} = Object.create(null);
@@ -15991,7 +16289,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
15991
16289
  }
15992
16290
  function buildJSFilterWrapper(callbackBody) {
15993
16291
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
15994
- return import_ts_dedent47.dedent`
16292
+ return import_ts_dedent48.dedent`
15995
16293
  ${buildJSListRuntimePreamble(callbackBody)}
15996
16294
 
15997
16295
  if (!Array.isArray(array)) {
@@ -16026,7 +16324,7 @@ function buildJSFilterWrapper(callbackBody) {
16026
16324
  }
16027
16325
  function buildJSMapWrapper(callbackBody) {
16028
16326
  const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
16029
- return import_ts_dedent47.dedent`
16327
+ return import_ts_dedent48.dedent`
16030
16328
  ${buildJSListRuntimePreamble(callbackBody)}
16031
16329
 
16032
16330
  if (!Array.isArray(array)) {
@@ -16098,7 +16396,7 @@ function getJSListNodeBody(callbackBody) {
16098
16396
  const previewBody = callbackBody.split("\n").slice(0, MAX_CALLBACK_PREVIEW_BODY_LINES).join("\n").trim();
16099
16397
  return {
16100
16398
  type: "colorized",
16101
- text: import_ts_dedent47.dedent`
16399
+ text: import_ts_dedent48.dedent`
16102
16400
  ${JS_LIST_CALLBACK_SIGNATURE} => {
16103
16401
  ${indentLines(previewBody, " ")}
16104
16402
  }
@@ -16146,7 +16444,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
16146
16444
  const chartNode = {
16147
16445
  type: "jsFilter",
16148
16446
  title: "JS Filter",
16149
- id: (0, import_non_secure49.nanoid)(),
16447
+ id: (0, import_non_secure50.nanoid)(),
16150
16448
  visualData: {
16151
16449
  x: 0,
16152
16450
  y: 0,
@@ -16178,7 +16476,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
16178
16476
  }
16179
16477
  static getUIData() {
16180
16478
  return {
16181
- infoBoxBody: import_ts_dedent48.dedent`
16479
+ infoBoxBody: import_ts_dedent49.dedent`
16182
16480
  Filters an input array using the body of a JavaScript callback.
16183
16481
 
16184
16482
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -16204,15 +16502,15 @@ var JSFilterNodeImpl = class extends NodeImpl {
16204
16502
  var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
16205
16503
 
16206
16504
  // src/model/nodes/JSMapNode.ts
16207
- var import_non_secure50 = require("nanoid/non-secure");
16208
- var import_ts_dedent49 = require("ts-dedent");
16505
+ var import_non_secure51 = require("nanoid/non-secure");
16506
+ var import_ts_dedent50 = require("ts-dedent");
16209
16507
  var DEFAULT_CALLBACK_BODY2 = "return item;";
16210
16508
  var JSMapNodeImpl = class extends NodeImpl {
16211
16509
  static create() {
16212
16510
  const chartNode = {
16213
16511
  type: "jsMap",
16214
16512
  title: "JS Map",
16215
- id: (0, import_non_secure50.nanoid)(),
16513
+ id: (0, import_non_secure51.nanoid)(),
16216
16514
  visualData: {
16217
16515
  x: 0,
16218
16516
  y: 0,
@@ -16244,7 +16542,7 @@ var JSMapNodeImpl = class extends NodeImpl {
16244
16542
  }
16245
16543
  static getUIData() {
16246
16544
  return {
16247
- infoBoxBody: import_ts_dedent49.dedent`
16545
+ infoBoxBody: import_ts_dedent50.dedent`
16248
16546
  Maps an input array using the body of a JavaScript callback.
16249
16547
 
16250
16548
  Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
@@ -16270,17 +16568,55 @@ var JSMapNodeImpl = class extends NodeImpl {
16270
16568
  var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
16271
16569
 
16272
16570
  // src/model/nodes/ObjectNode.ts
16273
- var import_non_secure51 = require("nanoid/non-secure");
16274
- var import_ts_dedent50 = require("ts-dedent");
16571
+ var import_non_secure52 = require("nanoid/non-secure");
16572
+ var import_ts_dedent51 = require("ts-dedent");
16275
16573
  var DEFAULT_JSON_TEMPLATE = `{
16276
16574
  "key": "{{input}}"
16277
16575
  }`;
16576
+ function isEscapedCharacter(value, index) {
16577
+ let backslashCount = 0;
16578
+ for (let i = index - 1; i >= 0 && value[i] === "\\"; i--) {
16579
+ backslashCount++;
16580
+ }
16581
+ return backslashCount % 2 === 1;
16582
+ }
16583
+ function isUnescapedQuoteAt(value, index) {
16584
+ return index >= 0 && index < value.length && value[index] === '"' && !isEscapedCharacter(value, index);
16585
+ }
16586
+ function isInsideJsonString(value, index) {
16587
+ let insideString = false;
16588
+ for (let i = 0; i < index; i++) {
16589
+ if (isUnescapedQuoteAt(value, i)) {
16590
+ insideString = !insideString;
16591
+ }
16592
+ }
16593
+ return insideString;
16594
+ }
16595
+ function stringifyJsonValue(value) {
16596
+ if (value == null) {
16597
+ return "null";
16598
+ }
16599
+ return JSON.stringify(value);
16600
+ }
16601
+ function stringifyWholeQuotedJsonValue(value) {
16602
+ if (value == null) {
16603
+ return "null";
16604
+ }
16605
+ if (typeof value === "string") {
16606
+ return JSON.stringify(value);
16607
+ }
16608
+ return JSON.stringify(JSON.stringify(value));
16609
+ }
16610
+ function stringifyEmbeddedJsonStringFragment(value) {
16611
+ const fragment = value == null ? "null" : typeof value === "string" ? value : JSON.stringify(value) ?? "null";
16612
+ return JSON.stringify(fragment).slice(1, -1);
16613
+ }
16278
16614
  var ObjectNodeImpl = class extends NodeImpl {
16279
16615
  static create() {
16280
16616
  const chartNode = {
16281
16617
  type: "object",
16282
16618
  title: "Object",
16283
- id: (0, import_non_secure51.nanoid)(),
16619
+ id: (0, import_non_secure52.nanoid)(),
16284
16620
  visualData: {
16285
16621
  x: 0,
16286
16622
  y: 0,
@@ -16330,7 +16666,7 @@ var ObjectNodeImpl = class extends NodeImpl {
16330
16666
  }
16331
16667
  static getUIData() {
16332
16668
  return {
16333
- infoBoxBody: import_ts_dedent50.dedent`
16669
+ infoBoxBody: import_ts_dedent51.dedent`
16334
16670
  Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
16335
16671
 
16336
16672
  Use double-quotes around the input values to escape them. String values are automatically escaped.
@@ -16351,12 +16687,11 @@ var ObjectNodeImpl = class extends NodeImpl {
16351
16687
  let result = "";
16352
16688
  let cursor = 0;
16353
16689
  for (const tokenSpan of tokenSpans) {
16354
- const hasLeadingQuote = tokenSpan.start > 0 && protectedBaseString[tokenSpan.start - 1] === '"';
16355
- const hasTrailingQuote = tokenSpan.end < protectedBaseString.length && protectedBaseString[tokenSpan.end] === '"';
16356
- const replacementStart = hasLeadingQuote ? tokenSpan.start - 1 : tokenSpan.start;
16357
- const replacementEnd = hasTrailingQuote ? tokenSpan.end + 1 : tokenSpan.end;
16690
+ const isInsideString = isInsideJsonString(protectedBaseString, tokenSpan.start);
16691
+ const isWholeQuotedToken = isInsideString && isUnescapedQuoteAt(protectedBaseString, tokenSpan.start - 1) && isUnescapedQuoteAt(protectedBaseString, tokenSpan.end);
16692
+ const replacementStart = isWholeQuotedToken ? tokenSpan.start - 1 : tokenSpan.start;
16693
+ const replacementEnd = isWholeQuotedToken ? tokenSpan.end + 1 : tokenSpan.end;
16358
16694
  const trimmedKey = getInterpolationTokenName(tokenSpan.rawInner) ?? tokenSpan.rawInner.trim();
16359
- const isQuoted = hasLeadingQuote;
16360
16695
  let value;
16361
16696
  const graphInputPrefix = "@graphInputs.";
16362
16697
  const contextPrefix = "@context.";
@@ -16367,23 +16702,17 @@ var ObjectNodeImpl = class extends NodeImpl {
16367
16702
  "graphInputs"
16368
16703
  );
16369
16704
  } else if (trimmedKey.startsWith(contextPrefix) && contextValues) {
16370
- value = resolveExpressionRawValue(
16371
- contextValues,
16372
- trimmedKey.substring(contextPrefix.length),
16373
- "context"
16374
- );
16705
+ value = resolveExpressionRawValue(contextValues, trimmedKey.substring(contextPrefix.length), "context");
16375
16706
  } else {
16376
16707
  value = values2[trimmedKey];
16377
16708
  }
16378
16709
  result += protectedBaseString.slice(cursor, replacementStart);
16379
- if (value == null) {
16380
- result += "null";
16381
- } else if (isQuoted && typeof value === "string") {
16382
- result += JSON.stringify(value);
16383
- } else if (isQuoted) {
16384
- result += JSON.stringify(JSON.stringify(value));
16710
+ if (isInsideString && !isWholeQuotedToken) {
16711
+ result += stringifyEmbeddedJsonStringFragment(value);
16712
+ } else if (isWholeQuotedToken) {
16713
+ result += stringifyWholeQuotedJsonValue(value);
16385
16714
  } else {
16386
- result += JSON.stringify(value);
16715
+ result += stringifyJsonValue(value);
16387
16716
  }
16388
16717
  cursor = replacementEnd;
16389
16718
  }
@@ -16424,14 +16753,14 @@ var ObjectNodeImpl = class extends NodeImpl {
16424
16753
  var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
16425
16754
 
16426
16755
  // src/model/nodes/BooleanNode.ts
16427
- var import_non_secure52 = require("nanoid/non-secure");
16428
- var import_ts_dedent51 = require("ts-dedent");
16756
+ var import_non_secure53 = require("nanoid/non-secure");
16757
+ var import_ts_dedent52 = require("ts-dedent");
16429
16758
  var BooleanNodeImpl = class extends NodeImpl {
16430
16759
  static create() {
16431
16760
  const chartNode = {
16432
16761
  type: "boolean",
16433
16762
  title: "Bool",
16434
- id: (0, import_non_secure52.nanoid)(),
16763
+ id: (0, import_non_secure53.nanoid)(),
16435
16764
  visualData: {
16436
16765
  x: 0,
16437
16766
  y: 0,
@@ -16469,7 +16798,7 @@ var BooleanNodeImpl = class extends NodeImpl {
16469
16798
  }
16470
16799
  static getUIData() {
16471
16800
  return {
16472
- infoBoxBody: import_ts_dedent51.dedent`
16801
+ infoBoxBody: import_ts_dedent52.dedent`
16473
16802
  Outputs a boolean constant, or converts an input value into a boolean.
16474
16803
  `,
16475
16804
  infoBoxTitle: "Bool Node",
@@ -16490,16 +16819,16 @@ var BooleanNodeImpl = class extends NodeImpl {
16490
16819
  var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
16491
16820
 
16492
16821
  // src/model/nodes/CompareNode.ts
16493
- var import_non_secure53 = require("nanoid/non-secure");
16822
+ var import_non_secure54 = require("nanoid/non-secure");
16494
16823
  var import_lodash_es14 = require("lodash");
16495
16824
  var import_ts_pattern5 = require("ts-pattern");
16496
- var import_ts_dedent52 = require("ts-dedent");
16825
+ var import_ts_dedent53 = require("ts-dedent");
16497
16826
  var CompareNodeImpl = class extends NodeImpl {
16498
16827
  static create() {
16499
16828
  const chartNode = {
16500
16829
  type: "compare",
16501
16830
  title: "Compare",
16502
- id: (0, import_non_secure53.nanoid)(),
16831
+ id: (0, import_non_secure54.nanoid)(),
16503
16832
  visualData: {
16504
16833
  x: 0,
16505
16834
  y: 0,
@@ -16571,7 +16900,7 @@ var CompareNodeImpl = class extends NodeImpl {
16571
16900
  }
16572
16901
  static getUIData() {
16573
16902
  return {
16574
- infoBoxBody: import_ts_dedent52.dedent`
16903
+ infoBoxBody: import_ts_dedent53.dedent`
16575
16904
  Compares two values using the configured operator and outputs the result.
16576
16905
 
16577
16906
  If the data types of the values do not match, then the B value is converted to the type of the A value.
@@ -16612,9 +16941,9 @@ var CompareNodeImpl = class extends NodeImpl {
16612
16941
  var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
16613
16942
 
16614
16943
  // src/model/nodes/EvaluateNode.ts
16615
- var import_non_secure54 = require("nanoid/non-secure");
16944
+ var import_non_secure55 = require("nanoid/non-secure");
16616
16945
  var import_ts_pattern6 = require("ts-pattern");
16617
- var import_ts_dedent53 = require("ts-dedent");
16946
+ var import_ts_dedent54 = require("ts-dedent");
16618
16947
  var unaryOperation = ["abs", "negate"];
16619
16948
  var isUnaryOp = (operation) => unaryOperation.includes(operation);
16620
16949
  var EvaluateNodeImpl = class extends NodeImpl {
@@ -16622,7 +16951,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
16622
16951
  const chartNode = {
16623
16952
  type: "evaluate",
16624
16953
  title: "Evaluate",
16625
- id: (0, import_non_secure54.nanoid)(),
16954
+ id: (0, import_non_secure55.nanoid)(),
16626
16955
  visualData: {
16627
16956
  x: 0,
16628
16957
  y: 0,
@@ -16700,7 +17029,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
16700
17029
  }
16701
17030
  static getUIData() {
16702
17031
  return {
16703
- infoBoxBody: import_ts_dedent53.dedent`
17032
+ infoBoxBody: import_ts_dedent54.dedent`
16704
17033
  Evaluates the configured mathematical operation on the input values and outputs the result.
16705
17034
 
16706
17035
  For more complex operations, you should use the \`Code\` node.
@@ -16736,14 +17065,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
16736
17065
  var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
16737
17066
 
16738
17067
  // src/model/nodes/NumberNode.ts
16739
- var import_non_secure55 = require("nanoid/non-secure");
16740
- var import_ts_dedent54 = require("ts-dedent");
17068
+ var import_non_secure56 = require("nanoid/non-secure");
17069
+ var import_ts_dedent55 = require("ts-dedent");
16741
17070
  var NumberNodeImpl = class extends NodeImpl {
16742
17071
  static create() {
16743
17072
  const chartNode = {
16744
17073
  type: "number",
16745
17074
  title: "Number",
16746
- id: (0, import_non_secure55.nanoid)(),
17075
+ id: (0, import_non_secure56.nanoid)(),
16747
17076
  visualData: {
16748
17077
  x: 0,
16749
17078
  y: 0,
@@ -16787,7 +17116,7 @@ var NumberNodeImpl = class extends NodeImpl {
16787
17116
  }
16788
17117
  static getUIData() {
16789
17118
  return {
16790
- infoBoxBody: import_ts_dedent54.dedent`
17119
+ infoBoxBody: import_ts_dedent55.dedent`
16791
17120
  Outputs a number constant, or converts an input value into a number.
16792
17121
 
16793
17122
  Can be configured to round the number to a certain number of decimal places.
@@ -16814,8 +17143,8 @@ var NumberNodeImpl = class extends NodeImpl {
16814
17143
  var numberNode = nodeDefinition(NumberNodeImpl, "Number");
16815
17144
 
16816
17145
  // src/model/nodes/RandomNumberNode.ts
16817
- var import_non_secure56 = require("nanoid/non-secure");
16818
- var import_ts_dedent55 = require("ts-dedent");
17146
+ var import_non_secure57 = require("nanoid/non-secure");
17147
+ var import_ts_dedent56 = require("ts-dedent");
16819
17148
  var randomNumberTypeOptions = [
16820
17149
  { value: false, label: "Float" },
16821
17150
  { value: true, label: "Integer" }
@@ -16825,7 +17154,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16825
17154
  const chartNode = {
16826
17155
  type: "randomNumber",
16827
17156
  title: "Random number",
16828
- id: (0, import_non_secure56.nanoid)(),
17157
+ id: (0, import_non_secure57.nanoid)(),
16829
17158
  visualData: {
16830
17159
  x: 0,
16831
17160
  y: 0,
@@ -16883,7 +17212,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16883
17212
  ];
16884
17213
  }
16885
17214
  getBody() {
16886
- return import_ts_dedent55.dedent`
17215
+ return import_ts_dedent56.dedent`
16887
17216
  Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
16888
17217
  Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
16889
17218
  ${this.data.integers ? "Integers" : "Floats"}
@@ -16892,7 +17221,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16892
17221
  }
16893
17222
  static getUIData() {
16894
17223
  return {
16895
- infoBoxBody: import_ts_dedent55.dedent`
17224
+ infoBoxBody: import_ts_dedent56.dedent`
16896
17225
  Outputs a random number between the configured min and max values.
16897
17226
 
16898
17227
  Can be configured to output only integers, and whether the max value is inclusive or exclusive.
@@ -16923,15 +17252,15 @@ var RandomNumberNodeImpl = class extends NodeImpl {
16923
17252
  var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
16924
17253
 
16925
17254
  // src/model/nodes/ShuffleNode.ts
16926
- var import_non_secure57 = require("nanoid/non-secure");
17255
+ var import_non_secure58 = require("nanoid/non-secure");
16927
17256
  var import_lodash_es15 = require("lodash");
16928
- var import_ts_dedent56 = require("ts-dedent");
17257
+ var import_ts_dedent57 = require("ts-dedent");
16929
17258
  var ShuffleNodeImpl = class extends NodeImpl {
16930
17259
  static create() {
16931
17260
  const chartNode = {
16932
17261
  type: "shuffle",
16933
17262
  title: "Shuffle",
16934
- id: (0, import_non_secure57.nanoid)(),
17263
+ id: (0, import_non_secure58.nanoid)(),
16935
17264
  visualData: {
16936
17265
  x: 0,
16937
17266
  y: 0,
@@ -16961,7 +17290,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
16961
17290
  }
16962
17291
  static getUIData() {
16963
17292
  return {
16964
- infoBoxBody: import_ts_dedent56.dedent`
17293
+ infoBoxBody: import_ts_dedent57.dedent`
16965
17294
  Shuffles the input array. Outputs the shuffled array.
16966
17295
  `,
16967
17296
  infoBoxTitle: "Shuffle Node",
@@ -16985,14 +17314,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
16985
17314
  var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
16986
17315
 
16987
17316
  // src/model/nodes/CommentNode.ts
16988
- var import_non_secure58 = require("nanoid/non-secure");
16989
- var import_ts_dedent57 = require("ts-dedent");
17317
+ var import_non_secure59 = require("nanoid/non-secure");
17318
+ var import_ts_dedent58 = require("ts-dedent");
16990
17319
  var CommentNodeImpl = class extends NodeImpl {
16991
17320
  static create() {
16992
17321
  const chartNode = {
16993
17322
  type: "comment",
16994
17323
  title: "Comment",
16995
- id: (0, import_non_secure58.nanoid)(),
17324
+ id: (0, import_non_secure59.nanoid)(),
16996
17325
  visualData: {
16997
17326
  x: 0,
16998
17327
  y: 0,
@@ -17038,7 +17367,7 @@ var CommentNodeImpl = class extends NodeImpl {
17038
17367
  }
17039
17368
  static getUIData() {
17040
17369
  return {
17041
- infoBoxBody: import_ts_dedent57.dedent`
17370
+ infoBoxBody: import_ts_dedent58.dedent`
17042
17371
  A comment node is a node that does nothing. It is useful for adding notes to a graph.
17043
17372
  `,
17044
17373
  infoBoxTitle: "Comment Node",
@@ -17053,11 +17382,11 @@ var CommentNodeImpl = class extends NodeImpl {
17053
17382
  var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
17054
17383
 
17055
17384
  // src/model/nodes/ImageNode.ts
17056
- var import_non_secure59 = require("nanoid/non-secure");
17385
+ var import_non_secure60 = require("nanoid/non-secure");
17057
17386
  var ImageNodeImpl = class extends NodeImpl {
17058
17387
  static create() {
17059
17388
  return {
17060
- id: (0, import_non_secure59.nanoid)(),
17389
+ id: (0, import_non_secure60.nanoid)(),
17061
17390
  type: "image",
17062
17391
  title: "Image",
17063
17392
  visualData: { x: 0, y: 0, width: 250 },
@@ -17154,11 +17483,11 @@ var ImageNodeImpl = class extends NodeImpl {
17154
17483
  var imageNode = nodeDefinition(ImageNodeImpl, "Image");
17155
17484
 
17156
17485
  // src/model/nodes/AudioNode.ts
17157
- var import_non_secure60 = require("nanoid/non-secure");
17486
+ var import_non_secure61 = require("nanoid/non-secure");
17158
17487
  var AudioNodeImpl = class extends NodeImpl {
17159
17488
  static create() {
17160
17489
  return {
17161
- id: (0, import_non_secure60.nanoid)(),
17490
+ id: (0, import_non_secure61.nanoid)(),
17162
17491
  type: "audio",
17163
17492
  title: "Audio",
17164
17493
  visualData: { x: 0, y: 0, width: 300 },
@@ -17251,7 +17580,7 @@ var AudioNodeImpl = class extends NodeImpl {
17251
17580
  var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
17252
17581
 
17253
17582
  // src/model/nodes/HttpCallNode.ts
17254
- var import_non_secure61 = require("nanoid/non-secure");
17583
+ var import_non_secure62 = require("nanoid/non-secure");
17255
17584
  var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
17256
17585
  var REQUEST_ERROR_OUTPUT_ID = "requestError";
17257
17586
  var STATUS_CODE_OUTPUT_ID = "statusCode";
@@ -17480,7 +17809,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
17480
17809
  const chartNode = {
17481
17810
  type: "httpCall",
17482
17811
  title: "Http Call",
17483
- id: (0, import_non_secure61.nanoid)(),
17812
+ id: (0, import_non_secure62.nanoid)(),
17484
17813
  visualData: {
17485
17814
  x: 0,
17486
17815
  y: 0,
@@ -17820,14 +18149,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
17820
18149
  var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
17821
18150
 
17822
18151
  // src/model/nodes/DelayNode.ts
17823
- var import_non_secure62 = require("nanoid/non-secure");
17824
- var import_ts_dedent58 = require("ts-dedent");
18152
+ var import_non_secure63 = require("nanoid/non-secure");
18153
+ var import_ts_dedent59 = require("ts-dedent");
17825
18154
  var DelayNodeImpl = class extends NodeImpl {
17826
18155
  static create() {
17827
18156
  const chartNode = {
17828
18157
  type: "delay",
17829
18158
  title: "Delay",
17830
- id: (0, import_non_secure62.nanoid)(),
18159
+ id: (0, import_non_secure63.nanoid)(),
17831
18160
  visualData: {
17832
18161
  x: 0,
17833
18162
  y: 0,
@@ -17872,7 +18201,7 @@ var DelayNodeImpl = class extends NodeImpl {
17872
18201
  }
17873
18202
  static getUIData() {
17874
18203
  return {
17875
- infoBoxBody: import_ts_dedent58.dedent`
18204
+ infoBoxBody: import_ts_dedent59.dedent`
17876
18205
  Delays the execution and then passes the input value to the output without any modifications.
17877
18206
  `,
17878
18207
  infoBoxTitle: "Delay Node",
@@ -17923,12 +18252,12 @@ var DelayNodeImpl = class extends NodeImpl {
17923
18252
  var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
17924
18253
 
17925
18254
  // src/model/nodes/AppendToDatasetNode.ts
17926
- var import_non_secure63 = require("nanoid/non-secure");
17927
- var import_ts_dedent59 = require("ts-dedent");
18255
+ var import_non_secure64 = require("nanoid/non-secure");
18256
+ var import_ts_dedent60 = require("ts-dedent");
17928
18257
  var AppendToDatasetNodeImpl = class extends NodeImpl {
17929
18258
  static create() {
17930
18259
  return {
17931
- id: (0, import_non_secure63.nanoid)(),
18260
+ id: (0, import_non_secure64.nanoid)(),
17932
18261
  type: "appendToDataset",
17933
18262
  title: "Append to Dataset",
17934
18263
  visualData: { x: 0, y: 0, width: 250 },
@@ -17984,7 +18313,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
17984
18313
  }
17985
18314
  static getUIData() {
17986
18315
  return {
17987
- infoBoxBody: import_ts_dedent59.dedent`
18316
+ infoBoxBody: import_ts_dedent60.dedent`
17988
18317
  Appends a row of data to the specified dataset.
17989
18318
  `,
17990
18319
  infoBoxTitle: "Append to Dataset Node",
@@ -18534,14 +18863,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
18534
18863
  var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
18535
18864
 
18536
18865
  // src/model/nodes/SliceNode.ts
18537
- var import_non_secure64 = require("nanoid/non-secure");
18538
- var import_ts_dedent60 = require("ts-dedent");
18866
+ var import_non_secure65 = require("nanoid/non-secure");
18867
+ var import_ts_dedent61 = require("ts-dedent");
18539
18868
  var SliceNodeImpl = class extends NodeImpl {
18540
18869
  static create() {
18541
18870
  const chartNode = {
18542
18871
  type: "slice",
18543
18872
  title: "Slice",
18544
- id: (0, import_non_secure64.nanoid)(),
18873
+ id: (0, import_non_secure65.nanoid)(),
18545
18874
  visualData: {
18546
18875
  x: 0,
18547
18876
  y: 0,
@@ -18594,14 +18923,14 @@ var SliceNodeImpl = class extends NodeImpl {
18594
18923
  ];
18595
18924
  }
18596
18925
  getBody() {
18597
- return import_ts_dedent60.dedent`
18926
+ return import_ts_dedent61.dedent`
18598
18927
  Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
18599
18928
  Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
18600
18929
  `;
18601
18930
  }
18602
18931
  static getUIData() {
18603
18932
  return {
18604
- infoBoxBody: import_ts_dedent60.dedent`
18933
+ infoBoxBody: import_ts_dedent61.dedent`
18605
18934
  Slices an array from the start index for the count number of elements.
18606
18935
 
18607
18936
  Useful for extracting a portion of an array.
@@ -18627,14 +18956,14 @@ var SliceNodeImpl = class extends NodeImpl {
18627
18956
  var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
18628
18957
 
18629
18958
  // src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
18630
- var import_non_secure65 = require("nanoid/non-secure");
18631
- var import_ts_dedent61 = require("ts-dedent");
18959
+ var import_non_secure66 = require("nanoid/non-secure");
18960
+ var import_ts_dedent62 = require("ts-dedent");
18632
18961
  var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
18633
18962
  static create() {
18634
18963
  const chartNode = {
18635
18964
  type: "extractMarkdownCodeBlocks",
18636
18965
  title: "Extract Markdown Code Blocks",
18637
- id: (0, import_non_secure65.nanoid)(),
18966
+ id: (0, import_non_secure66.nanoid)(),
18638
18967
  visualData: {
18639
18968
  x: 0,
18640
18969
  y: 0,
@@ -18675,7 +19004,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
18675
19004
  }
18676
19005
  static getUIData() {
18677
19006
  return {
18678
- infoBoxBody: import_ts_dedent61.dedent`
19007
+ infoBoxBody: import_ts_dedent62.dedent`
18679
19008
  Extracts the code blocks in the input Markdown text.
18680
19009
 
18681
19010
  Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
@@ -18726,7 +19055,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
18726
19055
  );
18727
19056
 
18728
19057
  // src/model/nodes/AssembleMessageNode.ts
18729
- var import_non_secure66 = require("nanoid/non-secure");
19058
+ var import_non_secure67 = require("nanoid/non-secure");
18730
19059
  var import_lodash_es16 = require("lodash");
18731
19060
  var import_ts_pattern7 = require("ts-pattern");
18732
19061
  var messageTypeToTitle = {
@@ -18740,7 +19069,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
18740
19069
  const chartNode = {
18741
19070
  type: "assembleMessage",
18742
19071
  title: "Assemble Message",
18743
- id: (0, import_non_secure66.nanoid)(),
19072
+ id: (0, import_non_secure67.nanoid)(),
18744
19073
  visualData: {
18745
19074
  x: 0,
18746
19075
  y: 0,
@@ -18937,13 +19266,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
18937
19266
  var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
18938
19267
 
18939
19268
  // src/model/nodes/URLReferenceNode.ts
18940
- var import_non_secure67 = require("nanoid/non-secure");
19269
+ var import_non_secure68 = require("nanoid/non-secure");
18941
19270
  var UrlReferenceNodeImpl = class extends NodeImpl {
18942
19271
  static create() {
18943
19272
  const chartNode = {
18944
19273
  type: "urlReference",
18945
19274
  title: "URL Reference",
18946
- id: (0, import_non_secure67.nanoid)(),
19275
+ id: (0, import_non_secure68.nanoid)(),
18947
19276
  visualData: {
18948
19277
  x: 0,
18949
19278
  y: 0,
@@ -19012,15 +19341,15 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
19012
19341
  var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
19013
19342
 
19014
19343
  // src/model/nodes/DestructureNode.ts
19015
- var import_non_secure68 = require("nanoid/non-secure");
19344
+ var import_non_secure69 = require("nanoid/non-secure");
19016
19345
  var import_jsonpath_plus3 = require("jsonpath-plus");
19017
- var import_ts_dedent62 = require("ts-dedent");
19346
+ var import_ts_dedent63 = require("ts-dedent");
19018
19347
  var DestructureNodeImpl = class extends NodeImpl {
19019
19348
  static create() {
19020
19349
  const chartNode = {
19021
19350
  type: "destructure",
19022
19351
  title: "Destructure",
19023
- id: (0, import_non_secure68.nanoid)(),
19352
+ id: (0, import_non_secure69.nanoid)(),
19024
19353
  visualData: {
19025
19354
  x: 0,
19026
19355
  y: 0,
@@ -19028,7 +19357,7 @@ var DestructureNodeImpl = class extends NodeImpl {
19028
19357
  },
19029
19358
  data: {
19030
19359
  paths: ["$.value"],
19031
- pathPortIds: [(0, import_non_secure68.nanoid)()]
19360
+ pathPortIds: [(0, import_non_secure69.nanoid)()]
19032
19361
  }
19033
19362
  };
19034
19363
  return chartNode;
@@ -19082,7 +19411,7 @@ var DestructureNodeImpl = class extends NodeImpl {
19082
19411
  }
19083
19412
  static getUIData() {
19084
19413
  return {
19085
- infoBoxBody: import_ts_dedent62.dedent`
19414
+ infoBoxBody: import_ts_dedent63.dedent`
19086
19415
  Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
19087
19416
  `,
19088
19417
  infoBoxTitle: "Destructure Node",
@@ -19116,12 +19445,12 @@ var DestructureNodeImpl = class extends NodeImpl {
19116
19445
  var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
19117
19446
 
19118
19447
  // src/model/nodes/ReplaceDatasetNode.ts
19119
- var import_non_secure69 = require("nanoid/non-secure");
19120
- var import_ts_dedent63 = require("ts-dedent");
19448
+ var import_non_secure70 = require("nanoid/non-secure");
19449
+ var import_ts_dedent64 = require("ts-dedent");
19121
19450
  var ReplaceDatasetNodeImpl = class extends NodeImpl {
19122
19451
  static create() {
19123
19452
  return {
19124
- id: (0, import_non_secure69.nanoid)(),
19453
+ id: (0, import_non_secure70.nanoid)(),
19125
19454
  type: "replaceDataset",
19126
19455
  title: "Replace Dataset",
19127
19456
  visualData: { x: 0, y: 0, width: 250 },
@@ -19160,7 +19489,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
19160
19489
  }
19161
19490
  static getUIData() {
19162
19491
  return {
19163
- infoBoxBody: import_ts_dedent63.dedent`
19492
+ infoBoxBody: import_ts_dedent64.dedent`
19164
19493
  Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
19165
19494
  `,
19166
19495
  infoBoxTitle: "Replace Dataset Node",
@@ -19292,14 +19621,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
19292
19621
  var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
19293
19622
 
19294
19623
  // src/model/nodes/GraphReferenceNode.ts
19295
- var import_non_secure70 = require("nanoid/non-secure");
19296
- var import_ts_dedent64 = require("ts-dedent");
19624
+ var import_non_secure71 = require("nanoid/non-secure");
19625
+ var import_ts_dedent65 = require("ts-dedent");
19297
19626
  var GraphReferenceNodeImpl = class extends NodeImpl {
19298
19627
  static create() {
19299
19628
  const chartNode = {
19300
19629
  type: "graphReference",
19301
19630
  title: "Graph Reference",
19302
- id: (0, import_non_secure70.nanoid)(),
19631
+ id: (0, import_non_secure71.nanoid)(),
19303
19632
  visualData: {
19304
19633
  x: 0,
19305
19634
  y: 0,
@@ -19348,7 +19677,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
19348
19677
  }
19349
19678
  static getUIData() {
19350
19679
  return {
19351
- infoBoxBody: import_ts_dedent64.dedent`
19680
+ infoBoxBody: import_ts_dedent65.dedent`
19352
19681
  Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
19353
19682
  `,
19354
19683
  infoBoxTitle: "Graph Reference Node",
@@ -19414,8 +19743,8 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
19414
19743
  var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
19415
19744
 
19416
19745
  // src/model/nodes/CallGraphNode.ts
19417
- var import_non_secure71 = require("nanoid/non-secure");
19418
- var import_ts_dedent65 = require("ts-dedent");
19746
+ var import_non_secure72 = require("nanoid/non-secure");
19747
+ var import_ts_dedent66 = require("ts-dedent");
19419
19748
 
19420
19749
  // src/api/looseDataValue.ts
19421
19750
  var import_lodash_es17 = require("lodash");
@@ -19441,7 +19770,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
19441
19770
  const chartNode = {
19442
19771
  type: "callGraph",
19443
19772
  title: "Call Graph",
19444
- id: (0, import_non_secure71.nanoid)(),
19773
+ id: (0, import_non_secure72.nanoid)(),
19445
19774
  visualData: {
19446
19775
  x: 0,
19447
19776
  y: 0,
@@ -19491,7 +19820,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
19491
19820
  }
19492
19821
  static getUIData() {
19493
19822
  return {
19494
- infoBoxBody: import_ts_dedent65.dedent`
19823
+ infoBoxBody: import_ts_dedent66.dedent`
19495
19824
  Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
19496
19825
  `,
19497
19826
  infoBoxTitle: "Call Graph Node",
@@ -19563,7 +19892,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
19563
19892
 
19564
19893
  // src/model/nodes/DelegateFunctionCallNode.ts
19565
19894
  var import_nanoid = require("nanoid");
19566
- var import_ts_dedent66 = require("ts-dedent");
19895
+ var import_ts_dedent67 = require("ts-dedent");
19567
19896
  var DelegateFunctionCallNodeImpl = class extends NodeImpl {
19568
19897
  static create() {
19569
19898
  const chartNode = {
@@ -19615,7 +19944,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
19615
19944
  }
19616
19945
  static getUIData() {
19617
19946
  return {
19618
- infoBoxBody: import_ts_dedent66.dedent`
19947
+ infoBoxBody: import_ts_dedent67.dedent`
19619
19948
  Handles a tool call by delegating it to a different subgraph depending on the tool call.
19620
19949
  `,
19621
19950
  infoBoxTitle: "Delegate Tool Call Node",
@@ -19736,11 +20065,11 @@ function buildDelegatedToolCallOutputs(records) {
19736
20065
  var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
19737
20066
 
19738
20067
  // src/model/nodes/PlayAudioNode.ts
19739
- var import_non_secure72 = require("nanoid/non-secure");
20068
+ var import_non_secure73 = require("nanoid/non-secure");
19740
20069
  var PlayAudioNodeImpl = class extends NodeImpl {
19741
20070
  static create() {
19742
20071
  return {
19743
- id: (0, import_non_secure72.nanoid)(),
20072
+ id: (0, import_non_secure73.nanoid)(),
19744
20073
  type: "playAudio",
19745
20074
  title: "Play Audio",
19746
20075
  visualData: { x: 0, y: 0, width: 200 },
@@ -19794,11 +20123,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
19794
20123
  var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
19795
20124
 
19796
20125
  // src/model/nodes/DocumentNode.ts
19797
- var import_non_secure73 = require("nanoid/non-secure");
20126
+ var import_non_secure74 = require("nanoid/non-secure");
19798
20127
  var DocumentNodeImpl = class extends NodeImpl {
19799
20128
  static create() {
19800
20129
  return {
19801
- id: (0, import_non_secure73.nanoid)(),
20130
+ id: (0, import_non_secure74.nanoid)(),
19802
20131
  type: "document",
19803
20132
  title: "Document",
19804
20133
  visualData: { x: 0, y: 0, width: 300 },
@@ -19964,14 +20293,14 @@ var DocumentNodeImpl = class extends NodeImpl {
19964
20293
  var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
19965
20294
 
19966
20295
  // src/model/nodes/ChatLoopNode.ts
19967
- var import_non_secure74 = require("nanoid/non-secure");
19968
- var import_ts_dedent67 = require("ts-dedent");
20296
+ var import_non_secure75 = require("nanoid/non-secure");
20297
+ var import_ts_dedent68 = require("ts-dedent");
19969
20298
  var ChatLoopNodeImpl = class extends NodeImpl {
19970
20299
  static create() {
19971
20300
  const chartNode = {
19972
20301
  type: "chatLoop",
19973
20302
  title: "Chat Loop",
19974
- id: (0, import_non_secure74.nanoid)(),
20303
+ id: (0, import_non_secure75.nanoid)(),
19975
20304
  visualData: {
19976
20305
  x: 0,
19977
20306
  y: 0,
@@ -20004,7 +20333,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
20004
20333
  }
20005
20334
  static getUIData() {
20006
20335
  return {
20007
- infoBoxBody: import_ts_dedent67.dedent`
20336
+ infoBoxBody: import_ts_dedent68.dedent`
20008
20337
  Creates an interactive chat loop with an AI model. The node will:
20009
20338
  1. Send the initial prompt to the AI
20010
20339
  2. Show the AI's response and prompt for user input
@@ -20104,12 +20433,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
20104
20433
  var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, "Chat Loop");
20105
20434
 
20106
20435
  // src/model/nodes/ReadAllFilesNode.ts
20107
- var import_non_secure75 = require("nanoid/non-secure");
20108
- var import_ts_dedent68 = require("ts-dedent");
20436
+ var import_non_secure76 = require("nanoid/non-secure");
20437
+ var import_ts_dedent69 = require("ts-dedent");
20109
20438
  var ReadAllFilesNodeImpl = class extends NodeImpl {
20110
20439
  static create() {
20111
20440
  return {
20112
- id: (0, import_non_secure75.nanoid)(),
20441
+ id: (0, import_non_secure76.nanoid)(),
20113
20442
  type: "readAllFiles",
20114
20443
  title: "Read All Files",
20115
20444
  visualData: { x: 0, y: 0, width: 250 },
@@ -20220,7 +20549,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20220
20549
  ];
20221
20550
  }
20222
20551
  getBody() {
20223
- return import_ts_dedent68.dedent`
20552
+ return import_ts_dedent69.dedent`
20224
20553
  ${this.data.asBinary ? "Read as Binary" : "Read as Text"}
20225
20554
  Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
20226
20555
  Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
@@ -20229,7 +20558,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20229
20558
  }
20230
20559
  static getUIData() {
20231
20560
  return {
20232
- infoBoxBody: import_ts_dedent68.dedent`
20561
+ infoBoxBody: import_ts_dedent69.dedent`
20233
20562
  Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
20234
20563
  Each object has a 'path' (string) and 'content' (string or binary) property.
20235
20564
  `,
@@ -20302,14 +20631,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
20302
20631
  var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
20303
20632
 
20304
20633
  // src/model/nodes/ToMarkdownTableNode.ts
20305
- var import_non_secure76 = require("nanoid/non-secure");
20306
- var import_ts_dedent69 = require("ts-dedent");
20634
+ var import_non_secure77 = require("nanoid/non-secure");
20635
+ var import_ts_dedent70 = require("ts-dedent");
20307
20636
  var ToMarkdownTableNodeImpl = class extends NodeImpl {
20308
20637
  static create() {
20309
20638
  const chartNode = {
20310
20639
  type: "toMarkdownTable",
20311
20640
  title: "To Markdown Table",
20312
- id: (0, import_non_secure76.nanoid)(),
20641
+ id: (0, import_non_secure77.nanoid)(),
20313
20642
  visualData: {
20314
20643
  x: 0,
20315
20644
  y: 0,
@@ -20365,7 +20694,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
20365
20694
  }
20366
20695
  static getUIData() {
20367
20696
  return {
20368
- infoBoxBody: import_ts_dedent69.dedent`
20697
+ infoBoxBody: import_ts_dedent70.dedent`
20369
20698
  Converts an array of objects into a markdown table format.
20370
20699
  Input should be an array of objects with consistent keys.
20371
20700
  `,
@@ -20417,7 +20746,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
20417
20746
 
20418
20747
  // src/model/nodes/CronNode.ts
20419
20748
  var import_nanoid2 = require("nanoid");
20420
- var import_ts_dedent70 = require("ts-dedent");
20749
+ var import_ts_dedent71 = require("ts-dedent");
20421
20750
  var cronParser = __toESM(require("cron-parser"), 1);
20422
20751
  var CronNodeImpl = class extends NodeImpl {
20423
20752
  static create() {
@@ -20487,7 +20816,7 @@ var CronNodeImpl = class extends NodeImpl {
20487
20816
  }
20488
20817
  static getUIData() {
20489
20818
  return {
20490
- infoBoxBody: import_ts_dedent70.dedent`
20819
+ infoBoxBody: import_ts_dedent71.dedent`
20491
20820
  Executes a subgraph on a schedule. Supports:
20492
20821
  - Natural language (e.g., "every 5 minutes", "daily at 3pm")
20493
20822
  - Cron expressions (e.g., "0 * * * *")
@@ -20527,7 +20856,7 @@ var CronNodeImpl = class extends NodeImpl {
20527
20856
  type: "string",
20528
20857
  dataKey: "schedule",
20529
20858
  label: "Schedule",
20530
- helperMessage: import_ts_dedent70.dedent`
20859
+ helperMessage: import_ts_dedent71.dedent`
20531
20860
  Examples:
20532
20861
  Cron: "*/5 * * * *", "0 15 * * *"
20533
20862
  Interval: "5 minutes", "1 hour", "7 days"
@@ -20658,15 +20987,15 @@ ${this.data.schedule}`;
20658
20987
  var cronNode = nodeDefinition(CronNodeImpl, "Cron");
20659
20988
 
20660
20989
  // src/model/nodes/ToTreeNode.ts
20661
- var import_non_secure77 = require("nanoid/non-secure");
20662
- var import_ts_dedent71 = require("ts-dedent");
20990
+ var import_non_secure78 = require("nanoid/non-secure");
20991
+ var import_ts_dedent72 = require("ts-dedent");
20663
20992
  var import_lodash_es18 = require("lodash");
20664
20993
  var ToTreeNodeImpl = class extends NodeImpl {
20665
20994
  static create() {
20666
20995
  const chartNode = {
20667
20996
  type: "toTree",
20668
20997
  title: "To Tree",
20669
- id: (0, import_non_secure77.nanoid)(),
20998
+ id: (0, import_non_secure78.nanoid)(),
20670
20999
  visualData: {
20671
21000
  x: 0,
20672
21001
  y: 0,
@@ -20721,7 +21050,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
20721
21050
  ];
20722
21051
  }
20723
21052
  getBody() {
20724
- return import_ts_dedent71.dedent`
21053
+ return import_ts_dedent72.dedent`
20725
21054
  Format: ${this.data.format}
20726
21055
  Children: ${this.data.childrenProperty}
20727
21056
  Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
@@ -20729,7 +21058,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
20729
21058
  }
20730
21059
  static getUIData() {
20731
21060
  return {
20732
- infoBoxBody: import_ts_dedent71.dedent`
21061
+ infoBoxBody: import_ts_dedent72.dedent`
20733
21062
  Converts an array of objects into a tree structure and renders it as text.
20734
21063
 
20735
21064
  The format field supports interpolation using {{property}} syntax to determine
@@ -20784,14 +21113,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
20784
21113
  var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
20785
21114
 
20786
21115
  // src/model/nodes/LoopUntilNode.ts
20787
- var import_non_secure78 = require("nanoid/non-secure");
20788
- var import_ts_dedent72 = require("ts-dedent");
21116
+ var import_non_secure79 = require("nanoid/non-secure");
21117
+ var import_ts_dedent73 = require("ts-dedent");
20789
21118
  var LoopUntilNodeImpl = class extends NodeImpl {
20790
21119
  static create() {
20791
21120
  const chartNode = {
20792
21121
  type: "loopUntil",
20793
21122
  title: "Loop Until",
20794
- id: (0, import_non_secure78.nanoid)(),
21123
+ id: (0, import_non_secure79.nanoid)(),
20795
21124
  visualData: {
20796
21125
  x: 0,
20797
21126
  y: 0,
@@ -20915,7 +21244,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
20915
21244
  }
20916
21245
  static getUIData() {
20917
21246
  return {
20918
- infoBoxBody: import_ts_dedent72.dedent`
21247
+ infoBoxBody: import_ts_dedent73.dedent`
20919
21248
  Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
20920
21249
  the inputs for the next iteration. Supports different stopping conditions and optional
20921
21250
  maximum iterations.
@@ -21273,14 +21602,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
21273
21602
  var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
21274
21603
 
21275
21604
  // src/model/nodes/MCPToolCallNode.ts
21276
- var import_non_secure79 = require("nanoid/non-secure");
21277
- var import_ts_dedent73 = require("ts-dedent");
21605
+ var import_non_secure80 = require("nanoid/non-secure");
21606
+ var import_ts_dedent74 = require("ts-dedent");
21278
21607
  var MCPToolCallNodeImpl = class extends NodeImpl {
21279
21608
  static create() {
21280
21609
  const chartNode = {
21281
21610
  type: "mcpToolCall",
21282
21611
  title: "MCP Tool Call",
21283
- id: (0, import_non_secure79.nanoid)(),
21612
+ id: (0, import_non_secure80.nanoid)(),
21284
21613
  visualData: {
21285
21614
  x: 0,
21286
21615
  y: 0,
@@ -21293,7 +21622,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21293
21622
  serverUrl: "http://localhost:8080/mcp",
21294
21623
  serverId: "",
21295
21624
  toolName: "",
21296
- toolArguments: import_ts_dedent73.dedent`
21625
+ toolArguments: import_ts_dedent74.dedent`
21297
21626
  {
21298
21627
  "key": "value"
21299
21628
  }`,
@@ -21433,7 +21762,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21433
21762
  }
21434
21763
  static getUIData() {
21435
21764
  return {
21436
- infoBoxBody: import_ts_dedent73.dedent`
21765
+ infoBoxBody: import_ts_dedent74.dedent`
21437
21766
  Connects to an MCP (Model Context Protocol) server and gets a tool call response.
21438
21767
  `,
21439
21768
  infoBoxTitle: "MCP Tool Call Node",
@@ -21522,13 +21851,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
21522
21851
  var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
21523
21852
 
21524
21853
  // src/model/nodes/MCPGetPromptNode.ts
21525
- var import_non_secure80 = require("nanoid/non-secure");
21854
+ var import_non_secure81 = require("nanoid/non-secure");
21526
21855
  var MCPGetPromptNodeImpl = class extends NodeImpl {
21527
21856
  static create() {
21528
21857
  const chartNode = {
21529
21858
  type: "mcpGetPrompt",
21530
21859
  title: "MCP Get Prompt",
21531
- id: (0, import_non_secure80.nanoid)(),
21860
+ id: (0, import_non_secure81.nanoid)(),
21532
21861
  visualData: {
21533
21862
  x: 0,
21534
21863
  y: 0,
@@ -21744,15 +22073,15 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
21744
22073
  var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
21745
22074
 
21746
22075
  // src/model/nodes/ReferencedGraphAliasNode.ts
21747
- var import_non_secure81 = require("nanoid/non-secure");
21748
- var import_ts_dedent74 = require("ts-dedent");
22076
+ var import_non_secure82 = require("nanoid/non-secure");
22077
+ var import_ts_dedent75 = require("ts-dedent");
21749
22078
  var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
21750
22079
  static create() {
21751
22080
  const chartNode = {
21752
22081
  type: "referencedGraphAlias",
21753
22082
  title: "",
21754
22083
  // Always set initially by the editor
21755
- id: (0, import_non_secure81.nanoid)(),
22084
+ id: (0, import_non_secure82.nanoid)(),
21756
22085
  visualData: {
21757
22086
  x: 0,
21758
22087
  y: 0,
@@ -21859,7 +22188,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
21859
22188
  }
21860
22189
  static getUIData() {
21861
22190
  return {
21862
- infoBoxBody: import_ts_dedent74.dedent`
22191
+ infoBoxBody: import_ts_dedent75.dedent`
21863
22192
  References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
21864
22193
  `,
21865
22194
  infoBoxTitle: "Referenced Graph Alias Node",
@@ -21953,7 +22282,7 @@ var referencedGraphAliasNode = nodeDefinition(ReferencedGraphAliasNodeImpl, "Ref
21953
22282
 
21954
22283
  // src/model/Nodes.ts
21955
22284
  var registerBuiltInNodes = (registry) => {
21956
- 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);
22285
+ 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);
21957
22286
  };
21958
22287
  var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
21959
22288
  function resetGlobalRivetNodeRegistry() {
@@ -22044,7 +22373,7 @@ var OpenAIEmbeddingGenerator = class {
22044
22373
  registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
22045
22374
 
22046
22375
  // src/recording/ExecutionRecorder.ts
22047
- var import_non_secure82 = require("nanoid/non-secure");
22376
+ var import_non_secure83 = require("nanoid/non-secure");
22048
22377
  var import_emittery2 = __toESM(require("emittery-0-13"), 1);
22049
22378
  var import_lodash_es19 = require("lodash");
22050
22379
  var import_json_stream_es = require("json-stream-es");
@@ -22237,7 +22566,7 @@ function serializeToObject(recording) {
22237
22566
  const asString = uint8ArrayToBase64Sync(val);
22238
22567
  const existingAsset = Object.entries(serialized.assets).find(([, asset]) => asset === asString);
22239
22568
  if (!existingAsset) {
22240
- const id = (0, import_non_secure82.nanoid)();
22569
+ const id = (0, import_non_secure83.nanoid)();
22241
22570
  serialized.assets[id] = asString;
22242
22571
  return `$ASSET:${id}`;
22243
22572
  } else {
@@ -22296,7 +22625,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
22296
22625
  once = void 0;
22297
22626
  recordSocket(channel) {
22298
22627
  return new Promise((resolve) => {
22299
- this.recordingId = (0, import_non_secure82.nanoid)();
22628
+ this.recordingId = (0, import_non_secure83.nanoid)();
22300
22629
  const listener = (event) => {
22301
22630
  const { message, data } = JSON.parse(event.data);
22302
22631
  if (this.#includePartialOutputs === false && message === "partialOutput") {
@@ -22321,7 +22650,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
22321
22650
  });
22322
22651
  }
22323
22652
  record(processor) {
22324
- this.recordingId = (0, import_non_secure82.nanoid)();
22653
+ this.recordingId = (0, import_non_secure83.nanoid)();
22325
22654
  processor.onAny((event, data) => {
22326
22655
  if (this.#includePartialOutputs === false && event === "partialOutput") {
22327
22656
  return;
@@ -22377,8 +22706,8 @@ var ExecutionRecorder = class _ExecutionRecorder {
22377
22706
  };
22378
22707
 
22379
22708
  // src/plugins/anthropic/nodes/ChatAnthropicNode.ts
22380
- var import_non_secure83 = require("nanoid/non-secure");
22381
- var import_ts_dedent75 = require("ts-dedent");
22709
+ var import_non_secure84 = require("nanoid/non-secure");
22710
+ var import_ts_dedent76 = require("ts-dedent");
22382
22711
  var import_p_retry2 = __toESM(require("p-retry-4"), 1);
22383
22712
 
22384
22713
  // src/utils/assertNever.ts
@@ -22393,7 +22722,7 @@ var ChatAnthropicNodeImpl = {
22393
22722
  const chartNode = {
22394
22723
  type: "chatAnthropic",
22395
22724
  title: "Chat (Anthropic, Legacy)",
22396
- id: (0, import_non_secure83.nanoid)(),
22725
+ id: (0, import_non_secure84.nanoid)(),
22397
22726
  visualData: {
22398
22727
  x: 0,
22399
22728
  y: 0,
@@ -22537,7 +22866,7 @@ var ChatAnthropicNodeImpl = {
22537
22866
  getBody(data) {
22538
22867
  var _a;
22539
22868
  const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
22540
- return import_ts_dedent75.dedent`
22869
+ return import_ts_dedent76.dedent`
22541
22870
  ${modelName}
22542
22871
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
22543
22872
  Max Tokens: ${data.maxTokens}
@@ -22662,7 +22991,7 @@ var ChatAnthropicNodeImpl = {
22662
22991
  },
22663
22992
  getUIData() {
22664
22993
  return {
22665
- infoBoxBody: import_ts_dedent75.dedent`
22994
+ infoBoxBody: import_ts_dedent76.dedent`
22666
22995
  Legacy Anthropic chat node.
22667
22996
 
22668
22997
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -23135,8 +23464,8 @@ var anthropicPlugin = {
23135
23464
  var anthropic_default = anthropicPlugin;
23136
23465
 
23137
23466
  // src/plugins/autoevals/AutoEvalsNode.ts
23138
- var import_non_secure84 = require("nanoid/non-secure");
23139
- var import_ts_dedent76 = require("ts-dedent");
23467
+ var import_non_secure85 = require("nanoid/non-secure");
23468
+ var import_ts_dedent77 = require("ts-dedent");
23140
23469
  var import_autoevals = require("autoevals");
23141
23470
  var import_ts_pattern8 = require("ts-pattern");
23142
23471
  var options = [
@@ -23155,7 +23484,7 @@ var AutoEvalsNodeImpl = {
23155
23484
  const chartNode = {
23156
23485
  type: "autoevals",
23157
23486
  title: "Autoevals",
23158
- id: (0, import_non_secure84.nanoid)(),
23487
+ id: (0, import_non_secure85.nanoid)(),
23159
23488
  visualData: {
23160
23489
  x: 0,
23161
23490
  y: 0,
@@ -23270,7 +23599,7 @@ var AutoEvalsNodeImpl = {
23270
23599
  },
23271
23600
  getUIData() {
23272
23601
  return {
23273
- infoBoxBody: import_ts_dedent76.dedent`
23602
+ infoBoxBody: import_ts_dedent77.dedent`
23274
23603
  Evaluates the validity of a response using the autoevals library.
23275
23604
  `,
23276
23605
  infoBoxTitle: "Autoevals Node",
@@ -23350,8 +23679,8 @@ var autoevalsPlugin = {
23350
23679
  var autoevals_default = autoevalsPlugin;
23351
23680
 
23352
23681
  // src/plugins/assemblyAi/LemurQaNode.ts
23353
- var import_non_secure85 = require("nanoid/non-secure");
23354
- var import_ts_dedent77 = require("ts-dedent");
23682
+ var import_non_secure86 = require("nanoid/non-secure");
23683
+ var import_ts_dedent78 = require("ts-dedent");
23355
23684
 
23356
23685
  // src/plugins/assemblyAi/lemurHelpers.ts
23357
23686
  var import_assemblyai = require("assemblyai");
@@ -23471,7 +23800,7 @@ var LemurQaNodeImpl = {
23471
23800
  const chartNode = {
23472
23801
  type: "assemblyAiLemurQa",
23473
23802
  title: "LeMUR Question & Answers",
23474
- id: (0, import_non_secure85.nanoid)(),
23803
+ id: (0, import_non_secure86.nanoid)(),
23475
23804
  visualData: {
23476
23805
  x: 0,
23477
23806
  y: 0,
@@ -23537,7 +23866,7 @@ var LemurQaNodeImpl = {
23537
23866
  },
23538
23867
  getUIData() {
23539
23868
  return {
23540
- infoBoxBody: import_ts_dedent77.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
23869
+ infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
23541
23870
  infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
23542
23871
  contextMenuTitle: "LeMUR Q&A",
23543
23872
  group: ["AI", "AssemblyAI"]
@@ -23609,14 +23938,14 @@ function applyQuestionEditors(data, question) {
23609
23938
  var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
23610
23939
 
23611
23940
  // src/plugins/assemblyAi/TranscribeAudioNode.ts
23612
- var import_non_secure86 = require("nanoid/non-secure");
23613
- var import_ts_dedent78 = require("ts-dedent");
23941
+ var import_non_secure87 = require("nanoid/non-secure");
23942
+ var import_ts_dedent79 = require("ts-dedent");
23614
23943
  var TranscribeAudioNodeImpl = {
23615
23944
  create() {
23616
23945
  const chartNode = {
23617
23946
  type: "assemblyAiTranscribeAudio",
23618
23947
  title: "Transcribe Audio",
23619
- id: (0, import_non_secure86.nanoid)(),
23948
+ id: (0, import_non_secure87.nanoid)(),
23620
23949
  visualData: {
23621
23950
  x: 0,
23622
23951
  y: 0,
@@ -23672,7 +24001,7 @@ var TranscribeAudioNodeImpl = {
23672
24001
  },
23673
24002
  getUIData() {
23674
24003
  return {
23675
- infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI to transcribe audio`,
24004
+ infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI to transcribe audio`,
23676
24005
  infoBoxTitle: "Transcribe Audio Node",
23677
24006
  contextMenuTitle: "Transcribe Audio",
23678
24007
  group: ["AI", "AssemblyAI"]
@@ -23731,15 +24060,15 @@ function getAdditionalParameters(data) {
23731
24060
  }
23732
24061
 
23733
24062
  // src/plugins/assemblyAi/LemurSummaryNode.ts
23734
- var import_non_secure87 = require("nanoid/non-secure");
23735
- var import_ts_dedent79 = require("ts-dedent");
24063
+ var import_non_secure88 = require("nanoid/non-secure");
24064
+ var import_ts_dedent80 = require("ts-dedent");
23736
24065
  var import_assemblyai3 = require("assemblyai");
23737
24066
  var LemurSummaryNodeImpl = {
23738
24067
  create() {
23739
24068
  const chartNode = {
23740
24069
  type: "assemblyAiLemurSummary",
23741
24070
  title: "LeMUR Summary",
23742
- id: (0, import_non_secure87.nanoid)(),
24071
+ id: (0, import_non_secure88.nanoid)(),
23743
24072
  visualData: {
23744
24073
  x: 0,
23745
24074
  y: 0,
@@ -23785,7 +24114,7 @@ var LemurSummaryNodeImpl = {
23785
24114
  },
23786
24115
  getUIData() {
23787
24116
  return {
23788
- infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
24117
+ infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
23789
24118
  infoBoxTitle: "Use AssemblyAI LeMUR Summary",
23790
24119
  contextMenuTitle: "LeMUR Summary",
23791
24120
  group: ["AI", "AssemblyAI"]
@@ -23809,15 +24138,15 @@ var LemurSummaryNodeImpl = {
23809
24138
  var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
23810
24139
 
23811
24140
  // src/plugins/assemblyAi/LemurTaskNode.ts
23812
- var import_non_secure88 = require("nanoid/non-secure");
23813
- var import_ts_dedent80 = require("ts-dedent");
24141
+ var import_non_secure89 = require("nanoid/non-secure");
24142
+ var import_ts_dedent81 = require("ts-dedent");
23814
24143
  var import_assemblyai4 = require("assemblyai");
23815
24144
  var LemurTaskNodeImpl = {
23816
24145
  create() {
23817
24146
  const chartNode = {
23818
24147
  type: "assemblyAiLemurTask",
23819
24148
  title: "LeMUR Task",
23820
- id: (0, import_non_secure88.nanoid)(),
24149
+ id: (0, import_non_secure89.nanoid)(),
23821
24150
  visualData: {
23822
24151
  x: 0,
23823
24152
  y: 0,
@@ -23863,7 +24192,7 @@ var LemurTaskNodeImpl = {
23863
24192
  },
23864
24193
  getUIData() {
23865
24194
  return {
23866
- infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
24195
+ infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
23867
24196
  infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
23868
24197
  contextMenuTitle: "LeMUR Custom Task",
23869
24198
  group: ["AI", "AssemblyAI"]
@@ -23889,14 +24218,14 @@ var LemurTaskNodeImpl = {
23889
24218
  var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
23890
24219
 
23891
24220
  // src/plugins/assemblyAi/LemurActionItemsNode.ts
23892
- var import_non_secure89 = require("nanoid/non-secure");
23893
- var import_ts_dedent81 = require("ts-dedent");
24221
+ var import_non_secure90 = require("nanoid/non-secure");
24222
+ var import_ts_dedent82 = require("ts-dedent");
23894
24223
  var LemurActionItemsNodeImpl = {
23895
24224
  create() {
23896
24225
  const chartNode = {
23897
24226
  type: "assemblyAiLemurActionItems",
23898
24227
  title: "LeMUR Action Items",
23899
- id: (0, import_non_secure89.nanoid)(),
24228
+ id: (0, import_non_secure90.nanoid)(),
23900
24229
  visualData: {
23901
24230
  x: 0,
23902
24231
  y: 0,
@@ -23942,7 +24271,7 @@ var LemurActionItemsNodeImpl = {
23942
24271
  },
23943
24272
  getUIData() {
23944
24273
  return {
23945
- infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
24274
+ infoBoxBody: import_ts_dedent82.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
23946
24275
  infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
23947
24276
  contextMenuTitle: "LeMUR Action Items",
23948
24277
  group: ["AI", "AssemblyAI"]
@@ -23994,12 +24323,12 @@ var assemblyAiPlugin = {
23994
24323
  var assemblyAi_default = assemblyAiPlugin;
23995
24324
 
23996
24325
  // src/plugins/huggingface/nodes/ChatHuggingFace.ts
23997
- var import_non_secure90 = require("nanoid/non-secure");
24326
+ var import_non_secure91 = require("nanoid/non-secure");
23998
24327
  var import_inference = require("@huggingface/inference");
23999
24328
  var ChatHuggingFaceNodeImpl = {
24000
24329
  create() {
24001
24330
  return {
24002
- id: (0, import_non_secure90.nanoid)(),
24331
+ id: (0, import_non_secure91.nanoid)(),
24003
24332
  type: "chatHuggingFace",
24004
24333
  data: {
24005
24334
  model: "",
@@ -24229,13 +24558,13 @@ var ChatHuggingFaceNodeImpl = {
24229
24558
  var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
24230
24559
 
24231
24560
  // src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
24232
- var import_non_secure91 = require("nanoid/non-secure");
24561
+ var import_non_secure92 = require("nanoid/non-secure");
24233
24562
  var import_inference2 = require("@huggingface/inference");
24234
- var import_ts_dedent82 = require("ts-dedent");
24563
+ var import_ts_dedent83 = require("ts-dedent");
24235
24564
  var TextToImageHuggingFaceNodeImpl = {
24236
24565
  create() {
24237
24566
  return {
24238
- id: (0, import_non_secure91.nanoid)(),
24567
+ id: (0, import_non_secure92.nanoid)(),
24239
24568
  type: "textToImageHuggingFace",
24240
24569
  data: {
24241
24570
  model: "",
@@ -24376,7 +24705,7 @@ var TextToImageHuggingFaceNodeImpl = {
24376
24705
  ];
24377
24706
  },
24378
24707
  getBody(data) {
24379
- return import_ts_dedent82.dedent`
24708
+ return import_ts_dedent83.dedent`
24380
24709
  Model: ${data.useModelInput ? "(Using Input)" : data.model}
24381
24710
  `;
24382
24711
  },
@@ -27551,8 +27880,8 @@ var openAIPlugin = {
27551
27880
  };
27552
27881
 
27553
27882
  // src/plugins/google/nodes/ChatGoogleNode.ts
27554
- var import_non_secure92 = require("nanoid/non-secure");
27555
- var import_ts_dedent83 = require("ts-dedent");
27883
+ var import_non_secure93 = require("nanoid/non-secure");
27884
+ var import_ts_dedent84 = require("ts-dedent");
27556
27885
  var import_p_retry3 = __toESM(require("p-retry-4"), 1);
27557
27886
  var import_ts_pattern9 = require("ts-pattern");
27558
27887
  var import_genai2 = require("@google/genai");
@@ -27580,7 +27909,7 @@ var ChatGoogleNodeImpl = {
27580
27909
  const chartNode = {
27581
27910
  type: "chatGoogle",
27582
27911
  title: "Chat (Google, Legacy)",
27583
- id: (0, import_non_secure92.nanoid)(),
27912
+ id: (0, import_non_secure93.nanoid)(),
27584
27913
  visualData: {
27585
27914
  x: 0,
27586
27915
  y: 0,
@@ -27715,7 +28044,7 @@ var ChatGoogleNodeImpl = {
27715
28044
  },
27716
28045
  getBody(data) {
27717
28046
  var _a;
27718
- return import_ts_dedent83.dedent`
28047
+ return import_ts_dedent84.dedent`
27719
28048
  ${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
27720
28049
  ${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
27721
28050
  Max Tokens: ${data.maxTokens}
@@ -27802,7 +28131,7 @@ var ChatGoogleNodeImpl = {
27802
28131
  },
27803
28132
  getUIData() {
27804
28133
  return {
27805
- infoBoxBody: import_ts_dedent83.dedent`
28134
+ infoBoxBody: import_ts_dedent84.dedent`
27806
28135
  Legacy Google chat node.
27807
28136
 
27808
28137
  For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
@@ -28563,6 +28892,7 @@ var Rivet = void 0;
28563
28892
  DelayNodeImpl,
28564
28893
  DelegateFunctionCallNodeImpl,
28565
28894
  DestructureNodeImpl,
28895
+ DidRunNodeImpl,
28566
28896
  DocumentNodeImpl,
28567
28897
  EXPRESSION_OUTPUT_PORT_ID,
28568
28898
  EvaluateNodeImpl,
@@ -28707,6 +29037,7 @@ var Rivet = void 0;
28707
29037
  deserializeProject,
28708
29038
  destructureNode,
28709
29039
  detectSerializationVersion,
29040
+ didRunNode,
28710
29041
  documentNode,
28711
29042
  doubleCheckProject,
28712
29043
  emptyNodeGraph,
@@ -28777,6 +29108,7 @@ var Rivet = void 0;
28777
29108
  isArrayDataType,
28778
29109
  isArrayDataValue,
28779
29110
  isBuiltInInputDefinition,
29111
+ isChatV2StructuredResponseFormat,
28780
29112
  isDataTypeAccepted,
28781
29113
  isDataTypeCompatible,
28782
29114
  isFunctionDataType,