@valerypopoff/rivet2-core 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bundle.cjs +576 -325
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/model/GraphProcessor.js +50 -22
- package/dist/esm/model/NodeExecutionPlanner.js +3 -3
- package/dist/esm/model/Nodes.js +3 -0
- package/dist/esm/model/chat/aiSdkStreaming.js +23 -2
- package/dist/esm/model/chat-v2/aiSdkBridge.js +49 -2
- package/dist/esm/model/chat-v2/chatV2FeatureCompatibility.js +2 -1
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +24 -4
- package/dist/esm/model/chat-v2/chatV2ResponseFormat.js +3 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeRuntime.js +1 -0
- package/dist/esm/model/nodes/CodeNode.js +8 -8
- package/dist/esm/model/nodes/DidRunNode.js +85 -0
- package/dist/esm/model/nodes/ExtractJsonNode.js +44 -26
- package/dist/esm/model/nodes/LLMChatV2Node.js +16 -0
- package/dist/types/model/NodeExecutionPlanner.d.ts +1 -1
- package/dist/types/model/Nodes.d.ts +3 -2
- package/dist/types/model/chat/aiSdkStreaming.d.ts +4 -1
- package/dist/types/model/chat-v2/chatV2FeatureCompatibility.d.ts +2 -2
- package/dist/types/model/chat-v2/chatV2ResponseFormat.d.ts +2 -0
- package/dist/types/model/chat-v2/chatV2Types.d.ts +5 -0
- package/dist/types/model/nodes/DidRunNode.d.ts +15 -0
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -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
|
|
2851
|
+
function getMissingRequiredInputs(state, node) {
|
|
2846
2852
|
const connections = state.connections[node.id] ?? [];
|
|
2847
|
-
return state.definitions[node.id].inputs.
|
|
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
|
|
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
|
|
3561
|
-
#
|
|
3562
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.#
|
|
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.#
|
|
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.#
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
9092
|
-
|
|
9093
|
-
|
|
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
|
|
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
|
|
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"]:
|
|
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(
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
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
|
|
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: "
|
|
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: "
|
|
11253
|
+
helperMessage: "Only available with the Node executor"
|
|
11108
11254
|
}
|
|
11109
11255
|
]
|
|
11110
11256
|
}
|
|
@@ -12966,7 +13112,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
|
|
|
12966
13112
|
{
|
|
12967
13113
|
id: "input",
|
|
12968
13114
|
title: "Input",
|
|
12969
|
-
dataType: "
|
|
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
|
|
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
|
|
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
|
|
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");
|
|
@@ -14292,15 +14455,100 @@ var CoalesceNodeImpl = class extends NodeImpl {
|
|
|
14292
14455
|
};
|
|
14293
14456
|
var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
|
|
14294
14457
|
|
|
14295
|
-
// src/model/nodes/
|
|
14458
|
+
// src/model/nodes/DidRunNode.ts
|
|
14296
14459
|
var import_non_secure33 = require("nanoid/non-secure");
|
|
14297
14460
|
var import_ts_dedent31 = require("ts-dedent");
|
|
14461
|
+
var DidRunNodeImpl = class extends NodeImpl {
|
|
14462
|
+
static create() {
|
|
14463
|
+
return {
|
|
14464
|
+
type: "didRun",
|
|
14465
|
+
title: "Did Run",
|
|
14466
|
+
id: (0, import_non_secure33.nanoid)(),
|
|
14467
|
+
data: {},
|
|
14468
|
+
visualData: {
|
|
14469
|
+
x: 0,
|
|
14470
|
+
y: 0,
|
|
14471
|
+
width: 250
|
|
14472
|
+
}
|
|
14473
|
+
};
|
|
14474
|
+
}
|
|
14475
|
+
getInputDefinitions(connections) {
|
|
14476
|
+
const inputCount = this.#getInputPortCount(connections);
|
|
14477
|
+
const inputs = [];
|
|
14478
|
+
for (let i = 1; i <= inputCount; i++) {
|
|
14479
|
+
inputs.push({
|
|
14480
|
+
dataType: "any",
|
|
14481
|
+
id: `input${i}`,
|
|
14482
|
+
title: `Input ${i}`
|
|
14483
|
+
});
|
|
14484
|
+
}
|
|
14485
|
+
return inputs;
|
|
14486
|
+
}
|
|
14487
|
+
getOutputDefinitions() {
|
|
14488
|
+
return [
|
|
14489
|
+
{
|
|
14490
|
+
dataType: "boolean",
|
|
14491
|
+
id: "ran",
|
|
14492
|
+
title: "Ran"
|
|
14493
|
+
}
|
|
14494
|
+
];
|
|
14495
|
+
}
|
|
14496
|
+
static getUIData() {
|
|
14497
|
+
return {
|
|
14498
|
+
infoBoxBody: import_ts_dedent31.dedent`
|
|
14499
|
+
Outputs true when all connected inputs have run. Falsy or empty values still count as having run, so this is useful for adapting "did this branch run at all?" into a boolean If port.
|
|
14500
|
+
`,
|
|
14501
|
+
infoBoxTitle: "Did Run Node",
|
|
14502
|
+
contextMenuTitle: "Did Run",
|
|
14503
|
+
group: ["Logic"]
|
|
14504
|
+
};
|
|
14505
|
+
}
|
|
14506
|
+
getBody() {
|
|
14507
|
+
return "Outputs true when all connected inputs have run. Falsy or empty values still count";
|
|
14508
|
+
}
|
|
14509
|
+
#getInputPortCount(connections) {
|
|
14510
|
+
const inputNodeId = this.chartNode.id;
|
|
14511
|
+
const inputConnections = connections.filter(
|
|
14512
|
+
(connection) => connection.inputNodeId === inputNodeId && connection.inputId.startsWith("input")
|
|
14513
|
+
);
|
|
14514
|
+
let maxInputNumber = 0;
|
|
14515
|
+
for (const connection of inputConnections) {
|
|
14516
|
+
const inputNumber = parseInt(connection.inputId.replace("input", ""), 10);
|
|
14517
|
+
if (inputNumber > maxInputNumber) {
|
|
14518
|
+
maxInputNumber = inputNumber;
|
|
14519
|
+
}
|
|
14520
|
+
}
|
|
14521
|
+
return maxInputNumber + 1;
|
|
14522
|
+
}
|
|
14523
|
+
async process(inputData) {
|
|
14524
|
+
const hasDynamicInput = Object.keys(inputData).some((key) => key.startsWith("input"));
|
|
14525
|
+
if (!hasDynamicInput) {
|
|
14526
|
+
return {
|
|
14527
|
+
["ran"]: {
|
|
14528
|
+
type: "control-flow-excluded",
|
|
14529
|
+
value: void 0
|
|
14530
|
+
}
|
|
14531
|
+
};
|
|
14532
|
+
}
|
|
14533
|
+
return {
|
|
14534
|
+
["ran"]: {
|
|
14535
|
+
type: "boolean",
|
|
14536
|
+
value: true
|
|
14537
|
+
}
|
|
14538
|
+
};
|
|
14539
|
+
}
|
|
14540
|
+
};
|
|
14541
|
+
var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
14542
|
+
|
|
14543
|
+
// src/model/nodes/PassthroughNode.ts
|
|
14544
|
+
var import_non_secure34 = require("nanoid/non-secure");
|
|
14545
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
14298
14546
|
var PassthroughNodeImpl = class extends NodeImpl {
|
|
14299
14547
|
static create = () => {
|
|
14300
14548
|
const chartNode = {
|
|
14301
14549
|
type: "passthrough",
|
|
14302
14550
|
title: "Passthrough",
|
|
14303
|
-
id: (0,
|
|
14551
|
+
id: (0, import_non_secure34.nanoid)(),
|
|
14304
14552
|
data: {},
|
|
14305
14553
|
visualData: {
|
|
14306
14554
|
x: 0,
|
|
@@ -14336,7 +14584,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
14336
14584
|
}
|
|
14337
14585
|
static getUIData() {
|
|
14338
14586
|
return {
|
|
14339
|
-
infoBoxBody:
|
|
14587
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
14340
14588
|
Simply passes the input value to the output without any modifications.
|
|
14341
14589
|
`,
|
|
14342
14590
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -14371,14 +14619,14 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
14371
14619
|
var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
14372
14620
|
|
|
14373
14621
|
// src/model/nodes/PopNode.ts
|
|
14374
|
-
var
|
|
14375
|
-
var
|
|
14622
|
+
var import_non_secure35 = require("nanoid/non-secure");
|
|
14623
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
14376
14624
|
var PopNodeImpl = class extends NodeImpl {
|
|
14377
14625
|
static create() {
|
|
14378
14626
|
const baseNode = {
|
|
14379
14627
|
type: "pop",
|
|
14380
14628
|
title: "Pop",
|
|
14381
|
-
id: (0,
|
|
14629
|
+
id: (0, import_non_secure35.nanoid)(),
|
|
14382
14630
|
visualData: {
|
|
14383
14631
|
x: 0,
|
|
14384
14632
|
y: 0,
|
|
@@ -14423,7 +14671,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
14423
14671
|
}
|
|
14424
14672
|
static getUIData() {
|
|
14425
14673
|
return {
|
|
14426
|
-
infoBoxBody:
|
|
14674
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
14427
14675
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
14428
14676
|
|
|
14429
14677
|
Can also be used to just extract the last value from an array.
|
|
@@ -14459,14 +14707,14 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
14459
14707
|
var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
14460
14708
|
|
|
14461
14709
|
// src/model/nodes/SetGlobalNode.ts
|
|
14462
|
-
var
|
|
14463
|
-
var
|
|
14710
|
+
var import_non_secure36 = require("nanoid/non-secure");
|
|
14711
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
14464
14712
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
14465
14713
|
static create() {
|
|
14466
14714
|
const chartNode = {
|
|
14467
14715
|
type: "setGlobal",
|
|
14468
14716
|
title: "Set Global",
|
|
14469
|
-
id: (0,
|
|
14717
|
+
id: (0, import_non_secure36.nanoid)(),
|
|
14470
14718
|
visualData: {
|
|
14471
14719
|
x: 0,
|
|
14472
14720
|
y: 0,
|
|
@@ -14533,14 +14781,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
14533
14781
|
];
|
|
14534
14782
|
}
|
|
14535
14783
|
getBody() {
|
|
14536
|
-
return
|
|
14784
|
+
return import_ts_dedent34.dedent`
|
|
14537
14785
|
${this.data.id}
|
|
14538
14786
|
Type: ${this.data.dataType}
|
|
14539
14787
|
`;
|
|
14540
14788
|
}
|
|
14541
14789
|
static getUIData() {
|
|
14542
14790
|
return {
|
|
14543
|
-
infoBoxBody:
|
|
14791
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
14544
14792
|
Sets a global value that is shared across all graphs and subgraphs. The id of the global value and the value itself are configured in this node.
|
|
14545
14793
|
`,
|
|
14546
14794
|
infoBoxTitle: "Set Global Node",
|
|
@@ -14575,14 +14823,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
14575
14823
|
var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
14576
14824
|
|
|
14577
14825
|
// src/model/nodes/GetGlobalNode.ts
|
|
14578
|
-
var
|
|
14579
|
-
var
|
|
14826
|
+
var import_non_secure37 = require("nanoid/non-secure");
|
|
14827
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
14580
14828
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
14581
14829
|
static create() {
|
|
14582
14830
|
const chartNode = {
|
|
14583
14831
|
type: "getGlobal",
|
|
14584
14832
|
title: "Get Global",
|
|
14585
|
-
id: (0,
|
|
14833
|
+
id: (0, import_non_secure37.nanoid)(),
|
|
14586
14834
|
visualData: {
|
|
14587
14835
|
x: 0,
|
|
14588
14836
|
y: 0,
|
|
@@ -14651,7 +14899,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
14651
14899
|
];
|
|
14652
14900
|
}
|
|
14653
14901
|
getBody() {
|
|
14654
|
-
return
|
|
14902
|
+
return import_ts_dedent35.dedent`
|
|
14655
14903
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
14656
14904
|
Type: ${this.data.dataType}
|
|
14657
14905
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -14659,7 +14907,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
14659
14907
|
}
|
|
14660
14908
|
static getUIData() {
|
|
14661
14909
|
return {
|
|
14662
|
-
infoBoxBody:
|
|
14910
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
14663
14911
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
14664
14912
|
`,
|
|
14665
14913
|
infoBoxTitle: "Get Global Node",
|
|
@@ -14706,12 +14954,12 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
14706
14954
|
var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
14707
14955
|
|
|
14708
14956
|
// src/model/nodes/WaitForEventNode.ts
|
|
14709
|
-
var
|
|
14710
|
-
var
|
|
14957
|
+
var import_non_secure38 = require("nanoid/non-secure");
|
|
14958
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
14711
14959
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
14712
14960
|
static create() {
|
|
14713
14961
|
return {
|
|
14714
|
-
id: (0,
|
|
14962
|
+
id: (0, import_non_secure38.nanoid)(),
|
|
14715
14963
|
type: "waitForEvent",
|
|
14716
14964
|
title: "Wait For Event",
|
|
14717
14965
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -14766,7 +15014,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
14766
15014
|
}
|
|
14767
15015
|
static getUIData() {
|
|
14768
15016
|
return {
|
|
14769
|
-
infoBoxBody:
|
|
15017
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
14770
15018
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
14771
15019
|
`,
|
|
14772
15020
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -14786,14 +15034,14 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
14786
15034
|
var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
14787
15035
|
|
|
14788
15036
|
// src/model/nodes/ToolNode.ts
|
|
14789
|
-
var
|
|
14790
|
-
var
|
|
15037
|
+
var import_non_secure39 = require("nanoid/non-secure");
|
|
15038
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
14791
15039
|
var GptFunctionNodeImpl = class extends NodeImpl {
|
|
14792
15040
|
static create() {
|
|
14793
15041
|
const chartNode = {
|
|
14794
15042
|
type: "gptFunction",
|
|
14795
15043
|
title: "Tool",
|
|
14796
|
-
id: (0,
|
|
15044
|
+
id: (0, import_non_secure39.nanoid)(),
|
|
14797
15045
|
visualData: {
|
|
14798
15046
|
x: 0,
|
|
14799
15047
|
y: 0,
|
|
@@ -14802,7 +15050,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
14802
15050
|
data: {
|
|
14803
15051
|
name: "newTool",
|
|
14804
15052
|
description: "No description provided",
|
|
14805
|
-
schema:
|
|
15053
|
+
schema: import_ts_dedent37.dedent`
|
|
14806
15054
|
{
|
|
14807
15055
|
"type": "object",
|
|
14808
15056
|
"properties": {}
|
|
@@ -14908,7 +15156,7 @@ ${this.data.description}`
|
|
|
14908
15156
|
}
|
|
14909
15157
|
static getUIData() {
|
|
14910
15158
|
return {
|
|
14911
|
-
infoBoxBody:
|
|
15159
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
14912
15160
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
14913
15161
|
`,
|
|
14914
15162
|
infoBoxTitle: "Tool Node",
|
|
@@ -14951,15 +15199,15 @@ ${this.data.description}`
|
|
|
14951
15199
|
var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
14952
15200
|
|
|
14953
15201
|
// src/model/nodes/ToYamlNode.ts
|
|
14954
|
-
var
|
|
15202
|
+
var import_non_secure40 = require("nanoid/non-secure");
|
|
14955
15203
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
14956
|
-
var
|
|
15204
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
14957
15205
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
14958
15206
|
static create() {
|
|
14959
15207
|
const chartNode = {
|
|
14960
15208
|
type: "toYaml",
|
|
14961
15209
|
title: "To YAML",
|
|
14962
|
-
id: (0,
|
|
15210
|
+
id: (0, import_non_secure40.nanoid)(),
|
|
14963
15211
|
visualData: {
|
|
14964
15212
|
x: 0,
|
|
14965
15213
|
y: 0,
|
|
@@ -14990,7 +15238,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
14990
15238
|
}
|
|
14991
15239
|
static getUIData() {
|
|
14992
15240
|
return {
|
|
14993
|
-
infoBoxBody:
|
|
15241
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
14994
15242
|
Turns the input object into YAML text.
|
|
14995
15243
|
`,
|
|
14996
15244
|
infoBoxTitle: "To YAML Node",
|
|
@@ -15015,8 +15263,8 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
15015
15263
|
var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
15016
15264
|
|
|
15017
15265
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
15018
|
-
var
|
|
15019
|
-
var
|
|
15266
|
+
var import_non_secure41 = require("nanoid/non-secure");
|
|
15267
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
15020
15268
|
|
|
15021
15269
|
// src/integrations/integrations.ts
|
|
15022
15270
|
var registeredIntegrations = {
|
|
@@ -15039,7 +15287,7 @@ function getIntegration(type, integrationKey, context) {
|
|
|
15039
15287
|
var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
15040
15288
|
static create() {
|
|
15041
15289
|
return {
|
|
15042
|
-
id: (0,
|
|
15290
|
+
id: (0, import_non_secure41.nanoid)(),
|
|
15043
15291
|
type: "getEmbedding",
|
|
15044
15292
|
title: "Get Embedding",
|
|
15045
15293
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -15123,7 +15371,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
15123
15371
|
}
|
|
15124
15372
|
static getUIData() {
|
|
15125
15373
|
return {
|
|
15126
|
-
infoBoxBody:
|
|
15374
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
15127
15375
|
Gets a OpenAI vector embedding for the input text provided.
|
|
15128
15376
|
|
|
15129
15377
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -15154,12 +15402,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
15154
15402
|
var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
15155
15403
|
|
|
15156
15404
|
// src/model/nodes/VectorStoreNode.ts
|
|
15157
|
-
var
|
|
15158
|
-
var
|
|
15405
|
+
var import_non_secure42 = require("nanoid/non-secure");
|
|
15406
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
15159
15407
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
15160
15408
|
static create() {
|
|
15161
15409
|
return {
|
|
15162
|
-
id: (0,
|
|
15410
|
+
id: (0, import_non_secure42.nanoid)(),
|
|
15163
15411
|
type: "vectorStore",
|
|
15164
15412
|
title: "Vector Store",
|
|
15165
15413
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -15235,14 +15483,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
15235
15483
|
];
|
|
15236
15484
|
}
|
|
15237
15485
|
getBody() {
|
|
15238
|
-
return
|
|
15486
|
+
return import_ts_dedent40.dedent`
|
|
15239
15487
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
15240
15488
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
15241
15489
|
`;
|
|
15242
15490
|
}
|
|
15243
15491
|
static getUIData() {
|
|
15244
15492
|
return {
|
|
15245
|
-
infoBoxBody:
|
|
15493
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
15246
15494
|
Takes in a vector, as well as data to store with the vector. This data is stored in the configured vector DB integration for later retrieval.
|
|
15247
15495
|
`,
|
|
15248
15496
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -15277,12 +15525,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
15277
15525
|
var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
15278
15526
|
|
|
15279
15527
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
15280
|
-
var
|
|
15281
|
-
var
|
|
15528
|
+
var import_non_secure43 = require("nanoid/non-secure");
|
|
15529
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
15282
15530
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
15283
15531
|
static create() {
|
|
15284
15532
|
return {
|
|
15285
|
-
id: (0,
|
|
15533
|
+
id: (0, import_non_secure43.nanoid)(),
|
|
15286
15534
|
type: "vectorNearestNeighbors",
|
|
15287
15535
|
title: "Vector KNN",
|
|
15288
15536
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -15365,7 +15613,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
15365
15613
|
];
|
|
15366
15614
|
}
|
|
15367
15615
|
getBody() {
|
|
15368
|
-
return
|
|
15616
|
+
return import_ts_dedent41.dedent`
|
|
15369
15617
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
15370
15618
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
15371
15619
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -15373,7 +15621,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
15373
15621
|
}
|
|
15374
15622
|
static getUIData() {
|
|
15375
15623
|
return {
|
|
15376
|
-
infoBoxBody:
|
|
15624
|
+
infoBoxBody: import_ts_dedent41.dedent`
|
|
15377
15625
|
Performs a k-nearest neighbors search on the vectors stored in the configured vector DB integration. Takes in a vector and returns the k closest vectors and their corresponding data.
|
|
15378
15626
|
`,
|
|
15379
15627
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -15403,17 +15651,17 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
15403
15651
|
var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
|
|
15404
15652
|
|
|
15405
15653
|
// src/model/nodes/HashNode.ts
|
|
15406
|
-
var
|
|
15654
|
+
var import_non_secure44 = require("nanoid/non-secure");
|
|
15407
15655
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
15408
15656
|
var import_ts_pattern4 = require("ts-pattern");
|
|
15409
|
-
var
|
|
15657
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
15410
15658
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
15411
15659
|
var HashNodeImpl = class extends NodeImpl {
|
|
15412
15660
|
static create() {
|
|
15413
15661
|
const chartNode = {
|
|
15414
15662
|
type: "hash",
|
|
15415
15663
|
title: "Hash",
|
|
15416
|
-
id: (0,
|
|
15664
|
+
id: (0, import_non_secure44.nanoid)(),
|
|
15417
15665
|
visualData: {
|
|
15418
15666
|
x: 0,
|
|
15419
15667
|
y: 0,
|
|
@@ -15464,7 +15712,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
15464
15712
|
}
|
|
15465
15713
|
static getUIData() {
|
|
15466
15714
|
return {
|
|
15467
|
-
infoBoxBody:
|
|
15715
|
+
infoBoxBody: import_ts_dedent42.dedent`
|
|
15468
15716
|
Computes a hash of the input value using the configured hash function.
|
|
15469
15717
|
`,
|
|
15470
15718
|
infoBoxTitle: "Hash Node",
|
|
@@ -15492,14 +15740,14 @@ var algorithmDisplayName = {
|
|
|
15492
15740
|
var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
15493
15741
|
|
|
15494
15742
|
// src/model/nodes/AbortGraphNode.ts
|
|
15495
|
-
var
|
|
15496
|
-
var
|
|
15743
|
+
var import_non_secure45 = require("nanoid/non-secure");
|
|
15744
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
15497
15745
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
15498
15746
|
static create() {
|
|
15499
15747
|
const chartNode = {
|
|
15500
15748
|
type: "abortGraph",
|
|
15501
15749
|
title: "Abort Graph",
|
|
15502
|
-
id: (0,
|
|
15750
|
+
id: (0, import_non_secure45.nanoid)(),
|
|
15503
15751
|
visualData: {
|
|
15504
15752
|
x: 0,
|
|
15505
15753
|
y: 0,
|
|
@@ -15550,13 +15798,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
15550
15798
|
];
|
|
15551
15799
|
}
|
|
15552
15800
|
getBody() {
|
|
15553
|
-
return
|
|
15801
|
+
return import_ts_dedent43.dedent`
|
|
15554
15802
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
15555
15803
|
`;
|
|
15556
15804
|
}
|
|
15557
15805
|
static getUIData() {
|
|
15558
15806
|
return {
|
|
15559
|
-
infoBoxBody:
|
|
15807
|
+
infoBoxBody: import_ts_dedent43.dedent`
|
|
15560
15808
|
Aborts the execution of the entire graph immediately.
|
|
15561
15809
|
|
|
15562
15810
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -15581,14 +15829,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
15581
15829
|
var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
15582
15830
|
|
|
15583
15831
|
// src/model/nodes/RaceInputsNode.ts
|
|
15584
|
-
var
|
|
15585
|
-
var
|
|
15832
|
+
var import_non_secure46 = require("nanoid/non-secure");
|
|
15833
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
15586
15834
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
15587
15835
|
static create() {
|
|
15588
15836
|
const chartNode = {
|
|
15589
15837
|
type: "raceInputs",
|
|
15590
15838
|
title: "Race Inputs",
|
|
15591
|
-
id: (0,
|
|
15839
|
+
id: (0, import_non_secure46.nanoid)(),
|
|
15592
15840
|
visualData: {
|
|
15593
15841
|
x: 0,
|
|
15594
15842
|
y: 0,
|
|
@@ -15638,7 +15886,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
15638
15886
|
}
|
|
15639
15887
|
static getUIData() {
|
|
15640
15888
|
return {
|
|
15641
|
-
infoBoxBody:
|
|
15889
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
15642
15890
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
15643
15891
|
`,
|
|
15644
15892
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -15666,14 +15914,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
15666
15914
|
var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
15667
15915
|
|
|
15668
15916
|
// src/model/nodes/ToJsonNode.ts
|
|
15669
|
-
var
|
|
15670
|
-
var
|
|
15917
|
+
var import_non_secure47 = require("nanoid/non-secure");
|
|
15918
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
15671
15919
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
15672
15920
|
static create() {
|
|
15673
15921
|
const chartNode = {
|
|
15674
15922
|
type: "toJson",
|
|
15675
15923
|
title: "To JSON",
|
|
15676
|
-
id: (0,
|
|
15924
|
+
id: (0, import_non_secure47.nanoid)(),
|
|
15677
15925
|
visualData: {
|
|
15678
15926
|
x: 0,
|
|
15679
15927
|
y: 0,
|
|
@@ -15718,7 +15966,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
15718
15966
|
}
|
|
15719
15967
|
static getUIData() {
|
|
15720
15968
|
return {
|
|
15721
|
-
infoBoxBody:
|
|
15969
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
15722
15970
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
15723
15971
|
`,
|
|
15724
15972
|
infoBoxTitle: "To JSON Node",
|
|
@@ -15740,14 +15988,14 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
15740
15988
|
var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
15741
15989
|
|
|
15742
15990
|
// src/model/nodes/JoinNode.ts
|
|
15743
|
-
var
|
|
15744
|
-
var
|
|
15991
|
+
var import_non_secure48 = require("nanoid/non-secure");
|
|
15992
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
15745
15993
|
var JoinNodeImpl = class extends NodeImpl {
|
|
15746
15994
|
static create = () => {
|
|
15747
15995
|
const chartNode = {
|
|
15748
15996
|
type: "join",
|
|
15749
15997
|
title: "Join",
|
|
15750
|
-
id: (0,
|
|
15998
|
+
id: (0, import_non_secure48.nanoid)(),
|
|
15751
15999
|
data: {
|
|
15752
16000
|
flatten: true,
|
|
15753
16001
|
joinString: "\n"
|
|
@@ -15823,7 +16071,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
15823
16071
|
}
|
|
15824
16072
|
static getUIData() {
|
|
15825
16073
|
return {
|
|
15826
|
-
infoBoxBody:
|
|
16074
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
15827
16075
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
15828
16076
|
|
|
15829
16077
|
Defaults to a newline.
|
|
@@ -15860,15 +16108,15 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
15860
16108
|
var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
15861
16109
|
|
|
15862
16110
|
// src/model/nodes/FilterNode.ts
|
|
15863
|
-
var
|
|
16111
|
+
var import_non_secure49 = require("nanoid/non-secure");
|
|
15864
16112
|
var import_lodash_es13 = require("lodash");
|
|
15865
|
-
var
|
|
16113
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
15866
16114
|
var FilterNodeImpl = class extends NodeImpl {
|
|
15867
16115
|
static create() {
|
|
15868
16116
|
const chartNode = {
|
|
15869
16117
|
type: "filter",
|
|
15870
16118
|
title: "Filter",
|
|
15871
|
-
id: (0,
|
|
16119
|
+
id: (0, import_non_secure49.nanoid)(),
|
|
15872
16120
|
visualData: {
|
|
15873
16121
|
x: 0,
|
|
15874
16122
|
y: 0,
|
|
@@ -15905,7 +16153,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
15905
16153
|
}
|
|
15906
16154
|
static getUIData() {
|
|
15907
16155
|
return {
|
|
15908
|
-
infoBoxBody:
|
|
16156
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
15909
16157
|
Takes in both an array of values, and an array of booleans of the same length, and filters the array where the corresponding boolean is true.
|
|
15910
16158
|
`,
|
|
15911
16159
|
infoBoxTitle: "Filter Node",
|
|
@@ -15930,11 +16178,11 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
15930
16178
|
var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
15931
16179
|
|
|
15932
16180
|
// src/model/nodes/JSFilterNode.ts
|
|
15933
|
-
var
|
|
15934
|
-
var
|
|
16181
|
+
var import_non_secure50 = require("nanoid/non-secure");
|
|
16182
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
15935
16183
|
|
|
15936
16184
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
15937
|
-
var
|
|
16185
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
15938
16186
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
15939
16187
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
15940
16188
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -15962,7 +16210,7 @@ function getJSListCallbackInterpolationInputNames(callbackBody) {
|
|
|
15962
16210
|
}
|
|
15963
16211
|
function buildJSListRuntimePreamble(callbackBody) {
|
|
15964
16212
|
const inputNames = getJSListCallbackInterpolationInputNames(callbackBody);
|
|
15965
|
-
return
|
|
16213
|
+
return import_ts_dedent48.dedent`
|
|
15966
16214
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
15967
16215
|
${buildCloneJsInputValueFunction()}
|
|
15968
16216
|
const ${JS_LIST_INPUTS_IDENTIFIER} = Object.create(null);
|
|
@@ -15991,7 +16239,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
|
|
|
15991
16239
|
}
|
|
15992
16240
|
function buildJSFilterWrapper(callbackBody) {
|
|
15993
16241
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
|
|
15994
|
-
return
|
|
16242
|
+
return import_ts_dedent48.dedent`
|
|
15995
16243
|
${buildJSListRuntimePreamble(callbackBody)}
|
|
15996
16244
|
|
|
15997
16245
|
if (!Array.isArray(array)) {
|
|
@@ -16026,7 +16274,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
16026
16274
|
}
|
|
16027
16275
|
function buildJSMapWrapper(callbackBody) {
|
|
16028
16276
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody);
|
|
16029
|
-
return
|
|
16277
|
+
return import_ts_dedent48.dedent`
|
|
16030
16278
|
${buildJSListRuntimePreamble(callbackBody)}
|
|
16031
16279
|
|
|
16032
16280
|
if (!Array.isArray(array)) {
|
|
@@ -16098,7 +16346,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
16098
16346
|
const previewBody = callbackBody.split("\n").slice(0, MAX_CALLBACK_PREVIEW_BODY_LINES).join("\n").trim();
|
|
16099
16347
|
return {
|
|
16100
16348
|
type: "colorized",
|
|
16101
|
-
text:
|
|
16349
|
+
text: import_ts_dedent48.dedent`
|
|
16102
16350
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
16103
16351
|
${indentLines(previewBody, " ")}
|
|
16104
16352
|
}
|
|
@@ -16146,7 +16394,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
16146
16394
|
const chartNode = {
|
|
16147
16395
|
type: "jsFilter",
|
|
16148
16396
|
title: "JS Filter",
|
|
16149
|
-
id: (0,
|
|
16397
|
+
id: (0, import_non_secure50.nanoid)(),
|
|
16150
16398
|
visualData: {
|
|
16151
16399
|
x: 0,
|
|
16152
16400
|
y: 0,
|
|
@@ -16178,7 +16426,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
16178
16426
|
}
|
|
16179
16427
|
static getUIData() {
|
|
16180
16428
|
return {
|
|
16181
|
-
infoBoxBody:
|
|
16429
|
+
infoBoxBody: import_ts_dedent49.dedent`
|
|
16182
16430
|
Filters an input array using the body of a JavaScript callback.
|
|
16183
16431
|
|
|
16184
16432
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -16204,15 +16452,15 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
16204
16452
|
var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
16205
16453
|
|
|
16206
16454
|
// src/model/nodes/JSMapNode.ts
|
|
16207
|
-
var
|
|
16208
|
-
var
|
|
16455
|
+
var import_non_secure51 = require("nanoid/non-secure");
|
|
16456
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
16209
16457
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
16210
16458
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
16211
16459
|
static create() {
|
|
16212
16460
|
const chartNode = {
|
|
16213
16461
|
type: "jsMap",
|
|
16214
16462
|
title: "JS Map",
|
|
16215
|
-
id: (0,
|
|
16463
|
+
id: (0, import_non_secure51.nanoid)(),
|
|
16216
16464
|
visualData: {
|
|
16217
16465
|
x: 0,
|
|
16218
16466
|
y: 0,
|
|
@@ -16244,7 +16492,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
16244
16492
|
}
|
|
16245
16493
|
static getUIData() {
|
|
16246
16494
|
return {
|
|
16247
|
-
infoBoxBody:
|
|
16495
|
+
infoBoxBody: import_ts_dedent50.dedent`
|
|
16248
16496
|
Maps an input array using the body of a JavaScript callback.
|
|
16249
16497
|
|
|
16250
16498
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -16270,8 +16518,8 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
16270
16518
|
var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
16271
16519
|
|
|
16272
16520
|
// src/model/nodes/ObjectNode.ts
|
|
16273
|
-
var
|
|
16274
|
-
var
|
|
16521
|
+
var import_non_secure52 = require("nanoid/non-secure");
|
|
16522
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
16275
16523
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
16276
16524
|
"key": "{{input}}"
|
|
16277
16525
|
}`;
|
|
@@ -16280,7 +16528,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
16280
16528
|
const chartNode = {
|
|
16281
16529
|
type: "object",
|
|
16282
16530
|
title: "Object",
|
|
16283
|
-
id: (0,
|
|
16531
|
+
id: (0, import_non_secure52.nanoid)(),
|
|
16284
16532
|
visualData: {
|
|
16285
16533
|
x: 0,
|
|
16286
16534
|
y: 0,
|
|
@@ -16330,7 +16578,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
16330
16578
|
}
|
|
16331
16579
|
static getUIData() {
|
|
16332
16580
|
return {
|
|
16333
|
-
infoBoxBody:
|
|
16581
|
+
infoBoxBody: import_ts_dedent51.dedent`
|
|
16334
16582
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
16335
16583
|
|
|
16336
16584
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -16424,14 +16672,14 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
16424
16672
|
var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
16425
16673
|
|
|
16426
16674
|
// src/model/nodes/BooleanNode.ts
|
|
16427
|
-
var
|
|
16428
|
-
var
|
|
16675
|
+
var import_non_secure53 = require("nanoid/non-secure");
|
|
16676
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
16429
16677
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
16430
16678
|
static create() {
|
|
16431
16679
|
const chartNode = {
|
|
16432
16680
|
type: "boolean",
|
|
16433
16681
|
title: "Bool",
|
|
16434
|
-
id: (0,
|
|
16682
|
+
id: (0, import_non_secure53.nanoid)(),
|
|
16435
16683
|
visualData: {
|
|
16436
16684
|
x: 0,
|
|
16437
16685
|
y: 0,
|
|
@@ -16469,7 +16717,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
16469
16717
|
}
|
|
16470
16718
|
static getUIData() {
|
|
16471
16719
|
return {
|
|
16472
|
-
infoBoxBody:
|
|
16720
|
+
infoBoxBody: import_ts_dedent52.dedent`
|
|
16473
16721
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
16474
16722
|
`,
|
|
16475
16723
|
infoBoxTitle: "Bool Node",
|
|
@@ -16490,16 +16738,16 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
16490
16738
|
var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
16491
16739
|
|
|
16492
16740
|
// src/model/nodes/CompareNode.ts
|
|
16493
|
-
var
|
|
16741
|
+
var import_non_secure54 = require("nanoid/non-secure");
|
|
16494
16742
|
var import_lodash_es14 = require("lodash");
|
|
16495
16743
|
var import_ts_pattern5 = require("ts-pattern");
|
|
16496
|
-
var
|
|
16744
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
16497
16745
|
var CompareNodeImpl = class extends NodeImpl {
|
|
16498
16746
|
static create() {
|
|
16499
16747
|
const chartNode = {
|
|
16500
16748
|
type: "compare",
|
|
16501
16749
|
title: "Compare",
|
|
16502
|
-
id: (0,
|
|
16750
|
+
id: (0, import_non_secure54.nanoid)(),
|
|
16503
16751
|
visualData: {
|
|
16504
16752
|
x: 0,
|
|
16505
16753
|
y: 0,
|
|
@@ -16571,7 +16819,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
16571
16819
|
}
|
|
16572
16820
|
static getUIData() {
|
|
16573
16821
|
return {
|
|
16574
|
-
infoBoxBody:
|
|
16822
|
+
infoBoxBody: import_ts_dedent53.dedent`
|
|
16575
16823
|
Compares two values using the configured operator and outputs the result.
|
|
16576
16824
|
|
|
16577
16825
|
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 +16860,9 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
16612
16860
|
var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
16613
16861
|
|
|
16614
16862
|
// src/model/nodes/EvaluateNode.ts
|
|
16615
|
-
var
|
|
16863
|
+
var import_non_secure55 = require("nanoid/non-secure");
|
|
16616
16864
|
var import_ts_pattern6 = require("ts-pattern");
|
|
16617
|
-
var
|
|
16865
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
16618
16866
|
var unaryOperation = ["abs", "negate"];
|
|
16619
16867
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
16620
16868
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -16622,7 +16870,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
16622
16870
|
const chartNode = {
|
|
16623
16871
|
type: "evaluate",
|
|
16624
16872
|
title: "Evaluate",
|
|
16625
|
-
id: (0,
|
|
16873
|
+
id: (0, import_non_secure55.nanoid)(),
|
|
16626
16874
|
visualData: {
|
|
16627
16875
|
x: 0,
|
|
16628
16876
|
y: 0,
|
|
@@ -16700,7 +16948,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
16700
16948
|
}
|
|
16701
16949
|
static getUIData() {
|
|
16702
16950
|
return {
|
|
16703
|
-
infoBoxBody:
|
|
16951
|
+
infoBoxBody: import_ts_dedent54.dedent`
|
|
16704
16952
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
16705
16953
|
|
|
16706
16954
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -16736,14 +16984,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
16736
16984
|
var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
16737
16985
|
|
|
16738
16986
|
// src/model/nodes/NumberNode.ts
|
|
16739
|
-
var
|
|
16740
|
-
var
|
|
16987
|
+
var import_non_secure56 = require("nanoid/non-secure");
|
|
16988
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
16741
16989
|
var NumberNodeImpl = class extends NodeImpl {
|
|
16742
16990
|
static create() {
|
|
16743
16991
|
const chartNode = {
|
|
16744
16992
|
type: "number",
|
|
16745
16993
|
title: "Number",
|
|
16746
|
-
id: (0,
|
|
16994
|
+
id: (0, import_non_secure56.nanoid)(),
|
|
16747
16995
|
visualData: {
|
|
16748
16996
|
x: 0,
|
|
16749
16997
|
y: 0,
|
|
@@ -16787,7 +17035,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
16787
17035
|
}
|
|
16788
17036
|
static getUIData() {
|
|
16789
17037
|
return {
|
|
16790
|
-
infoBoxBody:
|
|
17038
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
16791
17039
|
Outputs a number constant, or converts an input value into a number.
|
|
16792
17040
|
|
|
16793
17041
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -16814,8 +17062,8 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
16814
17062
|
var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
16815
17063
|
|
|
16816
17064
|
// src/model/nodes/RandomNumberNode.ts
|
|
16817
|
-
var
|
|
16818
|
-
var
|
|
17065
|
+
var import_non_secure57 = require("nanoid/non-secure");
|
|
17066
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
16819
17067
|
var randomNumberTypeOptions = [
|
|
16820
17068
|
{ value: false, label: "Float" },
|
|
16821
17069
|
{ value: true, label: "Integer" }
|
|
@@ -16825,7 +17073,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
16825
17073
|
const chartNode = {
|
|
16826
17074
|
type: "randomNumber",
|
|
16827
17075
|
title: "Random number",
|
|
16828
|
-
id: (0,
|
|
17076
|
+
id: (0, import_non_secure57.nanoid)(),
|
|
16829
17077
|
visualData: {
|
|
16830
17078
|
x: 0,
|
|
16831
17079
|
y: 0,
|
|
@@ -16883,7 +17131,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
16883
17131
|
];
|
|
16884
17132
|
}
|
|
16885
17133
|
getBody() {
|
|
16886
|
-
return
|
|
17134
|
+
return import_ts_dedent56.dedent`
|
|
16887
17135
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
16888
17136
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
16889
17137
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -16892,7 +17140,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
16892
17140
|
}
|
|
16893
17141
|
static getUIData() {
|
|
16894
17142
|
return {
|
|
16895
|
-
infoBoxBody:
|
|
17143
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
16896
17144
|
Outputs a random number between the configured min and max values.
|
|
16897
17145
|
|
|
16898
17146
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -16923,15 +17171,15 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
16923
17171
|
var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
16924
17172
|
|
|
16925
17173
|
// src/model/nodes/ShuffleNode.ts
|
|
16926
|
-
var
|
|
17174
|
+
var import_non_secure58 = require("nanoid/non-secure");
|
|
16927
17175
|
var import_lodash_es15 = require("lodash");
|
|
16928
|
-
var
|
|
17176
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
16929
17177
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
16930
17178
|
static create() {
|
|
16931
17179
|
const chartNode = {
|
|
16932
17180
|
type: "shuffle",
|
|
16933
17181
|
title: "Shuffle",
|
|
16934
|
-
id: (0,
|
|
17182
|
+
id: (0, import_non_secure58.nanoid)(),
|
|
16935
17183
|
visualData: {
|
|
16936
17184
|
x: 0,
|
|
16937
17185
|
y: 0,
|
|
@@ -16961,7 +17209,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
16961
17209
|
}
|
|
16962
17210
|
static getUIData() {
|
|
16963
17211
|
return {
|
|
16964
|
-
infoBoxBody:
|
|
17212
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
16965
17213
|
Shuffles the input array. Outputs the shuffled array.
|
|
16966
17214
|
`,
|
|
16967
17215
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -16985,14 +17233,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
16985
17233
|
var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
16986
17234
|
|
|
16987
17235
|
// src/model/nodes/CommentNode.ts
|
|
16988
|
-
var
|
|
16989
|
-
var
|
|
17236
|
+
var import_non_secure59 = require("nanoid/non-secure");
|
|
17237
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
16990
17238
|
var CommentNodeImpl = class extends NodeImpl {
|
|
16991
17239
|
static create() {
|
|
16992
17240
|
const chartNode = {
|
|
16993
17241
|
type: "comment",
|
|
16994
17242
|
title: "Comment",
|
|
16995
|
-
id: (0,
|
|
17243
|
+
id: (0, import_non_secure59.nanoid)(),
|
|
16996
17244
|
visualData: {
|
|
16997
17245
|
x: 0,
|
|
16998
17246
|
y: 0,
|
|
@@ -17038,7 +17286,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
17038
17286
|
}
|
|
17039
17287
|
static getUIData() {
|
|
17040
17288
|
return {
|
|
17041
|
-
infoBoxBody:
|
|
17289
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
17042
17290
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
17043
17291
|
`,
|
|
17044
17292
|
infoBoxTitle: "Comment Node",
|
|
@@ -17053,11 +17301,11 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
17053
17301
|
var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
|
|
17054
17302
|
|
|
17055
17303
|
// src/model/nodes/ImageNode.ts
|
|
17056
|
-
var
|
|
17304
|
+
var import_non_secure60 = require("nanoid/non-secure");
|
|
17057
17305
|
var ImageNodeImpl = class extends NodeImpl {
|
|
17058
17306
|
static create() {
|
|
17059
17307
|
return {
|
|
17060
|
-
id: (0,
|
|
17308
|
+
id: (0, import_non_secure60.nanoid)(),
|
|
17061
17309
|
type: "image",
|
|
17062
17310
|
title: "Image",
|
|
17063
17311
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -17154,11 +17402,11 @@ var ImageNodeImpl = class extends NodeImpl {
|
|
|
17154
17402
|
var imageNode = nodeDefinition(ImageNodeImpl, "Image");
|
|
17155
17403
|
|
|
17156
17404
|
// src/model/nodes/AudioNode.ts
|
|
17157
|
-
var
|
|
17405
|
+
var import_non_secure61 = require("nanoid/non-secure");
|
|
17158
17406
|
var AudioNodeImpl = class extends NodeImpl {
|
|
17159
17407
|
static create() {
|
|
17160
17408
|
return {
|
|
17161
|
-
id: (0,
|
|
17409
|
+
id: (0, import_non_secure61.nanoid)(),
|
|
17162
17410
|
type: "audio",
|
|
17163
17411
|
title: "Audio",
|
|
17164
17412
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -17251,7 +17499,7 @@ var AudioNodeImpl = class extends NodeImpl {
|
|
|
17251
17499
|
var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
|
|
17252
17500
|
|
|
17253
17501
|
// src/model/nodes/HttpCallNode.ts
|
|
17254
|
-
var
|
|
17502
|
+
var import_non_secure62 = require("nanoid/non-secure");
|
|
17255
17503
|
var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
|
|
17256
17504
|
var REQUEST_ERROR_OUTPUT_ID = "requestError";
|
|
17257
17505
|
var STATUS_CODE_OUTPUT_ID = "statusCode";
|
|
@@ -17480,7 +17728,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
17480
17728
|
const chartNode = {
|
|
17481
17729
|
type: "httpCall",
|
|
17482
17730
|
title: "Http Call",
|
|
17483
|
-
id: (0,
|
|
17731
|
+
id: (0, import_non_secure62.nanoid)(),
|
|
17484
17732
|
visualData: {
|
|
17485
17733
|
x: 0,
|
|
17486
17734
|
y: 0,
|
|
@@ -17820,14 +18068,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
17820
18068
|
var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
17821
18069
|
|
|
17822
18070
|
// src/model/nodes/DelayNode.ts
|
|
17823
|
-
var
|
|
17824
|
-
var
|
|
18071
|
+
var import_non_secure63 = require("nanoid/non-secure");
|
|
18072
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
17825
18073
|
var DelayNodeImpl = class extends NodeImpl {
|
|
17826
18074
|
static create() {
|
|
17827
18075
|
const chartNode = {
|
|
17828
18076
|
type: "delay",
|
|
17829
18077
|
title: "Delay",
|
|
17830
|
-
id: (0,
|
|
18078
|
+
id: (0, import_non_secure63.nanoid)(),
|
|
17831
18079
|
visualData: {
|
|
17832
18080
|
x: 0,
|
|
17833
18081
|
y: 0,
|
|
@@ -17872,7 +18120,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
17872
18120
|
}
|
|
17873
18121
|
static getUIData() {
|
|
17874
18122
|
return {
|
|
17875
|
-
infoBoxBody:
|
|
18123
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
17876
18124
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
17877
18125
|
`,
|
|
17878
18126
|
infoBoxTitle: "Delay Node",
|
|
@@ -17923,12 +18171,12 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
17923
18171
|
var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
17924
18172
|
|
|
17925
18173
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
17926
|
-
var
|
|
17927
|
-
var
|
|
18174
|
+
var import_non_secure64 = require("nanoid/non-secure");
|
|
18175
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
17928
18176
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
17929
18177
|
static create() {
|
|
17930
18178
|
return {
|
|
17931
|
-
id: (0,
|
|
18179
|
+
id: (0, import_non_secure64.nanoid)(),
|
|
17932
18180
|
type: "appendToDataset",
|
|
17933
18181
|
title: "Append to Dataset",
|
|
17934
18182
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -17984,7 +18232,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
17984
18232
|
}
|
|
17985
18233
|
static getUIData() {
|
|
17986
18234
|
return {
|
|
17987
|
-
infoBoxBody:
|
|
18235
|
+
infoBoxBody: import_ts_dedent60.dedent`
|
|
17988
18236
|
Appends a row of data to the specified dataset.
|
|
17989
18237
|
`,
|
|
17990
18238
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -18534,14 +18782,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
|
|
|
18534
18782
|
var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
|
|
18535
18783
|
|
|
18536
18784
|
// src/model/nodes/SliceNode.ts
|
|
18537
|
-
var
|
|
18538
|
-
var
|
|
18785
|
+
var import_non_secure65 = require("nanoid/non-secure");
|
|
18786
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
18539
18787
|
var SliceNodeImpl = class extends NodeImpl {
|
|
18540
18788
|
static create() {
|
|
18541
18789
|
const chartNode = {
|
|
18542
18790
|
type: "slice",
|
|
18543
18791
|
title: "Slice",
|
|
18544
|
-
id: (0,
|
|
18792
|
+
id: (0, import_non_secure65.nanoid)(),
|
|
18545
18793
|
visualData: {
|
|
18546
18794
|
x: 0,
|
|
18547
18795
|
y: 0,
|
|
@@ -18594,14 +18842,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
18594
18842
|
];
|
|
18595
18843
|
}
|
|
18596
18844
|
getBody() {
|
|
18597
|
-
return
|
|
18845
|
+
return import_ts_dedent61.dedent`
|
|
18598
18846
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
18599
18847
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
18600
18848
|
`;
|
|
18601
18849
|
}
|
|
18602
18850
|
static getUIData() {
|
|
18603
18851
|
return {
|
|
18604
|
-
infoBoxBody:
|
|
18852
|
+
infoBoxBody: import_ts_dedent61.dedent`
|
|
18605
18853
|
Slices an array from the start index for the count number of elements.
|
|
18606
18854
|
|
|
18607
18855
|
Useful for extracting a portion of an array.
|
|
@@ -18627,14 +18875,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
18627
18875
|
var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
18628
18876
|
|
|
18629
18877
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
18630
|
-
var
|
|
18631
|
-
var
|
|
18878
|
+
var import_non_secure66 = require("nanoid/non-secure");
|
|
18879
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
18632
18880
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
18633
18881
|
static create() {
|
|
18634
18882
|
const chartNode = {
|
|
18635
18883
|
type: "extractMarkdownCodeBlocks",
|
|
18636
18884
|
title: "Extract Markdown Code Blocks",
|
|
18637
|
-
id: (0,
|
|
18885
|
+
id: (0, import_non_secure66.nanoid)(),
|
|
18638
18886
|
visualData: {
|
|
18639
18887
|
x: 0,
|
|
18640
18888
|
y: 0,
|
|
@@ -18675,7 +18923,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
18675
18923
|
}
|
|
18676
18924
|
static getUIData() {
|
|
18677
18925
|
return {
|
|
18678
|
-
infoBoxBody:
|
|
18926
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
18679
18927
|
Extracts the code blocks in the input Markdown text.
|
|
18680
18928
|
|
|
18681
18929
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -18726,7 +18974,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
|
|
|
18726
18974
|
);
|
|
18727
18975
|
|
|
18728
18976
|
// src/model/nodes/AssembleMessageNode.ts
|
|
18729
|
-
var
|
|
18977
|
+
var import_non_secure67 = require("nanoid/non-secure");
|
|
18730
18978
|
var import_lodash_es16 = require("lodash");
|
|
18731
18979
|
var import_ts_pattern7 = require("ts-pattern");
|
|
18732
18980
|
var messageTypeToTitle = {
|
|
@@ -18740,7 +18988,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
18740
18988
|
const chartNode = {
|
|
18741
18989
|
type: "assembleMessage",
|
|
18742
18990
|
title: "Assemble Message",
|
|
18743
|
-
id: (0,
|
|
18991
|
+
id: (0, import_non_secure67.nanoid)(),
|
|
18744
18992
|
visualData: {
|
|
18745
18993
|
x: 0,
|
|
18746
18994
|
y: 0,
|
|
@@ -18937,13 +19185,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
18937
19185
|
var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
|
|
18938
19186
|
|
|
18939
19187
|
// src/model/nodes/URLReferenceNode.ts
|
|
18940
|
-
var
|
|
19188
|
+
var import_non_secure68 = require("nanoid/non-secure");
|
|
18941
19189
|
var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
18942
19190
|
static create() {
|
|
18943
19191
|
const chartNode = {
|
|
18944
19192
|
type: "urlReference",
|
|
18945
19193
|
title: "URL Reference",
|
|
18946
|
-
id: (0,
|
|
19194
|
+
id: (0, import_non_secure68.nanoid)(),
|
|
18947
19195
|
visualData: {
|
|
18948
19196
|
x: 0,
|
|
18949
19197
|
y: 0,
|
|
@@ -19012,15 +19260,15 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
|
19012
19260
|
var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
19013
19261
|
|
|
19014
19262
|
// src/model/nodes/DestructureNode.ts
|
|
19015
|
-
var
|
|
19263
|
+
var import_non_secure69 = require("nanoid/non-secure");
|
|
19016
19264
|
var import_jsonpath_plus3 = require("jsonpath-plus");
|
|
19017
|
-
var
|
|
19265
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
19018
19266
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
19019
19267
|
static create() {
|
|
19020
19268
|
const chartNode = {
|
|
19021
19269
|
type: "destructure",
|
|
19022
19270
|
title: "Destructure",
|
|
19023
|
-
id: (0,
|
|
19271
|
+
id: (0, import_non_secure69.nanoid)(),
|
|
19024
19272
|
visualData: {
|
|
19025
19273
|
x: 0,
|
|
19026
19274
|
y: 0,
|
|
@@ -19028,7 +19276,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
19028
19276
|
},
|
|
19029
19277
|
data: {
|
|
19030
19278
|
paths: ["$.value"],
|
|
19031
|
-
pathPortIds: [(0,
|
|
19279
|
+
pathPortIds: [(0, import_non_secure69.nanoid)()]
|
|
19032
19280
|
}
|
|
19033
19281
|
};
|
|
19034
19282
|
return chartNode;
|
|
@@ -19082,7 +19330,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
19082
19330
|
}
|
|
19083
19331
|
static getUIData() {
|
|
19084
19332
|
return {
|
|
19085
|
-
infoBoxBody:
|
|
19333
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
19086
19334
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
19087
19335
|
`,
|
|
19088
19336
|
infoBoxTitle: "Destructure Node",
|
|
@@ -19116,12 +19364,12 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
19116
19364
|
var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
19117
19365
|
|
|
19118
19366
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
19119
|
-
var
|
|
19120
|
-
var
|
|
19367
|
+
var import_non_secure70 = require("nanoid/non-secure");
|
|
19368
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
19121
19369
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
19122
19370
|
static create() {
|
|
19123
19371
|
return {
|
|
19124
|
-
id: (0,
|
|
19372
|
+
id: (0, import_non_secure70.nanoid)(),
|
|
19125
19373
|
type: "replaceDataset",
|
|
19126
19374
|
title: "Replace Dataset",
|
|
19127
19375
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -19160,7 +19408,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
19160
19408
|
}
|
|
19161
19409
|
static getUIData() {
|
|
19162
19410
|
return {
|
|
19163
|
-
infoBoxBody:
|
|
19411
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
19164
19412
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
19165
19413
|
`,
|
|
19166
19414
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -19292,14 +19540,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
|
|
|
19292
19540
|
var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
19293
19541
|
|
|
19294
19542
|
// src/model/nodes/GraphReferenceNode.ts
|
|
19295
|
-
var
|
|
19296
|
-
var
|
|
19543
|
+
var import_non_secure71 = require("nanoid/non-secure");
|
|
19544
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
19297
19545
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
19298
19546
|
static create() {
|
|
19299
19547
|
const chartNode = {
|
|
19300
19548
|
type: "graphReference",
|
|
19301
19549
|
title: "Graph Reference",
|
|
19302
|
-
id: (0,
|
|
19550
|
+
id: (0, import_non_secure71.nanoid)(),
|
|
19303
19551
|
visualData: {
|
|
19304
19552
|
x: 0,
|
|
19305
19553
|
y: 0,
|
|
@@ -19348,7 +19596,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
19348
19596
|
}
|
|
19349
19597
|
static getUIData() {
|
|
19350
19598
|
return {
|
|
19351
|
-
infoBoxBody:
|
|
19599
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
19352
19600
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
19353
19601
|
`,
|
|
19354
19602
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -19414,8 +19662,8 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
19414
19662
|
var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
|
|
19415
19663
|
|
|
19416
19664
|
// src/model/nodes/CallGraphNode.ts
|
|
19417
|
-
var
|
|
19418
|
-
var
|
|
19665
|
+
var import_non_secure72 = require("nanoid/non-secure");
|
|
19666
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
19419
19667
|
|
|
19420
19668
|
// src/api/looseDataValue.ts
|
|
19421
19669
|
var import_lodash_es17 = require("lodash");
|
|
@@ -19441,7 +19689,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
19441
19689
|
const chartNode = {
|
|
19442
19690
|
type: "callGraph",
|
|
19443
19691
|
title: "Call Graph",
|
|
19444
|
-
id: (0,
|
|
19692
|
+
id: (0, import_non_secure72.nanoid)(),
|
|
19445
19693
|
visualData: {
|
|
19446
19694
|
x: 0,
|
|
19447
19695
|
y: 0,
|
|
@@ -19491,7 +19739,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
19491
19739
|
}
|
|
19492
19740
|
static getUIData() {
|
|
19493
19741
|
return {
|
|
19494
|
-
infoBoxBody:
|
|
19742
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
19495
19743
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
19496
19744
|
`,
|
|
19497
19745
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -19563,7 +19811,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
19563
19811
|
|
|
19564
19812
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
19565
19813
|
var import_nanoid = require("nanoid");
|
|
19566
|
-
var
|
|
19814
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
19567
19815
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
19568
19816
|
static create() {
|
|
19569
19817
|
const chartNode = {
|
|
@@ -19615,7 +19863,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
19615
19863
|
}
|
|
19616
19864
|
static getUIData() {
|
|
19617
19865
|
return {
|
|
19618
|
-
infoBoxBody:
|
|
19866
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
19619
19867
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
19620
19868
|
`,
|
|
19621
19869
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -19736,11 +19984,11 @@ function buildDelegatedToolCallOutputs(records) {
|
|
|
19736
19984
|
var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
|
|
19737
19985
|
|
|
19738
19986
|
// src/model/nodes/PlayAudioNode.ts
|
|
19739
|
-
var
|
|
19987
|
+
var import_non_secure73 = require("nanoid/non-secure");
|
|
19740
19988
|
var PlayAudioNodeImpl = class extends NodeImpl {
|
|
19741
19989
|
static create() {
|
|
19742
19990
|
return {
|
|
19743
|
-
id: (0,
|
|
19991
|
+
id: (0, import_non_secure73.nanoid)(),
|
|
19744
19992
|
type: "playAudio",
|
|
19745
19993
|
title: "Play Audio",
|
|
19746
19994
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -19794,11 +20042,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
|
|
|
19794
20042
|
var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
|
|
19795
20043
|
|
|
19796
20044
|
// src/model/nodes/DocumentNode.ts
|
|
19797
|
-
var
|
|
20045
|
+
var import_non_secure74 = require("nanoid/non-secure");
|
|
19798
20046
|
var DocumentNodeImpl = class extends NodeImpl {
|
|
19799
20047
|
static create() {
|
|
19800
20048
|
return {
|
|
19801
|
-
id: (0,
|
|
20049
|
+
id: (0, import_non_secure74.nanoid)(),
|
|
19802
20050
|
type: "document",
|
|
19803
20051
|
title: "Document",
|
|
19804
20052
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -19964,14 +20212,14 @@ var DocumentNodeImpl = class extends NodeImpl {
|
|
|
19964
20212
|
var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
19965
20213
|
|
|
19966
20214
|
// src/model/nodes/ChatLoopNode.ts
|
|
19967
|
-
var
|
|
19968
|
-
var
|
|
20215
|
+
var import_non_secure75 = require("nanoid/non-secure");
|
|
20216
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
19969
20217
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
19970
20218
|
static create() {
|
|
19971
20219
|
const chartNode = {
|
|
19972
20220
|
type: "chatLoop",
|
|
19973
20221
|
title: "Chat Loop",
|
|
19974
|
-
id: (0,
|
|
20222
|
+
id: (0, import_non_secure75.nanoid)(),
|
|
19975
20223
|
visualData: {
|
|
19976
20224
|
x: 0,
|
|
19977
20225
|
y: 0,
|
|
@@ -20004,7 +20252,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
20004
20252
|
}
|
|
20005
20253
|
static getUIData() {
|
|
20006
20254
|
return {
|
|
20007
|
-
infoBoxBody:
|
|
20255
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
20008
20256
|
Creates an interactive chat loop with an AI model. The node will:
|
|
20009
20257
|
1. Send the initial prompt to the AI
|
|
20010
20258
|
2. Show the AI's response and prompt for user input
|
|
@@ -20104,12 +20352,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
20104
20352
|
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, "Chat Loop");
|
|
20105
20353
|
|
|
20106
20354
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
20107
|
-
var
|
|
20108
|
-
var
|
|
20355
|
+
var import_non_secure76 = require("nanoid/non-secure");
|
|
20356
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
20109
20357
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
20110
20358
|
static create() {
|
|
20111
20359
|
return {
|
|
20112
|
-
id: (0,
|
|
20360
|
+
id: (0, import_non_secure76.nanoid)(),
|
|
20113
20361
|
type: "readAllFiles",
|
|
20114
20362
|
title: "Read All Files",
|
|
20115
20363
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -20220,7 +20468,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
20220
20468
|
];
|
|
20221
20469
|
}
|
|
20222
20470
|
getBody() {
|
|
20223
|
-
return
|
|
20471
|
+
return import_ts_dedent69.dedent`
|
|
20224
20472
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
20225
20473
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
20226
20474
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -20229,7 +20477,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
20229
20477
|
}
|
|
20230
20478
|
static getUIData() {
|
|
20231
20479
|
return {
|
|
20232
|
-
infoBoxBody:
|
|
20480
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
20233
20481
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
20234
20482
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
20235
20483
|
`,
|
|
@@ -20302,14 +20550,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
20302
20550
|
var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
20303
20551
|
|
|
20304
20552
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
20305
|
-
var
|
|
20306
|
-
var
|
|
20553
|
+
var import_non_secure77 = require("nanoid/non-secure");
|
|
20554
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
20307
20555
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
20308
20556
|
static create() {
|
|
20309
20557
|
const chartNode = {
|
|
20310
20558
|
type: "toMarkdownTable",
|
|
20311
20559
|
title: "To Markdown Table",
|
|
20312
|
-
id: (0,
|
|
20560
|
+
id: (0, import_non_secure77.nanoid)(),
|
|
20313
20561
|
visualData: {
|
|
20314
20562
|
x: 0,
|
|
20315
20563
|
y: 0,
|
|
@@ -20365,7 +20613,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
20365
20613
|
}
|
|
20366
20614
|
static getUIData() {
|
|
20367
20615
|
return {
|
|
20368
|
-
infoBoxBody:
|
|
20616
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
20369
20617
|
Converts an array of objects into a markdown table format.
|
|
20370
20618
|
Input should be an array of objects with consistent keys.
|
|
20371
20619
|
`,
|
|
@@ -20417,7 +20665,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
20417
20665
|
|
|
20418
20666
|
// src/model/nodes/CronNode.ts
|
|
20419
20667
|
var import_nanoid2 = require("nanoid");
|
|
20420
|
-
var
|
|
20668
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
20421
20669
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
20422
20670
|
var CronNodeImpl = class extends NodeImpl {
|
|
20423
20671
|
static create() {
|
|
@@ -20487,7 +20735,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
20487
20735
|
}
|
|
20488
20736
|
static getUIData() {
|
|
20489
20737
|
return {
|
|
20490
|
-
infoBoxBody:
|
|
20738
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
20491
20739
|
Executes a subgraph on a schedule. Supports:
|
|
20492
20740
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
20493
20741
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -20527,7 +20775,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
20527
20775
|
type: "string",
|
|
20528
20776
|
dataKey: "schedule",
|
|
20529
20777
|
label: "Schedule",
|
|
20530
|
-
helperMessage:
|
|
20778
|
+
helperMessage: import_ts_dedent71.dedent`
|
|
20531
20779
|
Examples:
|
|
20532
20780
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
20533
20781
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -20658,15 +20906,15 @@ ${this.data.schedule}`;
|
|
|
20658
20906
|
var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
20659
20907
|
|
|
20660
20908
|
// src/model/nodes/ToTreeNode.ts
|
|
20661
|
-
var
|
|
20662
|
-
var
|
|
20909
|
+
var import_non_secure78 = require("nanoid/non-secure");
|
|
20910
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
20663
20911
|
var import_lodash_es18 = require("lodash");
|
|
20664
20912
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
20665
20913
|
static create() {
|
|
20666
20914
|
const chartNode = {
|
|
20667
20915
|
type: "toTree",
|
|
20668
20916
|
title: "To Tree",
|
|
20669
|
-
id: (0,
|
|
20917
|
+
id: (0, import_non_secure78.nanoid)(),
|
|
20670
20918
|
visualData: {
|
|
20671
20919
|
x: 0,
|
|
20672
20920
|
y: 0,
|
|
@@ -20721,7 +20969,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
20721
20969
|
];
|
|
20722
20970
|
}
|
|
20723
20971
|
getBody() {
|
|
20724
|
-
return
|
|
20972
|
+
return import_ts_dedent72.dedent`
|
|
20725
20973
|
Format: ${this.data.format}
|
|
20726
20974
|
Children: ${this.data.childrenProperty}
|
|
20727
20975
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -20729,7 +20977,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
20729
20977
|
}
|
|
20730
20978
|
static getUIData() {
|
|
20731
20979
|
return {
|
|
20732
|
-
infoBoxBody:
|
|
20980
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
20733
20981
|
Converts an array of objects into a tree structure and renders it as text.
|
|
20734
20982
|
|
|
20735
20983
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -20784,14 +21032,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
20784
21032
|
var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
20785
21033
|
|
|
20786
21034
|
// src/model/nodes/LoopUntilNode.ts
|
|
20787
|
-
var
|
|
20788
|
-
var
|
|
21035
|
+
var import_non_secure79 = require("nanoid/non-secure");
|
|
21036
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
20789
21037
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
20790
21038
|
static create() {
|
|
20791
21039
|
const chartNode = {
|
|
20792
21040
|
type: "loopUntil",
|
|
20793
21041
|
title: "Loop Until",
|
|
20794
|
-
id: (0,
|
|
21042
|
+
id: (0, import_non_secure79.nanoid)(),
|
|
20795
21043
|
visualData: {
|
|
20796
21044
|
x: 0,
|
|
20797
21045
|
y: 0,
|
|
@@ -20915,7 +21163,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
20915
21163
|
}
|
|
20916
21164
|
static getUIData() {
|
|
20917
21165
|
return {
|
|
20918
|
-
infoBoxBody:
|
|
21166
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
20919
21167
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
20920
21168
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
20921
21169
|
maximum iterations.
|
|
@@ -21273,14 +21521,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
|
|
|
21273
21521
|
var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
21274
21522
|
|
|
21275
21523
|
// src/model/nodes/MCPToolCallNode.ts
|
|
21276
|
-
var
|
|
21277
|
-
var
|
|
21524
|
+
var import_non_secure80 = require("nanoid/non-secure");
|
|
21525
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
21278
21526
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
21279
21527
|
static create() {
|
|
21280
21528
|
const chartNode = {
|
|
21281
21529
|
type: "mcpToolCall",
|
|
21282
21530
|
title: "MCP Tool Call",
|
|
21283
|
-
id: (0,
|
|
21531
|
+
id: (0, import_non_secure80.nanoid)(),
|
|
21284
21532
|
visualData: {
|
|
21285
21533
|
x: 0,
|
|
21286
21534
|
y: 0,
|
|
@@ -21293,7 +21541,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
21293
21541
|
serverUrl: "http://localhost:8080/mcp",
|
|
21294
21542
|
serverId: "",
|
|
21295
21543
|
toolName: "",
|
|
21296
|
-
toolArguments:
|
|
21544
|
+
toolArguments: import_ts_dedent74.dedent`
|
|
21297
21545
|
{
|
|
21298
21546
|
"key": "value"
|
|
21299
21547
|
}`,
|
|
@@ -21433,7 +21681,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
21433
21681
|
}
|
|
21434
21682
|
static getUIData() {
|
|
21435
21683
|
return {
|
|
21436
|
-
infoBoxBody:
|
|
21684
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
21437
21685
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
21438
21686
|
`,
|
|
21439
21687
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -21522,13 +21770,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
21522
21770
|
var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
|
|
21523
21771
|
|
|
21524
21772
|
// src/model/nodes/MCPGetPromptNode.ts
|
|
21525
|
-
var
|
|
21773
|
+
var import_non_secure81 = require("nanoid/non-secure");
|
|
21526
21774
|
var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
21527
21775
|
static create() {
|
|
21528
21776
|
const chartNode = {
|
|
21529
21777
|
type: "mcpGetPrompt",
|
|
21530
21778
|
title: "MCP Get Prompt",
|
|
21531
|
-
id: (0,
|
|
21779
|
+
id: (0, import_non_secure81.nanoid)(),
|
|
21532
21780
|
visualData: {
|
|
21533
21781
|
x: 0,
|
|
21534
21782
|
y: 0,
|
|
@@ -21744,15 +21992,15 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
|
21744
21992
|
var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
21745
21993
|
|
|
21746
21994
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
21747
|
-
var
|
|
21748
|
-
var
|
|
21995
|
+
var import_non_secure82 = require("nanoid/non-secure");
|
|
21996
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
21749
21997
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
21750
21998
|
static create() {
|
|
21751
21999
|
const chartNode = {
|
|
21752
22000
|
type: "referencedGraphAlias",
|
|
21753
22001
|
title: "",
|
|
21754
22002
|
// Always set initially by the editor
|
|
21755
|
-
id: (0,
|
|
22003
|
+
id: (0, import_non_secure82.nanoid)(),
|
|
21756
22004
|
visualData: {
|
|
21757
22005
|
x: 0,
|
|
21758
22006
|
y: 0,
|
|
@@ -21859,7 +22107,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
21859
22107
|
}
|
|
21860
22108
|
static getUIData() {
|
|
21861
22109
|
return {
|
|
21862
|
-
infoBoxBody:
|
|
22110
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
21863
22111
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
21864
22112
|
`,
|
|
21865
22113
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -21953,7 +22201,7 @@ var referencedGraphAliasNode = nodeDefinition(ReferencedGraphAliasNodeImpl, "Ref
|
|
|
21953
22201
|
|
|
21954
22202
|
// src/model/Nodes.ts
|
|
21955
22203
|
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);
|
|
22204
|
+
return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(expressionNode).register(matchNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(contextNode).register(coalesceNode).register(didRunNode).register(passthroughNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode);
|
|
21957
22205
|
};
|
|
21958
22206
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
21959
22207
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -22044,7 +22292,7 @@ var OpenAIEmbeddingGenerator = class {
|
|
|
22044
22292
|
registerIntegration("embeddingGenerator", "openai", (context) => new OpenAIEmbeddingGenerator(context.settings));
|
|
22045
22293
|
|
|
22046
22294
|
// src/recording/ExecutionRecorder.ts
|
|
22047
|
-
var
|
|
22295
|
+
var import_non_secure83 = require("nanoid/non-secure");
|
|
22048
22296
|
var import_emittery2 = __toESM(require("emittery-0-13"), 1);
|
|
22049
22297
|
var import_lodash_es19 = require("lodash");
|
|
22050
22298
|
var import_json_stream_es = require("json-stream-es");
|
|
@@ -22237,7 +22485,7 @@ function serializeToObject(recording) {
|
|
|
22237
22485
|
const asString = uint8ArrayToBase64Sync(val);
|
|
22238
22486
|
const existingAsset = Object.entries(serialized.assets).find(([, asset]) => asset === asString);
|
|
22239
22487
|
if (!existingAsset) {
|
|
22240
|
-
const id = (0,
|
|
22488
|
+
const id = (0, import_non_secure83.nanoid)();
|
|
22241
22489
|
serialized.assets[id] = asString;
|
|
22242
22490
|
return `$ASSET:${id}`;
|
|
22243
22491
|
} else {
|
|
@@ -22296,7 +22544,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
22296
22544
|
once = void 0;
|
|
22297
22545
|
recordSocket(channel) {
|
|
22298
22546
|
return new Promise((resolve) => {
|
|
22299
|
-
this.recordingId = (0,
|
|
22547
|
+
this.recordingId = (0, import_non_secure83.nanoid)();
|
|
22300
22548
|
const listener = (event) => {
|
|
22301
22549
|
const { message, data } = JSON.parse(event.data);
|
|
22302
22550
|
if (this.#includePartialOutputs === false && message === "partialOutput") {
|
|
@@ -22321,7 +22569,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
22321
22569
|
});
|
|
22322
22570
|
}
|
|
22323
22571
|
record(processor) {
|
|
22324
|
-
this.recordingId = (0,
|
|
22572
|
+
this.recordingId = (0, import_non_secure83.nanoid)();
|
|
22325
22573
|
processor.onAny((event, data) => {
|
|
22326
22574
|
if (this.#includePartialOutputs === false && event === "partialOutput") {
|
|
22327
22575
|
return;
|
|
@@ -22377,8 +22625,8 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
22377
22625
|
};
|
|
22378
22626
|
|
|
22379
22627
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
22380
|
-
var
|
|
22381
|
-
var
|
|
22628
|
+
var import_non_secure84 = require("nanoid/non-secure");
|
|
22629
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
22382
22630
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
22383
22631
|
|
|
22384
22632
|
// src/utils/assertNever.ts
|
|
@@ -22393,7 +22641,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
22393
22641
|
const chartNode = {
|
|
22394
22642
|
type: "chatAnthropic",
|
|
22395
22643
|
title: "Chat (Anthropic, Legacy)",
|
|
22396
|
-
id: (0,
|
|
22644
|
+
id: (0, import_non_secure84.nanoid)(),
|
|
22397
22645
|
visualData: {
|
|
22398
22646
|
x: 0,
|
|
22399
22647
|
y: 0,
|
|
@@ -22537,7 +22785,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
22537
22785
|
getBody(data) {
|
|
22538
22786
|
var _a;
|
|
22539
22787
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
22540
|
-
return
|
|
22788
|
+
return import_ts_dedent76.dedent`
|
|
22541
22789
|
${modelName}
|
|
22542
22790
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
22543
22791
|
Max Tokens: ${data.maxTokens}
|
|
@@ -22662,7 +22910,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
22662
22910
|
},
|
|
22663
22911
|
getUIData() {
|
|
22664
22912
|
return {
|
|
22665
|
-
infoBoxBody:
|
|
22913
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
22666
22914
|
Legacy Anthropic chat node.
|
|
22667
22915
|
|
|
22668
22916
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -23135,8 +23383,8 @@ var anthropicPlugin = {
|
|
|
23135
23383
|
var anthropic_default = anthropicPlugin;
|
|
23136
23384
|
|
|
23137
23385
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
23138
|
-
var
|
|
23139
|
-
var
|
|
23386
|
+
var import_non_secure85 = require("nanoid/non-secure");
|
|
23387
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
23140
23388
|
var import_autoevals = require("autoevals");
|
|
23141
23389
|
var import_ts_pattern8 = require("ts-pattern");
|
|
23142
23390
|
var options = [
|
|
@@ -23155,7 +23403,7 @@ var AutoEvalsNodeImpl = {
|
|
|
23155
23403
|
const chartNode = {
|
|
23156
23404
|
type: "autoevals",
|
|
23157
23405
|
title: "Autoevals",
|
|
23158
|
-
id: (0,
|
|
23406
|
+
id: (0, import_non_secure85.nanoid)(),
|
|
23159
23407
|
visualData: {
|
|
23160
23408
|
x: 0,
|
|
23161
23409
|
y: 0,
|
|
@@ -23270,7 +23518,7 @@ var AutoEvalsNodeImpl = {
|
|
|
23270
23518
|
},
|
|
23271
23519
|
getUIData() {
|
|
23272
23520
|
return {
|
|
23273
|
-
infoBoxBody:
|
|
23521
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
23274
23522
|
Evaluates the validity of a response using the autoevals library.
|
|
23275
23523
|
`,
|
|
23276
23524
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -23350,8 +23598,8 @@ var autoevalsPlugin = {
|
|
|
23350
23598
|
var autoevals_default = autoevalsPlugin;
|
|
23351
23599
|
|
|
23352
23600
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
23353
|
-
var
|
|
23354
|
-
var
|
|
23601
|
+
var import_non_secure86 = require("nanoid/non-secure");
|
|
23602
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
23355
23603
|
|
|
23356
23604
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
23357
23605
|
var import_assemblyai = require("assemblyai");
|
|
@@ -23471,7 +23719,7 @@ var LemurQaNodeImpl = {
|
|
|
23471
23719
|
const chartNode = {
|
|
23472
23720
|
type: "assemblyAiLemurQa",
|
|
23473
23721
|
title: "LeMUR Question & Answers",
|
|
23474
|
-
id: (0,
|
|
23722
|
+
id: (0, import_non_secure86.nanoid)(),
|
|
23475
23723
|
visualData: {
|
|
23476
23724
|
x: 0,
|
|
23477
23725
|
y: 0,
|
|
@@ -23537,7 +23785,7 @@ var LemurQaNodeImpl = {
|
|
|
23537
23785
|
},
|
|
23538
23786
|
getUIData() {
|
|
23539
23787
|
return {
|
|
23540
|
-
infoBoxBody:
|
|
23788
|
+
infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
23541
23789
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
23542
23790
|
contextMenuTitle: "LeMUR Q&A",
|
|
23543
23791
|
group: ["AI", "AssemblyAI"]
|
|
@@ -23609,14 +23857,14 @@ function applyQuestionEditors(data, question) {
|
|
|
23609
23857
|
var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
23610
23858
|
|
|
23611
23859
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
23612
|
-
var
|
|
23613
|
-
var
|
|
23860
|
+
var import_non_secure87 = require("nanoid/non-secure");
|
|
23861
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
23614
23862
|
var TranscribeAudioNodeImpl = {
|
|
23615
23863
|
create() {
|
|
23616
23864
|
const chartNode = {
|
|
23617
23865
|
type: "assemblyAiTranscribeAudio",
|
|
23618
23866
|
title: "Transcribe Audio",
|
|
23619
|
-
id: (0,
|
|
23867
|
+
id: (0, import_non_secure87.nanoid)(),
|
|
23620
23868
|
visualData: {
|
|
23621
23869
|
x: 0,
|
|
23622
23870
|
y: 0,
|
|
@@ -23672,7 +23920,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
23672
23920
|
},
|
|
23673
23921
|
getUIData() {
|
|
23674
23922
|
return {
|
|
23675
|
-
infoBoxBody:
|
|
23923
|
+
infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI to transcribe audio`,
|
|
23676
23924
|
infoBoxTitle: "Transcribe Audio Node",
|
|
23677
23925
|
contextMenuTitle: "Transcribe Audio",
|
|
23678
23926
|
group: ["AI", "AssemblyAI"]
|
|
@@ -23731,15 +23979,15 @@ function getAdditionalParameters(data) {
|
|
|
23731
23979
|
}
|
|
23732
23980
|
|
|
23733
23981
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
23734
|
-
var
|
|
23735
|
-
var
|
|
23982
|
+
var import_non_secure88 = require("nanoid/non-secure");
|
|
23983
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
23736
23984
|
var import_assemblyai3 = require("assemblyai");
|
|
23737
23985
|
var LemurSummaryNodeImpl = {
|
|
23738
23986
|
create() {
|
|
23739
23987
|
const chartNode = {
|
|
23740
23988
|
type: "assemblyAiLemurSummary",
|
|
23741
23989
|
title: "LeMUR Summary",
|
|
23742
|
-
id: (0,
|
|
23990
|
+
id: (0, import_non_secure88.nanoid)(),
|
|
23743
23991
|
visualData: {
|
|
23744
23992
|
x: 0,
|
|
23745
23993
|
y: 0,
|
|
@@ -23785,7 +24033,7 @@ var LemurSummaryNodeImpl = {
|
|
|
23785
24033
|
},
|
|
23786
24034
|
getUIData() {
|
|
23787
24035
|
return {
|
|
23788
|
-
infoBoxBody:
|
|
24036
|
+
infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
23789
24037
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
23790
24038
|
contextMenuTitle: "LeMUR Summary",
|
|
23791
24039
|
group: ["AI", "AssemblyAI"]
|
|
@@ -23809,15 +24057,15 @@ var LemurSummaryNodeImpl = {
|
|
|
23809
24057
|
var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
|
|
23810
24058
|
|
|
23811
24059
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
23812
|
-
var
|
|
23813
|
-
var
|
|
24060
|
+
var import_non_secure89 = require("nanoid/non-secure");
|
|
24061
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
23814
24062
|
var import_assemblyai4 = require("assemblyai");
|
|
23815
24063
|
var LemurTaskNodeImpl = {
|
|
23816
24064
|
create() {
|
|
23817
24065
|
const chartNode = {
|
|
23818
24066
|
type: "assemblyAiLemurTask",
|
|
23819
24067
|
title: "LeMUR Task",
|
|
23820
|
-
id: (0,
|
|
24068
|
+
id: (0, import_non_secure89.nanoid)(),
|
|
23821
24069
|
visualData: {
|
|
23822
24070
|
x: 0,
|
|
23823
24071
|
y: 0,
|
|
@@ -23863,7 +24111,7 @@ var LemurTaskNodeImpl = {
|
|
|
23863
24111
|
},
|
|
23864
24112
|
getUIData() {
|
|
23865
24113
|
return {
|
|
23866
|
-
infoBoxBody:
|
|
24114
|
+
infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
23867
24115
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
23868
24116
|
contextMenuTitle: "LeMUR Custom Task",
|
|
23869
24117
|
group: ["AI", "AssemblyAI"]
|
|
@@ -23889,14 +24137,14 @@ var LemurTaskNodeImpl = {
|
|
|
23889
24137
|
var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
23890
24138
|
|
|
23891
24139
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
23892
|
-
var
|
|
23893
|
-
var
|
|
24140
|
+
var import_non_secure90 = require("nanoid/non-secure");
|
|
24141
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
23894
24142
|
var LemurActionItemsNodeImpl = {
|
|
23895
24143
|
create() {
|
|
23896
24144
|
const chartNode = {
|
|
23897
24145
|
type: "assemblyAiLemurActionItems",
|
|
23898
24146
|
title: "LeMUR Action Items",
|
|
23899
|
-
id: (0,
|
|
24147
|
+
id: (0, import_non_secure90.nanoid)(),
|
|
23900
24148
|
visualData: {
|
|
23901
24149
|
x: 0,
|
|
23902
24150
|
y: 0,
|
|
@@ -23942,7 +24190,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
23942
24190
|
},
|
|
23943
24191
|
getUIData() {
|
|
23944
24192
|
return {
|
|
23945
|
-
infoBoxBody:
|
|
24193
|
+
infoBoxBody: import_ts_dedent82.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
23946
24194
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
23947
24195
|
contextMenuTitle: "LeMUR Action Items",
|
|
23948
24196
|
group: ["AI", "AssemblyAI"]
|
|
@@ -23994,12 +24242,12 @@ var assemblyAiPlugin = {
|
|
|
23994
24242
|
var assemblyAi_default = assemblyAiPlugin;
|
|
23995
24243
|
|
|
23996
24244
|
// src/plugins/huggingface/nodes/ChatHuggingFace.ts
|
|
23997
|
-
var
|
|
24245
|
+
var import_non_secure91 = require("nanoid/non-secure");
|
|
23998
24246
|
var import_inference = require("@huggingface/inference");
|
|
23999
24247
|
var ChatHuggingFaceNodeImpl = {
|
|
24000
24248
|
create() {
|
|
24001
24249
|
return {
|
|
24002
|
-
id: (0,
|
|
24250
|
+
id: (0, import_non_secure91.nanoid)(),
|
|
24003
24251
|
type: "chatHuggingFace",
|
|
24004
24252
|
data: {
|
|
24005
24253
|
model: "",
|
|
@@ -24229,13 +24477,13 @@ var ChatHuggingFaceNodeImpl = {
|
|
|
24229
24477
|
var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
|
|
24230
24478
|
|
|
24231
24479
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
24232
|
-
var
|
|
24480
|
+
var import_non_secure92 = require("nanoid/non-secure");
|
|
24233
24481
|
var import_inference2 = require("@huggingface/inference");
|
|
24234
|
-
var
|
|
24482
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
24235
24483
|
var TextToImageHuggingFaceNodeImpl = {
|
|
24236
24484
|
create() {
|
|
24237
24485
|
return {
|
|
24238
|
-
id: (0,
|
|
24486
|
+
id: (0, import_non_secure92.nanoid)(),
|
|
24239
24487
|
type: "textToImageHuggingFace",
|
|
24240
24488
|
data: {
|
|
24241
24489
|
model: "",
|
|
@@ -24376,7 +24624,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
24376
24624
|
];
|
|
24377
24625
|
},
|
|
24378
24626
|
getBody(data) {
|
|
24379
|
-
return
|
|
24627
|
+
return import_ts_dedent83.dedent`
|
|
24380
24628
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
24381
24629
|
`;
|
|
24382
24630
|
},
|
|
@@ -27551,8 +27799,8 @@ var openAIPlugin = {
|
|
|
27551
27799
|
};
|
|
27552
27800
|
|
|
27553
27801
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
27554
|
-
var
|
|
27555
|
-
var
|
|
27802
|
+
var import_non_secure93 = require("nanoid/non-secure");
|
|
27803
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
27556
27804
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
27557
27805
|
var import_ts_pattern9 = require("ts-pattern");
|
|
27558
27806
|
var import_genai2 = require("@google/genai");
|
|
@@ -27580,7 +27828,7 @@ var ChatGoogleNodeImpl = {
|
|
|
27580
27828
|
const chartNode = {
|
|
27581
27829
|
type: "chatGoogle",
|
|
27582
27830
|
title: "Chat (Google, Legacy)",
|
|
27583
|
-
id: (0,
|
|
27831
|
+
id: (0, import_non_secure93.nanoid)(),
|
|
27584
27832
|
visualData: {
|
|
27585
27833
|
x: 0,
|
|
27586
27834
|
y: 0,
|
|
@@ -27715,7 +27963,7 @@ var ChatGoogleNodeImpl = {
|
|
|
27715
27963
|
},
|
|
27716
27964
|
getBody(data) {
|
|
27717
27965
|
var _a;
|
|
27718
|
-
return
|
|
27966
|
+
return import_ts_dedent84.dedent`
|
|
27719
27967
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
27720
27968
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
27721
27969
|
Max Tokens: ${data.maxTokens}
|
|
@@ -27802,7 +28050,7 @@ var ChatGoogleNodeImpl = {
|
|
|
27802
28050
|
},
|
|
27803
28051
|
getUIData() {
|
|
27804
28052
|
return {
|
|
27805
|
-
infoBoxBody:
|
|
28053
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
27806
28054
|
Legacy Google chat node.
|
|
27807
28055
|
|
|
27808
28056
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -28563,6 +28811,7 @@ var Rivet = void 0;
|
|
|
28563
28811
|
DelayNodeImpl,
|
|
28564
28812
|
DelegateFunctionCallNodeImpl,
|
|
28565
28813
|
DestructureNodeImpl,
|
|
28814
|
+
DidRunNodeImpl,
|
|
28566
28815
|
DocumentNodeImpl,
|
|
28567
28816
|
EXPRESSION_OUTPUT_PORT_ID,
|
|
28568
28817
|
EvaluateNodeImpl,
|
|
@@ -28707,6 +28956,7 @@ var Rivet = void 0;
|
|
|
28707
28956
|
deserializeProject,
|
|
28708
28957
|
destructureNode,
|
|
28709
28958
|
detectSerializationVersion,
|
|
28959
|
+
didRunNode,
|
|
28710
28960
|
documentNode,
|
|
28711
28961
|
doubleCheckProject,
|
|
28712
28962
|
emptyNodeGraph,
|
|
@@ -28777,6 +29027,7 @@ var Rivet = void 0;
|
|
|
28777
29027
|
isArrayDataType,
|
|
28778
29028
|
isArrayDataValue,
|
|
28779
29029
|
isBuiltInInputDefinition,
|
|
29030
|
+
isChatV2StructuredResponseFormat,
|
|
28780
29031
|
isDataTypeAccepted,
|
|
28781
29032
|
isDataTypeCompatible,
|
|
28782
29033
|
isFunctionDataType,
|