@valerypopoff/rivet2-core 2.11.0 → 2.13.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 +1419 -676
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/exports.js +1 -0
- package/dist/esm/model/GraphInputStream.js +70 -0
- package/dist/esm/model/GraphProcessor.js +257 -16
- package/dist/esm/model/NodeExecutionPlanner.js +4 -4
- package/dist/esm/model/Nodes.js +6 -0
- package/dist/esm/model/ProcessContextBuilder.js +2 -1
- package/dist/esm/model/StreamingOutputWatch.js +5 -0
- package/dist/esm/model/StreamingWatchTopology.js +191 -0
- package/dist/esm/model/nodes/AssembleMessageNode.js +2 -2
- package/dist/esm/model/nodes/AssemblePromptNode.js +46 -17
- package/dist/esm/model/nodes/CoalesceNewNode.js +1 -1
- package/dist/esm/model/nodes/CoalesceNode.js +1 -1
- package/dist/esm/model/nodes/GraphInputNode.js +15 -19
- 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/esm/model/nodes/ProjectNameNode.js +37 -0
- package/dist/esm/model/nodes/ReferencedGraphAliasNode.js +1 -0
- package/dist/esm/model/nodes/SubGraphNode.js +1 -0
- package/dist/esm/model/nodes/variadicPortIndex.js +1 -1
- package/dist/types/exports.d.ts +2 -0
- package/dist/types/model/EditorDefinition.d.ts +2 -0
- package/dist/types/model/GraphInputStream.d.ts +23 -0
- package/dist/types/model/GraphProcessor.d.ts +3 -0
- package/dist/types/model/NodeExecutionPlanner.d.ts +1 -1
- package/dist/types/model/Nodes.d.ts +4 -2
- package/dist/types/model/ProcessContext.d.ts +3 -0
- package/dist/types/model/ProcessContextBuilder.d.ts +2 -1
- package/dist/types/model/StreamingOutputWatch.d.ts +2 -0
- package/dist/types/model/StreamingWatchTopology.d.ts +20 -0
- package/dist/types/model/nodes/AssemblePromptNode.d.ts +4 -3
- package/dist/types/model/nodes/GraphInputNode.d.ts +2 -0
- 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/dist/types/model/nodes/ProjectNameNode.d.ts +12 -0
- package/dist/types/model/nodes/variadicPortIndex.d.ts +1 -0
- 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,
|
|
@@ -148,6 +149,7 @@ __export(src_exports, {
|
|
|
148
149
|
PlayAudioNodeImpl: () => PlayAudioNodeImpl,
|
|
149
150
|
PluginNodeImplClass: () => PluginNodeImplClass,
|
|
150
151
|
PopNodeImpl: () => PopNodeImpl,
|
|
152
|
+
ProjectNameNodeImpl: () => ProjectNameNodeImpl,
|
|
151
153
|
ProjectValidationError: () => ProjectValidationError,
|
|
152
154
|
PromptNodeImpl: () => PromptNodeImpl,
|
|
153
155
|
RIVET_MARKDOWN_ALLOWED_ATTRIBUTES: () => RIVET_MARKDOWN_ALLOWED_ATTRIBUTES,
|
|
@@ -241,6 +243,8 @@ __export(src_exports, {
|
|
|
241
243
|
canBeCoercedAny: () => canBeCoercedAny,
|
|
242
244
|
canConsumeControlFlowExcludedInput: () => canConsumeControlFlowExcludedInput,
|
|
243
245
|
canRenderDataBusNode: () => canRenderDataBusNode,
|
|
246
|
+
canStreamThroughGraphCaller: () => canStreamThroughGraphCaller,
|
|
247
|
+
canStreamThroughGraphInput: () => canStreamThroughGraphInput,
|
|
244
248
|
canUseNodeAsPrefabSource: () => canUseNodeAsPrefabSource,
|
|
245
249
|
chatLoopLegacyDisplayName: () => chatLoopLegacyDisplayName,
|
|
246
250
|
chatLoopNode: () => chatLoopNode,
|
|
@@ -403,6 +407,7 @@ __export(src_exports, {
|
|
|
403
407
|
getProjectConnectionComparisonKey: () => getProjectConnectionComparisonKey,
|
|
404
408
|
getProjectGlobalVariableIds: () => getProjectGlobalVariableIds,
|
|
405
409
|
getProjectNodeFieldComparisons: () => getProjectNodeFieldComparisons,
|
|
410
|
+
getProjectStreamingOutputWatchConnections: () => getProjectStreamingOutputWatchConnections,
|
|
406
411
|
getReconciledUiGraphActionInputBindings: () => getReconciledUiGraphActionInputBindings,
|
|
407
412
|
getReconciledUiGraphActionOutputBindings: () => getReconciledUiGraphActionOutputBindings,
|
|
408
413
|
getScalarTypeOf: () => getScalarTypeOf,
|
|
@@ -514,6 +519,7 @@ __export(src_exports, {
|
|
|
514
519
|
loopUntilNode: () => loopUntilNode,
|
|
515
520
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
516
521
|
looseDataValuesToDataValues: () => looseDataValuesToDataValues,
|
|
522
|
+
matchCaseNode: () => matchCaseNode,
|
|
517
523
|
matchNode: () => matchNode,
|
|
518
524
|
materializeChatV2PipelineFailure: () => materializeChatV2PipelineFailure,
|
|
519
525
|
materializeLLMResponse: () => materializeLLMResponse,
|
|
@@ -578,6 +584,7 @@ __export(src_exports, {
|
|
|
578
584
|
popNode: () => popNode,
|
|
579
585
|
projectLLMChatV2EditorCacheHit: () => projectLLMChatV2EditorCacheHit,
|
|
580
586
|
projectLLMInvocationUsage: () => projectLLMInvocationUsage,
|
|
587
|
+
projectNameNode: () => projectNameNode,
|
|
581
588
|
promptNode: () => promptNode,
|
|
582
589
|
protectEscapedInterpolationTokens: () => protectEscapedInterpolationTokens,
|
|
583
590
|
raceInputsNode: () => raceInputsNode,
|
|
@@ -593,6 +600,7 @@ __export(src_exports, {
|
|
|
593
600
|
reconcileUiGraphChatActionBindings: () => reconcileUiGraphChatActionBindings,
|
|
594
601
|
reconcileUiGraphRunGraphActionBindings: () => reconcileUiGraphRunGraphActionBindings,
|
|
595
602
|
referencedGraphAliasNode: () => referencedGraphAliasNode,
|
|
603
|
+
regexMatchLegacyDisplayName: () => regexMatchLegacyDisplayName,
|
|
596
604
|
registerBuiltInNodes: () => registerBuiltInNodes,
|
|
597
605
|
registerIntegration: () => registerIntegration,
|
|
598
606
|
registerKnowledgeStoreProvider: () => registerKnowledgeStoreProvider,
|
|
@@ -608,6 +616,7 @@ __export(src_exports, {
|
|
|
608
616
|
resolveChatV2ProviderConfig: () => resolveChatV2ProviderConfig,
|
|
609
617
|
resolveChatV2ResponseFormatParameters: () => resolveChatV2ResponseFormatParameters,
|
|
610
618
|
resolveCodeInterpolationExpression: () => resolveCodeInterpolationExpression,
|
|
619
|
+
resolveGraphInputValue: () => resolveGraphInputValue,
|
|
611
620
|
resolveInterpolationExpressionRawValue: () => resolveInterpolationExpressionRawValue,
|
|
612
621
|
resolveInterpolationTokenRawValue: () => resolveInterpolationTokenRawValue,
|
|
613
622
|
resolveLLMChatV2RuntimeProviderOptions: () => resolveLLMChatV2RuntimeProviderOptions,
|
|
@@ -798,6 +807,7 @@ __export(exports_exports, {
|
|
|
798
807
|
MCPGetPromptNodeImpl: () => MCPGetPromptNodeImpl,
|
|
799
808
|
MCPToolCallNodeImpl: () => MCPToolCallNodeImpl,
|
|
800
809
|
ManagedKnowledgeStore: () => ManagedKnowledgeStore,
|
|
810
|
+
MatchCaseNodeImpl: () => MatchCaseNodeImpl,
|
|
801
811
|
MatchNodeImpl: () => MatchNodeImpl,
|
|
802
812
|
NODE_PREFAB_INSTANCE_TYPE: () => NODE_PREFAB_INSTANCE_TYPE,
|
|
803
813
|
NodeImpl: () => NodeImpl,
|
|
@@ -810,6 +820,7 @@ __export(exports_exports, {
|
|
|
810
820
|
PlayAudioNodeImpl: () => PlayAudioNodeImpl,
|
|
811
821
|
PluginNodeImplClass: () => PluginNodeImplClass,
|
|
812
822
|
PopNodeImpl: () => PopNodeImpl,
|
|
823
|
+
ProjectNameNodeImpl: () => ProjectNameNodeImpl,
|
|
813
824
|
ProjectValidationError: () => ProjectValidationError,
|
|
814
825
|
PromptNodeImpl: () => PromptNodeImpl,
|
|
815
826
|
RIVET_MARKDOWN_ALLOWED_ATTRIBUTES: () => RIVET_MARKDOWN_ALLOWED_ATTRIBUTES,
|
|
@@ -902,6 +913,8 @@ __export(exports_exports, {
|
|
|
902
913
|
canBeCoercedAny: () => canBeCoercedAny,
|
|
903
914
|
canConsumeControlFlowExcludedInput: () => canConsumeControlFlowExcludedInput,
|
|
904
915
|
canRenderDataBusNode: () => canRenderDataBusNode,
|
|
916
|
+
canStreamThroughGraphCaller: () => canStreamThroughGraphCaller,
|
|
917
|
+
canStreamThroughGraphInput: () => canStreamThroughGraphInput,
|
|
905
918
|
canUseNodeAsPrefabSource: () => canUseNodeAsPrefabSource,
|
|
906
919
|
chatLoopLegacyDisplayName: () => chatLoopLegacyDisplayName,
|
|
907
920
|
chatLoopNode: () => chatLoopNode,
|
|
@@ -1064,6 +1077,7 @@ __export(exports_exports, {
|
|
|
1064
1077
|
getProjectConnectionComparisonKey: () => getProjectConnectionComparisonKey,
|
|
1065
1078
|
getProjectGlobalVariableIds: () => getProjectGlobalVariableIds,
|
|
1066
1079
|
getProjectNodeFieldComparisons: () => getProjectNodeFieldComparisons,
|
|
1080
|
+
getProjectStreamingOutputWatchConnections: () => getProjectStreamingOutputWatchConnections,
|
|
1067
1081
|
getReconciledUiGraphActionInputBindings: () => getReconciledUiGraphActionInputBindings,
|
|
1068
1082
|
getReconciledUiGraphActionOutputBindings: () => getReconciledUiGraphActionOutputBindings,
|
|
1069
1083
|
getScalarTypeOf: () => getScalarTypeOf,
|
|
@@ -1175,6 +1189,7 @@ __export(exports_exports, {
|
|
|
1175
1189
|
loopUntilNode: () => loopUntilNode,
|
|
1176
1190
|
looseDataValueToDataValue: () => looseDataValueToDataValue,
|
|
1177
1191
|
looseDataValuesToDataValues: () => looseDataValuesToDataValues,
|
|
1192
|
+
matchCaseNode: () => matchCaseNode,
|
|
1178
1193
|
matchNode: () => matchNode,
|
|
1179
1194
|
materializeChatV2PipelineFailure: () => materializeChatV2PipelineFailure,
|
|
1180
1195
|
materializeLLMResponse: () => materializeLLMResponse,
|
|
@@ -1239,6 +1254,7 @@ __export(exports_exports, {
|
|
|
1239
1254
|
popNode: () => popNode,
|
|
1240
1255
|
projectLLMChatV2EditorCacheHit: () => projectLLMChatV2EditorCacheHit,
|
|
1241
1256
|
projectLLMInvocationUsage: () => projectLLMInvocationUsage,
|
|
1257
|
+
projectNameNode: () => projectNameNode,
|
|
1242
1258
|
promptNode: () => promptNode,
|
|
1243
1259
|
protectEscapedInterpolationTokens: () => protectEscapedInterpolationTokens,
|
|
1244
1260
|
raceInputsNode: () => raceInputsNode,
|
|
@@ -1254,6 +1270,7 @@ __export(exports_exports, {
|
|
|
1254
1270
|
reconcileUiGraphChatActionBindings: () => reconcileUiGraphChatActionBindings,
|
|
1255
1271
|
reconcileUiGraphRunGraphActionBindings: () => reconcileUiGraphRunGraphActionBindings,
|
|
1256
1272
|
referencedGraphAliasNode: () => referencedGraphAliasNode,
|
|
1273
|
+
regexMatchLegacyDisplayName: () => regexMatchLegacyDisplayName,
|
|
1257
1274
|
registerBuiltInNodes: () => registerBuiltInNodes,
|
|
1258
1275
|
registerIntegration: () => registerIntegration,
|
|
1259
1276
|
registerKnowledgeStoreProvider: () => registerKnowledgeStoreProvider,
|
|
@@ -1269,6 +1286,7 @@ __export(exports_exports, {
|
|
|
1269
1286
|
resolveChatV2ProviderConfig: () => resolveChatV2ProviderConfig,
|
|
1270
1287
|
resolveChatV2ResponseFormatParameters: () => resolveChatV2ResponseFormatParameters,
|
|
1271
1288
|
resolveCodeInterpolationExpression: () => resolveCodeInterpolationExpression,
|
|
1289
|
+
resolveGraphInputValue: () => resolveGraphInputValue,
|
|
1272
1290
|
resolveInterpolationExpressionRawValue: () => resolveInterpolationExpressionRawValue,
|
|
1273
1291
|
resolveInterpolationTokenRawValue: () => resolveInterpolationTokenRawValue,
|
|
1274
1292
|
resolveLLMChatV2RuntimeProviderOptions: () => resolveLLMChatV2RuntimeProviderOptions,
|
|
@@ -6329,7 +6347,7 @@ var pQueueCompat_default = PQueue;
|
|
|
6329
6347
|
|
|
6330
6348
|
// src/model/GraphProcessor.ts
|
|
6331
6349
|
var import_emittery = __toESM(require("emittery-0-13"), 1);
|
|
6332
|
-
var
|
|
6350
|
+
var import_non_secure8 = require("nanoid/non-secure");
|
|
6333
6351
|
|
|
6334
6352
|
// src/model/CycleDetector.ts
|
|
6335
6353
|
function findStronglyConnectedComponents(nodes, getAdjacentNodes) {
|
|
@@ -8082,6 +8100,7 @@ function buildNodeProcessContext(options2) {
|
|
|
8082
8100
|
node,
|
|
8083
8101
|
nodeAbortController,
|
|
8084
8102
|
onGraphOutputPartial,
|
|
8103
|
+
graphInputStreams,
|
|
8085
8104
|
onPartialOutputs,
|
|
8086
8105
|
setFailureOutputs,
|
|
8087
8106
|
processId,
|
|
@@ -8106,6 +8125,7 @@ function buildNodeProcessContext(options2) {
|
|
|
8106
8125
|
waitForStoredValue: (key, signal = nodeAbortController.signal) => base.waitForStoredValue(key, signal),
|
|
8107
8126
|
externalFunctions: { ...externalFunctions },
|
|
8108
8127
|
onGraphOutputPartial,
|
|
8128
|
+
graphInputStreams,
|
|
8109
8129
|
onPartialOutputs,
|
|
8110
8130
|
setFailureOutputs,
|
|
8111
8131
|
signal: nodeAbortController.signal,
|
|
@@ -8519,18 +8539,18 @@ function getMissingRequiredInputs(state, node) {
|
|
|
8519
8539
|
});
|
|
8520
8540
|
}
|
|
8521
8541
|
function getWaitingForInputNode(state, node, inputNodes, inputValues) {
|
|
8522
|
-
let waitingForInputNode
|
|
8542
|
+
let waitingForInputNode;
|
|
8523
8543
|
const anyInputIsValid = Object.values(inputValues).some((value) => value && !isControlFlowExcluded(value));
|
|
8524
8544
|
for (const inputNode of inputNodes) {
|
|
8525
8545
|
if (node.type === "loopController" && !state.loopControllersSeen.has(node.id) && nodesAreInSameCycle(state, node.id, inputNode.id)) {
|
|
8526
8546
|
continue;
|
|
8527
8547
|
}
|
|
8528
8548
|
if (node.type === "raceInputs" && state.visitedNodes.has(inputNode.id) && anyInputIsValid) {
|
|
8529
|
-
waitingForInputNode =
|
|
8549
|
+
waitingForInputNode = void 0;
|
|
8530
8550
|
break;
|
|
8531
8551
|
}
|
|
8532
|
-
if (waitingForInputNode ===
|
|
8533
|
-
waitingForInputNode = inputNode
|
|
8552
|
+
if (waitingForInputNode === void 0 && state.visitedNodes.has(inputNode.id) === false) {
|
|
8553
|
+
waitingForInputNode = inputNode;
|
|
8534
8554
|
}
|
|
8535
8555
|
}
|
|
8536
8556
|
return waitingForInputNode;
|
|
@@ -9862,6 +9882,11 @@ var StreamingOutputWatch = class {
|
|
|
9862
9882
|
this.#run = run;
|
|
9863
9883
|
this.#onFailure = onFailure;
|
|
9864
9884
|
}
|
|
9885
|
+
/** Updates superseded before the receiving graph could start. */
|
|
9886
|
+
accountCoalescedUpdates(count) {
|
|
9887
|
+
this.#receivedUpdates += count;
|
|
9888
|
+
this.#coalescedUpdates += count;
|
|
9889
|
+
}
|
|
9865
9890
|
get hasPending() {
|
|
9866
9891
|
return this.#activeRuns.size > 0 || !this.#stopped && (this.#queue.length > 0 || this.#timer != null);
|
|
9867
9892
|
}
|
|
@@ -10214,6 +10239,353 @@ function withEventOccurredAt(data, eventOccurredAt) {
|
|
|
10214
10239
|
return { ...data, eventOccurredAt };
|
|
10215
10240
|
}
|
|
10216
10241
|
|
|
10242
|
+
// src/model/GraphInputStream.ts
|
|
10243
|
+
var GraphInputStreamRelay = class {
|
|
10244
|
+
result;
|
|
10245
|
+
settled;
|
|
10246
|
+
#resolve;
|
|
10247
|
+
#listener;
|
|
10248
|
+
#latest;
|
|
10249
|
+
#coalesced = 0;
|
|
10250
|
+
#disposed = false;
|
|
10251
|
+
constructor() {
|
|
10252
|
+
this.settled = new Promise((resolve) => {
|
|
10253
|
+
this.#resolve = resolve;
|
|
10254
|
+
});
|
|
10255
|
+
}
|
|
10256
|
+
publish(value, coalesced = 0) {
|
|
10257
|
+
if (this.result || this.#disposed) return;
|
|
10258
|
+
const snapshot = cloneExecutionOutputs({ ["value"]: value })["value"];
|
|
10259
|
+
if (this.#listener) this.#listener(snapshot, coalesced);
|
|
10260
|
+
else {
|
|
10261
|
+
this.#coalesced += coalesced;
|
|
10262
|
+
if (this.#latest) this.#coalesced++;
|
|
10263
|
+
this.#latest = snapshot;
|
|
10264
|
+
}
|
|
10265
|
+
}
|
|
10266
|
+
finish(result) {
|
|
10267
|
+
var _a;
|
|
10268
|
+
if (this.result) return;
|
|
10269
|
+
this.result = result.error ? result : {
|
|
10270
|
+
value: cloneExecutionOutputs({ ["value"]: result.value })["value"]
|
|
10271
|
+
};
|
|
10272
|
+
if (result.error || ((_a = result.value) == null ? void 0 : _a.type) === "control-flow-excluded") {
|
|
10273
|
+
this.#latest = void 0;
|
|
10274
|
+
this.#coalesced = 0;
|
|
10275
|
+
}
|
|
10276
|
+
this.#resolve(this.result);
|
|
10277
|
+
}
|
|
10278
|
+
subscribe(listener) {
|
|
10279
|
+
if (this.#disposed) return () => {
|
|
10280
|
+
};
|
|
10281
|
+
if (this.#listener) throw new Error("Graph input stream already has a subscriber");
|
|
10282
|
+
this.#listener = listener;
|
|
10283
|
+
const dispose = () => {
|
|
10284
|
+
if (this.#listener !== listener) return;
|
|
10285
|
+
this.#listener = void 0;
|
|
10286
|
+
this.#disposed = true;
|
|
10287
|
+
this.#latest = void 0;
|
|
10288
|
+
};
|
|
10289
|
+
try {
|
|
10290
|
+
if (this.#latest) listener(this.#latest, this.#coalesced);
|
|
10291
|
+
return dispose;
|
|
10292
|
+
} catch (error) {
|
|
10293
|
+
dispose();
|
|
10294
|
+
throw error;
|
|
10295
|
+
} finally {
|
|
10296
|
+
this.#latest = void 0;
|
|
10297
|
+
this.#coalesced = 0;
|
|
10298
|
+
}
|
|
10299
|
+
}
|
|
10300
|
+
};
|
|
10301
|
+
|
|
10302
|
+
// src/model/StreamingWatchTopology.ts
|
|
10303
|
+
function canStreamThroughGraphCaller(node) {
|
|
10304
|
+
return (node.type === "subGraph" || node.type === "referencedGraphAlias") && !node.disabled && !node.isConditional && !node.isSplitRun && !node.data.useErrorOutput;
|
|
10305
|
+
}
|
|
10306
|
+
function canStreamThroughGraphInput(node) {
|
|
10307
|
+
return node.type === "graphInput" && !node.disabled && !node.isConditional && !node.isSplitRun && !node.data.useDefaultValueInput;
|
|
10308
|
+
}
|
|
10309
|
+
function getProjectStreamingOutputWatchConnections({
|
|
10310
|
+
project,
|
|
10311
|
+
graph,
|
|
10312
|
+
referencedProjects,
|
|
10313
|
+
registry,
|
|
10314
|
+
frozenNodeOutputs = {},
|
|
10315
|
+
isNodeFrozen,
|
|
10316
|
+
fullGraphCallers
|
|
10317
|
+
}) {
|
|
10318
|
+
var _a, _b, _c, _d;
|
|
10319
|
+
const currentProject = {
|
|
10320
|
+
...project,
|
|
10321
|
+
graphs: { ...project.graphs, ...((_a = graph.metadata) == null ? void 0 : _a.id) ? { [graph.metadata.id]: graph } : {} }
|
|
10322
|
+
};
|
|
10323
|
+
const projects = { ...referencedProjects, [project.metadata.id]: currentProject };
|
|
10324
|
+
const contexts = /* @__PURE__ */ new Map();
|
|
10325
|
+
const isFrozen = (owner, candidate, node) => {
|
|
10326
|
+
var _a2, _b2, _c2;
|
|
10327
|
+
return (isNodeFrozen == null ? void 0 : isNodeFrozen(owner, candidate, node)) ?? (owner === currentProject && !!(((_a2 = candidate.metadata) == null ? void 0 : _a2.id) && ((_c2 = (_b2 = frozenNodeOutputs[candidate.metadata.id]) == null ? void 0 : _b2[node.id]) == null ? void 0 : _c2.length)));
|
|
10328
|
+
};
|
|
10329
|
+
for (const owner of Object.values(projects)) {
|
|
10330
|
+
for (const candidate of Object.values(owner.graphs)) {
|
|
10331
|
+
const nodes = Object.fromEntries(
|
|
10332
|
+
candidate.nodes.map((node) => [node.id, resolveNodePrefabInstance(owner, node)])
|
|
10333
|
+
);
|
|
10334
|
+
const connectionsByNode = /* @__PURE__ */ new Map();
|
|
10335
|
+
for (const edge of candidate.connections) {
|
|
10336
|
+
for (const id of /* @__PURE__ */ new Set([edge.inputNodeId, edge.outputNodeId])) {
|
|
10337
|
+
const edges = connectionsByNode.get(id) ?? [];
|
|
10338
|
+
edges.push(edge);
|
|
10339
|
+
connectionsByNode.set(id, edges);
|
|
10340
|
+
}
|
|
10341
|
+
}
|
|
10342
|
+
const ports = /* @__PURE__ */ new Map();
|
|
10343
|
+
const getPorts = (nodeId) => {
|
|
10344
|
+
const cached = ports.get(nodeId);
|
|
10345
|
+
if (cached) return cached;
|
|
10346
|
+
const node = nodes[nodeId];
|
|
10347
|
+
let definitions = { inputs: /* @__PURE__ */ new Set(), outputs: /* @__PURE__ */ new Set() };
|
|
10348
|
+
try {
|
|
10349
|
+
if (!node) return definitions;
|
|
10350
|
+
const impl = registry.createDynamicImpl(node);
|
|
10351
|
+
const connections = connectionsByNode.get(node.id) ?? [];
|
|
10352
|
+
definitions = {
|
|
10353
|
+
inputs: new Set(
|
|
10354
|
+
impl.getInputDefinitionsIncludingBuiltIn(connections, nodes, owner, projects).map((port) => port.id)
|
|
10355
|
+
),
|
|
10356
|
+
outputs: new Set(impl.getOutputDefinitions(connections, nodes, owner, projects).map((port) => port.id))
|
|
10357
|
+
};
|
|
10358
|
+
} catch {
|
|
10359
|
+
}
|
|
10360
|
+
ports.set(nodeId, definitions);
|
|
10361
|
+
return definitions;
|
|
10362
|
+
};
|
|
10363
|
+
const incomingByNode = /* @__PURE__ */ new Map();
|
|
10364
|
+
const incoming = (nodeId) => {
|
|
10365
|
+
let edges = incomingByNode.get(nodeId);
|
|
10366
|
+
if (!edges) {
|
|
10367
|
+
edges = (connectionsByNode.get(nodeId) ?? []).filter(
|
|
10368
|
+
(edge) => edge.inputNodeId === nodeId && getPorts(nodeId).inputs.has(edge.inputId) && getPorts(edge.outputNodeId).outputs.has(edge.outputId)
|
|
10369
|
+
);
|
|
10370
|
+
incomingByNode.set(nodeId, edges);
|
|
10371
|
+
}
|
|
10372
|
+
return edges;
|
|
10373
|
+
};
|
|
10374
|
+
contexts.set(candidate, { project: owner, nodes, incoming, marked: /* @__PURE__ */ new Set() });
|
|
10375
|
+
}
|
|
10376
|
+
}
|
|
10377
|
+
const callers = /* @__PURE__ */ new Map();
|
|
10378
|
+
for (const [parent, context] of contexts) {
|
|
10379
|
+
for (const node of Object.values(context.nodes)) {
|
|
10380
|
+
if (node.disabled || isFrozen(context.project, parent, node) || !canStreamThroughGraphCaller(node)) continue;
|
|
10381
|
+
const caller = node;
|
|
10382
|
+
const owner = caller.type === "subGraph" ? context.project : projects[caller.data.projectId];
|
|
10383
|
+
const child = owner == null ? void 0 : owner.graphs[caller.data.graphId];
|
|
10384
|
+
if (!child) continue;
|
|
10385
|
+
let selected;
|
|
10386
|
+
if (caller.type === "subGraph" && caller.data.skipUnusedOutputs && !caller.data.useAsGraphPartialOutput && !(parent === graph && (fullGraphCallers == null ? void 0 : fullGraphCallers.has(caller.id)))) {
|
|
10387
|
+
const childContext = contexts.get(child);
|
|
10388
|
+
const outputNames = new Set(
|
|
10389
|
+
Object.values(childContext.nodes).filter((node2) => node2.type === "graphOutput").map((node2) => node2.data.id)
|
|
10390
|
+
);
|
|
10391
|
+
const outputs = parent.connections.filter((edge) => edge.outputNodeId === caller.id).map((edge) => edge.outputId).filter((id) => outputNames.has(id));
|
|
10392
|
+
try {
|
|
10393
|
+
selected = createGraphOutputSelection(
|
|
10394
|
+
{ ...child, nodes: Object.values(childContext.nodes) },
|
|
10395
|
+
outputs,
|
|
10396
|
+
(node2) => childContext.incoming(node2.id).map((edge) => childContext.nodes[edge.outputNodeId])
|
|
10397
|
+
).nodeIds;
|
|
10398
|
+
} catch {
|
|
10399
|
+
continue;
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10402
|
+
const entries2 = callers.get(child) ?? [];
|
|
10403
|
+
entries2.push({ graph: parent, node, selected });
|
|
10404
|
+
callers.set(child, entries2);
|
|
10405
|
+
}
|
|
10406
|
+
}
|
|
10407
|
+
const pending = [];
|
|
10408
|
+
for (const [candidate, context] of contexts) {
|
|
10409
|
+
for (const node of Object.values(context.nodes)) {
|
|
10410
|
+
if (node.type !== "watchStreamingOutput" || node.disabled || isFrozen(context.project, candidate, node)) continue;
|
|
10411
|
+
const inputs = context.incoming(node.id).filter((edge) => edge.inputId === "stream");
|
|
10412
|
+
if (inputs.length === 1) pending.push({ graph: candidate, edge: inputs[0] });
|
|
10413
|
+
}
|
|
10414
|
+
}
|
|
10415
|
+
while (pending.length) {
|
|
10416
|
+
const { graph: candidate, edge } = pending.pop();
|
|
10417
|
+
const context = contexts.get(candidate);
|
|
10418
|
+
if (context.marked.has(edge)) continue;
|
|
10419
|
+
const route = /* @__PURE__ */ new Set([edge]);
|
|
10420
|
+
let producerEdge = edge;
|
|
10421
|
+
let source = context.nodes[producerEdge.outputNodeId];
|
|
10422
|
+
while (source && canRenderDataBusNode(source)) {
|
|
10423
|
+
const channel = getDataBusOutputChannelIndex(producerEdge.outputId);
|
|
10424
|
+
const providers2 = context.incoming(source.id).filter((input) => getDataBusInputChannelIndex(input.inputId) === channel);
|
|
10425
|
+
if (channel == null || providers2.length !== 1 || route.has(providers2[0])) {
|
|
10426
|
+
source = void 0;
|
|
10427
|
+
break;
|
|
10428
|
+
}
|
|
10429
|
+
producerEdge = providers2[0];
|
|
10430
|
+
route.add(producerEdge);
|
|
10431
|
+
source = context.nodes[producerEdge.outputNodeId];
|
|
10432
|
+
}
|
|
10433
|
+
if (!source || source.disabled || source.type === "dataBus") continue;
|
|
10434
|
+
if (((_b = context.nodes[edge.inputNodeId]) == null ? void 0 : _b.type) === "graphOutput" && source.isSplitRun) continue;
|
|
10435
|
+
for (const segment of route) context.marked.add(segment);
|
|
10436
|
+
if (source.isSplitRun || isFrozen(context.project, candidate, source)) continue;
|
|
10437
|
+
if (source.type === "graphInput" && producerEdge.outputId === "data") {
|
|
10438
|
+
if (!canStreamThroughGraphInput(source)) continue;
|
|
10439
|
+
const inputName = source.data.id;
|
|
10440
|
+
for (const parent of callers.get(candidate) ?? []) {
|
|
10441
|
+
if (parent.selected && !parent.selected.has(edge.inputNodeId)) continue;
|
|
10442
|
+
for (const input of contexts.get(parent.graph).incoming(parent.node.id)) {
|
|
10443
|
+
if (input.inputId === inputName) pending.push({ graph: parent.graph, edge: input });
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
continue;
|
|
10447
|
+
}
|
|
10448
|
+
if (!canStreamThroughGraphCaller(source)) continue;
|
|
10449
|
+
const caller = source;
|
|
10450
|
+
const childProject = caller.type === "subGraph" ? context.project : projects[caller.data.projectId];
|
|
10451
|
+
const child = childProject == null ? void 0 : childProject.graphs[caller.data.graphId];
|
|
10452
|
+
const childContext = child && contexts.get(child);
|
|
10453
|
+
if (!child || !childContext) continue;
|
|
10454
|
+
const outputs = Object.values(childContext.nodes).filter(
|
|
10455
|
+
(node) => node.type === "graphOutput" && !node.disabled && node.data.id === producerEdge.outputId
|
|
10456
|
+
);
|
|
10457
|
+
if (outputs.length !== 1) continue;
|
|
10458
|
+
const output = outputs[0];
|
|
10459
|
+
if (output.isConditional || output.isSplitRun || isFrozen(childProject, child, output)) continue;
|
|
10460
|
+
for (const input of childContext.incoming(output.id)) {
|
|
10461
|
+
if (input.inputId === "value" && !((_c = childContext.nodes[input.outputNodeId]) == null ? void 0 : _c.isSplitRun)) {
|
|
10462
|
+
pending.push({ graph: child, edge: input });
|
|
10463
|
+
}
|
|
10464
|
+
}
|
|
10465
|
+
}
|
|
10466
|
+
return ((_d = contexts.get(graph)) == null ? void 0 : _d.marked) ?? /* @__PURE__ */ new Set();
|
|
10467
|
+
}
|
|
10468
|
+
|
|
10469
|
+
// src/model/nodes/GraphInputNode.ts
|
|
10470
|
+
var import_non_secure7 = require("nanoid/non-secure");
|
|
10471
|
+
var import_ts_dedent3 = require("ts-dedent");
|
|
10472
|
+
var GraphInputNodeImpl = class extends NodeImpl {
|
|
10473
|
+
static create() {
|
|
10474
|
+
const chartNode = {
|
|
10475
|
+
type: "graphInput",
|
|
10476
|
+
title: "Graph Input",
|
|
10477
|
+
id: (0, import_non_secure7.nanoid)(),
|
|
10478
|
+
visualData: {
|
|
10479
|
+
x: 0,
|
|
10480
|
+
y: 0,
|
|
10481
|
+
width: 300
|
|
10482
|
+
},
|
|
10483
|
+
data: {
|
|
10484
|
+
id: "input",
|
|
10485
|
+
dataType: "string",
|
|
10486
|
+
defaultValue: void 0,
|
|
10487
|
+
useDefaultValueInput: false
|
|
10488
|
+
}
|
|
10489
|
+
};
|
|
10490
|
+
return chartNode;
|
|
10491
|
+
}
|
|
10492
|
+
getInputDefinitions() {
|
|
10493
|
+
if (this.data.useDefaultValueInput) {
|
|
10494
|
+
return [
|
|
10495
|
+
{
|
|
10496
|
+
id: "default",
|
|
10497
|
+
title: "Default Value",
|
|
10498
|
+
dataType: this.chartNode.data.dataType
|
|
10499
|
+
}
|
|
10500
|
+
];
|
|
10501
|
+
}
|
|
10502
|
+
return [];
|
|
10503
|
+
}
|
|
10504
|
+
getOutputDefinitions() {
|
|
10505
|
+
return [
|
|
10506
|
+
{
|
|
10507
|
+
id: "data",
|
|
10508
|
+
title: this.data.id,
|
|
10509
|
+
dataType: this.chartNode.data.dataType
|
|
10510
|
+
}
|
|
10511
|
+
];
|
|
10512
|
+
}
|
|
10513
|
+
getEditors() {
|
|
10514
|
+
return [
|
|
10515
|
+
{
|
|
10516
|
+
type: "string",
|
|
10517
|
+
label: "ID",
|
|
10518
|
+
dataKey: "id"
|
|
10519
|
+
},
|
|
10520
|
+
{
|
|
10521
|
+
type: "dataTypeSelector",
|
|
10522
|
+
label: "Data Type",
|
|
10523
|
+
dataKey: "dataType"
|
|
10524
|
+
},
|
|
10525
|
+
{
|
|
10526
|
+
type: "anyData",
|
|
10527
|
+
label: "Default Value",
|
|
10528
|
+
dataKey: "defaultValue",
|
|
10529
|
+
useInputToggleDataKey: "useDefaultValueInput"
|
|
10530
|
+
},
|
|
10531
|
+
{
|
|
10532
|
+
type: "dropdown",
|
|
10533
|
+
label: "Editor",
|
|
10534
|
+
dataKey: "editor",
|
|
10535
|
+
defaultValue: "auto",
|
|
10536
|
+
options: [
|
|
10537
|
+
{ label: "None", value: "none" },
|
|
10538
|
+
{ label: "Auto", value: "auto" },
|
|
10539
|
+
{ label: "String", value: "string" },
|
|
10540
|
+
{ label: "Number", value: "number" },
|
|
10541
|
+
{ label: "Code", value: "code" },
|
|
10542
|
+
{ label: "Data Type", value: "dataTypeSelector" },
|
|
10543
|
+
{ label: "String List", value: "stringList" },
|
|
10544
|
+
{ label: "Key Value Pairs", value: "keyValuePair" },
|
|
10545
|
+
{ label: "Toggle", value: "toggle" }
|
|
10546
|
+
],
|
|
10547
|
+
helperMessage: "The editor to use when editing this value in the UI. Make sure this matches the data type."
|
|
10548
|
+
}
|
|
10549
|
+
];
|
|
10550
|
+
}
|
|
10551
|
+
getBody() {
|
|
10552
|
+
return import_ts_dedent3.dedent`
|
|
10553
|
+
${this.data.id}
|
|
10554
|
+
Type: ${this.data.dataType}
|
|
10555
|
+
${this.data.defaultValue == null ? "" : `Default: ${this.data.defaultValue}`}
|
|
10556
|
+
`;
|
|
10557
|
+
}
|
|
10558
|
+
static getUIData() {
|
|
10559
|
+
return {
|
|
10560
|
+
infoBoxBody: import_ts_dedent3.dedent`
|
|
10561
|
+
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.
|
|
10562
|
+
`,
|
|
10563
|
+
infoBoxTitle: "Graph Input Node",
|
|
10564
|
+
contextMenuTitle: "Graph Input",
|
|
10565
|
+
group: ["Input/Output"]
|
|
10566
|
+
};
|
|
10567
|
+
}
|
|
10568
|
+
async process(inputs, context) {
|
|
10569
|
+
const value = resolveGraphInputValue(this.data, context.graphInputs[this.data.id], inputs);
|
|
10570
|
+
context.graphInputNodeValues[this.data.id] = value;
|
|
10571
|
+
return { ["data"]: value };
|
|
10572
|
+
}
|
|
10573
|
+
};
|
|
10574
|
+
function resolveGraphInputValue(data, input, inputs = {}) {
|
|
10575
|
+
let inputValue = input == null ? void 0 : coerceTypeOptional(input, data.dataType);
|
|
10576
|
+
if (inputValue == null && data.useDefaultValueInput) {
|
|
10577
|
+
inputValue = coerceTypeOptional(inputs["default"], data.dataType);
|
|
10578
|
+
}
|
|
10579
|
+
if (inputValue == null) {
|
|
10580
|
+
inputValue = coerceTypeOptional(inferType(data.defaultValue), data.dataType) || getDefaultValue(data.dataType);
|
|
10581
|
+
}
|
|
10582
|
+
if (inputValue == null && isArrayDataType(data.dataType)) {
|
|
10583
|
+
inputValue = { type: data.dataType, value: [] };
|
|
10584
|
+
}
|
|
10585
|
+
return { type: data.dataType, value: inputValue };
|
|
10586
|
+
}
|
|
10587
|
+
var graphInputNode = nodeDefinition(GraphInputNodeImpl, "Graph Input");
|
|
10588
|
+
|
|
10217
10589
|
// src/integrations/KnowledgeStoreFieldPolicy.ts
|
|
10218
10590
|
function createKnowledgeStoreFieldDraftDefaults(fields) {
|
|
10219
10591
|
return Object.fromEntries(
|
|
@@ -11263,9 +11635,6 @@ var graphProcessorGraphOverride = Symbol("graphProcessorGraphOverride");
|
|
|
11263
11635
|
var consumedAsyncBranchTriggerOverride = Symbol("consumedAsyncBranchTriggerOverride");
|
|
11264
11636
|
var asyncBranchInputAnchorsOverride = Symbol("asyncBranchInputAnchorsOverride");
|
|
11265
11637
|
var consumedStreamingWatchNodeOverride = Symbol("consumedStreamingWatchNodeOverride");
|
|
11266
|
-
function isNamedGraphBoundaryCaller(node) {
|
|
11267
|
-
return node.type === "subGraph" || node.type === "referencedGraphAlias";
|
|
11268
|
-
}
|
|
11269
11638
|
function createGraphOutputsOverlay(parent) {
|
|
11270
11639
|
const writes = {};
|
|
11271
11640
|
const view = new Proxy(writes, {
|
|
@@ -11408,6 +11777,12 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11408
11777
|
#graphOutputPartialListener;
|
|
11409
11778
|
#consumedStreamingWatchNodeId;
|
|
11410
11779
|
#streamingWatchInvocation;
|
|
11780
|
+
#graphInputStreams = {};
|
|
11781
|
+
#callerInputStreams = /* @__PURE__ */ new Map();
|
|
11782
|
+
#inputStreamRoutes = /* @__PURE__ */ new Map();
|
|
11783
|
+
#streamCallerTasks = /* @__PURE__ */ new Set();
|
|
11784
|
+
#inputStreamDisposers = [];
|
|
11785
|
+
#pendingGraphInputFinals = /* @__PURE__ */ new Map();
|
|
11411
11786
|
#registry;
|
|
11412
11787
|
#concurrency;
|
|
11413
11788
|
#executionPlanCacheMode;
|
|
@@ -11420,7 +11795,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11420
11795
|
#storedValueStore;
|
|
11421
11796
|
#knowledgeStores;
|
|
11422
11797
|
#useSeededExecutionPlanOnNextRun = false;
|
|
11423
|
-
id = (0,
|
|
11798
|
+
id = (0, import_non_secure8.nanoid)();
|
|
11424
11799
|
#includeTrace = true;
|
|
11425
11800
|
executor;
|
|
11426
11801
|
/** If set, specifies the node(s) that the graph will run TO, instead of the nodes without any dependents. */
|
|
@@ -11965,6 +12340,12 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11965
12340
|
"initializeGraphRun",
|
|
11966
12341
|
() => this.#initializeGraphRun(context, inputs, contextValues)
|
|
11967
12342
|
);
|
|
12343
|
+
this.#graphInputStreams = options2.graphInputStreams ?? {};
|
|
12344
|
+
this.#callerInputStreams = /* @__PURE__ */ new Map();
|
|
12345
|
+
this.#inputStreamRoutes = /* @__PURE__ */ new Map();
|
|
12346
|
+
this.#streamCallerTasks = /* @__PURE__ */ new Set();
|
|
12347
|
+
this.#inputStreamDisposers = [];
|
|
12348
|
+
this.#pendingGraphInputFinals = /* @__PURE__ */ new Map();
|
|
11968
12349
|
await this.#profileRuntimeAsync("loadProjectReferences", () => this.#loadProjectReferences());
|
|
11969
12350
|
this.#profileRuntimeSync(
|
|
11970
12351
|
"initializeProjectGlobalVariables",
|
|
@@ -11996,12 +12377,14 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
11996
12377
|
this.#prepareAsyncBranchTopology();
|
|
11997
12378
|
this.#prepareStreamingWatchTopology();
|
|
11998
12379
|
this.#prepareGraphOutputPartialTopology();
|
|
12380
|
+
this.#prepareGraphInputStreamRoutes();
|
|
11999
12381
|
} catch (error) {
|
|
12000
12382
|
const normalizedError = getError(error);
|
|
12001
12383
|
await this.#emitRootStartupError(normalizedError);
|
|
12002
12384
|
throw normalizedError;
|
|
12003
12385
|
}
|
|
12004
12386
|
await this.#profileRuntimeAsync("emitGraphStart", () => this.#emitGraphStart());
|
|
12387
|
+
this.#subscribeGraphInputStreams();
|
|
12005
12388
|
await this.#profileRuntimeAsync(
|
|
12006
12389
|
"emitInitialProjectGlobalVariables",
|
|
12007
12390
|
() => this.#emitInitialProjectGlobalVariables()
|
|
@@ -12028,6 +12411,12 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12028
12411
|
await this.#profileRuntimeAsync("throwIfGraphErrored", () => this.#throwIfGraphErrored());
|
|
12029
12412
|
return await this.#profileRuntimeAsync("finalizeGraphRun", () => this.#finalizeGraphRun());
|
|
12030
12413
|
} finally {
|
|
12414
|
+
for (const dispose of this.#inputStreamDisposers) dispose();
|
|
12415
|
+
this.#pendingGraphInputFinals.clear();
|
|
12416
|
+
for (const streams of this.#callerInputStreams.values()) {
|
|
12417
|
+
for (const relay of Object.values(streams))
|
|
12418
|
+
relay.finish({ error: new Error("Graph input stream owner finished") });
|
|
12419
|
+
}
|
|
12031
12420
|
await this.#drainSchedulerBoundaries();
|
|
12032
12421
|
this.#graphOutputPartialListener = void 0;
|
|
12033
12422
|
this.#lifecycle.complete();
|
|
@@ -12086,8 +12475,8 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12086
12475
|
this.#graphRunId = this.#executionIdentityOverride.graphRunId;
|
|
12087
12476
|
this.#parentGraphRunId = this.#executionIdentityOverride.parentGraphRunId;
|
|
12088
12477
|
} else {
|
|
12089
|
-
this.#rootRunId = this.#parent ? this.#parent.#rootRunId : (0,
|
|
12090
|
-
this.#graphRunId = (0,
|
|
12478
|
+
this.#rootRunId = this.#parent ? this.#parent.#rootRunId : (0, import_non_secure8.nanoid)();
|
|
12479
|
+
this.#graphRunId = (0, import_non_secure8.nanoid)();
|
|
12091
12480
|
this.#parentGraphRunId = this.#parent ? this.#parent.#graphRunId : void 0;
|
|
12092
12481
|
}
|
|
12093
12482
|
}
|
|
@@ -12276,13 +12665,37 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
12276
12665
|
((_a = this.#graphOutputSelection) == null ? void 0 : _a.startNodes) ?? getStartNodes(this.#executionState, this.#executionGraphNodes, this.runToNodeIds)
|
|
12277
12666
|
);
|
|
12278
12667
|
await this.#processingQueue.onIdle();
|
|
12668
|
+
if (Object.keys(this.#graphInputStreams).length) {
|
|
12669
|
+
await this.#waitForGraphInputStreams();
|
|
12670
|
+
for (const [nodeId, outputs] of this.#pendingGraphInputFinals) {
|
|
12671
|
+
this.#finishStreamingOutputWatches(this.#nodesById[nodeId], outputs);
|
|
12672
|
+
}
|
|
12673
|
+
this.#pendingGraphInputFinals.clear();
|
|
12674
|
+
for (const node of this.#executionGraphNodes) {
|
|
12675
|
+
if (!this.#isNodeSelected(node.id)) continue;
|
|
12676
|
+
void this.#processingQueue.add(() => this.#processNodeIfAllInputsAvailable(node));
|
|
12677
|
+
}
|
|
12678
|
+
await this.#processingQueue.onIdle();
|
|
12679
|
+
}
|
|
12680
|
+
while (this.#streamCallerTasks.size) {
|
|
12681
|
+
for (const [sourceId, routes] of this.#inputStreamRoutes) {
|
|
12682
|
+
if (this.#currentlyProcessing.has(sourceId) || routes.every(({ relay }) => relay.result)) continue;
|
|
12683
|
+
const failedDependency = this.getDependencyNodesDeep(sourceId).find((id) => this.#erroredNodes.has(id));
|
|
12684
|
+
if (failedDependency) {
|
|
12685
|
+
const error = getError(this.#erroredNodes.get(failedDependency));
|
|
12686
|
+
for (const { relay } of routes) relay.finish({ error });
|
|
12687
|
+
}
|
|
12688
|
+
}
|
|
12689
|
+
await Promise.race(this.#streamCallerTasks);
|
|
12690
|
+
await this.#processingQueue.onIdle();
|
|
12691
|
+
}
|
|
12279
12692
|
this.#markUnqueuedNodesIgnored();
|
|
12280
12693
|
}
|
|
12281
12694
|
#canUseFastAcyclicScheduler() {
|
|
12282
12695
|
if (this.#scheduler !== "fast-acyclic") {
|
|
12283
12696
|
return false;
|
|
12284
12697
|
}
|
|
12285
|
-
if (this.#graphOutputSelection || this.#hasPreloadedData || this.runToNodeIds || this.slowMode || this.#includeTrace) {
|
|
12698
|
+
if (this.#graphOutputSelection || this.#callerInputStreams.size > 0 || Object.keys(this.#graphInputStreams).length > 0 || this.#hasPreloadedData || this.runToNodeIds || this.slowMode || this.#includeTrace) {
|
|
12286
12699
|
return false;
|
|
12287
12700
|
}
|
|
12288
12701
|
if (this.#nodesNotInCycle.length !== this.#executionGraphNodes.length) {
|
|
@@ -12543,6 +12956,17 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12543
12956
|
/** If all inputs are present, all conditions met, processes the node. */
|
|
12544
12957
|
async #processNodeIfAllInputsAvailable(node, options2 = {}) {
|
|
12545
12958
|
if (!this.#isNodeSelected(node.id)) return [];
|
|
12959
|
+
if (this.#callerInputStreams.has(node.id) && !options2.streamingDispatch) {
|
|
12960
|
+
const task = this.#processNodeIfAllInputsAvailable(node, { ...options2, streamingDispatch: true }).catch(
|
|
12961
|
+
(error) => this.#nodeErrored(node, error, (0, import_non_secure8.nanoid)())
|
|
12962
|
+
);
|
|
12963
|
+
this.#streamCallerTasks.add(task);
|
|
12964
|
+
void task.then(
|
|
12965
|
+
() => this.#streamCallerTasks.delete(task),
|
|
12966
|
+
() => this.#streamCallerTasks.delete(task)
|
|
12967
|
+
);
|
|
12968
|
+
return [];
|
|
12969
|
+
}
|
|
12546
12970
|
const { queueOutputNodes = true } = options2;
|
|
12547
12971
|
const builtInNode = node;
|
|
12548
12972
|
const inputNodesProfileStart = this.#startRuntimeProfile();
|
|
@@ -12555,6 +12979,31 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12555
12979
|
if (this.#shouldSkipNodeProcessing(node, inputNodes)) {
|
|
12556
12980
|
return [];
|
|
12557
12981
|
}
|
|
12982
|
+
const namedInput = node.type === "graphInput" ? node.data.id : void 0;
|
|
12983
|
+
const inputStream = namedInput != null && Object.hasOwn(this.#graphInputStreams, namedInput) ? this.#graphInputStreams[namedInput] : void 0;
|
|
12984
|
+
if (inputStream) {
|
|
12985
|
+
const terminals = Object.values(this.#graphInputStreams).map((stream) => stream.result);
|
|
12986
|
+
const terminal = terminals.find((result) => result == null ? void 0 : result.error) ?? terminals.find((result) => {
|
|
12987
|
+
var _a;
|
|
12988
|
+
return ((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.type) === "control-flow-excluded";
|
|
12989
|
+
}) ?? inputStream.result;
|
|
12990
|
+
if (!terminal) return [];
|
|
12991
|
+
if (terminal.error) {
|
|
12992
|
+
await this.#nodeErrored(node, terminal.error, (0, import_non_secure8.nanoid)());
|
|
12993
|
+
return [];
|
|
12994
|
+
}
|
|
12995
|
+
if (terminal.value.type === "control-flow-excluded") {
|
|
12996
|
+
return this.#excludeNode(node, (0, import_non_secure8.nanoid)(), {}, "streamed input is excluded", { queueOutputNodes });
|
|
12997
|
+
}
|
|
12998
|
+
if (terminals.some((result) => !result)) return [];
|
|
12999
|
+
} else if (node.type !== "graphInput" && !this.#callerInputStreams.has(node.id) && Object.values(this.#graphInputStreams).some(
|
|
13000
|
+
(stream) => {
|
|
13001
|
+
var _a;
|
|
13002
|
+
return !stream.result || stream.result.error || ((_a = stream.result.value) == null ? void 0 : _a.type) === "control-flow-excluded";
|
|
13003
|
+
}
|
|
13004
|
+
)) {
|
|
13005
|
+
return [];
|
|
13006
|
+
}
|
|
12558
13007
|
const attachedData = this.#getAttachedDataTo(node);
|
|
12559
13008
|
if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
|
|
12560
13009
|
return [];
|
|
@@ -12565,7 +13014,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12565
13014
|
const loopExclusion = this.#excludedDueToControlFlow(
|
|
12566
13015
|
node,
|
|
12567
13016
|
inputValues,
|
|
12568
|
-
(0,
|
|
13017
|
+
(0, import_non_secure8.nanoid)(),
|
|
12569
13018
|
LOOP_NOT_BROKEN_SENTINEL,
|
|
12570
13019
|
{ queueOutputNodes }
|
|
12571
13020
|
);
|
|
@@ -12573,12 +13022,20 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12573
13022
|
this.#emitTraceEvent(`Node ${node.title} is excluded due to control flow`);
|
|
12574
13023
|
return loopExclusion === true ? [] : loopExclusion;
|
|
12575
13024
|
}
|
|
12576
|
-
const
|
|
13025
|
+
const streamedInputs = this.#callerInputStreams.get(node.id);
|
|
13026
|
+
const blockingInputNodes = streamedInputs ? inputNodes.filter(
|
|
13027
|
+
(inputNode) => this.#getInputConnectionsForNode(node).some(
|
|
13028
|
+
(edge) => edge.outputNodeId === inputNode.id && !streamedInputs[edge.inputId]
|
|
13029
|
+
)
|
|
13030
|
+
) : inputNodes;
|
|
13031
|
+
const waitingForInputNode = getWaitingForInputNode(this.#executionState, node, blockingInputNodes, inputValues);
|
|
12577
13032
|
if (waitingForInputNode) {
|
|
12578
|
-
this.#emitTraceEvent(
|
|
13033
|
+
this.#emitTraceEvent(
|
|
13034
|
+
`Node ${node.title} is waiting for input node ${waitingForInputNode.title || waitingForInputNode.id}`
|
|
13035
|
+
);
|
|
12579
13036
|
return [];
|
|
12580
13037
|
}
|
|
12581
|
-
const exclusion = this.#excludedDueToControlFlow(node, inputValues, (0,
|
|
13038
|
+
const exclusion = this.#excludedDueToControlFlow(node, inputValues, (0, import_non_secure8.nanoid)(), void 0, {
|
|
12582
13039
|
queueOutputNodes
|
|
12583
13040
|
});
|
|
12584
13041
|
if (exclusion) {
|
|
@@ -12591,7 +13048,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12591
13048
|
}
|
|
12592
13049
|
const managedAsyncBranchWatchViolation = node.type === "startBackgroundBranch" && this.#getActiveOutputPortIds(node).size > 0 ? this.#getManagedAsyncBranchWatchViolation(node) : void 0;
|
|
12593
13050
|
if (managedAsyncBranchWatchViolation) {
|
|
12594
|
-
await this.#nodeErrored(node, managedAsyncBranchWatchViolation, (0,
|
|
13051
|
+
await this.#nodeErrored(node, managedAsyncBranchWatchViolation, (0, import_non_secure8.nanoid)());
|
|
12595
13052
|
return [];
|
|
12596
13053
|
}
|
|
12597
13054
|
if (this.#beginNodeProcessing(node, attachedData) === false) {
|
|
@@ -12680,7 +13137,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12680
13137
|
}
|
|
12681
13138
|
#excludeNodeWithMissingRequiredInputs(node, inputValues, missingRequiredInputs, options2 = {}) {
|
|
12682
13139
|
const exclusion = getMissingRequiredInputExclusion(node, missingRequiredInputs);
|
|
12683
|
-
const processId = (0,
|
|
13140
|
+
const processId = (0, import_non_secure8.nanoid)();
|
|
12684
13141
|
this.#emitTraceEvent(exclusion.traceMessage);
|
|
12685
13142
|
return this.#excludeNode(node, processId, inputValues, exclusion.reason, options2);
|
|
12686
13143
|
}
|
|
@@ -12907,7 +13364,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12907
13364
|
parentGraphRunId: this.#parentGraphRunId
|
|
12908
13365
|
} : {
|
|
12909
13366
|
rootRunId: root.#rootRunId,
|
|
12910
|
-
graphRunId: (0,
|
|
13367
|
+
graphRunId: (0, import_non_secure8.nanoid)(),
|
|
12911
13368
|
parentGraphRunId: sameGraphOwner.#graphRunId
|
|
12912
13369
|
};
|
|
12913
13370
|
processor.preloadNodeData(triggerNode.id, triggerOutputs);
|
|
@@ -12988,7 +13445,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
12988
13445
|
return nodeData;
|
|
12989
13446
|
}
|
|
12990
13447
|
async #processNode(node, inputValues) {
|
|
12991
|
-
const processId = (0,
|
|
13448
|
+
const processId = (0, import_non_secure8.nanoid)();
|
|
12992
13449
|
if (this.#abortController.signal.aborted) {
|
|
12993
13450
|
await this.#nodeErrored(node, createGraphAbortErrorFromSignal(this.#abortController.signal), processId);
|
|
12994
13451
|
this.#successfulAbortTerminalProcessIds.delete(processId);
|
|
@@ -13175,6 +13632,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13175
13632
|
}
|
|
13176
13633
|
async #nodeErrored(node, e, processId, durationMs, splitRunDurationMs, resultOrigin = "executed", outputs, splitOutputs) {
|
|
13177
13634
|
const error = getError(e);
|
|
13635
|
+
for (const route of this.#inputStreamRoutes.get(node.id) ?? []) route.relay.finish({ error });
|
|
13178
13636
|
const retainedOutputs = splitOutputs === void 0 ? outputs ?? this.#takeFailureOutputs(processId, 0) : outputs;
|
|
13179
13637
|
const exclusionReason = this.#getErrorExclusionReason(node, error, processId);
|
|
13180
13638
|
if (exclusionReason) {
|
|
@@ -13414,9 +13872,16 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13414
13872
|
#createNodeProcessContext(node, inputValues, index, processId, nodeAbortController, partialOutput, toolCallTraceSource, markResultAsEditorCacheHit) {
|
|
13415
13873
|
var _a, _b;
|
|
13416
13874
|
const plugin = this.#registry.getPluginFor(node.type);
|
|
13417
|
-
const
|
|
13875
|
+
const acceptsPartialOutputs = () => {
|
|
13876
|
+
if (nodeAbortController.signal.aborted) return false;
|
|
13877
|
+
const active = this.#nodeAbortControllers.get(node.id);
|
|
13878
|
+
return active === nodeAbortController || active instanceof Set && active.has(nodeAbortController);
|
|
13879
|
+
};
|
|
13880
|
+
const onGraphOutputPartial = canStreamThroughGraphCaller(node) && (this.#streamingWatchPlansBySourceNodeId.has(node.id) || this.#inputStreamRoutes.has(node.id) || this.#graphOutputPartialBindingsBySourceNodeId.has(node.id)) ? (partialOutputs) => {
|
|
13881
|
+
if (!acceptsPartialOutputs()) return;
|
|
13418
13882
|
this.#publishStreamingOutputWatchPartial(node, partialOutputs);
|
|
13419
13883
|
this.#publishGraphOutputPartial(node, partialOutputs);
|
|
13884
|
+
this.#publishGraphInputStreamPartial(node, partialOutputs);
|
|
13420
13885
|
} : void 0;
|
|
13421
13886
|
const toolCallContinuation = this.#getToolCallContinuationContext(
|
|
13422
13887
|
node,
|
|
@@ -13437,9 +13902,12 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
13437
13902
|
node,
|
|
13438
13903
|
nodeAbortController,
|
|
13439
13904
|
onGraphOutputPartial,
|
|
13905
|
+
graphInputStreams: this.#callerInputStreams.get(node.id),
|
|
13440
13906
|
onPartialOutputs: (partialOutputs) => {
|
|
13907
|
+
if (!acceptsPartialOutputs()) return;
|
|
13441
13908
|
partialOutput == null ? void 0 : partialOutput(node, partialOutputs, index);
|
|
13442
13909
|
this.#publishStreamingOutputWatchPartial(node, partialOutputs);
|
|
13910
|
+
this.#publishGraphInputStreamPartial(node, partialOutputs);
|
|
13443
13911
|
this.#publishGraphOutputPartial(node, partialOutputs);
|
|
13444
13912
|
this.#emitGraphPartialOutputIfNeeded(node, partialOutputs);
|
|
13445
13913
|
},
|
|
@@ -14073,7 +14541,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14073
14541
|
}
|
|
14074
14542
|
}
|
|
14075
14543
|
}
|
|
14076
|
-
#publishStreamingOutputWatchPartial(node, partialOutputs) {
|
|
14544
|
+
#publishStreamingOutputWatchPartial(node, partialOutputs, coalesced = 0) {
|
|
14077
14545
|
for (const plan of this.#streamingWatchPlansBySourceNodeId.get(node.id) ?? []) {
|
|
14078
14546
|
const value = partialOutputs[plan.sourceOutputId];
|
|
14079
14547
|
if (value == null || value.type === "control-flow-excluded") {
|
|
@@ -14083,10 +14551,109 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14083
14551
|
if (!watch || watch.stopped) {
|
|
14084
14552
|
continue;
|
|
14085
14553
|
}
|
|
14554
|
+
watch.accountCoalescedUpdates(coalesced);
|
|
14555
|
+
plan.nextUpdateIndex += coalesced;
|
|
14086
14556
|
const updateIndex = this.#nextStreamingWatchUpdateIndex(plan);
|
|
14087
14557
|
watch.publish(this.#createStreamingOutputWatchSnapshot(plan, value, updateIndex, false));
|
|
14088
14558
|
}
|
|
14089
14559
|
}
|
|
14560
|
+
#prepareGraphInputStreamRoutes() {
|
|
14561
|
+
var _a;
|
|
14562
|
+
if (!this.#executionGraphNodes.some((node) => canStreamThroughGraphCaller(node) && this.#isNodeSelected(node.id)))
|
|
14563
|
+
return;
|
|
14564
|
+
const marked = getProjectStreamingOutputWatchConnections({
|
|
14565
|
+
project: this.#project,
|
|
14566
|
+
graph: this.#graph,
|
|
14567
|
+
referencedProjects: this.#loadedProjects,
|
|
14568
|
+
registry: this.#registry,
|
|
14569
|
+
fullGraphCallers: new Set(this.runToNodeIds ?? []),
|
|
14570
|
+
isNodeFrozen: (_owner, candidate, node) => {
|
|
14571
|
+
var _a2, _b;
|
|
14572
|
+
return this.#frozenNodeOutputResolver != null && ((_b = (_a2 = this.#frozenNodeOutputResolver).hasFrozenNodeOutput) == null ? void 0 : _b.call(_a2, { graphId: candidate.metadata.id, node })) !== false;
|
|
14573
|
+
}
|
|
14574
|
+
});
|
|
14575
|
+
const inputKeys = /* @__PURE__ */ new Map();
|
|
14576
|
+
for (const edge of marked) {
|
|
14577
|
+
const ports = inputKeys.get(edge.inputNodeId) ?? /* @__PURE__ */ new Set();
|
|
14578
|
+
ports.add(edge.inputId);
|
|
14579
|
+
inputKeys.set(edge.inputNodeId, ports);
|
|
14580
|
+
}
|
|
14581
|
+
for (const node of this.#executionGraphNodes) {
|
|
14582
|
+
if (!this.#isNodeSelected(node.id) || !canStreamThroughGraphCaller(node) || this.#hasFrozenNodeOutputOrUnknownResolver(node))
|
|
14583
|
+
continue;
|
|
14584
|
+
const streams = /* @__PURE__ */ Object.create(null);
|
|
14585
|
+
const incoming = this.#getInputConnectionsForNode(node).filter((edge) => this.#isDefinitionValidConnection(edge));
|
|
14586
|
+
for (const edge of incoming) {
|
|
14587
|
+
const source = this.#nodesById[edge.outputNodeId];
|
|
14588
|
+
if (!((_a = inputKeys.get(node.id)) == null ? void 0 : _a.has(edge.inputId)) || !source || source.disabled || source.isSplitRun || incoming.filter((other) => other.inputId === edge.inputId).length !== 1)
|
|
14589
|
+
continue;
|
|
14590
|
+
const relay = new GraphInputStreamRelay();
|
|
14591
|
+
streams[edge.inputId] = relay;
|
|
14592
|
+
const routes = this.#inputStreamRoutes.get(source.id) ?? [];
|
|
14593
|
+
routes.push({ port: edge.outputId, relay });
|
|
14594
|
+
this.#inputStreamRoutes.set(source.id, routes);
|
|
14595
|
+
}
|
|
14596
|
+
if (Object.keys(streams).length) this.#callerInputStreams.set(node.id, streams);
|
|
14597
|
+
}
|
|
14598
|
+
const abort = () => {
|
|
14599
|
+
const error = createGraphAbortErrorFromSignal(this.#abortController.signal);
|
|
14600
|
+
for (const streams of this.#callerInputStreams.values()) {
|
|
14601
|
+
for (const relay of Object.values(streams)) relay.finish({ error });
|
|
14602
|
+
}
|
|
14603
|
+
};
|
|
14604
|
+
this.#abortController.signal.addEventListener("abort", abort, { once: true });
|
|
14605
|
+
this.#inputStreamDisposers.push(() => this.#abortController.signal.removeEventListener("abort", abort));
|
|
14606
|
+
}
|
|
14607
|
+
#publishGraphInputStreamPartial(node, outputs, coalesced = 0) {
|
|
14608
|
+
for (const { port, relay } of this.#inputStreamRoutes.get(node.id) ?? []) {
|
|
14609
|
+
const value = outputs[port];
|
|
14610
|
+
if (value && value.type !== "control-flow-excluded") relay.publish(value, coalesced);
|
|
14611
|
+
}
|
|
14612
|
+
}
|
|
14613
|
+
#subscribeGraphInputStreams() {
|
|
14614
|
+
for (const [name, stream] of Object.entries(this.#graphInputStreams)) {
|
|
14615
|
+
const inputs = this.#executionGraphNodes.filter(
|
|
14616
|
+
(node) => node.type === "graphInput" && node.data.id === name && !node.disabled && this.#isNodeSelected(node.id)
|
|
14617
|
+
);
|
|
14618
|
+
let active = true;
|
|
14619
|
+
const unsubscribe = stream.subscribe((value, coalesced) => {
|
|
14620
|
+
if (!active || this.#abortController.signal.aborted) return;
|
|
14621
|
+
for (const node of inputs) {
|
|
14622
|
+
if (!canStreamThroughGraphInput(node) || this.#hasFrozenNodeOutputOrUnknownResolver(node)) continue;
|
|
14623
|
+
const output = {
|
|
14624
|
+
["data"]: resolveGraphInputValue(node.data, value)
|
|
14625
|
+
};
|
|
14626
|
+
this.#publishStreamingOutputWatchPartial(node, output, coalesced);
|
|
14627
|
+
this.#publishGraphInputStreamPartial(node, output, coalesced);
|
|
14628
|
+
}
|
|
14629
|
+
});
|
|
14630
|
+
this.#inputStreamDisposers.push(() => {
|
|
14631
|
+
active = false;
|
|
14632
|
+
unsubscribe();
|
|
14633
|
+
});
|
|
14634
|
+
void stream.settled.then((result) => {
|
|
14635
|
+
if (!active || this.#abortController.signal.aborted) return;
|
|
14636
|
+
if (result.value) this.#graphInputs[name] = result.value;
|
|
14637
|
+
for (const node of inputs) void this.#processingQueue.add(() => this.#processNodeIfAllInputsAvailable(node));
|
|
14638
|
+
});
|
|
14639
|
+
}
|
|
14640
|
+
}
|
|
14641
|
+
async #waitForGraphInputStreams() {
|
|
14642
|
+
const signal = this.#abortController.signal;
|
|
14643
|
+
if (signal.aborted) throw createGraphAbortErrorFromSignal(signal);
|
|
14644
|
+
let abort;
|
|
14645
|
+
try {
|
|
14646
|
+
await Promise.race([
|
|
14647
|
+
Promise.all(Object.values(this.#graphInputStreams).map((stream) => stream.settled)),
|
|
14648
|
+
new Promise((_resolve, reject) => {
|
|
14649
|
+
abort = () => reject(createGraphAbortErrorFromSignal(signal));
|
|
14650
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
14651
|
+
})
|
|
14652
|
+
]);
|
|
14653
|
+
} finally {
|
|
14654
|
+
signal.removeEventListener("abort", abort);
|
|
14655
|
+
}
|
|
14656
|
+
}
|
|
14090
14657
|
#prepareGraphOutputPartialTopology() {
|
|
14091
14658
|
if (!this.#graphOutputPartialListener) {
|
|
14092
14659
|
return;
|
|
@@ -14170,6 +14737,31 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14170
14737
|
}
|
|
14171
14738
|
}
|
|
14172
14739
|
#finishStreamingOutputWatches(node, outputs) {
|
|
14740
|
+
if (node.type === "graphInput") {
|
|
14741
|
+
const terminals = Object.values(this.#graphInputStreams).map((stream) => stream.result);
|
|
14742
|
+
if (terminals.some((result) => !result)) {
|
|
14743
|
+
this.#pendingGraphInputFinals.set(node.id, cloneExecutionOutputs(outputs));
|
|
14744
|
+
return;
|
|
14745
|
+
}
|
|
14746
|
+
const failure = terminals.find((result) => result == null ? void 0 : result.error);
|
|
14747
|
+
if (failure == null ? void 0 : failure.error) {
|
|
14748
|
+
for (const route of this.#inputStreamRoutes.get(node.id) ?? []) route.relay.finish({ error: failure.error });
|
|
14749
|
+
this.#cancelStreamingOutputWatchesForSource(node.id);
|
|
14750
|
+
return;
|
|
14751
|
+
}
|
|
14752
|
+
if (terminals.some((result) => {
|
|
14753
|
+
var _a;
|
|
14754
|
+
return ((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.type) === "control-flow-excluded";
|
|
14755
|
+
})) {
|
|
14756
|
+
outputs = Object.fromEntries(
|
|
14757
|
+
Object.keys(outputs).map((port) => [port, { type: "control-flow-excluded", value: void 0 }])
|
|
14758
|
+
);
|
|
14759
|
+
}
|
|
14760
|
+
}
|
|
14761
|
+
for (const { port, relay } of this.#inputStreamRoutes.get(node.id) ?? []) {
|
|
14762
|
+
const value = outputs[port];
|
|
14763
|
+
relay.finish(value ? { value } : { error: new Error(`Missing final streamed output ${port}`) });
|
|
14764
|
+
}
|
|
14173
14765
|
for (const plan of this.#streamingWatchPlansBySourceNodeId.get(node.id) ?? []) {
|
|
14174
14766
|
const value = outputs[plan.sourceOutputId];
|
|
14175
14767
|
const watch = this.#streamingOutputWatches.get(plan.watchNode.id);
|
|
@@ -14182,7 +14774,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14182
14774
|
if (value.type === "control-flow-excluded") {
|
|
14183
14775
|
watch.stop();
|
|
14184
14776
|
if (plan.stopNodeId) {
|
|
14185
|
-
this.#excludeNode(this.#nodesById[plan.stopNodeId], (0,
|
|
14777
|
+
this.#excludeNode(this.#nodesById[plan.stopNodeId], (0, import_non_secure8.nanoid)(), {}, "watched output is excluded");
|
|
14186
14778
|
}
|
|
14187
14779
|
continue;
|
|
14188
14780
|
}
|
|
@@ -14260,7 +14852,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14260
14852
|
if (!graphId2) {
|
|
14261
14853
|
throw new Error("Cannot start a streaming watch branch because the current graph has no ID.");
|
|
14262
14854
|
}
|
|
14263
|
-
const historyIteration = plan.history.start((0,
|
|
14855
|
+
const historyIteration = plan.history.start((0, import_non_secure8.nanoid)(), snapshot.updateIndex);
|
|
14264
14856
|
const branchRuntimeCache = {
|
|
14265
14857
|
...this.#runtimeCache,
|
|
14266
14858
|
graphBoundaries: void 0,
|
|
@@ -14480,12 +15072,14 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
14480
15072
|
}
|
|
14481
15073
|
const stopNode = this.#nodesById[plan.stopNodeId];
|
|
14482
15074
|
if (!stopNode) {
|
|
14483
|
-
throw new Error(
|
|
15075
|
+
throw new Error(
|
|
15076
|
+
`Watch Streaming Output "${plan.watchNode.title}" lost its Stop Watching Streaming Output node.`
|
|
15077
|
+
);
|
|
14484
15078
|
}
|
|
14485
15079
|
plan.unmatchedStopResolved = true;
|
|
14486
15080
|
this.#excludeNode(
|
|
14487
15081
|
stopNode,
|
|
14488
|
-
(0,
|
|
15082
|
+
(0, import_non_secure8.nanoid)(),
|
|
14489
15083
|
{},
|
|
14490
15084
|
"stream completed without Stop Watching Streaming Output accepting a value"
|
|
14491
15085
|
);
|
|
@@ -18826,15 +19420,15 @@ var NodeRegistration = class {
|
|
|
18826
19420
|
};
|
|
18827
19421
|
|
|
18828
19422
|
// src/model/nodes/UserInputNode.ts
|
|
18829
|
-
var
|
|
19423
|
+
var import_non_secure9 = require("nanoid/non-secure");
|
|
18830
19424
|
var import_lodash_es5 = require("lodash");
|
|
18831
|
-
var
|
|
19425
|
+
var import_ts_dedent4 = require("ts-dedent");
|
|
18832
19426
|
var UserInputNodeImpl = class extends NodeImpl {
|
|
18833
19427
|
static create() {
|
|
18834
19428
|
const chartNode = {
|
|
18835
19429
|
type: "userInput",
|
|
18836
19430
|
title: "User Input",
|
|
18837
|
-
id: (0,
|
|
19431
|
+
id: (0, import_non_secure9.nanoid)(),
|
|
18838
19432
|
visualData: {
|
|
18839
19433
|
x: 0,
|
|
18840
19434
|
y: 0,
|
|
@@ -18905,7 +19499,7 @@ var UserInputNodeImpl = class extends NodeImpl {
|
|
|
18905
19499
|
}
|
|
18906
19500
|
static getUIData() {
|
|
18907
19501
|
return {
|
|
18908
|
-
infoBoxBody:
|
|
19502
|
+
infoBoxBody: import_ts_dedent4.dedent`
|
|
18909
19503
|
Prompts the user for input during the execution of the graph. The user's response becomes the output of this node.
|
|
18910
19504
|
`,
|
|
18911
19505
|
infoBoxTitle: "User Input Node",
|
|
@@ -18933,8 +19527,8 @@ ${a}`)
|
|
|
18933
19527
|
var userInputNode = nodeDefinition(UserInputNodeImpl, "User Input");
|
|
18934
19528
|
|
|
18935
19529
|
// src/model/nodes/TextNode.ts
|
|
18936
|
-
var
|
|
18937
|
-
var
|
|
19530
|
+
var import_non_secure10 = require("nanoid/non-secure");
|
|
19531
|
+
var import_ts_dedent5 = require("ts-dedent");
|
|
18938
19532
|
|
|
18939
19533
|
// src/model/interpolationInputDefinition.ts
|
|
18940
19534
|
var INTERPOLATION_INPUT_DEFINITION_KIND = "interpolation-input";
|
|
@@ -19008,7 +19602,7 @@ var TextNodeImpl = class extends NodeImpl {
|
|
|
19008
19602
|
const chartNode = {
|
|
19009
19603
|
type: "text",
|
|
19010
19604
|
title: "Text",
|
|
19011
|
-
id: (0,
|
|
19605
|
+
id: (0, import_non_secure10.nanoid)(),
|
|
19012
19606
|
visualData: {
|
|
19013
19607
|
x: 0,
|
|
19014
19608
|
y: 0,
|
|
@@ -19097,7 +19691,7 @@ var TextNodeImpl = class extends NodeImpl {
|
|
|
19097
19691
|
}
|
|
19098
19692
|
static getUIData() {
|
|
19099
19693
|
return {
|
|
19100
|
-
infoBoxBody:
|
|
19694
|
+
infoBoxBody: import_ts_dedent5.dedent`
|
|
19101
19695
|
Outputs a string of text. It can also interpolate values using <span style="color: var(--primary)">{{tags}}</span>.
|
|
19102
19696
|
|
|
19103
19697
|
The inputs are dynamic based on the interpolation tags.
|
|
@@ -19111,8 +19705,8 @@ var TextNodeImpl = class extends NodeImpl {
|
|
|
19111
19705
|
var textNode = nodeDefinition(TextNodeImpl, "Text");
|
|
19112
19706
|
|
|
19113
19707
|
// src/model/nodes/ChatNode.ts
|
|
19114
|
-
var
|
|
19115
|
-
var
|
|
19708
|
+
var import_non_secure11 = require("nanoid/non-secure");
|
|
19709
|
+
var import_ts_dedent6 = require("ts-dedent");
|
|
19116
19710
|
|
|
19117
19711
|
// src/utils/openai.ts
|
|
19118
19712
|
var openai_exports = {};
|
|
@@ -21067,7 +21661,7 @@ var ChatNodeImpl = class extends NodeImpl {
|
|
|
21067
21661
|
const chartNode = {
|
|
21068
21662
|
type: "chat",
|
|
21069
21663
|
title: "Chat (Legacy)",
|
|
21070
|
-
id: (0,
|
|
21664
|
+
id: (0, import_non_secure11.nanoid)(),
|
|
21071
21665
|
visualData: {
|
|
21072
21666
|
x: 0,
|
|
21073
21667
|
y: 0,
|
|
@@ -21091,7 +21685,7 @@ var ChatNodeImpl = class extends NodeImpl {
|
|
|
21091
21685
|
}
|
|
21092
21686
|
static getUIData() {
|
|
21093
21687
|
return {
|
|
21094
|
-
infoBoxBody:
|
|
21688
|
+
infoBoxBody: import_ts_dedent6.dedent`
|
|
21095
21689
|
Legacy OpenAI-compatible chat node.
|
|
21096
21690
|
|
|
21097
21691
|
For new work, prefer \`LLM Chat\`, which provides a shared vendor-agnostic chat experience across OpenAI, Anthropic, and Google.
|
|
@@ -21118,8 +21712,8 @@ var ChatNodeImpl = class extends NodeImpl {
|
|
|
21118
21712
|
var chatNode = nodeDefinition(ChatNodeImpl, "Chat (Legacy)");
|
|
21119
21713
|
|
|
21120
21714
|
// src/model/nodes/LLMChatV2Node.ts
|
|
21121
|
-
var
|
|
21122
|
-
var
|
|
21715
|
+
var import_non_secure13 = require("nanoid/non-secure");
|
|
21716
|
+
var import_ts_dedent7 = require("ts-dedent");
|
|
21123
21717
|
|
|
21124
21718
|
// src/model/chat-v2/providerOptions.ts
|
|
21125
21719
|
var import_anthropic2 = require("@ai-sdk/anthropic");
|
|
@@ -23572,7 +24166,7 @@ async function generateChatV2(options2) {
|
|
|
23572
24166
|
}
|
|
23573
24167
|
|
|
23574
24168
|
// src/model/chat-v2/chatV2CallObserver.ts
|
|
23575
|
-
var
|
|
24169
|
+
var import_non_secure12 = require("nanoid/non-secure");
|
|
23576
24170
|
function toUsageNumber(value) {
|
|
23577
24171
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
23578
24172
|
}
|
|
@@ -23662,7 +24256,7 @@ function isUsage(value) {
|
|
|
23662
24256
|
}
|
|
23663
24257
|
function createObservedChatV2CallId(options2) {
|
|
23664
24258
|
var _a;
|
|
23665
|
-
return options2.context.onChatV2CallFinished != null && ((_a = options2.context.node) == null ? void 0 : _a.id) != null && options2.context.processId != null ? (0,
|
|
24259
|
+
return options2.context.onChatV2CallFinished != null && ((_a = options2.context.node) == null ? void 0 : _a.id) != null && options2.context.processId != null ? (0, import_non_secure12.nanoid)() : void 0;
|
|
23666
24260
|
}
|
|
23667
24261
|
function notifyChatV2CallFinished(options2, params) {
|
|
23668
24262
|
var _a;
|
|
@@ -26631,7 +27225,7 @@ var LLMChatV2NodeImpl = class extends NodeImpl {
|
|
|
26631
27225
|
return {
|
|
26632
27226
|
type: "llmChatV2",
|
|
26633
27227
|
title: "LLM Chat",
|
|
26634
|
-
id: (0,
|
|
27228
|
+
id: (0, import_non_secure13.nanoid)(),
|
|
26635
27229
|
visualData: {
|
|
26636
27230
|
x: 0,
|
|
26637
27231
|
y: 0,
|
|
@@ -26813,7 +27407,7 @@ var LLMChatV2NodeImpl = class extends NodeImpl {
|
|
|
26813
27407
|
}
|
|
26814
27408
|
static getUIData() {
|
|
26815
27409
|
return {
|
|
26816
|
-
infoBoxBody:
|
|
27410
|
+
infoBoxBody: import_ts_dedent7.dedent`
|
|
26817
27411
|
Vendor-agnostic chat node built on the Vercel AI SDK.
|
|
26818
27412
|
|
|
26819
27413
|
Choose OpenAI, Anthropic, Google, or a custom OpenAI-compatible provider inside the node without rewiring the graph.
|
|
@@ -26942,7 +27536,7 @@ var LLMChatV2NodeImpl = class extends NodeImpl {
|
|
|
26942
27536
|
var llmChatV2Node = nodeDefinition(LLMChatV2NodeImpl, "LLM Chat");
|
|
26943
27537
|
|
|
26944
27538
|
// src/model/nodes/LLMProfileNode.ts
|
|
26945
|
-
var
|
|
27539
|
+
var import_non_secure14 = require("nanoid/non-secure");
|
|
26946
27540
|
|
|
26947
27541
|
// src/model/chat-v2/llmProfileBody.ts
|
|
26948
27542
|
function getOptionLabel2(options2, value) {
|
|
@@ -27203,7 +27797,7 @@ var LLMProfileNodeImpl = class extends NodeImpl {
|
|
|
27203
27797
|
return {
|
|
27204
27798
|
type: "llmProfile",
|
|
27205
27799
|
title: "LLM Profile",
|
|
27206
|
-
id: (0,
|
|
27800
|
+
id: (0, import_non_secure14.nanoid)(),
|
|
27207
27801
|
visualData: {
|
|
27208
27802
|
x: 0,
|
|
27209
27803
|
y: 0,
|
|
@@ -27328,15 +27922,15 @@ ${escapeMarkdownInline2(section.snippet.text)}` : void 0;
|
|
|
27328
27922
|
var llmProfileNode = nodeDefinition(LLMProfileNodeImpl, "LLM Profile");
|
|
27329
27923
|
|
|
27330
27924
|
// src/model/nodes/PromptNode.ts
|
|
27331
|
-
var
|
|
27332
|
-
var
|
|
27925
|
+
var import_non_secure15 = require("nanoid/non-secure");
|
|
27926
|
+
var import_ts_dedent8 = require("ts-dedent");
|
|
27333
27927
|
var import_ts_pattern2 = require("ts-pattern");
|
|
27334
27928
|
var PromptNodeImpl = class extends NodeImpl {
|
|
27335
27929
|
static create() {
|
|
27336
27930
|
const chartNode = {
|
|
27337
27931
|
type: "prompt",
|
|
27338
27932
|
title: "Prompt",
|
|
27339
|
-
id: (0,
|
|
27933
|
+
id: (0, import_non_secure15.nanoid)(),
|
|
27340
27934
|
visualData: {
|
|
27341
27935
|
x: 0,
|
|
27342
27936
|
y: 0,
|
|
@@ -27489,7 +28083,7 @@ var PromptNodeImpl = class extends NodeImpl {
|
|
|
27489
28083
|
}
|
|
27490
28084
|
static getUIData() {
|
|
27491
28085
|
return {
|
|
27492
|
-
infoBoxBody:
|
|
28086
|
+
infoBoxBody: import_ts_dedent8.dedent`
|
|
27493
28087
|
Outputs a chat message, which is a string of text with an attached "type" saying who sent the message (User, Assistant, System, Developer) and optionally an attached "name".
|
|
27494
28088
|
|
|
27495
28089
|
Also provides the same <span style="color: var(--primary)">{{interpolation}}</span> capabilities as a Text node.
|
|
@@ -27593,14 +28187,14 @@ var typeDisplay = {
|
|
|
27593
28187
|
};
|
|
27594
28188
|
|
|
27595
28189
|
// src/model/nodes/ExtractRegexNode.ts
|
|
27596
|
-
var
|
|
27597
|
-
var
|
|
28190
|
+
var import_non_secure16 = require("nanoid/non-secure");
|
|
28191
|
+
var import_ts_dedent9 = require("ts-dedent");
|
|
27598
28192
|
var ExtractRegexNodeImpl = class extends NodeImpl {
|
|
27599
28193
|
static create() {
|
|
27600
28194
|
const chartNode = {
|
|
27601
28195
|
type: "extractRegex",
|
|
27602
28196
|
title: "Extract Regex",
|
|
27603
|
-
id: (0,
|
|
28197
|
+
id: (0, import_non_secure16.nanoid)(),
|
|
27604
28198
|
visualData: {
|
|
27605
28199
|
x: 0,
|
|
27606
28200
|
y: 0,
|
|
@@ -27701,7 +28295,7 @@ var ExtractRegexNodeImpl = class extends NodeImpl {
|
|
|
27701
28295
|
}
|
|
27702
28296
|
static getUIData() {
|
|
27703
28297
|
return {
|
|
27704
|
-
infoBoxBody:
|
|
28298
|
+
infoBoxBody: import_ts_dedent9.dedent`
|
|
27705
28299
|
Extracts data from the input text using the configured regular expression. The regular expression can contain capture groups to extract specific parts of the text.
|
|
27706
28300
|
|
|
27707
28301
|
Each capture group corresponds to an output port of the node.
|
|
@@ -27788,8 +28382,8 @@ function countCaptureGroups(regex) {
|
|
|
27788
28382
|
var extractRegexNode = nodeDefinition(ExtractRegexNodeImpl, "Extract Regex");
|
|
27789
28383
|
|
|
27790
28384
|
// src/model/nodes/CodeNode.ts
|
|
27791
|
-
var
|
|
27792
|
-
var
|
|
28385
|
+
var import_non_secure17 = require("nanoid/non-secure");
|
|
28386
|
+
var import_ts_dedent10 = require("ts-dedent");
|
|
27793
28387
|
|
|
27794
28388
|
// src/model/nodes/codeNodeErrorDiagnostics.ts
|
|
27795
28389
|
var ASYNC_FUNCTION_LINE_OFFSET = 2;
|
|
@@ -27915,13 +28509,13 @@ var CodeNodeImpl = class extends NodeImpl {
|
|
|
27915
28509
|
const chartNode = {
|
|
27916
28510
|
type: "code",
|
|
27917
28511
|
title: "Code (legacy)",
|
|
27918
|
-
id: (0,
|
|
28512
|
+
id: (0, import_non_secure17.nanoid)(),
|
|
27919
28513
|
visualData: {
|
|
27920
28514
|
x: 0,
|
|
27921
28515
|
y: 0
|
|
27922
28516
|
},
|
|
27923
28517
|
data: {
|
|
27924
|
-
code:
|
|
28518
|
+
code: import_ts_dedent10.dedent`
|
|
27925
28519
|
// This is a Code (legacy) node. Write JavaScript here and it will be executed.
|
|
27926
28520
|
// Inputs are accessible via an object \`inputs\` and data is typed (i.e. inputs.foo.type, inputs.foo.value)
|
|
27927
28521
|
// Return an object with named outputs that match the output names specified in the node's config.
|
|
@@ -28012,7 +28606,7 @@ var CodeNodeImpl = class extends NodeImpl {
|
|
|
28012
28606
|
}
|
|
28013
28607
|
static getUIData() {
|
|
28014
28608
|
return {
|
|
28015
|
-
infoBoxBody:
|
|
28609
|
+
infoBoxBody: import_ts_dedent10.dedent`
|
|
28016
28610
|
Executes legacy JavaScript code with manually configured inputs and outputs.
|
|
28017
28611
|
`,
|
|
28018
28612
|
infoBoxTitle: "Code (legacy) Node",
|
|
@@ -28054,11 +28648,11 @@ var CodeNodeImpl = class extends NodeImpl {
|
|
|
28054
28648
|
var codeNode = nodeDefinition(CodeNodeImpl, "Code (legacy)");
|
|
28055
28649
|
|
|
28056
28650
|
// src/model/nodes/CodeNewNode.ts
|
|
28057
|
-
var
|
|
28058
|
-
var
|
|
28651
|
+
var import_non_secure18 = require("nanoid/non-secure");
|
|
28652
|
+
var import_ts_dedent12 = require("ts-dedent");
|
|
28059
28653
|
|
|
28060
28654
|
// src/model/nodes/jsValueInterpolation.ts
|
|
28061
|
-
var
|
|
28655
|
+
var import_ts_dedent11 = require("ts-dedent");
|
|
28062
28656
|
var MISSING_INTERPOLATION_HELPER_MESSAGE = "This CodeRunner must honor CodeRunnerOptions.interpolationHelperIdentifier to resolve JSONPath or @graphInputs/@context/@globals interpolation.";
|
|
28063
28657
|
var MISSING_GLOBAL_VALUES_MESSAGE = "This CodeRunner must honor CodeRunnerOptions.globalValuesIdentifier to resolve @globals interpolation.";
|
|
28064
28658
|
function escapeRegExp2(value) {
|
|
@@ -28218,7 +28812,7 @@ function interpolateJsValuePreviewSource(template, inputs, options2 = {}) {
|
|
|
28218
28812
|
});
|
|
28219
28813
|
}
|
|
28220
28814
|
function buildCloneJsInputValueFunction() {
|
|
28221
|
-
return
|
|
28815
|
+
return import_ts_dedent11.dedent`
|
|
28222
28816
|
const cloneJsInputValue = (value, seen = new WeakMap()) => {
|
|
28223
28817
|
if (value == null || (typeof value !== 'object' && typeof value !== 'function')) {
|
|
28224
28818
|
return value;
|
|
@@ -28326,7 +28920,7 @@ function buildJsValueInputClonePreamble({
|
|
|
28326
28920
|
usesGlobalValues,
|
|
28327
28921
|
inputsIdentifier
|
|
28328
28922
|
}) {
|
|
28329
|
-
return
|
|
28923
|
+
return import_ts_dedent11.dedent`
|
|
28330
28924
|
${buildCloneJsInputValueFunction()}
|
|
28331
28925
|
const ${inputsIdentifier} = Object.create(null);
|
|
28332
28926
|
const ${cacheIdentifier} = new WeakMap();
|
|
@@ -28353,7 +28947,7 @@ function buildJsValueInputsInitializer({
|
|
|
28353
28947
|
inputNames,
|
|
28354
28948
|
inputsIdentifier
|
|
28355
28949
|
} = interpolationContext;
|
|
28356
|
-
return
|
|
28950
|
+
return import_ts_dedent11.dedent`
|
|
28357
28951
|
${buildJsValueInputClonePreamble({
|
|
28358
28952
|
cacheIdentifier: cloneCacheIdentifier,
|
|
28359
28953
|
contextIdentifier,
|
|
@@ -28413,7 +29007,7 @@ function sanitizeGeneratedJsValueError(error, inputNames, targetIdentifier, fall
|
|
|
28413
29007
|
|
|
28414
29008
|
// src/model/nodes/CodeNewNode.ts
|
|
28415
29009
|
var CODE_RUNTIME_HELPER_MESSAGE2 = 'Node execution also provides "require" and "process". Browser execution provides "fetch", "console", and "Rivet".';
|
|
28416
|
-
var DEFAULT_CODE_NEW =
|
|
29010
|
+
var DEFAULT_CODE_NEW = import_ts_dedent12.dedent`
|
|
28417
29011
|
// This is a Code node. Write JavaScript here and return one value.
|
|
28418
29012
|
// Interpolation tokens create input ports and evaluate as connected values.
|
|
28419
29013
|
// The returned value becomes the node's single output.
|
|
@@ -28497,7 +29091,7 @@ var CodeNewNodeImpl = class extends NodeImpl {
|
|
|
28497
29091
|
return {
|
|
28498
29092
|
type: "codeNew",
|
|
28499
29093
|
title: "Code",
|
|
28500
|
-
id: (0,
|
|
29094
|
+
id: (0, import_non_secure18.nanoid)(),
|
|
28501
29095
|
visualData: {
|
|
28502
29096
|
x: 0,
|
|
28503
29097
|
y: 0,
|
|
@@ -28544,7 +29138,7 @@ var CodeNewNodeImpl = class extends NodeImpl {
|
|
|
28544
29138
|
}
|
|
28545
29139
|
static getUIData() {
|
|
28546
29140
|
return {
|
|
28547
|
-
infoBoxBody:
|
|
29141
|
+
infoBoxBody: import_ts_dedent12.dedent`
|
|
28548
29142
|
Runs JavaScript code that can use interpolation-created input ports and emits the returned value as the node output.
|
|
28549
29143
|
`,
|
|
28550
29144
|
infoBoxTitle: "Code Node",
|
|
@@ -28582,8 +29176,8 @@ var CodeNewNodeImpl = class extends NodeImpl {
|
|
|
28582
29176
|
var codeNewNode = nodeDefinition(CodeNewNodeImpl, "Code");
|
|
28583
29177
|
|
|
28584
29178
|
// src/model/nodes/ExpressionNode.ts
|
|
28585
|
-
var
|
|
28586
|
-
var
|
|
29179
|
+
var import_non_secure19 = require("nanoid/non-secure");
|
|
29180
|
+
var import_ts_dedent13 = require("ts-dedent");
|
|
28587
29181
|
var CODE_RUNTIME_HELPER_MESSAGE3 = 'Node execution also provides "require" and "process". Browser execution provides "fetch", "console", and "Rivet".';
|
|
28588
29182
|
var DEFAULT_EXPRESSION = '{{a}} == "123" ? {{b}} : {{c}}';
|
|
28589
29183
|
var MAX_BODY_PREVIEW_LINES3 = 15;
|
|
@@ -28621,7 +29215,7 @@ function sanitizeExpressionError(error, interpolationContext) {
|
|
|
28621
29215
|
}
|
|
28622
29216
|
function buildExpressionWrapper(expression, interpolationContext) {
|
|
28623
29217
|
const expressionSource = buildExpressionRuntimeSource(expression, interpolationContext);
|
|
28624
|
-
return
|
|
29218
|
+
return import_ts_dedent13.dedent`
|
|
28625
29219
|
${buildExpressionInputsInitializer(interpolationContext)}
|
|
28626
29220
|
|
|
28627
29221
|
return {
|
|
@@ -28637,7 +29231,7 @@ var ExpressionNodeImpl = class extends NodeImpl {
|
|
|
28637
29231
|
const chartNode = {
|
|
28638
29232
|
type: "expression",
|
|
28639
29233
|
title: "Expression",
|
|
28640
|
-
id: (0,
|
|
29234
|
+
id: (0, import_non_secure19.nanoid)(),
|
|
28641
29235
|
visualData: {
|
|
28642
29236
|
x: 0,
|
|
28643
29237
|
y: 0,
|
|
@@ -28685,7 +29279,7 @@ var ExpressionNodeImpl = class extends NodeImpl {
|
|
|
28685
29279
|
}
|
|
28686
29280
|
static getUIData() {
|
|
28687
29281
|
return {
|
|
28688
|
-
infoBoxBody:
|
|
29282
|
+
infoBoxBody: import_ts_dedent13.dedent`
|
|
28689
29283
|
Evaluates a single JavaScript expression and returns the resulting value.
|
|
28690
29284
|
|
|
28691
29285
|
<code>{{interpolation}}</code> creates dynamic input ports. Interpolated variables evaluate as connected values, so arrays, objects, strings, numbers, and booleans can be used directly.
|
|
@@ -28718,43 +29312,50 @@ var ExpressionNodeImpl = class extends NodeImpl {
|
|
|
28718
29312
|
var expressionNode = nodeDefinition(ExpressionNodeImpl, "Expression");
|
|
28719
29313
|
|
|
28720
29314
|
// src/model/nodes/MatchNode.ts
|
|
28721
|
-
var
|
|
28722
|
-
var
|
|
28723
|
-
|
|
28724
|
-
|
|
28725
|
-
|
|
28726
|
-
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
28734
|
-
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
28740
|
-
|
|
29315
|
+
var import_non_secure20 = require("nanoid/non-secure");
|
|
29316
|
+
var import_ts_dedent14 = require("ts-dedent");
|
|
29317
|
+
|
|
29318
|
+
// src/model/nodes/MatchCaseNodeBase.ts
|
|
29319
|
+
var MatchCaseNodeBase = class extends NodeImpl {
|
|
29320
|
+
casesEditorPlacement = "after-custom-values";
|
|
29321
|
+
customCaseValuesEditorLabel = "Custom case values";
|
|
29322
|
+
defaultExclusive = false;
|
|
29323
|
+
firstMatchingBodyValue = "First matching case only";
|
|
29324
|
+
inputTitle = "Test";
|
|
29325
|
+
matchingCasesToTriggerOptions = [
|
|
29326
|
+
{ value: false, label: "Trigger all matching cases" },
|
|
29327
|
+
{ value: true, label: "Trigger first only" }
|
|
29328
|
+
];
|
|
29329
|
+
sharedCustomValueInputTitle = "Custom value";
|
|
29330
|
+
triggerEditorLabel = "Matching cases to trigger";
|
|
29331
|
+
getReturnValueMode() {
|
|
29332
|
+
return "custom";
|
|
29333
|
+
}
|
|
29334
|
+
getEditorsAfterTrigger() {
|
|
29335
|
+
return [];
|
|
29336
|
+
}
|
|
29337
|
+
shouldHideCustomCaseValues(_data) {
|
|
29338
|
+
return false;
|
|
28741
29339
|
}
|
|
28742
29340
|
getInputDefinitions() {
|
|
28743
29341
|
const inputs = [
|
|
28744
29342
|
{
|
|
28745
29343
|
id: "input",
|
|
28746
|
-
title:
|
|
29344
|
+
title: this.inputTitle,
|
|
28747
29345
|
dataType: "string",
|
|
28748
29346
|
required: true,
|
|
28749
|
-
description:
|
|
29347
|
+
description: `The ${this.inputTitle} value tested against each case.`
|
|
28750
29348
|
}
|
|
28751
29349
|
];
|
|
29350
|
+
if (this.getReturnValueMode() !== "custom") {
|
|
29351
|
+
return inputs;
|
|
29352
|
+
}
|
|
28752
29353
|
if (this.getValueInputMode() === "shared") {
|
|
28753
29354
|
inputs.push({
|
|
28754
29355
|
id: "value",
|
|
28755
|
-
title:
|
|
29356
|
+
title: this.sharedCustomValueInputTitle,
|
|
28756
29357
|
dataType: "any",
|
|
28757
|
-
description:
|
|
29358
|
+
description: `The optional value passed through to every matching output. If unconnected, the ${this.inputTitle} value is passed through.`
|
|
28758
29359
|
});
|
|
28759
29360
|
} else {
|
|
28760
29361
|
const portIds = this.getCasePortIds();
|
|
@@ -28763,14 +29364,14 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28763
29364
|
id: this.getCaseValueInputId(portIds[index]),
|
|
28764
29365
|
title: this.getCaseTitle(caseValue, index),
|
|
28765
29366
|
dataType: "any",
|
|
28766
|
-
description: `The optional custom value emitted when
|
|
29367
|
+
description: `The optional custom value emitted when ${this.describeCaseMatch(caseValue)}. If unconnected, ${this.inputTitle} is passed through.`
|
|
28767
29368
|
});
|
|
28768
29369
|
});
|
|
28769
29370
|
inputs.push({
|
|
28770
29371
|
id: "value-unmatched",
|
|
28771
29372
|
title: "Unmatched",
|
|
28772
29373
|
dataType: "any",
|
|
28773
|
-
description:
|
|
29374
|
+
description: `The optional custom value emitted when ${this.describeNoCaseMatches()}. If unconnected, ${this.inputTitle} is passed through.`
|
|
28774
29375
|
});
|
|
28775
29376
|
}
|
|
28776
29377
|
return inputs;
|
|
@@ -28778,118 +29379,144 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28778
29379
|
getOutputDefinitions() {
|
|
28779
29380
|
const outputs = [];
|
|
28780
29381
|
const portIds = this.getCasePortIds();
|
|
28781
|
-
|
|
29382
|
+
const returnValueMode = this.getReturnValueMode();
|
|
29383
|
+
const dataType = returnValueMode === "true" ? "boolean" : returnValueMode === "testValue" ? "string" : "any";
|
|
29384
|
+
for (let index = 0; index < this.data.cases.length; index++) {
|
|
29385
|
+
const caseValue = this.data.cases[index];
|
|
29386
|
+
const title = this.getCaseTitle(caseValue, index);
|
|
28782
29387
|
outputs.push({
|
|
28783
|
-
id: portIds[
|
|
28784
|
-
title
|
|
28785
|
-
dataType
|
|
28786
|
-
description: this.
|
|
29388
|
+
id: portIds[index],
|
|
29389
|
+
title,
|
|
29390
|
+
dataType,
|
|
29391
|
+
description: this.getMatchingOutputDescription(caseValue, title)
|
|
28787
29392
|
});
|
|
28788
29393
|
}
|
|
28789
29394
|
outputs.push({
|
|
28790
29395
|
id: "unmatched",
|
|
28791
29396
|
title: "Unmatched",
|
|
28792
|
-
dataType
|
|
28793
|
-
description: this.
|
|
29397
|
+
dataType,
|
|
29398
|
+
description: this.getUnmatchedOutputDescription()
|
|
28794
29399
|
});
|
|
28795
29400
|
return outputs;
|
|
28796
29401
|
}
|
|
28797
29402
|
getBody() {
|
|
28798
|
-
return this.
|
|
29403
|
+
return this.getExclusive() ? `Trigger: ${this.firstMatchingBodyValue}` : "Trigger: All matching cases";
|
|
28799
29404
|
}
|
|
28800
29405
|
getEditors() {
|
|
29406
|
+
const casesEditor = {
|
|
29407
|
+
type: "stringList",
|
|
29408
|
+
dataKey: "cases",
|
|
29409
|
+
label: this.caseEditorLabel,
|
|
29410
|
+
placeholder: this.caseEditorPlaceholder,
|
|
29411
|
+
reorderable: true,
|
|
29412
|
+
portBinding: {
|
|
29413
|
+
side: "output",
|
|
29414
|
+
identity: "stored-stable-id",
|
|
29415
|
+
idDataKey: "casePortIds",
|
|
29416
|
+
legacyPortIdPattern: {
|
|
29417
|
+
kind: "prefix",
|
|
29418
|
+
prefix: "case",
|
|
29419
|
+
startIndex: 1
|
|
29420
|
+
},
|
|
29421
|
+
companionBindings: [{ side: "input", prefix: "value-" }]
|
|
29422
|
+
}
|
|
29423
|
+
};
|
|
28801
29424
|
return [
|
|
29425
|
+
...this.casesEditorPlacement === "before-trigger" ? [casesEditor] : [],
|
|
28802
29426
|
{
|
|
28803
29427
|
type: "segmented",
|
|
28804
|
-
label:
|
|
29428
|
+
label: this.triggerEditorLabel,
|
|
28805
29429
|
dataKey: "exclusive",
|
|
28806
|
-
defaultValue:
|
|
28807
|
-
options:
|
|
28808
|
-
{ value: false, label: "Trigger all matching cases" },
|
|
28809
|
-
{ value: true, label: "Trigger first only" }
|
|
28810
|
-
]
|
|
29430
|
+
defaultValue: this.defaultExclusive,
|
|
29431
|
+
options: this.matchingCasesToTriggerOptions
|
|
28811
29432
|
},
|
|
29433
|
+
...this.getEditorsAfterTrigger(),
|
|
28812
29434
|
{
|
|
28813
29435
|
type: "segmented",
|
|
28814
|
-
label:
|
|
29436
|
+
label: this.customCaseValuesEditorLabel,
|
|
29437
|
+
ariaLabel: "Custom case values",
|
|
28815
29438
|
dataKey: "valueInputMode",
|
|
28816
29439
|
defaultValue: "shared",
|
|
29440
|
+
hideIf: (data) => this.shouldHideCustomCaseValues(data),
|
|
28817
29441
|
options: [
|
|
28818
29442
|
{ value: "shared", label: "One shared custom value" },
|
|
28819
29443
|
{ value: "per-output", label: "Custom values per case" }
|
|
28820
29444
|
]
|
|
28821
29445
|
},
|
|
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
|
-
}
|
|
29446
|
+
...this.casesEditorPlacement === "after-custom-values" ? [casesEditor] : []
|
|
28840
29447
|
];
|
|
28841
29448
|
}
|
|
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
29449
|
async process(inputs) {
|
|
28853
29450
|
const inputValue = inputs["input"];
|
|
28854
29451
|
const inputString = (inputValue == null ? void 0 : inputValue.value) == null ? void 0 : coerceType(inputValue, "string");
|
|
28855
29452
|
const portIds = this.getCasePortIds();
|
|
28856
29453
|
const sharedValue = inputs["value"];
|
|
28857
|
-
const
|
|
29454
|
+
const returnValueMode = this.getReturnValueMode();
|
|
29455
|
+
const getInputOutputValue = () => ({
|
|
28858
29456
|
type: "string",
|
|
28859
29457
|
value: inputString
|
|
28860
29458
|
});
|
|
28861
|
-
const getSharedOutputValue = () => sharedValue ??
|
|
28862
|
-
const
|
|
28863
|
-
|
|
28864
|
-
|
|
29459
|
+
const getSharedOutputValue = () => sharedValue ?? getInputOutputValue();
|
|
29460
|
+
const getConfiguredOutputValue = (customValueInputId) => {
|
|
29461
|
+
if (returnValueMode === "true") {
|
|
29462
|
+
return { type: "boolean", value: true };
|
|
29463
|
+
}
|
|
29464
|
+
if (returnValueMode === "testValue") {
|
|
29465
|
+
return getInputOutputValue();
|
|
29466
|
+
}
|
|
29467
|
+
return this.getValueInputMode() === "shared" ? getSharedOutputValue() : inputs[customValueInputId] ?? getInputOutputValue();
|
|
29468
|
+
};
|
|
29469
|
+
const getOutputValue = (portId) => getConfiguredOutputValue(this.getCaseValueInputId(portId));
|
|
29470
|
+
const getUnmatchedOutputValue = () => getConfiguredOutputValue("value-unmatched");
|
|
28865
29471
|
let matched = false;
|
|
28866
29472
|
const output = {};
|
|
28867
|
-
for (let
|
|
28868
|
-
const
|
|
28869
|
-
const
|
|
28870
|
-
|
|
29473
|
+
for (let index = 0; index < this.data.cases.length; index++) {
|
|
29474
|
+
const caseValue = this.data.cases[index];
|
|
29475
|
+
const matches = inputString !== void 0 && this.matchesCase(inputString, caseValue);
|
|
29476
|
+
const canMatch = !this.getExclusive() || !matched;
|
|
29477
|
+
const portId = portIds[index];
|
|
29478
|
+
if (matches && canMatch) {
|
|
28871
29479
|
matched = true;
|
|
28872
|
-
output[
|
|
29480
|
+
output[portId] = getOutputValue(portId);
|
|
28873
29481
|
} else {
|
|
28874
|
-
output[
|
|
29482
|
+
output[portId] = {
|
|
28875
29483
|
type: "control-flow-excluded",
|
|
28876
29484
|
value: void 0
|
|
28877
29485
|
};
|
|
28878
29486
|
}
|
|
28879
29487
|
}
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
|
|
28884
|
-
type: "control-flow-excluded",
|
|
28885
|
-
value: void 0
|
|
28886
|
-
};
|
|
28887
|
-
}
|
|
29488
|
+
output["unmatched"] = matched ? {
|
|
29489
|
+
type: "control-flow-excluded",
|
|
29490
|
+
value: void 0
|
|
29491
|
+
} : getUnmatchedOutputValue();
|
|
28888
29492
|
return output;
|
|
28889
29493
|
}
|
|
28890
29494
|
getValueInputMode() {
|
|
28891
29495
|
return this.data.valueInputMode === "per-output" ? "per-output" : "shared";
|
|
28892
29496
|
}
|
|
29497
|
+
getExclusive() {
|
|
29498
|
+
return this.data.exclusive ?? this.defaultExclusive;
|
|
29499
|
+
}
|
|
29500
|
+
getMatchingOutputDescription(caseValue, title) {
|
|
29501
|
+
const condition = this.describeCaseMatch(caseValue);
|
|
29502
|
+
if (this.getReturnValueMode() === "true") {
|
|
29503
|
+
return `True if ${condition}.`;
|
|
29504
|
+
}
|
|
29505
|
+
if (this.getReturnValueMode() === "testValue") {
|
|
29506
|
+
return `The ${this.inputTitle} value passed through if ${condition}.`;
|
|
29507
|
+
}
|
|
29508
|
+
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}.`;
|
|
29509
|
+
}
|
|
29510
|
+
getUnmatchedOutputDescription() {
|
|
29511
|
+
const condition = this.describeNoCaseMatches();
|
|
29512
|
+
if (this.getReturnValueMode() === "true") {
|
|
29513
|
+
return `True if ${condition}.`;
|
|
29514
|
+
}
|
|
29515
|
+
if (this.getReturnValueMode() === "testValue") {
|
|
29516
|
+
return `The ${this.inputTitle} value passed through if ${condition}.`;
|
|
29517
|
+
}
|
|
29518
|
+
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}.`;
|
|
29519
|
+
}
|
|
28893
29520
|
getCasePortIds() {
|
|
28894
29521
|
return resolveStoredOrderedPortIds(this.data.cases.length, this.data.casePortIds, {
|
|
28895
29522
|
kind: "prefix",
|
|
@@ -28904,17 +29531,182 @@ var MatchNodeImpl = class extends NodeImpl {
|
|
|
28904
29531
|
return `value-${portId}`;
|
|
28905
29532
|
}
|
|
28906
29533
|
};
|
|
28907
|
-
|
|
29534
|
+
|
|
29535
|
+
// src/model/nodes/MatchNode.ts
|
|
29536
|
+
var regexMatchLegacyDisplayName = "Regex Match (legacy)";
|
|
29537
|
+
var MatchNodeImpl = class extends MatchCaseNodeBase {
|
|
29538
|
+
caseEditorLabel = "Cases (regular expressions)";
|
|
29539
|
+
caseEditorPlaceholder = "Case (regular expression)";
|
|
29540
|
+
static create() {
|
|
29541
|
+
return {
|
|
29542
|
+
type: "match",
|
|
29543
|
+
title: regexMatchLegacyDisplayName,
|
|
29544
|
+
id: (0, import_non_secure20.nanoid)(),
|
|
29545
|
+
visualData: {
|
|
29546
|
+
x: 0,
|
|
29547
|
+
y: 0,
|
|
29548
|
+
width: 250
|
|
29549
|
+
},
|
|
29550
|
+
data: {
|
|
29551
|
+
cases: ["YES", "NO"],
|
|
29552
|
+
casePortIds: [(0, import_non_secure20.nanoid)(), (0, import_non_secure20.nanoid)()],
|
|
29553
|
+
valueInputMode: "shared"
|
|
29554
|
+
}
|
|
29555
|
+
};
|
|
29556
|
+
}
|
|
29557
|
+
matchesCase(input, caseValue) {
|
|
29558
|
+
return new RegExp(caseValue).test(input);
|
|
29559
|
+
}
|
|
29560
|
+
describeCaseMatch(caseValue) {
|
|
29561
|
+
return `/${caseValue}/ matches the Test value`;
|
|
29562
|
+
}
|
|
29563
|
+
describeNoCaseMatches() {
|
|
29564
|
+
return "no regular expression matches the Test value";
|
|
29565
|
+
}
|
|
29566
|
+
static getUIData() {
|
|
29567
|
+
return {
|
|
29568
|
+
infoBoxBody: import_ts_dedent14.dedent`
|
|
29569
|
+
Legacy regex-only routing node. Existing graphs keep their current behavior.
|
|
29570
|
+
|
|
29571
|
+
For new graphs, use Match case. It supports exact plain-text cases by default and optional regular-expression matching.
|
|
29572
|
+
`,
|
|
29573
|
+
infoBoxTitle: `${regexMatchLegacyDisplayName} Node`,
|
|
29574
|
+
contextMenuTitle: regexMatchLegacyDisplayName,
|
|
29575
|
+
group: ["Logic"]
|
|
29576
|
+
};
|
|
29577
|
+
}
|
|
29578
|
+
};
|
|
29579
|
+
var matchNode = nodeDefinition(MatchNodeImpl, regexMatchLegacyDisplayName);
|
|
29580
|
+
|
|
29581
|
+
// src/model/nodes/MatchCaseNode.ts
|
|
29582
|
+
var import_non_secure21 = require("nanoid/non-secure");
|
|
29583
|
+
var import_ts_dedent15 = require("ts-dedent");
|
|
29584
|
+
var MatchCaseNodeImpl = class extends MatchCaseNodeBase {
|
|
29585
|
+
caseEditorLabel = "Cases";
|
|
29586
|
+
caseEditorPlaceholder = "Case";
|
|
29587
|
+
casesEditorPlacement = "before-trigger";
|
|
29588
|
+
customCaseValuesEditorLabel = "";
|
|
29589
|
+
defaultExclusive = true;
|
|
29590
|
+
firstMatchingBodyValue = "First matching case";
|
|
29591
|
+
inputTitle = "Input";
|
|
29592
|
+
matchingCasesToTriggerOptions = [
|
|
29593
|
+
{ value: true, label: "First matching case" },
|
|
29594
|
+
{ value: false, label: "All matching cases" }
|
|
29595
|
+
];
|
|
29596
|
+
sharedCustomValueInputTitle = "Output value";
|
|
29597
|
+
triggerEditorLabel = "Trigger";
|
|
29598
|
+
static create() {
|
|
29599
|
+
return {
|
|
29600
|
+
type: "matchCase",
|
|
29601
|
+
title: "Match case",
|
|
29602
|
+
id: (0, import_non_secure21.nanoid)(),
|
|
29603
|
+
visualData: {
|
|
29604
|
+
x: 0,
|
|
29605
|
+
y: 0,
|
|
29606
|
+
width: 250
|
|
29607
|
+
},
|
|
29608
|
+
data: {
|
|
29609
|
+
cases: ["YES", "NO"],
|
|
29610
|
+
casePortIds: [(0, import_non_secure21.nanoid)(), (0, import_non_secure21.nanoid)()],
|
|
29611
|
+
valueInputMode: "shared",
|
|
29612
|
+
matchMode: "plainText",
|
|
29613
|
+
caseSensitive: true,
|
|
29614
|
+
exclusive: true,
|
|
29615
|
+
returnValue: "true"
|
|
29616
|
+
}
|
|
29617
|
+
};
|
|
29618
|
+
}
|
|
29619
|
+
matchesCase(input, caseValue) {
|
|
29620
|
+
if (this.getMatchMode() === "regex") {
|
|
29621
|
+
return new RegExp(caseValue).test(input);
|
|
29622
|
+
}
|
|
29623
|
+
if (this.getCaseSensitive()) {
|
|
29624
|
+
return input === caseValue;
|
|
29625
|
+
}
|
|
29626
|
+
return input.toLowerCase() === caseValue.toLowerCase();
|
|
29627
|
+
}
|
|
29628
|
+
describeCaseMatch(caseValue) {
|
|
29629
|
+
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`;
|
|
29630
|
+
}
|
|
29631
|
+
describeNoCaseMatches() {
|
|
29632
|
+
if (this.getMatchMode() === "regex") {
|
|
29633
|
+
return "no regular expression matches the Input value";
|
|
29634
|
+
}
|
|
29635
|
+
return this.getCaseSensitive() ? "no case exactly equals the Input value" : "no case equals the Input value without regard to case";
|
|
29636
|
+
}
|
|
29637
|
+
getReturnValueMode() {
|
|
29638
|
+
return this.data.returnValue === "testValue" || this.data.returnValue === "custom" ? this.data.returnValue : "true";
|
|
29639
|
+
}
|
|
29640
|
+
getEditorsAfterTrigger() {
|
|
29641
|
+
return [
|
|
29642
|
+
{
|
|
29643
|
+
type: "segmented",
|
|
29644
|
+
label: "Output value",
|
|
29645
|
+
dataKey: "returnValue",
|
|
29646
|
+
defaultValue: "true",
|
|
29647
|
+
options: [
|
|
29648
|
+
{ value: "true", label: "True" },
|
|
29649
|
+
{ value: "testValue", label: "Input value" },
|
|
29650
|
+
{ value: "custom", label: "Custom" }
|
|
29651
|
+
]
|
|
29652
|
+
}
|
|
29653
|
+
];
|
|
29654
|
+
}
|
|
29655
|
+
shouldHideCustomCaseValues(data) {
|
|
29656
|
+
return (data.returnValue ?? "true") !== "custom";
|
|
29657
|
+
}
|
|
29658
|
+
getEditors() {
|
|
29659
|
+
return [
|
|
29660
|
+
{
|
|
29661
|
+
type: "segmented",
|
|
29662
|
+
label: "Match mode",
|
|
29663
|
+
dataKey: "matchMode",
|
|
29664
|
+
defaultValue: "plainText",
|
|
29665
|
+
options: [
|
|
29666
|
+
{ value: "plainText", label: "Plain text" },
|
|
29667
|
+
{ value: "regex", label: "Regular expression" }
|
|
29668
|
+
]
|
|
29669
|
+
},
|
|
29670
|
+
{
|
|
29671
|
+
type: "toggle",
|
|
29672
|
+
label: "Case sensitive",
|
|
29673
|
+
dataKey: "caseSensitive",
|
|
29674
|
+
defaultValue: true,
|
|
29675
|
+
hideIf: (data) => data.matchMode === "regex"
|
|
29676
|
+
},
|
|
29677
|
+
...super.getEditors()
|
|
29678
|
+
];
|
|
29679
|
+
}
|
|
29680
|
+
static getUIData() {
|
|
29681
|
+
return {
|
|
29682
|
+
infoBoxBody: import_ts_dedent15.dedent`
|
|
29683
|
+
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.
|
|
29684
|
+
|
|
29685
|
+
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 Output value input or separate Output values inputs for every case and Unmatched.
|
|
29686
|
+
`,
|
|
29687
|
+
infoBoxTitle: "Match case Node",
|
|
29688
|
+
contextMenuTitle: "Match case",
|
|
29689
|
+
group: ["Logic"]
|
|
29690
|
+
};
|
|
29691
|
+
}
|
|
29692
|
+
getMatchMode() {
|
|
29693
|
+
return this.data.matchMode === "regex" ? "regex" : "plainText";
|
|
29694
|
+
}
|
|
29695
|
+
getCaseSensitive() {
|
|
29696
|
+
return this.data.caseSensitive !== false;
|
|
29697
|
+
}
|
|
29698
|
+
};
|
|
29699
|
+
var matchCaseNode = nodeDefinition(MatchCaseNodeImpl, "Match case");
|
|
28908
29700
|
|
|
28909
29701
|
// src/model/nodes/IfNode.ts
|
|
28910
|
-
var
|
|
28911
|
-
var
|
|
29702
|
+
var import_non_secure22 = require("nanoid/non-secure");
|
|
29703
|
+
var import_ts_dedent16 = require("ts-dedent");
|
|
28912
29704
|
var IfNodeImpl = class extends NodeImpl {
|
|
28913
29705
|
static create = () => {
|
|
28914
29706
|
const chartNode = {
|
|
28915
29707
|
type: "if",
|
|
28916
29708
|
title: "If",
|
|
28917
|
-
id: (0,
|
|
29709
|
+
id: (0, import_non_secure22.nanoid)(),
|
|
28918
29710
|
data: {
|
|
28919
29711
|
// Legacy behavior is false
|
|
28920
29712
|
unconnectedControlFlowExcluded: true
|
|
@@ -28961,7 +29753,7 @@ var IfNodeImpl = class extends NodeImpl {
|
|
|
28961
29753
|
}
|
|
28962
29754
|
static getUIData() {
|
|
28963
29755
|
return {
|
|
28964
|
-
infoBoxBody:
|
|
29756
|
+
infoBoxBody: import_ts_dedent16.dedent`
|
|
28965
29757
|
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
29758
|
If the condition is falsy, the value is passed through the False port, and the True port is not ran.
|
|
28967
29759
|
`,
|
|
@@ -29031,8 +29823,8 @@ var IfNodeImpl = class extends NodeImpl {
|
|
|
29031
29823
|
var ifNode = nodeDefinition(IfNodeImpl, "If");
|
|
29032
29824
|
|
|
29033
29825
|
// src/model/nodes/ReadDirectoryNode.ts
|
|
29034
|
-
var
|
|
29035
|
-
var
|
|
29826
|
+
var import_non_secure23 = require("nanoid/non-secure");
|
|
29827
|
+
var import_ts_dedent17 = require("ts-dedent");
|
|
29036
29828
|
|
|
29037
29829
|
// src/utils/paths.ts
|
|
29038
29830
|
function createTreeFromPaths(paths, rootPath) {
|
|
@@ -29107,7 +29899,7 @@ function createTreeFromPaths(paths, rootPath) {
|
|
|
29107
29899
|
var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
29108
29900
|
static create() {
|
|
29109
29901
|
return {
|
|
29110
|
-
id: (0,
|
|
29902
|
+
id: (0, import_non_secure23.nanoid)(),
|
|
29111
29903
|
type: "readDirectory",
|
|
29112
29904
|
title: "Read Directory",
|
|
29113
29905
|
visualData: { x: 0, y: 0 },
|
|
@@ -29196,7 +29988,7 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29196
29988
|
];
|
|
29197
29989
|
}
|
|
29198
29990
|
getBody() {
|
|
29199
|
-
return
|
|
29991
|
+
return import_ts_dedent17.dedent`
|
|
29200
29992
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
29201
29993
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
29202
29994
|
Include Directories: ${this.data.useIncludeDirectoriesInput ? "(Input)" : this.data.includeDirectories}
|
|
@@ -29206,7 +29998,7 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29206
29998
|
}
|
|
29207
29999
|
static getUIData() {
|
|
29208
30000
|
return {
|
|
29209
|
-
infoBoxBody:
|
|
30001
|
+
infoBoxBody: import_ts_dedent17.dedent`
|
|
29210
30002
|
Reads the contents of the specified directory and outputs:
|
|
29211
30003
|
1. An array of filenames
|
|
29212
30004
|
2. The root path of the search
|
|
@@ -29262,12 +30054,12 @@ var ReadDirectoryNodeImpl = class extends NodeImpl {
|
|
|
29262
30054
|
var readDirectoryNode = nodeDefinition(ReadDirectoryNodeImpl, "Read Directory");
|
|
29263
30055
|
|
|
29264
30056
|
// src/model/nodes/ReadFileNode.ts
|
|
29265
|
-
var
|
|
29266
|
-
var
|
|
30057
|
+
var import_non_secure24 = require("nanoid/non-secure");
|
|
30058
|
+
var import_ts_dedent18 = require("ts-dedent");
|
|
29267
30059
|
var ReadFileNodeImpl = class extends NodeImpl {
|
|
29268
30060
|
static create() {
|
|
29269
30061
|
return {
|
|
29270
|
-
id: (0,
|
|
30062
|
+
id: (0, import_non_secure24.nanoid)(),
|
|
29271
30063
|
type: "readFile",
|
|
29272
30064
|
title: "Read File",
|
|
29273
30065
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -29302,7 +30094,7 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29302
30094
|
}
|
|
29303
30095
|
static getUIData() {
|
|
29304
30096
|
return {
|
|
29305
|
-
infoBoxBody:
|
|
30097
|
+
infoBoxBody: import_ts_dedent18.dedent`
|
|
29306
30098
|
Reads the contents of the specified file and outputs it as a string.
|
|
29307
30099
|
`,
|
|
29308
30100
|
infoBoxTitle: "Read File Node",
|
|
@@ -29331,7 +30123,7 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29331
30123
|
];
|
|
29332
30124
|
}
|
|
29333
30125
|
getBody() {
|
|
29334
|
-
return
|
|
30126
|
+
return import_ts_dedent18.dedent`
|
|
29335
30127
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
29336
30128
|
${this.data.usePathInput ? "" : `Path: ${this.data.path}`}
|
|
29337
30129
|
`;
|
|
@@ -29369,14 +30161,14 @@ var ReadFileNodeImpl = class extends NodeImpl {
|
|
|
29369
30161
|
var readFileNode = nodeDefinition(ReadFileNodeImpl, "Read File");
|
|
29370
30162
|
|
|
29371
30163
|
// src/model/nodes/IfElseNode.ts
|
|
29372
|
-
var
|
|
29373
|
-
var
|
|
30164
|
+
var import_non_secure25 = require("nanoid/non-secure");
|
|
30165
|
+
var import_ts_dedent19 = require("ts-dedent");
|
|
29374
30166
|
var IfElseNodeImpl = class extends NodeImpl {
|
|
29375
30167
|
static create = () => {
|
|
29376
30168
|
const chartNode = {
|
|
29377
30169
|
type: "ifElse",
|
|
29378
30170
|
title: "If/Else",
|
|
29379
|
-
id: (0,
|
|
30171
|
+
id: (0, import_non_secure25.nanoid)(),
|
|
29380
30172
|
data: {
|
|
29381
30173
|
// Legacy behavior is false
|
|
29382
30174
|
unconnectedControlFlowExcluded: true
|
|
@@ -29423,7 +30215,7 @@ var IfElseNodeImpl = class extends NodeImpl {
|
|
|
29423
30215
|
}
|
|
29424
30216
|
static getUIData() {
|
|
29425
30217
|
return {
|
|
29426
|
-
infoBoxBody:
|
|
30218
|
+
infoBoxBody: import_ts_dedent19.dedent`
|
|
29427
30219
|
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
30220
|
|
|
29429
30221
|
This node can "consume" a \`Not Ran\` to continue a graph from that point.
|
|
@@ -29502,14 +30294,14 @@ var IfElseNodeImpl = class extends NodeImpl {
|
|
|
29502
30294
|
var ifElseNode = nodeDefinition(IfElseNodeImpl, "If/Else");
|
|
29503
30295
|
|
|
29504
30296
|
// src/model/nodes/ChunkNode.ts
|
|
29505
|
-
var
|
|
29506
|
-
var
|
|
30297
|
+
var import_non_secure26 = require("nanoid/non-secure");
|
|
30298
|
+
var import_ts_dedent20 = require("ts-dedent");
|
|
29507
30299
|
var ChunkNodeImpl = class extends NodeImpl {
|
|
29508
30300
|
static create() {
|
|
29509
30301
|
const chartNode = {
|
|
29510
30302
|
type: "chunk",
|
|
29511
30303
|
title: "Chunk",
|
|
29512
|
-
id: (0,
|
|
30304
|
+
id: (0, import_non_secure26.nanoid)(),
|
|
29513
30305
|
visualData: {
|
|
29514
30306
|
x: 0,
|
|
29515
30307
|
y: 0,
|
|
@@ -29598,7 +30390,7 @@ var ChunkNodeImpl = class extends NodeImpl {
|
|
|
29598
30390
|
];
|
|
29599
30391
|
}
|
|
29600
30392
|
getBody() {
|
|
29601
|
-
return
|
|
30393
|
+
return import_ts_dedent20.dedent`
|
|
29602
30394
|
Model: ${this.data.model}
|
|
29603
30395
|
Token Count: ${this.data.numTokensPerChunk.toLocaleString()}
|
|
29604
30396
|
${this.data.overlap ? `Overlap: ${this.data.overlap}%` : ""}
|
|
@@ -29606,7 +30398,7 @@ var ChunkNodeImpl = class extends NodeImpl {
|
|
|
29606
30398
|
}
|
|
29607
30399
|
static getUIData() {
|
|
29608
30400
|
return {
|
|
29609
|
-
infoBoxBody:
|
|
30401
|
+
infoBoxBody: import_ts_dedent20.dedent`
|
|
29610
30402
|
Splits the input text into an array of chunks based on an approximate GPT token count per chunk.
|
|
29611
30403
|
|
|
29612
30404
|
The "overlap" setting allows you to partially overlap the chunks for redundancy.
|
|
@@ -29671,135 +30463,15 @@ async function chunkStringByTokenCount(tokenizer, tokenizerInfo, input, targetTo
|
|
|
29671
30463
|
return chunks;
|
|
29672
30464
|
}
|
|
29673
30465
|
|
|
29674
|
-
// src/model/nodes/GraphInputNode.ts
|
|
29675
|
-
var import_non_secure25 = require("nanoid/non-secure");
|
|
29676
|
-
var import_ts_dedent19 = require("ts-dedent");
|
|
29677
|
-
var GraphInputNodeImpl = class extends NodeImpl {
|
|
29678
|
-
static create() {
|
|
29679
|
-
const chartNode = {
|
|
29680
|
-
type: "graphInput",
|
|
29681
|
-
title: "Graph Input",
|
|
29682
|
-
id: (0, import_non_secure25.nanoid)(),
|
|
29683
|
-
visualData: {
|
|
29684
|
-
x: 0,
|
|
29685
|
-
y: 0,
|
|
29686
|
-
width: 300
|
|
29687
|
-
},
|
|
29688
|
-
data: {
|
|
29689
|
-
id: "input",
|
|
29690
|
-
dataType: "string",
|
|
29691
|
-
defaultValue: void 0,
|
|
29692
|
-
useDefaultValueInput: false
|
|
29693
|
-
}
|
|
29694
|
-
};
|
|
29695
|
-
return chartNode;
|
|
29696
|
-
}
|
|
29697
|
-
getInputDefinitions() {
|
|
29698
|
-
if (this.data.useDefaultValueInput) {
|
|
29699
|
-
return [
|
|
29700
|
-
{
|
|
29701
|
-
id: "default",
|
|
29702
|
-
title: "Default Value",
|
|
29703
|
-
dataType: this.chartNode.data.dataType
|
|
29704
|
-
}
|
|
29705
|
-
];
|
|
29706
|
-
}
|
|
29707
|
-
return [];
|
|
29708
|
-
}
|
|
29709
|
-
getOutputDefinitions() {
|
|
29710
|
-
return [
|
|
29711
|
-
{
|
|
29712
|
-
id: "data",
|
|
29713
|
-
title: this.data.id,
|
|
29714
|
-
dataType: this.chartNode.data.dataType
|
|
29715
|
-
}
|
|
29716
|
-
];
|
|
29717
|
-
}
|
|
29718
|
-
getEditors() {
|
|
29719
|
-
return [
|
|
29720
|
-
{
|
|
29721
|
-
type: "string",
|
|
29722
|
-
label: "ID",
|
|
29723
|
-
dataKey: "id"
|
|
29724
|
-
},
|
|
29725
|
-
{
|
|
29726
|
-
type: "dataTypeSelector",
|
|
29727
|
-
label: "Data Type",
|
|
29728
|
-
dataKey: "dataType"
|
|
29729
|
-
},
|
|
29730
|
-
{
|
|
29731
|
-
type: "anyData",
|
|
29732
|
-
label: "Default Value",
|
|
29733
|
-
dataKey: "defaultValue",
|
|
29734
|
-
useInputToggleDataKey: "useDefaultValueInput"
|
|
29735
|
-
},
|
|
29736
|
-
{
|
|
29737
|
-
type: "dropdown",
|
|
29738
|
-
label: "Editor",
|
|
29739
|
-
dataKey: "editor",
|
|
29740
|
-
defaultValue: "auto",
|
|
29741
|
-
options: [
|
|
29742
|
-
{ label: "None", value: "none" },
|
|
29743
|
-
{ label: "Auto", value: "auto" },
|
|
29744
|
-
{ label: "String", value: "string" },
|
|
29745
|
-
{ label: "Number", value: "number" },
|
|
29746
|
-
{ label: "Code", value: "code" },
|
|
29747
|
-
{ label: "Data Type", value: "dataTypeSelector" },
|
|
29748
|
-
{ label: "String List", value: "stringList" },
|
|
29749
|
-
{ label: "Key Value Pairs", value: "keyValuePair" },
|
|
29750
|
-
{ label: "Toggle", value: "toggle" }
|
|
29751
|
-
],
|
|
29752
|
-
helperMessage: "The editor to use when editing this value in the UI. Make sure this matches the data type."
|
|
29753
|
-
}
|
|
29754
|
-
];
|
|
29755
|
-
}
|
|
29756
|
-
getBody() {
|
|
29757
|
-
return import_ts_dedent19.dedent`
|
|
29758
|
-
${this.data.id}
|
|
29759
|
-
Type: ${this.data.dataType}
|
|
29760
|
-
${this.data.defaultValue == null ? "" : `Default: ${this.data.defaultValue}`}
|
|
29761
|
-
`;
|
|
29762
|
-
}
|
|
29763
|
-
static getUIData() {
|
|
29764
|
-
return {
|
|
29765
|
-
infoBoxBody: import_ts_dedent19.dedent`
|
|
29766
|
-
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
|
-
`,
|
|
29768
|
-
infoBoxTitle: "Graph Input Node",
|
|
29769
|
-
contextMenuTitle: "Graph Input",
|
|
29770
|
-
group: ["Input/Output"]
|
|
29771
|
-
};
|
|
29772
|
-
}
|
|
29773
|
-
async process(inputs, context) {
|
|
29774
|
-
let inputValue = context.graphInputs[this.data.id] == null ? void 0 : coerceTypeOptional(context.graphInputs[this.data.id], this.data.dataType);
|
|
29775
|
-
if (inputValue == null && this.data.useDefaultValueInput) {
|
|
29776
|
-
inputValue = coerceTypeOptional(inputs["default"], this.data.dataType);
|
|
29777
|
-
}
|
|
29778
|
-
if (inputValue == null) {
|
|
29779
|
-
inputValue = coerceTypeOptional(inferType(this.data.defaultValue), this.data.dataType) || getDefaultValue(this.data.dataType);
|
|
29780
|
-
}
|
|
29781
|
-
if (inputValue == null && isArrayDataType(this.data.dataType)) {
|
|
29782
|
-
inputValue = { type: this.data.dataType, value: [] };
|
|
29783
|
-
}
|
|
29784
|
-
const value = {
|
|
29785
|
-
type: this.data.dataType,
|
|
29786
|
-
value: inputValue
|
|
29787
|
-
};
|
|
29788
|
-
context.graphInputNodeValues[this.data.id] = value;
|
|
29789
|
-
return { ["data"]: value };
|
|
29790
|
-
}
|
|
29791
|
-
};
|
|
29792
|
-
var graphInputNode = nodeDefinition(GraphInputNodeImpl, "Graph Input");
|
|
29793
|
-
|
|
29794
30466
|
// src/model/nodes/SubGraphNode.ts
|
|
29795
|
-
var
|
|
29796
|
-
var
|
|
30467
|
+
var import_non_secure27 = require("nanoid/non-secure");
|
|
30468
|
+
var import_ts_dedent21 = require("ts-dedent");
|
|
29797
30469
|
var SubGraphNodeImpl = class extends NodeImpl {
|
|
29798
30470
|
static create() {
|
|
29799
30471
|
const chartNode = {
|
|
29800
30472
|
type: "subGraph",
|
|
29801
30473
|
title: "Subgraph",
|
|
29802
|
-
id: (0,
|
|
30474
|
+
id: (0, import_non_secure27.nanoid)(),
|
|
29803
30475
|
visualData: {
|
|
29804
30476
|
x: 0,
|
|
29805
30477
|
y: 0,
|
|
@@ -29875,7 +30547,7 @@ var SubGraphNodeImpl = class extends NodeImpl {
|
|
|
29875
30547
|
}
|
|
29876
30548
|
static getUIData() {
|
|
29877
30549
|
return {
|
|
29878
|
-
infoBoxBody:
|
|
30550
|
+
infoBoxBody: import_ts_dedent21.dedent`
|
|
29879
30551
|
Executes another graph. Inputs and outputs are defined by Graph Input and Graph Output nodes within the subgraph.
|
|
29880
30552
|
`,
|
|
29881
30553
|
infoBoxTitle: "Subgraph Node",
|
|
@@ -29909,6 +30581,7 @@ var SubGraphNodeImpl = class extends NodeImpl {
|
|
|
29909
30581
|
context.contextValues,
|
|
29910
30582
|
{
|
|
29911
30583
|
...requestedGraphOutputIds ? { requestedGraphOutputIds } : {},
|
|
30584
|
+
graphInputStreams: context.graphInputStreams,
|
|
29912
30585
|
// A child Graph Output can relay a direct producer's partial value
|
|
29913
30586
|
// under the public boundary port ID. An Error-output Subgraph may
|
|
29914
30587
|
// later replace that same normal output with an exclusion, so it is
|
|
@@ -29980,9 +30653,9 @@ function buildOptimizedSubgraphOutputs(boundary, requestedOutputIds, graphOutput
|
|
|
29980
30653
|
}
|
|
29981
30654
|
|
|
29982
30655
|
// src/model/nodes/ArrayNode.ts
|
|
29983
|
-
var
|
|
30656
|
+
var import_non_secure28 = require("nanoid/non-secure");
|
|
29984
30657
|
var import_lodash_es7 = require("lodash");
|
|
29985
|
-
var
|
|
30658
|
+
var import_ts_dedent22 = require("ts-dedent");
|
|
29986
30659
|
|
|
29987
30660
|
// src/model/nodes/variadicPortIndex.ts
|
|
29988
30661
|
function getHighestVariadicPortIndex(connections, inputNodeId, prefix, policy) {
|
|
@@ -30024,7 +30697,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30024
30697
|
const chartNode = {
|
|
30025
30698
|
type: "array",
|
|
30026
30699
|
title: "Array",
|
|
30027
|
-
id: (0,
|
|
30700
|
+
id: (0, import_non_secure28.nanoid)(),
|
|
30028
30701
|
visualData: {
|
|
30029
30702
|
x: 0,
|
|
30030
30703
|
y: 0,
|
|
@@ -30084,7 +30757,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30084
30757
|
}
|
|
30085
30758
|
static getUIData() {
|
|
30086
30759
|
return {
|
|
30087
|
-
infoBoxBody:
|
|
30760
|
+
infoBoxBody: import_ts_dedent22.dedent`
|
|
30088
30761
|
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
30762
|
|
|
30090
30763
|
Useful for both creating and merging arrays.
|
|
@@ -30097,7 +30770,7 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30097
30770
|
};
|
|
30098
30771
|
}
|
|
30099
30772
|
getBody() {
|
|
30100
|
-
return
|
|
30773
|
+
return import_ts_dedent22.dedent`
|
|
30101
30774
|
${this.data.flatten ? this.data.flattenDeep ? "Flatten (Deep)" : "Flatten" : "No Flatten"}
|
|
30102
30775
|
`;
|
|
30103
30776
|
}
|
|
@@ -30141,14 +30814,14 @@ var ArrayNodeImpl = class extends NodeImpl {
|
|
|
30141
30814
|
var arrayNode = nodeDefinition(ArrayNodeImpl, "Array");
|
|
30142
30815
|
|
|
30143
30816
|
// src/model/nodes/ExtractJsonNode.ts
|
|
30144
|
-
var
|
|
30145
|
-
var
|
|
30817
|
+
var import_non_secure29 = require("nanoid/non-secure");
|
|
30818
|
+
var import_ts_dedent23 = require("ts-dedent");
|
|
30146
30819
|
var ExtractJsonNodeImpl = class extends NodeImpl {
|
|
30147
30820
|
static create() {
|
|
30148
30821
|
const chartNode = {
|
|
30149
30822
|
type: "extractJson",
|
|
30150
30823
|
title: "Extract JSON",
|
|
30151
|
-
id: (0,
|
|
30824
|
+
id: (0, import_non_secure29.nanoid)(),
|
|
30152
30825
|
visualData: {
|
|
30153
30826
|
x: 0,
|
|
30154
30827
|
y: 0,
|
|
@@ -30185,7 +30858,7 @@ var ExtractJsonNodeImpl = class extends NodeImpl {
|
|
|
30185
30858
|
}
|
|
30186
30859
|
static getUIData() {
|
|
30187
30860
|
return {
|
|
30188
|
-
infoBoxBody:
|
|
30861
|
+
infoBoxBody: import_ts_dedent23.dedent`
|
|
30189
30862
|
Finds and parses the first JSON object in input text, or passes through an already-structured input object.
|
|
30190
30863
|
|
|
30191
30864
|
Outputs the parsed or passed-through object.
|
|
@@ -30265,21 +30938,34 @@ function createMatchedOutput(value) {
|
|
|
30265
30938
|
}
|
|
30266
30939
|
|
|
30267
30940
|
// src/model/nodes/AssemblePromptNode.ts
|
|
30268
|
-
var
|
|
30941
|
+
var import_non_secure30 = require("nanoid/non-secure");
|
|
30269
30942
|
var import_lodash_es8 = require("lodash");
|
|
30270
|
-
var
|
|
30943
|
+
var import_ts_dedent24 = require("ts-dedent");
|
|
30944
|
+
function isEmptyPromptMessage(message) {
|
|
30945
|
+
var _a;
|
|
30946
|
+
if (message.type === "function") {
|
|
30947
|
+
return false;
|
|
30948
|
+
}
|
|
30949
|
+
if (message.type === "assistant" && (message.function_call != null || (((_a = message.function_calls) == null ? void 0 : _a.length) ?? 0) > 0)) {
|
|
30950
|
+
return false;
|
|
30951
|
+
}
|
|
30952
|
+
const parts = Array.isArray(message.message) ? message.message : [message.message];
|
|
30953
|
+
return !parts.some((part) => typeof part !== "string" || part.trim().length > 0);
|
|
30954
|
+
}
|
|
30271
30955
|
var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
30272
30956
|
static create() {
|
|
30273
30957
|
const chartNode = {
|
|
30274
30958
|
type: "assemblePrompt",
|
|
30275
30959
|
title: "Assemble Prompt",
|
|
30276
|
-
id: (0,
|
|
30960
|
+
id: (0, import_non_secure30.nanoid)(),
|
|
30277
30961
|
visualData: {
|
|
30278
30962
|
x: 0,
|
|
30279
30963
|
y: 0,
|
|
30280
30964
|
width: 250
|
|
30281
30965
|
},
|
|
30282
|
-
data: {
|
|
30966
|
+
data: {
|
|
30967
|
+
filterEmptyPrompts: false
|
|
30968
|
+
}
|
|
30283
30969
|
};
|
|
30284
30970
|
return chartNode;
|
|
30285
30971
|
}
|
|
@@ -30291,7 +30977,7 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30291
30977
|
dataType: "boolean",
|
|
30292
30978
|
id: "isLastMessageCacheBreakpoint",
|
|
30293
30979
|
title: "Is Last Message Cache Breakpoint",
|
|
30294
|
-
description: "Whether the last message in
|
|
30980
|
+
description: "Whether the last message in a multi-message prompt should be a cache breakpoint."
|
|
30295
30981
|
});
|
|
30296
30982
|
}
|
|
30297
30983
|
for (let i = 1; i <= messageCount; i++) {
|
|
@@ -30325,7 +31011,7 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30325
31011
|
}
|
|
30326
31012
|
static getUIData() {
|
|
30327
31013
|
return {
|
|
30328
|
-
infoBoxBody:
|
|
31014
|
+
infoBoxBody: import_ts_dedent24.dedent`
|
|
30329
31015
|
Assembles an array of chat messages for use with a Chat node. The inputs can be strings or chat messages.
|
|
30330
31016
|
|
|
30331
31017
|
The number of inputs is dynamic based on the number of connections.
|
|
@@ -30337,23 +31023,34 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30337
31023
|
group: ["AI"]
|
|
30338
31024
|
};
|
|
30339
31025
|
}
|
|
30340
|
-
getEditors(
|
|
31026
|
+
getEditors() {
|
|
30341
31027
|
return [
|
|
30342
31028
|
{
|
|
30343
31029
|
type: "toggle",
|
|
30344
31030
|
label: "Compute Token Count",
|
|
30345
31031
|
dataKey: "computeTokenCount"
|
|
30346
31032
|
},
|
|
31033
|
+
{
|
|
31034
|
+
type: "toggle",
|
|
31035
|
+
label: "Filter empty prompts",
|
|
31036
|
+
dataKey: "filterEmptyPrompts",
|
|
31037
|
+
defaultValue: false,
|
|
31038
|
+
helperMessage: "Removes text-only messages whose content is empty or whitespace. Rich-content and tool-protocol messages are preserved."
|
|
31039
|
+
},
|
|
30347
31040
|
{
|
|
30348
31041
|
type: "toggle",
|
|
30349
31042
|
label: "Is Last Message Cache Breakpoint",
|
|
30350
31043
|
dataKey: "isLastMessageCacheBreakpoint",
|
|
30351
|
-
|
|
31044
|
+
useInputToggleDataKey: "useIsLastMessageCacheBreakpointInput",
|
|
31045
|
+
helperMessage: "For Anthropic, marks the last message in a prompt containing at least two messages as a cache breakpoint. This message and every message before it will be cached using Prompt Caching."
|
|
30352
31046
|
}
|
|
30353
31047
|
];
|
|
30354
31048
|
}
|
|
30355
|
-
getBody(
|
|
30356
|
-
return
|
|
31049
|
+
getBody() {
|
|
31050
|
+
return [
|
|
31051
|
+
this.data.filterEmptyPrompts ? "Filter empty prompts: Enabled" : "",
|
|
31052
|
+
this.data.useIsLastMessageCacheBreakpointInput ? "Last message cache breakpoint: From input" : this.data.isLastMessageCacheBreakpoint ? "Last message is cache breakpoint" : ""
|
|
31053
|
+
].filter(Boolean).join("\n");
|
|
30357
31054
|
}
|
|
30358
31055
|
async process(inputs, context) {
|
|
30359
31056
|
const output = {};
|
|
@@ -30361,7 +31058,7 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30361
31058
|
const outMessages = [];
|
|
30362
31059
|
const inputMessages = (0, import_lodash_es8.orderBy)(
|
|
30363
31060
|
Object.entries(inputs).filter(([key]) => key.startsWith("message")),
|
|
30364
|
-
([key]) => key,
|
|
31061
|
+
([key]) => parseVariadicPortIndex(key, "message", "legacy"),
|
|
30365
31062
|
"asc"
|
|
30366
31063
|
);
|
|
30367
31064
|
for (const [, inputMessage] of inputMessages) {
|
|
@@ -30370,18 +31067,18 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30370
31067
|
}
|
|
30371
31068
|
const inMessages = arrayizeDataValue(unwrapDataValue(inputMessage));
|
|
30372
31069
|
for (const message of inMessages) {
|
|
30373
|
-
|
|
30374
|
-
|
|
30375
|
-
|
|
30376
|
-
const coerced = coerceType(message, "chat-message");
|
|
30377
|
-
if (coerced) {
|
|
30378
|
-
outMessages.push(coerced);
|
|
30379
|
-
}
|
|
31070
|
+
const outMessage = message.type === "chat-message" ? message.value : coerceType(message, "chat-message");
|
|
31071
|
+
if (this.data.filterEmptyPrompts && isEmptyPromptMessage(outMessage)) {
|
|
31072
|
+
continue;
|
|
30380
31073
|
}
|
|
31074
|
+
outMessages.push(outMessage);
|
|
30381
31075
|
}
|
|
30382
31076
|
}
|
|
30383
31077
|
if (isLastMessageCacheBreakpoint && outMessages.length > 1) {
|
|
30384
|
-
outMessages.
|
|
31078
|
+
outMessages[outMessages.length - 1] = {
|
|
31079
|
+
...outMessages[outMessages.length - 1],
|
|
31080
|
+
isCacheBreakpoint: true
|
|
31081
|
+
};
|
|
30385
31082
|
}
|
|
30386
31083
|
output["prompt"] = {
|
|
30387
31084
|
type: "chat-message[]",
|
|
@@ -30402,15 +31099,15 @@ var AssemblePromptNodeImpl = class extends NodeImpl {
|
|
|
30402
31099
|
var assemblePromptNode = nodeDefinition(AssemblePromptNodeImpl, "Assemble Prompt");
|
|
30403
31100
|
|
|
30404
31101
|
// src/model/nodes/ExtractYamlNode.ts
|
|
30405
|
-
var
|
|
31102
|
+
var import_non_secure31 = require("nanoid/non-secure");
|
|
30406
31103
|
var import_yaml = __toESM(require("yaml"), 1);
|
|
30407
|
-
var
|
|
31104
|
+
var import_ts_dedent25 = require("ts-dedent");
|
|
30408
31105
|
var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
30409
31106
|
static create() {
|
|
30410
31107
|
const chartNode = {
|
|
30411
31108
|
type: "extractYaml",
|
|
30412
31109
|
title: "Extract YAML",
|
|
30413
|
-
id: (0,
|
|
31110
|
+
id: (0, import_non_secure31.nanoid)(),
|
|
30414
31111
|
visualData: {
|
|
30415
31112
|
x: 0,
|
|
30416
31113
|
y: 0,
|
|
@@ -30490,14 +31187,14 @@ var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
|
30490
31187
|
];
|
|
30491
31188
|
}
|
|
30492
31189
|
getBody() {
|
|
30493
|
-
return
|
|
31190
|
+
return import_ts_dedent25.dedent`
|
|
30494
31191
|
Root: ${this.data.useRootPropertyNameInput ? "(Using Input)" : this.data.rootPropertyName}
|
|
30495
31192
|
${this.data.useObjectPathInput ? "Path: (Using Input)" : this.data.objectPath ? `Path: ${this.data.objectPath}` : ``}
|
|
30496
31193
|
`;
|
|
30497
31194
|
}
|
|
30498
31195
|
static getUIData() {
|
|
30499
31196
|
return {
|
|
30500
|
-
infoBoxBody:
|
|
31197
|
+
infoBoxBody: import_ts_dedent25.dedent`
|
|
30501
31198
|
Finds and parses a YAML object in the input text with a predefined root property name (configurable).
|
|
30502
31199
|
|
|
30503
31200
|
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 +31294,15 @@ var ExtractYamlNodeImpl = class extends NodeImpl {
|
|
|
30597
31294
|
var extractYamlNode = nodeDefinition(ExtractYamlNodeImpl, "Extract YAML");
|
|
30598
31295
|
|
|
30599
31296
|
// src/model/nodes/LoopControllerNode.ts
|
|
30600
|
-
var
|
|
30601
|
-
var
|
|
31297
|
+
var import_non_secure32 = require("nanoid/non-secure");
|
|
31298
|
+
var import_ts_dedent26 = require("ts-dedent");
|
|
30602
31299
|
var loopControllerLegacyDisplayName = "Loop Controller (legacy)";
|
|
30603
31300
|
var LoopControllerNodeImpl = class extends NodeImpl {
|
|
30604
31301
|
static create() {
|
|
30605
31302
|
const chartNode = {
|
|
30606
31303
|
type: "loopController",
|
|
30607
31304
|
title: loopControllerLegacyDisplayName,
|
|
30608
|
-
id: (0,
|
|
31305
|
+
id: (0, import_non_secure32.nanoid)(),
|
|
30609
31306
|
visualData: {
|
|
30610
31307
|
x: 0,
|
|
30611
31308
|
y: 0,
|
|
@@ -30711,7 +31408,7 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30711
31408
|
}
|
|
30712
31409
|
static getUIData() {
|
|
30713
31410
|
return {
|
|
30714
|
-
infoBoxBody:
|
|
31411
|
+
infoBoxBody: import_ts_dedent26.dedent`
|
|
30715
31412
|
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
31413
|
|
|
30717
31414
|
If the "continue" input is falsey, then the "break" output will run.
|
|
@@ -30783,14 +31480,14 @@ var LoopControllerNodeImpl = class extends NodeImpl {
|
|
|
30783
31480
|
var loopControllerNode = nodeDefinition(LoopControllerNodeImpl, loopControllerLegacyDisplayName);
|
|
30784
31481
|
|
|
30785
31482
|
// src/model/nodes/TrimChatMessagesNode.ts
|
|
30786
|
-
var
|
|
30787
|
-
var
|
|
31483
|
+
var import_non_secure33 = require("nanoid/non-secure");
|
|
31484
|
+
var import_ts_dedent27 = require("ts-dedent");
|
|
30788
31485
|
var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
30789
31486
|
static create() {
|
|
30790
31487
|
const chartNode = {
|
|
30791
31488
|
type: "trimChatMessages",
|
|
30792
31489
|
title: "Trim Chat Messages",
|
|
30793
|
-
id: (0,
|
|
31490
|
+
id: (0, import_non_secure33.nanoid)(),
|
|
30794
31491
|
visualData: {
|
|
30795
31492
|
x: 0,
|
|
30796
31493
|
y: 0,
|
|
@@ -30853,14 +31550,14 @@ var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
|
30853
31550
|
];
|
|
30854
31551
|
}
|
|
30855
31552
|
getBody() {
|
|
30856
|
-
return
|
|
31553
|
+
return import_ts_dedent27.dedent`
|
|
30857
31554
|
Max Token Count: ${this.data.useMaxTokenCountInput ? "(From Input)" : this.data.maxTokenCount}
|
|
30858
31555
|
Remove From Beginning: ${this.data.useRemoveFromBeginningInput ? "(From Input)" : this.data.removeFromBeginning ? "Yes" : "No"}
|
|
30859
31556
|
`;
|
|
30860
31557
|
}
|
|
30861
31558
|
static getUIData() {
|
|
30862
31559
|
return {
|
|
30863
|
-
infoBoxBody:
|
|
31560
|
+
infoBoxBody: import_ts_dedent27.dedent`
|
|
30864
31561
|
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
31562
|
|
|
30866
31563
|
Useful for setting up infinite message chains that stay under the LLM context limit.
|
|
@@ -30898,13 +31595,13 @@ var TrimChatMessagesNodeImpl = class extends NodeImpl {
|
|
|
30898
31595
|
var trimChatMessagesNode = nodeDefinition(TrimChatMessagesNodeImpl, "Trim Chat Messages");
|
|
30899
31596
|
|
|
30900
31597
|
// src/model/nodes/ExternalCallNode.ts
|
|
30901
|
-
var
|
|
31598
|
+
var import_non_secure34 = require("nanoid/non-secure");
|
|
30902
31599
|
var import_lodash_es9 = require("lodash");
|
|
30903
|
-
var
|
|
31600
|
+
var import_ts_dedent28 = require("ts-dedent");
|
|
30904
31601
|
var ExternalCallNodeImpl = class extends NodeImpl {
|
|
30905
31602
|
static create() {
|
|
30906
31603
|
return {
|
|
30907
|
-
id: (0,
|
|
31604
|
+
id: (0, import_non_secure34.nanoid)(),
|
|
30908
31605
|
type: "externalCall",
|
|
30909
31606
|
title: "External Call",
|
|
30910
31607
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -30968,7 +31665,7 @@ var ExternalCallNodeImpl = class extends NodeImpl {
|
|
|
30968
31665
|
}
|
|
30969
31666
|
static getUIData() {
|
|
30970
31667
|
return {
|
|
30971
|
-
infoBoxBody:
|
|
31668
|
+
infoBoxBody: import_ts_dedent28.dedent`
|
|
30972
31669
|
Provides a way to call into the host project from inside a Rivet graph when Rivet graphs are integrated into another project.
|
|
30973
31670
|
`,
|
|
30974
31671
|
infoBoxTitle: "External Call Node",
|
|
@@ -31047,8 +31744,8 @@ var ExternalCallNodeImpl = class extends NodeImpl {
|
|
|
31047
31744
|
var externalCallNode = nodeDefinition(ExternalCallNodeImpl, "External Call");
|
|
31048
31745
|
|
|
31049
31746
|
// src/model/nodes/ExtractObjectPathNode.ts
|
|
31050
|
-
var
|
|
31051
|
-
var
|
|
31747
|
+
var import_non_secure35 = require("nanoid/non-secure");
|
|
31748
|
+
var import_ts_dedent29 = require("ts-dedent");
|
|
31052
31749
|
var RESERVED_INPUT_IDS = /* @__PURE__ */ new Set(["object"]);
|
|
31053
31750
|
function getExtractObjectPathInterpolationInputNames(path) {
|
|
31054
31751
|
return extractInterpolationVariables(path).filter((inputName) => !RESERVED_INPUT_IDS.has(inputName));
|
|
@@ -31075,7 +31772,7 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31075
31772
|
const chartNode = {
|
|
31076
31773
|
type: "extractObjectPath",
|
|
31077
31774
|
title: "Extract Object Path",
|
|
31078
|
-
id: (0,
|
|
31775
|
+
id: (0, import_non_secure35.nanoid)(),
|
|
31079
31776
|
visualData: {
|
|
31080
31777
|
x: 0,
|
|
31081
31778
|
y: 0,
|
|
@@ -31152,7 +31849,7 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31152
31849
|
}
|
|
31153
31850
|
static getUIData() {
|
|
31154
31851
|
return {
|
|
31155
|
-
infoBoxBody:
|
|
31852
|
+
infoBoxBody: import_ts_dedent29.dedent`
|
|
31156
31853
|
Extracts the value at the specified path from the input value. The path uses JSONPath notation to navigate through the value.
|
|
31157
31854
|
`,
|
|
31158
31855
|
infoBoxTitle: "Extract Object Path Node",
|
|
@@ -31208,12 +31905,12 @@ var ExtractObjectPathNodeImpl = class extends NodeImpl {
|
|
|
31208
31905
|
var extractObjectPathNode = nodeDefinition(ExtractObjectPathNodeImpl, "Extract Object Path");
|
|
31209
31906
|
|
|
31210
31907
|
// src/model/nodes/RaiseEventNode.ts
|
|
31211
|
-
var
|
|
31212
|
-
var
|
|
31908
|
+
var import_non_secure36 = require("nanoid/non-secure");
|
|
31909
|
+
var import_ts_dedent30 = require("ts-dedent");
|
|
31213
31910
|
var RaiseEventNodeImpl = class extends NodeImpl {
|
|
31214
31911
|
static create() {
|
|
31215
31912
|
return {
|
|
31216
|
-
id: (0,
|
|
31913
|
+
id: (0, import_non_secure36.nanoid)(),
|
|
31217
31914
|
type: "raiseEvent",
|
|
31218
31915
|
title: "Raise Event",
|
|
31219
31916
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -31263,7 +31960,7 @@ var RaiseEventNodeImpl = class extends NodeImpl {
|
|
|
31263
31960
|
}
|
|
31264
31961
|
static getUIData() {
|
|
31265
31962
|
return {
|
|
31266
|
-
infoBoxBody:
|
|
31963
|
+
infoBoxBody: import_ts_dedent30.dedent`
|
|
31267
31964
|
Raises an event that the host project or a 'Wait For Event' node can listen for.
|
|
31268
31965
|
`,
|
|
31269
31966
|
infoBoxTitle: "Raise Event Node",
|
|
@@ -31283,11 +31980,11 @@ var RaiseEventNodeImpl = class extends NodeImpl {
|
|
|
31283
31980
|
var raiseEventNode = nodeDefinition(RaiseEventNodeImpl, "Raise Event");
|
|
31284
31981
|
|
|
31285
31982
|
// src/model/nodes/ReportProgressNode.ts
|
|
31286
|
-
var
|
|
31983
|
+
var import_non_secure37 = require("nanoid/non-secure");
|
|
31287
31984
|
var ReportProgressNodeImpl = class extends NodeImpl {
|
|
31288
31985
|
static create() {
|
|
31289
31986
|
return {
|
|
31290
|
-
id: (0,
|
|
31987
|
+
id: (0, import_non_secure37.nanoid)(),
|
|
31291
31988
|
type: "reportProgress",
|
|
31292
31989
|
title: "Report Progress",
|
|
31293
31990
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -31331,14 +32028,14 @@ var ReportProgressNodeImpl = class extends NodeImpl {
|
|
|
31331
32028
|
var reportProgressNode = nodeDefinition(ReportProgressNodeImpl, "Report Progress");
|
|
31332
32029
|
|
|
31333
32030
|
// src/model/nodes/ContextNode.ts
|
|
31334
|
-
var
|
|
31335
|
-
var
|
|
32031
|
+
var import_non_secure38 = require("nanoid/non-secure");
|
|
32032
|
+
var import_ts_dedent31 = require("ts-dedent");
|
|
31336
32033
|
var ContextNodeImpl = class extends NodeImpl {
|
|
31337
32034
|
static create() {
|
|
31338
32035
|
const chartNode = {
|
|
31339
32036
|
type: "context",
|
|
31340
32037
|
title: "Context",
|
|
31341
|
-
id: (0,
|
|
32038
|
+
id: (0, import_non_secure38.nanoid)(),
|
|
31342
32039
|
visualData: {
|
|
31343
32040
|
x: 0,
|
|
31344
32041
|
y: 0,
|
|
@@ -31387,14 +32084,14 @@ var ContextNodeImpl = class extends NodeImpl {
|
|
|
31387
32084
|
];
|
|
31388
32085
|
}
|
|
31389
32086
|
getBody() {
|
|
31390
|
-
return
|
|
32087
|
+
return import_ts_dedent31.dedent`
|
|
31391
32088
|
${this.data.id}
|
|
31392
32089
|
Type: ${this.data.dataType}
|
|
31393
32090
|
`;
|
|
31394
32091
|
}
|
|
31395
32092
|
static getUIData() {
|
|
31396
32093
|
return {
|
|
31397
|
-
infoBoxBody:
|
|
32094
|
+
infoBoxBody: import_ts_dedent31.dedent`
|
|
31398
32095
|
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
32096
|
`,
|
|
31400
32097
|
infoBoxTitle: "Context Node",
|
|
@@ -31472,11 +32169,47 @@ var GraphCallPathNodeImpl = class extends NodeImpl {
|
|
|
31472
32169
|
};
|
|
31473
32170
|
var graphCallPathNode = nodeDefinition(GraphCallPathNodeImpl, "Graph Call Path");
|
|
31474
32171
|
|
|
32172
|
+
// src/model/nodes/ProjectNameNode.ts
|
|
32173
|
+
var ProjectNameNodeImpl = class extends NodeImpl {
|
|
32174
|
+
static create() {
|
|
32175
|
+
return {
|
|
32176
|
+
id: newId(),
|
|
32177
|
+
type: "projectName",
|
|
32178
|
+
title: "Project Name",
|
|
32179
|
+
visualData: { x: 0, y: 0, width: 250 },
|
|
32180
|
+
data: {}
|
|
32181
|
+
};
|
|
32182
|
+
}
|
|
32183
|
+
getInputDefinitions() {
|
|
32184
|
+
return [];
|
|
32185
|
+
}
|
|
32186
|
+
getOutputDefinitions() {
|
|
32187
|
+
return [{ id: "projectName", title: "Project Name", dataType: "string" }];
|
|
32188
|
+
}
|
|
32189
|
+
getEditors() {
|
|
32190
|
+
return [];
|
|
32191
|
+
}
|
|
32192
|
+
static getUIData() {
|
|
32193
|
+
return {
|
|
32194
|
+
contextMenuTitle: "Project Name",
|
|
32195
|
+
infoBoxTitle: "Project Name",
|
|
32196
|
+
infoBoxBody: "Returns the name of the project that owns the graph currently being executed. A graph called from a referenced project returns that referenced project's name.",
|
|
32197
|
+
group: ["Debug"]
|
|
32198
|
+
};
|
|
32199
|
+
}
|
|
32200
|
+
async process(_inputs, context) {
|
|
32201
|
+
return {
|
|
32202
|
+
["projectName"]: { type: "string", value: context.project.metadata.title }
|
|
32203
|
+
};
|
|
32204
|
+
}
|
|
32205
|
+
};
|
|
32206
|
+
var projectNameNode = nodeDefinition(ProjectNameNodeImpl, "Project Name");
|
|
32207
|
+
|
|
31475
32208
|
// src/model/nodes/CoalesceNode.ts
|
|
31476
|
-
var
|
|
32209
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
31477
32210
|
|
|
31478
32211
|
// src/model/nodes/CoalesceNodeBase.ts
|
|
31479
|
-
var
|
|
32212
|
+
var import_non_secure39 = require("nanoid/non-secure");
|
|
31480
32213
|
var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
|
|
31481
32214
|
var IGNORE_NULL_LABEL = "Ignore 'null'";
|
|
31482
32215
|
var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
|
|
@@ -31484,7 +32217,7 @@ function createCoalesceNode(type, title) {
|
|
|
31484
32217
|
return {
|
|
31485
32218
|
type,
|
|
31486
32219
|
title,
|
|
31487
|
-
id: (0,
|
|
32220
|
+
id: (0, import_non_secure39.nanoid)(),
|
|
31488
32221
|
data: {
|
|
31489
32222
|
ignoreNull: false,
|
|
31490
32223
|
ignoreUndefined: false
|
|
@@ -31606,8 +32339,8 @@ var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
|
31606
32339
|
static create = () => createCoalesceNode("coalesce", coalesceLegacyDisplayName);
|
|
31607
32340
|
static getUIData() {
|
|
31608
32341
|
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.
|
|
32342
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
32343
|
+
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
32344
|
|
|
31612
32345
|
Its Conditional input can exclude the node itself. New graphs should use Coalesce instead, which has the same fallback behavior without that port.
|
|
31613
32346
|
`,
|
|
@@ -31620,14 +32353,14 @@ var CoalesceNodeImpl = class extends CoalesceNodeBase {
|
|
|
31620
32353
|
var coalesceNode = nodeDefinition(CoalesceNodeImpl, coalesceLegacyDisplayName);
|
|
31621
32354
|
|
|
31622
32355
|
// src/model/nodes/CoalesceNewNode.ts
|
|
31623
|
-
var
|
|
32356
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
31624
32357
|
var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
31625
32358
|
includesLegacyConditionalInput = false;
|
|
31626
32359
|
static create = () => createCoalesceNode("coalesceNew", "Coalesce");
|
|
31627
32360
|
static getUIData() {
|
|
31628
32361
|
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.
|
|
32362
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
32363
|
+
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
32364
|
|
|
31632
32365
|
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
32366
|
`,
|
|
@@ -31640,14 +32373,14 @@ var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
|
31640
32373
|
var coalesceNewNode = nodeDefinition(CoalesceNewNodeImpl, "Coalesce");
|
|
31641
32374
|
|
|
31642
32375
|
// src/model/nodes/DidRunNode.ts
|
|
31643
|
-
var
|
|
32376
|
+
var import_non_secure40 = require("nanoid/non-secure");
|
|
31644
32377
|
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
32378
|
var DidRunNodeImpl = class extends NodeImpl {
|
|
31646
32379
|
static create() {
|
|
31647
32380
|
return {
|
|
31648
32381
|
type: "didRun",
|
|
31649
32382
|
title: "Did Run",
|
|
31650
|
-
id: (0,
|
|
32383
|
+
id: (0, import_non_secure40.nanoid)(),
|
|
31651
32384
|
data: {},
|
|
31652
32385
|
visualData: {
|
|
31653
32386
|
x: 0,
|
|
@@ -31715,8 +32448,8 @@ var DidRunNodeImpl = class extends NodeImpl {
|
|
|
31715
32448
|
var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
31716
32449
|
|
|
31717
32450
|
// src/model/nodes/PassthroughNode.ts
|
|
31718
|
-
var
|
|
31719
|
-
var
|
|
32451
|
+
var import_non_secure41 = require("nanoid/non-secure");
|
|
32452
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
31720
32453
|
var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
|
|
31721
32454
|
var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
|
|
31722
32455
|
var MAX_PASSTHROUGH_PORT_INDEX = 1e4;
|
|
@@ -31739,7 +32472,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31739
32472
|
const chartNode = {
|
|
31740
32473
|
type: "passthrough",
|
|
31741
32474
|
title: "Passthrough",
|
|
31742
|
-
id: (0,
|
|
32475
|
+
id: (0, import_non_secure41.nanoid)(),
|
|
31743
32476
|
data: {},
|
|
31744
32477
|
visualData: {
|
|
31745
32478
|
x: 0,
|
|
@@ -31778,7 +32511,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31778
32511
|
}
|
|
31779
32512
|
static getUIData() {
|
|
31780
32513
|
return {
|
|
31781
|
-
infoBoxBody:
|
|
32514
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
31782
32515
|
Simply passes the input value to the output without any modifications.
|
|
31783
32516
|
`,
|
|
31784
32517
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -31800,8 +32533,8 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
31800
32533
|
var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
31801
32534
|
|
|
31802
32535
|
// src/model/nodes/DataBusNode.ts
|
|
31803
|
-
var
|
|
31804
|
-
var
|
|
32536
|
+
var import_non_secure42 = require("nanoid/non-secure");
|
|
32537
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
31805
32538
|
function getConnectedChannelIndices(connections, nodeId) {
|
|
31806
32539
|
const channelIndices = /* @__PURE__ */ new Set();
|
|
31807
32540
|
for (const connection of connections) {
|
|
@@ -31833,7 +32566,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31833
32566
|
static create = () => ({
|
|
31834
32567
|
type: "dataBus",
|
|
31835
32568
|
title: "Data Bus",
|
|
31836
|
-
id: (0,
|
|
32569
|
+
id: (0, import_non_secure42.nanoid)(),
|
|
31837
32570
|
data: {},
|
|
31838
32571
|
visualData: {
|
|
31839
32572
|
x: 0,
|
|
@@ -31861,7 +32594,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31861
32594
|
}
|
|
31862
32595
|
static getUIData() {
|
|
31863
32596
|
return {
|
|
31864
|
-
infoBoxBody:
|
|
32597
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
31865
32598
|
Organizes independent connections in a compact rail at the top of the
|
|
31866
32599
|
canvas. Data Bus channels are wiring topology, not executable nodes.
|
|
31867
32600
|
`,
|
|
@@ -31877,13 +32610,13 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
31877
32610
|
var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
|
|
31878
32611
|
|
|
31879
32612
|
// src/model/nodes/StartBackgroundBranchNode.ts
|
|
31880
|
-
var
|
|
31881
|
-
var
|
|
32613
|
+
var import_non_secure43 = require("nanoid/non-secure");
|
|
32614
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
31882
32615
|
var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
31883
32616
|
static create = () => ({
|
|
31884
32617
|
type: "startBackgroundBranch",
|
|
31885
32618
|
title: "Start Async Branch",
|
|
31886
|
-
id: (0,
|
|
32619
|
+
id: (0, import_non_secure43.nanoid)(),
|
|
31887
32620
|
data: {},
|
|
31888
32621
|
visualData: {
|
|
31889
32622
|
x: 0,
|
|
@@ -31909,7 +32642,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31909
32642
|
}
|
|
31910
32643
|
static getUIData() {
|
|
31911
32644
|
return {
|
|
31912
|
-
infoBoxBody:
|
|
32645
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
31913
32646
|
Starts its downstream branch asynchronously. The foreground graph continues immediately, while the root run waits for the async branch before it ends.
|
|
31914
32647
|
`,
|
|
31915
32648
|
infoBoxTitle: "Start Async Branch Node",
|
|
@@ -31934,8 +32667,8 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
31934
32667
|
var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "Start Async Branch");
|
|
31935
32668
|
|
|
31936
32669
|
// src/model/nodes/WatchStreamingOutputNode.ts
|
|
31937
|
-
var
|
|
31938
|
-
var
|
|
32670
|
+
var import_non_secure44 = require("nanoid/non-secure");
|
|
32671
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
31939
32672
|
var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
31940
32673
|
static create() {
|
|
31941
32674
|
return {
|
|
@@ -31947,7 +32680,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31947
32680
|
maxQueuedUpdates: streamingOutputWatchDefaults.maxQueuedUpdates,
|
|
31948
32681
|
queueOverflowBehavior: streamingOutputWatchDefaults.queueOverflowBehavior
|
|
31949
32682
|
},
|
|
31950
|
-
id: (0,
|
|
32683
|
+
id: (0, import_non_secure44.nanoid)(),
|
|
31951
32684
|
title: "Watch Streaming Output",
|
|
31952
32685
|
type: "watchStreamingOutput",
|
|
31953
32686
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -31974,7 +32707,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
31974
32707
|
contextMenuTitle: "Watch Streaming Output",
|
|
31975
32708
|
group: ["Logic"],
|
|
31976
32709
|
infoBoxTitle: "Watch Streaming Output Node",
|
|
31977
|
-
infoBoxBody:
|
|
32710
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
31978
32711
|
Runs its downstream branch for streaming output snapshots. Without Stop Watching
|
|
31979
32712
|
Streaming Output, every snapshot runs the branch and the watch finishes with its
|
|
31980
32713
|
producer. Add one Stop node only when a chosen value must continue through the
|
|
@@ -32057,13 +32790,13 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
32057
32790
|
var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Watch Streaming Output");
|
|
32058
32791
|
|
|
32059
32792
|
// src/model/nodes/StopWatchingStreamingOutputNode.ts
|
|
32060
|
-
var
|
|
32061
|
-
var
|
|
32793
|
+
var import_non_secure45 = require("nanoid/non-secure");
|
|
32794
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
32062
32795
|
var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
32063
32796
|
static create() {
|
|
32064
32797
|
return {
|
|
32065
32798
|
data: {},
|
|
32066
|
-
id: (0,
|
|
32799
|
+
id: (0, import_non_secure45.nanoid)(),
|
|
32067
32800
|
title: "Stop Watching Streaming Output",
|
|
32068
32801
|
type: "stopWatchingStreamingOutput",
|
|
32069
32802
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -32080,7 +32813,7 @@ var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
32080
32813
|
contextMenuTitle: "Stop Watching Streaming Output",
|
|
32081
32814
|
group: ["Logic"],
|
|
32082
32815
|
infoBoxTitle: "Stop Watching Streaming Output Node",
|
|
32083
|
-
infoBoxBody:
|
|
32816
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
32084
32817
|
Accepts a value from a Watch Streaming Output branch, stops future streaming
|
|
32085
32818
|
snapshots, and lets its completed output continue through the ordinary graph.
|
|
32086
32819
|
In parallel mode, the first completed branch to reach this node wins.
|
|
@@ -32110,14 +32843,14 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
|
|
|
32110
32843
|
);
|
|
32111
32844
|
|
|
32112
32845
|
// src/model/nodes/PopNode.ts
|
|
32113
|
-
var
|
|
32114
|
-
var
|
|
32846
|
+
var import_non_secure46 = require("nanoid/non-secure");
|
|
32847
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
32115
32848
|
var PopNodeImpl = class extends NodeImpl {
|
|
32116
32849
|
static create() {
|
|
32117
32850
|
const baseNode = {
|
|
32118
32851
|
type: "pop",
|
|
32119
32852
|
title: "Pop",
|
|
32120
|
-
id: (0,
|
|
32853
|
+
id: (0, import_non_secure46.nanoid)(),
|
|
32121
32854
|
visualData: {
|
|
32122
32855
|
x: 0,
|
|
32123
32856
|
y: 0,
|
|
@@ -32162,7 +32895,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
32162
32895
|
}
|
|
32163
32896
|
static getUIData() {
|
|
32164
32897
|
return {
|
|
32165
|
-
infoBoxBody:
|
|
32898
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
32166
32899
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
32167
32900
|
|
|
32168
32901
|
Can also be used to just extract the last value from an array.
|
|
@@ -32198,14 +32931,14 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
32198
32931
|
var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
32199
32932
|
|
|
32200
32933
|
// src/model/nodes/SetGlobalNode.ts
|
|
32201
|
-
var
|
|
32202
|
-
var
|
|
32934
|
+
var import_non_secure47 = require("nanoid/non-secure");
|
|
32935
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
32203
32936
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
32204
32937
|
static create() {
|
|
32205
32938
|
const chartNode = {
|
|
32206
32939
|
type: "setGlobal",
|
|
32207
32940
|
title: "Set Global",
|
|
32208
|
-
id: (0,
|
|
32941
|
+
id: (0, import_non_secure47.nanoid)(),
|
|
32209
32942
|
visualData: {
|
|
32210
32943
|
x: 0,
|
|
32211
32944
|
y: 0,
|
|
@@ -32273,14 +33006,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32273
33006
|
];
|
|
32274
33007
|
}
|
|
32275
33008
|
getBody() {
|
|
32276
|
-
return
|
|
33009
|
+
return import_ts_dedent40.dedent`
|
|
32277
33010
|
${this.data.id}
|
|
32278
33011
|
Type: ${this.data.dataType}
|
|
32279
33012
|
`;
|
|
32280
33013
|
}
|
|
32281
33014
|
static getUIData() {
|
|
32282
33015
|
return {
|
|
32283
|
-
infoBoxBody:
|
|
33016
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
32284
33017
|
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
33018
|
`,
|
|
32286
33019
|
infoBoxTitle: "Set Global Node",
|
|
@@ -32316,14 +33049,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32316
33049
|
var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
32317
33050
|
|
|
32318
33051
|
// src/model/nodes/GetGlobalNode.ts
|
|
32319
|
-
var
|
|
32320
|
-
var
|
|
33052
|
+
var import_non_secure48 = require("nanoid/non-secure");
|
|
33053
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
32321
33054
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
32322
33055
|
static create() {
|
|
32323
33056
|
const chartNode = {
|
|
32324
33057
|
type: "getGlobal",
|
|
32325
33058
|
title: "Get Global",
|
|
32326
|
-
id: (0,
|
|
33059
|
+
id: (0, import_non_secure48.nanoid)(),
|
|
32327
33060
|
visualData: {
|
|
32328
33061
|
x: 0,
|
|
32329
33062
|
y: 0,
|
|
@@ -32397,7 +33130,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32397
33130
|
];
|
|
32398
33131
|
}
|
|
32399
33132
|
getBody() {
|
|
32400
|
-
return
|
|
33133
|
+
return import_ts_dedent41.dedent`
|
|
32401
33134
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
32402
33135
|
Type: ${this.data.dataType}
|
|
32403
33136
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -32405,7 +33138,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32405
33138
|
}
|
|
32406
33139
|
static getUIData() {
|
|
32407
33140
|
return {
|
|
32408
|
-
infoBoxBody:
|
|
33141
|
+
infoBoxBody: import_ts_dedent41.dedent`
|
|
32409
33142
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
32410
33143
|
`,
|
|
32411
33144
|
infoBoxTitle: "Get Global Node",
|
|
@@ -32450,8 +33183,8 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
32450
33183
|
var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
32451
33184
|
|
|
32452
33185
|
// src/model/nodes/SetStoredValueNode.ts
|
|
32453
|
-
var
|
|
32454
|
-
var
|
|
33186
|
+
var import_non_secure49 = require("nanoid/non-secure");
|
|
33187
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
32455
33188
|
|
|
32456
33189
|
// src/model/nodes/StoredValueNodeUtils.ts
|
|
32457
33190
|
var portableStoredValueScalarTypes = [
|
|
@@ -32515,7 +33248,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32515
33248
|
return {
|
|
32516
33249
|
type: "setStoredValue",
|
|
32517
33250
|
title: "Set Stored Value",
|
|
32518
|
-
id: (0,
|
|
33251
|
+
id: (0, import_non_secure49.nanoid)(),
|
|
32519
33252
|
visualData: { x: 0, y: 0, width: 220 },
|
|
32520
33253
|
data: { dataType: "string", key: "key", useKeyInput: false }
|
|
32521
33254
|
};
|
|
@@ -32554,7 +33287,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32554
33287
|
];
|
|
32555
33288
|
}
|
|
32556
33289
|
getBody() {
|
|
32557
|
-
return
|
|
33290
|
+
return import_ts_dedent42.dedent`
|
|
32558
33291
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32559
33292
|
Type: ${this.data.dataType}
|
|
32560
33293
|
`;
|
|
@@ -32585,14 +33318,14 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32585
33318
|
var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Value");
|
|
32586
33319
|
|
|
32587
33320
|
// src/model/nodes/GetStoredValueNode.ts
|
|
32588
|
-
var
|
|
32589
|
-
var
|
|
33321
|
+
var import_non_secure50 = require("nanoid/non-secure");
|
|
33322
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
32590
33323
|
var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
32591
33324
|
static create() {
|
|
32592
33325
|
return {
|
|
32593
33326
|
type: "getStoredValue",
|
|
32594
33327
|
title: "Get Stored Value",
|
|
32595
|
-
id: (0,
|
|
33328
|
+
id: (0, import_non_secure50.nanoid)(),
|
|
32596
33329
|
visualData: { x: 0, y: 0, width: 220 },
|
|
32597
33330
|
data: { dataType: "string", key: "key", onDemand: false, useKeyInput: false, wait: false }
|
|
32598
33331
|
};
|
|
@@ -32647,7 +33380,7 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32647
33380
|
];
|
|
32648
33381
|
}
|
|
32649
33382
|
getBody() {
|
|
32650
|
-
return
|
|
33383
|
+
return import_ts_dedent43.dedent`
|
|
32651
33384
|
${this.data.useKeyInput ? "(Key from input)" : this.data.key}
|
|
32652
33385
|
Type: ${this.data.dataType}
|
|
32653
33386
|
${this.data.wait ? "Waits for an in-run Set" : ""}
|
|
@@ -32685,12 +33418,12 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
32685
33418
|
var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Value");
|
|
32686
33419
|
|
|
32687
33420
|
// src/model/nodes/WaitForEventNode.ts
|
|
32688
|
-
var
|
|
32689
|
-
var
|
|
33421
|
+
var import_non_secure51 = require("nanoid/non-secure");
|
|
33422
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
32690
33423
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
32691
33424
|
static create() {
|
|
32692
33425
|
return {
|
|
32693
|
-
id: (0,
|
|
33426
|
+
id: (0, import_non_secure51.nanoid)(),
|
|
32694
33427
|
type: "waitForEvent",
|
|
32695
33428
|
title: "Wait For Event",
|
|
32696
33429
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -32745,7 +33478,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32745
33478
|
}
|
|
32746
33479
|
static getUIData() {
|
|
32747
33480
|
return {
|
|
32748
|
-
infoBoxBody:
|
|
33481
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
32749
33482
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
32750
33483
|
`,
|
|
32751
33484
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -32765,8 +33498,8 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
32765
33498
|
var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
32766
33499
|
|
|
32767
33500
|
// src/model/nodes/ToolNode.ts
|
|
32768
|
-
var
|
|
32769
|
-
var
|
|
33501
|
+
var import_non_secure52 = require("nanoid/non-secure");
|
|
33502
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
32770
33503
|
var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
|
|
32771
33504
|
function getToolNodeBodyPreview(data) {
|
|
32772
33505
|
const [name = "", ...descriptionLines] = buildNodeBodyPreview(
|
|
@@ -32784,7 +33517,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32784
33517
|
const chartNode = {
|
|
32785
33518
|
type: "gptFunction",
|
|
32786
33519
|
title: "Tool",
|
|
32787
|
-
id: (0,
|
|
33520
|
+
id: (0, import_non_secure52.nanoid)(),
|
|
32788
33521
|
visualData: {
|
|
32789
33522
|
x: 0,
|
|
32790
33523
|
y: 0,
|
|
@@ -32794,7 +33527,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32794
33527
|
name: "newTool",
|
|
32795
33528
|
description: "No description provided",
|
|
32796
33529
|
resultHandling: "continue",
|
|
32797
|
-
schema:
|
|
33530
|
+
schema: import_ts_dedent45.dedent`
|
|
32798
33531
|
{
|
|
32799
33532
|
"type": "object",
|
|
32800
33533
|
"properties": {}
|
|
@@ -32921,7 +33654,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32921
33654
|
}
|
|
32922
33655
|
static getUIData() {
|
|
32923
33656
|
return {
|
|
32924
|
-
infoBoxBody:
|
|
33657
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
32925
33658
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
32926
33659
|
`,
|
|
32927
33660
|
infoBoxTitle: "Tool Node",
|
|
@@ -32974,15 +33707,15 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
32974
33707
|
var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
32975
33708
|
|
|
32976
33709
|
// src/model/nodes/ToYamlNode.ts
|
|
32977
|
-
var
|
|
33710
|
+
var import_non_secure53 = require("nanoid/non-secure");
|
|
32978
33711
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
32979
|
-
var
|
|
33712
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
32980
33713
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
32981
33714
|
static create() {
|
|
32982
33715
|
const chartNode = {
|
|
32983
33716
|
type: "toYaml",
|
|
32984
33717
|
title: "To YAML",
|
|
32985
|
-
id: (0,
|
|
33718
|
+
id: (0, import_non_secure53.nanoid)(),
|
|
32986
33719
|
visualData: {
|
|
32987
33720
|
x: 0,
|
|
32988
33721
|
y: 0,
|
|
@@ -33013,7 +33746,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
33013
33746
|
}
|
|
33014
33747
|
static getUIData() {
|
|
33015
33748
|
return {
|
|
33016
|
-
infoBoxBody:
|
|
33749
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
33017
33750
|
Turns the input object into YAML text.
|
|
33018
33751
|
`,
|
|
33019
33752
|
infoBoxTitle: "To YAML Node",
|
|
@@ -33038,8 +33771,8 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
33038
33771
|
var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
33039
33772
|
|
|
33040
33773
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
33041
|
-
var
|
|
33042
|
-
var
|
|
33774
|
+
var import_non_secure54 = require("nanoid/non-secure");
|
|
33775
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
33043
33776
|
|
|
33044
33777
|
// src/integrations/integrations.ts
|
|
33045
33778
|
var registeredIntegrations = {
|
|
@@ -33062,7 +33795,7 @@ function getIntegration(type, integrationKey, context) {
|
|
|
33062
33795
|
var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
33063
33796
|
static create() {
|
|
33064
33797
|
return {
|
|
33065
|
-
id: (0,
|
|
33798
|
+
id: (0, import_non_secure54.nanoid)(),
|
|
33066
33799
|
type: "getEmbedding",
|
|
33067
33800
|
title: "Get Embedding",
|
|
33068
33801
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33146,7 +33879,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
33146
33879
|
}
|
|
33147
33880
|
static getUIData() {
|
|
33148
33881
|
return {
|
|
33149
|
-
infoBoxBody:
|
|
33882
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
33150
33883
|
Gets a OpenAI vector embedding for the input text provided.
|
|
33151
33884
|
|
|
33152
33885
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -33177,12 +33910,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
33177
33910
|
var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
33178
33911
|
|
|
33179
33912
|
// src/model/nodes/VectorStoreNode.ts
|
|
33180
|
-
var
|
|
33181
|
-
var
|
|
33913
|
+
var import_non_secure55 = require("nanoid/non-secure");
|
|
33914
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
33182
33915
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
33183
33916
|
static create() {
|
|
33184
33917
|
return {
|
|
33185
|
-
id: (0,
|
|
33918
|
+
id: (0, import_non_secure55.nanoid)(),
|
|
33186
33919
|
type: "vectorStore",
|
|
33187
33920
|
title: "Vector Store",
|
|
33188
33921
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -33258,14 +33991,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33258
33991
|
];
|
|
33259
33992
|
}
|
|
33260
33993
|
getBody() {
|
|
33261
|
-
return
|
|
33994
|
+
return import_ts_dedent48.dedent`
|
|
33262
33995
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33263
33996
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
33264
33997
|
`;
|
|
33265
33998
|
}
|
|
33266
33999
|
static getUIData() {
|
|
33267
34000
|
return {
|
|
33268
|
-
infoBoxBody:
|
|
34001
|
+
infoBoxBody: import_ts_dedent48.dedent`
|
|
33269
34002
|
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
34003
|
`,
|
|
33271
34004
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -33300,12 +34033,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
33300
34033
|
var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
33301
34034
|
|
|
33302
34035
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
33303
|
-
var
|
|
33304
|
-
var
|
|
34036
|
+
var import_non_secure56 = require("nanoid/non-secure");
|
|
34037
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
33305
34038
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
33306
34039
|
static create() {
|
|
33307
34040
|
return {
|
|
33308
|
-
id: (0,
|
|
34041
|
+
id: (0, import_non_secure56.nanoid)(),
|
|
33309
34042
|
type: "vectorNearestNeighbors",
|
|
33310
34043
|
title: "Vector KNN",
|
|
33311
34044
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -33388,7 +34121,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33388
34121
|
];
|
|
33389
34122
|
}
|
|
33390
34123
|
getBody() {
|
|
33391
|
-
return
|
|
34124
|
+
return import_ts_dedent49.dedent`
|
|
33392
34125
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
33393
34126
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
33394
34127
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -33396,7 +34129,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33396
34129
|
}
|
|
33397
34130
|
static getUIData() {
|
|
33398
34131
|
return {
|
|
33399
|
-
infoBoxBody:
|
|
34132
|
+
infoBoxBody: import_ts_dedent49.dedent`
|
|
33400
34133
|
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
34134
|
`,
|
|
33402
34135
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -33426,12 +34159,12 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
33426
34159
|
var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
|
|
33427
34160
|
|
|
33428
34161
|
// src/model/nodes/KnowledgeSourceNode.ts
|
|
33429
|
-
var
|
|
33430
|
-
var
|
|
34162
|
+
var import_non_secure57 = require("nanoid/non-secure");
|
|
34163
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
33431
34164
|
var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33432
34165
|
static create() {
|
|
33433
34166
|
return {
|
|
33434
|
-
id: (0,
|
|
34167
|
+
id: (0, import_non_secure57.nanoid)(),
|
|
33435
34168
|
type: "knowledgeSource",
|
|
33436
34169
|
title: "Knowledge Source",
|
|
33437
34170
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33490,7 +34223,7 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33490
34223
|
getBody(context) {
|
|
33491
34224
|
var _a;
|
|
33492
34225
|
const connection = (_a = context.project.metadata.knowledgeStores) == null ? void 0 : _a[this.data.connectionId];
|
|
33493
|
-
return
|
|
34226
|
+
return import_ts_dedent50.dedent`
|
|
33494
34227
|
Store: ${this.data.useConnectionIdInput ? "(from input)" : ((connection == null ? void 0 : connection.displayName) ?? this.data.connectionId) || "(not selected)"}
|
|
33495
34228
|
Source: ${this.data.useSourceIdInput ? "(from input)" : this.data.sourceId || "(not set)"}
|
|
33496
34229
|
${this.data.useVersionInput || this.data.version ? "Exact version configured" : "Uses active version"}
|
|
@@ -33523,12 +34256,12 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33523
34256
|
var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Source");
|
|
33524
34257
|
|
|
33525
34258
|
// src/model/nodes/KnowledgeDocumentNode.ts
|
|
33526
|
-
var
|
|
33527
|
-
var
|
|
34259
|
+
var import_non_secure58 = require("nanoid/non-secure");
|
|
34260
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
33528
34261
|
var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
33529
34262
|
static create() {
|
|
33530
34263
|
return {
|
|
33531
|
-
id: (0,
|
|
34264
|
+
id: (0, import_non_secure58.nanoid)(),
|
|
33532
34265
|
type: "knowledgeDocument",
|
|
33533
34266
|
title: "Knowledge Document",
|
|
33534
34267
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -33579,7 +34312,7 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33579
34312
|
];
|
|
33580
34313
|
}
|
|
33581
34314
|
getBody() {
|
|
33582
|
-
return
|
|
34315
|
+
return import_ts_dedent51.dedent`
|
|
33583
34316
|
${this.data.useTextInput ? "Text from input" : `${this.data.text.length} characters`}
|
|
33584
34317
|
${this.data.useDocumentIdInput ? "ID from input" : this.data.documentId ? `ID: ${this.data.documentId}` : "ID generated from content"}
|
|
33585
34318
|
`;
|
|
@@ -33605,12 +34338,12 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
33605
34338
|
var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge Document");
|
|
33606
34339
|
|
|
33607
34340
|
// src/model/nodes/SyncKnowledgeSourceNode.ts
|
|
33608
|
-
var
|
|
33609
|
-
var
|
|
34341
|
+
var import_non_secure59 = require("nanoid/non-secure");
|
|
34342
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
33610
34343
|
var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
33611
34344
|
static create() {
|
|
33612
34345
|
return {
|
|
33613
|
-
id: (0,
|
|
34346
|
+
id: (0, import_non_secure59.nanoid)(),
|
|
33614
34347
|
type: "syncKnowledgeSource",
|
|
33615
34348
|
title: "Sync Knowledge Source",
|
|
33616
34349
|
visualData: { x: 0, y: 0, width: 290 },
|
|
@@ -33684,7 +34417,7 @@ var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
33684
34417
|
];
|
|
33685
34418
|
}
|
|
33686
34419
|
getBody() {
|
|
33687
|
-
return
|
|
34420
|
+
return import_ts_dedent52.dedent`
|
|
33688
34421
|
${this.data.targetSize} ${this.data.chunkUnit}
|
|
33689
34422
|
${this.data.overlap} overlap
|
|
33690
34423
|
${this.data.includeTitle ? "Includes titles" : "Content only"}
|
|
@@ -33750,11 +34483,11 @@ function normalizeDocumentsInput(value) {
|
|
|
33750
34483
|
var syncKnowledgeSourceNode = nodeDefinition(SyncKnowledgeSourceNodeImpl, "Sync Knowledge Source");
|
|
33751
34484
|
|
|
33752
34485
|
// src/model/nodes/GetKnowledgeSourceStatusNode.ts
|
|
33753
|
-
var
|
|
34486
|
+
var import_non_secure60 = require("nanoid/non-secure");
|
|
33754
34487
|
var GetKnowledgeSourceStatusNodeImpl = class extends NodeImpl {
|
|
33755
34488
|
static create() {
|
|
33756
34489
|
return {
|
|
33757
|
-
id: (0,
|
|
34490
|
+
id: (0, import_non_secure60.nanoid)(),
|
|
33758
34491
|
type: "getKnowledgeSourceStatus",
|
|
33759
34492
|
title: "Get Knowledge Source Status",
|
|
33760
34493
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -33833,12 +34566,12 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
|
|
|
33833
34566
|
);
|
|
33834
34567
|
|
|
33835
34568
|
// src/model/nodes/SearchKnowledgeNode.ts
|
|
33836
|
-
var
|
|
33837
|
-
var
|
|
34569
|
+
var import_non_secure61 = require("nanoid/non-secure");
|
|
34570
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
33838
34571
|
var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
33839
34572
|
static create() {
|
|
33840
34573
|
return {
|
|
33841
|
-
id: (0,
|
|
34574
|
+
id: (0, import_non_secure61.nanoid)(),
|
|
33842
34575
|
type: "searchKnowledge",
|
|
33843
34576
|
title: "Search Knowledge",
|
|
33844
34577
|
visualData: { x: 0, y: 0, width: 270 },
|
|
@@ -33903,7 +34636,7 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33903
34636
|
];
|
|
33904
34637
|
}
|
|
33905
34638
|
getBody() {
|
|
33906
|
-
return
|
|
34639
|
+
return import_ts_dedent53.dedent`
|
|
33907
34640
|
${this.data.topK} per query -> ${this.data.finalResultCount} final
|
|
33908
34641
|
Reranking: ${this.data.rerankMode}
|
|
33909
34642
|
`;
|
|
@@ -33960,12 +34693,12 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
33960
34693
|
var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowledge");
|
|
33961
34694
|
|
|
33962
34695
|
// src/model/nodes/BuildKnowledgeContextNode.ts
|
|
33963
|
-
var
|
|
33964
|
-
var
|
|
34696
|
+
var import_non_secure62 = require("nanoid/non-secure");
|
|
34697
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
33965
34698
|
var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
33966
34699
|
static create() {
|
|
33967
34700
|
return {
|
|
33968
|
-
id: (0,
|
|
34701
|
+
id: (0, import_non_secure62.nanoid)(),
|
|
33969
34702
|
type: "buildKnowledgeContext",
|
|
33970
34703
|
title: "Build Knowledge Context",
|
|
33971
34704
|
visualData: { x: 0, y: 0, width: 280 },
|
|
@@ -34019,7 +34752,7 @@ var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
|
34019
34752
|
];
|
|
34020
34753
|
}
|
|
34021
34754
|
getBody() {
|
|
34022
|
-
return
|
|
34755
|
+
return import_ts_dedent54.dedent`
|
|
34023
34756
|
${this.data.budget} ${this.data.budgetUnit}
|
|
34024
34757
|
Up to ${this.data.maxItems} items
|
|
34025
34758
|
Citations: [${this.data.citationPrefix || "K"}1]
|
|
@@ -34101,17 +34834,17 @@ function buildMetadataLine(evidence, fields) {
|
|
|
34101
34834
|
var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "Build Knowledge Context");
|
|
34102
34835
|
|
|
34103
34836
|
// src/model/nodes/HashNode.ts
|
|
34104
|
-
var
|
|
34837
|
+
var import_non_secure63 = require("nanoid/non-secure");
|
|
34105
34838
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
34106
34839
|
var import_ts_pattern3 = require("ts-pattern");
|
|
34107
|
-
var
|
|
34840
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
34108
34841
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
34109
34842
|
var HashNodeImpl = class extends NodeImpl {
|
|
34110
34843
|
static create() {
|
|
34111
34844
|
const chartNode = {
|
|
34112
34845
|
type: "hash",
|
|
34113
34846
|
title: "Hash",
|
|
34114
|
-
id: (0,
|
|
34847
|
+
id: (0, import_non_secure63.nanoid)(),
|
|
34115
34848
|
visualData: {
|
|
34116
34849
|
x: 0,
|
|
34117
34850
|
y: 0,
|
|
@@ -34162,7 +34895,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
34162
34895
|
}
|
|
34163
34896
|
static getUIData() {
|
|
34164
34897
|
return {
|
|
34165
|
-
infoBoxBody:
|
|
34898
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
34166
34899
|
Computes a hash of the input value using the configured hash function.
|
|
34167
34900
|
`,
|
|
34168
34901
|
infoBoxTitle: "Hash Node",
|
|
@@ -34190,14 +34923,14 @@ var algorithmDisplayName = {
|
|
|
34190
34923
|
var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
34191
34924
|
|
|
34192
34925
|
// src/model/nodes/AbortGraphNode.ts
|
|
34193
|
-
var
|
|
34194
|
-
var
|
|
34926
|
+
var import_non_secure64 = require("nanoid/non-secure");
|
|
34927
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
34195
34928
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
34196
34929
|
static create() {
|
|
34197
34930
|
const chartNode = {
|
|
34198
34931
|
type: "abortGraph",
|
|
34199
34932
|
title: "Abort Graph",
|
|
34200
|
-
id: (0,
|
|
34933
|
+
id: (0, import_non_secure64.nanoid)(),
|
|
34201
34934
|
visualData: {
|
|
34202
34935
|
x: 0,
|
|
34203
34936
|
y: 0,
|
|
@@ -34248,13 +34981,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34248
34981
|
];
|
|
34249
34982
|
}
|
|
34250
34983
|
getBody() {
|
|
34251
|
-
return
|
|
34984
|
+
return import_ts_dedent56.dedent`
|
|
34252
34985
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
34253
34986
|
`;
|
|
34254
34987
|
}
|
|
34255
34988
|
static getUIData() {
|
|
34256
34989
|
return {
|
|
34257
|
-
infoBoxBody:
|
|
34990
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
34258
34991
|
Aborts the execution of the entire graph immediately.
|
|
34259
34992
|
|
|
34260
34993
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -34279,14 +35012,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
34279
35012
|
var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
34280
35013
|
|
|
34281
35014
|
// src/model/nodes/RaceInputsNode.ts
|
|
34282
|
-
var
|
|
34283
|
-
var
|
|
35015
|
+
var import_non_secure65 = require("nanoid/non-secure");
|
|
35016
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
34284
35017
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
34285
35018
|
static create() {
|
|
34286
35019
|
const chartNode = {
|
|
34287
35020
|
type: "raceInputs",
|
|
34288
35021
|
title: "Race Inputs",
|
|
34289
|
-
id: (0,
|
|
35022
|
+
id: (0, import_non_secure65.nanoid)(),
|
|
34290
35023
|
visualData: {
|
|
34291
35024
|
x: 0,
|
|
34292
35025
|
y: 0,
|
|
@@ -34322,7 +35055,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34322
35055
|
}
|
|
34323
35056
|
static getUIData() {
|
|
34324
35057
|
return {
|
|
34325
|
-
infoBoxBody:
|
|
35058
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
34326
35059
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
34327
35060
|
`,
|
|
34328
35061
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -34350,14 +35083,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
34350
35083
|
var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
34351
35084
|
|
|
34352
35085
|
// src/model/nodes/ToJsonNode.ts
|
|
34353
|
-
var
|
|
34354
|
-
var
|
|
35086
|
+
var import_non_secure66 = require("nanoid/non-secure");
|
|
35087
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
34355
35088
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
34356
35089
|
static create() {
|
|
34357
35090
|
const chartNode = {
|
|
34358
35091
|
type: "toJson",
|
|
34359
35092
|
title: "To JSON",
|
|
34360
|
-
id: (0,
|
|
35093
|
+
id: (0, import_non_secure66.nanoid)(),
|
|
34361
35094
|
visualData: {
|
|
34362
35095
|
x: 0,
|
|
34363
35096
|
y: 0,
|
|
@@ -34402,7 +35135,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34402
35135
|
}
|
|
34403
35136
|
static getUIData() {
|
|
34404
35137
|
return {
|
|
34405
|
-
infoBoxBody:
|
|
35138
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
34406
35139
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
34407
35140
|
`,
|
|
34408
35141
|
infoBoxTitle: "To JSON Node",
|
|
@@ -34424,14 +35157,14 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
34424
35157
|
var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
34425
35158
|
|
|
34426
35159
|
// src/model/nodes/JoinNode.ts
|
|
34427
|
-
var
|
|
34428
|
-
var
|
|
35160
|
+
var import_non_secure67 = require("nanoid/non-secure");
|
|
35161
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
34429
35162
|
var JoinNodeImpl = class extends NodeImpl {
|
|
34430
35163
|
static create = () => {
|
|
34431
35164
|
const chartNode = {
|
|
34432
35165
|
type: "join",
|
|
34433
35166
|
title: "Join",
|
|
34434
|
-
id: (0,
|
|
35167
|
+
id: (0, import_non_secure67.nanoid)(),
|
|
34435
35168
|
data: {
|
|
34436
35169
|
flatten: true,
|
|
34437
35170
|
joinString: "\n"
|
|
@@ -34493,7 +35226,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34493
35226
|
}
|
|
34494
35227
|
static getUIData() {
|
|
34495
35228
|
return {
|
|
34496
|
-
infoBoxBody:
|
|
35229
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
34497
35230
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
34498
35231
|
|
|
34499
35232
|
Defaults to a newline.
|
|
@@ -34530,15 +35263,15 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
34530
35263
|
var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
34531
35264
|
|
|
34532
35265
|
// src/model/nodes/FilterNode.ts
|
|
34533
|
-
var
|
|
35266
|
+
var import_non_secure68 = require("nanoid/non-secure");
|
|
34534
35267
|
var import_lodash_es10 = require("lodash");
|
|
34535
|
-
var
|
|
35268
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
34536
35269
|
var FilterNodeImpl = class extends NodeImpl {
|
|
34537
35270
|
static create() {
|
|
34538
35271
|
const chartNode = {
|
|
34539
35272
|
type: "filter",
|
|
34540
35273
|
title: "Filter",
|
|
34541
|
-
id: (0,
|
|
35274
|
+
id: (0, import_non_secure68.nanoid)(),
|
|
34542
35275
|
visualData: {
|
|
34543
35276
|
x: 0,
|
|
34544
35277
|
y: 0,
|
|
@@ -34575,7 +35308,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34575
35308
|
}
|
|
34576
35309
|
static getUIData() {
|
|
34577
35310
|
return {
|
|
34578
|
-
infoBoxBody:
|
|
35311
|
+
infoBoxBody: import_ts_dedent60.dedent`
|
|
34579
35312
|
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
35313
|
`,
|
|
34581
35314
|
infoBoxTitle: "Filter Node",
|
|
@@ -34600,11 +35333,11 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
34600
35333
|
var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
34601
35334
|
|
|
34602
35335
|
// src/model/nodes/JSFilterNode.ts
|
|
34603
|
-
var
|
|
34604
|
-
var
|
|
35336
|
+
var import_non_secure69 = require("nanoid/non-secure");
|
|
35337
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
34605
35338
|
|
|
34606
35339
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
34607
|
-
var
|
|
35340
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
34608
35341
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
34609
35342
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
34610
35343
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -34630,7 +35363,7 @@ function getJSListInterpolationContext(callbackBody) {
|
|
|
34630
35363
|
});
|
|
34631
35364
|
}
|
|
34632
35365
|
function buildJSListRuntimePreamble(interpolationContext) {
|
|
34633
|
-
return
|
|
35366
|
+
return import_ts_dedent61.dedent`
|
|
34634
35367
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
34635
35368
|
${buildJsValueInputClonePreamble({
|
|
34636
35369
|
cacheIdentifier: interpolationContext.cloneCacheIdentifier,
|
|
@@ -34675,7 +35408,7 @@ function sanitizeJSListError(error, callbackBody, nodeName) {
|
|
|
34675
35408
|
function buildJSFilterWrapper(callbackBody) {
|
|
34676
35409
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34677
35410
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34678
|
-
return
|
|
35411
|
+
return import_ts_dedent61.dedent`
|
|
34679
35412
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34680
35413
|
|
|
34681
35414
|
if (!Array.isArray(array)) {
|
|
@@ -34711,7 +35444,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
34711
35444
|
function buildJSMapWrapper(callbackBody) {
|
|
34712
35445
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
34713
35446
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, interpolationContext);
|
|
34714
|
-
return
|
|
35447
|
+
return import_ts_dedent61.dedent`
|
|
34715
35448
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
34716
35449
|
|
|
34717
35450
|
if (!Array.isArray(array)) {
|
|
@@ -34780,7 +35513,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
34780
35513
|
const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
|
|
34781
35514
|
return {
|
|
34782
35515
|
type: "colorized",
|
|
34783
|
-
text:
|
|
35516
|
+
text: import_ts_dedent61.dedent`
|
|
34784
35517
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
34785
35518
|
${indentLines(previewBody, " ")}
|
|
34786
35519
|
}
|
|
@@ -34832,7 +35565,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34832
35565
|
const chartNode = {
|
|
34833
35566
|
type: "jsFilter",
|
|
34834
35567
|
title: "JS Filter",
|
|
34835
|
-
id: (0,
|
|
35568
|
+
id: (0, import_non_secure69.nanoid)(),
|
|
34836
35569
|
visualData: {
|
|
34837
35570
|
x: 0,
|
|
34838
35571
|
y: 0,
|
|
@@ -34864,7 +35597,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34864
35597
|
}
|
|
34865
35598
|
static getUIData() {
|
|
34866
35599
|
return {
|
|
34867
|
-
infoBoxBody:
|
|
35600
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
34868
35601
|
Filters an input array using the body of a JavaScript callback.
|
|
34869
35602
|
|
|
34870
35603
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34892,15 +35625,15 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
34892
35625
|
var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
34893
35626
|
|
|
34894
35627
|
// src/model/nodes/JSMapNode.ts
|
|
34895
|
-
var
|
|
34896
|
-
var
|
|
35628
|
+
var import_non_secure70 = require("nanoid/non-secure");
|
|
35629
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
34897
35630
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
34898
35631
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
34899
35632
|
static create() {
|
|
34900
35633
|
const chartNode = {
|
|
34901
35634
|
type: "jsMap",
|
|
34902
35635
|
title: "JS Map",
|
|
34903
|
-
id: (0,
|
|
35636
|
+
id: (0, import_non_secure70.nanoid)(),
|
|
34904
35637
|
visualData: {
|
|
34905
35638
|
x: 0,
|
|
34906
35639
|
y: 0,
|
|
@@ -34932,7 +35665,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34932
35665
|
}
|
|
34933
35666
|
static getUIData() {
|
|
34934
35667
|
return {
|
|
34935
|
-
infoBoxBody:
|
|
35668
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
34936
35669
|
Maps an input array using the body of a JavaScript callback.
|
|
34937
35670
|
|
|
34938
35671
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -34960,8 +35693,8 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
34960
35693
|
var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
34961
35694
|
|
|
34962
35695
|
// src/model/nodes/ObjectNode.ts
|
|
34963
|
-
var
|
|
34964
|
-
var
|
|
35696
|
+
var import_non_secure71 = require("nanoid/non-secure");
|
|
35697
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
34965
35698
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
34966
35699
|
"key": "{{input}}"
|
|
34967
35700
|
}`;
|
|
@@ -35008,7 +35741,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35008
35741
|
const chartNode = {
|
|
35009
35742
|
type: "object",
|
|
35010
35743
|
title: "Object",
|
|
35011
|
-
id: (0,
|
|
35744
|
+
id: (0, import_non_secure71.nanoid)(),
|
|
35012
35745
|
visualData: {
|
|
35013
35746
|
x: 0,
|
|
35014
35747
|
y: 0,
|
|
@@ -35059,7 +35792,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35059
35792
|
}
|
|
35060
35793
|
static getUIData() {
|
|
35061
35794
|
return {
|
|
35062
|
-
infoBoxBody:
|
|
35795
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
35063
35796
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
35064
35797
|
|
|
35065
35798
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -35140,14 +35873,14 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
35140
35873
|
var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
35141
35874
|
|
|
35142
35875
|
// src/model/nodes/BooleanNode.ts
|
|
35143
|
-
var
|
|
35144
|
-
var
|
|
35876
|
+
var import_non_secure72 = require("nanoid/non-secure");
|
|
35877
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
35145
35878
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
35146
35879
|
static create() {
|
|
35147
35880
|
const chartNode = {
|
|
35148
35881
|
type: "boolean",
|
|
35149
35882
|
title: "Bool",
|
|
35150
|
-
id: (0,
|
|
35883
|
+
id: (0, import_non_secure72.nanoid)(),
|
|
35151
35884
|
visualData: {
|
|
35152
35885
|
x: 0,
|
|
35153
35886
|
y: 0,
|
|
@@ -35185,7 +35918,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
35185
35918
|
}
|
|
35186
35919
|
static getUIData() {
|
|
35187
35920
|
return {
|
|
35188
|
-
infoBoxBody:
|
|
35921
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
35189
35922
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
35190
35923
|
`,
|
|
35191
35924
|
infoBoxTitle: "Bool Node",
|
|
@@ -35206,10 +35939,10 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
35206
35939
|
var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
35207
35940
|
|
|
35208
35941
|
// src/model/nodes/CompareNode.ts
|
|
35209
|
-
var
|
|
35942
|
+
var import_non_secure73 = require("nanoid/non-secure");
|
|
35210
35943
|
var import_lodash_es11 = require("lodash");
|
|
35211
35944
|
var import_ts_pattern4 = require("ts-pattern");
|
|
35212
|
-
var
|
|
35945
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
35213
35946
|
var compareNodeComparisonFunctionOptions = [
|
|
35214
35947
|
{ label: "==", value: "==" },
|
|
35215
35948
|
{ label: "!=", value: "!=" },
|
|
@@ -35229,7 +35962,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35229
35962
|
const chartNode = {
|
|
35230
35963
|
type: "compare",
|
|
35231
35964
|
title: "Compare",
|
|
35232
|
-
id: (0,
|
|
35965
|
+
id: (0, import_non_secure73.nanoid)(),
|
|
35233
35966
|
visualData: {
|
|
35234
35967
|
x: 0,
|
|
35235
35968
|
y: 0,
|
|
@@ -35288,7 +36021,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35288
36021
|
}
|
|
35289
36022
|
static getUIData() {
|
|
35290
36023
|
return {
|
|
35291
|
-
infoBoxBody:
|
|
36024
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
35292
36025
|
Compares two values using the configured operator and outputs the result.
|
|
35293
36026
|
|
|
35294
36027
|
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 +36062,9 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
35329
36062
|
var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
35330
36063
|
|
|
35331
36064
|
// src/model/nodes/EvaluateNode.ts
|
|
35332
|
-
var
|
|
36065
|
+
var import_non_secure74 = require("nanoid/non-secure");
|
|
35333
36066
|
var import_ts_pattern5 = require("ts-pattern");
|
|
35334
|
-
var
|
|
36067
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
35335
36068
|
var unaryOperation = ["abs", "negate"];
|
|
35336
36069
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
35337
36070
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -35339,7 +36072,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35339
36072
|
const chartNode = {
|
|
35340
36073
|
type: "evaluate",
|
|
35341
36074
|
title: "Evaluate",
|
|
35342
|
-
id: (0,
|
|
36075
|
+
id: (0, import_non_secure74.nanoid)(),
|
|
35343
36076
|
visualData: {
|
|
35344
36077
|
x: 0,
|
|
35345
36078
|
y: 0,
|
|
@@ -35417,7 +36150,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35417
36150
|
}
|
|
35418
36151
|
static getUIData() {
|
|
35419
36152
|
return {
|
|
35420
|
-
infoBoxBody:
|
|
36153
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
35421
36154
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
35422
36155
|
|
|
35423
36156
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -35453,14 +36186,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
35453
36186
|
var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
35454
36187
|
|
|
35455
36188
|
// src/model/nodes/NumberNode.ts
|
|
35456
|
-
var
|
|
35457
|
-
var
|
|
36189
|
+
var import_non_secure75 = require("nanoid/non-secure");
|
|
36190
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
35458
36191
|
var NumberNodeImpl = class extends NodeImpl {
|
|
35459
36192
|
static create() {
|
|
35460
36193
|
const chartNode = {
|
|
35461
36194
|
type: "number",
|
|
35462
36195
|
title: "Number",
|
|
35463
|
-
id: (0,
|
|
36196
|
+
id: (0, import_non_secure75.nanoid)(),
|
|
35464
36197
|
visualData: {
|
|
35465
36198
|
x: 0,
|
|
35466
36199
|
y: 0,
|
|
@@ -35504,7 +36237,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35504
36237
|
}
|
|
35505
36238
|
static getUIData() {
|
|
35506
36239
|
return {
|
|
35507
|
-
infoBoxBody:
|
|
36240
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
35508
36241
|
Outputs a number constant, or converts an input value into a number.
|
|
35509
36242
|
|
|
35510
36243
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -35531,8 +36264,8 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
35531
36264
|
var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
35532
36265
|
|
|
35533
36266
|
// src/model/nodes/RandomNumberNode.ts
|
|
35534
|
-
var
|
|
35535
|
-
var
|
|
36267
|
+
var import_non_secure76 = require("nanoid/non-secure");
|
|
36268
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
35536
36269
|
var randomNumberTypeOptions = [
|
|
35537
36270
|
{ value: false, label: "Float" },
|
|
35538
36271
|
{ value: true, label: "Integer" }
|
|
@@ -35542,7 +36275,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35542
36275
|
const chartNode = {
|
|
35543
36276
|
type: "randomNumber",
|
|
35544
36277
|
title: "Random number",
|
|
35545
|
-
id: (0,
|
|
36278
|
+
id: (0, import_non_secure76.nanoid)(),
|
|
35546
36279
|
visualData: {
|
|
35547
36280
|
x: 0,
|
|
35548
36281
|
y: 0,
|
|
@@ -35600,7 +36333,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35600
36333
|
];
|
|
35601
36334
|
}
|
|
35602
36335
|
getBody() {
|
|
35603
|
-
return
|
|
36336
|
+
return import_ts_dedent69.dedent`
|
|
35604
36337
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
35605
36338
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
35606
36339
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -35609,7 +36342,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35609
36342
|
}
|
|
35610
36343
|
static getUIData() {
|
|
35611
36344
|
return {
|
|
35612
|
-
infoBoxBody:
|
|
36345
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
35613
36346
|
Outputs a random number between the configured min and max values.
|
|
35614
36347
|
|
|
35615
36348
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -35640,15 +36373,15 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
35640
36373
|
var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
35641
36374
|
|
|
35642
36375
|
// src/model/nodes/ShuffleNode.ts
|
|
35643
|
-
var
|
|
36376
|
+
var import_non_secure77 = require("nanoid/non-secure");
|
|
35644
36377
|
var import_lodash_es12 = require("lodash");
|
|
35645
|
-
var
|
|
36378
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
35646
36379
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
35647
36380
|
static create() {
|
|
35648
36381
|
const chartNode = {
|
|
35649
36382
|
type: "shuffle",
|
|
35650
36383
|
title: "Shuffle",
|
|
35651
|
-
id: (0,
|
|
36384
|
+
id: (0, import_non_secure77.nanoid)(),
|
|
35652
36385
|
visualData: {
|
|
35653
36386
|
x: 0,
|
|
35654
36387
|
y: 0,
|
|
@@ -35678,7 +36411,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35678
36411
|
}
|
|
35679
36412
|
static getUIData() {
|
|
35680
36413
|
return {
|
|
35681
|
-
infoBoxBody:
|
|
36414
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
35682
36415
|
Shuffles the input array. Outputs the shuffled array.
|
|
35683
36416
|
`,
|
|
35684
36417
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -35702,14 +36435,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
35702
36435
|
var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
35703
36436
|
|
|
35704
36437
|
// src/model/nodes/CommentNode.ts
|
|
35705
|
-
var
|
|
35706
|
-
var
|
|
36438
|
+
var import_non_secure78 = require("nanoid/non-secure");
|
|
36439
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
35707
36440
|
var CommentNodeImpl = class extends NodeImpl {
|
|
35708
36441
|
static create() {
|
|
35709
36442
|
const chartNode = {
|
|
35710
36443
|
type: "comment",
|
|
35711
36444
|
title: "Comment",
|
|
35712
|
-
id: (0,
|
|
36445
|
+
id: (0, import_non_secure78.nanoid)(),
|
|
35713
36446
|
visualData: {
|
|
35714
36447
|
x: 0,
|
|
35715
36448
|
y: 0,
|
|
@@ -35755,7 +36488,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35755
36488
|
}
|
|
35756
36489
|
static getUIData() {
|
|
35757
36490
|
return {
|
|
35758
|
-
infoBoxBody:
|
|
36491
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
35759
36492
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
35760
36493
|
`,
|
|
35761
36494
|
infoBoxTitle: "Comment Node",
|
|
@@ -35770,11 +36503,11 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
35770
36503
|
var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
|
|
35771
36504
|
|
|
35772
36505
|
// src/model/nodes/ImageNode.ts
|
|
35773
|
-
var
|
|
36506
|
+
var import_non_secure79 = require("nanoid/non-secure");
|
|
35774
36507
|
var ImageNodeImpl = class extends NodeImpl {
|
|
35775
36508
|
static create() {
|
|
35776
36509
|
return {
|
|
35777
|
-
id: (0,
|
|
36510
|
+
id: (0, import_non_secure79.nanoid)(),
|
|
35778
36511
|
type: "image",
|
|
35779
36512
|
title: "Image",
|
|
35780
36513
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -35871,11 +36604,11 @@ var ImageNodeImpl = class extends NodeImpl {
|
|
|
35871
36604
|
var imageNode = nodeDefinition(ImageNodeImpl, "Image");
|
|
35872
36605
|
|
|
35873
36606
|
// src/model/nodes/AudioNode.ts
|
|
35874
|
-
var
|
|
36607
|
+
var import_non_secure80 = require("nanoid/non-secure");
|
|
35875
36608
|
var AudioNodeImpl = class extends NodeImpl {
|
|
35876
36609
|
static create() {
|
|
35877
36610
|
return {
|
|
35878
|
-
id: (0,
|
|
36611
|
+
id: (0, import_non_secure80.nanoid)(),
|
|
35879
36612
|
type: "audio",
|
|
35880
36613
|
title: "Audio",
|
|
35881
36614
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -35968,7 +36701,7 @@ var AudioNodeImpl = class extends NodeImpl {
|
|
|
35968
36701
|
var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
|
|
35969
36702
|
|
|
35970
36703
|
// src/model/nodes/HttpCallNode.ts
|
|
35971
|
-
var
|
|
36704
|
+
var import_non_secure81 = require("nanoid/non-secure");
|
|
35972
36705
|
var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
|
|
35973
36706
|
var REQUEST_ERROR_OUTPUT_ID = "requestError";
|
|
35974
36707
|
var STATUS_CODE_OUTPUT_ID = "statusCode";
|
|
@@ -36215,7 +36948,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
36215
36948
|
const chartNode = {
|
|
36216
36949
|
type: "httpCall",
|
|
36217
36950
|
title: "Http Call",
|
|
36218
|
-
id: (0,
|
|
36951
|
+
id: (0, import_non_secure81.nanoid)(),
|
|
36219
36952
|
visualData: {
|
|
36220
36953
|
x: 0,
|
|
36221
36954
|
y: 0,
|
|
@@ -36555,14 +37288,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
36555
37288
|
var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
36556
37289
|
|
|
36557
37290
|
// src/model/nodes/DelayNode.ts
|
|
36558
|
-
var
|
|
36559
|
-
var
|
|
37291
|
+
var import_non_secure82 = require("nanoid/non-secure");
|
|
37292
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
36560
37293
|
var DelayNodeImpl = class extends NodeImpl {
|
|
36561
37294
|
static create() {
|
|
36562
37295
|
const chartNode = {
|
|
36563
37296
|
type: "delay",
|
|
36564
37297
|
title: "Delay",
|
|
36565
|
-
id: (0,
|
|
37298
|
+
id: (0, import_non_secure82.nanoid)(),
|
|
36566
37299
|
visualData: {
|
|
36567
37300
|
x: 0,
|
|
36568
37301
|
y: 0,
|
|
@@ -36607,7 +37340,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36607
37340
|
}
|
|
36608
37341
|
static getUIData() {
|
|
36609
37342
|
return {
|
|
36610
|
-
infoBoxBody:
|
|
37343
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
36611
37344
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
36612
37345
|
`,
|
|
36613
37346
|
infoBoxTitle: "Delay Node",
|
|
@@ -36644,12 +37377,12 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
36644
37377
|
var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
36645
37378
|
|
|
36646
37379
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
36647
|
-
var
|
|
36648
|
-
var
|
|
37380
|
+
var import_non_secure83 = require("nanoid/non-secure");
|
|
37381
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
36649
37382
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
36650
37383
|
static create() {
|
|
36651
37384
|
return {
|
|
36652
|
-
id: (0,
|
|
37385
|
+
id: (0, import_non_secure83.nanoid)(),
|
|
36653
37386
|
type: "appendToDataset",
|
|
36654
37387
|
title: "Append to Dataset",
|
|
36655
37388
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -36705,7 +37438,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
36705
37438
|
}
|
|
36706
37439
|
static getUIData() {
|
|
36707
37440
|
return {
|
|
36708
|
-
infoBoxBody:
|
|
37441
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
36709
37442
|
Appends a row of data to the specified dataset.
|
|
36710
37443
|
`,
|
|
36711
37444
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -37255,14 +37988,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
|
|
|
37255
37988
|
var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
|
|
37256
37989
|
|
|
37257
37990
|
// src/model/nodes/SliceNode.ts
|
|
37258
|
-
var
|
|
37259
|
-
var
|
|
37991
|
+
var import_non_secure84 = require("nanoid/non-secure");
|
|
37992
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
37260
37993
|
var SliceNodeImpl = class extends NodeImpl {
|
|
37261
37994
|
static create() {
|
|
37262
37995
|
const chartNode = {
|
|
37263
37996
|
type: "slice",
|
|
37264
37997
|
title: "Slice",
|
|
37265
|
-
id: (0,
|
|
37998
|
+
id: (0, import_non_secure84.nanoid)(),
|
|
37266
37999
|
visualData: {
|
|
37267
38000
|
x: 0,
|
|
37268
38001
|
y: 0,
|
|
@@ -37315,14 +38048,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37315
38048
|
];
|
|
37316
38049
|
}
|
|
37317
38050
|
getBody() {
|
|
37318
|
-
return
|
|
38051
|
+
return import_ts_dedent74.dedent`
|
|
37319
38052
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
37320
38053
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
37321
38054
|
`;
|
|
37322
38055
|
}
|
|
37323
38056
|
static getUIData() {
|
|
37324
38057
|
return {
|
|
37325
|
-
infoBoxBody:
|
|
38058
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
37326
38059
|
Slices an array from the start index for the count number of elements.
|
|
37327
38060
|
|
|
37328
38061
|
Useful for extracting a portion of an array.
|
|
@@ -37348,14 +38081,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
37348
38081
|
var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
37349
38082
|
|
|
37350
38083
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
37351
|
-
var
|
|
37352
|
-
var
|
|
38084
|
+
var import_non_secure85 = require("nanoid/non-secure");
|
|
38085
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
37353
38086
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
37354
38087
|
static create() {
|
|
37355
38088
|
const chartNode = {
|
|
37356
38089
|
type: "extractMarkdownCodeBlocks",
|
|
37357
38090
|
title: "Extract Markdown Code Blocks",
|
|
37358
|
-
id: (0,
|
|
38091
|
+
id: (0, import_non_secure85.nanoid)(),
|
|
37359
38092
|
visualData: {
|
|
37360
38093
|
x: 0,
|
|
37361
38094
|
y: 0,
|
|
@@ -37396,7 +38129,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
37396
38129
|
}
|
|
37397
38130
|
static getUIData() {
|
|
37398
38131
|
return {
|
|
37399
|
-
infoBoxBody:
|
|
38132
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
37400
38133
|
Extracts the code blocks in the input Markdown text.
|
|
37401
38134
|
|
|
37402
38135
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -37447,7 +38180,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
|
|
|
37447
38180
|
);
|
|
37448
38181
|
|
|
37449
38182
|
// src/model/nodes/AssembleMessageNode.ts
|
|
37450
|
-
var
|
|
38183
|
+
var import_non_secure86 = require("nanoid/non-secure");
|
|
37451
38184
|
var import_lodash_es13 = require("lodash");
|
|
37452
38185
|
var import_ts_pattern6 = require("ts-pattern");
|
|
37453
38186
|
var messageTypeToTitle = {
|
|
@@ -37462,7 +38195,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
37462
38195
|
const chartNode = {
|
|
37463
38196
|
type: "assembleMessage",
|
|
37464
38197
|
title: "Assemble Message",
|
|
37465
|
-
id: (0,
|
|
38198
|
+
id: (0, import_non_secure86.nanoid)(),
|
|
37466
38199
|
visualData: {
|
|
37467
38200
|
x: 0,
|
|
37468
38201
|
y: 0,
|
|
@@ -37601,7 +38334,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
37601
38334
|
});
|
|
37602
38335
|
const inputParts = (0, import_lodash_es13.orderBy)(
|
|
37603
38336
|
Object.entries(inputs).filter(([key]) => key.startsWith("part")),
|
|
37604
|
-
([key]) => key,
|
|
38337
|
+
([key]) => parseVariadicPortIndex(key, "part", "legacy"),
|
|
37605
38338
|
"asc"
|
|
37606
38339
|
);
|
|
37607
38340
|
for (const [, inputPart] of inputParts) {
|
|
@@ -37652,13 +38385,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
37652
38385
|
var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
|
|
37653
38386
|
|
|
37654
38387
|
// src/model/nodes/URLReferenceNode.ts
|
|
37655
|
-
var
|
|
38388
|
+
var import_non_secure87 = require("nanoid/non-secure");
|
|
37656
38389
|
var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
37657
38390
|
static create() {
|
|
37658
38391
|
const chartNode = {
|
|
37659
38392
|
type: "urlReference",
|
|
37660
38393
|
title: "URL Reference",
|
|
37661
|
-
id: (0,
|
|
38394
|
+
id: (0, import_non_secure87.nanoid)(),
|
|
37662
38395
|
visualData: {
|
|
37663
38396
|
x: 0,
|
|
37664
38397
|
y: 0,
|
|
@@ -37727,14 +38460,14 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
|
37727
38460
|
var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
37728
38461
|
|
|
37729
38462
|
// src/model/nodes/DestructureNode.ts
|
|
37730
|
-
var
|
|
37731
|
-
var
|
|
38463
|
+
var import_non_secure88 = require("nanoid/non-secure");
|
|
38464
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
37732
38465
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
37733
38466
|
static create() {
|
|
37734
38467
|
const chartNode = {
|
|
37735
38468
|
type: "destructure",
|
|
37736
38469
|
title: "Destructure",
|
|
37737
|
-
id: (0,
|
|
38470
|
+
id: (0, import_non_secure88.nanoid)(),
|
|
37738
38471
|
visualData: {
|
|
37739
38472
|
x: 0,
|
|
37740
38473
|
y: 0,
|
|
@@ -37742,7 +38475,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37742
38475
|
},
|
|
37743
38476
|
data: {
|
|
37744
38477
|
paths: ["$.value"],
|
|
37745
|
-
pathPortIds: [(0,
|
|
38478
|
+
pathPortIds: [(0, import_non_secure88.nanoid)()]
|
|
37746
38479
|
}
|
|
37747
38480
|
};
|
|
37748
38481
|
return chartNode;
|
|
@@ -37796,7 +38529,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37796
38529
|
}
|
|
37797
38530
|
static getUIData() {
|
|
37798
38531
|
return {
|
|
37799
|
-
infoBoxBody:
|
|
38532
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
37800
38533
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
37801
38534
|
`,
|
|
37802
38535
|
infoBoxTitle: "Destructure Node",
|
|
@@ -37830,12 +38563,12 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
37830
38563
|
var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
37831
38564
|
|
|
37832
38565
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
37833
|
-
var
|
|
37834
|
-
var
|
|
38566
|
+
var import_non_secure89 = require("nanoid/non-secure");
|
|
38567
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
37835
38568
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
37836
38569
|
static create() {
|
|
37837
38570
|
return {
|
|
37838
|
-
id: (0,
|
|
38571
|
+
id: (0, import_non_secure89.nanoid)(),
|
|
37839
38572
|
type: "replaceDataset",
|
|
37840
38573
|
title: "Replace Dataset",
|
|
37841
38574
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -37874,7 +38607,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
37874
38607
|
}
|
|
37875
38608
|
static getUIData() {
|
|
37876
38609
|
return {
|
|
37877
|
-
infoBoxBody:
|
|
38610
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
37878
38611
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
37879
38612
|
`,
|
|
37880
38613
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -38006,14 +38739,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
|
|
|
38006
38739
|
var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
38007
38740
|
|
|
38008
38741
|
// src/model/nodes/GraphReferenceNode.ts
|
|
38009
|
-
var
|
|
38010
|
-
var
|
|
38742
|
+
var import_non_secure90 = require("nanoid/non-secure");
|
|
38743
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
38011
38744
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
38012
38745
|
static create() {
|
|
38013
38746
|
const chartNode = {
|
|
38014
38747
|
type: "graphReference",
|
|
38015
38748
|
title: "Graph Reference",
|
|
38016
|
-
id: (0,
|
|
38749
|
+
id: (0, import_non_secure90.nanoid)(),
|
|
38017
38750
|
visualData: {
|
|
38018
38751
|
x: 0,
|
|
38019
38752
|
y: 0,
|
|
@@ -38062,7 +38795,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
38062
38795
|
}
|
|
38063
38796
|
static getUIData() {
|
|
38064
38797
|
return {
|
|
38065
|
-
infoBoxBody:
|
|
38798
|
+
infoBoxBody: import_ts_dedent78.dedent`
|
|
38066
38799
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
38067
38800
|
`,
|
|
38068
38801
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -38128,8 +38861,8 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
38128
38861
|
var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
|
|
38129
38862
|
|
|
38130
38863
|
// src/model/nodes/CallGraphNode.ts
|
|
38131
|
-
var
|
|
38132
|
-
var
|
|
38864
|
+
var import_non_secure91 = require("nanoid/non-secure");
|
|
38865
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
38133
38866
|
|
|
38134
38867
|
// src/api/looseDataValue.ts
|
|
38135
38868
|
var import_lodash_es14 = require("lodash");
|
|
@@ -38155,7 +38888,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
38155
38888
|
const chartNode = {
|
|
38156
38889
|
type: "callGraph",
|
|
38157
38890
|
title: "Call Graph",
|
|
38158
|
-
id: (0,
|
|
38891
|
+
id: (0, import_non_secure91.nanoid)(),
|
|
38159
38892
|
visualData: {
|
|
38160
38893
|
x: 0,
|
|
38161
38894
|
y: 0,
|
|
@@ -38205,7 +38938,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
38205
38938
|
}
|
|
38206
38939
|
static getUIData() {
|
|
38207
38940
|
return {
|
|
38208
|
-
infoBoxBody:
|
|
38941
|
+
infoBoxBody: import_ts_dedent79.dedent`
|
|
38209
38942
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
38210
38943
|
`,
|
|
38211
38944
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -38277,7 +39010,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
38277
39010
|
|
|
38278
39011
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
38279
39012
|
var import_nanoid = require("nanoid");
|
|
38280
|
-
var
|
|
39013
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
38281
39014
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
38282
39015
|
static create() {
|
|
38283
39016
|
const chartNode = {
|
|
@@ -38360,7 +39093,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
38360
39093
|
}
|
|
38361
39094
|
static getUIData() {
|
|
38362
39095
|
return {
|
|
38363
|
-
infoBoxBody:
|
|
39096
|
+
infoBoxBody: import_ts_dedent80.dedent`
|
|
38364
39097
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
38365
39098
|
`,
|
|
38366
39099
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -38447,11 +39180,11 @@ function getDelegatedToolCallRecords(input) {
|
|
|
38447
39180
|
var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
|
|
38448
39181
|
|
|
38449
39182
|
// src/model/nodes/PlayAudioNode.ts
|
|
38450
|
-
var
|
|
39183
|
+
var import_non_secure92 = require("nanoid/non-secure");
|
|
38451
39184
|
var PlayAudioNodeImpl = class extends NodeImpl {
|
|
38452
39185
|
static create() {
|
|
38453
39186
|
return {
|
|
38454
|
-
id: (0,
|
|
39187
|
+
id: (0, import_non_secure92.nanoid)(),
|
|
38455
39188
|
type: "playAudio",
|
|
38456
39189
|
title: "Play Audio",
|
|
38457
39190
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -38505,11 +39238,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
|
|
|
38505
39238
|
var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
|
|
38506
39239
|
|
|
38507
39240
|
// src/model/nodes/DocumentNode.ts
|
|
38508
|
-
var
|
|
39241
|
+
var import_non_secure93 = require("nanoid/non-secure");
|
|
38509
39242
|
var DocumentNodeImpl = class extends NodeImpl {
|
|
38510
39243
|
static create() {
|
|
38511
39244
|
return {
|
|
38512
|
-
id: (0,
|
|
39245
|
+
id: (0, import_non_secure93.nanoid)(),
|
|
38513
39246
|
type: "document",
|
|
38514
39247
|
title: "Document",
|
|
38515
39248
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -38675,15 +39408,15 @@ var DocumentNodeImpl = class extends NodeImpl {
|
|
|
38675
39408
|
var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
38676
39409
|
|
|
38677
39410
|
// src/model/nodes/ChatLoopNode.ts
|
|
38678
|
-
var
|
|
38679
|
-
var
|
|
39411
|
+
var import_non_secure94 = require("nanoid/non-secure");
|
|
39412
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
38680
39413
|
var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
|
|
38681
39414
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
38682
39415
|
static create() {
|
|
38683
39416
|
const chartNode = {
|
|
38684
39417
|
type: "chatLoop",
|
|
38685
39418
|
title: chatLoopLegacyDisplayName,
|
|
38686
|
-
id: (0,
|
|
39419
|
+
id: (0, import_non_secure94.nanoid)(),
|
|
38687
39420
|
visualData: {
|
|
38688
39421
|
x: 0,
|
|
38689
39422
|
y: 0,
|
|
@@ -38716,7 +39449,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38716
39449
|
}
|
|
38717
39450
|
static getUIData() {
|
|
38718
39451
|
return {
|
|
38719
|
-
infoBoxBody:
|
|
39452
|
+
infoBoxBody: import_ts_dedent81.dedent`
|
|
38720
39453
|
Creates an interactive chat loop with an AI model. The node will:
|
|
38721
39454
|
1. Send the initial prompt to the AI
|
|
38722
39455
|
2. Show the AI's response and prompt for user input
|
|
@@ -38816,12 +39549,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
38816
39549
|
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
|
|
38817
39550
|
|
|
38818
39551
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
38819
|
-
var
|
|
38820
|
-
var
|
|
39552
|
+
var import_non_secure95 = require("nanoid/non-secure");
|
|
39553
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
38821
39554
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
38822
39555
|
static create() {
|
|
38823
39556
|
return {
|
|
38824
|
-
id: (0,
|
|
39557
|
+
id: (0, import_non_secure95.nanoid)(),
|
|
38825
39558
|
type: "readAllFiles",
|
|
38826
39559
|
title: "Read All Files",
|
|
38827
39560
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -38932,7 +39665,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38932
39665
|
];
|
|
38933
39666
|
}
|
|
38934
39667
|
getBody() {
|
|
38935
|
-
return
|
|
39668
|
+
return import_ts_dedent82.dedent`
|
|
38936
39669
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
38937
39670
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
38938
39671
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -38941,7 +39674,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
38941
39674
|
}
|
|
38942
39675
|
static getUIData() {
|
|
38943
39676
|
return {
|
|
38944
|
-
infoBoxBody:
|
|
39677
|
+
infoBoxBody: import_ts_dedent82.dedent`
|
|
38945
39678
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
38946
39679
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
38947
39680
|
`,
|
|
@@ -39014,14 +39747,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
39014
39747
|
var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
39015
39748
|
|
|
39016
39749
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
39017
|
-
var
|
|
39018
|
-
var
|
|
39750
|
+
var import_non_secure96 = require("nanoid/non-secure");
|
|
39751
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
39019
39752
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
39020
39753
|
static create() {
|
|
39021
39754
|
const chartNode = {
|
|
39022
39755
|
type: "toMarkdownTable",
|
|
39023
39756
|
title: "To Markdown Table",
|
|
39024
|
-
id: (0,
|
|
39757
|
+
id: (0, import_non_secure96.nanoid)(),
|
|
39025
39758
|
visualData: {
|
|
39026
39759
|
x: 0,
|
|
39027
39760
|
y: 0,
|
|
@@ -39075,7 +39808,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
39075
39808
|
}
|
|
39076
39809
|
static getUIData() {
|
|
39077
39810
|
return {
|
|
39078
|
-
infoBoxBody:
|
|
39811
|
+
infoBoxBody: import_ts_dedent83.dedent`
|
|
39079
39812
|
Converts an array of objects into a markdown table format.
|
|
39080
39813
|
Input should be an array of objects with consistent keys.
|
|
39081
39814
|
`,
|
|
@@ -39127,7 +39860,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
39127
39860
|
|
|
39128
39861
|
// src/model/nodes/CronNode.ts
|
|
39129
39862
|
var import_nanoid2 = require("nanoid");
|
|
39130
|
-
var
|
|
39863
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
39131
39864
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
39132
39865
|
var CronNodeImpl = class extends NodeImpl {
|
|
39133
39866
|
static create() {
|
|
@@ -39197,7 +39930,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39197
39930
|
}
|
|
39198
39931
|
static getUIData() {
|
|
39199
39932
|
return {
|
|
39200
|
-
infoBoxBody:
|
|
39933
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
39201
39934
|
Executes a subgraph on a schedule. Supports:
|
|
39202
39935
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
39203
39936
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -39237,7 +39970,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
39237
39970
|
type: "string",
|
|
39238
39971
|
dataKey: "schedule",
|
|
39239
39972
|
label: "Schedule",
|
|
39240
|
-
helperMessage:
|
|
39973
|
+
helperMessage: import_ts_dedent84.dedent`
|
|
39241
39974
|
Examples:
|
|
39242
39975
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
39243
39976
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -39368,15 +40101,15 @@ ${this.data.schedule}`;
|
|
|
39368
40101
|
var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
39369
40102
|
|
|
39370
40103
|
// src/model/nodes/ToTreeNode.ts
|
|
39371
|
-
var
|
|
39372
|
-
var
|
|
40104
|
+
var import_non_secure97 = require("nanoid/non-secure");
|
|
40105
|
+
var import_ts_dedent85 = require("ts-dedent");
|
|
39373
40106
|
var import_lodash_es15 = require("lodash");
|
|
39374
40107
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
39375
40108
|
static create() {
|
|
39376
40109
|
const chartNode = {
|
|
39377
40110
|
type: "toTree",
|
|
39378
40111
|
title: "To Tree",
|
|
39379
|
-
id: (0,
|
|
40112
|
+
id: (0, import_non_secure97.nanoid)(),
|
|
39380
40113
|
visualData: {
|
|
39381
40114
|
x: 0,
|
|
39382
40115
|
y: 0,
|
|
@@ -39431,7 +40164,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39431
40164
|
];
|
|
39432
40165
|
}
|
|
39433
40166
|
getBody() {
|
|
39434
|
-
return
|
|
40167
|
+
return import_ts_dedent85.dedent`
|
|
39435
40168
|
Format: ${this.data.format}
|
|
39436
40169
|
Children: ${this.data.childrenProperty}
|
|
39437
40170
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -39439,7 +40172,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39439
40172
|
}
|
|
39440
40173
|
static getUIData() {
|
|
39441
40174
|
return {
|
|
39442
|
-
infoBoxBody:
|
|
40175
|
+
infoBoxBody: import_ts_dedent85.dedent`
|
|
39443
40176
|
Converts an array of objects into a tree structure and renders it as text.
|
|
39444
40177
|
|
|
39445
40178
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -39497,14 +40230,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
39497
40230
|
var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
39498
40231
|
|
|
39499
40232
|
// src/model/nodes/LoopUntilNode.ts
|
|
39500
|
-
var
|
|
39501
|
-
var
|
|
40233
|
+
var import_non_secure98 = require("nanoid/non-secure");
|
|
40234
|
+
var import_ts_dedent86 = require("ts-dedent");
|
|
39502
40235
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
39503
40236
|
static create() {
|
|
39504
40237
|
const chartNode = {
|
|
39505
40238
|
type: "loopUntil",
|
|
39506
40239
|
title: "Loop Until",
|
|
39507
|
-
id: (0,
|
|
40240
|
+
id: (0, import_non_secure98.nanoid)(),
|
|
39508
40241
|
visualData: {
|
|
39509
40242
|
x: 0,
|
|
39510
40243
|
y: 0,
|
|
@@ -39600,7 +40333,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
39600
40333
|
}
|
|
39601
40334
|
static getUIData() {
|
|
39602
40335
|
return {
|
|
39603
|
-
infoBoxBody:
|
|
40336
|
+
infoBoxBody: import_ts_dedent86.dedent`
|
|
39604
40337
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
39605
40338
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
39606
40339
|
maximum iterations.
|
|
@@ -40013,14 +40746,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
|
|
|
40013
40746
|
var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
40014
40747
|
|
|
40015
40748
|
// src/model/nodes/MCPToolCallNode.ts
|
|
40016
|
-
var
|
|
40017
|
-
var
|
|
40749
|
+
var import_non_secure99 = require("nanoid/non-secure");
|
|
40750
|
+
var import_ts_dedent87 = require("ts-dedent");
|
|
40018
40751
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
40019
40752
|
static create() {
|
|
40020
40753
|
const chartNode = {
|
|
40021
40754
|
type: "mcpToolCall",
|
|
40022
40755
|
title: "MCP Tool Call",
|
|
40023
|
-
id: (0,
|
|
40756
|
+
id: (0, import_non_secure99.nanoid)(),
|
|
40024
40757
|
visualData: {
|
|
40025
40758
|
x: 0,
|
|
40026
40759
|
y: 0,
|
|
@@ -40033,7 +40766,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40033
40766
|
serverUrl: "http://localhost:8080/mcp",
|
|
40034
40767
|
serverId: "",
|
|
40035
40768
|
toolName: "",
|
|
40036
|
-
toolArguments:
|
|
40769
|
+
toolArguments: import_ts_dedent87.dedent`
|
|
40037
40770
|
{
|
|
40038
40771
|
"key": "value"
|
|
40039
40772
|
}`,
|
|
@@ -40125,7 +40858,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40125
40858
|
}
|
|
40126
40859
|
static getUIData() {
|
|
40127
40860
|
return {
|
|
40128
|
-
infoBoxBody:
|
|
40861
|
+
infoBoxBody: import_ts_dedent87.dedent`
|
|
40129
40862
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
40130
40863
|
`,
|
|
40131
40864
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -40189,13 +40922,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
40189
40922
|
var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
|
|
40190
40923
|
|
|
40191
40924
|
// src/model/nodes/MCPGetPromptNode.ts
|
|
40192
|
-
var
|
|
40925
|
+
var import_non_secure100 = require("nanoid/non-secure");
|
|
40193
40926
|
var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
40194
40927
|
static create() {
|
|
40195
40928
|
const chartNode = {
|
|
40196
40929
|
type: "mcpGetPrompt",
|
|
40197
40930
|
title: "MCP Get Prompt",
|
|
40198
|
-
id: (0,
|
|
40931
|
+
id: (0, import_non_secure100.nanoid)(),
|
|
40199
40932
|
visualData: {
|
|
40200
40933
|
x: 0,
|
|
40201
40934
|
y: 0,
|
|
@@ -40342,15 +41075,15 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
|
40342
41075
|
var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
40343
41076
|
|
|
40344
41077
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
40345
|
-
var
|
|
40346
|
-
var
|
|
41078
|
+
var import_non_secure101 = require("nanoid/non-secure");
|
|
41079
|
+
var import_ts_dedent88 = require("ts-dedent");
|
|
40347
41080
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
40348
41081
|
static create() {
|
|
40349
41082
|
const chartNode = {
|
|
40350
41083
|
type: "referencedGraphAlias",
|
|
40351
41084
|
title: "",
|
|
40352
41085
|
// Always set initially by the editor
|
|
40353
|
-
id: (0,
|
|
41086
|
+
id: (0, import_non_secure101.nanoid)(),
|
|
40354
41087
|
visualData: {
|
|
40355
41088
|
x: 0,
|
|
40356
41089
|
y: 0,
|
|
@@ -40434,7 +41167,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
40434
41167
|
}
|
|
40435
41168
|
static getUIData() {
|
|
40436
41169
|
return {
|
|
40437
|
-
infoBoxBody:
|
|
41170
|
+
infoBoxBody: import_ts_dedent88.dedent`
|
|
40438
41171
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
40439
41172
|
`,
|
|
40440
41173
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -40469,6 +41202,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
40469
41202
|
inputData,
|
|
40470
41203
|
context.contextValues,
|
|
40471
41204
|
{
|
|
41205
|
+
graphInputStreams: context.graphInputStreams,
|
|
40472
41206
|
// This node preserves the referenced graph's named boundary ports,
|
|
40473
41207
|
// so it may relay their direct producer partials to a parent Watch.
|
|
40474
41208
|
// An Error-output alias can replace normal ports with exclusions,
|
|
@@ -40514,13 +41248,13 @@ function applyMetricOutputSetting(outputs, outputCostDuration) {
|
|
|
40514
41248
|
}
|
|
40515
41249
|
|
|
40516
41250
|
// src/model/nodes/NodePrefabInstanceNode.ts
|
|
40517
|
-
var
|
|
41251
|
+
var import_non_secure102 = require("nanoid/non-secure");
|
|
40518
41252
|
var NodePrefabInstanceNodeImpl = class extends NodeImpl {
|
|
40519
41253
|
static create() {
|
|
40520
41254
|
return {
|
|
40521
41255
|
type: NODE_PREFAB_INSTANCE_TYPE,
|
|
40522
41256
|
title: "Linked node",
|
|
40523
|
-
id: (0,
|
|
41257
|
+
id: (0, import_non_secure102.nanoid)(),
|
|
40524
41258
|
visualData: {
|
|
40525
41259
|
x: 0,
|
|
40526
41260
|
y: 0,
|
|
@@ -40551,7 +41285,7 @@ var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked
|
|
|
40551
41285
|
|
|
40552
41286
|
// src/model/Nodes.ts
|
|
40553
41287
|
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);
|
|
41288
|
+
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(projectNameNode).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
41289
|
};
|
|
40556
41290
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
40557
41291
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -41234,7 +41968,7 @@ function isRecord9(value) {
|
|
|
41234
41968
|
}
|
|
41235
41969
|
|
|
41236
41970
|
// src/recording/ExecutionRecorder.ts
|
|
41237
|
-
var
|
|
41971
|
+
var import_non_secure103 = require("nanoid/non-secure");
|
|
41238
41972
|
var import_emittery2 = __toESM(require("emittery-0-13"), 1);
|
|
41239
41973
|
var import_lodash_es16 = require("lodash");
|
|
41240
41974
|
var import_json_stream_es = require("json-stream-es");
|
|
@@ -41526,7 +42260,7 @@ function serializeToObject(recording) {
|
|
|
41526
42260
|
const asString = uint8ArrayToBase64Sync(val);
|
|
41527
42261
|
const existingAsset = Object.entries(serialized.assets).find(([, asset]) => asset === asString);
|
|
41528
42262
|
if (!existingAsset) {
|
|
41529
|
-
const id = (0,
|
|
42263
|
+
const id = (0, import_non_secure103.nanoid)();
|
|
41530
42264
|
serialized.assets[id] = asString;
|
|
41531
42265
|
return `$ASSET:${id}`;
|
|
41532
42266
|
} else {
|
|
@@ -41586,7 +42320,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
41586
42320
|
recordSocket(channel, options2 = {}) {
|
|
41587
42321
|
return new Promise((resolve) => {
|
|
41588
42322
|
var _a, _b;
|
|
41589
|
-
this.recordingId = (0,
|
|
42323
|
+
this.recordingId = (0, import_non_secure103.nanoid)();
|
|
41590
42324
|
let settled = false;
|
|
41591
42325
|
const finish = (emitFinishedRecording) => {
|
|
41592
42326
|
var _a2;
|
|
@@ -41642,7 +42376,7 @@ var ExecutionRecorder = class _ExecutionRecorder {
|
|
|
41642
42376
|
});
|
|
41643
42377
|
}
|
|
41644
42378
|
record(processor) {
|
|
41645
|
-
this.recordingId = (0,
|
|
42379
|
+
this.recordingId = (0, import_non_secure103.nanoid)();
|
|
41646
42380
|
let settled = false;
|
|
41647
42381
|
const finish = () => {
|
|
41648
42382
|
if (settled) return;
|
|
@@ -41713,8 +42447,8 @@ function isSocketRecordingTerminalEvent(event) {
|
|
|
41713
42447
|
}
|
|
41714
42448
|
|
|
41715
42449
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
41716
|
-
var
|
|
41717
|
-
var
|
|
42450
|
+
var import_non_secure104 = require("nanoid/non-secure");
|
|
42451
|
+
var import_ts_dedent89 = require("ts-dedent");
|
|
41718
42452
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
41719
42453
|
|
|
41720
42454
|
// src/utils/assertNever.ts
|
|
@@ -41728,7 +42462,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41728
42462
|
const chartNode = {
|
|
41729
42463
|
type: "chatAnthropic",
|
|
41730
42464
|
title: "Chat (Anthropic, Legacy)",
|
|
41731
|
-
id: (0,
|
|
42465
|
+
id: (0, import_non_secure104.nanoid)(),
|
|
41732
42466
|
visualData: {
|
|
41733
42467
|
x: 0,
|
|
41734
42468
|
y: 0,
|
|
@@ -41878,7 +42612,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
41878
42612
|
getBody(data) {
|
|
41879
42613
|
var _a;
|
|
41880
42614
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
41881
|
-
return
|
|
42615
|
+
return import_ts_dedent89.dedent`
|
|
41882
42616
|
${modelName}
|
|
41883
42617
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
41884
42618
|
Max Tokens: ${data.maxTokens}
|
|
@@ -42004,7 +42738,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
42004
42738
|
},
|
|
42005
42739
|
getUIData() {
|
|
42006
42740
|
return {
|
|
42007
|
-
infoBoxBody:
|
|
42741
|
+
infoBoxBody: import_ts_dedent89.dedent`
|
|
42008
42742
|
Legacy Anthropic chat node.
|
|
42009
42743
|
|
|
42010
42744
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -42478,8 +43212,8 @@ var anthropicPlugin = {
|
|
|
42478
43212
|
var anthropic_default = anthropicPlugin;
|
|
42479
43213
|
|
|
42480
43214
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
42481
|
-
var
|
|
42482
|
-
var
|
|
43215
|
+
var import_non_secure105 = require("nanoid/non-secure");
|
|
43216
|
+
var import_ts_dedent90 = require("ts-dedent");
|
|
42483
43217
|
var import_autoevals = require("autoevals");
|
|
42484
43218
|
var import_ts_pattern7 = require("ts-pattern");
|
|
42485
43219
|
var options = [
|
|
@@ -42498,7 +43232,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42498
43232
|
const chartNode = {
|
|
42499
43233
|
type: "autoevals",
|
|
42500
43234
|
title: "Autoevals",
|
|
42501
|
-
id: (0,
|
|
43235
|
+
id: (0, import_non_secure105.nanoid)(),
|
|
42502
43236
|
visualData: {
|
|
42503
43237
|
x: 0,
|
|
42504
43238
|
y: 0,
|
|
@@ -42613,7 +43347,7 @@ var AutoEvalsNodeImpl = {
|
|
|
42613
43347
|
},
|
|
42614
43348
|
getUIData() {
|
|
42615
43349
|
return {
|
|
42616
|
-
infoBoxBody:
|
|
43350
|
+
infoBoxBody: import_ts_dedent90.dedent`
|
|
42617
43351
|
Evaluates the validity of a response using the autoevals library.
|
|
42618
43352
|
`,
|
|
42619
43353
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -42695,8 +43429,8 @@ var autoevalsPlugin = {
|
|
|
42695
43429
|
var autoevals_default = autoevalsPlugin;
|
|
42696
43430
|
|
|
42697
43431
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
42698
|
-
var
|
|
42699
|
-
var
|
|
43432
|
+
var import_non_secure106 = require("nanoid/non-secure");
|
|
43433
|
+
var import_ts_dedent91 = require("ts-dedent");
|
|
42700
43434
|
|
|
42701
43435
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
42702
43436
|
var import_assemblyai = require("assemblyai");
|
|
@@ -42815,7 +43549,7 @@ var LemurQaNodeImpl = {
|
|
|
42815
43549
|
const chartNode = {
|
|
42816
43550
|
type: "assemblyAiLemurQa",
|
|
42817
43551
|
title: "LeMUR Question & Answers",
|
|
42818
|
-
id: (0,
|
|
43552
|
+
id: (0, import_non_secure106.nanoid)(),
|
|
42819
43553
|
visualData: {
|
|
42820
43554
|
x: 0,
|
|
42821
43555
|
y: 0,
|
|
@@ -42881,7 +43615,7 @@ var LemurQaNodeImpl = {
|
|
|
42881
43615
|
},
|
|
42882
43616
|
getUIData() {
|
|
42883
43617
|
return {
|
|
42884
|
-
infoBoxBody:
|
|
43618
|
+
infoBoxBody: import_ts_dedent91.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
42885
43619
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
42886
43620
|
contextMenuTitle: "LeMUR Q&A",
|
|
42887
43621
|
group: ["AI", "AssemblyAI"]
|
|
@@ -42952,14 +43686,14 @@ function applyQuestionEditors(data, question) {
|
|
|
42952
43686
|
var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
42953
43687
|
|
|
42954
43688
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
42955
|
-
var
|
|
42956
|
-
var
|
|
43689
|
+
var import_non_secure107 = require("nanoid/non-secure");
|
|
43690
|
+
var import_ts_dedent92 = require("ts-dedent");
|
|
42957
43691
|
var TranscribeAudioNodeImpl = {
|
|
42958
43692
|
create() {
|
|
42959
43693
|
const chartNode = {
|
|
42960
43694
|
type: "assemblyAiTranscribeAudio",
|
|
42961
43695
|
title: "Transcribe Audio",
|
|
42962
|
-
id: (0,
|
|
43696
|
+
id: (0, import_non_secure107.nanoid)(),
|
|
42963
43697
|
visualData: {
|
|
42964
43698
|
x: 0,
|
|
42965
43699
|
y: 0,
|
|
@@ -43015,7 +43749,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
43015
43749
|
},
|
|
43016
43750
|
getUIData() {
|
|
43017
43751
|
return {
|
|
43018
|
-
infoBoxBody:
|
|
43752
|
+
infoBoxBody: import_ts_dedent92.dedent`Use AssemblyAI to transcribe audio`,
|
|
43019
43753
|
infoBoxTitle: "Transcribe Audio Node",
|
|
43020
43754
|
contextMenuTitle: "Transcribe Audio",
|
|
43021
43755
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43073,15 +43807,15 @@ function getAdditionalParameters(data) {
|
|
|
43073
43807
|
}
|
|
43074
43808
|
|
|
43075
43809
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
43076
|
-
var
|
|
43077
|
-
var
|
|
43810
|
+
var import_non_secure108 = require("nanoid/non-secure");
|
|
43811
|
+
var import_ts_dedent93 = require("ts-dedent");
|
|
43078
43812
|
var import_assemblyai3 = require("assemblyai");
|
|
43079
43813
|
var LemurSummaryNodeImpl = {
|
|
43080
43814
|
create() {
|
|
43081
43815
|
const chartNode = {
|
|
43082
43816
|
type: "assemblyAiLemurSummary",
|
|
43083
43817
|
title: "LeMUR Summary",
|
|
43084
|
-
id: (0,
|
|
43818
|
+
id: (0, import_non_secure108.nanoid)(),
|
|
43085
43819
|
visualData: {
|
|
43086
43820
|
x: 0,
|
|
43087
43821
|
y: 0,
|
|
@@ -43127,7 +43861,7 @@ var LemurSummaryNodeImpl = {
|
|
|
43127
43861
|
},
|
|
43128
43862
|
getUIData() {
|
|
43129
43863
|
return {
|
|
43130
|
-
infoBoxBody:
|
|
43864
|
+
infoBoxBody: import_ts_dedent93.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
43131
43865
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
43132
43866
|
contextMenuTitle: "LeMUR Summary",
|
|
43133
43867
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43151,15 +43885,15 @@ var LemurSummaryNodeImpl = {
|
|
|
43151
43885
|
var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
|
|
43152
43886
|
|
|
43153
43887
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
43154
|
-
var
|
|
43155
|
-
var
|
|
43888
|
+
var import_non_secure109 = require("nanoid/non-secure");
|
|
43889
|
+
var import_ts_dedent94 = require("ts-dedent");
|
|
43156
43890
|
var import_assemblyai4 = require("assemblyai");
|
|
43157
43891
|
var LemurTaskNodeImpl = {
|
|
43158
43892
|
create() {
|
|
43159
43893
|
const chartNode = {
|
|
43160
43894
|
type: "assemblyAiLemurTask",
|
|
43161
43895
|
title: "LeMUR Task",
|
|
43162
|
-
id: (0,
|
|
43896
|
+
id: (0, import_non_secure109.nanoid)(),
|
|
43163
43897
|
visualData: {
|
|
43164
43898
|
x: 0,
|
|
43165
43899
|
y: 0,
|
|
@@ -43205,7 +43939,7 @@ var LemurTaskNodeImpl = {
|
|
|
43205
43939
|
},
|
|
43206
43940
|
getUIData() {
|
|
43207
43941
|
return {
|
|
43208
|
-
infoBoxBody:
|
|
43942
|
+
infoBoxBody: import_ts_dedent94.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
43209
43943
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
43210
43944
|
contextMenuTitle: "LeMUR Custom Task",
|
|
43211
43945
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43230,14 +43964,14 @@ var LemurTaskNodeImpl = {
|
|
|
43230
43964
|
var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
43231
43965
|
|
|
43232
43966
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
43233
|
-
var
|
|
43234
|
-
var
|
|
43967
|
+
var import_non_secure110 = require("nanoid/non-secure");
|
|
43968
|
+
var import_ts_dedent95 = require("ts-dedent");
|
|
43235
43969
|
var LemurActionItemsNodeImpl = {
|
|
43236
43970
|
create() {
|
|
43237
43971
|
const chartNode = {
|
|
43238
43972
|
type: "assemblyAiLemurActionItems",
|
|
43239
43973
|
title: "LeMUR Action Items",
|
|
43240
|
-
id: (0,
|
|
43974
|
+
id: (0, import_non_secure110.nanoid)(),
|
|
43241
43975
|
visualData: {
|
|
43242
43976
|
x: 0,
|
|
43243
43977
|
y: 0,
|
|
@@ -43283,7 +44017,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
43283
44017
|
},
|
|
43284
44018
|
getUIData() {
|
|
43285
44019
|
return {
|
|
43286
|
-
infoBoxBody:
|
|
44020
|
+
infoBoxBody: import_ts_dedent95.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
43287
44021
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
43288
44022
|
contextMenuTitle: "LeMUR Action Items",
|
|
43289
44023
|
group: ["AI", "AssemblyAI"]
|
|
@@ -43335,12 +44069,12 @@ var assemblyAiPlugin = {
|
|
|
43335
44069
|
var assemblyAi_default = assemblyAiPlugin;
|
|
43336
44070
|
|
|
43337
44071
|
// src/plugins/huggingface/nodes/ChatHuggingFace.ts
|
|
43338
|
-
var
|
|
44072
|
+
var import_non_secure111 = require("nanoid/non-secure");
|
|
43339
44073
|
var import_inference = require("@huggingface/inference");
|
|
43340
44074
|
var ChatHuggingFaceNodeImpl = {
|
|
43341
44075
|
create() {
|
|
43342
44076
|
return {
|
|
43343
|
-
id: (0,
|
|
44077
|
+
id: (0, import_non_secure111.nanoid)(),
|
|
43344
44078
|
type: "chatHuggingFace",
|
|
43345
44079
|
data: {
|
|
43346
44080
|
model: "",
|
|
@@ -43570,13 +44304,13 @@ var ChatHuggingFaceNodeImpl = {
|
|
|
43570
44304
|
var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
|
|
43571
44305
|
|
|
43572
44306
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
43573
|
-
var
|
|
44307
|
+
var import_non_secure112 = require("nanoid/non-secure");
|
|
43574
44308
|
var import_inference2 = require("@huggingface/inference");
|
|
43575
|
-
var
|
|
44309
|
+
var import_ts_dedent96 = require("ts-dedent");
|
|
43576
44310
|
var TextToImageHuggingFaceNodeImpl = {
|
|
43577
44311
|
create() {
|
|
43578
44312
|
return {
|
|
43579
|
-
id: (0,
|
|
44313
|
+
id: (0, import_non_secure112.nanoid)(),
|
|
43580
44314
|
type: "textToImageHuggingFace",
|
|
43581
44315
|
data: {
|
|
43582
44316
|
model: "",
|
|
@@ -43717,7 +44451,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
43717
44451
|
];
|
|
43718
44452
|
},
|
|
43719
44453
|
getBody(data) {
|
|
43720
|
-
return
|
|
44454
|
+
return import_ts_dedent96.dedent`
|
|
43721
44455
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
43722
44456
|
`;
|
|
43723
44457
|
},
|
|
@@ -47257,8 +47991,8 @@ var openAIPlugin = {
|
|
|
47257
47991
|
};
|
|
47258
47992
|
|
|
47259
47993
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
47260
|
-
var
|
|
47261
|
-
var
|
|
47994
|
+
var import_non_secure113 = require("nanoid/non-secure");
|
|
47995
|
+
var import_ts_dedent97 = require("ts-dedent");
|
|
47262
47996
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
47263
47997
|
var import_ts_pattern8 = require("ts-pattern");
|
|
47264
47998
|
var import_genai2 = require("@google/genai");
|
|
@@ -47285,7 +48019,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47285
48019
|
const chartNode = {
|
|
47286
48020
|
type: "chatGoogle",
|
|
47287
48021
|
title: "Chat (Google, Legacy)",
|
|
47288
|
-
id: (0,
|
|
48022
|
+
id: (0, import_non_secure113.nanoid)(),
|
|
47289
48023
|
visualData: {
|
|
47290
48024
|
x: 0,
|
|
47291
48025
|
y: 0,
|
|
@@ -47420,7 +48154,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47420
48154
|
},
|
|
47421
48155
|
getBody(data) {
|
|
47422
48156
|
var _a;
|
|
47423
|
-
return
|
|
48157
|
+
return import_ts_dedent97.dedent`
|
|
47424
48158
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
47425
48159
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
47426
48160
|
Max Tokens: ${data.maxTokens}
|
|
@@ -47508,7 +48242,7 @@ var ChatGoogleNodeImpl = {
|
|
|
47508
48242
|
},
|
|
47509
48243
|
getUIData() {
|
|
47510
48244
|
return {
|
|
47511
|
-
infoBoxBody:
|
|
48245
|
+
infoBoxBody: import_ts_dedent97.dedent`
|
|
47512
48246
|
Legacy Google chat node.
|
|
47513
48247
|
|
|
47514
48248
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -48516,6 +49250,7 @@ var Rivet = void 0;
|
|
|
48516
49250
|
MCPGetPromptNodeImpl,
|
|
48517
49251
|
MCPToolCallNodeImpl,
|
|
48518
49252
|
ManagedKnowledgeStore,
|
|
49253
|
+
MatchCaseNodeImpl,
|
|
48519
49254
|
MatchNodeImpl,
|
|
48520
49255
|
NODE_PREFAB_INSTANCE_TYPE,
|
|
48521
49256
|
NodeImpl,
|
|
@@ -48528,6 +49263,7 @@ var Rivet = void 0;
|
|
|
48528
49263
|
PlayAudioNodeImpl,
|
|
48529
49264
|
PluginNodeImplClass,
|
|
48530
49265
|
PopNodeImpl,
|
|
49266
|
+
ProjectNameNodeImpl,
|
|
48531
49267
|
ProjectValidationError,
|
|
48532
49268
|
PromptNodeImpl,
|
|
48533
49269
|
RIVET_MARKDOWN_ALLOWED_ATTRIBUTES,
|
|
@@ -48621,6 +49357,8 @@ var Rivet = void 0;
|
|
|
48621
49357
|
canBeCoercedAny,
|
|
48622
49358
|
canConsumeControlFlowExcludedInput,
|
|
48623
49359
|
canRenderDataBusNode,
|
|
49360
|
+
canStreamThroughGraphCaller,
|
|
49361
|
+
canStreamThroughGraphInput,
|
|
48624
49362
|
canUseNodeAsPrefabSource,
|
|
48625
49363
|
chatLoopLegacyDisplayName,
|
|
48626
49364
|
chatLoopNode,
|
|
@@ -48783,6 +49521,7 @@ var Rivet = void 0;
|
|
|
48783
49521
|
getProjectConnectionComparisonKey,
|
|
48784
49522
|
getProjectGlobalVariableIds,
|
|
48785
49523
|
getProjectNodeFieldComparisons,
|
|
49524
|
+
getProjectStreamingOutputWatchConnections,
|
|
48786
49525
|
getReconciledUiGraphActionInputBindings,
|
|
48787
49526
|
getReconciledUiGraphActionOutputBindings,
|
|
48788
49527
|
getScalarTypeOf,
|
|
@@ -48894,6 +49633,7 @@ var Rivet = void 0;
|
|
|
48894
49633
|
loopUntilNode,
|
|
48895
49634
|
looseDataValueToDataValue,
|
|
48896
49635
|
looseDataValuesToDataValues,
|
|
49636
|
+
matchCaseNode,
|
|
48897
49637
|
matchNode,
|
|
48898
49638
|
materializeChatV2PipelineFailure,
|
|
48899
49639
|
materializeLLMResponse,
|
|
@@ -48958,6 +49698,7 @@ var Rivet = void 0;
|
|
|
48958
49698
|
popNode,
|
|
48959
49699
|
projectLLMChatV2EditorCacheHit,
|
|
48960
49700
|
projectLLMInvocationUsage,
|
|
49701
|
+
projectNameNode,
|
|
48961
49702
|
promptNode,
|
|
48962
49703
|
protectEscapedInterpolationTokens,
|
|
48963
49704
|
raceInputsNode,
|
|
@@ -48973,6 +49714,7 @@ var Rivet = void 0;
|
|
|
48973
49714
|
reconcileUiGraphChatActionBindings,
|
|
48974
49715
|
reconcileUiGraphRunGraphActionBindings,
|
|
48975
49716
|
referencedGraphAliasNode,
|
|
49717
|
+
regexMatchLegacyDisplayName,
|
|
48976
49718
|
registerBuiltInNodes,
|
|
48977
49719
|
registerIntegration,
|
|
48978
49720
|
registerKnowledgeStoreProvider,
|
|
@@ -48988,6 +49730,7 @@ var Rivet = void 0;
|
|
|
48988
49730
|
resolveChatV2ProviderConfig,
|
|
48989
49731
|
resolveChatV2ResponseFormatParameters,
|
|
48990
49732
|
resolveCodeInterpolationExpression,
|
|
49733
|
+
resolveGraphInputValue,
|
|
48991
49734
|
resolveInterpolationExpressionRawValue,
|
|
48992
49735
|
resolveInterpolationTokenRawValue,
|
|
48993
49736
|
resolveLLMChatV2RuntimeProviderOptions,
|