@valerypopoff/rivet2-core 2.0.9 → 2.0.11
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 +345 -236
- package/dist/cjs/bundle.cjs.map +3 -3
- package/dist/esm/api/createProcessor.js +1 -0
- package/dist/esm/model/GraphProcessor.js +219 -105
- package/dist/esm/model/nodes/DidRunNode.js +12 -7
- package/dist/types/api/createProcessor.d.ts +2 -1
- package/dist/types/model/EditorDefinition.d.ts +5 -1
- package/dist/types/model/GraphProcessor.d.ts +5 -0
- package/dist/types/model/nodes/DidRunNode.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -3703,6 +3703,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
3703
3703
|
#runtimeCache;
|
|
3704
3704
|
#cacheLoadedProjects;
|
|
3705
3705
|
#scheduler;
|
|
3706
|
+
#runtimeProfiler;
|
|
3706
3707
|
#captureNodeTimings;
|
|
3707
3708
|
#useSeededExecutionPlanOnNextRun = false;
|
|
3708
3709
|
id = (0, import_non_secure4.nanoid)();
|
|
@@ -3770,6 +3771,34 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
3770
3771
|
}
|
|
3771
3772
|
return Math.max(0, getMonotonicTimeMs() - start);
|
|
3772
3773
|
}
|
|
3774
|
+
#startRuntimeProfile() {
|
|
3775
|
+
return this.#runtimeProfiler ? getMonotonicTimeMs() : void 0;
|
|
3776
|
+
}
|
|
3777
|
+
#finishRuntimeProfile(bucket, start) {
|
|
3778
|
+
if (start == null || !this.#runtimeProfiler) {
|
|
3779
|
+
return;
|
|
3780
|
+
}
|
|
3781
|
+
try {
|
|
3782
|
+
this.#runtimeProfiler.addDuration(bucket, Math.max(0, getMonotonicTimeMs() - start));
|
|
3783
|
+
} catch {
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
#profileRuntimeSync(bucket, run) {
|
|
3787
|
+
const start = this.#startRuntimeProfile();
|
|
3788
|
+
try {
|
|
3789
|
+
return run();
|
|
3790
|
+
} finally {
|
|
3791
|
+
this.#finishRuntimeProfile(bucket, start);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
async #profileRuntimeAsync(bucket, run) {
|
|
3795
|
+
const start = this.#startRuntimeProfile();
|
|
3796
|
+
try {
|
|
3797
|
+
return await run();
|
|
3798
|
+
} finally {
|
|
3799
|
+
this.#finishRuntimeProfile(bucket, start);
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3773
3802
|
constructor(project, graphId, registry, includeTrace, options2) {
|
|
3774
3803
|
this.#project = project;
|
|
3775
3804
|
const graph = resolveProcessorGraph(project, graphId);
|
|
@@ -3787,6 +3816,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
3787
3816
|
this.#runtimeCache = options2 == null ? void 0 : options2.runtimeCache;
|
|
3788
3817
|
this.#cacheLoadedProjects = (options2 == null ? void 0 : options2.cacheLoadedProjects) ?? false;
|
|
3789
3818
|
this.#scheduler = (options2 == null ? void 0 : options2.scheduler) ?? "compatible";
|
|
3819
|
+
this.#runtimeProfiler = options2 == null ? void 0 : options2.runtimeProfiler;
|
|
3790
3820
|
this.#captureNodeTimings = (options2 == null ? void 0 : options2.captureNodeTimings) ?? false;
|
|
3791
3821
|
this.#emitter.bindMethods(this, ["on", "off", "once", "onAny", "offAny"]);
|
|
3792
3822
|
this.setExternalFunction("echo", async (value) => ({ type: "any", value }));
|
|
@@ -3800,29 +3830,34 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
3800
3830
|
}
|
|
3801
3831
|
#preprocessGraph() {
|
|
3802
3832
|
var _a;
|
|
3803
|
-
const
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3833
|
+
const profileStart = this.#startRuntimeProfile();
|
|
3834
|
+
try {
|
|
3835
|
+
const runtimeCache = this.#canUseRuntimeExecutionPlanCache() ? this.#runtimeCache : void 0;
|
|
3836
|
+
const shouldUseRuntimeCache = runtimeCache != null;
|
|
3837
|
+
const cachedPlan = (_a = runtimeCache == null ? void 0 : runtimeCache.executionPlans) == null ? void 0 : _a.get(this.#graph);
|
|
3838
|
+
if (cachedPlan) {
|
|
3839
|
+
this.#applyPreprocessedGraph(cachedPlan, { recreateNodeInstances: true });
|
|
3840
|
+
return;
|
|
3841
|
+
}
|
|
3842
|
+
const preprocessedGraph = preprocessGraphState({
|
|
3843
|
+
graph: this.#graph,
|
|
3844
|
+
loadedProjects: this.#loadedProjects,
|
|
3845
|
+
project: this.#project,
|
|
3846
|
+
registry: this.#registry,
|
|
3847
|
+
warnOnInvalidGraph: this.warnOnInvalidGraph,
|
|
3848
|
+
buildExecutionPlan: shouldUseRuntimeCache,
|
|
3849
|
+
definitionContext: this.#runtimeCache ? {
|
|
3850
|
+
getGraphBoundary: (project, graphId) => this.#getGraphBoundary(project, graphId)
|
|
3851
|
+
} : void 0
|
|
3852
|
+
});
|
|
3853
|
+
if (shouldUseRuntimeCache && isGraphExecutionPlan(preprocessedGraph)) {
|
|
3854
|
+
runtimeCache.executionPlans ??= /* @__PURE__ */ new WeakMap();
|
|
3855
|
+
runtimeCache.executionPlans.set(this.#graph, toReusableGraphExecutionPlan(preprocessedGraph));
|
|
3856
|
+
}
|
|
3857
|
+
this.#applyPreprocessedGraph(preprocessedGraph);
|
|
3858
|
+
} finally {
|
|
3859
|
+
this.#finishRuntimeProfile("preprocessGraph", profileStart);
|
|
3824
3860
|
}
|
|
3825
|
-
this.#applyPreprocessedGraph(preprocessedGraph);
|
|
3826
3861
|
}
|
|
3827
3862
|
#canUseRuntimeExecutionPlanCache() {
|
|
3828
3863
|
return this.#canUseRuntimeExecutionPlanCacheFor(this.#project, this.#isSubProcessor);
|
|
@@ -4119,30 +4154,28 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
4119
4154
|
throw new Error("Cannot process graph while already processing");
|
|
4120
4155
|
}
|
|
4121
4156
|
try {
|
|
4122
|
-
this.#initializeGraphRun(context, inputs, contextValues);
|
|
4123
|
-
await this.#loadProjectReferences();
|
|
4124
|
-
this.#prepareNodeProcessContextBase();
|
|
4157
|
+
this.#profileRuntimeSync("initializeGraphRun", () => this.#initializeGraphRun(context, inputs, contextValues));
|
|
4158
|
+
await this.#profileRuntimeAsync("loadProjectReferences", () => this.#loadProjectReferences());
|
|
4159
|
+
this.#profileRuntimeSync("prepareNodeProcessContextBase", () => this.#prepareNodeProcessContextBase());
|
|
4125
4160
|
const shouldUseSeededExecutionPlan = this.#seededExecutionPlanForNextRun() != null;
|
|
4126
4161
|
this.#useSeededExecutionPlanOnNextRun = false;
|
|
4127
4162
|
if (!shouldUseSeededExecutionPlan) {
|
|
4128
4163
|
this.#preprocessGraph();
|
|
4129
4164
|
}
|
|
4130
|
-
await this.#emitGraphStart();
|
|
4131
|
-
await this.#emitPreloadedNodeResults();
|
|
4132
|
-
await this.#waitUntilUnpaused();
|
|
4165
|
+
await this.#profileRuntimeAsync("emitGraphStart", () => this.#emitGraphStart());
|
|
4166
|
+
await this.#profileRuntimeAsync("emitPreloadedNodeResults", () => this.#emitPreloadedNodeResults());
|
|
4167
|
+
await this.#profileRuntimeAsync("waitUntilUnpaused", () => this.#waitUntilUnpaused());
|
|
4133
4168
|
if (this.#canUseFastAcyclicScheduler()) {
|
|
4134
|
-
await this.#processFastAcyclicGraph();
|
|
4169
|
+
await this.#profileRuntimeAsync("processFastAcyclicGraph", () => this.#processFastAcyclicGraph());
|
|
4135
4170
|
} else {
|
|
4136
|
-
await this.#
|
|
4137
|
-
await this.#processingQueue.onIdle();
|
|
4138
|
-
this.#markUnqueuedNodesIgnored();
|
|
4171
|
+
await this.#profileRuntimeAsync("processCompatibleGraph", () => this.#processCompatibleGraph());
|
|
4139
4172
|
}
|
|
4140
|
-
await this.#throwIfGraphErrored();
|
|
4141
|
-
return await this.#finalizeGraphRun();
|
|
4173
|
+
await this.#profileRuntimeAsync("throwIfGraphErrored", () => this.#throwIfGraphErrored());
|
|
4174
|
+
return await this.#profileRuntimeAsync("finalizeGraphRun", () => this.#finalizeGraphRun());
|
|
4142
4175
|
} finally {
|
|
4143
4176
|
this.#running = false;
|
|
4144
4177
|
this.#cleanupTokenizerErrorListener();
|
|
4145
|
-
await this.#emitFinishIfNeeded();
|
|
4178
|
+
await this.#profileRuntimeAsync("emitFinish", () => this.#emitFinishIfNeeded());
|
|
4146
4179
|
}
|
|
4147
4180
|
}
|
|
4148
4181
|
async #emitFinishIfNeeded() {
|
|
@@ -4256,6 +4289,11 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
4256
4289
|
});
|
|
4257
4290
|
}
|
|
4258
4291
|
}
|
|
4292
|
+
async #processCompatibleGraph() {
|
|
4293
|
+
await this.#queueStartNodes(getStartNodes(this.#executionState, this.#graph.nodes, this.runToNodeIds));
|
|
4294
|
+
await this.#processingQueue.onIdle();
|
|
4295
|
+
this.#markUnqueuedNodesIgnored();
|
|
4296
|
+
}
|
|
4259
4297
|
#canUseFastAcyclicScheduler() {
|
|
4260
4298
|
if (this.#scheduler !== "fast-acyclic") {
|
|
4261
4299
|
return false;
|
|
@@ -4277,14 +4315,29 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
4277
4315
|
});
|
|
4278
4316
|
}
|
|
4279
4317
|
async #processFastAcyclicGraph() {
|
|
4318
|
+
const relevantNodeIds = /* @__PURE__ */ new Set();
|
|
4319
|
+
const nodesToVisit = [...getStartNodes(this.#executionState, this.#graph.nodes)];
|
|
4320
|
+
for (let index = 0; index < nodesToVisit.length; index += 1) {
|
|
4321
|
+
const node = nodesToVisit[index];
|
|
4322
|
+
if (relevantNodeIds.has(node.id)) {
|
|
4323
|
+
continue;
|
|
4324
|
+
}
|
|
4325
|
+
relevantNodeIds.add(node.id);
|
|
4326
|
+
nodesToVisit.push(...getInputNodesTo(this.#executionState, node));
|
|
4327
|
+
}
|
|
4328
|
+
const inputNodeIdsByNode = /* @__PURE__ */ new Map();
|
|
4280
4329
|
const remainingInputsByNode = /* @__PURE__ */ new Map();
|
|
4281
4330
|
const readyNodes = [];
|
|
4282
4331
|
const queuedNodeIds = /* @__PURE__ */ new Set();
|
|
4283
4332
|
for (const node of this.#graph.nodes) {
|
|
4333
|
+
if (!relevantNodeIds.has(node.id)) {
|
|
4334
|
+
continue;
|
|
4335
|
+
}
|
|
4284
4336
|
const inputNodeIds = /* @__PURE__ */ new Set();
|
|
4285
4337
|
for (const inputNode of getInputNodesTo(this.#executionState, node)) {
|
|
4286
4338
|
inputNodeIds.add(inputNode.id);
|
|
4287
4339
|
}
|
|
4340
|
+
inputNodeIdsByNode.set(node.id, inputNodeIds);
|
|
4288
4341
|
const inputCount = inputNodeIds.size;
|
|
4289
4342
|
remainingInputsByNode.set(node.id, inputCount);
|
|
4290
4343
|
if (inputCount === 0) {
|
|
@@ -4295,8 +4348,12 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
4295
4348
|
await new Promise((resolve, reject) => {
|
|
4296
4349
|
let activeCount = 0;
|
|
4297
4350
|
let settled = false;
|
|
4298
|
-
const queueReadyOutputs = (outputNodes) => {
|
|
4351
|
+
const queueReadyOutputs = (node, outputNodes) => {
|
|
4352
|
+
var _a;
|
|
4299
4353
|
for (const outputNode of outputNodes) {
|
|
4354
|
+
if (!relevantNodeIds.has(outputNode.id) || !((_a = inputNodeIdsByNode.get(outputNode.id)) == null ? void 0 : _a.has(node.id))) {
|
|
4355
|
+
continue;
|
|
4356
|
+
}
|
|
4300
4357
|
const remainingInputs = (remainingInputsByNode.get(outputNode.id) ?? 0) - 1;
|
|
4301
4358
|
remainingInputsByNode.set(outputNode.id, remainingInputs);
|
|
4302
4359
|
if (remainingInputs <= 0 && !queuedNodeIds.has(outputNode.id)) {
|
|
@@ -4321,7 +4378,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
4321
4378
|
while (activeCount < this.#concurrency.nodeConcurrency && readyNodes.length > 0) {
|
|
4322
4379
|
const node = readyNodes.shift();
|
|
4323
4380
|
activeCount += 1;
|
|
4324
|
-
void this.#processNodeIfAllInputsAvailable(node, { queueOutputNodes: false }).then(queueReadyOutputs).then(() => {
|
|
4381
|
+
void this.#processNodeIfAllInputsAvailable(node, { queueOutputNodes: false }).then((outputNodes) => queueReadyOutputs(node, outputNodes)).then(() => {
|
|
4325
4382
|
activeCount -= 1;
|
|
4326
4383
|
pump();
|
|
4327
4384
|
settle();
|
|
@@ -4450,48 +4507,57 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4450
4507
|
}
|
|
4451
4508
|
async #fetchNodeDataAndProcessNode(node) {
|
|
4452
4509
|
var _a;
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4510
|
+
const profileStart = this.#startRuntimeProfile();
|
|
4511
|
+
try {
|
|
4512
|
+
if (this.#currentlyProcessing.has(node.id) || this.#queuedNodes.has(node.id)) {
|
|
4513
|
+
return;
|
|
4514
|
+
}
|
|
4515
|
+
if (this.#nodeResults.has(node.id) || this.#erroredNodes.has(node.id)) {
|
|
4516
|
+
return;
|
|
4517
|
+
}
|
|
4518
|
+
const inputNodesProfileStart = this.#startRuntimeProfile();
|
|
4519
|
+
const inputNodes = getInputNodesTo(this.#executionState, node);
|
|
4520
|
+
this.#finishRuntimeProfile("getInputNodesTo", inputNodesProfileStart);
|
|
4521
|
+
if (this.#hasErroredInputNode(node, inputNodes)) {
|
|
4522
|
+
return;
|
|
4523
|
+
}
|
|
4524
|
+
this.#emitTraceEvent(`Node ${node.title} has input nodes: ${inputNodes.map((n) => n.title).join(", ")}`);
|
|
4525
|
+
const attachedData = this.#getAttachedDataTo(node);
|
|
4526
|
+
if (node.type === "raceInputs" || attachedData.races) {
|
|
4527
|
+
for (const inputNode of inputNodes) {
|
|
4528
|
+
const inputNodeAttachedData = this.#getAttachedDataTo(inputNode);
|
|
4529
|
+
const raceIds = /* @__PURE__ */ new Set([...((_a = attachedData.races) == null ? void 0 : _a.raceIds) ?? []]);
|
|
4530
|
+
if (node.type === "raceInputs") {
|
|
4531
|
+
raceIds.add(`race-${node.id}`);
|
|
4532
|
+
}
|
|
4533
|
+
inputNodeAttachedData.races = {
|
|
4534
|
+
propagate: false,
|
|
4535
|
+
raceIds: [...raceIds],
|
|
4536
|
+
completed: false
|
|
4537
|
+
};
|
|
4471
4538
|
}
|
|
4472
|
-
inputNodeAttachedData.races = {
|
|
4473
|
-
propagate: false,
|
|
4474
|
-
raceIds: [...raceIds],
|
|
4475
|
-
completed: false
|
|
4476
|
-
};
|
|
4477
4539
|
}
|
|
4540
|
+
this.#queuedNodes.add(node.id);
|
|
4541
|
+
void this.#processingQueue.addAll(
|
|
4542
|
+
inputNodes.map((inputNode) => {
|
|
4543
|
+
return async () => {
|
|
4544
|
+
this.#emitTraceEvent(`Fetching required data for node ${inputNode.title} (${inputNode.id})`);
|
|
4545
|
+
await this.#fetchNodeDataAndProcessNode(inputNode);
|
|
4546
|
+
};
|
|
4547
|
+
})
|
|
4548
|
+
);
|
|
4549
|
+
await this.#processNodeIfAllInputsAvailable(node);
|
|
4550
|
+
} finally {
|
|
4551
|
+
this.#finishRuntimeProfile("fetchNodeDataAndProcessNode", profileStart);
|
|
4478
4552
|
}
|
|
4479
|
-
this.#queuedNodes.add(node.id);
|
|
4480
|
-
void this.#processingQueue.addAll(
|
|
4481
|
-
inputNodes.map((inputNode) => {
|
|
4482
|
-
return async () => {
|
|
4483
|
-
this.#emitTraceEvent(`Fetching required data for node ${inputNode.title} (${inputNode.id})`);
|
|
4484
|
-
await this.#fetchNodeDataAndProcessNode(inputNode);
|
|
4485
|
-
};
|
|
4486
|
-
})
|
|
4487
|
-
);
|
|
4488
|
-
await this.#processNodeIfAllInputsAvailable(node);
|
|
4489
4553
|
}
|
|
4490
4554
|
/** If all inputs are present, all conditions met, processes the node. */
|
|
4491
4555
|
async #processNodeIfAllInputsAvailable(node, options2 = {}) {
|
|
4492
4556
|
const { queueOutputNodes = true } = options2;
|
|
4493
4557
|
const builtInNode = node;
|
|
4558
|
+
const inputNodesProfileStart = this.#startRuntimeProfile();
|
|
4494
4559
|
const inputNodes = getInputNodesTo(this.#executionState, node);
|
|
4560
|
+
this.#finishRuntimeProfile("getInputNodesTo", inputNodesProfileStart);
|
|
4495
4561
|
if (this.#shouldSkipNodeProcessing(node, inputNodes)) {
|
|
4496
4562
|
return [];
|
|
4497
4563
|
}
|
|
@@ -4499,7 +4565,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4499
4565
|
if (this.#shouldSkipCompletedRaceNode(node, attachedData)) {
|
|
4500
4566
|
return [];
|
|
4501
4567
|
}
|
|
4568
|
+
const inputValuesProfileStart = this.#startRuntimeProfile();
|
|
4502
4569
|
const inputValues = this.#getInputValuesForNode(node);
|
|
4570
|
+
this.#finishRuntimeProfile("getInputValuesForNode", inputValuesProfileStart);
|
|
4503
4571
|
const loopExclusion = this.#excludedDueToControlFlow(
|
|
4504
4572
|
node,
|
|
4505
4573
|
inputValues,
|
|
@@ -4530,7 +4598,13 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4530
4598
|
if (this.#beginNodeProcessing(node, attachedData) === false) {
|
|
4531
4599
|
return [];
|
|
4532
4600
|
}
|
|
4533
|
-
const
|
|
4601
|
+
const processProfileStart = this.#startRuntimeProfile();
|
|
4602
|
+
let processResult;
|
|
4603
|
+
try {
|
|
4604
|
+
processResult = await this.#processNode(node);
|
|
4605
|
+
} finally {
|
|
4606
|
+
this.#finishRuntimeProfile("nodeDispatch", processProfileStart);
|
|
4607
|
+
}
|
|
4534
4608
|
const { processId } = processResult;
|
|
4535
4609
|
if (this.slowMode) {
|
|
4536
4610
|
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
@@ -4539,7 +4613,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4539
4613
|
this.#visitedNodes.add(node.id);
|
|
4540
4614
|
this.#currentlyProcessing.delete(node.id);
|
|
4541
4615
|
this.#remainingNodes.delete(node.id);
|
|
4616
|
+
const outputNodesProfileStart = this.#startRuntimeProfile();
|
|
4542
4617
|
const outputNodes = getOutputNodesFrom(this.#executionState, node);
|
|
4618
|
+
this.#finishRuntimeProfile("getOutputNodesFrom", outputNodesProfileStart);
|
|
4543
4619
|
this.#handleLoopControllerPostProcess(node, attachedData);
|
|
4544
4620
|
this.#handleCompletedRace(node);
|
|
4545
4621
|
const childLoopInfoError = this.#assignChildLoopInfo(node, builtInNode, attachedData);
|
|
@@ -4549,7 +4625,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4549
4625
|
}
|
|
4550
4626
|
this.#propagateAttachedDataToOutputNodes(node, attachedData, outputNodes.connectionsToNodes);
|
|
4551
4627
|
if (queueOutputNodes && processResult.shouldQueueOutputNodes) {
|
|
4628
|
+
const queueOutputsProfileStart = this.#startRuntimeProfile();
|
|
4552
4629
|
this.#queueOutputNodes(node, outputNodes.nodes);
|
|
4630
|
+
this.#finishRuntimeProfile("queueOutputNodes", queueOutputsProfileStart);
|
|
4553
4631
|
}
|
|
4554
4632
|
return processResult.shouldQueueOutputNodes ? outputNodes.nodes : [];
|
|
4555
4633
|
}
|
|
@@ -4750,7 +4828,9 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4750
4828
|
});
|
|
4751
4829
|
}
|
|
4752
4830
|
async #processNormalNode(node, processId) {
|
|
4831
|
+
const inputValuesProfileStart = this.#startRuntimeProfile();
|
|
4753
4832
|
const inputValues = this.#getInputValuesForNode(node);
|
|
4833
|
+
this.#finishRuntimeProfile("getInputValuesForNode", inputValuesProfileStart);
|
|
4754
4834
|
if (this.#excludedDueToControlFlow(node, inputValues, processId)) {
|
|
4755
4835
|
return;
|
|
4756
4836
|
}
|
|
@@ -4911,6 +4991,7 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4911
4991
|
if (this.#abortController.signal.aborted) {
|
|
4912
4992
|
nodeAbortController.abort(getAbortSignalReason(this.#abortController.signal));
|
|
4913
4993
|
}
|
|
4994
|
+
const createContextProfileStart = this.#startRuntimeProfile();
|
|
4914
4995
|
const context = this.#createNodeProcessContext(
|
|
4915
4996
|
node,
|
|
4916
4997
|
inputValues,
|
|
@@ -4919,10 +5000,16 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4919
5000
|
nodeAbortController,
|
|
4920
5001
|
partialOutput
|
|
4921
5002
|
);
|
|
5003
|
+
this.#finishRuntimeProfile("createNodeProcessContext", createContextProfileStart);
|
|
4922
5004
|
let results;
|
|
4923
5005
|
try {
|
|
4924
5006
|
await this.#waitUntilUnpaused();
|
|
4925
|
-
|
|
5007
|
+
const implementationProfileStart = this.#startRuntimeProfile();
|
|
5008
|
+
try {
|
|
5009
|
+
results = await instance.process(inputValues, context);
|
|
5010
|
+
} finally {
|
|
5011
|
+
this.#finishRuntimeProfile("nodeImplementation", implementationProfileStart);
|
|
5012
|
+
}
|
|
4926
5013
|
} finally {
|
|
4927
5014
|
this.#unregisterNodeAbortController(node.id, nodeAbortController);
|
|
4928
5015
|
}
|
|
@@ -4996,15 +5083,22 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
4996
5083
|
const subprocessorProject = project ?? this.#project;
|
|
4997
5084
|
const subprocessorGraph = resolveProcessorGraph(subprocessorProject, subGraphId);
|
|
4998
5085
|
const initialExecutionPlan = subprocessorGraph && this.#canUseRuntimeExecutionPlanCacheFor(subprocessorProject, true) ? (_b = (_a = this.#runtimeCache) == null ? void 0 : _a.executionPlans) == null ? void 0 : _b.get(subprocessorGraph) : void 0;
|
|
4999
|
-
const
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5086
|
+
const createProfileStart = this.#startRuntimeProfile();
|
|
5087
|
+
let processor;
|
|
5088
|
+
try {
|
|
5089
|
+
processor = new _GraphProcessor(subprocessorProject, subGraphId, this.#registry, this.#includeTrace, {
|
|
5090
|
+
cacheLoadedProjects: this.#cacheLoadedProjects,
|
|
5091
|
+
captureNodeTimings: this.#captureNodeTimings,
|
|
5092
|
+
concurrency: this.#concurrency,
|
|
5093
|
+
executionPlanCacheMode: this.#executionPlanCacheMode,
|
|
5094
|
+
initialExecutionPlan,
|
|
5095
|
+
runtimeCache: this.#runtimeCache,
|
|
5096
|
+
runtimeProfiler: this.#runtimeProfiler,
|
|
5097
|
+
scheduler: this.#scheduler
|
|
5098
|
+
});
|
|
5099
|
+
} finally {
|
|
5100
|
+
this.#finishRuntimeProfile("createSubProcessor", createProfileStart);
|
|
5101
|
+
}
|
|
5008
5102
|
processor.executor = this.executor;
|
|
5009
5103
|
processor.#isSubProcessor = true;
|
|
5010
5104
|
processor.#executionCache = this.#executionCache;
|
|
@@ -5018,32 +5112,42 @@ ${erroredNodes.map(([nodeId]) => `- ${this.#nodesById[nodeId].title} (${nodeId})
|
|
|
5018
5112
|
index,
|
|
5019
5113
|
processId
|
|
5020
5114
|
};
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5115
|
+
const wireEventsProfileStart = this.#startRuntimeProfile();
|
|
5116
|
+
try {
|
|
5117
|
+
wireSubprocessorEvents(processor, this.#emitter, {
|
|
5118
|
+
isPaused: () => this.#isPaused,
|
|
5119
|
+
pause: () => {
|
|
5120
|
+
void this.pause();
|
|
5121
|
+
},
|
|
5122
|
+
resume: () => {
|
|
5123
|
+
void this.resume();
|
|
5124
|
+
}
|
|
5125
|
+
});
|
|
5126
|
+
} finally {
|
|
5127
|
+
this.#finishRuntimeProfile("wireSubProcessorEvents", wireEventsProfileStart);
|
|
5128
|
+
}
|
|
5030
5129
|
this.#subprocessors.add(processor);
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
this.
|
|
5036
|
-
|
|
5037
|
-
this.
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
this.
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5130
|
+
const wireLifecycleProfileStart = this.#startRuntimeProfile();
|
|
5131
|
+
try {
|
|
5132
|
+
wireSubprocessorLifecycle(processor, {
|
|
5133
|
+
signal,
|
|
5134
|
+
parentAbortSignal: this.#abortController.signal,
|
|
5135
|
+
onParentPause: (listener) => {
|
|
5136
|
+
this.on("pause", listener);
|
|
5137
|
+
return () => {
|
|
5138
|
+
this.off("pause", listener);
|
|
5139
|
+
};
|
|
5140
|
+
},
|
|
5141
|
+
onParentResume: (listener) => {
|
|
5142
|
+
this.on("resume", listener);
|
|
5143
|
+
return () => {
|
|
5144
|
+
this.off("resume", listener);
|
|
5145
|
+
};
|
|
5146
|
+
}
|
|
5147
|
+
});
|
|
5148
|
+
} finally {
|
|
5149
|
+
this.#finishRuntimeProfile("wireSubProcessorLifecycle", wireLifecycleProfileStart);
|
|
5150
|
+
}
|
|
5047
5151
|
return processor;
|
|
5048
5152
|
}
|
|
5049
5153
|
async #requestUserInput(node, inputStrings, inputValues, renderingType, processId) {
|
|
@@ -15735,7 +15839,7 @@ var coalesceNode = nodeDefinition(CoalesceNodeImpl, "Coalesce");
|
|
|
15735
15839
|
|
|
15736
15840
|
// src/model/nodes/DidRunNode.ts
|
|
15737
15841
|
var import_non_secure34 = require("nanoid/non-secure");
|
|
15738
|
-
var
|
|
15842
|
+
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.';
|
|
15739
15843
|
var DidRunNodeImpl = class extends NodeImpl {
|
|
15740
15844
|
static create() {
|
|
15741
15845
|
return {
|
|
@@ -15746,7 +15850,7 @@ var DidRunNodeImpl = class extends NodeImpl {
|
|
|
15746
15850
|
visualData: {
|
|
15747
15851
|
x: 0,
|
|
15748
15852
|
y: 0,
|
|
15749
|
-
width:
|
|
15853
|
+
width: 167
|
|
15750
15854
|
}
|
|
15751
15855
|
};
|
|
15752
15856
|
}
|
|
@@ -15773,16 +15877,20 @@ var DidRunNodeImpl = class extends NodeImpl {
|
|
|
15773
15877
|
}
|
|
15774
15878
|
static getUIData() {
|
|
15775
15879
|
return {
|
|
15776
|
-
infoBoxBody:
|
|
15777
|
-
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.
|
|
15778
|
-
`,
|
|
15880
|
+
infoBoxBody: DID_RUN_EXPLANATION,
|
|
15779
15881
|
infoBoxTitle: "Did Run Node",
|
|
15780
15882
|
contextMenuTitle: "Did Run",
|
|
15781
15883
|
group: ["Logic"]
|
|
15782
15884
|
};
|
|
15783
15885
|
}
|
|
15784
|
-
|
|
15785
|
-
return
|
|
15886
|
+
getEditors() {
|
|
15887
|
+
return [
|
|
15888
|
+
{
|
|
15889
|
+
type: "info",
|
|
15890
|
+
label: "Behavior",
|
|
15891
|
+
helperMessage: DID_RUN_EXPLANATION
|
|
15892
|
+
}
|
|
15893
|
+
];
|
|
15786
15894
|
}
|
|
15787
15895
|
#getInputPortCount(connections) {
|
|
15788
15896
|
const inputNodeId = this.chartNode.id;
|
|
@@ -15820,7 +15928,7 @@ var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
|
15820
15928
|
|
|
15821
15929
|
// src/model/nodes/PassthroughNode.ts
|
|
15822
15930
|
var import_non_secure35 = require("nanoid/non-secure");
|
|
15823
|
-
var
|
|
15931
|
+
var import_ts_dedent32 = require("ts-dedent");
|
|
15824
15932
|
var PassthroughNodeImpl = class extends NodeImpl {
|
|
15825
15933
|
static create = () => {
|
|
15826
15934
|
const chartNode = {
|
|
@@ -15862,7 +15970,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
15862
15970
|
}
|
|
15863
15971
|
static getUIData() {
|
|
15864
15972
|
return {
|
|
15865
|
-
infoBoxBody:
|
|
15973
|
+
infoBoxBody: import_ts_dedent32.dedent`
|
|
15866
15974
|
Simply passes the input value to the output without any modifications.
|
|
15867
15975
|
`,
|
|
15868
15976
|
infoBoxTitle: "Passthrough Node",
|
|
@@ -15898,7 +16006,7 @@ var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
|
15898
16006
|
|
|
15899
16007
|
// src/model/nodes/PopNode.ts
|
|
15900
16008
|
var import_non_secure36 = require("nanoid/non-secure");
|
|
15901
|
-
var
|
|
16009
|
+
var import_ts_dedent33 = require("ts-dedent");
|
|
15902
16010
|
var PopNodeImpl = class extends NodeImpl {
|
|
15903
16011
|
static create() {
|
|
15904
16012
|
const baseNode = {
|
|
@@ -15949,7 +16057,7 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
15949
16057
|
}
|
|
15950
16058
|
static getUIData() {
|
|
15951
16059
|
return {
|
|
15952
|
-
infoBoxBody:
|
|
16060
|
+
infoBoxBody: import_ts_dedent33.dedent`
|
|
15953
16061
|
Pops the last value off the input array and outputs the new array and the popped value.
|
|
15954
16062
|
|
|
15955
16063
|
Can also be used to just extract the last value from an array.
|
|
@@ -15986,7 +16094,7 @@ var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
|
15986
16094
|
|
|
15987
16095
|
// src/model/nodes/SetGlobalNode.ts
|
|
15988
16096
|
var import_non_secure37 = require("nanoid/non-secure");
|
|
15989
|
-
var
|
|
16097
|
+
var import_ts_dedent34 = require("ts-dedent");
|
|
15990
16098
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
15991
16099
|
static create() {
|
|
15992
16100
|
const chartNode = {
|
|
@@ -16060,14 +16168,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
16060
16168
|
];
|
|
16061
16169
|
}
|
|
16062
16170
|
getBody() {
|
|
16063
|
-
return
|
|
16171
|
+
return import_ts_dedent34.dedent`
|
|
16064
16172
|
${this.data.id}
|
|
16065
16173
|
Type: ${this.data.dataType}
|
|
16066
16174
|
`;
|
|
16067
16175
|
}
|
|
16068
16176
|
static getUIData() {
|
|
16069
16177
|
return {
|
|
16070
|
-
infoBoxBody:
|
|
16178
|
+
infoBoxBody: import_ts_dedent34.dedent`
|
|
16071
16179
|
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.
|
|
16072
16180
|
`,
|
|
16073
16181
|
infoBoxTitle: "Set Global Node",
|
|
@@ -16103,7 +16211,7 @@ var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
|
16103
16211
|
|
|
16104
16212
|
// src/model/nodes/GetGlobalNode.ts
|
|
16105
16213
|
var import_non_secure38 = require("nanoid/non-secure");
|
|
16106
|
-
var
|
|
16214
|
+
var import_ts_dedent35 = require("ts-dedent");
|
|
16107
16215
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
16108
16216
|
static create() {
|
|
16109
16217
|
const chartNode = {
|
|
@@ -16187,7 +16295,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
16187
16295
|
];
|
|
16188
16296
|
}
|
|
16189
16297
|
getBody() {
|
|
16190
|
-
return
|
|
16298
|
+
return import_ts_dedent35.dedent`
|
|
16191
16299
|
${this.data.useIdInput ? "(ID from input)" : this.data.id}
|
|
16192
16300
|
Type: ${this.data.dataType}
|
|
16193
16301
|
${this.data.wait ? "Waits for available data" : ""}
|
|
@@ -16195,7 +16303,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
16195
16303
|
}
|
|
16196
16304
|
static getUIData() {
|
|
16197
16305
|
return {
|
|
16198
|
-
infoBoxBody:
|
|
16306
|
+
infoBoxBody: import_ts_dedent35.dedent`
|
|
16199
16307
|
Retrieves a global value that is shared across all graphs and subgraphs. The id of the global value is configured in this node.
|
|
16200
16308
|
`,
|
|
16201
16309
|
infoBoxTitle: "Get Global Node",
|
|
@@ -16244,7 +16352,7 @@ var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
|
16244
16352
|
|
|
16245
16353
|
// src/model/nodes/WaitForEventNode.ts
|
|
16246
16354
|
var import_non_secure39 = require("nanoid/non-secure");
|
|
16247
|
-
var
|
|
16355
|
+
var import_ts_dedent36 = require("ts-dedent");
|
|
16248
16356
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
16249
16357
|
static create() {
|
|
16250
16358
|
return {
|
|
@@ -16303,7 +16411,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
16303
16411
|
}
|
|
16304
16412
|
static getUIData() {
|
|
16305
16413
|
return {
|
|
16306
|
-
infoBoxBody:
|
|
16414
|
+
infoBoxBody: import_ts_dedent36.dedent`
|
|
16307
16415
|
Waits for a specific event to be raised by a 'Raise Event' node or the host project. The event name can be configured.
|
|
16308
16416
|
`,
|
|
16309
16417
|
infoBoxTitle: "Wait For Event Node",
|
|
@@ -16324,7 +16432,7 @@ var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
|
16324
16432
|
|
|
16325
16433
|
// src/model/nodes/ToolNode.ts
|
|
16326
16434
|
var import_non_secure40 = require("nanoid/non-secure");
|
|
16327
|
-
var
|
|
16435
|
+
var import_ts_dedent37 = require("ts-dedent");
|
|
16328
16436
|
var GptFunctionNodeImpl = class extends NodeImpl {
|
|
16329
16437
|
static create() {
|
|
16330
16438
|
const chartNode = {
|
|
@@ -16339,7 +16447,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
16339
16447
|
data: {
|
|
16340
16448
|
name: "newTool",
|
|
16341
16449
|
description: "No description provided",
|
|
16342
|
-
schema:
|
|
16450
|
+
schema: import_ts_dedent37.dedent`
|
|
16343
16451
|
{
|
|
16344
16452
|
"type": "object",
|
|
16345
16453
|
"properties": {}
|
|
@@ -16446,7 +16554,7 @@ ${this.data.description}`
|
|
|
16446
16554
|
}
|
|
16447
16555
|
static getUIData() {
|
|
16448
16556
|
return {
|
|
16449
|
-
infoBoxBody:
|
|
16557
|
+
infoBoxBody: import_ts_dedent37.dedent`
|
|
16450
16558
|
Defines a tool, which is a method that the LLM can call in its responses.
|
|
16451
16559
|
`,
|
|
16452
16560
|
infoBoxTitle: "Tool Node",
|
|
@@ -16491,7 +16599,7 @@ var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
|
16491
16599
|
// src/model/nodes/ToYamlNode.ts
|
|
16492
16600
|
var import_non_secure41 = require("nanoid/non-secure");
|
|
16493
16601
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
16494
|
-
var
|
|
16602
|
+
var import_ts_dedent38 = require("ts-dedent");
|
|
16495
16603
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
16496
16604
|
static create() {
|
|
16497
16605
|
const chartNode = {
|
|
@@ -16528,7 +16636,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
16528
16636
|
}
|
|
16529
16637
|
static getUIData() {
|
|
16530
16638
|
return {
|
|
16531
|
-
infoBoxBody:
|
|
16639
|
+
infoBoxBody: import_ts_dedent38.dedent`
|
|
16532
16640
|
Turns the input object into YAML text.
|
|
16533
16641
|
`,
|
|
16534
16642
|
infoBoxTitle: "To YAML Node",
|
|
@@ -16554,7 +16662,7 @@ var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
|
16554
16662
|
|
|
16555
16663
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
16556
16664
|
var import_non_secure42 = require("nanoid/non-secure");
|
|
16557
|
-
var
|
|
16665
|
+
var import_ts_dedent39 = require("ts-dedent");
|
|
16558
16666
|
|
|
16559
16667
|
// src/integrations/integrations.ts
|
|
16560
16668
|
var registeredIntegrations = {
|
|
@@ -16661,7 +16769,7 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
16661
16769
|
}
|
|
16662
16770
|
static getUIData() {
|
|
16663
16771
|
return {
|
|
16664
|
-
infoBoxBody:
|
|
16772
|
+
infoBoxBody: import_ts_dedent39.dedent`
|
|
16665
16773
|
Gets a OpenAI vector embedding for the input text provided.
|
|
16666
16774
|
|
|
16667
16775
|
Can be used with the Vector Store and Vector KNN nodes.
|
|
@@ -16693,7 +16801,7 @@ var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
|
16693
16801
|
|
|
16694
16802
|
// src/model/nodes/VectorStoreNode.ts
|
|
16695
16803
|
var import_non_secure43 = require("nanoid/non-secure");
|
|
16696
|
-
var
|
|
16804
|
+
var import_ts_dedent40 = require("ts-dedent");
|
|
16697
16805
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
16698
16806
|
static create() {
|
|
16699
16807
|
return {
|
|
@@ -16773,14 +16881,14 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
16773
16881
|
];
|
|
16774
16882
|
}
|
|
16775
16883
|
getBody() {
|
|
16776
|
-
return
|
|
16884
|
+
return import_ts_dedent40.dedent`
|
|
16777
16885
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
16778
16886
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
16779
16887
|
`;
|
|
16780
16888
|
}
|
|
16781
16889
|
static getUIData() {
|
|
16782
16890
|
return {
|
|
16783
|
-
infoBoxBody:
|
|
16891
|
+
infoBoxBody: import_ts_dedent40.dedent`
|
|
16784
16892
|
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.
|
|
16785
16893
|
`,
|
|
16786
16894
|
infoBoxTitle: "Vector Store Node",
|
|
@@ -16816,7 +16924,7 @@ var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
|
16816
16924
|
|
|
16817
16925
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
16818
16926
|
var import_non_secure44 = require("nanoid/non-secure");
|
|
16819
|
-
var
|
|
16927
|
+
var import_ts_dedent41 = require("ts-dedent");
|
|
16820
16928
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
16821
16929
|
static create() {
|
|
16822
16930
|
return {
|
|
@@ -16903,7 +17011,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
16903
17011
|
];
|
|
16904
17012
|
}
|
|
16905
17013
|
getBody() {
|
|
16906
|
-
return
|
|
17014
|
+
return import_ts_dedent41.dedent`
|
|
16907
17015
|
Integration: ${this.data.useIntegrationInput ? "(using input)" : this.data.integration}
|
|
16908
17016
|
K: ${this.data.useKInput ? "(using input)" : this.data.k}
|
|
16909
17017
|
Collection Id: ${this.data.useCollectionIdInput ? "(using input)" : this.data.collectionId}
|
|
@@ -16911,7 +17019,7 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
16911
17019
|
}
|
|
16912
17020
|
static getUIData() {
|
|
16913
17021
|
return {
|
|
16914
|
-
infoBoxBody:
|
|
17022
|
+
infoBoxBody: import_ts_dedent41.dedent`
|
|
16915
17023
|
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.
|
|
16916
17024
|
`,
|
|
16917
17025
|
infoBoxTitle: "Vector KNN Node",
|
|
@@ -16944,7 +17052,7 @@ var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl,
|
|
|
16944
17052
|
var import_non_secure45 = require("nanoid/non-secure");
|
|
16945
17053
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
16946
17054
|
var import_ts_pattern4 = require("ts-pattern");
|
|
16947
|
-
var
|
|
17055
|
+
var import_ts_dedent42 = require("ts-dedent");
|
|
16948
17056
|
var { SHA256, SHA512, MD5, SHA1 } = crypto;
|
|
16949
17057
|
var HashNodeImpl = class extends NodeImpl {
|
|
16950
17058
|
static create() {
|
|
@@ -17002,7 +17110,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
17002
17110
|
}
|
|
17003
17111
|
static getUIData() {
|
|
17004
17112
|
return {
|
|
17005
|
-
infoBoxBody:
|
|
17113
|
+
infoBoxBody: import_ts_dedent42.dedent`
|
|
17006
17114
|
Computes a hash of the input value using the configured hash function.
|
|
17007
17115
|
`,
|
|
17008
17116
|
infoBoxTitle: "Hash Node",
|
|
@@ -17031,7 +17139,7 @@ var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
|
17031
17139
|
|
|
17032
17140
|
// src/model/nodes/AbortGraphNode.ts
|
|
17033
17141
|
var import_non_secure46 = require("nanoid/non-secure");
|
|
17034
|
-
var
|
|
17142
|
+
var import_ts_dedent43 = require("ts-dedent");
|
|
17035
17143
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
17036
17144
|
static create() {
|
|
17037
17145
|
const chartNode = {
|
|
@@ -17088,13 +17196,13 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
17088
17196
|
];
|
|
17089
17197
|
}
|
|
17090
17198
|
getBody() {
|
|
17091
|
-
return
|
|
17199
|
+
return import_ts_dedent43.dedent`
|
|
17092
17200
|
${this.data.useSuccessfullyInput ? "Success depends on input" : this.data.successfully ? "Successfully Abort" : this.data.errorMessage ? `Error Abort: ${this.data.errorMessage}` : "Error Abort"}
|
|
17093
17201
|
`;
|
|
17094
17202
|
}
|
|
17095
17203
|
static getUIData() {
|
|
17096
17204
|
return {
|
|
17097
|
-
infoBoxBody:
|
|
17205
|
+
infoBoxBody: import_ts_dedent43.dedent`
|
|
17098
17206
|
Aborts the execution of the entire graph immediately.
|
|
17099
17207
|
|
|
17100
17208
|
Can either "successfully" abort the graph (early-exit), or "error" abort the graph.
|
|
@@ -17120,7 +17228,7 @@ var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
|
17120
17228
|
|
|
17121
17229
|
// src/model/nodes/RaceInputsNode.ts
|
|
17122
17230
|
var import_non_secure47 = require("nanoid/non-secure");
|
|
17123
|
-
var
|
|
17231
|
+
var import_ts_dedent44 = require("ts-dedent");
|
|
17124
17232
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
17125
17233
|
static create() {
|
|
17126
17234
|
const chartNode = {
|
|
@@ -17176,7 +17284,7 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
17176
17284
|
}
|
|
17177
17285
|
static getUIData() {
|
|
17178
17286
|
return {
|
|
17179
|
-
infoBoxBody:
|
|
17287
|
+
infoBoxBody: import_ts_dedent44.dedent`
|
|
17180
17288
|
Takes in multiple inputs and outputs the value of the first one to finish. The other inputs are cancelled.
|
|
17181
17289
|
`,
|
|
17182
17290
|
infoBoxTitle: "Race Inputs Node",
|
|
@@ -17205,7 +17313,7 @@ var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
|
17205
17313
|
|
|
17206
17314
|
// src/model/nodes/ToJsonNode.ts
|
|
17207
17315
|
var import_non_secure48 = require("nanoid/non-secure");
|
|
17208
|
-
var
|
|
17316
|
+
var import_ts_dedent45 = require("ts-dedent");
|
|
17209
17317
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
17210
17318
|
static create() {
|
|
17211
17319
|
const chartNode = {
|
|
@@ -17256,7 +17364,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
17256
17364
|
}
|
|
17257
17365
|
static getUIData() {
|
|
17258
17366
|
return {
|
|
17259
|
-
infoBoxBody:
|
|
17367
|
+
infoBoxBody: import_ts_dedent45.dedent`
|
|
17260
17368
|
Turns the input value into its JSON equivalent (stringifies the value).
|
|
17261
17369
|
`,
|
|
17262
17370
|
infoBoxTitle: "To JSON Node",
|
|
@@ -17279,7 +17387,7 @@ var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
|
17279
17387
|
|
|
17280
17388
|
// src/model/nodes/JoinNode.ts
|
|
17281
17389
|
var import_non_secure49 = require("nanoid/non-secure");
|
|
17282
|
-
var
|
|
17390
|
+
var import_ts_dedent46 = require("ts-dedent");
|
|
17283
17391
|
var JoinNodeImpl = class extends NodeImpl {
|
|
17284
17392
|
static create = () => {
|
|
17285
17393
|
const chartNode = {
|
|
@@ -17361,7 +17469,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
17361
17469
|
}
|
|
17362
17470
|
static getUIData() {
|
|
17363
17471
|
return {
|
|
17364
|
-
infoBoxBody:
|
|
17472
|
+
infoBoxBody: import_ts_dedent46.dedent`
|
|
17365
17473
|
Takes an array of strings, and joins them using the configured delimiter.
|
|
17366
17474
|
|
|
17367
17475
|
Defaults to a newline.
|
|
@@ -17400,7 +17508,7 @@ var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
|
17400
17508
|
// src/model/nodes/FilterNode.ts
|
|
17401
17509
|
var import_non_secure50 = require("nanoid/non-secure");
|
|
17402
17510
|
var import_lodash_es11 = require("lodash");
|
|
17403
|
-
var
|
|
17511
|
+
var import_ts_dedent47 = require("ts-dedent");
|
|
17404
17512
|
var FilterNodeImpl = class extends NodeImpl {
|
|
17405
17513
|
static create() {
|
|
17406
17514
|
const chartNode = {
|
|
@@ -17443,7 +17551,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
17443
17551
|
}
|
|
17444
17552
|
static getUIData() {
|
|
17445
17553
|
return {
|
|
17446
|
-
infoBoxBody:
|
|
17554
|
+
infoBoxBody: import_ts_dedent47.dedent`
|
|
17447
17555
|
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.
|
|
17448
17556
|
`,
|
|
17449
17557
|
infoBoxTitle: "Filter Node",
|
|
@@ -17469,10 +17577,10 @@ var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
|
17469
17577
|
|
|
17470
17578
|
// src/model/nodes/JSFilterNode.ts
|
|
17471
17579
|
var import_non_secure51 = require("nanoid/non-secure");
|
|
17472
|
-
var
|
|
17580
|
+
var import_ts_dedent49 = require("ts-dedent");
|
|
17473
17581
|
|
|
17474
17582
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
17475
|
-
var
|
|
17583
|
+
var import_ts_dedent48 = require("ts-dedent");
|
|
17476
17584
|
var MAX_CALLBACK_PREVIEW_BODY_LINES = 13;
|
|
17477
17585
|
var JS_LIST_CALLBACK_SIGNATURE = "(item, index, array)";
|
|
17478
17586
|
var JS_LIST_CALLBACK_LOCAL_NAMES = /* @__PURE__ */ new Set(["item", "index", "array"]);
|
|
@@ -17499,7 +17607,7 @@ function getJSListInterpolationContext(callbackBody) {
|
|
|
17499
17607
|
});
|
|
17500
17608
|
}
|
|
17501
17609
|
function buildJSListRuntimePreamble(interpolationContext) {
|
|
17502
|
-
return
|
|
17610
|
+
return import_ts_dedent48.dedent`
|
|
17503
17611
|
const assertSynchronousCallbackResult = ${assertSynchronousCallbackResult.toString()};
|
|
17504
17612
|
${buildJsValueInputClonePreamble({
|
|
17505
17613
|
cacheIdentifier: JS_LIST_INPUT_CLONE_CACHE_IDENTIFIER,
|
|
@@ -17527,7 +17635,7 @@ function buildJSFilterWrapper(callbackBody) {
|
|
|
17527
17635
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
17528
17636
|
const { inputsIdentifier } = interpolationContext;
|
|
17529
17637
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, inputsIdentifier);
|
|
17530
|
-
return
|
|
17638
|
+
return import_ts_dedent48.dedent`
|
|
17531
17639
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
17532
17640
|
|
|
17533
17641
|
if (!Array.isArray(array)) {
|
|
@@ -17564,7 +17672,7 @@ function buildJSMapWrapper(callbackBody) {
|
|
|
17564
17672
|
const interpolationContext = getJSListInterpolationContext(callbackBody);
|
|
17565
17673
|
const { inputsIdentifier } = interpolationContext;
|
|
17566
17674
|
const callbackBodySource = buildJSListCallbackRuntimeSource(callbackBody, inputsIdentifier);
|
|
17567
|
-
return
|
|
17675
|
+
return import_ts_dedent48.dedent`
|
|
17568
17676
|
${buildJSListRuntimePreamble(interpolationContext)}
|
|
17569
17677
|
|
|
17570
17678
|
if (!Array.isArray(array)) {
|
|
@@ -17633,7 +17741,7 @@ function getJSListNodeBody(callbackBody) {
|
|
|
17633
17741
|
const previewBody = buildJsValuePreview(callbackBody, MAX_CALLBACK_PREVIEW_BODY_LINES);
|
|
17634
17742
|
return {
|
|
17635
17743
|
type: "colorized",
|
|
17636
|
-
text:
|
|
17744
|
+
text: import_ts_dedent48.dedent`
|
|
17637
17745
|
${JS_LIST_CALLBACK_SIGNATURE} => {
|
|
17638
17746
|
${indentLines(previewBody, " ")}
|
|
17639
17747
|
}
|
|
@@ -17713,7 +17821,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
17713
17821
|
}
|
|
17714
17822
|
static getUIData() {
|
|
17715
17823
|
return {
|
|
17716
|
-
infoBoxBody:
|
|
17824
|
+
infoBoxBody: import_ts_dedent49.dedent`
|
|
17717
17825
|
Filters an input array using the body of a JavaScript callback.
|
|
17718
17826
|
|
|
17719
17827
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -17740,7 +17848,7 @@ var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
|
17740
17848
|
|
|
17741
17849
|
// src/model/nodes/JSMapNode.ts
|
|
17742
17850
|
var import_non_secure52 = require("nanoid/non-secure");
|
|
17743
|
-
var
|
|
17851
|
+
var import_ts_dedent50 = require("ts-dedent");
|
|
17744
17852
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
17745
17853
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
17746
17854
|
static create() {
|
|
@@ -17779,7 +17887,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
17779
17887
|
}
|
|
17780
17888
|
static getUIData() {
|
|
17781
17889
|
return {
|
|
17782
|
-
infoBoxBody:
|
|
17890
|
+
infoBoxBody: import_ts_dedent50.dedent`
|
|
17783
17891
|
Maps an input array using the body of a JavaScript callback.
|
|
17784
17892
|
|
|
17785
17893
|
Available callback parameters are <code>item</code>, <code>index</code>, and <code>array</code>.
|
|
@@ -17806,7 +17914,7 @@ var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
|
17806
17914
|
|
|
17807
17915
|
// src/model/nodes/ObjectNode.ts
|
|
17808
17916
|
var import_non_secure53 = require("nanoid/non-secure");
|
|
17809
|
-
var
|
|
17917
|
+
var import_ts_dedent51 = require("ts-dedent");
|
|
17810
17918
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
17811
17919
|
"key": "{{input}}"
|
|
17812
17920
|
}`;
|
|
@@ -17904,7 +18012,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
17904
18012
|
}
|
|
17905
18013
|
static getUIData() {
|
|
17906
18014
|
return {
|
|
17907
|
-
infoBoxBody:
|
|
18015
|
+
infoBoxBody: import_ts_dedent51.dedent`
|
|
17908
18016
|
Creates an object from input values and a JSON template, escaping the input values and inserting them into the template.
|
|
17909
18017
|
|
|
17910
18018
|
Use double-quotes around the input values to escape them. String values are automatically escaped.
|
|
@@ -17992,7 +18100,7 @@ var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
|
17992
18100
|
|
|
17993
18101
|
// src/model/nodes/BooleanNode.ts
|
|
17994
18102
|
var import_non_secure54 = require("nanoid/non-secure");
|
|
17995
|
-
var
|
|
18103
|
+
var import_ts_dedent52 = require("ts-dedent");
|
|
17996
18104
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
17997
18105
|
static create() {
|
|
17998
18106
|
const chartNode = {
|
|
@@ -18036,7 +18144,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
18036
18144
|
}
|
|
18037
18145
|
static getUIData() {
|
|
18038
18146
|
return {
|
|
18039
|
-
infoBoxBody:
|
|
18147
|
+
infoBoxBody: import_ts_dedent52.dedent`
|
|
18040
18148
|
Outputs a boolean constant, or converts an input value into a boolean.
|
|
18041
18149
|
`,
|
|
18042
18150
|
infoBoxTitle: "Bool Node",
|
|
@@ -18060,7 +18168,7 @@ var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
|
18060
18168
|
var import_non_secure55 = require("nanoid/non-secure");
|
|
18061
18169
|
var import_lodash_es12 = require("lodash");
|
|
18062
18170
|
var import_ts_pattern5 = require("ts-pattern");
|
|
18063
|
-
var
|
|
18171
|
+
var import_ts_dedent53 = require("ts-dedent");
|
|
18064
18172
|
var CompareNodeImpl = class extends NodeImpl {
|
|
18065
18173
|
static create() {
|
|
18066
18174
|
const chartNode = {
|
|
@@ -18138,7 +18246,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
18138
18246
|
}
|
|
18139
18247
|
static getUIData() {
|
|
18140
18248
|
return {
|
|
18141
|
-
infoBoxBody:
|
|
18249
|
+
infoBoxBody: import_ts_dedent53.dedent`
|
|
18142
18250
|
Compares two values using the configured operator and outputs the result.
|
|
18143
18251
|
|
|
18144
18252
|
If the data types of the values do not match, then the B value is converted to the type of the A value.
|
|
@@ -18181,7 +18289,7 @@ var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
|
18181
18289
|
// src/model/nodes/EvaluateNode.ts
|
|
18182
18290
|
var import_non_secure56 = require("nanoid/non-secure");
|
|
18183
18291
|
var import_ts_pattern6 = require("ts-pattern");
|
|
18184
|
-
var
|
|
18292
|
+
var import_ts_dedent54 = require("ts-dedent");
|
|
18185
18293
|
var unaryOperation = ["abs", "negate"];
|
|
18186
18294
|
var isUnaryOp = (operation) => unaryOperation.includes(operation);
|
|
18187
18295
|
var EvaluateNodeImpl = class extends NodeImpl {
|
|
@@ -18267,7 +18375,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
18267
18375
|
}
|
|
18268
18376
|
static getUIData() {
|
|
18269
18377
|
return {
|
|
18270
|
-
infoBoxBody:
|
|
18378
|
+
infoBoxBody: import_ts_dedent54.dedent`
|
|
18271
18379
|
Evaluates the configured mathematical operation on the input values and outputs the result.
|
|
18272
18380
|
|
|
18273
18381
|
For more complex operations, you should use the \`Code\` node.
|
|
@@ -18304,7 +18412,7 @@ var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
|
18304
18412
|
|
|
18305
18413
|
// src/model/nodes/NumberNode.ts
|
|
18306
18414
|
var import_non_secure57 = require("nanoid/non-secure");
|
|
18307
|
-
var
|
|
18415
|
+
var import_ts_dedent55 = require("ts-dedent");
|
|
18308
18416
|
var NumberNodeImpl = class extends NodeImpl {
|
|
18309
18417
|
static create() {
|
|
18310
18418
|
const chartNode = {
|
|
@@ -18354,7 +18462,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
18354
18462
|
}
|
|
18355
18463
|
static getUIData() {
|
|
18356
18464
|
return {
|
|
18357
|
-
infoBoxBody:
|
|
18465
|
+
infoBoxBody: import_ts_dedent55.dedent`
|
|
18358
18466
|
Outputs a number constant, or converts an input value into a number.
|
|
18359
18467
|
|
|
18360
18468
|
Can be configured to round the number to a certain number of decimal places.
|
|
@@ -18382,7 +18490,7 @@ var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
|
18382
18490
|
|
|
18383
18491
|
// src/model/nodes/RandomNumberNode.ts
|
|
18384
18492
|
var import_non_secure58 = require("nanoid/non-secure");
|
|
18385
|
-
var
|
|
18493
|
+
var import_ts_dedent56 = require("ts-dedent");
|
|
18386
18494
|
var randomNumberTypeOptions = [
|
|
18387
18495
|
{ value: false, label: "Float" },
|
|
18388
18496
|
{ value: true, label: "Integer" }
|
|
@@ -18450,7 +18558,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
18450
18558
|
];
|
|
18451
18559
|
}
|
|
18452
18560
|
getBody() {
|
|
18453
|
-
return
|
|
18561
|
+
return import_ts_dedent56.dedent`
|
|
18454
18562
|
Min: ${this.data.useMinInput ? "(Input)" : this.data.min ?? 0}
|
|
18455
18563
|
Max: ${this.data.useMaxInput ? "(Input)" : this.data.max ?? 1}
|
|
18456
18564
|
${this.data.integers ? "Integers" : "Floats"}
|
|
@@ -18459,7 +18567,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
18459
18567
|
}
|
|
18460
18568
|
static getUIData() {
|
|
18461
18569
|
return {
|
|
18462
|
-
infoBoxBody:
|
|
18570
|
+
infoBoxBody: import_ts_dedent56.dedent`
|
|
18463
18571
|
Outputs a random number between the configured min and max values.
|
|
18464
18572
|
|
|
18465
18573
|
Can be configured to output only integers, and whether the max value is inclusive or exclusive.
|
|
@@ -18492,7 +18600,7 @@ var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
|
18492
18600
|
// src/model/nodes/ShuffleNode.ts
|
|
18493
18601
|
var import_non_secure59 = require("nanoid/non-secure");
|
|
18494
18602
|
var import_lodash_es13 = require("lodash");
|
|
18495
|
-
var
|
|
18603
|
+
var import_ts_dedent57 = require("ts-dedent");
|
|
18496
18604
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
18497
18605
|
static create() {
|
|
18498
18606
|
const chartNode = {
|
|
@@ -18528,7 +18636,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
18528
18636
|
}
|
|
18529
18637
|
static getUIData() {
|
|
18530
18638
|
return {
|
|
18531
|
-
infoBoxBody:
|
|
18639
|
+
infoBoxBody: import_ts_dedent57.dedent`
|
|
18532
18640
|
Shuffles the input array. Outputs the shuffled array.
|
|
18533
18641
|
`,
|
|
18534
18642
|
infoBoxTitle: "Shuffle Node",
|
|
@@ -18553,7 +18661,7 @@ var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
|
18553
18661
|
|
|
18554
18662
|
// src/model/nodes/CommentNode.ts
|
|
18555
18663
|
var import_non_secure60 = require("nanoid/non-secure");
|
|
18556
|
-
var
|
|
18664
|
+
var import_ts_dedent58 = require("ts-dedent");
|
|
18557
18665
|
var CommentNodeImpl = class extends NodeImpl {
|
|
18558
18666
|
static create() {
|
|
18559
18667
|
const chartNode = {
|
|
@@ -18605,7 +18713,7 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
18605
18713
|
}
|
|
18606
18714
|
static getUIData() {
|
|
18607
18715
|
return {
|
|
18608
|
-
infoBoxBody:
|
|
18716
|
+
infoBoxBody: import_ts_dedent58.dedent`
|
|
18609
18717
|
A comment node is a node that does nothing. It is useful for adding notes to a graph.
|
|
18610
18718
|
`,
|
|
18611
18719
|
infoBoxTitle: "Comment Node",
|
|
@@ -19388,7 +19496,7 @@ var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
|
19388
19496
|
|
|
19389
19497
|
// src/model/nodes/DelayNode.ts
|
|
19390
19498
|
var import_non_secure64 = require("nanoid/non-secure");
|
|
19391
|
-
var
|
|
19499
|
+
var import_ts_dedent59 = require("ts-dedent");
|
|
19392
19500
|
var DelayNodeImpl = class extends NodeImpl {
|
|
19393
19501
|
static create() {
|
|
19394
19502
|
const chartNode = {
|
|
@@ -19439,7 +19547,7 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
19439
19547
|
}
|
|
19440
19548
|
static getUIData() {
|
|
19441
19549
|
return {
|
|
19442
|
-
infoBoxBody:
|
|
19550
|
+
infoBoxBody: import_ts_dedent59.dedent`
|
|
19443
19551
|
Delays the execution and then passes the input value to the output without any modifications.
|
|
19444
19552
|
`,
|
|
19445
19553
|
infoBoxTitle: "Delay Node",
|
|
@@ -19491,7 +19599,7 @@ var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
|
19491
19599
|
|
|
19492
19600
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
19493
19601
|
var import_non_secure65 = require("nanoid/non-secure");
|
|
19494
|
-
var
|
|
19602
|
+
var import_ts_dedent60 = require("ts-dedent");
|
|
19495
19603
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
19496
19604
|
static create() {
|
|
19497
19605
|
return {
|
|
@@ -19551,7 +19659,7 @@ var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
|
19551
19659
|
}
|
|
19552
19660
|
static getUIData() {
|
|
19553
19661
|
return {
|
|
19554
|
-
infoBoxBody:
|
|
19662
|
+
infoBoxBody: import_ts_dedent60.dedent`
|
|
19555
19663
|
Appends a row of data to the specified dataset.
|
|
19556
19664
|
`,
|
|
19557
19665
|
infoBoxTitle: "Append to Dataset Node",
|
|
@@ -20102,7 +20210,7 @@ var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row")
|
|
|
20102
20210
|
|
|
20103
20211
|
// src/model/nodes/SliceNode.ts
|
|
20104
20212
|
var import_non_secure66 = require("nanoid/non-secure");
|
|
20105
|
-
var
|
|
20213
|
+
var import_ts_dedent61 = require("ts-dedent");
|
|
20106
20214
|
var SliceNodeImpl = class extends NodeImpl {
|
|
20107
20215
|
static create() {
|
|
20108
20216
|
const chartNode = {
|
|
@@ -20161,14 +20269,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
20161
20269
|
];
|
|
20162
20270
|
}
|
|
20163
20271
|
getBody() {
|
|
20164
|
-
return
|
|
20272
|
+
return import_ts_dedent61.dedent`
|
|
20165
20273
|
Start: ${this.data.useStartInput ? "(Using Input)" : this.data.start == null ? "0" : this.data.start}
|
|
20166
20274
|
Count: ${this.data.useCountInput ? "(Using Input)" : this.data.count == null ? "All" : this.data.count}
|
|
20167
20275
|
`;
|
|
20168
20276
|
}
|
|
20169
20277
|
static getUIData() {
|
|
20170
20278
|
return {
|
|
20171
|
-
infoBoxBody:
|
|
20279
|
+
infoBoxBody: import_ts_dedent61.dedent`
|
|
20172
20280
|
Slices an array from the start index for the count number of elements.
|
|
20173
20281
|
|
|
20174
20282
|
Useful for extracting a portion of an array.
|
|
@@ -20195,7 +20303,7 @@ var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
|
20195
20303
|
|
|
20196
20304
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
20197
20305
|
var import_non_secure67 = require("nanoid/non-secure");
|
|
20198
|
-
var
|
|
20306
|
+
var import_ts_dedent62 = require("ts-dedent");
|
|
20199
20307
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
20200
20308
|
static create() {
|
|
20201
20309
|
const chartNode = {
|
|
@@ -20242,7 +20350,7 @@ var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
|
20242
20350
|
}
|
|
20243
20351
|
static getUIData() {
|
|
20244
20352
|
return {
|
|
20245
|
-
infoBoxBody:
|
|
20353
|
+
infoBoxBody: import_ts_dedent62.dedent`
|
|
20246
20354
|
Extracts the code blocks in the input Markdown text.
|
|
20247
20355
|
|
|
20248
20356
|
Outputs the first matched block, all matched blocks, and the languages specified for the blocks.
|
|
@@ -20581,7 +20689,7 @@ var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
|
20581
20689
|
// src/model/nodes/DestructureNode.ts
|
|
20582
20690
|
var import_non_secure70 = require("nanoid/non-secure");
|
|
20583
20691
|
var import_jsonpath_plus3 = require("jsonpath-plus");
|
|
20584
|
-
var
|
|
20692
|
+
var import_ts_dedent63 = require("ts-dedent");
|
|
20585
20693
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
20586
20694
|
static create() {
|
|
20587
20695
|
const chartNode = {
|
|
@@ -20649,7 +20757,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
20649
20757
|
}
|
|
20650
20758
|
static getUIData() {
|
|
20651
20759
|
return {
|
|
20652
|
-
infoBoxBody:
|
|
20760
|
+
infoBoxBody: import_ts_dedent63.dedent`
|
|
20653
20761
|
Destructures the input value by extracting values at the specified paths. The paths use JSONPath notation to navigate through the value.
|
|
20654
20762
|
`,
|
|
20655
20763
|
infoBoxTitle: "Destructure Node",
|
|
@@ -20684,7 +20792,7 @@ var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
|
20684
20792
|
|
|
20685
20793
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
20686
20794
|
var import_non_secure71 = require("nanoid/non-secure");
|
|
20687
|
-
var
|
|
20795
|
+
var import_ts_dedent64 = require("ts-dedent");
|
|
20688
20796
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
20689
20797
|
static create() {
|
|
20690
20798
|
return {
|
|
@@ -20727,7 +20835,7 @@ var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
|
20727
20835
|
}
|
|
20728
20836
|
static getUIData() {
|
|
20729
20837
|
return {
|
|
20730
|
-
infoBoxBody:
|
|
20838
|
+
infoBoxBody: import_ts_dedent64.dedent`
|
|
20731
20839
|
Replaces the data in a dataset with the given data. If no data is given, the dataset will be cleared instead.
|
|
20732
20840
|
`,
|
|
20733
20841
|
infoBoxTitle: "Replace Dataset Node",
|
|
@@ -20860,7 +20968,7 @@ var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
|
20860
20968
|
|
|
20861
20969
|
// src/model/nodes/GraphReferenceNode.ts
|
|
20862
20970
|
var import_non_secure72 = require("nanoid/non-secure");
|
|
20863
|
-
var
|
|
20971
|
+
var import_ts_dedent65 = require("ts-dedent");
|
|
20864
20972
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
20865
20973
|
static create() {
|
|
20866
20974
|
const chartNode = {
|
|
@@ -20915,7 +21023,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
20915
21023
|
}
|
|
20916
21024
|
static getUIData() {
|
|
20917
21025
|
return {
|
|
20918
|
-
infoBoxBody:
|
|
21026
|
+
infoBoxBody: import_ts_dedent65.dedent`
|
|
20919
21027
|
Gets a reference to another graph, that can be used to pass around graphs to call using a Call Graph node.
|
|
20920
21028
|
`,
|
|
20921
21029
|
infoBoxTitle: "Graph Reference Node",
|
|
@@ -20982,7 +21090,7 @@ var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference
|
|
|
20982
21090
|
|
|
20983
21091
|
// src/model/nodes/CallGraphNode.ts
|
|
20984
21092
|
var import_non_secure73 = require("nanoid/non-secure");
|
|
20985
|
-
var
|
|
21093
|
+
var import_ts_dedent66 = require("ts-dedent");
|
|
20986
21094
|
|
|
20987
21095
|
// src/api/looseDataValue.ts
|
|
20988
21096
|
var import_lodash_es15 = require("lodash");
|
|
@@ -21058,7 +21166,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
21058
21166
|
}
|
|
21059
21167
|
static getUIData() {
|
|
21060
21168
|
return {
|
|
21061
|
-
infoBoxBody:
|
|
21169
|
+
infoBoxBody: import_ts_dedent66.dedent`
|
|
21062
21170
|
Calls another graph and passes inputs to it. Use in combination with the Graph Reference node to call dynamic graphs.
|
|
21063
21171
|
`,
|
|
21064
21172
|
infoBoxTitle: "Call Graph Node",
|
|
@@ -21130,7 +21238,7 @@ var callGraphNode = nodeDefinition(CallGraphNodeImpl, "Call Graph");
|
|
|
21130
21238
|
|
|
21131
21239
|
// src/model/nodes/DelegateFunctionCallNode.ts
|
|
21132
21240
|
var import_nanoid = require("nanoid");
|
|
21133
|
-
var
|
|
21241
|
+
var import_ts_dedent67 = require("ts-dedent");
|
|
21134
21242
|
var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
21135
21243
|
static create() {
|
|
21136
21244
|
const chartNode = {
|
|
@@ -21182,7 +21290,7 @@ var DelegateFunctionCallNodeImpl = class extends NodeImpl {
|
|
|
21182
21290
|
}
|
|
21183
21291
|
static getUIData() {
|
|
21184
21292
|
return {
|
|
21185
|
-
infoBoxBody:
|
|
21293
|
+
infoBoxBody: import_ts_dedent67.dedent`
|
|
21186
21294
|
Handles a tool call by delegating it to a different subgraph depending on the tool call.
|
|
21187
21295
|
`,
|
|
21188
21296
|
infoBoxTitle: "Delegate Tool Call Node",
|
|
@@ -21532,7 +21640,7 @@ var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
|
21532
21640
|
|
|
21533
21641
|
// src/model/nodes/ChatLoopNode.ts
|
|
21534
21642
|
var import_non_secure76 = require("nanoid/non-secure");
|
|
21535
|
-
var
|
|
21643
|
+
var import_ts_dedent68 = require("ts-dedent");
|
|
21536
21644
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
21537
21645
|
static create() {
|
|
21538
21646
|
const chartNode = {
|
|
@@ -21571,7 +21679,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
21571
21679
|
}
|
|
21572
21680
|
static getUIData() {
|
|
21573
21681
|
return {
|
|
21574
|
-
infoBoxBody:
|
|
21682
|
+
infoBoxBody: import_ts_dedent68.dedent`
|
|
21575
21683
|
Creates an interactive chat loop with an AI model. The node will:
|
|
21576
21684
|
1. Send the initial prompt to the AI
|
|
21577
21685
|
2. Show the AI's response and prompt for user input
|
|
@@ -21672,7 +21780,7 @@ var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, "Chat Loop");
|
|
|
21672
21780
|
|
|
21673
21781
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
21674
21782
|
var import_non_secure77 = require("nanoid/non-secure");
|
|
21675
|
-
var
|
|
21783
|
+
var import_ts_dedent69 = require("ts-dedent");
|
|
21676
21784
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
21677
21785
|
static create() {
|
|
21678
21786
|
return {
|
|
@@ -21787,7 +21895,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
21787
21895
|
];
|
|
21788
21896
|
}
|
|
21789
21897
|
getBody() {
|
|
21790
|
-
return
|
|
21898
|
+
return import_ts_dedent69.dedent`
|
|
21791
21899
|
${this.data.asBinary ? "Read as Binary" : "Read as Text"}
|
|
21792
21900
|
Path: ${this.data.usePathInput ? "(Input)" : this.data.path}
|
|
21793
21901
|
Recursive: ${this.data.useRecursiveInput ? "(Input)" : this.data.recursive}
|
|
@@ -21796,7 +21904,7 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
21796
21904
|
}
|
|
21797
21905
|
static getUIData() {
|
|
21798
21906
|
return {
|
|
21799
|
-
infoBoxBody:
|
|
21907
|
+
infoBoxBody: import_ts_dedent69.dedent`
|
|
21800
21908
|
Reads all files in the specified directory and outputs an array of objects containing each file's path and contents.
|
|
21801
21909
|
Each object has a 'path' (string) and 'content' (string or binary) property.
|
|
21802
21910
|
`,
|
|
@@ -21870,7 +21978,7 @@ var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
|
21870
21978
|
|
|
21871
21979
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
21872
21980
|
var import_non_secure78 = require("nanoid/non-secure");
|
|
21873
|
-
var
|
|
21981
|
+
var import_ts_dedent70 = require("ts-dedent");
|
|
21874
21982
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
21875
21983
|
static create() {
|
|
21876
21984
|
const chartNode = {
|
|
@@ -21932,7 +22040,7 @@ var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
|
21932
22040
|
}
|
|
21933
22041
|
static getUIData() {
|
|
21934
22042
|
return {
|
|
21935
|
-
infoBoxBody:
|
|
22043
|
+
infoBoxBody: import_ts_dedent70.dedent`
|
|
21936
22044
|
Converts an array of objects into a markdown table format.
|
|
21937
22045
|
Input should be an array of objects with consistent keys.
|
|
21938
22046
|
`,
|
|
@@ -21984,7 +22092,7 @@ var toMarkdownTableNode = nodeDefinition(ToMarkdownTableNodeImpl, "To Markdown T
|
|
|
21984
22092
|
|
|
21985
22093
|
// src/model/nodes/CronNode.ts
|
|
21986
22094
|
var import_nanoid2 = require("nanoid");
|
|
21987
|
-
var
|
|
22095
|
+
var import_ts_dedent71 = require("ts-dedent");
|
|
21988
22096
|
var cronParser = __toESM(require("cron-parser"), 1);
|
|
21989
22097
|
var CronNodeImpl = class extends NodeImpl {
|
|
21990
22098
|
static create() {
|
|
@@ -22054,7 +22162,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
22054
22162
|
}
|
|
22055
22163
|
static getUIData() {
|
|
22056
22164
|
return {
|
|
22057
|
-
infoBoxBody:
|
|
22165
|
+
infoBoxBody: import_ts_dedent71.dedent`
|
|
22058
22166
|
Executes a subgraph on a schedule. Supports:
|
|
22059
22167
|
- Natural language (e.g., "every 5 minutes", "daily at 3pm")
|
|
22060
22168
|
- Cron expressions (e.g., "0 * * * *")
|
|
@@ -22094,7 +22202,7 @@ var CronNodeImpl = class extends NodeImpl {
|
|
|
22094
22202
|
type: "string",
|
|
22095
22203
|
dataKey: "schedule",
|
|
22096
22204
|
label: "Schedule",
|
|
22097
|
-
helperMessage:
|
|
22205
|
+
helperMessage: import_ts_dedent71.dedent`
|
|
22098
22206
|
Examples:
|
|
22099
22207
|
Cron: "*/5 * * * *", "0 15 * * *"
|
|
22100
22208
|
Interval: "5 minutes", "1 hour", "7 days"
|
|
@@ -22226,7 +22334,7 @@ var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
|
22226
22334
|
|
|
22227
22335
|
// src/model/nodes/ToTreeNode.ts
|
|
22228
22336
|
var import_non_secure79 = require("nanoid/non-secure");
|
|
22229
|
-
var
|
|
22337
|
+
var import_ts_dedent72 = require("ts-dedent");
|
|
22230
22338
|
var import_lodash_es16 = require("lodash");
|
|
22231
22339
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
22232
22340
|
static create() {
|
|
@@ -22288,7 +22396,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
22288
22396
|
];
|
|
22289
22397
|
}
|
|
22290
22398
|
getBody() {
|
|
22291
|
-
return
|
|
22399
|
+
return import_ts_dedent72.dedent`
|
|
22292
22400
|
Format: ${this.data.format}
|
|
22293
22401
|
Children: ${this.data.childrenProperty}
|
|
22294
22402
|
Sort: ${this.data.useSortAlphabetically ? "Yes" : "No"}
|
|
@@ -22296,7 +22404,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
22296
22404
|
}
|
|
22297
22405
|
static getUIData() {
|
|
22298
22406
|
return {
|
|
22299
|
-
infoBoxBody:
|
|
22407
|
+
infoBoxBody: import_ts_dedent72.dedent`
|
|
22300
22408
|
Converts an array of objects into a tree structure and renders it as text.
|
|
22301
22409
|
|
|
22302
22410
|
The format field supports interpolation using {{property}} syntax to determine
|
|
@@ -22352,7 +22460,7 @@ var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
|
22352
22460
|
|
|
22353
22461
|
// src/model/nodes/LoopUntilNode.ts
|
|
22354
22462
|
var import_non_secure80 = require("nanoid/non-secure");
|
|
22355
|
-
var
|
|
22463
|
+
var import_ts_dedent73 = require("ts-dedent");
|
|
22356
22464
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
22357
22465
|
static create() {
|
|
22358
22466
|
const chartNode = {
|
|
@@ -22454,7 +22562,7 @@ var LoopUntilNodeImpl = class extends NodeImpl {
|
|
|
22454
22562
|
}
|
|
22455
22563
|
static getUIData() {
|
|
22456
22564
|
return {
|
|
22457
|
-
infoBoxBody:
|
|
22565
|
+
infoBoxBody: import_ts_dedent73.dedent`
|
|
22458
22566
|
Executes a subgraph in a loop until a condition is met. Each iteration's outputs become
|
|
22459
22567
|
the inputs for the next iteration. Supports different stopping conditions and optional
|
|
22460
22568
|
maximum iterations.
|
|
@@ -22816,7 +22924,7 @@ var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
|
22816
22924
|
|
|
22817
22925
|
// src/model/nodes/MCPToolCallNode.ts
|
|
22818
22926
|
var import_non_secure81 = require("nanoid/non-secure");
|
|
22819
|
-
var
|
|
22927
|
+
var import_ts_dedent74 = require("ts-dedent");
|
|
22820
22928
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
22821
22929
|
static create() {
|
|
22822
22930
|
const chartNode = {
|
|
@@ -22835,7 +22943,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
22835
22943
|
serverUrl: "http://localhost:8080/mcp",
|
|
22836
22944
|
serverId: "",
|
|
22837
22945
|
toolName: "",
|
|
22838
|
-
toolArguments:
|
|
22946
|
+
toolArguments: import_ts_dedent74.dedent`
|
|
22839
22947
|
{
|
|
22840
22948
|
"key": "value"
|
|
22841
22949
|
}`,
|
|
@@ -22975,7 +23083,7 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
22975
23083
|
}
|
|
22976
23084
|
static getUIData() {
|
|
22977
23085
|
return {
|
|
22978
|
-
infoBoxBody:
|
|
23086
|
+
infoBoxBody: import_ts_dedent74.dedent`
|
|
22979
23087
|
Connects to an MCP (Model Context Protocol) server and gets a tool call response.
|
|
22980
23088
|
`,
|
|
22981
23089
|
infoBoxTitle: "MCP Tool Call Node",
|
|
@@ -23287,7 +23395,7 @@ var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
|
23287
23395
|
|
|
23288
23396
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
23289
23397
|
var import_non_secure83 = require("nanoid/non-secure");
|
|
23290
|
-
var
|
|
23398
|
+
var import_ts_dedent75 = require("ts-dedent");
|
|
23291
23399
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
23292
23400
|
static create() {
|
|
23293
23401
|
const chartNode = {
|
|
@@ -23378,7 +23486,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
23378
23486
|
}
|
|
23379
23487
|
static getUIData() {
|
|
23380
23488
|
return {
|
|
23381
|
-
infoBoxBody:
|
|
23489
|
+
infoBoxBody: import_ts_dedent75.dedent`
|
|
23382
23490
|
References a graph from another project. Inputs and outputs are defined by Graph Input and Graph Output nodes within the referenced graph.
|
|
23383
23491
|
`,
|
|
23384
23492
|
infoBoxTitle: "Referenced Graph Alias Node",
|
|
@@ -23962,7 +24070,7 @@ function isRecordingTerminalEvent(event, data) {
|
|
|
23962
24070
|
|
|
23963
24071
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
23964
24072
|
var import_non_secure85 = require("nanoid/non-secure");
|
|
23965
|
-
var
|
|
24073
|
+
var import_ts_dedent76 = require("ts-dedent");
|
|
23966
24074
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
23967
24075
|
|
|
23968
24076
|
// src/utils/assertNever.ts
|
|
@@ -24121,7 +24229,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
24121
24229
|
getBody(data) {
|
|
24122
24230
|
var _a;
|
|
24123
24231
|
const modelName = data.overrideModel ? data.overrideModel : ((_a = anthropicModels[data.model]) == null ? void 0 : _a.displayName) ?? "Unknown Model";
|
|
24124
|
-
return
|
|
24232
|
+
return import_ts_dedent76.dedent`
|
|
24125
24233
|
${modelName}
|
|
24126
24234
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
24127
24235
|
Max Tokens: ${data.maxTokens}
|
|
@@ -24246,7 +24354,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
24246
24354
|
},
|
|
24247
24355
|
getUIData() {
|
|
24248
24356
|
return {
|
|
24249
|
-
infoBoxBody:
|
|
24357
|
+
infoBoxBody: import_ts_dedent76.dedent`
|
|
24250
24358
|
Legacy Anthropic chat node.
|
|
24251
24359
|
|
|
24252
24360
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -24720,7 +24828,7 @@ var anthropic_default = anthropicPlugin;
|
|
|
24720
24828
|
|
|
24721
24829
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
24722
24830
|
var import_non_secure86 = require("nanoid/non-secure");
|
|
24723
|
-
var
|
|
24831
|
+
var import_ts_dedent77 = require("ts-dedent");
|
|
24724
24832
|
var import_autoevals = require("autoevals");
|
|
24725
24833
|
var import_ts_pattern8 = require("ts-pattern");
|
|
24726
24834
|
var options = [
|
|
@@ -24854,7 +24962,7 @@ var AutoEvalsNodeImpl = {
|
|
|
24854
24962
|
},
|
|
24855
24963
|
getUIData() {
|
|
24856
24964
|
return {
|
|
24857
|
-
infoBoxBody:
|
|
24965
|
+
infoBoxBody: import_ts_dedent77.dedent`
|
|
24858
24966
|
Evaluates the validity of a response using the autoevals library.
|
|
24859
24967
|
`,
|
|
24860
24968
|
infoBoxTitle: "Autoevals Node",
|
|
@@ -24935,7 +25043,7 @@ var autoevals_default = autoevalsPlugin;
|
|
|
24935
25043
|
|
|
24936
25044
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
24937
25045
|
var import_non_secure87 = require("nanoid/non-secure");
|
|
24938
|
-
var
|
|
25046
|
+
var import_ts_dedent78 = require("ts-dedent");
|
|
24939
25047
|
|
|
24940
25048
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
24941
25049
|
var import_assemblyai = require("assemblyai");
|
|
@@ -25121,7 +25229,7 @@ var LemurQaNodeImpl = {
|
|
|
25121
25229
|
},
|
|
25122
25230
|
getUIData() {
|
|
25123
25231
|
return {
|
|
25124
|
-
infoBoxBody:
|
|
25232
|
+
infoBoxBody: import_ts_dedent78.dedent`Use AssemblyAI LeMUR to ask questions about transcripts`,
|
|
25125
25233
|
infoBoxTitle: "Use AssemblyAI LeMUR Question & Answer",
|
|
25126
25234
|
contextMenuTitle: "LeMUR Q&A",
|
|
25127
25235
|
group: ["AI", "AssemblyAI"]
|
|
@@ -25194,7 +25302,7 @@ var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
|
25194
25302
|
|
|
25195
25303
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
25196
25304
|
var import_non_secure88 = require("nanoid/non-secure");
|
|
25197
|
-
var
|
|
25305
|
+
var import_ts_dedent79 = require("ts-dedent");
|
|
25198
25306
|
var TranscribeAudioNodeImpl = {
|
|
25199
25307
|
create() {
|
|
25200
25308
|
const chartNode = {
|
|
@@ -25256,7 +25364,7 @@ var TranscribeAudioNodeImpl = {
|
|
|
25256
25364
|
},
|
|
25257
25365
|
getUIData() {
|
|
25258
25366
|
return {
|
|
25259
|
-
infoBoxBody:
|
|
25367
|
+
infoBoxBody: import_ts_dedent79.dedent`Use AssemblyAI to transcribe audio`,
|
|
25260
25368
|
infoBoxTitle: "Transcribe Audio Node",
|
|
25261
25369
|
contextMenuTitle: "Transcribe Audio",
|
|
25262
25370
|
group: ["AI", "AssemblyAI"]
|
|
@@ -25316,7 +25424,7 @@ function getAdditionalParameters(data) {
|
|
|
25316
25424
|
|
|
25317
25425
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
25318
25426
|
var import_non_secure89 = require("nanoid/non-secure");
|
|
25319
|
-
var
|
|
25427
|
+
var import_ts_dedent80 = require("ts-dedent");
|
|
25320
25428
|
var import_assemblyai3 = require("assemblyai");
|
|
25321
25429
|
var LemurSummaryNodeImpl = {
|
|
25322
25430
|
create() {
|
|
@@ -25369,7 +25477,7 @@ var LemurSummaryNodeImpl = {
|
|
|
25369
25477
|
},
|
|
25370
25478
|
getUIData() {
|
|
25371
25479
|
return {
|
|
25372
|
-
infoBoxBody:
|
|
25480
|
+
infoBoxBody: import_ts_dedent80.dedent`Use AssemblyAI LeMUR Summary to summarize transcripts`,
|
|
25373
25481
|
infoBoxTitle: "Use AssemblyAI LeMUR Summary",
|
|
25374
25482
|
contextMenuTitle: "LeMUR Summary",
|
|
25375
25483
|
group: ["AI", "AssemblyAI"]
|
|
@@ -25394,7 +25502,7 @@ var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary
|
|
|
25394
25502
|
|
|
25395
25503
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
25396
25504
|
var import_non_secure90 = require("nanoid/non-secure");
|
|
25397
|
-
var
|
|
25505
|
+
var import_ts_dedent81 = require("ts-dedent");
|
|
25398
25506
|
var import_assemblyai4 = require("assemblyai");
|
|
25399
25507
|
var LemurTaskNodeImpl = {
|
|
25400
25508
|
create() {
|
|
@@ -25447,7 +25555,7 @@ var LemurTaskNodeImpl = {
|
|
|
25447
25555
|
},
|
|
25448
25556
|
getUIData() {
|
|
25449
25557
|
return {
|
|
25450
|
-
infoBoxBody:
|
|
25558
|
+
infoBoxBody: import_ts_dedent81.dedent`Use AssemblyAI LeMUR Custom Task to ask anything.`,
|
|
25451
25559
|
infoBoxTitle: "Use AssemblyAI LeMUR Custom Task",
|
|
25452
25560
|
contextMenuTitle: "LeMUR Custom Task",
|
|
25453
25561
|
group: ["AI", "AssemblyAI"]
|
|
@@ -25474,7 +25582,7 @@ var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
|
25474
25582
|
|
|
25475
25583
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
25476
25584
|
var import_non_secure91 = require("nanoid/non-secure");
|
|
25477
|
-
var
|
|
25585
|
+
var import_ts_dedent82 = require("ts-dedent");
|
|
25478
25586
|
var LemurActionItemsNodeImpl = {
|
|
25479
25587
|
create() {
|
|
25480
25588
|
const chartNode = {
|
|
@@ -25526,7 +25634,7 @@ var LemurActionItemsNodeImpl = {
|
|
|
25526
25634
|
},
|
|
25527
25635
|
getUIData() {
|
|
25528
25636
|
return {
|
|
25529
|
-
infoBoxBody:
|
|
25637
|
+
infoBoxBody: import_ts_dedent82.dedent`Use AssemblyAI LeMUR Action Items to extract action items`,
|
|
25530
25638
|
infoBoxTitle: "Use AssemblyAI LeMUR Action Items",
|
|
25531
25639
|
contextMenuTitle: "LeMUR Action Items",
|
|
25532
25640
|
group: ["AI", "AssemblyAI"]
|
|
@@ -25815,7 +25923,7 @@ var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (H
|
|
|
25815
25923
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
25816
25924
|
var import_non_secure93 = require("nanoid/non-secure");
|
|
25817
25925
|
var import_inference2 = require("@huggingface/inference");
|
|
25818
|
-
var
|
|
25926
|
+
var import_ts_dedent83 = require("ts-dedent");
|
|
25819
25927
|
var TextToImageHuggingFaceNodeImpl = {
|
|
25820
25928
|
create() {
|
|
25821
25929
|
return {
|
|
@@ -25960,7 +26068,7 @@ var TextToImageHuggingFaceNodeImpl = {
|
|
|
25960
26068
|
];
|
|
25961
26069
|
},
|
|
25962
26070
|
getBody(data) {
|
|
25963
|
-
return
|
|
26071
|
+
return import_ts_dedent83.dedent`
|
|
25964
26072
|
Model: ${data.useModelInput ? "(Using Input)" : data.model}
|
|
25965
26073
|
`;
|
|
25966
26074
|
},
|
|
@@ -29136,7 +29244,7 @@ var openAIPlugin = {
|
|
|
29136
29244
|
|
|
29137
29245
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
29138
29246
|
var import_non_secure94 = require("nanoid/non-secure");
|
|
29139
|
-
var
|
|
29247
|
+
var import_ts_dedent84 = require("ts-dedent");
|
|
29140
29248
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
29141
29249
|
var import_ts_pattern9 = require("ts-pattern");
|
|
29142
29250
|
var import_genai2 = require("@google/genai");
|
|
@@ -29299,7 +29407,7 @@ var ChatGoogleNodeImpl = {
|
|
|
29299
29407
|
},
|
|
29300
29408
|
getBody(data) {
|
|
29301
29409
|
var _a;
|
|
29302
|
-
return
|
|
29410
|
+
return import_ts_dedent84.dedent`
|
|
29303
29411
|
${((_a = generativeAiGoogleModels[data.model]) == null ? void 0 : _a.displayName) ?? `Google (${data.model})`}
|
|
29304
29412
|
${data.useTopP ? `Top P: ${data.useTopPInput ? "(Using Input)" : data.top_p}` : `Temperature: ${data.useTemperatureInput ? "(Using Input)" : data.temperature}`}
|
|
29305
29413
|
Max Tokens: ${data.maxTokens}
|
|
@@ -29386,7 +29494,7 @@ var ChatGoogleNodeImpl = {
|
|
|
29386
29494
|
},
|
|
29387
29495
|
getUIData() {
|
|
29388
29496
|
return {
|
|
29389
|
-
infoBoxBody:
|
|
29497
|
+
infoBoxBody: import_ts_dedent84.dedent`
|
|
29390
29498
|
Legacy Google chat node.
|
|
29391
29499
|
|
|
29392
29500
|
For new work, prefer \`LLM Chat\`, which keeps provider selection inside one shared node.
|
|
@@ -30020,6 +30128,7 @@ function coreCreateProcessor(project, options2, internalOptions = {}) {
|
|
|
30020
30128
|
concurrency: options2.concurrency,
|
|
30021
30129
|
executionPlanCacheMode: internalOptions.executionPlanCacheMode,
|
|
30022
30130
|
runtimeCache: internalOptions.runtimeCache,
|
|
30131
|
+
runtimeProfiler: internalOptions.runtimeProfiler,
|
|
30023
30132
|
scheduler: internalOptions.scheduler
|
|
30024
30133
|
}
|
|
30025
30134
|
);
|