@valerypopoff/rivet2-core 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bundle.cjs +676 -469
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/model/Nodes.js +3 -0
- package/dist/esm/model/nodes/CoalesceNewNode.js +1 -1
- package/dist/esm/model/nodes/CoalesceNode.js +1 -1
- package/dist/esm/model/nodes/MatchCaseNode.js +132 -0
- package/dist/esm/model/nodes/MatchCaseNodeBase.js +237 -0
- package/dist/esm/model/nodes/MatchNode.js +24 -177
- package/dist/types/model/EditorDefinition.d.ts +2 -0
- package/dist/types/model/Nodes.d.ts +3 -2
- package/dist/types/model/nodes/MatchCaseNode.d.ts +43 -0
- package/dist/types/model/nodes/MatchCaseNodeBase.d.ts +52 -0
- package/dist/types/model/nodes/MatchNode.d.ts +13 -21
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -136,6 +136,7 @@ __export(src_exports, {
|
|
|
136
136
|
MCPGetPromptNodeImpl: () => MCPGetPromptNodeImpl,
|
|
137
137
|
MCPToolCallNodeImpl: () => MCPToolCallNodeImpl,
|
|
138
138
|
ManagedKnowledgeStore: () => ManagedKnowledgeStore,
|
|
139
|
+
MatchCaseNodeImpl: () => MatchCaseNodeImpl,
|
|
139
140
|
MatchNodeImpl: () => MatchNodeImpl,
|
|
140
141
|
NODE_PREFAB_INSTANCE_TYPE: () => NODE_PREFAB_INSTANCE_TYPE,
|
|
141
142
|
NodeImpl: () => NodeImpl,
|
|
@@ -514,6 +515,7 @@ __export(src_exports, {
|
|
|
514
515
|
loopUntilNode: () => loopUntilNode,
|
|
515
516
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
516
517
|
looseDataValuesToDataValues: () => looseDataValuesToDataValues,
|
|
518
|
+
matchCaseNode: () => matchCaseNode,
|
|
517
519
|
matchNode: () => matchNode,
|
|
518
520
|
materializeChatV2PipelineFailure: () => materializeChatV2PipelineFailure,
|
|
519
521
|
materializeLLMResponse: () => materializeLLMResponse,
|
|
@@ -593,6 +595,7 @@ __export(src_exports, {
|
|
|
593
595
|
reconcileUiGraphChatActionBindings: () => reconcileUiGraphChatActionBindings,
|
|
594
596
|
reconcileUiGraphRunGraphActionBindings: () => reconcileUiGraphRunGraphActionBindings,
|
|
595
597
|
referencedGraphAliasNode: () => referencedGraphAliasNode,
|
|
598
|
+
regexMatchLegacyDisplayName: () => regexMatchLegacyDisplayName,
|
|
596
599
|
registerBuiltInNodes: () => registerBuiltInNodes,
|
|
597
600
|
registerIntegration: () => registerIntegration,
|
|
598
601
|
registerKnowledgeStoreProvider: () => registerKnowledgeStoreProvider,
|
|
@@ -798,6 +801,7 @@ __export(exports_exports, {
|
|
|
798
801
|
MCPGetPromptNodeImpl: () => MCPGetPromptNodeImpl,
|
|
799
802
|
MCPToolCallNodeImpl: () => MCPToolCallNodeImpl,
|
|
800
803
|
ManagedKnowledgeStore: () => ManagedKnowledgeStore,
|
|
804
|
+
MatchCaseNodeImpl: () => MatchCaseNodeImpl,
|
|
801
805
|
MatchNodeImpl: () => MatchNodeImpl,
|
|
802
806
|
NODE_PREFAB_INSTANCE_TYPE: () => NODE_PREFAB_INSTANCE_TYPE,
|
|
803
807
|
NodeImpl: () => NodeImpl,
|
|
@@ -1175,6 +1179,7 @@ __export(exports_exports, {
|
|
|
1175
1179
|
loopUntilNode: () => loopUntilNode,
|
|
1176
1180
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
1177
1181
|
looseDataValuesToDataValues: () => looseDataValuesToDataValues,
|
|
1182
|
+
matchCaseNode: () => matchCaseNode,
|
|
1178
1183
|
matchNode: () => matchNode,
|
|
1179
1184
|
materializeChatV2PipelineFailure: () => materializeChatV2PipelineFailure,
|
|
1180
1185
|
materializeLLMResponse: () => materializeLLMResponse,
|
|
@@ -1254,6 +1259,7 @@ __export(exports_exports, {
|
|
|
1254
1259
|
reconcileUiGraphChatActionBindings: () => reconcileUiGraphChatActionBindings,
|
|
1255
1260
|
reconcileUiGraphRunGraphActionBindings: () => reconcileUiGraphRunGraphActionBindings,
|
|
1256
1261
|
referencedGraphAliasNode: () => referencedGraphAliasNode,
|
|
1262
|
+
regexMatchLegacyDisplayName: () => regexMatchLegacyDisplayName,
|
|
1257
1263
|
registerBuiltInNodes: () => registerBuiltInNodes,
|
|
1258
1264
|
registerIntegration: () => registerIntegration,
|
|
1259
1265
|
registerKnowledgeStoreProvider: () => registerKnowledgeStoreProvider,
|
|
@@ -28720,41 +28726,48 @@ var expressionNode = nodeDefinition(ExpressionNodeImpl, "Expression");
|
|
|
28720
28726
|
// src/model/nodes/MatchNode.ts
|
|
28721
28727
|
var import_non_secure19 = require("nanoid/non-secure");
|
|
28722
28728
|
var import_ts_dedent13 = require("ts-dedent");
|
|
28723
|
-
|
|
28724
|
-
|
|
28725
|
-
|
|
28726
|
-
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
28734
|
-
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
28740
|
-
|
|
28729
|
+
|
|
28730
|
+
// src/model/nodes/MatchCaseNodeBase.ts
|
|
28731
|
+
var MatchCaseNodeBase = class extends NodeImpl {
|
|
28732
|
+
casesEditorPlacement = "after-custom-values";
|
|
28733
|
+
customCaseValuesEditorLabel = "Custom case values";
|
|
28734
|
+
defaultExclusive = false;
|
|
28735
|
+
firstMatchingBodyValue = "First matching case only";
|
|
28736
|
+
inputTitle = "Test";
|
|
28737
|
+
matchingCasesToTriggerOptions = [
|
|
28738
|
+
{ value: false, label: "Trigger all matching cases" },
|
|
28739
|
+
{ value: true, label: "Trigger first only" }
|
|
28740
|
+
];
|
|
28741
|
+
sharedCustomValueInputTitle = "Custom value";
|
|
28742
|
+
triggerEditorLabel = "Matching cases to trigger";
|
|
28743
|
+
getReturnValueMode() {
|
|
28744
|
+
return "custom";
|
|
28745
|
+
}
|
|
28746
|
+
getEditorsAfterTrigger() {
|
|
28747
|
+
return [];
|
|
28748
|
+
}
|
|
28749
|
+
shouldHideCustomCaseValues(_data) {
|
|
28750
|
+
return false;
|
|
28741
28751
|
}
|
|
28742
28752
|
getInputDefinitions() {
|
|
28743
28753
|
const inputs = [
|
|
28744
28754
|
{
|
|
28745
28755
|
id: "input",
|
|
28746
|
-
title:
|
|
28756
|
+
title: this.inputTitle,
|
|
28747
28757
|
dataType: "string",
|
|
28748
28758
|
required: true,
|
|
28749
|
-
description:
|
|
28759
|
+
description: `The ${this.inputTitle} value tested against each case.`
|
|
28750
28760
|
}
|
|
28751
28761
|
];
|
|
28762
|
+
if (this.getReturnValueMode() !== "custom") {
|
|
28763
|
+
return inputs;
|
|
28764
|
+
}
|
|
28752
28765
|
if (this.getValueInputMode() === "shared") {
|
|
28753
28766
|
inputs.push({
|
|
28754
28767
|
id: "value",
|
|
28755
|
-
title:
|
|
28768
|
+
title: this.sharedCustomValueInputTitle,
|
|
28756
28769
|
dataType: "any",
|
|
28757
|
-
description:
|
|
28770
|
+
description: `The optional value passed through to every matching output. If unconnected, the ${this.inputTitle} value is passed through.`
|
|
28758
28771
|
});
|
|
28759
28772
|
} else {
|
|
28760
28773
|
const portIds = this.getCasePortIds();
|
|
@@ -28763,14 +28776,14 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28763
28776
|
id: this.getCaseValueInputId(portIds[index]),
|
|
28764
28777
|
title: this.getCaseTitle(caseValue, index),
|
|
28765
28778
|
dataType: "any",
|
|
28766
|
-
description: `The optional custom value emitted when
|
|
28779
|
+
description: `The optional custom value emitted when ${this.describeCaseMatch(caseValue)}. If unconnected, ${this.inputTitle} is passed through.`
|
|
28767
28780
|
});
|
|
28768
28781
|
});
|
|
28769
28782
|
inputs.push({
|
|
28770
28783
|
id: "value-unmatched",
|
|
28771
28784
|
title: "Unmatched",
|
|
28772
28785
|
dataType: "any",
|
|
28773
|
-
description:
|
|
28786
|
+
description: `The optional custom value emitted when ${this.describeNoCaseMatches()}. If unconnected, ${this.inputTitle} is passed through.`
|
|
28774
28787
|
});
|
|
28775
28788
|
}
|
|
28776
28789
|
return inputs;
|
|
@@ -28778,118 +28791,144 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28778
28791
|
getOutputDefinitions() {
|
|
28779
28792
|
const outputs = [];
|
|
28780
28793
|
const portIds = this.getCasePortIds();
|
|
28781
|
-
|
|
28794
|
+
const returnValueMode = this.getReturnValueMode();
|
|
28795
|
+
const dataType = returnValueMode === "true" ? "boolean" : returnValueMode === "testValue" ? "string" : "any";
|
|
28796
|
+
for (let index = 0; index < this.data.cases.length; index++) {
|
|
28797
|
+
const caseValue = this.data.cases[index];
|
|
28798
|
+
const title = this.getCaseTitle(caseValue, index);
|
|
28782
28799
|
outputs.push({
|
|
28783
|
-
id: portIds[
|
|
28784
|
-
title
|
|
28785
|
-
dataType
|
|
28786
|
-
description: this.
|
|
28800
|
+
id: portIds[index],
|
|
28801
|
+
title,
|
|
28802
|
+
dataType,
|
|
28803
|
+
description: this.getMatchingOutputDescription(caseValue, title)
|
|
28787
28804
|
});
|
|
28788
28805
|
}
|
|
28789
28806
|
outputs.push({
|
|
28790
28807
|
id: "unmatched",
|
|
28791
28808
|
title: "Unmatched",
|
|
28792
|
-
dataType
|
|
28793
|
-
description: this.
|
|
28809
|
+
dataType,
|
|
28810
|
+
description: this.getUnmatchedOutputDescription()
|
|
28794
28811
|
});
|
|
28795
28812
|
return outputs;
|
|
28796
28813
|
}
|
|
28797
28814
|
getBody() {
|
|
28798
|
-
return this.
|
|
28815
|
+
return this.getExclusive() ? `Trigger: ${this.firstMatchingBodyValue}` : "Trigger: All matching cases";
|
|
28799
28816
|
}
|
|
28800
28817
|
getEditors() {
|
|
28818
|
+
const casesEditor = {
|
|
28819
|
+
type: "stringList",
|
|
28820
|
+
dataKey: "cases",
|
|
28821
|
+
label: this.caseEditorLabel,
|
|
28822
|
+
placeholder: this.caseEditorPlaceholder,
|
|
28823
|
+
reorderable: true,
|
|
28824
|
+
portBinding: {
|
|
28825
|
+
side: "output",
|
|
28826
|
+
identity: "stored-stable-id",
|
|
28827
|
+
idDataKey: "casePortIds",
|
|
28828
|
+
legacyPortIdPattern: {
|
|
28829
|
+
kind: "prefix",
|
|
28830
|
+
prefix: "case",
|
|
28831
|
+
startIndex: 1
|
|
28832
|
+
},
|
|
28833
|
+
companionBindings: [{ side: "input", prefix: "value-" }]
|
|
28834
|
+
}
|
|
28835
|
+
};
|
|
28801
28836
|
return [
|
|
28837
|
+
...this.casesEditorPlacement === "before-trigger" ? [casesEditor] : [],
|
|
28802
28838
|
{
|
|
28803
28839
|
type: "segmented",
|
|
28804
|
-
label:
|
|
28840
|
+
label: this.triggerEditorLabel,
|
|
28805
28841
|
dataKey: "exclusive",
|
|
28806
|
-
defaultValue:
|
|
28807
|
-
options:
|
|
28808
|
-
{ value: false, label: "Trigger all matching cases" },
|
|
28809
|
-
{ value: true, label: "Trigger first only" }
|
|
28810
|
-
]
|
|
28842
|
+
defaultValue: this.defaultExclusive,
|
|
28843
|
+
options: this.matchingCasesToTriggerOptions
|
|
28811
28844
|
},
|
|
28845
|
+
...this.getEditorsAfterTrigger(),
|
|
28812
28846
|
{
|
|
28813
28847
|
type: "segmented",
|
|
28814
|
-
label:
|
|
28848
|
+
label: this.customCaseValuesEditorLabel,
|
|
28849
|
+
ariaLabel: "Custom case values",
|
|
28815
28850
|
dataKey: "valueInputMode",
|
|
28816
28851
|
defaultValue: "shared",
|
|
28852
|
+
hideIf: (data) => this.shouldHideCustomCaseValues(data),
|
|
28817
28853
|
options: [
|
|
28818
28854
|
{ value: "shared", label: "One shared custom value" },
|
|
28819
28855
|
{ value: "per-output", label: "Custom values per case" }
|
|
28820
28856
|
]
|
|
28821
28857
|
},
|
|
28822
|
-
|
|
28823
|
-
type: "stringList",
|
|
28824
|
-
dataKey: "cases",
|
|
28825
|
-
label: "Cases (regular expressions)",
|
|
28826
|
-
placeholder: "Case (regular expression)",
|
|
28827
|
-
reorderable: true,
|
|
28828
|
-
portBinding: {
|
|
28829
|
-
side: "output",
|
|
28830
|
-
identity: "stored-stable-id",
|
|
28831
|
-
idDataKey: "casePortIds",
|
|
28832
|
-
legacyPortIdPattern: {
|
|
28833
|
-
kind: "prefix",
|
|
28834
|
-
prefix: "case",
|
|
28835
|
-
startIndex: 1
|
|
28836
|
-
},
|
|
28837
|
-
companionBindings: [{ side: "input", prefix: "value-" }]
|
|
28838
|
-
}
|
|
28839
|
-
}
|
|
28858
|
+
...this.casesEditorPlacement === "after-custom-values" ? [casesEditor] : []
|
|
28840
28859
|
];
|
|
28841
28860
|
}
|
|
28842
|
-
static getUIData() {
|
|
28843
|
-
return {
|
|
28844
|
-
infoBoxBody: import_ts_dedent13.dedent`
|
|
28845
|
-
Configure any number of regular expressions, each corresponding to an output. Trigger all matched outputs by default, or choose Trigger first matching case. One shared custom value passes one optional value to every active output, while Custom values per case gives each case and Unmatched output its own optional custom value input.
|
|
28846
|
-
`,
|
|
28847
|
-
infoBoxTitle: "Regex Match Node",
|
|
28848
|
-
contextMenuTitle: "Regex Match",
|
|
28849
|
-
group: ["Logic"]
|
|
28850
|
-
};
|
|
28851
|
-
}
|
|
28852
28861
|
async process(inputs) {
|
|
28853
28862
|
const inputValue = inputs["input"];
|
|
28854
28863
|
const inputString = (inputValue == null ? void 0 : inputValue.value) == null ? void 0 : coerceType(inputValue, "string");
|
|
28855
28864
|
const portIds = this.getCasePortIds();
|
|
28856
28865
|
const sharedValue = inputs["value"];
|
|
28857
|
-
const
|
|
28866
|
+
const returnValueMode = this.getReturnValueMode();
|
|
28867
|
+
const getInputOutputValue = () => ({
|
|
28858
28868
|
type: "string",
|
|
28859
28869
|
value: inputString
|
|
28860
28870
|
});
|
|
28861
|
-
const getSharedOutputValue = () => sharedValue ??
|
|
28862
|
-
const
|
|
28863
|
-
|
|
28864
|
-
|
|
28871
|
+
const getSharedOutputValue = () => sharedValue ?? getInputOutputValue();
|
|
28872
|
+
const getConfiguredOutputValue = (customValueInputId) => {
|
|
28873
|
+
if (returnValueMode === "true") {
|
|
28874
|
+
return { type: "boolean", value: true };
|
|
28875
|
+
}
|
|
28876
|
+
if (returnValueMode === "testValue") {
|
|
28877
|
+
return getInputOutputValue();
|
|
28878
|
+
}
|
|
28879
|
+
return this.getValueInputMode() === "shared" ? getSharedOutputValue() : inputs[customValueInputId] ?? getInputOutputValue();
|
|
28880
|
+
};
|
|
28881
|
+
const getOutputValue = (portId) => getConfiguredOutputValue(this.getCaseValueInputId(portId));
|
|
28882
|
+
const getUnmatchedOutputValue = () => getConfiguredOutputValue("value-unmatched");
|
|
28865
28883
|
let matched = false;
|
|
28866
28884
|
const output = {};
|
|
28867
|
-
for (let
|
|
28868
|
-
const
|
|
28869
|
-
const
|
|
28870
|
-
|
|
28885
|
+
for (let index = 0; index < this.data.cases.length; index++) {
|
|
28886
|
+
const caseValue = this.data.cases[index];
|
|
28887
|
+
const matches = inputString !== void 0 && this.matchesCase(inputString, caseValue);
|
|
28888
|
+
const canMatch = !this.getExclusive() || !matched;
|
|
28889
|
+
const portId = portIds[index];
|
|
28890
|
+
if (matches && canMatch) {
|
|
28871
28891
|
matched = true;
|
|
28872
|
-
output[
|
|
28892
|
+
output[portId] = getOutputValue(portId);
|
|
28873
28893
|
} else {
|
|
28874
|
-
output[
|
|
28894
|
+
output[portId] = {
|
|
28875
28895
|
type: "control-flow-excluded",
|
|
28876
28896
|
value: void 0
|
|
28877
28897
|
};
|
|
28878
28898
|
}
|
|
28879
28899
|
}
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
|
|
28884
|
-
type: "control-flow-excluded",
|
|
28885
|
-
value: void 0
|
|
28886
|
-
};
|
|
28887
|
-
}
|
|
28900
|
+
output["unmatched"] = matched ? {
|
|
28901
|
+
type: "control-flow-excluded",
|
|
28902
|
+
value: void 0
|
|
28903
|
+
} : getUnmatchedOutputValue();
|
|
28888
28904
|
return output;
|
|
28889
28905
|
}
|
|
28890
28906
|
getValueInputMode() {
|
|
28891
28907
|
return this.data.valueInputMode === "per-output" ? "per-output" : "shared";
|
|
28892
28908
|
}
|
|
28909
|
+
getExclusive() {
|
|
28910
|
+
return this.data.exclusive ?? this.defaultExclusive;
|
|
28911
|
+
}
|
|
28912
|
+
getMatchingOutputDescription(caseValue, title) {
|
|
28913
|
+
const condition = this.describeCaseMatch(caseValue);
|
|
28914
|
+
if (this.getReturnValueMode() === "true") {
|
|
28915
|
+
return `True if ${condition}.`;
|
|
28916
|
+
}
|
|
28917
|
+
if (this.getReturnValueMode() === "testValue") {
|
|
28918
|
+
return `The ${this.inputTitle} value passed through if ${condition}.`;
|
|
28919
|
+
}
|
|
28920
|
+
return this.getValueInputMode() === "shared" ? `The shared ${this.sharedCustomValueInputTitle} (or ${this.inputTitle} if it is unconnected) passed through if ${condition}.` : `The corresponding ${title} custom value (or ${this.inputTitle} if it is unconnected) passed through if ${condition}.`;
|
|
28921
|
+
}
|
|
28922
|
+
getUnmatchedOutputDescription() {
|
|
28923
|
+
const condition = this.describeNoCaseMatches();
|
|
28924
|
+
if (this.getReturnValueMode() === "true") {
|
|
28925
|
+
return `True if ${condition}.`;
|
|
28926
|
+
}
|
|
28927
|
+
if (this.getReturnValueMode() === "testValue") {
|
|
28928
|
+
return `The ${this.inputTitle} value passed through if ${condition}.`;
|
|
28929
|
+
}
|
|
28930
|
+
return this.getValueInputMode() === "shared" ? `The shared ${this.sharedCustomValueInputTitle} (or ${this.inputTitle} if it is unconnected) passed through if ${condition}.` : `The Unmatched custom value (or ${this.inputTitle} if it is unconnected) passed through if ${condition}.`;
|
|
28931
|
+
}
|
|
28893
28932
|
getCasePortIds() {
|
|
28894
28933
|
return resolveStoredOrderedPortIds(this.data.cases.length, this.data.casePortIds, {
|
|
28895
28934
|
kind: "prefix",
|
|
@@ -28904,17 +28943,182 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28904
28943
|
return `value-${portId}`;
|
|
28905
28944
|
}
|
|
28906
28945
|
};
|
|
28907
|
-
var matchNode = nodeDefinition(MatchNodeImpl, "Regex Match");
|
|
28908
28946
|
|
|
28909
|
-
// src/model/nodes/
|
|
28947
|
+
// src/model/nodes/MatchNode.ts
|
|
28948
|
+
var regexMatchLegacyDisplayName = "Regex Match (legacy)";
|
|
28949
|
+
var MatchNodeImpl = class extends MatchCaseNodeBase {
|
|
28950
|
+
caseEditorLabel = "Cases (regular expressions)";
|
|
28951
|
+
caseEditorPlaceholder = "Case (regular expression)";
|
|
28952
|
+
static create() {
|
|
28953
|
+
return {
|
|
28954
|
+
type: "match",
|
|
28955
|
+
title: regexMatchLegacyDisplayName,
|
|
28956
|
+
id: (0, import_non_secure19.nanoid)(),
|
|
28957
|
+
visualData: {
|
|
28958
|
+
x: 0,
|
|
28959
|
+
y: 0,
|
|
28960
|
+
width: 250
|
|
28961
|
+
},
|
|
28962
|
+
data: {
|
|
28963
|
+
cases: ["YES", "NO"],
|
|
28964
|
+
casePortIds: [(0, import_non_secure19.nanoid)(), (0, import_non_secure19.nanoid)()],
|
|
28965
|
+
valueInputMode: "shared"
|
|
28966
|
+
}
|
|
28967
|
+
};
|
|
28968
|
+
}
|
|
28969
|
+
matchesCase(input, caseValue) {
|
|
28970
|
+
return new RegExp(caseValue).test(input);
|
|
28971
|
+
}
|
|
28972
|
+
describeCaseMatch(caseValue) {
|
|
28973
|
+
return `/${caseValue}/ matches the Test value`;
|
|
28974
|
+
}
|
|
28975
|
+
describeNoCaseMatches() {
|
|
28976
|
+
return "no regular expression matches the Test value";
|
|
28977
|
+
}
|
|
28978
|
+
static getUIData() {
|
|
28979
|
+
return {
|
|
28980
|
+
infoBoxBody: import_ts_dedent13.dedent`
|
|
28981
|
+
Legacy regex-only routing node. Existing graphs keep their current behavior.
|
|
28982
|
+
|
|
28983
|
+
For new graphs, use Match case. It supports exact plain-text cases by default and optional regular-expression matching.
|
|
28984
|
+
`,
|
|
28985
|
+
infoBoxTitle: `${regexMatchLegacyDisplayName} Node`,
|
|
28986
|
+
contextMenuTitle: regexMatchLegacyDisplayName,
|
|
28987
|
+
group: ["Logic"]
|
|
28988
|
+
};
|
|
28989
|
+
}
|
|
28990
|
+
};
|
|
28991
|
+
var matchNode = nodeDefinition(MatchNodeImpl, regexMatchLegacyDisplayName);
|
|
28992
|
+
|
|
28993
|
+
// src/model/nodes/MatchCaseNode.ts
|
|
28910
28994
|
var import_non_secure20 = require("nanoid/non-secure");
|
|
28911
28995
|
var import_ts_dedent14 = require("ts-dedent");
|
|
28996
|
+
var MatchCaseNodeImpl = class extends MatchCaseNodeBase {
|
|
28997
|
+
caseEditorLabel = "Cases";
|
|
28998
|
+
caseEditorPlaceholder = "Case";
|
|
28999
|
+
casesEditorPlacement = "before-trigger";
|
|
29000
|
+
customCaseValuesEditorLabel = "";
|
|
29001
|
+
defaultExclusive = true;
|
|
29002
|
+
firstMatchingBodyValue = "First matching case";
|
|
29003
|
+
inputTitle = "Input";
|
|
29004
|
+
matchingCasesToTriggerOptions = [
|
|
29005
|
+
{ value: true, label: "First matching case" },
|
|
29006
|
+
{ value: false, label: "All matching cases" }
|
|
29007
|
+
];
|
|
29008
|
+
sharedCustomValueInputTitle = "Return value";
|
|
29009
|
+
triggerEditorLabel = "Trigger";
|
|
29010
|
+
static create() {
|
|
29011
|
+
return {
|
|
29012
|
+
type: "matchCase",
|
|
29013
|
+
title: "Match case",
|
|
29014
|
+
id: (0, import_non_secure20.nanoid)(),
|
|
29015
|
+
visualData: {
|
|
29016
|
+
x: 0,
|
|
29017
|
+
y: 0,
|
|
29018
|
+
width: 250
|
|
29019
|
+
},
|
|
29020
|
+
data: {
|
|
29021
|
+
cases: ["YES", "NO"],
|
|
29022
|
+
casePortIds: [(0, import_non_secure20.nanoid)(), (0, import_non_secure20.nanoid)()],
|
|
29023
|
+
valueInputMode: "shared",
|
|
29024
|
+
matchMode: "plainText",
|
|
29025
|
+
caseSensitive: true,
|
|
29026
|
+
exclusive: true,
|
|
29027
|
+
returnValue: "true"
|
|
29028
|
+
}
|
|
29029
|
+
};
|
|
29030
|
+
}
|
|
29031
|
+
matchesCase(input, caseValue) {
|
|
29032
|
+
if (this.getMatchMode() === "regex") {
|
|
29033
|
+
return new RegExp(caseValue).test(input);
|
|
29034
|
+
}
|
|
29035
|
+
if (this.getCaseSensitive()) {
|
|
29036
|
+
return input === caseValue;
|
|
29037
|
+
}
|
|
29038
|
+
return input.toLowerCase() === caseValue.toLowerCase();
|
|
29039
|
+
}
|
|
29040
|
+
describeCaseMatch(caseValue) {
|
|
29041
|
+
return this.getMatchMode() === "plainText" ? this.getCaseSensitive() ? `the Input value exactly equals ${JSON.stringify(caseValue)}` : `the Input value equals ${JSON.stringify(caseValue)} without regard to case` : `/${caseValue}/ matches the Input value`;
|
|
29042
|
+
}
|
|
29043
|
+
describeNoCaseMatches() {
|
|
29044
|
+
if (this.getMatchMode() === "regex") {
|
|
29045
|
+
return "no regular expression matches the Input value";
|
|
29046
|
+
}
|
|
29047
|
+
return this.getCaseSensitive() ? "no case exactly equals the Input value" : "no case equals the Input value without regard to case";
|
|
29048
|
+
}
|
|
29049
|
+
getReturnValueMode() {
|
|
29050
|
+
return this.data.returnValue === "testValue" || this.data.returnValue === "custom" ? this.data.returnValue : "true";
|
|
29051
|
+
}
|
|
29052
|
+
getEditorsAfterTrigger() {
|
|
29053
|
+
return [
|
|
29054
|
+
{
|
|
29055
|
+
type: "segmented",
|
|
29056
|
+
label: "Output value",
|
|
29057
|
+
dataKey: "returnValue",
|
|
29058
|
+
defaultValue: "true",
|
|
29059
|
+
options: [
|
|
29060
|
+
{ value: "true", label: "True" },
|
|
29061
|
+
{ value: "testValue", label: "Input value" },
|
|
29062
|
+
{ value: "custom", label: "Custom" }
|
|
29063
|
+
]
|
|
29064
|
+
}
|
|
29065
|
+
];
|
|
29066
|
+
}
|
|
29067
|
+
shouldHideCustomCaseValues(data) {
|
|
29068
|
+
return (data.returnValue ?? "true") !== "custom";
|
|
29069
|
+
}
|
|
29070
|
+
getEditors() {
|
|
29071
|
+
return [
|
|
29072
|
+
{
|
|
29073
|
+
type: "segmented",
|
|
29074
|
+
label: "Match mode",
|
|
29075
|
+
dataKey: "matchMode",
|
|
29076
|
+
defaultValue: "plainText",
|
|
29077
|
+
options: [
|
|
29078
|
+
{ value: "plainText", label: "Plain text" },
|
|
29079
|
+
{ value: "regex", label: "Regular expression" }
|
|
29080
|
+
]
|
|
29081
|
+
},
|
|
29082
|
+
{
|
|
29083
|
+
type: "toggle",
|
|
29084
|
+
label: "Case sensitive",
|
|
29085
|
+
dataKey: "caseSensitive",
|
|
29086
|
+
defaultValue: true,
|
|
29087
|
+
hideIf: (data) => data.matchMode === "regex"
|
|
29088
|
+
},
|
|
29089
|
+
...super.getEditors()
|
|
29090
|
+
];
|
|
29091
|
+
}
|
|
29092
|
+
static getUIData() {
|
|
29093
|
+
return {
|
|
29094
|
+
infoBoxBody: import_ts_dedent14.dedent`
|
|
29095
|
+
Routes an Input value to matching case outputs. Plain text cases use exact, case-sensitive equality by default; turn off Case sensitive to ignore letter case. Choose Regular expression to use the existing JavaScript RegExp pattern behavior; the Case sensitive switch does not apply in that mode.
|
|
29096
|
+
|
|
29097
|
+
Choose First matching case to trigger only the first matching output, or All matching cases to trigger every matching output. Active outputs return True by default. They can instead return the Input value, or a custom value supplied through one shared Return value input or separate Return values inputs for every case and Unmatched.
|
|
29098
|
+
`,
|
|
29099
|
+
infoBoxTitle: "Match case Node",
|
|
29100
|
+
contextMenuTitle: "Match case",
|
|
29101
|
+
group: ["Logic"]
|
|
29102
|
+
};
|
|
29103
|
+
}
|
|
29104
|
+
getMatchMode() {
|
|
29105
|
+
return this.data.matchMode === "regex" ? "regex" : "plainText";
|
|
29106
|
+
}
|
|
29107
|
+
getCaseSensitive() {
|
|
29108
|
+
return this.data.caseSensitive !== false;
|
|
29109
|
+
}
|
|
29110
|
+
};
|
|
29111
|
+
var matchCaseNode = nodeDefinition(MatchCaseNodeImpl, "Match case");
|
|
29112
|
+
|
|
29113
|
+
// src/model/nodes/IfNode.ts
|
|
29114
|
+
var import_non_secure21 = require("nanoid/non-secure");
|
|
29115
|
+
var import_ts_dedent15 = require("ts-dedent");
|
|
28912
29116
|
var IfNodeImpl = class extends NodeImpl {
|
|
28913
29117
|
static create = () => {
|
|
28914
29118
|
const chartNode = {
|
|
28915
29119
|
type: "if",
|
|
28916
29120
|
title: "If",
|
|
28917
|
-
id: (0,
|
|
29121
|
+
id: (0, import_non_secure21.nanoid)(),
|
|
28918
29122
|
data: {
|
|
28919
29123
|
// Legacy behavior is false
|
|
28920
29124
|
unconnectedControlFlowExcluded: true
|
|
@@ -28961,7 +29165,7 @@ var IfNodeImpl = class extends NodeImpl {
|
|
|
28961
29165
|
}
|
|
28962
29166
|
static getUIData() {
|
|
28963
29167
|
return {
|
|
28964
|
-
infoBoxBody:
|
|
29168
|
+
infoBoxBody: import_ts_dedent15.dedent`
|
|
28965
29169
|
Takes in a condition and a value. If the condition is truthy, the value is passed through the True port, and the False port is not ran.
|
|
28966
29170
|
If the condition is falsy, the value is passed through the False port, and the True port is not ran.
|
|
28967
29171
|
`,
|
|
@@ -29031,8 +29235,8 @@ var IfNodeImpl = class extends NodeImpl {
|
|
|
29031
29235
|
var ifNode = nodeDefinition(IfNodeImpl, "If");
|
|
29032
29236
|
|
|
29033
29237
|
// src/model/nodes/ReadDirectoryNode.ts
|
|
29034
|
-
var
|
|
29035
|
-
var
|
|
29238
|
+
var import_non_secure22 = require("nanoid/non-secure");
|
|
29239
|
+
var import_ts_dedent16 = require("ts-dedent");
|
|
29036
29240
|
|
|
29037
29241
|
// src/utils/paths.ts
|
|
29038
29242
|
function createTreeFromPaths(paths, rootPath) {
|
|
@@ -29107,7 +29311,7 @@ function createTreeFromPaths(paths, rootPath) {
|
|
|
29107
29311
|
var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
29108
29312
|
static create() {
|
|
29109
29313
|
return {
|
|
29110
|
-
id: (0,
|
|
29314
|
+
id: (0, import_non_secure22.nanoid)(),
|
|
29111
29315
|
type: "readDirectory",
|
|
29112
29316
|
title: "Read Directory",
|
|
29113
29317
|
visualData: { x: 0, y: 0 },
|
|
@@ -29196,7 +29400,7 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29196
29400
|
];
|
|
29197
29401
|
}
|
|
29198
29402
|
getBody() {
|
|
29199
|
-
return
|
|
29403
|
+
return import_ts_dedent16.dedent`
|
|
29200
29404
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
29201
29405
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
29202
29406
|
Include Directories: ${this.data.useIncludeDirectoriesInput ? "(Input)" : this.data.includeDirectories}
|
|
@@ -29206,7 +29410,7 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29206
29410
|
}
|
|
29207
29411
|
static getUIData() {
|
|
29208
29412
|
return {
|
|
29209
|
-
infoBoxBody:
|
|
29413
|
+
infoBoxBody: import_ts_dedent16.dedent`
|
|
29210
29414
|
Reads the contents of the specified directory and outputs:
|
|
29211
29415
|
1. An array of filenames
|
|
29212
29416
|
2. The root path of the search
|
|
@@ -29262,12 +29466,12 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29262
29466
|
var readDirectoryNode = nodeDefinition(ReadDirectoryNodeImpl, "Read Directory");
|
|
29263
29467
|
|
|
29264
29468
|
// src/model/nodes/ReadFileNode.ts
|
|
29265
|
-
var
|
|
29266
|
-
var
|
|
29469
|
+
var import_non_secure23 = require("nanoid/non-secure");
|
|
29470
|
+
var import_ts_dedent17 = require("ts-dedent");
|
|
29267
29471
|
var ReadFileNodeImpl = class extends NodeImpl {
|
|
29268
29472
|
static create() {
|
|
29269
29473
|
return {
|
|
29270
|
-
id: (0,
|
|
29474
|
+
id: (0, import_non_secure23.nanoid)(),
|
|
29271
29475
|
type: "readFile",
|
|
29272
29476
|
title: "Read File",
|
|
29273
29477
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -29302,7 +29506,7 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29302
29506
|
}
|
|
29303
29507
|
static getUIData() {
|
|
29304
29508
|
return {
|
|
29305
|
-
infoBoxBody:
|
|
29509
|
+
infoBoxBody: import_ts_dedent17.dedent`
|
|
29306
29510
|
Reads the contents of the specified file and outputs it as a string.
|
|
29307
29511
|
`,
|
|
29308
29512
|
infoBoxTitle: "Read File Node",
|
|
@@ -29331,7 +29535,7 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29331
29535
|
];
|
|
29332
29536
|
}
|
|
29333
29537
|
getBody() {
|
|
29334
|
-
return
|
|
29538
|
+
return import_ts_dedent17.dedent`
|
|
29335
29539
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
29336
29540
|
${this.data.usePathInput ? "" : `Path: ${this.data.path}`}
|
|
29337
29541
|
`;
|
|
@@ -29369,14 +29573,14 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29369
29573
|
var readFileNode = nodeDefinition(ReadFileNodeImpl, "Read File");
|
|
29370
29574
|
|
|
29371
29575
|
// src/model/nodes/IfElseNode.ts
|
|
29372
|
-
var
|
|
29373
|
-
var
|
|
29576
|
+
var import_non_secure24 = require("nanoid/non-secure");
|
|
29577
|
+
var import_ts_dedent18 = require("ts-dedent");
|
|
29374
29578
|
var IfElseNodeImpl = class extends NodeImpl {
|
|
29375
29579
|
static create = () => {
|
|
29376
29580
|
const chartNode = {
|
|
29377
29581
|
type: "ifElse",
|
|
29378
29582
|
title: "If/Else",
|
|
29379
|
-
id: (0,
|
|
29583
|
+
id: (0, import_non_secure24.nanoid)(),
|
|
29380
29584
|
data: {
|
|
29381
29585
|
// Legacy behavior is false
|
|
29382
29586
|
unconnectedControlFlowExcluded: true
|
|
@@ -29423,7 +29627,7 @@ var IfElseNodeImpl = class extends NodeImpl {
|
|
|
29423
29627
|
}
|
|
29424
29628
|
static getUIData() {
|
|
29425
29629
|
return {
|
|
29426
|
-
infoBoxBody:
|
|
29630
|
+
infoBoxBody: import_ts_dedent18.dedent`
|
|
29427
29631
|
Takes in three inputs: a condition, a true value, and a false value. If the condition is truthy, the true value is passed through the output port. If the condition is not truthy, the false value is passed through the output port.
|
|
29428
29632
|
|
|
29429
29633
|
This node can "consume" a \`Not Ran\` to continue a graph from that point.
|
|
@@ -29502,14 +29706,14 @@ var IfElseNodeImpl = class extends NodeImpl {
|
|
|
29502
29706
|
var ifElseNode = nodeDefinition(IfElseNodeImpl, "If/Else");
|
|
29503
29707
|
|
|
29504
29708
|
// src/model/nodes/ChunkNode.ts
|
|
29505
|
-
var
|
|
29506
|
-
var
|
|
29709
|
+
var import_non_secure25 = require("nanoid/non-secure");
|
|
29710
|
+
var import_ts_dedent19 = require("ts-dedent");
|
|
29507
29711
|
var ChunkNodeImpl = class extends NodeImpl {
|
|
29508
29712
|
static create() {
|
|
29509
29713
|
const chartNode = {
|
|
29510
29714
|
type: "chunk",
|
|
29511
29715
|
title: "Chunk",
|
|
29512
|
-
id: (0,
|
|
29716
|
+
id: (0, import_non_secure25.nanoid)(),
|
|
29513
29717
|
visualData: {
|
|
29514
29718
|
x: 0,
|
|
29515
29719
|
y: 0,
|
|
@@ -29598,7 +29802,7 @@ var ChunkNodeImpl = class extends NodeImpl {
|
|
|
29598
29802
|
];
|
|
29599
29803
|
}
|
|
29600
29804
|
getBody() {
|
|
29601
|
-
return
|
|
29805
|
+
return import_ts_dedent19.dedent`
|
|
29602
29806
|
Model: ${this.data.model}
|
|
29603
29807
|
Token Count: ${this.data.numTokensPerChunk.toLocaleString()}
|
|
29604
29808
|
${this.data.overlap ? `Overlap: ${this.data.overlap}%` : ""}
|
|
@@ -29606,7 +29810,7 @@ var ChunkNodeImpl = class extends NodeImpl {
|
|
|
29606
29810
|
}
|
|
29607
29811
|
static getUIData() {
|
|
29608
29812
|
return {
|
|
29609
|
-
infoBoxBody:
|
|
29813
|
+
infoBoxBody: import_ts_dedent19.dedent`
|
|
29610
29814
|
Splits the input text into an array of chunks based on an approximate GPT token count per chunk.
|
|
29611
29815
|
|
|
29612
29816
|
The "overlap" setting allows you to partially overlap the chunks for redundancy.
|
|
@@ -29672,14 +29876,14 @@ async function chunkStringByTokenCount(tokenizer, tokenizerInfo, input, targetTo
|
|
|
29672
29876
|
}
|
|
29673
29877
|
|
|
29674
29878
|
// src/model/nodes/GraphInputNode.ts
|
|
29675
|
-
var
|
|
29676
|
-
var
|
|
29879
|
+
var import_non_secure26 = require("nanoid/non-secure");
|
|
29880
|
+
var import_ts_dedent20 = require("ts-dedent");
|
|
29677
29881
|
var GraphInputNodeImpl = class extends NodeImpl {
|
|
29678
29882
|
static create() {
|
|
29679
29883
|
const chartNode = {
|
|
29680
29884
|
type: "graphInput",
|
|
29681
29885
|
title: "Graph Input",
|
|
29682
|
-
id: (0,
|
|
29886
|
+
id: (0, import_non_secure26.nanoid)(),
|
|
29683
29887
|
visualData: {
|
|
29684
29888
|
x: 0,
|
|
29685
29889
|
y: 0,
|
|
@@ -29754,7 +29958,7 @@ var GraphInputNodeImpl = class extends NodeImpl {
|
|
|
29754
29958
|
];
|
|
29755
29959
|
}
|
|
29756
29960
|
getBody() {
|
|
29757
|
-
return
|
|
29961
|
+
return import_ts_dedent20.dedent`
|
|
29758
29962
|
${this.data.id}
|
|
29759
29963
|
Type: ${this.data.dataType}
|
|
29760
29964
|
${this.data.defaultValue == null ? "" : `Default: ${this.data.defaultValue}`}
|
|
@@ -29762,7 +29966,7 @@ var GraphInputNodeImpl = class extends NodeImpl {
|
|
|
29762
29966
|
}
|
|
29763
29967
|
static getUIData() {
|
|
29764
29968
|
return {
|
|
29765
|
-
infoBoxBody:
|
|
29969
|
+
infoBoxBody: import_ts_dedent20.dedent`
|
|
29766
29970
|
Defines an input for the graph which can be passed in when the graph is called, or defines one of the input ports when the graph is a subgraph.
|
|
29767
29971
|
`,
|
|
29768
29972
|
infoBoxTitle: "Graph Input Node",
|
|
@@ -29792,14 +29996,14 @@ var GraphInputNodeImpl = class extends NodeImpl {
|
|
|
29792
29996
|
var graphInputNode = nodeDefinition(GraphInputNodeImpl, "Graph Input");
|
|
29793
29997
|
|
|
29794
29998
|
// src/model/nodes/SubGraphNode.ts
|
|
29795
|
-
var
|
|
29796
|
-
var
|
|
29999
|
+
var import_non_secure27 = require("nanoid/non-secure");
|
|
30000
|
+
var import_ts_dedent21 = require("ts-dedent");
|
|
29797
30001
|
var SubGraphNodeImpl = class extends NodeImpl {
|
|
29798
30002
|
static create() {
|
|
29799
30003
|
const chartNode = {
|
|
29800
30004
|
type: "subGraph",
|
|
29801
30005
|
title: "Subgraph",
|
|
29802
|
-
id: (0,
|
|
30006
|
+
id: (0, import_non_secure27.nanoid)(),
|
|
29803
30007
|
visualData: {
|
|
29804
30008
|
x: 0,
|
|
29805
30009
|
y: 0,
|
|
@@ -29875,7 +30079,7 @@ var SubGraphNodeImpl = class extends NodeImpl {
|
|
|
29875
30079
|
}
|
|
29876
30080
|
static getUIData() {
|
|
29877
30081
|
return {
|
|
29878
|
-
infoBoxBody:
|
|
30082
|
+
infoBoxBody: import_ts_dedent21.dedent`
|
|
29879
30083
|
Executes another graph. Inputs and outputs are defined by Graph Input and Graph Output nodes within the subgraph.
|
|
29880
30084
|
`,
|
|
29881
30085
|
infoBoxTitle: "Subgraph Node",
|
|
@@ -29980,9 +30184,9 @@ function buildOptimizedSubgraphOutputs(boundary, requestedOutputIds, graphOutput
|
|
|
29980
30184
|
}
|
|
29981
30185
|
|
|
29982
30186
|
// src/model/nodes/ArrayNode.ts
|
|
29983
|
-
var
|
|
30187
|
+
var import_non_secure28 = require("nanoid/non-secure");
|
|
29984
30188
|
var import_lodash_es7 = require("lodash");
|
|
29985
|
-
var
|
|
30189
|
+
var import_ts_dedent22 = require("ts-dedent");
|
|
29986
30190
|
|
|
29987
30191
|
// src/model/nodes/variadicPortIndex.ts
|
|
29988
30192
|
function getHighestVariadicPortIndex(connections, inputNodeId, prefix, policy) {
|
|
@@ -30024,7 +30228,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30024
30228
|
const chartNode = {
|
|
30025
30229
|
type: "array",
|
|
30026
30230
|
title: "Array",
|
|
30027
|
-
id: (0,
|
|
30231
|
+
id: (0, import_non_secure28.nanoid)(),
|
|
30028
30232
|
visualData: {
|
|
30029
30233
|
x: 0,
|
|
30030
30234
|
y: 0,
|
|
@@ -30084,7 +30288,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30084
30288
|
}
|
|
30085
30289
|
static getUIData() {
|
|
30086
30290
|
return {
|
|
30087
|
-
infoBoxBody:
|
|
30291
|
+
infoBoxBody: import_ts_dedent22.dedent`
|
|
30088
30292
|
Creates an array from the input values. By default, flattens any arrays which are inputs into a single array. Can be configured to keep the arrays separate, or deeply flatten arrays.
|
|
30089
30293
|
|
|
30090
30294
|
Useful for both creating and merging arrays.
|
|
@@ -30097,7 +30301,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30097
30301
|
};
|
|
30098
30302
|
}
|
|
30099
30303
|
getBody() {
|
|
30100
|
-
return
|
|
30304
|
+
return import_ts_dedent22.dedent`
|
|
30101
30305
|
${this.data.flatten ? this.data.flattenDeep ? "Flatten (Deep)" : "Flatten" : "No Flatten"}
|
|
30102
30306
|
`;
|
|
30103
30307
|
}
|
|
@@ -30141,14 +30345,14 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30141
30345
|
var arrayNode = nodeDefinition(ArrayNodeImpl, "Array");
|
|
30142
30346
|
|
|
30143
30347
|
// src/model/nodes/ExtractJsonNode.ts
|
|
30144
|
-
var
|
|
30145
|
-
var
|
|
30348
|
+
var import_non_secure29 = require("nanoid/non-secure");
|
|
30349
|
+
var import_ts_dedent23 = require("ts-dedent");
|
|
30146
30350
|
var ExtractJsonNodeImpl = class extends NodeImpl {
|
|
30147
30351
|
static create() {
|
|
30148
30352
|
const chartNode = {
|
|
30149
30353
|
type: "extractJson",
|
|
30150
30354
|
title: "Extract JSON",
|
|
30151
|
-
id: (0,
|
|
30355
|
+
id: (0, import_non_secure29.nanoid)(),
|
|
30152
30356
|
visualData: {
|
|
30153
30357
|
x: 0,
|
|
30154
30358
|
y: 0,
|
|
@@ -30185,7 +30389,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
|
|
|
30185
30389
|
}
|
|
30186
30390
|
static getUIData() {
|
|
30187
30391
|
return {
|
|
30188
|
-
infoBoxBody:
|
|
30392
|
+
infoBoxBody: import_ts_dedent23.dedent`
|
|
30189
30393
|
Finds and parses the first JSON object in input text, or passes through an already-structured input object.
|
|
30190
30394
|
|
|
30191
30395
|
Outputs the parsed or passed-through object.
|
|
@@ -30265,15 +30469,15 @@ function createMatchedOutput(value) {
|
|
|
30265
30469
|
}
|
|
30266
30470
|
|
|
30267
30471
|
// src/model/nodes/AssemblePromptNode.ts
|
|
30268
|
-
var
|
|
30472
|
+
var import_non_secure30 = require("nanoid/non-secure");
|
|
30269
30473
|
var import_lodash_es8 = require("lodash");
|
|
30270
|
-
var
|
|
30474
|
+
var import_ts_dedent24 = require("ts-dedent");
|
|
30271
30475
|
var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
30272
30476
|
static create() {
|
|
30273
30477
|
const chartNode = {
|
|
30274
30478
|
type: "assemblePrompt",
|
|
30275
30479
|
title: "Assemble Prompt",
|
|
30276
|
-
id: (0,
|
|
30480
|
+
id: (0, import_non_secure30.nanoid)(),
|
|
30277
30481
|
visualData: {
|
|
30278
30482
|
x: 0,
|
|
30279
30483
|
y: 0,
|
|
@@ -30325,7 +30529,7 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30325
30529
|
}
|
|
30326
30530
|
static getUIData() {
|
|
30327
30531
|
return {
|
|
30328
|
-
infoBoxBody:
|
|
30532
|
+
infoBoxBody: import_ts_dedent24.dedent`
|
|
30329
30533
|
Assembles an array of chat messages for use with a Chat node. The inputs can be strings or chat messages.
|
|
30330
30534
|
|
|
30331
30535
|
The number of inputs is dynamic based on the number of connections.
|
|
@@ -30402,15 +30606,15 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30402
30606
|
var assemblePromptNode = nodeDefinition(AssemblePromptNodeImpl, "Assemble Prompt");
|
|
30403
30607
|
|
|
30404
30608
|
// src/model/nodes/ExtractYamlNode.ts
|
|
30405
|
-
var
|
|
30609
|
+
var import_non_secure31 = require("nanoid/non-secure");
|
|
30406
30610
|
var import_yaml = __toESM(require("yaml"), 1);
|
|
30407
|
-
var
|
|
30611
|
+
var import_ts_dedent25 = require("ts-dedent");
|
|
30408
30612
|
var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
30409
30613
|
static create() {
|
|
30410
30614
|
const chartNode = {
|
|
30411
30615
|
type: "extractYaml",
|
|
30412
30616
|
title: "Extract YAML",
|
|
30413
|
-
id: (0,
|
|
30617
|
+
id: (0, import_non_secure31.nanoid)(),
|
|
30414
30618
|
visualData: {
|
|
30415
30619
|
x: 0,
|
|
30416
30620
|
y: 0,
|
|
@@ -30490,14 +30694,14 @@ var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
|
30490
30694
|
];
|
|
30491
30695
|
}
|
|
30492
30696
|
getBody() {
|
|
30493
|
-
return
|
|
30697
|
+
return import_ts_dedent25.dedent`
|
|
30494
30698
|
Root: ${this.data.useRootPropertyNameInput ? "(Using Input)" : this.data.rootPropertyName}
|
|
30495
30699
|
${this.data.useObjectPathInput ? "Path: (Using Input)" : this.data.objectPath ? `Path: ${this.data.objectPath}` : ``}
|
|
30496
30700
|
`;
|
|
30497
30701
|
}
|
|
30498
30702
|
static getUIData() {
|
|
30499
30703
|
return {
|
|
30500
|
-
infoBoxBody:
|
|
30704
|
+
infoBoxBody: import_ts_dedent25.dedent`
|
|
30501
30705
|
Finds and parses a YAML object in the input text with a predefined root property name (configurable).
|
|
30502
30706
|
|
|
30503
30707
|
Defaults to \`yamlDocument\`, which means the input text must have a \`yamlDocument:\` root node somewhere in it. All indented text after that is considered part of the YAML.
|
|
@@ -30597,15 +30801,15 @@ var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
|
30597
30801
|
var extractYamlNode = nodeDefinition(ExtractYamlNodeImpl, "Extract YAML");
|
|
30598
30802
|
|
|
30599
30803
|
// src/model/nodes/LoopControllerNode.ts
|
|
30600
|
-
var
|
|
30601
|
-
var
|
|
30804
|
+
var import_non_secure32 = require("nanoid/non-secure");
|
|
30805
|
+
var import_ts_dedent26 = require("ts-dedent");
|
|
30602
30806
|
var loopControllerLegacyDisplayName = "Loop Controller (legacy)";
|
|
30603
30807
|
var LoopControllerNodeImpl = class extends NodeImpl {
|
|
30604
30808
|
static create() {
|
|
30605
30809
|
const chartNode = {
|
|
30606
30810
|
type: "loopController",
|
|
30607
30811
|
title: loopControllerLegacyDisplayName,
|
|
30608
|
-
id: (0,
|
|
30812
|
+
id: (0, import_non_secure32.nanoid)(),
|
|
30609
30813
|
visualData: {
|
|
30610
30814
|
x: 0,
|
|
30611
30815
|
y: 0,
|
|
@@ -30711,7 +30915,7 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30711
30915
|
}
|
|
30712
30916
|
static getUIData() {
|
|
30713
30917
|
return {
|
|
30714
|
-
infoBoxBody:
|
|
30918
|
+
infoBoxBody: import_ts_dedent26.dedent`
|
|
30715
30919
|
Defines the entry point for a loop. Values from inside the loop should be passed back through the "Input" ports, and their corresponding "Default" values can be specified on the input ports as well.
|
|
30716
30920
|
|
|
30717
30921
|
If the "continue" input is falsey, then the "break" output will run.
|
|
@@ -30783,14 +30987,14 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30783
30987
|
var loopControllerNode = nodeDefinition(LoopControllerNodeImpl, loopControllerLegacyDisplayName);
|
|
30784
30988
|
|
|
30785
30989
|
// src/model/nodes/TrimChatMessagesNode.ts
|
|
30786
|
-
var
|
|
30787
|
-
var
|
|
30990
|
+
var import_non_secure33 = require("nanoid/non-secure");
|
|
30991
|
+
var import_ts_dedent27 = require("ts-dedent");
|
|
30788
30992
|
var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
30789
30993
|
static create() {
|
|
30790
30994
|
const chartNode = {
|
|
30791
30995
|
type: "trimChatMessages",
|
|
30792
30996
|
title: "Trim Chat Messages",
|
|
30793
|
-
id: (0,
|
|
30997
|
+
id: (0, import_non_secure33.nanoid)(),
|
|
30794
30998
|
visualData: {
|
|
30795
30999
|
x: 0,
|
|
30796
31000
|
y: 0,
|
|
@@ -30853,14 +31057,14 @@ var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
|
30853
31057
|
];
|
|
30854
31058
|
}
|
|
30855
31059
|
getBody() {
|
|
30856
|
-
return
|
|
31060
|
+
return import_ts_dedent27.dedent`
|
|
30857
31061
|
Max Token Count: ${this.data.useMaxTokenCountInput ? "(From Input)" : this.data.maxTokenCount}
|
|
30858
31062
|
Remove From Beginning: ${this.data.useRemoveFromBeginningInput ? "(From Input)" : this.data.removeFromBeginning ? "Yes" : "No"}
|
|
30859
31063
|
`;
|
|
30860
31064
|
}
|
|
30861
31065
|
static getUIData() {
|
|
30862
31066
|
return {
|
|
30863
|
-
infoBoxBody:
|
|
31067
|
+
infoBoxBody: import_ts_dedent27.dedent`
|
|
30864
31068
|
Takes an array of chat messages, and slices messages from the beginning or the end of the list until the total length of the messages is under the configured token length.
|
|
30865
31069
|
|
|
30866
31070
|
Useful for setting up infinite message chains that stay under the LLM context limit.
|
|
@@ -30898,13 +31102,13 @@ var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
|
30898
31102
|
var trimChatMessagesNode = nodeDefinition(TrimChatMessagesNodeImpl, "Trim Chat Messages");
|
|
30899
31103
|
|
|
30900
31104
|
// src/model/nodes/ExternalCallNode.ts
|
|
30901
|
-
var
|
|
31105
|
+
var import_non_secure34 = require("nanoid/non-secure");
|
|
30902
31106
|
var import_lodash_es9 = require("lodash");
|
|
30903
|
-
var
|
|
31107
|
+
var import_ts_dedent28 = require("ts-dedent");
|
|
30904
31108
|
var ExternalCallNodeImpl = class extends NodeImpl {
|
|
30905
31109
|
static create() {
|
|
30906
31110
|
return {
|
|
30907
|
-
id: (0,
|
|
31111
|
+
id: (0, import_non_secure34.nanoid)(),
|
|
30908
31112
|
type: "externalCall",
|
|
30909
31113
|
title: "External Call",
|
|
30910
31114
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -30968,7 +31172,7 @@ var ExternalCallNodeImpl = class extends NodeImpl {
|
|
|
30968
31172
|
}
|
|
30969
31173
|
static getUIData() {
|
|
30970
31174
|
return {
|
|
30971
|
-
infoBoxBody:
|
|
31175
|
+
infoBoxBody: import_ts_dedent28.dedent`
|
|
30972
31176
|
Provides a way to call into the host project from inside a Rivet graph when Rivet graphs are integrated into another project.
|
|
30973
31177
|
`,
|
|
30974
31178
|
infoBoxTitle: "External Call Node",
|
|
@@ -31047,8 +31251,8 @@ var ExternalCallNodeImpl = class extends NodeImpl {
|
|
|
31047
31251
|
var externalCallNode = nodeDefinition(ExternalCallNodeImpl, "External Call");
|
|
31048
31252
|
|
|
31049
31253
|
// src/model/nodes/ExtractObjectPathNode.ts
|
|
31050
|
-
var
|
|
31051
|
-
var
|
|
31254
|
+
var import_non_secure35 = require("nanoid/non-secure");
|
|
31255
|
+
var import_ts_dedent29 = require("ts-dedent");
|
|
31052
31256
|
var RESERVED_INPUT_IDS = /* @__PURE__ */ new Set(["object"]);
|
|
31053
31257
|
function getExtractObjectPathInterpolationInputNames(path) {
|
|
31054
31258
|
return extractInterpolationVariables(path).filter((inputName) => !RESERVED_INPUT_IDS.has(inputName));
|
|
@@ -31075,7 +31279,7 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31075
31279
|
const chartNode = {
|
|
31076
31280
|
type: "extractObjectPath",
|
|
31077
31281
|
title: "Extract Object Path",
|
|
31078
|
-
id: (0,
|
|
31282
|
+
id: (0, import_non_secure35.nanoid)(),
|
|
31079
31283
|
visualData: {
|
|
31080
31284
|
x: 0,
|
|
31081
31285
|
y: 0,
|
|
@@ -31152,7 +31356,7 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31152
31356
|
}
|
|
31153
31357
|
static getUIData() {
|
|
31154
31358
|
return {
|
|
31155
|
-
infoBoxBody:
|
|
31359
|
+
infoBoxBody: import_ts_dedent29.dedent`
|
|
31156
31360
|
Extracts the value at the specified path from the input value. The path uses JSONPath notation to navigate through the value.
|
|
31157
31361
|
`,
|
|
31158
31362
|
infoBoxTitle: "Extract Object Path Node",
|
|
@@ -31208,12 +31412,12 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31208
31412
|
var extractObjectPathNode = nodeDefinition(ExtractObjectPathNodeImpl, "Extract Object Path");
|
|
31209
31413
|
|
|
31210
31414
|
// src/model/nodes/RaiseEventNode.ts
|
|
31211
|
-
var
|
|
31212
|
-
var
|
|
31415
|
+
var import_non_secure36 = require("nanoid/non-secure");
|
|
31416
|
+
var import_ts_dedent30 = require("ts-dedent");
|
|
31213
31417
|
var RaiseEventNodeImpl = class extends NodeImpl {
|
|
31214
31418
|
static create() {
|
|
31215
31419
|
return {
|
|
31216
|
-
id: (0,
|
|
31420
|
+
id: (0, import_non_secure36.nanoid)(),
|
|
31217
31421
|
type: "raiseEvent",
|
|
31218
31422
|
title: "Raise Event",
|
|
31219
31423
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -31263,7 +31467,7 @@ var RaiseEventNodeImpl = class extends NodeImpl {
|
|
|
31263
31467
|
}
|
|
31264
31468
|
static getUIData() {
|
|
31265
31469
|
return {
|
|
31266
|
-
infoBoxBody:
|
|
31470
|
+
infoBoxBody: import_ts_dedent30.dedent`
|
|
31267
31471
|
Raises an event that the host project or a 'Wait For Event' node can listen for.
|
|
31268
31472
|
`,
|
|
31269
31473
|
infoBoxTitle: "Raise Event Node",
|
|
@@ -31283,11 +31487,11 @@ var RaiseEventNodeImpl = class extends NodeImpl {
|
|
|
31283
31487
|
var raiseEventNode = nodeDefinition(RaiseEventNodeImpl, "Raise Event");
|
|
31284
31488
|
|
|
31285
31489
|
// src/model/nodes/ReportProgressNode.ts
|
|
31286
|
-
var
|
|
31490
|
+
var import_non_secure37 = require("nanoid/non-secure");
|
|
31287
31491
|
var ReportProgressNodeImpl = class extends NodeImpl {
|
|
31288
31492
|
static create() {
|
|
31289
31493
|
return {
|
|
31290
|
-
id: (0,
|
|
31494
|
+
id: (0, import_non_secure37.nanoid)(),
|
|
31291
31495
|
type: "reportProgress",
|
|
31292
31496
|
title: "Report Progress",
|
|
31293
31497
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -31331,14 +31535,14 @@ var ReportProgressNodeImpl = class extends NodeImpl {
|
|
|
31331
31535
|
var reportProgressNode = nodeDefinition(ReportProgressNodeImpl, "Report Progress");
|
|
31332
31536
|
|
|
31333
31537
|
// src/model/nodes/ContextNode.ts
|
|
31334
|
-
var
|
|
31335
|
-
var
|
|
31538
|
+
var import_non_secure38 = require("nanoid/non-secure");
|
|
31539
|
+
var import_ts_dedent31 = require("ts-dedent");
|
|
31336
31540
|
var ContextNodeImpl = class extends NodeImpl {
|
|
31337
31541
|
static create() {
|
|
31338
31542
|
const chartNode = {
|
|
31339
31543
|
type: "context",
|
|
31340
31544
|
title: "Context",
|
|
31341
|
-
id: (0,
|
|
31545
|
+
id: (0, import_non_secure38.nanoid)(),
|
|
31342
31546
|
visualData: {
|
|
31343
31547
|
x: 0,
|
|
31344
31548
|
y: 0,
|
|
@@ -31387,14 +31591,14 @@ var ContextNodeImpl = class extends NodeImpl {
|
|
|
31387
31591
|
];
|
|
31388
31592
|
}
|
|
31389
31593
|
getBody() {
|
|
31390
|
-
return
|
|
31594
|
+
return import_ts_dedent31.dedent`
|
|
31391
31595
|
${this.data.id}
|
|
31392
31596
|
Type: ${this.data.dataType}
|
|
31393
31597
|
`;
|
|
31394
31598
|
}
|
|
31395
31599
|
static getUIData() {
|
|
31396
31600
|
return {
|
|
31397
|
-
infoBoxBody:
|
|
31601
|
+
infoBoxBody: import_ts_dedent31.dedent`
|
|
31398
31602
|
Retrieves a value from the graph's context using a configured id. The context serves as a "global graph input", allowing the same values to be accessible from any graph or subgraph.
|
|
31399
31603
|
`,
|
|
31400
31604
|
infoBoxTitle: "Context Node",
|
|
@@ -31473,10 +31677,10 @@ var GraphCallPathNodeImpl = class extends NodeImpl {
|
|
|
31473
31677
|
var graphCallPathNode = nodeDefinition(GraphCallPathNodeImpl, "Graph Call Path");
|
|
31474
31678
|
|
|
31475
31679
|
// src/model/nodes/CoalesceNode.ts
|
|
31476
|
-
var
|
|
31680
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
31477
31681
|
|
|
31478
31682
|
// src/model/nodes/CoalesceNodeBase.ts
|
|
31479
|
-
var
|
|
31683
|
+
var import_non_secure39 = require("nanoid/non-secure");
|
|
31480
31684
|
var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
|
|
31481
31685
|
var IGNORE_NULL_LABEL = "Ignore 'null'";
|
|
31482
31686
|
var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
|
|
@@ -31484,7 +31688,7 @@ function createCoalesceNode(type, title) {
|
|
|
31484
31688
|
return {
|
|
31485
31689
|
type,
|
|
31486
31690
|
title,
|
|
31487
|
-
id: (0,
|
|
31691
|
+
id: (0, import_non_secure39.nanoid)(),
|
|
31488
31692
|
data: {
|
|
31489
31693
|
ignoreNull: false,
|
|
31490
31694
|
ignoreUndefined: false
|
|
@@ -31606,8 +31810,8 @@ var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
|
31606
31810
|
static create = () => createCoalesceNode("coalesce", coalesceLegacyDisplayName);
|
|
31607
31811
|
static getUIData() {
|
|
31608
31812
|
return {
|
|
31609
|
-
infoBoxBody:
|
|
31610
|
-
Legacy Coalesce node. Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31813
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
31814
|
+
Legacy Coalesce node. Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match case node.
|
|
31611
31815
|
|
|
31612
31816
|
Its Conditional input can exclude the node itself. New graphs should use Coalesce instead, which has the same fallback behavior without that port.
|
|
31613
31817
|
`,
|
|
@@ -31620,14 +31824,14 @@ var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
|
31620
31824
|
var coalesceNode = nodeDefinition(CoalesceNodeImpl, coalesceLegacyDisplayName);
|
|
31621
31825
|
|
|
31622
31826
|
// src/model/nodes/CoalesceNewNode.ts
|
|
31623
|
-
var
|
|
31827
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
31624
31828
|
var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
31625
31829
|
includesLegacyConditionalInput = false;
|
|
31626
31830
|
static create = () => createCoalesceNode("coalesceNew", "Coalesce");
|
|
31627
31831
|
static getUIData() {
|
|
31628
31832
|
return {
|
|
31629
|
-
infoBoxBody:
|
|
31630
|
-
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match node.
|
|
31833
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
31834
|
+
Takes in any number of inputs and outputs the first value that is not "Not Ran". Useful for consolidating branches after a Match case node.
|
|
31631
31835
|
|
|
31632
31836
|
Null and undefined input values are emitted by default, but the node can be configured to skip either value and continue checking later inputs.
|
|
31633
31837
|
`,
|
|
@@ -31640,14 +31844,14 @@ var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
|
31640
31844
|
var coalesceNewNode = nodeDefinition(CoalesceNewNodeImpl, "Coalesce");
|
|
31641
31845
|
|
|
31642
31846
|
// src/model/nodes/DidRunNode.ts
|
|
31643
|
-
var
|
|
31847
|
+
var import_non_secure40 = require("nanoid/non-secure");
|
|
31644
31848
|
var DID_RUN_EXPLANATION = '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.';
|
|
31645
31849
|
var DidRunNodeImpl = class extends NodeImpl {
|
|
31646
31850
|
static create() {
|
|
31647
31851
|
return {
|
|
31648
31852
|
type: "didRun",
|
|
31649
31853
|
title: "Did Run",
|
|
31650
|
-
id: (0,
|
|
31854
|
+
id: (0, import_non_secure40.nanoid)(),
|
|
31651
31855
|
data: {},
|
|
31652
31856
|
visualData: {
|
|
31653
31857
|
x: 0,
|
|
@@ -31715,8 +31919,8 @@ var DidRunNodeImpl = class extends NodeImpl {
|
|
|
31715
31919
|
var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
31716
31920
|
|
|
31717
31921
|
// src/model/nodes/PassthroughNode.ts
|
|
31718
|
-
var
|
|
31719
|
-
var
|
|
31922
|
+
var import_non_secure41 = require("nanoid/non-secure");
|
|
31923
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
31720
31924
|
var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
|
|
31721
31925
|
var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
|
|
31722
31926
|
var MAX_PASSTHROUGH_PORT_INDEX = 1e4;
|
|
@@ -31739,7 +31943,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31739
31943
|
const chartNode = {
|
|
31740
31944
|
type: "passthrough",
|
|
31741
31945
|
title: "Passthrough",
|
|
31742
|
-
id: (0,
|
|
31946
|
+
id: (0, import_non_secure41.nanoid)(),
|
|
31743
31947
|
data: {},
|
|
31744
31948
|
visualData: {
|
|
31745
31949
|
x: 0,
|
|
@@ -31778,7 +31982,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31778
31982
|
}
|
|
31779
31983
|
static getUIData() {
|
|
31780
31984
|
return {
|
|
31781
|
-
infoBoxBody:
|
|
31985
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
31782
31986
|
Simply passes the input value to the output without any modifications.
|
|
31783
31987
|
`,
|
|
31784
31988
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -31800,8 +32004,8 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31800
32004
|
var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
31801
32005
|
|
|
31802
32006
|
// src/model/nodes/DataBusNode.ts
|
|
31803
|
-
var
|
|
31804
|
-
var
|
|
32007
|
+
var import_non_secure42 = require("nanoid/non-secure");
|
|
32008
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
31805
32009
|
function getConnectedChannelIndices(connections, nodeId) {
|
|
31806
32010
|
const channelIndices = /* @__PURE__ */ new Set();
|
|
31807
32011
|
for (const connection of connections) {
|
|
@@ -31833,7 +32037,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31833
32037
|
static create = () => ({
|
|
31834
32038
|
type: "dataBus",
|
|
31835
32039
|
title: "Data Bus",
|
|
31836
|
-
id: (0,
|
|
32040
|
+
id: (0, import_non_secure42.nanoid)(),
|
|
31837
32041
|
data: {},
|
|
31838
32042
|
visualData: {
|
|
31839
32043
|
x: 0,
|
|
@@ -31861,7 +32065,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31861
32065
|
}
|
|
31862
32066
|
static getUIData() {
|
|
31863
32067
|
return {
|
|
31864
|
-
infoBoxBody:
|
|
32068
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
31865
32069
|
Organizes independent connections in a compact rail at the top of the
|
|
31866
32070
|
canvas. Data Bus channels are wiring topology, not executable nodes.
|
|
31867
32071
|
`,
|
|
@@ -31877,13 +32081,13 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31877
32081
|
var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
|
|
31878
32082
|
|
|
31879
32083
|
// src/model/nodes/StartBackgroundBranchNode.ts
|
|
31880
|
-
var
|
|
31881
|
-
var
|
|
32084
|
+
var import_non_secure43 = require("nanoid/non-secure");
|
|
32085
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
31882
32086
|
var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
31883
32087
|
static create = () => ({
|
|
31884
32088
|
type: "startBackgroundBranch",
|
|
31885
32089
|
title: "Start Async Branch",
|
|
31886
|
-
id: (0,
|
|
32090
|
+
id: (0, import_non_secure43.nanoid)(),
|
|
31887
32091
|
data: {},
|
|
31888
32092
|
visualData: {
|
|
31889
32093
|
x: 0,
|
|
@@ -31909,7 +32113,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31909
32113
|
}
|
|
31910
32114
|
static getUIData() {
|
|
31911
32115
|
return {
|
|
31912
|
-
infoBoxBody:
|
|
32116
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
31913
32117
|
Starts its downstream branch asynchronously. The foreground graph continues immediately, while the root run waits for the async branch before it ends.
|
|
31914
32118
|
`,
|
|
31915
32119
|
infoBoxTitle: "Start Async Branch Node",
|
|
@@ -31934,8 +32138,8 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31934
32138
|
var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "Start Async Branch");
|
|
31935
32139
|
|
|
31936
32140
|
// src/model/nodes/WatchStreamingOutputNode.ts
|
|
31937
|
-
var
|
|
31938
|
-
var
|
|
32141
|
+
var import_non_secure44 = require("nanoid/non-secure");
|
|
32142
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
31939
32143
|
var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31940
32144
|
static create() {
|
|
31941
32145
|
return {
|
|
@@ -31947,7 +32151,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31947
32151
|
maxQueuedUpdates: streamingOutputWatchDefaults.maxQueuedUpdates,
|
|
31948
32152
|
queueOverflowBehavior: streamingOutputWatchDefaults.queueOverflowBehavior
|
|
31949
32153
|
},
|
|
31950
|
-
id: (0,
|
|
32154
|
+
id: (0, import_non_secure44.nanoid)(),
|
|
31951
32155
|
title: "Watch Streaming Output",
|
|
31952
32156
|
type: "watchStreamingOutput",
|
|
31953
32157
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -31974,7 +32178,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31974
32178
|
contextMenuTitle: "Watch Streaming Output",
|
|
31975
32179
|
group: ["Logic"],
|
|
31976
32180
|
infoBoxTitle: "Watch Streaming Output Node",
|
|
31977
|
-
infoBoxBody:
|
|
32181
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
31978
32182
|
Runs its downstream branch for streaming output snapshots. Without Stop Watching
|
|
31979
32183
|
Streaming Output, every snapshot runs the branch and the watch finishes with its
|
|
31980
32184
|
producer. Add one Stop node only when a chosen value must continue through the
|
|
@@ -32057,13 +32261,13 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
32057
32261
|
var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Watch Streaming Output");
|
|
32058
32262
|
|
|
32059
32263
|
// src/model/nodes/StopWatchingStreamingOutputNode.ts
|
|
32060
|
-
var
|
|
32061
|
-
var
|
|
32264
|
+
var import_non_secure45 = require("nanoid/non-secure");
|
|
32265
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
32062
32266
|
var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
32063
32267
|
static create() {
|
|
32064
32268
|
return {
|
|
32065
32269
|
data: {},
|
|
32066
|
-
id: (0,
|
|
32270
|
+
id: (0, import_non_secure45.nanoid)(),
|
|
32067
32271
|
title: "Stop Watching Streaming Output",
|
|
32068
32272
|
type: "stopWatchingStreamingOutput",
|
|
32069
32273
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -32080,7 +32284,7 @@ var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
32080
32284
|
contextMenuTitle: "Stop Watching Streaming Output",
|
|
32081
32285
|
group: ["Logic"],
|
|
32082
32286
|
infoBoxTitle: "Stop Watching Streaming Output Node",
|
|
32083
|
-
infoBoxBody:
|
|
32287
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
32084
32288
|
Accepts a value from a Watch Streaming Output branch, stops future streaming
|
|
32085
32289
|
snapshots, and lets its completed output continue through the ordinary graph.
|
|
32086
32290
|
In parallel mode, the first completed branch to reach this node wins.
|
|
@@ -32110,14 +32314,14 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
|
|
|
32110
32314
|
);
|
|
32111
32315
|
|
|
32112
32316
|
// src/model/nodes/PopNode.ts
|
|
32113
|
-
var
|
|
32114
|
-
var
|
|
32317
|
+
var import_non_secure46 = require("nanoid/non-secure");
|
|
32318
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
32115
32319
|
var PopNodeImpl = class extends NodeImpl {
|
|
32116
32320
|
static create() {
|
|
32117
32321
|
const baseNode = {
|
|
32118
32322
|
type: "pop",
|
|
32119
32323
|
title: "Pop",
|
|
32120
|
-
id: (0,
|
|
32324
|
+
id: (0, import_non_secure46.nanoid)(),
|
|
32121
32325
|
visualData: {
|
|
32122
32326
|
x: 0,
|
|
32123
32327
|
y: 0,
|
|
@@ -32162,7 +32366,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
32162
32366
|
}
|
|
32163
32367
|
static getUIData() {
|
|
32164
32368
|
return {
|
|
32165
|
-
infoBoxBody:
|
|
32369
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
32166
32370
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
32167
32371
|
|
|
32168
32372
|
Can also be used to just extract the last value from an array.
|
|
@@ -32198,14 +32402,14 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
32198
32402
|
var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
32199
32403
|
|
|
32200
32404
|
// src/model/nodes/SetGlobalNode.ts
|
|
32201
|
-
var
|
|
32202
|
-
var
|
|
32405
|
+
var import_non_secure47 = require("nanoid/non-secure");
|
|
32406
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
32203
32407
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
32204
32408
|
static create() {
|
|
32205
32409
|
const chartNode = {
|
|
32206
32410
|
type: "setGlobal",
|
|
32207
32411
|
title: "Set Global",
|
|
32208
|
-
id: (0,
|
|
32412
|
+
id: (0, import_non_secure47.nanoid)(),
|
|
32209
32413
|
visualData: {
|
|
32210
32414
|
x: 0,
|
|
32211
32415
|
y: 0,
|
|
@@ -32273,14 +32477,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32273
32477
|
];
|
|
32274
32478
|
}
|
|
32275
32479
|
getBody() {
|
|
32276
|
-
return
|
|
32480
|
+
return import_ts_dedent40.dedent`
|
|
32277
32481
|
${this.data.id}
|
|
32278
32482
|
Type: ${this.data.dataType}
|
|
32279
32483
|
`;
|
|
32280
32484
|
}
|
|
32281
32485
|
static getUIData() {
|
|
32282
32486
|
return {
|
|
32283
|
-
infoBoxBody:
|
|
32487
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
32284
32488
|
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.
|
|
32285
32489
|
`,
|
|
32286
32490
|
infoBoxTitle: "Set Global Node",
|
|
@@ -32316,14 +32520,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32316
32520
|
var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
32317
32521
|
|
|
32318
32522
|
// src/model/nodes/GetGlobalNode.ts
|
|
32319
|
-
var
|
|
32320
|
-
var
|
|
32523
|
+
var import_non_secure48 = require("nanoid/non-secure");
|
|
32524
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
32321
32525
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
32322
32526
|
static create() {
|
|
32323
32527
|
const chartNode = {
|
|
32324
32528
|
type: "getGlobal",
|
|
32325
32529
|
title: "Get Global",
|
|
32326
|
-
id: (0,
|
|
32530
|
+
id: (0, import_non_secure48.nanoid)(),
|
|
32327
32531
|
visualData: {
|
|
32328
32532
|
x: 0,
|
|
32329
32533
|
y: 0,
|
|
@@ -32397,7 +32601,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32397
32601
|
];
|
|
32398
32602
|
}
|
|
32399
32603
|
getBody() {
|
|
32400
|
-
return
|
|
32604
|
+
return import_ts_dedent41.dedent`
|
|
32401
32605
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
32402
32606
|
Type: ${this.data.dataType}
|
|
32403
32607
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -32405,7 +32609,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32405
32609
|
}
|
|
32406
32610
|
static getUIData() {
|
|
32407
32611
|
return {
|
|
32408
|
-
infoBoxBody:
|
|
32612
|
+
infoBoxBody: import_ts_dedent41.dedent`
|
|
32409
32613
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
32410
32614
|
`,
|
|
32411
32615
|
infoBoxTitle: "Get Global Node",
|
|
@@ -32450,8 +32654,8 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32450
32654
|
var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
32451
32655
|
|
|
32452
32656
|
// src/model/nodes/SetStoredValueNode.ts
|
|
32453
|
-
var
|
|
32454
|
-
var
|
|
32657
|
+
var import_non_secure49 = require("nanoid/non-secure");
|
|
32658
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
32455
32659
|
|
|
32456
32660
|
// src/model/nodes/StoredValueNodeUtils.ts
|
|
32457
32661
|
var portableStoredValueScalarTypes = [
|
|
@@ -32515,7 +32719,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32515
32719
|
return {
|
|
32516
32720
|
type: "setStoredValue",
|
|
32517
32721
|
title: "Set Stored Value",
|
|
32518
|
-
id: (0,
|
|
32722
|
+
id: (0, import_non_secure49.nanoid)(),
|
|
32519
32723
|
visualData: { x: 0, y: 0, width: 220 },
|
|
32520
32724
|
data: { dataType: "string", key: "key", useKeyInput: false }
|
|
32521
32725
|
};
|
|
@@ -32554,7 +32758,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32554
32758
|
];
|
|
32555
32759
|
}
|
|
32556
32760
|
getBody() {
|
|
32557
|
-
return
|
|
32761
|
+
return import_ts_dedent42.dedent`
|
|
32558
32762
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32559
32763
|
Type: ${this.data.dataType}
|
|
32560
32764
|
`;
|
|
@@ -32585,14 +32789,14 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32585
32789
|
var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Value");
|
|
32586
32790
|
|
|
32587
32791
|
// src/model/nodes/GetStoredValueNode.ts
|
|
32588
|
-
var
|
|
32589
|
-
var
|
|
32792
|
+
var import_non_secure50 = require("nanoid/non-secure");
|
|
32793
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
32590
32794
|
var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
32591
32795
|
static create() {
|
|
32592
32796
|
return {
|
|
32593
32797
|
type: "getStoredValue",
|
|
32594
32798
|
title: "Get Stored Value",
|
|
32595
|
-
id: (0,
|
|
32799
|
+
id: (0, import_non_secure50.nanoid)(),
|
|
32596
32800
|
visualData: { x: 0, y: 0, width: 220 },
|
|
32597
32801
|
data: { dataType: "string", key: "key", onDemand: false, useKeyInput: false, wait: false }
|
|
32598
32802
|
};
|
|
@@ -32647,7 +32851,7 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32647
32851
|
];
|
|
32648
32852
|
}
|
|
32649
32853
|
getBody() {
|
|
32650
|
-
return
|
|
32854
|
+
return import_ts_dedent43.dedent`
|
|
32651
32855
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32652
32856
|
Type: ${this.data.dataType}
|
|
32653
32857
|
${this.data.wait ? "Waits for an in-run Set" : ""}
|
|
@@ -32685,12 +32889,12 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32685
32889
|
var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Value");
|
|
32686
32890
|
|
|
32687
32891
|
// src/model/nodes/WaitForEventNode.ts
|
|
32688
|
-
var
|
|
32689
|
-
var
|
|
32892
|
+
var import_non_secure51 = require("nanoid/non-secure");
|
|
32893
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
32690
32894
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
32691
32895
|
static create() {
|
|
32692
32896
|
return {
|
|
32693
|
-
id: (0,
|
|
32897
|
+
id: (0, import_non_secure51.nanoid)(),
|
|
32694
32898
|
type: "waitForEvent",
|
|
32695
32899
|
title: "Wait For Event",
|
|
32696
32900
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -32745,7 +32949,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32745
32949
|
}
|
|
32746
32950
|
static getUIData() {
|
|
32747
32951
|
return {
|
|
32748
|
-
infoBoxBody:
|
|
32952
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
32749
32953
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
32750
32954
|
`,
|
|
32751
32955
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -32765,8 +32969,8 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32765
32969
|
var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
32766
32970
|
|
|
32767
32971
|
// src/model/nodes/ToolNode.ts
|
|
32768
|
-
var
|
|
32769
|
-
var
|
|
32972
|
+
var import_non_secure52 = require("nanoid/non-secure");
|
|
32973
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
32770
32974
|
var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
|
|
32771
32975
|
function getToolNodeBodyPreview(data) {
|
|
32772
32976
|
const [name = "", ...descriptionLines] = buildNodeBodyPreview(
|
|
@@ -32784,7 +32988,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32784
32988
|
const chartNode = {
|
|
32785
32989
|
type: "gptFunction",
|
|
32786
32990
|
title: "Tool",
|
|
32787
|
-
id: (0,
|
|
32991
|
+
id: (0, import_non_secure52.nanoid)(),
|
|
32788
32992
|
visualData: {
|
|
32789
32993
|
x: 0,
|
|
32790
32994
|
y: 0,
|
|
@@ -32794,7 +32998,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32794
32998
|
name: "newTool",
|
|
32795
32999
|
description: "No description provided",
|
|
32796
33000
|
resultHandling: "continue",
|
|
32797
|
-
schema:
|
|
33001
|
+
schema: import_ts_dedent45.dedent`
|
|
32798
33002
|
{
|
|
32799
33003
|
"type": "object",
|
|
32800
33004
|
"properties": {}
|
|
@@ -32921,7 +33125,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32921
33125
|
}
|
|
32922
33126
|
static getUIData() {
|
|
32923
33127
|
return {
|
|
32924
|
-
infoBoxBody:
|
|
33128
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
32925
33129
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
32926
33130
|
`,
|
|
32927
33131
|
infoBoxTitle: "Tool Node",
|
|
@@ -32974,15 +33178,15 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32974
33178
|
var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
32975
33179
|
|
|
32976
33180
|
// src/model/nodes/ToYamlNode.ts
|
|
32977
|
-
var
|
|
33181
|
+
var import_non_secure53 = require("nanoid/non-secure");
|
|
32978
33182
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
32979
|
-
var
|
|
33183
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
32980
33184
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
32981
33185
|
static create() {
|
|
32982
33186
|
const chartNode = {
|
|
32983
33187
|
type: "toYaml",
|
|
32984
33188
|
title: "To YAML",
|
|
32985
|
-
id: (0,
|
|
33189
|
+
id: (0, import_non_secure53.nanoid)(),
|
|
32986
33190
|
visualData: {
|
|
32987
33191
|
x: 0,
|
|
32988
33192
|
y: 0,
|
|
@@ -33013,7 +33217,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
33013
33217
|
}
|
|
33014
33218
|
static getUIData() {
|
|
33015
33219
|
return {
|
|
33016
|
-
infoBoxBody:
|
|
33220
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
33017
33221
|
Turns the input object into YAML text.
|
|
33018
33222
|
`,
|
|
33019
33223
|
infoBoxTitle: "To YAML Node",
|
|
@@ -33038,8 +33242,8 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
33038
33242
|
var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
33039
33243
|
|
|
33040
33244
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
33041
|
-
var
|
|
33042
|
-
var
|
|
33245
|
+
var import_non_secure54 = require("nanoid/non-secure");
|
|
33246
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
33043
33247
|
|
|
33044
33248
|
// src/integrations/integrations.ts
|
|
33045
33249
|
var registeredIntegrations = {
|
|
@@ -33062,7 +33266,7 @@ function getIntegration(type, integrationKey, context) {
|
|
|
33062
33266
|
var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
33063
33267
|
static create() {
|
|
33064
33268
|
return {
|
|
33065
|
-
id: (0,
|
|
33269
|
+
id: (0, import_non_secure54.nanoid)(),
|
|
33066
33270
|
type: "getEmbedding",
|
|
33067
33271
|
title: "Get Embedding",
|
|
33068
33272
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33146,7 +33350,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
33146
33350
|
}
|
|
33147
33351
|
static getUIData() {
|
|
33148
33352
|
return {
|
|
33149
|
-
infoBoxBody:
|
|
33353
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
33150
33354
|
Gets a OpenAI vector embedding for the input text provided.
|
|
33151
33355
|
|
|
33152
33356
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -33177,12 +33381,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
33177
33381
|
var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
33178
33382
|
|
|
33179
33383
|
// src/model/nodes/VectorStoreNode.ts
|
|
33180
|
-
var
|
|
33181
|
-
var
|
|
33384
|
+
var import_non_secure55 = require("nanoid/non-secure");
|
|
33385
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
33182
33386
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
33183
33387
|
static create() {
|
|
33184
33388
|
return {
|
|
33185
|
-
id: (0,
|
|
33389
|
+
id: (0, import_non_secure55.nanoid)(),
|
|
33186
33390
|
type: "vectorStore",
|
|
33187
33391
|
title: "Vector Store",
|
|
33188
33392
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -33258,14 +33462,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33258
33462
|
];
|
|
33259
33463
|
}
|
|
33260
33464
|
getBody() {
|
|
33261
|
-
return
|
|
33465
|
+
return import_ts_dedent48.dedent`
|
|
33262
33466
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33263
33467
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
33264
33468
|
`;
|
|
33265
33469
|
}
|
|
33266
33470
|
static getUIData() {
|
|
33267
33471
|
return {
|
|
33268
|
-
infoBoxBody:
|
|
33472
|
+
infoBoxBody: import_ts_dedent48.dedent`
|
|
33269
33473
|
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.
|
|
33270
33474
|
`,
|
|
33271
33475
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -33300,12 +33504,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33300
33504
|
var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
33301
33505
|
|
|
33302
33506
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
33303
|
-
var
|
|
33304
|
-
var
|
|
33507
|
+
var import_non_secure56 = require("nanoid/non-secure");
|
|
33508
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
33305
33509
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
33306
33510
|
static create() {
|
|
33307
33511
|
return {
|
|
33308
|
-
id: (0,
|
|
33512
|
+
id: (0, import_non_secure56.nanoid)(),
|
|
33309
33513
|
type: "vectorNearestNeighbors",
|
|
33310
33514
|
title: "Vector KNN",
|
|
33311
33515
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -33388,7 +33592,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33388
33592
|
];
|
|
33389
33593
|
}
|
|
33390
33594
|
getBody() {
|
|
33391
|
-
return
|
|
33595
|
+
return import_ts_dedent49.dedent`
|
|
33392
33596
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33393
33597
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
33394
33598
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -33396,7 +33600,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33396
33600
|
}
|
|
33397
33601
|
static getUIData() {
|
|
33398
33602
|
return {
|
|
33399
|
-
infoBoxBody:
|
|
33603
|
+
infoBoxBody: import_ts_dedent49.dedent`
|
|
33400
33604
|
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.
|
|
33401
33605
|
`,
|
|
33402
33606
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -33426,12 +33630,12 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33426
33630
|
var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
|
|
33427
33631
|
|
|
33428
33632
|
// src/model/nodes/KnowledgeSourceNode.ts
|
|
33429
|
-
var
|
|
33430
|
-
var
|
|
33633
|
+
var import_non_secure57 = require("nanoid/non-secure");
|
|
33634
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
33431
33635
|
var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33432
33636
|
static create() {
|
|
33433
33637
|
return {
|
|
33434
|
-
id: (0,
|
|
33638
|
+
id: (0, import_non_secure57.nanoid)(),
|
|
33435
33639
|
type: "knowledgeSource",
|
|
33436
33640
|
title: "Knowledge Source",
|
|
33437
33641
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33490,7 +33694,7 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33490
33694
|
getBody(context) {
|
|
33491
33695
|
var _a;
|
|
33492
33696
|
const connection = (_a = context.project.metadata.knowledgeStores) == null ? void 0 : _a[this.data.connectionId];
|
|
33493
|
-
return
|
|
33697
|
+
return import_ts_dedent50.dedent`
|
|
33494
33698
|
Store: ${this.data.useConnectionIdInput ? "(from input)" : ((connection == null ? void 0 : connection.displayName) ?? this.data.connectionId) || "(not selected)"}
|
|
33495
33699
|
Source: ${this.data.useSourceIdInput ? "(from input)" : this.data.sourceId || "(not set)"}
|
|
33496
33700
|
${this.data.useVersionInput || this.data.version ? "Exact version configured" : "Uses active version"}
|
|
@@ -33523,12 +33727,12 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33523
33727
|
var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Source");
|
|
33524
33728
|
|
|
33525
33729
|
// src/model/nodes/KnowledgeDocumentNode.ts
|
|
33526
|
-
var
|
|
33527
|
-
var
|
|
33730
|
+
var import_non_secure58 = require("nanoid/non-secure");
|
|
33731
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
33528
33732
|
var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
33529
33733
|
static create() {
|
|
33530
33734
|
return {
|
|
33531
|
-
id: (0,
|
|
33735
|
+
id: (0, import_non_secure58.nanoid)(),
|
|
33532
33736
|
type: "knowledgeDocument",
|
|
33533
33737
|
title: "Knowledge Document",
|
|
33534
33738
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33579,7 +33783,7 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33579
33783
|
];
|
|
33580
33784
|
}
|
|
33581
33785
|
getBody() {
|
|
33582
|
-
return
|
|
33786
|
+
return import_ts_dedent51.dedent`
|
|
33583
33787
|
${this.data.useTextInput ? "Text from input" : `${this.data.text.length} characters`}
|
|
33584
33788
|
${this.data.useDocumentIdInput ? "ID from input" : this.data.documentId ? `ID: ${this.data.documentId}` : "ID generated from content"}
|
|
33585
33789
|
`;
|
|
@@ -33605,12 +33809,12 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33605
33809
|
var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge Document");
|
|
33606
33810
|
|
|
33607
33811
|
// src/model/nodes/SyncKnowledgeSourceNode.ts
|
|
33608
|
-
var
|
|
33609
|
-
var
|
|
33812
|
+
var import_non_secure59 = require("nanoid/non-secure");
|
|
33813
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
33610
33814
|
var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33611
33815
|
static create() {
|
|
33612
33816
|
return {
|
|
33613
|
-
id: (0,
|
|
33817
|
+
id: (0, import_non_secure59.nanoid)(),
|
|
33614
33818
|
type: "syncKnowledgeSource",
|
|
33615
33819
|
title: "Sync Knowledge Source",
|
|
33616
33820
|
visualData: { x: 0, y: 0, width: 290 },
|
|
@@ -33684,7 +33888,7 @@ var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33684
33888
|
];
|
|
33685
33889
|
}
|
|
33686
33890
|
getBody() {
|
|
33687
|
-
return
|
|
33891
|
+
return import_ts_dedent52.dedent`
|
|
33688
33892
|
${this.data.targetSize} ${this.data.chunkUnit}
|
|
33689
33893
|
${this.data.overlap} overlap
|
|
33690
33894
|
${this.data.includeTitle ? "Includes titles" : "Content only"}
|
|
@@ -33750,11 +33954,11 @@ function normalizeDocumentsInput(value) {
|
|
|
33750
33954
|
var syncKnowledgeSourceNode = nodeDefinition(SyncKnowledgeSourceNodeImpl, "Sync Knowledge Source");
|
|
33751
33955
|
|
|
33752
33956
|
// src/model/nodes/GetKnowledgeSourceStatusNode.ts
|
|
33753
|
-
var
|
|
33957
|
+
var import_non_secure60 = require("nanoid/non-secure");
|
|
33754
33958
|
var GetKnowledgeSourceStatusNodeImpl = class extends NodeImpl {
|
|
33755
33959
|
static create() {
|
|
33756
33960
|
return {
|
|
33757
|
-
id: (0,
|
|
33961
|
+
id: (0, import_non_secure60.nanoid)(),
|
|
33758
33962
|
type: "getKnowledgeSourceStatus",
|
|
33759
33963
|
title: "Get Knowledge Source Status",
|
|
33760
33964
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -33833,12 +34037,12 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
|
|
|
33833
34037
|
);
|
|
33834
34038
|
|
|
33835
34039
|
// src/model/nodes/SearchKnowledgeNode.ts
|
|
33836
|
-
var
|
|
33837
|
-
var
|
|
34040
|
+
var import_non_secure61 = require("nanoid/non-secure");
|
|
34041
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
33838
34042
|
var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
33839
34043
|
static create() {
|
|
33840
34044
|
return {
|
|
33841
|
-
id: (0,
|
|
34045
|
+
id: (0, import_non_secure61.nanoid)(),
|
|
33842
34046
|
type: "searchKnowledge",
|
|
33843
34047
|
title: "Search Knowledge",
|
|
33844
34048
|
visualData: { x: 0, y: 0, width: 270 },
|
|
@@ -33903,7 +34107,7 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33903
34107
|
];
|
|
33904
34108
|
}
|
|
33905
34109
|
getBody() {
|
|
33906
|
-
return
|
|
34110
|
+
return import_ts_dedent53.dedent`
|
|
33907
34111
|
${this.data.topK} per query -> ${this.data.finalResultCount} final
|
|
33908
34112
|
Reranking: ${this.data.rerankMode}
|
|
33909
34113
|
`;
|
|
@@ -33960,12 +34164,12 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33960
34164
|
var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowledge");
|
|
33961
34165
|
|
|
33962
34166
|
// src/model/nodes/BuildKnowledgeContextNode.ts
|
|
33963
|
-
var
|
|
33964
|
-
var
|
|
34167
|
+
var import_non_secure62 = require("nanoid/non-secure");
|
|
34168
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
33965
34169
|
var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
33966
34170
|
static create() {
|
|
33967
34171
|
return {
|
|
33968
|
-
id: (0,
|
|
34172
|
+
id: (0, import_non_secure62.nanoid)(),
|
|
33969
34173
|
type: "buildKnowledgeContext",
|
|
33970
34174
|
title: "Build Knowledge Context",
|
|
33971
34175
|
visualData: { x: 0, y: 0, width: 280 },
|
|
@@ -34019,7 +34223,7 @@ var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
|
34019
34223
|
];
|
|
34020
34224
|
}
|
|
34021
34225
|
getBody() {
|
|
34022
|
-
return
|
|
34226
|
+
return import_ts_dedent54.dedent`
|
|
34023
34227
|
${this.data.budget} ${this.data.budgetUnit}
|
|
34024
34228
|
Up to ${this.data.maxItems} items
|
|
34025
34229
|
Citations: [${this.data.citationPrefix || "K"}1]
|
|
@@ -34101,17 +34305,17 @@ function buildMetadataLine(evidence, fields) {
|
|
|
34101
34305
|
var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "Build Knowledge Context");
|
|
34102
34306
|
|
|
34103
34307
|
// src/model/nodes/HashNode.ts
|
|
34104
|
-
var
|
|
34308
|
+
var import_non_secure63 = require("nanoid/non-secure");
|
|
34105
34309
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
34106
34310
|
var import_ts_pattern3 = require("ts-pattern");
|
|
34107
|
-
var
|
|
34311
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
34108
34312
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
34109
34313
|
var HashNodeImpl = class extends NodeImpl {
|
|
34110
34314
|
static create() {
|
|
34111
34315
|
const chartNode = {
|
|
34112
34316
|
type: "hash",
|
|
34113
34317
|
title: "Hash",
|
|
34114
|
-
id: (0,
|
|
34318
|
+
id: (0, import_non_secure63.nanoid)(),
|
|
34115
34319
|
visualData: {
|
|
34116
34320
|
x: 0,
|
|
34117
34321
|
y: 0,
|
|
@@ -34162,7 +34366,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
34162
34366
|
}
|
|
34163
34367
|
static getUIData() {
|
|
34164
34368
|
return {
|
|
34165
|
-
infoBoxBody:
|
|
34369
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
34166
34370
|
Computes a hash of the input value using the configured hash function.
|
|
34167
34371
|
`,
|
|
34168
34372
|
infoBoxTitle: "Hash Node",
|
|
@@ -34190,14 +34394,14 @@ var algorithmDisplayName = {
|
|
|
34190
34394
|
var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
34191
34395
|
|
|
34192
34396
|
// src/model/nodes/AbortGraphNode.ts
|
|
34193
|
-
var
|
|
34194
|
-
var
|
|
34397
|
+
var import_non_secure64 = require("nanoid/non-secure");
|
|
34398
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
34195
34399
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
34196
34400
|
static create() {
|
|
34197
34401
|
const chartNode = {
|
|
34198
34402
|
type: "abortGraph",
|
|
34199
34403
|
title: "Abort Graph",
|
|
34200
|
-
id: (0,
|
|
34404
|
+
id: (0, import_non_secure64.nanoid)(),
|
|
34201
34405
|
visualData: {
|
|
34202
34406
|
x: 0,
|
|
34203
34407
|
y: 0,
|
|
@@ -34248,13 +34452,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34248
34452
|
];
|
|
34249
34453
|
}
|
|
34250
34454
|
getBody() {
|
|
34251
|
-
return
|
|
34455
|
+
return import_ts_dedent56.dedent`
|
|
34252
34456
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
34253
34457
|
`;
|
|
34254
34458
|
}
|
|
34255
34459
|
static getUIData() {
|
|
34256
34460
|
return {
|
|
34257
|
-
infoBoxBody:
|
|
34461
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
34258
34462
|
Aborts the execution of the entire graph immediately.
|
|
34259
34463
|
|
|
34260
34464
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -34279,14 +34483,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34279
34483
|
var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
34280
34484
|
|
|
34281
34485
|
// src/model/nodes/RaceInputsNode.ts
|
|
34282
|
-
var
|
|
34283
|
-
var
|
|
34486
|
+
var import_non_secure65 = require("nanoid/non-secure");
|
|
34487
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
34284
34488
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
34285
34489
|
static create() {
|
|
34286
34490
|
const chartNode = {
|
|
34287
34491
|
type: "raceInputs",
|
|
34288
34492
|
title: "Race Inputs",
|
|
34289
|
-
id: (0,
|
|
34493
|
+
id: (0, import_non_secure65.nanoid)(),
|
|
34290
34494
|
visualData: {
|
|
34291
34495
|
x: 0,
|
|
34292
34496
|
y: 0,
|
|
@@ -34322,7 +34526,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34322
34526
|
}
|
|
34323
34527
|
static getUIData() {
|
|
34324
34528
|
return {
|
|
34325
|
-
infoBoxBody:
|
|
34529
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
34326
34530
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
34327
34531
|
`,
|
|
34328
34532
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -34350,14 +34554,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34350
34554
|
var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
34351
34555
|
|
|
34352
34556
|
// src/model/nodes/ToJsonNode.ts
|
|
34353
|
-
var
|
|
34354
|
-
var
|
|
34557
|
+
var import_non_secure66 = require("nanoid/non-secure");
|
|
34558
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
34355
34559
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
34356
34560
|
static create() {
|
|
34357
34561
|
const chartNode = {
|
|
34358
34562
|
type: "toJson",
|
|
34359
34563
|
title: "To JSON",
|
|
34360
|
-
id: (0,
|
|
34564
|
+
id: (0, import_non_secure66.nanoid)(),
|
|
34361
34565
|
visualData: {
|
|
34362
34566
|
x: 0,
|
|
34363
34567
|
y: 0,
|
|
@@ -34402,7 +34606,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34402
34606
|
}
|
|
34403
34607
|
static getUIData() {
|
|
34404
34608
|
return {
|
|
34405
|
-
infoBoxBody:
|
|
34609
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
34406
34610
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
34407
34611
|
`,
|
|
34408
34612
|
infoBoxTitle: "To JSON Node",
|
|
@@ -34424,14 +34628,14 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34424
34628
|
var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
34425
34629
|
|
|
34426
34630
|
// src/model/nodes/JoinNode.ts
|
|
34427
|
-
var
|
|
34428
|
-
var
|
|
34631
|
+
var import_non_secure67 = require("nanoid/non-secure");
|
|
34632
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
34429
34633
|
var JoinNodeImpl = class extends NodeImpl {
|
|
34430
34634
|
static create = () => {
|
|
34431
34635
|
const chartNode = {
|
|
34432
34636
|
type: "join",
|
|
34433
34637
|
title: "Join",
|
|
34434
|
-
id: (0,
|
|
34638
|
+
id: (0, import_non_secure67.nanoid)(),
|
|
34435
34639
|
data: {
|
|
34436
34640
|
flatten: true,
|
|
34437
34641
|
joinString: "\n"
|
|
@@ -34493,7 +34697,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34493
34697
|
}
|
|
34494
34698
|
static getUIData() {
|
|
34495
34699
|
return {
|
|
34496
|
-
infoBoxBody:
|
|
34700
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
34497
34701
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
34498
34702
|
|
|
34499
34703
|
Defaults to a newline.
|
|
@@ -34530,15 +34734,15 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34530
34734
|
var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
34531
34735
|
|
|
34532
34736
|
// src/model/nodes/FilterNode.ts
|
|
34533
|
-
var
|
|
34737
|
+
var import_non_secure68 = require("nanoid/non-secure");
|
|
34534
34738
|
var import_lodash_es10 = require("lodash");
|
|
34535
|
-
var
|
|
34739
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
34536
34740
|
var FilterNodeImpl = class extends NodeImpl {
|
|
34537
34741
|
static create() {
|
|
34538
34742
|
const chartNode = {
|
|
34539
34743
|
type: "filter",
|
|
34540
34744
|
title: "Filter",
|
|
34541
|
-
id: (0,
|
|
34745
|
+
id: (0, import_non_secure68.nanoid)(),
|
|
34542
34746
|
visualData: {
|
|
34543
34747
|
x: 0,
|
|
34544
34748
|
y: 0,
|
|
@@ -34575,7 +34779,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34575
34779
|
}
|
|
34576
34780
|
static getUIData() {
|
|
34577
34781
|
return {
|
|
34578
|
-
infoBoxBody:
|
|
34782
|
+
infoBoxBody: import_ts_dedent60.dedent`
|
|
34579
34783
|
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.
|
|
34580
34784
|
`,
|
|
34581
34785
|
infoBoxTitle: "Filter Node",
|
|
@@ -34600,11 +34804,11 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34600
34804
|
var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
34601
34805
|
|
|
34602
34806
|
// src/model/nodes/JSFilterNode.ts
|
|
34603
|
-
var
|
|
34604
|
-
var
|
|
34807
|
+
var import_non_secure69 = require("nanoid/non-secure");
|
|
34808
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
34605
34809
|
|
|
34606
34810
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
34607
|
-
var
|
|
34811
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
34608
34812
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
34609
34813
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
34610
34814
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -34630,7 +34834,7 @@ function getJSListInterpolationContext(callbackBody) {
|
|
|
34630
34834
|
});
|
|
34631
34835
|
}
|
|
34632
34836
|
function buildJSListRuntimePreamble(interpolationContext) {
|
|
34633
|
-
return
|
|
34837
|
+
return import_ts_dedent61.dedent`
|
|
34634
34838
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
34635
34839
|
${buildJsValueInputClonePreamble({
|
|
34636
34840
|
cacheIdentifier: interpolationContext.cloneCacheIdentifier,
|
|
@@ -34675,7 +34879,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
|
|
|
34675
34879
|
function buildJSFilterWrapper(callbackBody) {
|
|
34676
34880
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34677
34881
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34678
|
-
return
|
|
34882
|
+
return import_ts_dedent61.dedent`
|
|
34679
34883
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34680
34884
|
|
|
34681
34885
|
if (!Array.isArray(array)) {
|
|
@@ -34711,7 +34915,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
34711
34915
|
function buildJSMapWrapper(callbackBody) {
|
|
34712
34916
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34713
34917
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34714
|
-
return
|
|
34918
|
+
return import_ts_dedent61.dedent`
|
|
34715
34919
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34716
34920
|
|
|
34717
34921
|
if (!Array.isArray(array)) {
|
|
@@ -34780,7 +34984,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
34780
34984
|
const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
|
|
34781
34985
|
return {
|
|
34782
34986
|
type: "colorized",
|
|
34783
|
-
text:
|
|
34987
|
+
text: import_ts_dedent61.dedent`
|
|
34784
34988
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
34785
34989
|
${indentLines(previewBody, " ")}
|
|
34786
34990
|
}
|
|
@@ -34832,7 +35036,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34832
35036
|
const chartNode = {
|
|
34833
35037
|
type: "jsFilter",
|
|
34834
35038
|
title: "JS Filter",
|
|
34835
|
-
id: (0,
|
|
35039
|
+
id: (0, import_non_secure69.nanoid)(),
|
|
34836
35040
|
visualData: {
|
|
34837
35041
|
x: 0,
|
|
34838
35042
|
y: 0,
|
|
@@ -34864,7 +35068,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34864
35068
|
}
|
|
34865
35069
|
static getUIData() {
|
|
34866
35070
|
return {
|
|
34867
|
-
infoBoxBody:
|
|
35071
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
34868
35072
|
Filters an input array using the body of a JavaScript callback.
|
|
34869
35073
|
|
|
34870
35074
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34892,15 +35096,15 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34892
35096
|
var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
34893
35097
|
|
|
34894
35098
|
// src/model/nodes/JSMapNode.ts
|
|
34895
|
-
var
|
|
34896
|
-
var
|
|
35099
|
+
var import_non_secure70 = require("nanoid/non-secure");
|
|
35100
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
34897
35101
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
34898
35102
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
34899
35103
|
static create() {
|
|
34900
35104
|
const chartNode = {
|
|
34901
35105
|
type: "jsMap",
|
|
34902
35106
|
title: "JS Map",
|
|
34903
|
-
id: (0,
|
|
35107
|
+
id: (0, import_non_secure70.nanoid)(),
|
|
34904
35108
|
visualData: {
|
|
34905
35109
|
x: 0,
|
|
34906
35110
|
y: 0,
|
|
@@ -34932,7 +35136,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34932
35136
|
}
|
|
34933
35137
|
static getUIData() {
|
|
34934
35138
|
return {
|
|
34935
|
-
infoBoxBody:
|
|
35139
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
34936
35140
|
Maps an input array using the body of a JavaScript callback.
|
|
34937
35141
|
|
|
34938
35142
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34960,8 +35164,8 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34960
35164
|
var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
34961
35165
|
|
|
34962
35166
|
// src/model/nodes/ObjectNode.ts
|
|
34963
|
-
var
|
|
34964
|
-
var
|
|
35167
|
+
var import_non_secure71 = require("nanoid/non-secure");
|
|
35168
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
34965
35169
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
34966
35170
|
"key": "{{input}}"
|
|
34967
35171
|
}`;
|
|
@@ -35008,7 +35212,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35008
35212
|
const chartNode = {
|
|
35009
35213
|
type: "object",
|
|
35010
35214
|
title: "Object",
|
|
35011
|
-
id: (0,
|
|
35215
|
+
id: (0, import_non_secure71.nanoid)(),
|
|
35012
35216
|
visualData: {
|
|
35013
35217
|
x: 0,
|
|
35014
35218
|
y: 0,
|
|
@@ -35059,7 +35263,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35059
35263
|
}
|
|
35060
35264
|
static getUIData() {
|
|
35061
35265
|
return {
|
|
35062
|
-
infoBoxBody:
|
|
35266
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
35063
35267
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
35064
35268
|
|
|
35065
35269
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -35140,14 +35344,14 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35140
35344
|
var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
35141
35345
|
|
|
35142
35346
|
// src/model/nodes/BooleanNode.ts
|
|
35143
|
-
var
|
|
35144
|
-
var
|
|
35347
|
+
var import_non_secure72 = require("nanoid/non-secure");
|
|
35348
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
35145
35349
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
35146
35350
|
static create() {
|
|
35147
35351
|
const chartNode = {
|
|
35148
35352
|
type: "boolean",
|
|
35149
35353
|
title: "Bool",
|
|
35150
|
-
id: (0,
|
|
35354
|
+
id: (0, import_non_secure72.nanoid)(),
|
|
35151
35355
|
visualData: {
|
|
35152
35356
|
x: 0,
|
|
35153
35357
|
y: 0,
|
|
@@ -35185,7 +35389,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
35185
35389
|
}
|
|
35186
35390
|
static getUIData() {
|
|
35187
35391
|
return {
|
|
35188
|
-
infoBoxBody:
|
|
35392
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
35189
35393
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
35190
35394
|
`,
|
|
35191
35395
|
infoBoxTitle: "Bool Node",
|
|
@@ -35206,10 +35410,10 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
35206
35410
|
var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
35207
35411
|
|
|
35208
35412
|
// src/model/nodes/CompareNode.ts
|
|
35209
|
-
var
|
|
35413
|
+
var import_non_secure73 = require("nanoid/non-secure");
|
|
35210
35414
|
var import_lodash_es11 = require("lodash");
|
|
35211
35415
|
var import_ts_pattern4 = require("ts-pattern");
|
|
35212
|
-
var
|
|
35416
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
35213
35417
|
var compareNodeComparisonFunctionOptions = [
|
|
35214
35418
|
{ label: "==", value: "==" },
|
|
35215
35419
|
{ label: "!=", value: "!=" },
|
|
@@ -35229,7 +35433,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35229
35433
|
const chartNode = {
|
|
35230
35434
|
type: "compare",
|
|
35231
35435
|
title: "Compare",
|
|
35232
|
-
id: (0,
|
|
35436
|
+
id: (0, import_non_secure73.nanoid)(),
|
|
35233
35437
|
visualData: {
|
|
35234
35438
|
x: 0,
|
|
35235
35439
|
y: 0,
|
|
@@ -35288,7 +35492,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35288
35492
|
}
|
|
35289
35493
|
static getUIData() {
|
|
35290
35494
|
return {
|
|
35291
|
-
infoBoxBody:
|
|
35495
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
35292
35496
|
Compares two values using the configured operator and outputs the result.
|
|
35293
35497
|
|
|
35294
35498
|
If the data types of the values do not match, then the B value is converted to the type of the A value.
|
|
@@ -35329,9 +35533,9 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35329
35533
|
var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
35330
35534
|
|
|
35331
35535
|
// src/model/nodes/EvaluateNode.ts
|
|
35332
|
-
var
|
|
35536
|
+
var import_non_secure74 = require("nanoid/non-secure");
|
|
35333
35537
|
var import_ts_pattern5 = require("ts-pattern");
|
|
35334
|
-
var
|
|
35538
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
35335
35539
|
var unaryOperation = ["abs", "negate"];
|
|
35336
35540
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
35337
35541
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -35339,7 +35543,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35339
35543
|
const chartNode = {
|
|
35340
35544
|
type: "evaluate",
|
|
35341
35545
|
title: "Evaluate",
|
|
35342
|
-
id: (0,
|
|
35546
|
+
id: (0, import_non_secure74.nanoid)(),
|
|
35343
35547
|
visualData: {
|
|
35344
35548
|
x: 0,
|
|
35345
35549
|
y: 0,
|
|
@@ -35417,7 +35621,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35417
35621
|
}
|
|
35418
35622
|
static getUIData() {
|
|
35419
35623
|
return {
|
|
35420
|
-
infoBoxBody:
|
|
35624
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
35421
35625
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
35422
35626
|
|
|
35423
35627
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -35453,14 +35657,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35453
35657
|
var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
35454
35658
|
|
|
35455
35659
|
// src/model/nodes/NumberNode.ts
|
|
35456
|
-
var
|
|
35457
|
-
var
|
|
35660
|
+
var import_non_secure75 = require("nanoid/non-secure");
|
|
35661
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
35458
35662
|
var NumberNodeImpl = class extends NodeImpl {
|
|
35459
35663
|
static create() {
|
|
35460
35664
|
const chartNode = {
|
|
35461
35665
|
type: "number",
|
|
35462
35666
|
title: "Number",
|
|
35463
|
-
id: (0,
|
|
35667
|
+
id: (0, import_non_secure75.nanoid)(),
|
|
35464
35668
|
visualData: {
|
|
35465
35669
|
x: 0,
|
|
35466
35670
|
y: 0,
|
|
@@ -35504,7 +35708,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35504
35708
|
}
|
|
35505
35709
|
static getUIData() {
|
|
35506
35710
|
return {
|
|
35507
|
-
infoBoxBody:
|
|
35711
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
35508
35712
|
Outputs a number constant, or converts an input value into a number.
|
|
35509
35713
|
|
|
35510
35714
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -35531,8 +35735,8 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35531
35735
|
var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
35532
35736
|
|
|
35533
35737
|
// src/model/nodes/RandomNumberNode.ts
|
|
35534
|
-
var
|
|
35535
|
-
var
|
|
35738
|
+
var import_non_secure76 = require("nanoid/non-secure");
|
|
35739
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
35536
35740
|
var randomNumberTypeOptions = [
|
|
35537
35741
|
{ value: false, label: "Float" },
|
|
35538
35742
|
{ value: true, label: "Integer" }
|
|
@@ -35542,7 +35746,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35542
35746
|
const chartNode = {
|
|
35543
35747
|
type: "randomNumber",
|
|
35544
35748
|
title: "Random number",
|
|
35545
|
-
id: (0,
|
|
35749
|
+
id: (0, import_non_secure76.nanoid)(),
|
|
35546
35750
|
visualData: {
|
|
35547
35751
|
x: 0,
|
|
35548
35752
|
y: 0,
|
|
@@ -35600,7 +35804,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35600
35804
|
];
|
|
35601
35805
|
}
|
|
35602
35806
|
getBody() {
|
|
35603
|
-
return
|
|
35807
|
+
return import_ts_dedent69.dedent`
|
|
35604
35808
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
35605
35809
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
35606
35810
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -35609,7 +35813,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35609
35813
|
}
|
|
35610
35814
|
static getUIData() {
|
|
35611
35815
|
return {
|
|
35612
|
-
infoBoxBody:
|
|
35816
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
35613
35817
|
Outputs a random number between the configured min and max values.
|
|
35614
35818
|
|
|
35615
35819
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -35640,15 +35844,15 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35640
35844
|
var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
35641
35845
|
|
|
35642
35846
|
// src/model/nodes/ShuffleNode.ts
|
|
35643
|
-
var
|
|
35847
|
+
var import_non_secure77 = require("nanoid/non-secure");
|
|
35644
35848
|
var import_lodash_es12 = require("lodash");
|
|
35645
|
-
var
|
|
35849
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
35646
35850
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
35647
35851
|
static create() {
|
|
35648
35852
|
const chartNode = {
|
|
35649
35853
|
type: "shuffle",
|
|
35650
35854
|
title: "Shuffle",
|
|
35651
|
-
id: (0,
|
|
35855
|
+
id: (0, import_non_secure77.nanoid)(),
|
|
35652
35856
|
visualData: {
|
|
35653
35857
|
x: 0,
|
|
35654
35858
|
y: 0,
|
|
@@ -35678,7 +35882,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35678
35882
|
}
|
|
35679
35883
|
static getUIData() {
|
|
35680
35884
|
return {
|
|
35681
|
-
infoBoxBody:
|
|
35885
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
35682
35886
|
Shuffles the input array. Outputs the shuffled array.
|
|
35683
35887
|
`,
|
|
35684
35888
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -35702,14 +35906,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35702
35906
|
var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
35703
35907
|
|
|
35704
35908
|
// src/model/nodes/CommentNode.ts
|
|
35705
|
-
var
|
|
35706
|
-
var
|
|
35909
|
+
var import_non_secure78 = require("nanoid/non-secure");
|
|
35910
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
35707
35911
|
var CommentNodeImpl = class extends NodeImpl {
|
|
35708
35912
|
static create() {
|
|
35709
35913
|
const chartNode = {
|
|
35710
35914
|
type: "comment",
|
|
35711
35915
|
title: "Comment",
|
|
35712
|
-
id: (0,
|
|
35916
|
+
id: (0, import_non_secure78.nanoid)(),
|
|
35713
35917
|
visualData: {
|
|
35714
35918
|
x: 0,
|
|
35715
35919
|
y: 0,
|
|
@@ -35755,7 +35959,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35755
35959
|
}
|
|
35756
35960
|
static getUIData() {
|
|
35757
35961
|
return {
|
|
35758
|
-
infoBoxBody:
|
|
35962
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
35759
35963
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
35760
35964
|
`,
|
|
35761
35965
|
infoBoxTitle: "Comment Node",
|
|
@@ -35770,11 +35974,11 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35770
35974
|
var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
|
|
35771
35975
|
|
|
35772
35976
|
// src/model/nodes/ImageNode.ts
|
|
35773
|
-
var
|
|
35977
|
+
var import_non_secure79 = require("nanoid/non-secure");
|
|
35774
35978
|
var ImageNodeImpl = class extends NodeImpl {
|
|
35775
35979
|
static create() {
|
|
35776
35980
|
return {
|
|
35777
|
-
id: (0,
|
|
35981
|
+
id: (0, import_non_secure79.nanoid)(),
|
|
35778
35982
|
type: "image",
|
|
35779
35983
|
title: "Image",
|
|
35780
35984
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -35871,11 +36075,11 @@ var ImageNodeImpl = class extends NodeImpl {
|
|
|
35871
36075
|
var imageNode = nodeDefinition(ImageNodeImpl, "Image");
|
|
35872
36076
|
|
|
35873
36077
|
// src/model/nodes/AudioNode.ts
|
|
35874
|
-
var
|
|
36078
|
+
var import_non_secure80 = require("nanoid/non-secure");
|
|
35875
36079
|
var AudioNodeImpl = class extends NodeImpl {
|
|
35876
36080
|
static create() {
|
|
35877
36081
|
return {
|
|
35878
|
-
id: (0,
|
|
36082
|
+
id: (0, import_non_secure80.nanoid)(),
|
|
35879
36083
|
type: "audio",
|
|
35880
36084
|
title: "Audio",
|
|
35881
36085
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -35968,7 +36172,7 @@ var AudioNodeImpl = class extends NodeImpl {
|
|
|
35968
36172
|
var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
|
|
35969
36173
|
|
|
35970
36174
|
// src/model/nodes/HttpCallNode.ts
|
|
35971
|
-
var
|
|
36175
|
+
var import_non_secure81 = require("nanoid/non-secure");
|
|
35972
36176
|
var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
|
|
35973
36177
|
var REQUEST_ERROR_OUTPUT_ID = "requestError";
|
|
35974
36178
|
var STATUS_CODE_OUTPUT_ID = "statusCode";
|
|
@@ -36215,7 +36419,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
36215
36419
|
const chartNode = {
|
|
36216
36420
|
type: "httpCall",
|
|
36217
36421
|
title: "Http Call",
|
|
36218
|
-
id: (0,
|
|
36422
|
+
id: (0, import_non_secure81.nanoid)(),
|
|
36219
36423
|
visualData: {
|
|
36220
36424
|
x: 0,
|
|
36221
36425
|
y: 0,
|
|
@@ -36555,14 +36759,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
36555
36759
|
var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
36556
36760
|
|
|
36557
36761
|
// src/model/nodes/DelayNode.ts
|
|
36558
|
-
var
|
|
36559
|
-
var
|
|
36762
|
+
var import_non_secure82 = require("nanoid/non-secure");
|
|
36763
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
36560
36764
|
var DelayNodeImpl = class extends NodeImpl {
|
|
36561
36765
|
static create() {
|
|
36562
36766
|
const chartNode = {
|
|
36563
36767
|
type: "delay",
|
|
36564
36768
|
title: "Delay",
|
|
36565
|
-
id: (0,
|
|
36769
|
+
id: (0, import_non_secure82.nanoid)(),
|
|
36566
36770
|
visualData: {
|
|
36567
36771
|
x: 0,
|
|
36568
36772
|
y: 0,
|
|
@@ -36607,7 +36811,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36607
36811
|
}
|
|
36608
36812
|
static getUIData() {
|
|
36609
36813
|
return {
|
|
36610
|
-
infoBoxBody:
|
|
36814
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
36611
36815
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
36612
36816
|
`,
|
|
36613
36817
|
infoBoxTitle: "Delay Node",
|
|
@@ -36644,12 +36848,12 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36644
36848
|
var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
36645
36849
|
|
|
36646
36850
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
36647
|
-
var
|
|
36648
|
-
var
|
|
36851
|
+
var import_non_secure83 = require("nanoid/non-secure");
|
|
36852
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
36649
36853
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
36650
36854
|
static create() {
|
|
36651
36855
|
return {
|
|
36652
|
-
id: (0,
|
|
36856
|
+
id: (0, import_non_secure83.nanoid)(),
|
|
36653
36857
|
type: "appendToDataset",
|
|
36654
36858
|
title: "Append to Dataset",
|
|
36655
36859
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -36705,7 +36909,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
36705
36909
|
}
|
|
36706
36910
|
static getUIData() {
|
|
36707
36911
|
return {
|
|
36708
|
-
infoBoxBody:
|
|
36912
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
36709
36913
|
Appends a row of data to the specified dataset.
|
|
36710
36914
|
`,
|
|
36711
36915
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -37255,14 +37459,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
|
|
|
37255
37459
|
var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
|
|
37256
37460
|
|
|
37257
37461
|
// src/model/nodes/SliceNode.ts
|
|
37258
|
-
var
|
|
37259
|
-
var
|
|
37462
|
+
var import_non_secure84 = require("nanoid/non-secure");
|
|
37463
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
37260
37464
|
var SliceNodeImpl = class extends NodeImpl {
|
|
37261
37465
|
static create() {
|
|
37262
37466
|
const chartNode = {
|
|
37263
37467
|
type: "slice",
|
|
37264
37468
|
title: "Slice",
|
|
37265
|
-
id: (0,
|
|
37469
|
+
id: (0, import_non_secure84.nanoid)(),
|
|
37266
37470
|
visualData: {
|
|
37267
37471
|
x: 0,
|
|
37268
37472
|
y: 0,
|
|
@@ -37315,14 +37519,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37315
37519
|
];
|
|
37316
37520
|
}
|
|
37317
37521
|
getBody() {
|
|
37318
|
-
return
|
|
37522
|
+
return import_ts_dedent74.dedent`
|
|
37319
37523
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
37320
37524
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
37321
37525
|
`;
|
|
37322
37526
|
}
|
|
37323
37527
|
static getUIData() {
|
|
37324
37528
|
return {
|
|
37325
|
-
infoBoxBody:
|
|
37529
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
37326
37530
|
Slices an array from the start index for the count number of elements.
|
|
37327
37531
|
|
|
37328
37532
|
Useful for extracting a portion of an array.
|
|
@@ -37348,14 +37552,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37348
37552
|
var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
37349
37553
|
|
|
37350
37554
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
37351
|
-
var
|
|
37352
|
-
var
|
|
37555
|
+
var import_non_secure85 = require("nanoid/non-secure");
|
|
37556
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
37353
37557
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
37354
37558
|
static create() {
|
|
37355
37559
|
const chartNode = {
|
|
37356
37560
|
type: "extractMarkdownCodeBlocks",
|
|
37357
37561
|
title: "Extract Markdown Code Blocks",
|
|
37358
|
-
id: (0,
|
|
37562
|
+
id: (0, import_non_secure85.nanoid)(),
|
|
37359
37563
|
visualData: {
|
|
37360
37564
|
x: 0,
|
|
37361
37565
|
y: 0,
|
|
@@ -37396,7 +37600,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
37396
37600
|
}
|
|
37397
37601
|
static getUIData() {
|
|
37398
37602
|
return {
|
|
37399
|
-
infoBoxBody:
|
|
37603
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
37400
37604
|
Extracts the code blocks in the input Markdown text.
|
|
37401
37605
|
|
|
37402
37606
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -37447,7 +37651,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
|
|
|
37447
37651
|
);
|
|
37448
37652
|
|
|
37449
37653
|
// src/model/nodes/AssembleMessageNode.ts
|
|
37450
|
-
var
|
|
37654
|
+
var import_non_secure86 = require("nanoid/non-secure");
|
|
37451
37655
|
var import_lodash_es13 = require("lodash");
|
|
37452
37656
|
var import_ts_pattern6 = require("ts-pattern");
|
|
37453
37657
|
var messageTypeToTitle = {
|
|
@@ -37462,7 +37666,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
37462
37666
|
const chartNode = {
|
|
37463
37667
|
type: "assembleMessage",
|
|
37464
37668
|
title: "Assemble Message",
|
|
37465
|
-
id: (0,
|
|
37669
|
+
id: (0, import_non_secure86.nanoid)(),
|
|
37466
37670
|
visualData: {
|
|
37467
37671
|
x: 0,
|
|
37468
37672
|
y: 0,
|
|
@@ -37652,13 +37856,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
37652
37856
|
var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
|
|
37653
37857
|
|
|
37654
37858
|
// src/model/nodes/URLReferenceNode.ts
|
|
37655
|
-
var
|
|
37859
|
+
var import_non_secure87 = require("nanoid/non-secure");
|
|
37656
37860
|
var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
37657
37861
|
static create() {
|
|
37658
37862
|
const chartNode = {
|
|
37659
37863
|
type: "urlReference",
|
|
37660
37864
|
title: "URL Reference",
|
|
37661
|
-
id: (0,
|
|
37865
|
+
id: (0, import_non_secure87.nanoid)(),
|
|
37662
37866
|
visualData: {
|
|
37663
37867
|
x: 0,
|
|
37664
37868
|
y: 0,
|
|
@@ -37727,14 +37931,14 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
|
37727
37931
|
var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
37728
37932
|
|
|
37729
37933
|
// src/model/nodes/DestructureNode.ts
|
|
37730
|
-
var
|
|
37731
|
-
var
|
|
37934
|
+
var import_non_secure88 = require("nanoid/non-secure");
|
|
37935
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
37732
37936
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
37733
37937
|
static create() {
|
|
37734
37938
|
const chartNode = {
|
|
37735
37939
|
type: "destructure",
|
|
37736
37940
|
title: "Destructure",
|
|
37737
|
-
id: (0,
|
|
37941
|
+
id: (0, import_non_secure88.nanoid)(),
|
|
37738
37942
|
visualData: {
|
|
37739
37943
|
x: 0,
|
|
37740
37944
|
y: 0,
|
|
@@ -37742,7 +37946,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37742
37946
|
},
|
|
37743
37947
|
data: {
|
|
37744
37948
|
paths: ["$.value"],
|
|
37745
|
-
pathPortIds: [(0,
|
|
37949
|
+
pathPortIds: [(0, import_non_secure88.nanoid)()]
|
|
37746
37950
|
}
|
|
37747
37951
|
};
|
|
37748
37952
|
return chartNode;
|
|
@@ -37796,7 +38000,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37796
38000
|
}
|
|
37797
38001
|
static getUIData() {
|
|
37798
38002
|
return {
|
|
37799
|
-
infoBoxBody:
|
|
38003
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
37800
38004
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
37801
38005
|
`,
|
|
37802
38006
|
infoBoxTitle: "Destructure Node",
|
|
@@ -37830,12 +38034,12 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37830
38034
|
var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
37831
38035
|
|
|
37832
38036
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
37833
|
-
var
|
|
37834
|
-
var
|
|
38037
|
+
var import_non_secure89 = require("nanoid/non-secure");
|
|
38038
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
37835
38039
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
37836
38040
|
static create() {
|
|
37837
38041
|
return {
|
|
37838
|
-
id: (0,
|
|
38042
|
+
id: (0, import_non_secure89.nanoid)(),
|
|
37839
38043
|
type: "replaceDataset",
|
|
37840
38044
|
title: "Replace Dataset",
|
|
37841
38045
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -37874,7 +38078,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
37874
38078
|
}
|
|
37875
38079
|
static getUIData() {
|
|
37876
38080
|
return {
|
|
37877
|
-
infoBoxBody:
|
|
38081
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
37878
38082
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
37879
38083
|
`,
|
|
37880
38084
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -38006,14 +38210,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
|
|
|
38006
38210
|
var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
38007
38211
|
|
|
38008
38212
|
// src/model/nodes/GraphReferenceNode.ts
|
|
38009
|
-
var
|
|
38010
|
-
var
|
|
38213
|
+
var import_non_secure90 = require("nanoid/non-secure");
|
|
38214
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
38011
38215
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
38012
38216
|
static create() {
|
|
38013
38217
|
const chartNode = {
|
|
38014
38218
|
type: "graphReference",
|
|
38015
38219
|
title: "Graph Reference",
|
|
38016
|
-
id: (0,
|
|
38220
|
+
id: (0, import_non_secure90.nanoid)(),
|
|
38017
38221
|
visualData: {
|
|
38018
38222
|
x: 0,
|
|
38019
38223
|
y: 0,
|
|
@@ -38062,7 +38266,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
38062
38266
|
}
|
|
38063
38267
|
static getUIData() {
|
|
38064
38268
|
return {
|
|
38065
|
-
infoBoxBody:
|
|
38269
|
+
infoBoxBody: import_ts_dedent78.dedent`
|
|
38066
38270
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
38067
38271
|
`,
|
|
38068
38272
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -38128,8 +38332,8 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
38128
38332
|
var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
|
|
38129
38333
|
|
|
38130
38334
|
// src/model/nodes/CallGraphNode.ts
|
|
38131
|
-
var
|
|
38132
|
-
var
|
|
38335
|
+
var import_non_secure91 = require("nanoid/non-secure");
|
|
38336
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
38133
38337
|
|
|
38134
38338
|
// src/api/looseDataValue.ts
|
|
38135
38339
|
var import_lodash_es14 = require("lodash");
|
|
@@ -38155,7 +38359,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
38155
38359
|
const chartNode = {
|
|
38156
38360
|
type: "callGraph",
|
|
38157
38361
|
title: "Call Graph",
|
|
38158
|
-
id: (0,
|
|
38362
|
+
id: (0, import_non_secure91.nanoid)(),
|
|
38159
38363
|
visualData: {
|
|
38160
38364
|
x: 0,
|
|
38161
38365
|
y: 0,
|
|
@@ -38205,7 +38409,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
38205
38409
|
}
|
|
38206
38410
|
static getUIData() {
|
|
38207
38411
|
return {
|
|
38208
|
-
infoBoxBody:
|
|
38412
|
+
infoBoxBody: import_ts_dedent79.dedent`
|
|
38209
38413
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
38210
38414
|
`,
|
|
38211
38415
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -38277,7 +38481,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
38277
38481
|
|
|
38278
38482
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
38279
38483
|
var import_nanoid = require("nanoid");
|
|
38280
|
-
var
|
|
38484
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
38281
38485
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
38282
38486
|
static create() {
|
|
38283
38487
|
const chartNode = {
|
|
@@ -38360,7 +38564,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
38360
38564
|
}
|
|
38361
38565
|
static getUIData() {
|
|
38362
38566
|
return {
|
|
38363
|
-
infoBoxBody:
|
|
38567
|
+
infoBoxBody: import_ts_dedent80.dedent`
|
|
38364
38568
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
38365
38569
|
`,
|
|
38366
38570
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -38447,11 +38651,11 @@ function getDelegatedToolCallRecords(input) {
|
|
|
38447
38651
|
var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
|
|
38448
38652
|
|
|
38449
38653
|
// src/model/nodes/PlayAudioNode.ts
|
|
38450
|
-
var
|
|
38654
|
+
var import_non_secure92 = require("nanoid/non-secure");
|
|
38451
38655
|
var PlayAudioNodeImpl = class extends NodeImpl {
|
|
38452
38656
|
static create() {
|
|
38453
38657
|
return {
|
|
38454
|
-
id: (0,
|
|
38658
|
+
id: (0, import_non_secure92.nanoid)(),
|
|
38455
38659
|
type: "playAudio",
|
|
38456
38660
|
title: "Play Audio",
|
|
38457
38661
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -38505,11 +38709,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
|
|
|
38505
38709
|
var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
|
|
38506
38710
|
|
|
38507
38711
|
// src/model/nodes/DocumentNode.ts
|
|
38508
|
-
var
|
|
38712
|
+
var import_non_secure93 = require("nanoid/non-secure");
|
|
38509
38713
|
var DocumentNodeImpl = class extends NodeImpl {
|
|
38510
38714
|
static create() {
|
|
38511
38715
|
return {
|
|
38512
|
-
id: (0,
|
|
38716
|
+
id: (0, import_non_secure93.nanoid)(),
|
|
38513
38717
|
type: "document",
|
|
38514
38718
|
title: "Document",
|
|
38515
38719
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -38675,15 +38879,15 @@ var DocumentNodeImpl = class extends NodeImpl {
|
|
|
38675
38879
|
var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
38676
38880
|
|
|
38677
38881
|
// src/model/nodes/ChatLoopNode.ts
|
|
38678
|
-
var
|
|
38679
|
-
var
|
|
38882
|
+
var import_non_secure94 = require("nanoid/non-secure");
|
|
38883
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
38680
38884
|
var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
|
|
38681
38885
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
38682
38886
|
static create() {
|
|
38683
38887
|
const chartNode = {
|
|
38684
38888
|
type: "chatLoop",
|
|
38685
38889
|
title: chatLoopLegacyDisplayName,
|
|
38686
|
-
id: (0,
|
|
38890
|
+
id: (0, import_non_secure94.nanoid)(),
|
|
38687
38891
|
visualData: {
|
|
38688
38892
|
x: 0,
|
|
38689
38893
|
y: 0,
|
|
@@ -38716,7 +38920,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38716
38920
|
}
|
|
38717
38921
|
static getUIData() {
|
|
38718
38922
|
return {
|
|
38719
|
-
infoBoxBody:
|
|
38923
|
+
infoBoxBody: import_ts_dedent81.dedent`
|
|
38720
38924
|
Creates an interactive chat loop with an AI model. The node will:
|
|
38721
38925
|
1. Send the initial prompt to the AI
|
|
38722
38926
|
2. Show the AI's response and prompt for user input
|
|
@@ -38816,12 +39020,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38816
39020
|
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
|
|
38817
39021
|
|
|
38818
39022
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
38819
|
-
var
|
|
38820
|
-
var
|
|
39023
|
+
var import_non_secure95 = require("nanoid/non-secure");
|
|
39024
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
38821
39025
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
38822
39026
|
static create() {
|
|
38823
39027
|
return {
|
|
38824
|
-
id: (0,
|
|
39028
|
+
id: (0, import_non_secure95.nanoid)(),
|
|
38825
39029
|
type: "readAllFiles",
|
|
38826
39030
|
title: "Read All Files",
|
|
38827
39031
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -38932,7 +39136,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38932
39136
|
];
|
|
38933
39137
|
}
|
|
38934
39138
|
getBody() {
|
|
38935
|
-
return
|
|
39139
|
+
return import_ts_dedent82.dedent`
|
|
38936
39140
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
38937
39141
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
38938
39142
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -38941,7 +39145,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38941
39145
|
}
|
|
38942
39146
|
static getUIData() {
|
|
38943
39147
|
return {
|
|
38944
|
-
infoBoxBody:
|
|
39148
|
+
infoBoxBody: import_ts_dedent82.dedent`
|
|
38945
39149
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
38946
39150
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
38947
39151
|
`,
|
|
@@ -39014,14 +39218,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
39014
39218
|
var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
39015
39219
|
|
|
39016
39220
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
39017
|
-
var
|
|
39018
|
-
var
|
|
39221
|
+
var import_non_secure96 = require("nanoid/non-secure");
|
|
39222
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
39019
39223
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
39020
39224
|
static create() {
|
|
39021
39225
|
const chartNode = {
|
|
39022
39226
|
type: "toMarkdownTable",
|
|
39023
39227
|
title: "To Markdown Table",
|
|
39024
|
-
id: (0,
|
|
39228
|
+
id: (0, import_non_secure96.nanoid)(),
|
|
39025
39229
|
visualData: {
|
|
39026
39230
|
x: 0,
|
|
39027
39231
|
y: 0,
|
|
@@ -39075,7 +39279,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
39075
39279
|
}
|
|
39076
39280
|
static getUIData() {
|
|
39077
39281
|
return {
|
|
39078
|
-
infoBoxBody:
|
|
39282
|
+
infoBoxBody: import_ts_dedent83.dedent`
|
|
39079
39283
|
Converts an array of objects into a markdown table format.
|
|
39080
39284
|
Input should be an array of objects with consistent keys.
|
|
39081
39285
|
`,
|
|
@@ -39127,7 +39331,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
39127
39331
|
|
|
39128
39332
|
// src/model/nodes/CronNode.ts
|
|
39129
39333
|
var import_nanoid2 = require("nanoid");
|
|
39130
|
-
var
|
|
39334
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
39131
39335
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
39132
39336
|
var CronNodeImpl = class extends NodeImpl {
|
|
39133
39337
|
static create() {
|
|
@@ -39197,7 +39401,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39197
39401
|
}
|
|
39198
39402
|
static getUIData() {
|
|
39199
39403
|
return {
|
|
39200
|
-
infoBoxBody:
|
|
39404
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
39201
39405
|
Executes a subgraph on a schedule. Supports:
|
|
39202
39406
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
39203
39407
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -39237,7 +39441,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39237
39441
|
type: "string",
|
|
39238
39442
|
dataKey: "schedule",
|
|
39239
39443
|
label: "Schedule",
|
|
39240
|
-
helperMessage:
|
|
39444
|
+
helperMessage: import_ts_dedent84.dedent`
|
|
39241
39445
|
Examples:
|
|
39242
39446
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
39243
39447
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -39368,15 +39572,15 @@ ${this.data.schedule}`;
|
|
|
39368
39572
|
var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
39369
39573
|
|
|
39370
39574
|
// src/model/nodes/ToTreeNode.ts
|
|
39371
|
-
var
|
|
39372
|
-
var
|
|
39575
|
+
var import_non_secure97 = require("nanoid/non-secure");
|
|
39576
|
+
var import_ts_dedent85 = require("ts-dedent");
|
|
39373
39577
|
var import_lodash_es15 = require("lodash");
|
|
39374
39578
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
39375
39579
|
static create() {
|
|
39376
39580
|
const chartNode = {
|
|
39377
39581
|
type: "toTree",
|
|
39378
39582
|
title: "To Tree",
|
|
39379
|
-
id: (0,
|
|
39583
|
+
id: (0, import_non_secure97.nanoid)(),
|
|
39380
39584
|
visualData: {
|
|
39381
39585
|
x: 0,
|
|
39382
39586
|
y: 0,
|
|
@@ -39431,7 +39635,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39431
39635
|
];
|
|
39432
39636
|
}
|
|
39433
39637
|
getBody() {
|
|
39434
|
-
return
|
|
39638
|
+
return import_ts_dedent85.dedent`
|
|
39435
39639
|
Format: ${this.data.format}
|
|
39436
39640
|
Children: ${this.data.childrenProperty}
|
|
39437
39641
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -39439,7 +39643,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39439
39643
|
}
|
|
39440
39644
|
static getUIData() {
|
|
39441
39645
|
return {
|
|
39442
|
-
infoBoxBody:
|
|
39646
|
+
infoBoxBody: import_ts_dedent85.dedent`
|
|
39443
39647
|
Converts an array of objects into a tree structure and renders it as text.
|
|
39444
39648
|
|
|
39445
39649
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -39497,14 +39701,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39497
39701
|
var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
39498
39702
|
|
|
39499
39703
|
// src/model/nodes/LoopUntilNode.ts
|
|
39500
|
-
var
|
|
39501
|
-
var
|
|
39704
|
+
var import_non_secure98 = require("nanoid/non-secure");
|
|
39705
|
+
var import_ts_dedent86 = require("ts-dedent");
|
|
39502
39706
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
39503
39707
|
static create() {
|
|
39504
39708
|
const chartNode = {
|
|
39505
39709
|
type: "loopUntil",
|
|
39506
39710
|
title: "Loop Until",
|
|
39507
|
-
id: (0,
|
|
39711
|
+
id: (0, import_non_secure98.nanoid)(),
|
|
39508
39712
|
visualData: {
|
|
39509
39713
|
x: 0,
|
|
39510
39714
|
y: 0,
|
|
@@ -39600,7 +39804,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
39600
39804
|
}
|
|
39601
39805
|
static getUIData() {
|
|
39602
39806
|
return {
|
|
39603
|
-
infoBoxBody:
|
|
39807
|
+
infoBoxBody: import_ts_dedent86.dedent`
|
|
39604
39808
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
39605
39809
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
39606
39810
|
maximum iterations.
|
|
@@ -40013,14 +40217,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
|
|
|
40013
40217
|
var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
40014
40218
|
|
|
40015
40219
|
// src/model/nodes/MCPToolCallNode.ts
|
|
40016
|
-
var
|
|
40017
|
-
var
|
|
40220
|
+
var import_non_secure99 = require("nanoid/non-secure");
|
|
40221
|
+
var import_ts_dedent87 = require("ts-dedent");
|
|
40018
40222
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
40019
40223
|
static create() {
|
|
40020
40224
|
const chartNode = {
|
|
40021
40225
|
type: "mcpToolCall",
|
|
40022
40226
|
title: "MCP Tool Call",
|
|
40023
|
-
id: (0,
|
|
40227
|
+
id: (0, import_non_secure99.nanoid)(),
|
|
40024
40228
|
visualData: {
|
|
40025
40229
|
x: 0,
|
|
40026
40230
|
y: 0,
|
|
@@ -40033,7 +40237,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40033
40237
|
serverUrl: "http://localhost:8080/mcp",
|
|
40034
40238
|
serverId: "",
|
|
40035
40239
|
toolName: "",
|
|
40036
|
-
toolArguments:
|
|
40240
|
+
toolArguments: import_ts_dedent87.dedent`
|
|
40037
40241
|
{
|
|
40038
40242
|
"key": "value"
|
|
40039
40243
|
}`,
|
|
@@ -40125,7 +40329,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40125
40329
|
}
|
|
40126
40330
|
static getUIData() {
|
|
40127
40331
|
return {
|
|
40128
|
-
infoBoxBody:
|
|
40332
|
+
infoBoxBody: import_ts_dedent87.dedent`
|
|
40129
40333
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
40130
40334
|
`,
|
|
40131
40335
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -40189,13 +40393,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40189
40393
|
var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
|
|
40190
40394
|
|
|
40191
40395
|
// src/model/nodes/MCPGetPromptNode.ts
|
|
40192
|
-
var
|
|
40396
|
+
var import_non_secure100 = require("nanoid/non-secure");
|
|
40193
40397
|
var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
40194
40398
|
static create() {
|
|
40195
40399
|
const chartNode = {
|
|
40196
40400
|
type: "mcpGetPrompt",
|
|
40197
40401
|
title: "MCP Get Prompt",
|
|
40198
|
-
id: (0,
|
|
40402
|
+
id: (0, import_non_secure100.nanoid)(),
|
|
40199
40403
|
visualData: {
|
|
40200
40404
|
x: 0,
|
|
40201
40405
|
y: 0,
|
|
@@ -40342,15 +40546,15 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
|
40342
40546
|
var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
40343
40547
|
|
|
40344
40548
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
40345
|
-
var
|
|
40346
|
-
var
|
|
40549
|
+
var import_non_secure101 = require("nanoid/non-secure");
|
|
40550
|
+
var import_ts_dedent88 = require("ts-dedent");
|
|
40347
40551
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
40348
40552
|
static create() {
|
|
40349
40553
|
const chartNode = {
|
|
40350
40554
|
type: "referencedGraphAlias",
|
|
40351
40555
|
title: "",
|
|
40352
40556
|
// Always set initially by the editor
|
|
40353
|
-
id: (0,
|
|
40557
|
+
id: (0, import_non_secure101.nanoid)(),
|
|
40354
40558
|
visualData: {
|
|
40355
40559
|
x: 0,
|
|
40356
40560
|
y: 0,
|
|
@@ -40434,7 +40638,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
40434
40638
|
}
|
|
40435
40639
|
static getUIData() {
|
|
40436
40640
|
return {
|
|
40437
|
-
infoBoxBody:
|
|
40641
|
+
infoBoxBody: import_ts_dedent88.dedent`
|
|
40438
40642
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
40439
40643
|
`,
|
|
40440
40644
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -40514,13 +40718,13 @@ function applyMetricOutputSetting(outputs, outputCostDuration) {
|
|
|
40514
40718
|
}
|
|
40515
40719
|
|
|
40516
40720
|
// src/model/nodes/NodePrefabInstanceNode.ts
|
|
40517
|
-
var
|
|
40721
|
+
var import_non_secure102 = require("nanoid/non-secure");
|
|
40518
40722
|
var NodePrefabInstanceNodeImpl = class extends NodeImpl {
|
|
40519
40723
|
static create() {
|
|
40520
40724
|
return {
|
|
40521
40725
|
type: NODE_PREFAB_INSTANCE_TYPE,
|
|
40522
40726
|
title: "Linked node",
|
|
40523
|
-
id: (0,
|
|
40727
|
+
id: (0, import_non_secure102.nanoid)(),
|
|
40524
40728
|
visualData: {
|
|
40525
40729
|
x: 0,
|
|
40526
40730
|
y: 0,
|
|
@@ -40551,7 +40755,7 @@ var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked
|
|
|
40551
40755
|
|
|
40552
40756
|
// src/model/Nodes.ts
|
|
40553
40757
|
var registerBuiltInNodes = (registry) => {
|
|
40554
|
-
return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(llmProfileNode).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(codeNewNode).register(expressionNode).register(matchNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(reportProgressNode).register(contextNode).register(graphCallPathNode).register(coalesceNode).register(coalesceNewNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(setStoredValueNode).register(getStoredValueNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(knowledgeSourceNode).register(knowledgeDocumentNode).register(syncKnowledgeSourceNode).register(getKnowledgeSourceStatusNode).register(searchKnowledgeNode).register(buildKnowledgeContextNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode).register(nodePrefabInstanceNode);
|
|
40758
|
+
return registry.register(toYamlNode).register(userInputNode).register(textNode).register(llmChatV2Node).register(llmProfileNode).register(chatNode).register(promptNode).register(extractRegexNode).register(codeNode).register(codeNewNode).register(expressionNode).register(matchNode).register(matchCaseNode).register(ifNode).register(readDirectoryNode).register(readFileNode).register(ifElseNode).register(chunkNode).register(graphInputNode).register(graphOutputNode).register(subGraphNode).register(arrayNode).register(extractJsonNode).register(assemblePromptNode).register(loopControllerNode).register(trimChatMessagesNode).register(extractYamlNode).register(externalCallNode).register(extractObjectPathNode).register(raiseEventNode).register(reportProgressNode).register(contextNode).register(graphCallPathNode).register(coalesceNode).register(coalesceNewNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(popNode).register(setGlobalNode).register(getGlobalNode).register(setStoredValueNode).register(getStoredValueNode).register(waitForEventNode).register(gptFunctionNode).register(getEmbeddingNode).register(vectorStoreNode).register(vectorNearestNeighborsNode).register(knowledgeSourceNode).register(knowledgeDocumentNode).register(syncKnowledgeSourceNode).register(getKnowledgeSourceStatusNode).register(searchKnowledgeNode).register(buildKnowledgeContextNode).register(hashNode).register(abortGraphNode).register(raceInputsNode).register(toJsonNode).register(joinNode).register(filterNode).register(jsFilterNode).register(jsMapNode).register(objectNode).register(booleanNode).register(compareNode).register(evaluateNode).register(numberNode).register(randomNumberNode).register(shuffleNode).register(commentNode).register(imageNode).register(audioNode).register(httpCallNode).register(delayNode).register(appendToDatasetNode).register(createDatasetNode).register(loadDatasetNode).register(getAllDatasetsNode).register(splitNode).register(datasetNearestNeighborsNode).register(getDatasetRowNode).register(sliceNode).register(extractMarkdownCodeBlocksNode).register(assembleMessageNode).register(urlReferenceNode).register(destructureNode).register(replaceDatasetNode).register(listGraphsNode).register(graphReferenceNode).register(callGraphNode).register(delegateFunctionCallNode).register(playAudioNode).register(documentNode).register(chatLoopNode).register(readAllFilesNode).register(toMarkdownTableNode).register(cronNode).register(toTreeNode).register(loopUntilNode).register(mcpDiscoveryNode).register(mcpToolCallNode).register(mcpGetPromptNode).register(referencedGraphAliasNode).register(nodePrefabInstanceNode);
|
|
40555
40759
|
};
|
|
40556
40760
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
40557
40761
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -41234,7 +41438,7 @@ function isRecord9(value) {
|
|
|
41234
41438
|
}
|
|
41235
41439
|
|
|
41236
41440
|
// src/recording/ExecutionRecorder.ts
|
|
41237
|
-
var
|
|
41441
|
+
var import_non_secure103 = require("nanoid/non-secure");
|
|
41238
41442
|
var import_emittery2 = __toESM(require("emittery-0-13"), 1);
|
|
41239
41443
|
var import_lodash_es16 = require("lodash");
|
|
41240
41444
|
var import_json_stream_es = require("json-stream-es");
|
|
@@ -41526,7 +41730,7 @@ function serializeToObject(recording) {
|
|
|
41526
41730
|
const asString = uint8ArrayToBase64Sync(val);
|
|
41527
41731
|
const existingAsset = Object.entries(serialized.assets).find(([, asset]) => asset === asString);
|
|
41528
41732
|
if (!existingAsset) {
|
|
41529
|
-
const id = (0,
|
|
41733
|
+
const id = (0, import_non_secure103.nanoid)();
|
|
41530
41734
|
serialized.assets[id] = asString;
|
|
41531
41735
|
return `$ASSET:${id}`;
|
|
41532
41736
|
} else {
|
|
@@ -41586,7 +41790,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
41586
41790
|
recordSocket(channel, options2 = {}) {
|
|
41587
41791
|
return new Promise((resolve) => {
|
|
41588
41792
|
var _a, _b;
|
|
41589
|
-
this.recordingId = (0,
|
|
41793
|
+
this.recordingId = (0, import_non_secure103.nanoid)();
|
|
41590
41794
|
let settled = false;
|
|
41591
41795
|
const finish = (emitFinishedRecording) => {
|
|
41592
41796
|
var _a2;
|
|
@@ -41642,7 +41846,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
41642
41846
|
});
|
|
41643
41847
|
}
|
|
41644
41848
|
record(processor) {
|
|
41645
|
-
this.recordingId = (0,
|
|
41849
|
+
this.recordingId = (0, import_non_secure103.nanoid)();
|
|
41646
41850
|
let settled = false;
|
|
41647
41851
|
const finish = () => {
|
|
41648
41852
|
if (settled) return;
|
|
@@ -41713,8 +41917,8 @@ function isSocketRecordingTerminalEvent(event) {
|
|
|
41713
41917
|
}
|
|
41714
41918
|
|
|
41715
41919
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41716
|
-
var
|
|
41717
|
-
var
|
|
41920
|
+
var import_non_secure104 = require("nanoid/non-secure");
|
|
41921
|
+
var import_ts_dedent89 = require("ts-dedent");
|
|
41718
41922
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
41719
41923
|
|
|
41720
41924
|
// src/utils/assertNever.ts
|
|
@@ -41728,7 +41932,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41728
41932
|
const chartNode = {
|
|
41729
41933
|
type: "chatAnthropic",
|
|
41730
41934
|
title: "Chat (Anthropic, Legacy)",
|
|
41731
|
-
id: (0,
|
|
41935
|
+
id: (0, import_non_secure104.nanoid)(),
|
|
41732
41936
|
visualData: {
|
|
41733
41937
|
x: 0,
|
|
41734
41938
|
y: 0,
|
|
@@ -41878,7 +42082,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41878
42082
|
getBody(data) {
|
|
41879
42083
|
var _a;
|
|
41880
42084
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
41881
|
-
return
|
|
42085
|
+
return import_ts_dedent89.dedent`
|
|
41882
42086
|
${modelName}
|
|
41883
42087
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
41884
42088
|
Max Tokens: ${data.maxTokens}
|
|
@@ -42004,7 +42208,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
42004
42208
|
},
|
|
42005
42209
|
getUIData() {
|
|
42006
42210
|
return {
|
|
42007
|
-
infoBoxBody:
|
|
42211
|
+
infoBoxBody: import_ts_dedent89.dedent`
|
|
42008
42212
|
Legacy Anthropic chat node.
|
|
42009
42213
|
|
|
42010
42214
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -42478,8 +42682,8 @@ var anthropicPlugin = {
|
|
|
42478
42682
|
var anthropic_default = anthropicPlugin;
|
|
42479
42683
|
|
|
42480
42684
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
42481
|
-
var
|
|
42482
|
-
var
|
|
42685
|
+
var import_non_secure105 = require("nanoid/non-secure");
|
|
42686
|
+
var import_ts_dedent90 = require("ts-dedent");
|
|
42483
42687
|
var import_autoevals = require("autoevals");
|
|
42484
42688
|
var import_ts_pattern7 = require("ts-pattern");
|
|
42485
42689
|
var options = [
|
|
@@ -42498,7 +42702,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42498
42702
|
const chartNode = {
|
|
42499
42703
|
type: "autoevals",
|
|
42500
42704
|
title: "Autoevals",
|
|
42501
|
-
id: (0,
|
|
42705
|
+
id: (0, import_non_secure105.nanoid)(),
|
|
42502
42706
|
visualData: {
|
|
42503
42707
|
x: 0,
|
|
42504
42708
|
y: 0,
|
|
@@ -42613,7 +42817,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42613
42817
|
},
|
|
42614
42818
|
getUIData() {
|
|
42615
42819
|
return {
|
|
42616
|
-
infoBoxBody:
|
|
42820
|
+
infoBoxBody: import_ts_dedent90.dedent`
|
|
42617
42821
|
Evaluates the validity of a response using the autoevals library.
|
|
42618
42822
|
`,
|
|
42619
42823
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -42695,8 +42899,8 @@ var autoevalsPlugin = {
|
|
|
42695
42899
|
var autoevals_default = autoevalsPlugin;
|
|
42696
42900
|
|
|
42697
42901
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
42698
|
-
var
|
|
42699
|
-
var
|
|
42902
|
+
var import_non_secure106 = require("nanoid/non-secure");
|
|
42903
|
+
var import_ts_dedent91 = require("ts-dedent");
|
|
42700
42904
|
|
|
42701
42905
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
42702
42906
|
var import_assemblyai = require("assemblyai");
|
|
@@ -42815,7 +43019,7 @@ var LemurQaNodeImpl = {
|
|
|
42815
43019
|
const chartNode = {
|
|
42816
43020
|
type: "assemblyAiLemurQa",
|
|
42817
43021
|
title: "LeMUR Question & Answers",
|
|
42818
|
-
id: (0,
|
|
43022
|
+
id: (0, import_non_secure106.nanoid)(),
|
|
42819
43023
|
visualData: {
|
|
42820
43024
|
x: 0,
|
|
42821
43025
|
y: 0,
|
|
@@ -42881,7 +43085,7 @@ var LemurQaNodeImpl = {
|
|
|
42881
43085
|
},
|
|
42882
43086
|
getUIData() {
|
|
42883
43087
|
return {
|
|
42884
|
-
infoBoxBody:
|
|
43088
|
+
infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
42885
43089
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
42886
43090
|
contextMenuTitle: "LeMUR Q&A",
|
|
42887
43091
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42952,14 +43156,14 @@ function applyQuestionEditors(data, question) {
|
|
|
42952
43156
|
var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
42953
43157
|
|
|
42954
43158
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
42955
|
-
var
|
|
42956
|
-
var
|
|
43159
|
+
var import_non_secure107 = require("nanoid/non-secure");
|
|
43160
|
+
var import_ts_dedent92 = require("ts-dedent");
|
|
42957
43161
|
var TranscribeAudioNodeImpl = {
|
|
42958
43162
|
create() {
|
|
42959
43163
|
const chartNode = {
|
|
42960
43164
|
type: "assemblyAiTranscribeAudio",
|
|
42961
43165
|
title: "Transcribe Audio",
|
|
42962
|
-
id: (0,
|
|
43166
|
+
id: (0, import_non_secure107.nanoid)(),
|
|
42963
43167
|
visualData: {
|
|
42964
43168
|
x: 0,
|
|
42965
43169
|
y: 0,
|
|
@@ -43015,7 +43219,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
43015
43219
|
},
|
|
43016
43220
|
getUIData() {
|
|
43017
43221
|
return {
|
|
43018
|
-
infoBoxBody:
|
|
43222
|
+
infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI to transcribe audio`,
|
|
43019
43223
|
infoBoxTitle: "Transcribe Audio Node",
|
|
43020
43224
|
contextMenuTitle: "Transcribe Audio",
|
|
43021
43225
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43073,15 +43277,15 @@ function getAdditionalParameters(data) {
|
|
|
43073
43277
|
}
|
|
43074
43278
|
|
|
43075
43279
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
43076
|
-
var
|
|
43077
|
-
var
|
|
43280
|
+
var import_non_secure108 = require("nanoid/non-secure");
|
|
43281
|
+
var import_ts_dedent93 = require("ts-dedent");
|
|
43078
43282
|
var import_assemblyai3 = require("assemblyai");
|
|
43079
43283
|
var LemurSummaryNodeImpl = {
|
|
43080
43284
|
create() {
|
|
43081
43285
|
const chartNode = {
|
|
43082
43286
|
type: "assemblyAiLemurSummary",
|
|
43083
43287
|
title: "LeMUR Summary",
|
|
43084
|
-
id: (0,
|
|
43288
|
+
id: (0, import_non_secure108.nanoid)(),
|
|
43085
43289
|
visualData: {
|
|
43086
43290
|
x: 0,
|
|
43087
43291
|
y: 0,
|
|
@@ -43127,7 +43331,7 @@ var LemurSummaryNodeImpl = {
|
|
|
43127
43331
|
},
|
|
43128
43332
|
getUIData() {
|
|
43129
43333
|
return {
|
|
43130
|
-
infoBoxBody:
|
|
43334
|
+
infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
43131
43335
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
43132
43336
|
contextMenuTitle: "LeMUR Summary",
|
|
43133
43337
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43151,15 +43355,15 @@ var LemurSummaryNodeImpl = {
|
|
|
43151
43355
|
var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
|
|
43152
43356
|
|
|
43153
43357
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
43154
|
-
var
|
|
43155
|
-
var
|
|
43358
|
+
var import_non_secure109 = require("nanoid/non-secure");
|
|
43359
|
+
var import_ts_dedent94 = require("ts-dedent");
|
|
43156
43360
|
var import_assemblyai4 = require("assemblyai");
|
|
43157
43361
|
var LemurTaskNodeImpl = {
|
|
43158
43362
|
create() {
|
|
43159
43363
|
const chartNode = {
|
|
43160
43364
|
type: "assemblyAiLemurTask",
|
|
43161
43365
|
title: "LeMUR Task",
|
|
43162
|
-
id: (0,
|
|
43366
|
+
id: (0, import_non_secure109.nanoid)(),
|
|
43163
43367
|
visualData: {
|
|
43164
43368
|
x: 0,
|
|
43165
43369
|
y: 0,
|
|
@@ -43205,7 +43409,7 @@ var LemurTaskNodeImpl = {
|
|
|
43205
43409
|
},
|
|
43206
43410
|
getUIData() {
|
|
43207
43411
|
return {
|
|
43208
|
-
infoBoxBody:
|
|
43412
|
+
infoBoxBody: import_ts_dedent94.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
43209
43413
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
43210
43414
|
contextMenuTitle: "LeMUR Custom Task",
|
|
43211
43415
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43230,14 +43434,14 @@ var LemurTaskNodeImpl = {
|
|
|
43230
43434
|
var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
43231
43435
|
|
|
43232
43436
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
43233
|
-
var
|
|
43234
|
-
var
|
|
43437
|
+
var import_non_secure110 = require("nanoid/non-secure");
|
|
43438
|
+
var import_ts_dedent95 = require("ts-dedent");
|
|
43235
43439
|
var LemurActionItemsNodeImpl = {
|
|
43236
43440
|
create() {
|
|
43237
43441
|
const chartNode = {
|
|
43238
43442
|
type: "assemblyAiLemurActionItems",
|
|
43239
43443
|
title: "LeMUR Action Items",
|
|
43240
|
-
id: (0,
|
|
43444
|
+
id: (0, import_non_secure110.nanoid)(),
|
|
43241
43445
|
visualData: {
|
|
43242
43446
|
x: 0,
|
|
43243
43447
|
y: 0,
|
|
@@ -43283,7 +43487,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
43283
43487
|
},
|
|
43284
43488
|
getUIData() {
|
|
43285
43489
|
return {
|
|
43286
|
-
infoBoxBody:
|
|
43490
|
+
infoBoxBody: import_ts_dedent95.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
43287
43491
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
43288
43492
|
contextMenuTitle: "LeMUR Action Items",
|
|
43289
43493
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43335,12 +43539,12 @@ var assemblyAiPlugin = {
|
|
|
43335
43539
|
var assemblyAi_default = assemblyAiPlugin;
|
|
43336
43540
|
|
|
43337
43541
|
// src/plugins/huggingface/nodes/ChatHuggingFace.ts
|
|
43338
|
-
var
|
|
43542
|
+
var import_non_secure111 = require("nanoid/non-secure");
|
|
43339
43543
|
var import_inference = require("@huggingface/inference");
|
|
43340
43544
|
var ChatHuggingFaceNodeImpl = {
|
|
43341
43545
|
create() {
|
|
43342
43546
|
return {
|
|
43343
|
-
id: (0,
|
|
43547
|
+
id: (0, import_non_secure111.nanoid)(),
|
|
43344
43548
|
type: "chatHuggingFace",
|
|
43345
43549
|
data: {
|
|
43346
43550
|
model: "",
|
|
@@ -43570,13 +43774,13 @@ var ChatHuggingFaceNodeImpl = {
|
|
|
43570
43774
|
var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
|
|
43571
43775
|
|
|
43572
43776
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
43573
|
-
var
|
|
43777
|
+
var import_non_secure112 = require("nanoid/non-secure");
|
|
43574
43778
|
var import_inference2 = require("@huggingface/inference");
|
|
43575
|
-
var
|
|
43779
|
+
var import_ts_dedent96 = require("ts-dedent");
|
|
43576
43780
|
var TextToImageHuggingFaceNodeImpl = {
|
|
43577
43781
|
create() {
|
|
43578
43782
|
return {
|
|
43579
|
-
id: (0,
|
|
43783
|
+
id: (0, import_non_secure112.nanoid)(),
|
|
43580
43784
|
type: "textToImageHuggingFace",
|
|
43581
43785
|
data: {
|
|
43582
43786
|
model: "",
|
|
@@ -43717,7 +43921,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
43717
43921
|
];
|
|
43718
43922
|
},
|
|
43719
43923
|
getBody(data) {
|
|
43720
|
-
return
|
|
43924
|
+
return import_ts_dedent96.dedent`
|
|
43721
43925
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
43722
43926
|
`;
|
|
43723
43927
|
},
|
|
@@ -47257,8 +47461,8 @@ var openAIPlugin = {
|
|
|
47257
47461
|
};
|
|
47258
47462
|
|
|
47259
47463
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
47260
|
-
var
|
|
47261
|
-
var
|
|
47464
|
+
var import_non_secure113 = require("nanoid/non-secure");
|
|
47465
|
+
var import_ts_dedent97 = require("ts-dedent");
|
|
47262
47466
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
47263
47467
|
var import_ts_pattern8 = require("ts-pattern");
|
|
47264
47468
|
var import_genai2 = require("@google/genai");
|
|
@@ -47285,7 +47489,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47285
47489
|
const chartNode = {
|
|
47286
47490
|
type: "chatGoogle",
|
|
47287
47491
|
title: "Chat (Google, Legacy)",
|
|
47288
|
-
id: (0,
|
|
47492
|
+
id: (0, import_non_secure113.nanoid)(),
|
|
47289
47493
|
visualData: {
|
|
47290
47494
|
x: 0,
|
|
47291
47495
|
y: 0,
|
|
@@ -47420,7 +47624,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47420
47624
|
},
|
|
47421
47625
|
getBody(data) {
|
|
47422
47626
|
var _a;
|
|
47423
|
-
return
|
|
47627
|
+
return import_ts_dedent97.dedent`
|
|
47424
47628
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
47425
47629
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
47426
47630
|
Max Tokens: ${data.maxTokens}
|
|
@@ -47508,7 +47712,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47508
47712
|
},
|
|
47509
47713
|
getUIData() {
|
|
47510
47714
|
return {
|
|
47511
|
-
infoBoxBody:
|
|
47715
|
+
infoBoxBody: import_ts_dedent97.dedent`
|
|
47512
47716
|
Legacy Google chat node.
|
|
47513
47717
|
|
|
47514
47718
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -48516,6 +48720,7 @@ var Rivet = void 0;
|
|
|
48516
48720
|
MCPGetPromptNodeImpl,
|
|
48517
48721
|
MCPToolCallNodeImpl,
|
|
48518
48722
|
ManagedKnowledgeStore,
|
|
48723
|
+
MatchCaseNodeImpl,
|
|
48519
48724
|
MatchNodeImpl,
|
|
48520
48725
|
NODE_PREFAB_INSTANCE_TYPE,
|
|
48521
48726
|
NodeImpl,
|
|
@@ -48894,6 +49099,7 @@ var Rivet = void 0;
|
|
|
48894
49099
|
loopUntilNode,
|
|
48895
49100
|
looseDataValueToDataValue,
|
|
48896
49101
|
looseDataValuesToDataValues,
|
|
49102
|
+
matchCaseNode,
|
|
48897
49103
|
matchNode,
|
|
48898
49104
|
materializeChatV2PipelineFailure,
|
|
48899
49105
|
materializeLLMResponse,
|
|
@@ -48973,6 +49179,7 @@ var Rivet = void 0;
|
|
|
48973
49179
|
reconcileUiGraphChatActionBindings,
|
|
48974
49180
|
reconcileUiGraphRunGraphActionBindings,
|
|
48975
49181
|
referencedGraphAliasNode,
|
|
49182
|
+
regexMatchLegacyDisplayName,
|
|
48976
49183
|
registerBuiltInNodes,
|
|
48977
49184
|
registerIntegration,
|
|
48978
49185
|
registerKnowledgeStoreProvider,
|