@valerypopoff/rivet2-core 2.25.0 → 2.27.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 +536 -222
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/webAppRuntime.cjs.map +1 -1
- package/dist/esm/exports.js +1 -0
- package/dist/esm/model/GraphExecutionState.js +1 -1
- package/dist/esm/model/GraphProcessor.js +30 -9
- package/dist/esm/model/LatestDebuggerProtocol.js +179 -0
- package/dist/esm/model/Nodes.js +3 -0
- package/dist/esm/model/RunCostLedger.js +63 -32
- package/dist/esm/model/classifier/baseten.js +2 -1
- package/dist/esm/model/classifier/providers.js +55 -30
- package/dist/esm/model/nodes/AICostNode.js +56 -0
- package/dist/types/exports.d.ts +1 -0
- package/dist/types/model/GraphExecutionState.d.ts +1 -0
- package/dist/types/model/LatestDebuggerProtocol.d.ts +121 -0
- package/dist/types/model/Nodes.d.ts +3 -2
- package/dist/types/model/ProcessContext.d.ts +3 -0
- package/dist/types/model/RunCostLedger.d.ts +12 -2
- package/dist/types/model/classifier/baseten.d.ts +2 -2
- package/dist/types/model/classifier/providers.d.ts +11 -11
- package/dist/types/model/classifier/types.d.ts +5 -0
- package/dist/types/model/nodes/AICostNode.d.ts +15 -0
- package/package.json +1 -1
package/dist/cjs/bundle.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
AGENT_RESPONSE_TRACE_MAX_PROFILE_ATTEMPTS: () => AGENT_RESPONSE_TRACE_MAX_PROFILE_ATTEMPTS,
|
|
35
35
|
AGENT_RESPONSE_TRACE_MAX_TOOL_CALLS: () => AGENT_RESPONSE_TRACE_MAX_TOOL_CALLS,
|
|
36
36
|
AGENT_RESPONSE_TRACE_SCHEMA_VERSION: () => AGENT_RESPONSE_TRACE_SCHEMA_VERSION,
|
|
37
|
+
AICostNodeImpl: () => AICostNodeImpl,
|
|
37
38
|
ALL_CODE_RUNNER_OPTIONS: () => ALL_CODE_RUNNER_OPTIONS,
|
|
38
39
|
AbortGraphNodeImpl: () => AbortGraphNodeImpl,
|
|
39
40
|
AgentResponseTraceCollector: () => AgentResponseTraceCollector,
|
|
@@ -137,6 +138,7 @@ __export(src_exports, {
|
|
|
137
138
|
KnowledgeDocumentNodeImpl: () => KnowledgeDocumentNodeImpl,
|
|
138
139
|
KnowledgeSourceNodeImpl: () => KnowledgeSourceNodeImpl,
|
|
139
140
|
KnowledgeStoreController: () => KnowledgeStoreController,
|
|
141
|
+
LATEST_DEBUGGER_PATH: () => LATEST_DEBUGGER_PATH,
|
|
140
142
|
LIQUID_DEFAULT_CREDENTIAL_NAMES: () => LIQUID_DEFAULT_CREDENTIAL_NAMES,
|
|
141
143
|
LIQUID_SYSTEM_ONE_ENDPOINT: () => LIQUID_SYSTEM_ONE_ENDPOINT,
|
|
142
144
|
LIQUID_TOKEN_PRICING: () => LIQUID_TOKEN_PRICING,
|
|
@@ -245,6 +247,7 @@ __export(src_exports, {
|
|
|
245
247
|
WatchStreamingOutputNodeImpl: () => WatchStreamingOutputNodeImpl,
|
|
246
248
|
abortGraphNode: () => abortGraphNode,
|
|
247
249
|
addWarning: () => addWarning,
|
|
250
|
+
aiCostNode: () => aiCostNode,
|
|
248
251
|
analyzeCodeOutputs: () => analyzeCodeOutputs,
|
|
249
252
|
anthropicCacheControlTtlOptions: () => anthropicCacheControlTtlOptions,
|
|
250
253
|
anthropicEffortOptions: () => anthropicEffortOptions,
|
|
@@ -350,6 +353,9 @@ __export(src_exports, {
|
|
|
350
353
|
createKnowledgeStoreFieldDraftDefaults: () => createKnowledgeStoreFieldDraftDefaults,
|
|
351
354
|
createLLMChatV2NodeData: () => createLLMChatV2NodeData,
|
|
352
355
|
createLLMProfileNodeData: () => createLLMProfileNodeData,
|
|
356
|
+
createLatestDebuggerControlResult: () => createLatestDebuggerControlResult,
|
|
357
|
+
createLatestDebuggerDiagnostic: () => createLatestDebuggerDiagnostic,
|
|
358
|
+
createLatestDebuggerSession: () => createLatestDebuggerSession,
|
|
353
359
|
createProjectBundleRuntime: () => createProjectBundleRuntime,
|
|
354
360
|
createResolvedChatV2Provider: () => createResolvedChatV2Provider,
|
|
355
361
|
createRivetLLMProfileHealthIdentity: () => createRivetLLMProfileHealthIdentity,
|
|
@@ -388,6 +394,7 @@ __export(src_exports, {
|
|
|
388
394
|
documentNode: () => documentNode,
|
|
389
395
|
doubleCheckProject: () => doubleCheckProject,
|
|
390
396
|
emptyNodeGraph: () => emptyNodeGraph,
|
|
397
|
+
encodeLatestDebuggerEnvelope: () => encodeLatestDebuggerEnvelope,
|
|
391
398
|
encodeProjectGlobalVariable: () => encodeProjectGlobalVariable,
|
|
392
399
|
encodeRivetWebAppStorageBinaryFrame: () => encodeRivetWebAppStorageBinaryFrame,
|
|
393
400
|
evaluateJsonPath: () => evaluateJsonPath,
|
|
@@ -571,6 +578,11 @@ __export(src_exports, {
|
|
|
571
578
|
isKnowledgeSourceReference: () => isKnowledgeSourceReference,
|
|
572
579
|
isKnowledgeStoreProviderFieldDefaultValid: () => isKnowledgeStoreProviderFieldDefaultValid,
|
|
573
580
|
isLLMChatV2StructuredResponseFormat: () => isLLMChatV2StructuredResponseFormat,
|
|
581
|
+
isLatestDebuggerControlResult: () => isLatestDebuggerControlResult,
|
|
582
|
+
isLatestDebuggerDiagnostic: () => isLatestDebuggerDiagnostic,
|
|
583
|
+
isLatestDebuggerExecutionMessage: () => isLatestDebuggerExecutionMessage,
|
|
584
|
+
isLatestDebuggerScope: () => isLatestDebuggerScope,
|
|
585
|
+
isLatestDebuggerSession: () => isLatestDebuggerSession,
|
|
574
586
|
isNodePrefabInstanceNode: () => isNodePrefabInstanceNode,
|
|
575
587
|
isNotFunctionDataValue: () => isNotFunctionDataValue,
|
|
576
588
|
isReportedTokenCount: () => isReportedTokenCount,
|
|
@@ -677,6 +689,8 @@ __export(src_exports, {
|
|
|
677
689
|
parseDataBusChannelIndex: () => parseDataBusChannelIndex,
|
|
678
690
|
parseInterpolationExpression: () => parseInterpolationExpression,
|
|
679
691
|
parseInterpolationTemplate: () => parseInterpolationTemplate,
|
|
692
|
+
parseLatestDebuggerPath: () => parseLatestDebuggerPath,
|
|
693
|
+
parseLatestEndpointSegment: () => parseLatestEndpointSegment,
|
|
680
694
|
parseProviderJsonChunk: () => parseProviderJsonChunk,
|
|
681
695
|
parseRivetWebAppBrowserStorageClientMessage: () => parseRivetWebAppBrowserStorageClientMessage,
|
|
682
696
|
parseRivetWebAppBrowserStorageServerMessage: () => parseRivetWebAppBrowserStorageServerMessage,
|
|
@@ -706,6 +720,10 @@ __export(src_exports, {
|
|
|
706
720
|
readFileNode: () => readFileNode,
|
|
707
721
|
readKnowledgeStoreConnectionCredentials: () => readKnowledgeStoreConnectionCredentials,
|
|
708
722
|
readKnowledgeStoreConnectionCredentialsDraft: () => readKnowledgeStoreConnectionCredentialsDraft,
|
|
723
|
+
readLatestDebuggerControl: () => readLatestDebuggerControl,
|
|
724
|
+
readLatestDebuggerEventId: () => readLatestDebuggerEventId,
|
|
725
|
+
readLatestDebuggerEventPosition: () => readLatestDebuggerEventPosition,
|
|
726
|
+
readLatestDebuggerExecution: () => readLatestDebuggerExecution,
|
|
709
727
|
reconcileProjectUiGraphBindings: () => reconcileProjectUiGraphBindings,
|
|
710
728
|
reconcileProjectUiGraphButtonBindings: () => reconcileProjectUiGraphButtonBindings,
|
|
711
729
|
reconcileSubgraphTargetBoundary: () => reconcileSubgraphTargetBoundary,
|
|
@@ -829,6 +847,7 @@ __export(exports_exports, {
|
|
|
829
847
|
AGENT_RESPONSE_TRACE_MAX_PROFILE_ATTEMPTS: () => AGENT_RESPONSE_TRACE_MAX_PROFILE_ATTEMPTS,
|
|
830
848
|
AGENT_RESPONSE_TRACE_MAX_TOOL_CALLS: () => AGENT_RESPONSE_TRACE_MAX_TOOL_CALLS,
|
|
831
849
|
AGENT_RESPONSE_TRACE_SCHEMA_VERSION: () => AGENT_RESPONSE_TRACE_SCHEMA_VERSION,
|
|
850
|
+
AICostNodeImpl: () => AICostNodeImpl,
|
|
832
851
|
ALL_CODE_RUNNER_OPTIONS: () => ALL_CODE_RUNNER_OPTIONS,
|
|
833
852
|
AbortGraphNodeImpl: () => AbortGraphNodeImpl,
|
|
834
853
|
AgentResponseTraceCollector: () => AgentResponseTraceCollector,
|
|
@@ -932,6 +951,7 @@ __export(exports_exports, {
|
|
|
932
951
|
KnowledgeDocumentNodeImpl: () => KnowledgeDocumentNodeImpl,
|
|
933
952
|
KnowledgeSourceNodeImpl: () => KnowledgeSourceNodeImpl,
|
|
934
953
|
KnowledgeStoreController: () => KnowledgeStoreController,
|
|
954
|
+
LATEST_DEBUGGER_PATH: () => LATEST_DEBUGGER_PATH,
|
|
935
955
|
LIQUID_DEFAULT_CREDENTIAL_NAMES: () => LIQUID_DEFAULT_CREDENTIAL_NAMES,
|
|
936
956
|
LIQUID_SYSTEM_ONE_ENDPOINT: () => LIQUID_SYSTEM_ONE_ENDPOINT,
|
|
937
957
|
LIQUID_TOKEN_PRICING: () => LIQUID_TOKEN_PRICING,
|
|
@@ -1039,6 +1059,7 @@ __export(exports_exports, {
|
|
|
1039
1059
|
WatchStreamingOutputNodeImpl: () => WatchStreamingOutputNodeImpl,
|
|
1040
1060
|
abortGraphNode: () => abortGraphNode,
|
|
1041
1061
|
addWarning: () => addWarning,
|
|
1062
|
+
aiCostNode: () => aiCostNode,
|
|
1042
1063
|
analyzeCodeOutputs: () => analyzeCodeOutputs,
|
|
1043
1064
|
anthropicCacheControlTtlOptions: () => anthropicCacheControlTtlOptions,
|
|
1044
1065
|
anthropicEffortOptions: () => anthropicEffortOptions,
|
|
@@ -1144,6 +1165,9 @@ __export(exports_exports, {
|
|
|
1144
1165
|
createKnowledgeStoreFieldDraftDefaults: () => createKnowledgeStoreFieldDraftDefaults,
|
|
1145
1166
|
createLLMChatV2NodeData: () => createLLMChatV2NodeData,
|
|
1146
1167
|
createLLMProfileNodeData: () => createLLMProfileNodeData,
|
|
1168
|
+
createLatestDebuggerControlResult: () => createLatestDebuggerControlResult,
|
|
1169
|
+
createLatestDebuggerDiagnostic: () => createLatestDebuggerDiagnostic,
|
|
1170
|
+
createLatestDebuggerSession: () => createLatestDebuggerSession,
|
|
1147
1171
|
createProjectBundleRuntime: () => createProjectBundleRuntime,
|
|
1148
1172
|
createResolvedChatV2Provider: () => createResolvedChatV2Provider,
|
|
1149
1173
|
createRivetLLMProfileHealthIdentity: () => createRivetLLMProfileHealthIdentity,
|
|
@@ -1182,6 +1206,7 @@ __export(exports_exports, {
|
|
|
1182
1206
|
documentNode: () => documentNode,
|
|
1183
1207
|
doubleCheckProject: () => doubleCheckProject,
|
|
1184
1208
|
emptyNodeGraph: () => emptyNodeGraph,
|
|
1209
|
+
encodeLatestDebuggerEnvelope: () => encodeLatestDebuggerEnvelope,
|
|
1185
1210
|
encodeProjectGlobalVariable: () => encodeProjectGlobalVariable,
|
|
1186
1211
|
encodeRivetWebAppStorageBinaryFrame: () => encodeRivetWebAppStorageBinaryFrame,
|
|
1187
1212
|
evaluateJsonPath: () => evaluateJsonPath,
|
|
@@ -1365,6 +1390,11 @@ __export(exports_exports, {
|
|
|
1365
1390
|
isKnowledgeSourceReference: () => isKnowledgeSourceReference,
|
|
1366
1391
|
isKnowledgeStoreProviderFieldDefaultValid: () => isKnowledgeStoreProviderFieldDefaultValid,
|
|
1367
1392
|
isLLMChatV2StructuredResponseFormat: () => isLLMChatV2StructuredResponseFormat,
|
|
1393
|
+
isLatestDebuggerControlResult: () => isLatestDebuggerControlResult,
|
|
1394
|
+
isLatestDebuggerDiagnostic: () => isLatestDebuggerDiagnostic,
|
|
1395
|
+
isLatestDebuggerExecutionMessage: () => isLatestDebuggerExecutionMessage,
|
|
1396
|
+
isLatestDebuggerScope: () => isLatestDebuggerScope,
|
|
1397
|
+
isLatestDebuggerSession: () => isLatestDebuggerSession,
|
|
1368
1398
|
isNodePrefabInstanceNode: () => isNodePrefabInstanceNode,
|
|
1369
1399
|
isNotFunctionDataValue: () => isNotFunctionDataValue,
|
|
1370
1400
|
isReportedTokenCount: () => isReportedTokenCount,
|
|
@@ -1471,6 +1501,8 @@ __export(exports_exports, {
|
|
|
1471
1501
|
parseDataBusChannelIndex: () => parseDataBusChannelIndex,
|
|
1472
1502
|
parseInterpolationExpression: () => parseInterpolationExpression,
|
|
1473
1503
|
parseInterpolationTemplate: () => parseInterpolationTemplate,
|
|
1504
|
+
parseLatestDebuggerPath: () => parseLatestDebuggerPath,
|
|
1505
|
+
parseLatestEndpointSegment: () => parseLatestEndpointSegment,
|
|
1474
1506
|
parseProviderJsonChunk: () => parseProviderJsonChunk,
|
|
1475
1507
|
parseRivetWebAppBrowserStorageClientMessage: () => parseRivetWebAppBrowserStorageClientMessage,
|
|
1476
1508
|
parseRivetWebAppBrowserStorageServerMessage: () => parseRivetWebAppBrowserStorageServerMessage,
|
|
@@ -1500,6 +1532,10 @@ __export(exports_exports, {
|
|
|
1500
1532
|
readFileNode: () => readFileNode,
|
|
1501
1533
|
readKnowledgeStoreConnectionCredentials: () => readKnowledgeStoreConnectionCredentials,
|
|
1502
1534
|
readKnowledgeStoreConnectionCredentialsDraft: () => readKnowledgeStoreConnectionCredentialsDraft,
|
|
1535
|
+
readLatestDebuggerControl: () => readLatestDebuggerControl,
|
|
1536
|
+
readLatestDebuggerEventId: () => readLatestDebuggerEventId,
|
|
1537
|
+
readLatestDebuggerEventPosition: () => readLatestDebuggerEventPosition,
|
|
1538
|
+
readLatestDebuggerExecution: () => readLatestDebuggerExecution,
|
|
1503
1539
|
reconcileProjectUiGraphBindings: () => reconcileProjectUiGraphBindings,
|
|
1504
1540
|
reconcileProjectUiGraphButtonBindings: () => reconcileProjectUiGraphButtonBindings,
|
|
1505
1541
|
reconcileSubgraphTargetBoundary: () => reconcileSubgraphTargetBoundary,
|
|
@@ -6839,52 +6875,81 @@ function evaluateJsonPath(value, path, wrap = false) {
|
|
|
6839
6875
|
}
|
|
6840
6876
|
|
|
6841
6877
|
// src/model/RunCostLedger.ts
|
|
6842
|
-
var
|
|
6843
|
-
|
|
6844
|
-
|
|
6878
|
+
var emptySummary = () => ({ knownCostUsd: 0, hasKnownCost: false, hasUnknownCost: false });
|
|
6879
|
+
function addCost(summary, cost) {
|
|
6880
|
+
if (cost === null) summary.hasUnknownCost = true;
|
|
6881
|
+
else {
|
|
6882
|
+
summary.knownCostUsd += cost;
|
|
6883
|
+
summary.hasKnownCost = true;
|
|
6884
|
+
}
|
|
6885
|
+
}
|
|
6886
|
+
function readSummary(summary, executionPending = false) {
|
|
6887
|
+
if (!Number.isFinite(summary.knownCostUsd)) return { status: "unknown", knownCostUsd: null };
|
|
6888
|
+
if (!summary.hasUnknownCost && !executionPending) return { status: "complete", knownCostUsd: summary.knownCostUsd };
|
|
6889
|
+
if (!summary.hasKnownCost) return { status: "unknown", knownCostUsd: null };
|
|
6890
|
+
return { status: "partial", knownCostUsd: summary.knownCostUsd };
|
|
6891
|
+
}
|
|
6892
|
+
var RunCostLedger = class _RunCostLedger {
|
|
6893
|
+
#parent;
|
|
6894
|
+
#seenCalls;
|
|
6895
|
+
#costs = { llm: emptySummary(), decisionAI: emptySummary(), total: emptySummary() };
|
|
6896
|
+
constructor(parent) {
|
|
6897
|
+
this.#parent = parent;
|
|
6898
|
+
this.#seenCalls = parent ? parent.#seenCalls : /* @__PURE__ */ new Set();
|
|
6899
|
+
}
|
|
6900
|
+
createProjectScope() {
|
|
6901
|
+
return new _RunCostLedger(this);
|
|
6902
|
+
}
|
|
6845
6903
|
observeChat(event) {
|
|
6846
6904
|
if (typeof event.callId !== "string" || !event.callId) {
|
|
6847
|
-
this.markUnobserved();
|
|
6905
|
+
this.markUnobserved("llm");
|
|
6848
6906
|
return;
|
|
6849
6907
|
}
|
|
6850
|
-
this.#record(`llm:${event.callId}`, event.pricing.status === "known" ? event.pricing.costUsd : void 0);
|
|
6908
|
+
this.#record(`llm:${event.callId}`, "llm", event.pricing.status === "known" ? event.pricing.costUsd : void 0);
|
|
6851
6909
|
}
|
|
6852
6910
|
observeClassifier(event) {
|
|
6853
6911
|
var _a;
|
|
6854
6912
|
if (event.family !== "classifier" || event.attemptIndex === void 0) return;
|
|
6855
6913
|
if (typeof event.eventId !== "string" || !event.eventId || !Number.isSafeInteger(event.attemptIndex) || event.attemptIndex < 0) {
|
|
6856
|
-
this.markUnobserved();
|
|
6914
|
+
this.markUnobserved("decisionAI");
|
|
6857
6915
|
return;
|
|
6858
6916
|
}
|
|
6859
|
-
this.#record(`decision:${event.eventId}`, (_a = event.classifierUsage) == null ? void 0 : _a.estimatedCostUsd);
|
|
6917
|
+
this.#record(`decision:${event.eventId}`, "decisionAI", (_a = event.classifierUsage) == null ? void 0 : _a.estimatedCostUsd);
|
|
6860
6918
|
}
|
|
6861
6919
|
/** Legacy Chat does not expose complete per-attempt accounting. */
|
|
6862
6920
|
observeLegacy(key, value) {
|
|
6863
|
-
if (typeof value === "number" && Number.isFinite(value) && value > 0) this.#record(`legacy:${key}`, value);
|
|
6864
|
-
this.markUnobserved();
|
|
6865
|
-
}
|
|
6866
|
-
markUnobserved() {
|
|
6867
|
-
this.#hasUnobservedWork = true;
|
|
6921
|
+
if (typeof value === "number" && Number.isFinite(value) && value > 0) this.#record(`legacy:${key}`, "llm", value);
|
|
6922
|
+
this.markUnobserved("llm");
|
|
6868
6923
|
}
|
|
6869
|
-
|
|
6870
|
-
let
|
|
6871
|
-
|
|
6872
|
-
let hasUnknownCost = this.#hasUnobservedWork || executionPending;
|
|
6873
|
-
for (const cost of this.#calls.values()) {
|
|
6874
|
-
if (cost === null) hasUnknownCost = true;
|
|
6924
|
+
markUnobserved(family) {
|
|
6925
|
+
for (let scope = this; scope; scope = scope.#parent) {
|
|
6926
|
+
if (family) scope.#costs[family].hasUnknownCost = true;
|
|
6875
6927
|
else {
|
|
6876
|
-
|
|
6877
|
-
|
|
6928
|
+
scope.#costs.llm.hasUnknownCost = true;
|
|
6929
|
+
scope.#costs.decisionAI.hasUnknownCost = true;
|
|
6878
6930
|
}
|
|
6931
|
+
scope.#costs.total.hasUnknownCost = true;
|
|
6879
6932
|
}
|
|
6880
|
-
if (!Number.isFinite(known)) return { status: "unknown", knownCostUsd: null };
|
|
6881
|
-
if (!hasUnknownCost) return { status: "complete", knownCostUsd: known };
|
|
6882
|
-
if (knownCount === 0) return { status: "unknown", knownCostUsd: null };
|
|
6883
|
-
return { status: "partial", knownCostUsd: known };
|
|
6884
6933
|
}
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6934
|
+
snapshot(executionPending = false) {
|
|
6935
|
+
return readSummary(this.#costs.total, executionPending);
|
|
6936
|
+
}
|
|
6937
|
+
/** Observed amounts now, not a prediction of unfinished or future calls. */
|
|
6938
|
+
breakdown() {
|
|
6939
|
+
return {
|
|
6940
|
+
llm: readSummary(this.#costs.llm),
|
|
6941
|
+
decisionAI: readSummary(this.#costs.decisionAI),
|
|
6942
|
+
total: this.snapshot()
|
|
6943
|
+
};
|
|
6944
|
+
}
|
|
6945
|
+
#record(id, family, value) {
|
|
6946
|
+
if (this.#seenCalls.has(id)) return;
|
|
6947
|
+
this.#seenCalls.add(id);
|
|
6948
|
+
const cost = typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
|
|
6949
|
+
for (let scope = this; scope; scope = scope.#parent) {
|
|
6950
|
+
addCost(scope.#costs.total, cost);
|
|
6951
|
+
addCost(scope.#costs[family], cost);
|
|
6952
|
+
}
|
|
6888
6953
|
}
|
|
6889
6954
|
};
|
|
6890
6955
|
|
|
@@ -6951,7 +7016,7 @@ var GraphInvocationState = class {
|
|
|
6951
7016
|
this.successfulAbortTerminalProcessIds = /* @__PURE__ */ new Set();
|
|
6952
7017
|
this.totalCost = 0;
|
|
6953
7018
|
this.costBreakdown = void 0;
|
|
6954
|
-
this.costLedger = new RunCostLedger();
|
|
7019
|
+
this.costLedger = options2.costLedger ?? new RunCostLedger();
|
|
6955
7020
|
this.nodeAbortControllers = /* @__PURE__ */ new Map();
|
|
6956
7021
|
this.loadedProjects = options2.loadedProjects;
|
|
6957
7022
|
this.graphInputNodeValues = ((_c = options2.sharedOverride) == null ? void 0 : _c.graphInputNodeValues) ?? {};
|
|
@@ -13885,6 +13950,8 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
13885
13950
|
slowMode = false;
|
|
13886
13951
|
#parent;
|
|
13887
13952
|
#recordingProjectScope;
|
|
13953
|
+
/** Captures the caller invocation, independently of lifecycle-parent rewiring. */
|
|
13954
|
+
#projectCostScope;
|
|
13888
13955
|
#abortOwnerOverride;
|
|
13889
13956
|
#sameGraphRunOwnerOverride;
|
|
13890
13957
|
#suppressGraphPartialOutputs = false;
|
|
@@ -14366,7 +14433,8 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14366
14433
|
processingQueue: new pQueueCompat_default({ concurrency: this.#concurrency.nodeConcurrency }),
|
|
14367
14434
|
createAbortController: () => this.#newAbortController(),
|
|
14368
14435
|
loadedProjects: this.#cacheLoadedProjects && ((_b = this.#runtimeCache) == null ? void 0 : _b.loadedProjects) ? { ...this.#runtimeCache.loadedProjects } : {},
|
|
14369
|
-
sharedOverride: this.#sharedRunStateOverride
|
|
14436
|
+
sharedOverride: this.#sharedRunStateOverride,
|
|
14437
|
+
costLedger: this.#projectCostScope ? this.#projectCostScope.startsProject ? this.#projectCostScope.parentLedger.createProjectScope() : this.#projectCostScope.parentLedger : void 0
|
|
14370
14438
|
});
|
|
14371
14439
|
this.#shared.executionCache ??= /* @__PURE__ */ new Map();
|
|
14372
14440
|
this.#connectedToolContinuationHost.reset();
|
|
@@ -14562,9 +14630,12 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14562
14630
|
const hostChatV2Observer = this.getRootProcessor().#run.context.onChatV2CallFinished;
|
|
14563
14631
|
const hostLLMChatOutputSnapshotObserver = this.getRootProcessor().#run.context.onLLMChatOutputSnapshot;
|
|
14564
14632
|
const hostLLMProfileAttemptObserver = this.getRootProcessor().#run.context.onLLMProfileAttempt;
|
|
14565
|
-
const costLedger = this
|
|
14633
|
+
const costLedger = this.#run.costLedger;
|
|
14634
|
+
const { rootRunId, graphRunId } = this.#run;
|
|
14635
|
+
const isCurrentInvocation = () => this.#run.rootRunId === rootRunId && this.#run.graphRunId === graphRunId;
|
|
14566
14636
|
this.#run.nodeProcessContextBase = {
|
|
14567
14637
|
...this.#run.context,
|
|
14638
|
+
getRunCostBreakdown: () => costLedger.breakdown(),
|
|
14568
14639
|
abortGraph: (error) => {
|
|
14569
14640
|
void (this.#abortOwnerOverride ?? this).abort(error === void 0, error);
|
|
14570
14641
|
},
|
|
@@ -14585,7 +14656,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14585
14656
|
try {
|
|
14586
14657
|
costLedger.observeChat(event);
|
|
14587
14658
|
} catch {
|
|
14588
|
-
costLedger.markUnobserved();
|
|
14659
|
+
costLedger.markUnobserved("llm");
|
|
14589
14660
|
}
|
|
14590
14661
|
try {
|
|
14591
14662
|
const observerResult = hostChatV2Observer == null ? void 0 : hostChatV2Observer(event);
|
|
@@ -14594,6 +14665,7 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14594
14665
|
}
|
|
14595
14666
|
} catch {
|
|
14596
14667
|
}
|
|
14668
|
+
if (!isCurrentInvocation()) return;
|
|
14597
14669
|
const { rawUsage: _rawUsage, ...traceEvent } = event;
|
|
14598
14670
|
emitDetached(this.#emitter, "llmCallFinished", this.#withExecution(traceEvent));
|
|
14599
14671
|
},
|
|
@@ -14605,13 +14677,13 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14605
14677
|
}
|
|
14606
14678
|
} catch {
|
|
14607
14679
|
}
|
|
14608
|
-
emitDetached(this.#emitter, "llmChatOutputSnapshot", this.#withExecution(event));
|
|
14680
|
+
if (isCurrentInvocation()) emitDetached(this.#emitter, "llmChatOutputSnapshot", this.#withExecution(event));
|
|
14609
14681
|
},
|
|
14610
14682
|
onLLMProfileAttempt: (event) => {
|
|
14611
14683
|
try {
|
|
14612
14684
|
costLedger.observeClassifier(event);
|
|
14613
14685
|
} catch {
|
|
14614
|
-
costLedger.markUnobserved();
|
|
14686
|
+
costLedger.markUnobserved("decisionAI");
|
|
14615
14687
|
}
|
|
14616
14688
|
try {
|
|
14617
14689
|
const observerResult = hostLLMProfileAttemptObserver == null ? void 0 : hostLLMProfileAttemptObserver(event);
|
|
@@ -14620,10 +14692,10 @@ var GraphProcessor = class _GraphProcessor {
|
|
|
14620
14692
|
}
|
|
14621
14693
|
} catch {
|
|
14622
14694
|
}
|
|
14623
|
-
emitDetached(this.#emitter, "llmProfileAttempt", this.#withExecution(event));
|
|
14695
|
+
if (isCurrentInvocation()) emitDetached(this.#emitter, "llmProfileAttempt", this.#withExecution(event));
|
|
14624
14696
|
},
|
|
14625
14697
|
onToolCallFinished: (event) => {
|
|
14626
|
-
emitDetached(this.#emitter, "toolCallFinished", this.#withExecution(event));
|
|
14698
|
+
if (isCurrentInvocation()) emitDetached(this.#emitter, "toolCallFinished", this.#withExecution(event));
|
|
14627
14699
|
},
|
|
14628
14700
|
project: this.#project,
|
|
14629
14701
|
raiseEvent: (event, data) => {
|
|
@@ -15937,7 +16009,7 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
15937
16009
|
nodeAbortController.abort(getAbortSignalReason(this.#run.abortController.signal));
|
|
15938
16010
|
}
|
|
15939
16011
|
let continuationFinalized = false;
|
|
15940
|
-
const costLedger = this
|
|
16012
|
+
const costLedger = this.#run.costLedger;
|
|
15941
16013
|
const accountingKey = `${this.#run.graphRunId}:${processId}:${index}`;
|
|
15942
16014
|
let accountingEntered = false;
|
|
15943
16015
|
let observedPhysicalCall = false;
|
|
@@ -16010,10 +16082,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
16010
16082
|
const cost = accountingOutputs == null ? void 0 : accountingOutputs["cost"];
|
|
16011
16083
|
costLedger.observeLegacy(accountingKey, (cost == null ? void 0 : cost.type) === "number" ? cost.value : void 0);
|
|
16012
16084
|
} else if ((node.type === "llmChatV2" || node.type === "classifierEvaluate") && !observedPhysicalCall) {
|
|
16013
|
-
costLedger.markUnobserved();
|
|
16085
|
+
costLedger.markUnobserved(node.type === "classifierEvaluate" ? "decisionAI" : "llm");
|
|
16014
16086
|
}
|
|
16015
16087
|
} catch {
|
|
16016
|
-
costLedger.markUnobserved();
|
|
16088
|
+
costLedger.markUnobserved(node.type === "classifierEvaluate" ? "decisionAI" : "llm");
|
|
16017
16089
|
}
|
|
16018
16090
|
}
|
|
16019
16091
|
if (!continuationFinalized) {
|
|
@@ -17338,6 +17410,10 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
17338
17410
|
processor.#externalFunctions = this.#externalFunctions;
|
|
17339
17411
|
processor.#contextValues = this.#contextValues;
|
|
17340
17412
|
processor.#parent = this;
|
|
17413
|
+
processor.#projectCostScope = {
|
|
17414
|
+
parentLedger: this.#run.costLedger,
|
|
17415
|
+
startsProject: ordinary && invocation.startsProject
|
|
17416
|
+
};
|
|
17341
17417
|
processor.#recordingProjectScope = this.#recordingProjectScope;
|
|
17342
17418
|
processor.#graphCallPath = this.#graphCallPath;
|
|
17343
17419
|
processor.#frozenNodeOutputResolver = this.#frozenNodeOutputResolver;
|
|
@@ -17413,7 +17489,8 @@ ${errors.map(({ node }) => `- ${node.title} (${node.id})`).join("\n")}`;
|
|
|
17413
17489
|
kind: "subgraph",
|
|
17414
17490
|
project: subprocessorProject,
|
|
17415
17491
|
graphId: subGraphId,
|
|
17416
|
-
initialExecutionPlan
|
|
17492
|
+
initialExecutionPlan,
|
|
17493
|
+
startsProject: subprocessorProject !== this.#project || node.type === "subGraph" && Boolean(node.data.targetProjectId)
|
|
17417
17494
|
});
|
|
17418
17495
|
} finally {
|
|
17419
17496
|
this.#finishRuntimeProfile("createSubProcessor", createProfileStart);
|
|
@@ -34848,11 +34925,67 @@ var ProjectNameNodeImpl = class extends NodeImpl {
|
|
|
34848
34925
|
};
|
|
34849
34926
|
var projectNameNode = nodeDefinition(ProjectNameNodeImpl, "Project Name");
|
|
34850
34927
|
|
|
34928
|
+
// src/model/nodes/AICostNode.ts
|
|
34929
|
+
var import_non_secure43 = require("nanoid/non-secure");
|
|
34930
|
+
var AICostNodeImpl = class extends NodeImpl {
|
|
34931
|
+
static create() {
|
|
34932
|
+
return {
|
|
34933
|
+
type: "aiCost",
|
|
34934
|
+
title: "AI Cost",
|
|
34935
|
+
id: (0, import_non_secure43.nanoid)(),
|
|
34936
|
+
visualData: { x: 0, y: 0, width: 250 },
|
|
34937
|
+
data: {}
|
|
34938
|
+
};
|
|
34939
|
+
}
|
|
34940
|
+
getInputDefinitions() {
|
|
34941
|
+
return [];
|
|
34942
|
+
}
|
|
34943
|
+
getOutputDefinitions() {
|
|
34944
|
+
return [
|
|
34945
|
+
{ id: "llmCost", title: "LLM cost", dataType: "number" },
|
|
34946
|
+
{ id: "decisionAICost", title: "Decision AI cost", dataType: "number" },
|
|
34947
|
+
{ id: "totalCost", title: "Sum cost", dataType: "number" }
|
|
34948
|
+
];
|
|
34949
|
+
}
|
|
34950
|
+
static getUIData() {
|
|
34951
|
+
return {
|
|
34952
|
+
contextMenuTitle: "AI Cost",
|
|
34953
|
+
infoBoxTitle: "AI Cost",
|
|
34954
|
+
group: ["Debug"],
|
|
34955
|
+
infoBoxBody: "Returns observed AI cost estimates in USD for the current project invocation and projects it calls, excluding callers and sibling invocations. Uses the same accounting as Run statistics. Enable Conditional node to control when it runs; use Did Run to wait for multiple branches. In-flight and future calls are not yet included; unknown prices are not free."
|
|
34956
|
+
};
|
|
34957
|
+
}
|
|
34958
|
+
getBody() {
|
|
34959
|
+
return "Observed AI estimates (USD)\nCurrent project subtree";
|
|
34960
|
+
}
|
|
34961
|
+
getRunActivityDescriptor() {
|
|
34962
|
+
return { primaryOutputPortId: "totalCost" };
|
|
34963
|
+
}
|
|
34964
|
+
async process(_inputs, context) {
|
|
34965
|
+
if (!context.getRunCostBreakdown)
|
|
34966
|
+
throw new Error("AI Cost accounting is unavailable in this execution environment.");
|
|
34967
|
+
const costs = context.getRunCostBreakdown();
|
|
34968
|
+
const value = (cost) => cost.knownCostUsd === null ? { type: "control-flow-excluded", value: void 0 } : { type: "number", value: cost.knownCostUsd };
|
|
34969
|
+
const outputs = {
|
|
34970
|
+
["llmCost"]: value(costs.llm),
|
|
34971
|
+
["decisionAICost"]: value(costs.decisionAI),
|
|
34972
|
+
["totalCost"]: value(costs.total)
|
|
34973
|
+
};
|
|
34974
|
+
if (costs.total.status !== "complete")
|
|
34975
|
+
addWarning(
|
|
34976
|
+
outputs,
|
|
34977
|
+
"Some observed AI costs are unknown. Numeric outputs are known subtotals; unavailable amounts are not zero."
|
|
34978
|
+
);
|
|
34979
|
+
return outputs;
|
|
34980
|
+
}
|
|
34981
|
+
};
|
|
34982
|
+
var aiCostNode = nodeDefinition(AICostNodeImpl, "AI Cost");
|
|
34983
|
+
|
|
34851
34984
|
// src/model/nodes/CoalesceNode.ts
|
|
34852
34985
|
var import_ts_dedent32 = require("ts-dedent");
|
|
34853
34986
|
|
|
34854
34987
|
// src/model/nodes/CoalesceNodeBase.ts
|
|
34855
|
-
var
|
|
34988
|
+
var import_non_secure44 = require("nanoid/non-secure");
|
|
34856
34989
|
var INPUT_PORT_ID_PATTERN = /^input(\d+)$/;
|
|
34857
34990
|
var IGNORE_NULL_LABEL = "Ignore 'null'";
|
|
34858
34991
|
var IGNORE_UNDEFINED_LABEL = "Ignore 'undefined'";
|
|
@@ -34860,7 +34993,7 @@ function createCoalesceNode(type, title) {
|
|
|
34860
34993
|
return {
|
|
34861
34994
|
type,
|
|
34862
34995
|
title,
|
|
34863
|
-
id: (0,
|
|
34996
|
+
id: (0, import_non_secure44.nanoid)(),
|
|
34864
34997
|
data: {
|
|
34865
34998
|
ignoreNull: false,
|
|
34866
34999
|
ignoreUndefined: false
|
|
@@ -35016,14 +35149,14 @@ var CoalesceNewNodeImpl = class extends CoalesceNodeBase {
|
|
|
35016
35149
|
var coalesceNewNode = nodeDefinition(CoalesceNewNodeImpl, "Coalesce");
|
|
35017
35150
|
|
|
35018
35151
|
// src/model/nodes/DidRunNode.ts
|
|
35019
|
-
var
|
|
35152
|
+
var import_non_secure45 = require("nanoid/non-secure");
|
|
35020
35153
|
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.';
|
|
35021
35154
|
var DidRunNodeImpl = class extends NodeImpl {
|
|
35022
35155
|
static create() {
|
|
35023
35156
|
return {
|
|
35024
35157
|
type: "didRun",
|
|
35025
35158
|
title: "Did Run",
|
|
35026
|
-
id: (0,
|
|
35159
|
+
id: (0, import_non_secure45.nanoid)(),
|
|
35027
35160
|
data: {},
|
|
35028
35161
|
visualData: {
|
|
35029
35162
|
x: 0,
|
|
@@ -35091,7 +35224,7 @@ var DidRunNodeImpl = class extends NodeImpl {
|
|
|
35091
35224
|
var didRunNode = nodeDefinition(DidRunNodeImpl, "Did Run");
|
|
35092
35225
|
|
|
35093
35226
|
// src/model/nodes/PassthroughNode.ts
|
|
35094
|
-
var
|
|
35227
|
+
var import_non_secure46 = require("nanoid/non-secure");
|
|
35095
35228
|
var import_ts_dedent34 = require("ts-dedent");
|
|
35096
35229
|
var INPUT_PORT_PATTERN2 = /^input(\d+)$/;
|
|
35097
35230
|
var OUTPUT_PORT_PATTERN2 = /^output(\d+)$/;
|
|
@@ -35115,7 +35248,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
35115
35248
|
const chartNode = {
|
|
35116
35249
|
type: "passthrough",
|
|
35117
35250
|
title: "Passthrough",
|
|
35118
|
-
id: (0,
|
|
35251
|
+
id: (0, import_non_secure46.nanoid)(),
|
|
35119
35252
|
data: {},
|
|
35120
35253
|
visualData: {
|
|
35121
35254
|
x: 0,
|
|
@@ -35176,7 +35309,7 @@ var PassthroughNodeImpl = class extends NodeImpl {
|
|
|
35176
35309
|
var passthroughNode = nodeDefinition(PassthroughNodeImpl, "Passthrough");
|
|
35177
35310
|
|
|
35178
35311
|
// src/model/nodes/DataBusNode.ts
|
|
35179
|
-
var
|
|
35312
|
+
var import_non_secure47 = require("nanoid/non-secure");
|
|
35180
35313
|
var import_ts_dedent35 = require("ts-dedent");
|
|
35181
35314
|
function getConnectedChannelIndices(connections, nodeId) {
|
|
35182
35315
|
const channelIndices = /* @__PURE__ */ new Set();
|
|
@@ -35209,7 +35342,7 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
35209
35342
|
static create = () => ({
|
|
35210
35343
|
type: "dataBus",
|
|
35211
35344
|
title: "Data Bus",
|
|
35212
|
-
id: (0,
|
|
35345
|
+
id: (0, import_non_secure47.nanoid)(),
|
|
35213
35346
|
data: {},
|
|
35214
35347
|
visualData: {
|
|
35215
35348
|
x: 0,
|
|
@@ -35253,13 +35386,13 @@ var DataBusNodeImpl = class extends NodeImpl {
|
|
|
35253
35386
|
var dataBusNode = nodeDefinition(DataBusNodeImpl, "Data Bus");
|
|
35254
35387
|
|
|
35255
35388
|
// src/model/nodes/StartBackgroundBranchNode.ts
|
|
35256
|
-
var
|
|
35389
|
+
var import_non_secure48 = require("nanoid/non-secure");
|
|
35257
35390
|
var import_ts_dedent36 = require("ts-dedent");
|
|
35258
35391
|
var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
35259
35392
|
static create = () => ({
|
|
35260
35393
|
type: "startBackgroundBranch",
|
|
35261
35394
|
title: "Start Async Branch",
|
|
35262
|
-
id: (0,
|
|
35395
|
+
id: (0, import_non_secure48.nanoid)(),
|
|
35263
35396
|
data: {},
|
|
35264
35397
|
visualData: {
|
|
35265
35398
|
x: 0,
|
|
@@ -35310,7 +35443,7 @@ var StartBackgroundBranchNodeImpl = class extends NodeImpl {
|
|
|
35310
35443
|
var startBackgroundBranchNode = nodeDefinition(StartBackgroundBranchNodeImpl, "Start Async Branch");
|
|
35311
35444
|
|
|
35312
35445
|
// src/model/nodes/WatchStreamingOutputNode.ts
|
|
35313
|
-
var
|
|
35446
|
+
var import_non_secure49 = require("nanoid/non-secure");
|
|
35314
35447
|
var import_ts_dedent37 = require("ts-dedent");
|
|
35315
35448
|
var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
35316
35449
|
static create() {
|
|
@@ -35323,7 +35456,7 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
35323
35456
|
maxQueuedUpdates: streamingOutputWatchDefaults.maxQueuedUpdates,
|
|
35324
35457
|
queueOverflowBehavior: streamingOutputWatchDefaults.queueOverflowBehavior
|
|
35325
35458
|
},
|
|
35326
|
-
id: (0,
|
|
35459
|
+
id: (0, import_non_secure49.nanoid)(),
|
|
35327
35460
|
title: "Watch streaming",
|
|
35328
35461
|
type: "watchStreamingOutput",
|
|
35329
35462
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -35433,13 +35566,13 @@ var WatchStreamingOutputNodeImpl = class extends NodeImpl {
|
|
|
35433
35566
|
var watchStreamingOutputNode = nodeDefinition(WatchStreamingOutputNodeImpl, "Watch streaming");
|
|
35434
35567
|
|
|
35435
35568
|
// src/model/nodes/StopWatchingStreamingOutputNode.ts
|
|
35436
|
-
var
|
|
35569
|
+
var import_non_secure50 = require("nanoid/non-secure");
|
|
35437
35570
|
var import_ts_dedent38 = require("ts-dedent");
|
|
35438
35571
|
var StopWatchingStreamingOutputNodeImpl = class extends NodeImpl {
|
|
35439
35572
|
static create() {
|
|
35440
35573
|
return {
|
|
35441
35574
|
data: {},
|
|
35442
|
-
id: (0,
|
|
35575
|
+
id: (0, import_non_secure50.nanoid)(),
|
|
35443
35576
|
title: "Stop watching streaming",
|
|
35444
35577
|
type: "stopWatchingStreamingOutput",
|
|
35445
35578
|
visualData: { x: 0, y: 0, width: 230 }
|
|
@@ -35486,11 +35619,11 @@ var stopWatchingStreamingOutputNode = nodeDefinition(
|
|
|
35486
35619
|
);
|
|
35487
35620
|
|
|
35488
35621
|
// src/model/nodes/StreamValueNode.ts
|
|
35489
|
-
var
|
|
35622
|
+
var import_non_secure51 = require("nanoid/non-secure");
|
|
35490
35623
|
var StreamValueNodeImpl = class extends NodeImpl {
|
|
35491
35624
|
static create() {
|
|
35492
35625
|
return {
|
|
35493
|
-
id: (0,
|
|
35626
|
+
id: (0, import_non_secure51.nanoid)(),
|
|
35494
35627
|
type: "streamValue",
|
|
35495
35628
|
title: "Stream value",
|
|
35496
35629
|
data: {},
|
|
@@ -35523,14 +35656,14 @@ var StreamValueNodeImpl = class extends NodeImpl {
|
|
|
35523
35656
|
var streamValueNode = nodeDefinition(StreamValueNodeImpl, "Stream value");
|
|
35524
35657
|
|
|
35525
35658
|
// src/model/nodes/PopNode.ts
|
|
35526
|
-
var
|
|
35659
|
+
var import_non_secure52 = require("nanoid/non-secure");
|
|
35527
35660
|
var import_ts_dedent39 = require("ts-dedent");
|
|
35528
35661
|
var PopNodeImpl = class extends NodeImpl {
|
|
35529
35662
|
static create() {
|
|
35530
35663
|
const baseNode = {
|
|
35531
35664
|
type: "pop",
|
|
35532
35665
|
title: "Pop",
|
|
35533
|
-
id: (0,
|
|
35666
|
+
id: (0, import_non_secure52.nanoid)(),
|
|
35534
35667
|
visualData: {
|
|
35535
35668
|
x: 0,
|
|
35536
35669
|
y: 0,
|
|
@@ -35611,14 +35744,14 @@ var PopNodeImpl = class extends NodeImpl {
|
|
|
35611
35744
|
var popNode = nodeDefinition(PopNodeImpl, "Pop");
|
|
35612
35745
|
|
|
35613
35746
|
// src/model/nodes/SetGlobalNode.ts
|
|
35614
|
-
var
|
|
35747
|
+
var import_non_secure53 = require("nanoid/non-secure");
|
|
35615
35748
|
var import_ts_dedent40 = require("ts-dedent");
|
|
35616
35749
|
var SetGlobalNodeImpl = class extends NodeImpl {
|
|
35617
35750
|
static create() {
|
|
35618
35751
|
const chartNode = {
|
|
35619
35752
|
type: "setGlobal",
|
|
35620
35753
|
title: "Set Global",
|
|
35621
|
-
id: (0,
|
|
35754
|
+
id: (0, import_non_secure53.nanoid)(),
|
|
35622
35755
|
visualData: {
|
|
35623
35756
|
x: 0,
|
|
35624
35757
|
y: 0,
|
|
@@ -35731,14 +35864,14 @@ var SetGlobalNodeImpl = class extends NodeImpl {
|
|
|
35731
35864
|
var setGlobalNode = nodeDefinition(SetGlobalNodeImpl, "Set Global");
|
|
35732
35865
|
|
|
35733
35866
|
// src/model/nodes/GetGlobalNode.ts
|
|
35734
|
-
var
|
|
35867
|
+
var import_non_secure54 = require("nanoid/non-secure");
|
|
35735
35868
|
var import_ts_dedent41 = require("ts-dedent");
|
|
35736
35869
|
var GetGlobalNodeImpl = class extends NodeImpl {
|
|
35737
35870
|
static create() {
|
|
35738
35871
|
const chartNode = {
|
|
35739
35872
|
type: "getGlobal",
|
|
35740
35873
|
title: "Get Global",
|
|
35741
|
-
id: (0,
|
|
35874
|
+
id: (0, import_non_secure54.nanoid)(),
|
|
35742
35875
|
visualData: {
|
|
35743
35876
|
x: 0,
|
|
35744
35877
|
y: 0,
|
|
@@ -35865,7 +35998,7 @@ var GetGlobalNodeImpl = class extends NodeImpl {
|
|
|
35865
35998
|
var getGlobalNode = nodeDefinition(GetGlobalNodeImpl, "Get Global");
|
|
35866
35999
|
|
|
35867
36000
|
// src/model/nodes/SetStoredValueNode.ts
|
|
35868
|
-
var
|
|
36001
|
+
var import_non_secure55 = require("nanoid/non-secure");
|
|
35869
36002
|
var import_ts_dedent42 = require("ts-dedent");
|
|
35870
36003
|
|
|
35871
36004
|
// src/model/nodes/StoredValueNodeUtils.ts
|
|
@@ -35930,7 +36063,7 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
35930
36063
|
return {
|
|
35931
36064
|
type: "setStoredValue",
|
|
35932
36065
|
title: "Set Stored Value",
|
|
35933
|
-
id: (0,
|
|
36066
|
+
id: (0, import_non_secure55.nanoid)(),
|
|
35934
36067
|
visualData: { x: 0, y: 0, width: 220 },
|
|
35935
36068
|
data: { dataType: "string", key: "key", useKeyInput: false }
|
|
35936
36069
|
};
|
|
@@ -36000,14 +36133,14 @@ var SetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
36000
36133
|
var setStoredValueNode = nodeDefinition(SetStoredValueNodeImpl, "Set Stored Value");
|
|
36001
36134
|
|
|
36002
36135
|
// src/model/nodes/GetStoredValueNode.ts
|
|
36003
|
-
var
|
|
36136
|
+
var import_non_secure56 = require("nanoid/non-secure");
|
|
36004
36137
|
var import_ts_dedent43 = require("ts-dedent");
|
|
36005
36138
|
var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
36006
36139
|
static create() {
|
|
36007
36140
|
return {
|
|
36008
36141
|
type: "getStoredValue",
|
|
36009
36142
|
title: "Get Stored Value",
|
|
36010
|
-
id: (0,
|
|
36143
|
+
id: (0, import_non_secure56.nanoid)(),
|
|
36011
36144
|
visualData: { x: 0, y: 0, width: 220 },
|
|
36012
36145
|
data: { dataType: "string", key: "key", onDemand: false, useKeyInput: false, wait: false }
|
|
36013
36146
|
};
|
|
@@ -36100,12 +36233,12 @@ var GetStoredValueNodeImpl = class extends NodeImpl {
|
|
|
36100
36233
|
var getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, "Get Stored Value");
|
|
36101
36234
|
|
|
36102
36235
|
// src/model/nodes/WaitForEventNode.ts
|
|
36103
|
-
var
|
|
36236
|
+
var import_non_secure57 = require("nanoid/non-secure");
|
|
36104
36237
|
var import_ts_dedent44 = require("ts-dedent");
|
|
36105
36238
|
var WaitForEventNodeImpl = class extends NodeImpl {
|
|
36106
36239
|
static create() {
|
|
36107
36240
|
return {
|
|
36108
|
-
id: (0,
|
|
36241
|
+
id: (0, import_non_secure57.nanoid)(),
|
|
36109
36242
|
type: "waitForEvent",
|
|
36110
36243
|
title: "Wait For Event",
|
|
36111
36244
|
visualData: { x: 0, y: 0, width: 150 },
|
|
@@ -36180,7 +36313,7 @@ var WaitForEventNodeImpl = class extends NodeImpl {
|
|
|
36180
36313
|
var waitForEventNode = nodeDefinition(WaitForEventNodeImpl, "Wait For Event");
|
|
36181
36314
|
|
|
36182
36315
|
// src/model/nodes/ToolNode.ts
|
|
36183
|
-
var
|
|
36316
|
+
var import_non_secure58 = require("nanoid/non-secure");
|
|
36184
36317
|
var import_ts_dedent45 = require("ts-dedent");
|
|
36185
36318
|
var TOOL_NODE_BODY_PREVIEW_MAX_LINES = 14;
|
|
36186
36319
|
function getToolNodeBodyPreview(data) {
|
|
@@ -36199,7 +36332,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
36199
36332
|
const chartNode = {
|
|
36200
36333
|
type: "gptFunction",
|
|
36201
36334
|
title: "Tool",
|
|
36202
|
-
id: (0,
|
|
36335
|
+
id: (0, import_non_secure58.nanoid)(),
|
|
36203
36336
|
visualData: {
|
|
36204
36337
|
x: 0,
|
|
36205
36338
|
y: 0,
|
|
@@ -36389,7 +36522,7 @@ var GptFunctionNodeImpl = class extends NodeImpl {
|
|
|
36389
36522
|
var gptFunctionNode = nodeDefinition(GptFunctionNodeImpl, "Tool");
|
|
36390
36523
|
|
|
36391
36524
|
// src/model/nodes/ToYamlNode.ts
|
|
36392
|
-
var
|
|
36525
|
+
var import_non_secure59 = require("nanoid/non-secure");
|
|
36393
36526
|
var import_yaml2 = __toESM(require("yaml"), 1);
|
|
36394
36527
|
var import_ts_dedent46 = require("ts-dedent");
|
|
36395
36528
|
var ToYamlNodeImpl = class extends NodeImpl {
|
|
@@ -36397,7 +36530,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
36397
36530
|
const chartNode = {
|
|
36398
36531
|
type: "toYaml",
|
|
36399
36532
|
title: "To YAML",
|
|
36400
|
-
id: (0,
|
|
36533
|
+
id: (0, import_non_secure59.nanoid)(),
|
|
36401
36534
|
visualData: {
|
|
36402
36535
|
x: 0,
|
|
36403
36536
|
y: 0,
|
|
@@ -36453,7 +36586,7 @@ var ToYamlNodeImpl = class extends NodeImpl {
|
|
|
36453
36586
|
var toYamlNode = nodeDefinition(ToYamlNodeImpl, "To YAML");
|
|
36454
36587
|
|
|
36455
36588
|
// src/model/nodes/GetEmbeddingNode.ts
|
|
36456
|
-
var
|
|
36589
|
+
var import_non_secure60 = require("nanoid/non-secure");
|
|
36457
36590
|
var import_ts_dedent47 = require("ts-dedent");
|
|
36458
36591
|
|
|
36459
36592
|
// src/integrations/integrations.ts
|
|
@@ -36477,7 +36610,7 @@ function getIntegration(type, integrationKey, context) {
|
|
|
36477
36610
|
var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
36478
36611
|
static create() {
|
|
36479
36612
|
return {
|
|
36480
|
-
id: (0,
|
|
36613
|
+
id: (0, import_non_secure60.nanoid)(),
|
|
36481
36614
|
type: "getEmbedding",
|
|
36482
36615
|
title: "Get Embedding",
|
|
36483
36616
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -36592,12 +36725,12 @@ var GetEmbeddingNodeImpl = class extends NodeImpl {
|
|
|
36592
36725
|
var getEmbeddingNode = nodeDefinition(GetEmbeddingNodeImpl, "Get Embedding");
|
|
36593
36726
|
|
|
36594
36727
|
// src/model/nodes/VectorStoreNode.ts
|
|
36595
|
-
var
|
|
36728
|
+
var import_non_secure61 = require("nanoid/non-secure");
|
|
36596
36729
|
var import_ts_dedent48 = require("ts-dedent");
|
|
36597
36730
|
var VectorStoreNodeImpl = class extends NodeImpl {
|
|
36598
36731
|
static create() {
|
|
36599
36732
|
return {
|
|
36600
|
-
id: (0,
|
|
36733
|
+
id: (0, import_non_secure61.nanoid)(),
|
|
36601
36734
|
type: "vectorStore",
|
|
36602
36735
|
title: "Vector Store",
|
|
36603
36736
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -36715,12 +36848,12 @@ var VectorStoreNodeImpl = class extends NodeImpl {
|
|
|
36715
36848
|
var vectorStoreNode = nodeDefinition(VectorStoreNodeImpl, "Vector Store");
|
|
36716
36849
|
|
|
36717
36850
|
// src/model/nodes/VectorNearestNeighborsNode.ts
|
|
36718
|
-
var
|
|
36851
|
+
var import_non_secure62 = require("nanoid/non-secure");
|
|
36719
36852
|
var import_ts_dedent49 = require("ts-dedent");
|
|
36720
36853
|
var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
36721
36854
|
static create() {
|
|
36722
36855
|
return {
|
|
36723
|
-
id: (0,
|
|
36856
|
+
id: (0, import_non_secure62.nanoid)(),
|
|
36724
36857
|
type: "vectorNearestNeighbors",
|
|
36725
36858
|
title: "Vector KNN",
|
|
36726
36859
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -36841,12 +36974,12 @@ var VectorNearestNeighborsNodeImpl = class extends NodeImpl {
|
|
|
36841
36974
|
var vectorNearestNeighborsNode = nodeDefinition(VectorNearestNeighborsNodeImpl, "Vector KNN");
|
|
36842
36975
|
|
|
36843
36976
|
// src/model/nodes/KnowledgeSourceNode.ts
|
|
36844
|
-
var
|
|
36977
|
+
var import_non_secure63 = require("nanoid/non-secure");
|
|
36845
36978
|
var import_ts_dedent50 = require("ts-dedent");
|
|
36846
36979
|
var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
36847
36980
|
static create() {
|
|
36848
36981
|
return {
|
|
36849
|
-
id: (0,
|
|
36982
|
+
id: (0, import_non_secure63.nanoid)(),
|
|
36850
36983
|
type: "knowledgeSource",
|
|
36851
36984
|
title: "Knowledge Source",
|
|
36852
36985
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -36938,12 +37071,12 @@ var KnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
|
36938
37071
|
var knowledgeSourceNode = nodeDefinition(KnowledgeSourceNodeImpl, "Knowledge Source");
|
|
36939
37072
|
|
|
36940
37073
|
// src/model/nodes/KnowledgeDocumentNode.ts
|
|
36941
|
-
var
|
|
37074
|
+
var import_non_secure64 = require("nanoid/non-secure");
|
|
36942
37075
|
var import_ts_dedent51 = require("ts-dedent");
|
|
36943
37076
|
var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
36944
37077
|
static create() {
|
|
36945
37078
|
return {
|
|
36946
|
-
id: (0,
|
|
37079
|
+
id: (0, import_non_secure64.nanoid)(),
|
|
36947
37080
|
type: "knowledgeDocument",
|
|
36948
37081
|
title: "Knowledge Document",
|
|
36949
37082
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -37020,12 +37153,12 @@ var KnowledgeDocumentNodeImpl = class extends NodeImpl {
|
|
|
37020
37153
|
var knowledgeDocumentNode = nodeDefinition(KnowledgeDocumentNodeImpl, "Knowledge Document");
|
|
37021
37154
|
|
|
37022
37155
|
// src/model/nodes/SyncKnowledgeSourceNode.ts
|
|
37023
|
-
var
|
|
37156
|
+
var import_non_secure65 = require("nanoid/non-secure");
|
|
37024
37157
|
var import_ts_dedent52 = require("ts-dedent");
|
|
37025
37158
|
var SyncKnowledgeSourceNodeImpl = class extends NodeImpl {
|
|
37026
37159
|
static create() {
|
|
37027
37160
|
return {
|
|
37028
|
-
id: (0,
|
|
37161
|
+
id: (0, import_non_secure65.nanoid)(),
|
|
37029
37162
|
type: "syncKnowledgeSource",
|
|
37030
37163
|
title: "Sync Knowledge Source",
|
|
37031
37164
|
visualData: { x: 0, y: 0, width: 290 },
|
|
@@ -37165,11 +37298,11 @@ function normalizeDocumentsInput(value) {
|
|
|
37165
37298
|
var syncKnowledgeSourceNode = nodeDefinition(SyncKnowledgeSourceNodeImpl, "Sync Knowledge Source");
|
|
37166
37299
|
|
|
37167
37300
|
// src/model/nodes/GetKnowledgeSourceStatusNode.ts
|
|
37168
|
-
var
|
|
37301
|
+
var import_non_secure66 = require("nanoid/non-secure");
|
|
37169
37302
|
var GetKnowledgeSourceStatusNodeImpl = class extends NodeImpl {
|
|
37170
37303
|
static create() {
|
|
37171
37304
|
return {
|
|
37172
|
-
id: (0,
|
|
37305
|
+
id: (0, import_non_secure66.nanoid)(),
|
|
37173
37306
|
type: "getKnowledgeSourceStatus",
|
|
37174
37307
|
title: "Get Knowledge Source Status",
|
|
37175
37308
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -37248,12 +37381,12 @@ var getKnowledgeSourceStatusNode = nodeDefinition(
|
|
|
37248
37381
|
);
|
|
37249
37382
|
|
|
37250
37383
|
// src/model/nodes/SearchKnowledgeNode.ts
|
|
37251
|
-
var
|
|
37384
|
+
var import_non_secure67 = require("nanoid/non-secure");
|
|
37252
37385
|
var import_ts_dedent53 = require("ts-dedent");
|
|
37253
37386
|
var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
37254
37387
|
static create() {
|
|
37255
37388
|
return {
|
|
37256
|
-
id: (0,
|
|
37389
|
+
id: (0, import_non_secure67.nanoid)(),
|
|
37257
37390
|
type: "searchKnowledge",
|
|
37258
37391
|
title: "Search Knowledge",
|
|
37259
37392
|
visualData: { x: 0, y: 0, width: 270 },
|
|
@@ -37375,12 +37508,12 @@ var SearchKnowledgeNodeImpl = class extends NodeImpl {
|
|
|
37375
37508
|
var searchKnowledgeNode = nodeDefinition(SearchKnowledgeNodeImpl, "Search Knowledge");
|
|
37376
37509
|
|
|
37377
37510
|
// src/model/nodes/BuildKnowledgeContextNode.ts
|
|
37378
|
-
var
|
|
37511
|
+
var import_non_secure68 = require("nanoid/non-secure");
|
|
37379
37512
|
var import_ts_dedent54 = require("ts-dedent");
|
|
37380
37513
|
var BuildKnowledgeContextNodeImpl = class extends NodeImpl {
|
|
37381
37514
|
static create() {
|
|
37382
37515
|
return {
|
|
37383
|
-
id: (0,
|
|
37516
|
+
id: (0, import_non_secure68.nanoid)(),
|
|
37384
37517
|
type: "buildKnowledgeContext",
|
|
37385
37518
|
title: "Build Knowledge Context",
|
|
37386
37519
|
visualData: { x: 0, y: 0, width: 280 },
|
|
@@ -37516,7 +37649,7 @@ function buildMetadataLine(evidence, fields) {
|
|
|
37516
37649
|
var buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, "Build Knowledge Context");
|
|
37517
37650
|
|
|
37518
37651
|
// src/model/nodes/HashNode.ts
|
|
37519
|
-
var
|
|
37652
|
+
var import_non_secure69 = require("nanoid/non-secure");
|
|
37520
37653
|
var crypto = __toESM(require("crypto-js"), 1);
|
|
37521
37654
|
var import_ts_pattern3 = require("ts-pattern");
|
|
37522
37655
|
var import_ts_dedent55 = require("ts-dedent");
|
|
@@ -37526,7 +37659,7 @@ var HashNodeImpl = class extends NodeImpl {
|
|
|
37526
37659
|
const chartNode = {
|
|
37527
37660
|
type: "hash",
|
|
37528
37661
|
title: "Hash",
|
|
37529
|
-
id: (0,
|
|
37662
|
+
id: (0, import_non_secure69.nanoid)(),
|
|
37530
37663
|
visualData: {
|
|
37531
37664
|
x: 0,
|
|
37532
37665
|
y: 0,
|
|
@@ -37605,14 +37738,14 @@ var algorithmDisplayName = {
|
|
|
37605
37738
|
var hashNode = nodeDefinition(HashNodeImpl, "Hash");
|
|
37606
37739
|
|
|
37607
37740
|
// src/model/nodes/AbortGraphNode.ts
|
|
37608
|
-
var
|
|
37741
|
+
var import_non_secure70 = require("nanoid/non-secure");
|
|
37609
37742
|
var import_ts_dedent56 = require("ts-dedent");
|
|
37610
37743
|
var AbortGraphNodeImpl = class extends NodeImpl {
|
|
37611
37744
|
static create() {
|
|
37612
37745
|
const chartNode = {
|
|
37613
37746
|
type: "abortGraph",
|
|
37614
37747
|
title: "Abort Graph",
|
|
37615
|
-
id: (0,
|
|
37748
|
+
id: (0, import_non_secure70.nanoid)(),
|
|
37616
37749
|
visualData: {
|
|
37617
37750
|
x: 0,
|
|
37618
37751
|
y: 0,
|
|
@@ -37694,14 +37827,14 @@ var AbortGraphNodeImpl = class extends NodeImpl {
|
|
|
37694
37827
|
var abortGraphNode = nodeDefinition(AbortGraphNodeImpl, "Abort Graph");
|
|
37695
37828
|
|
|
37696
37829
|
// src/model/nodes/RaceInputsNode.ts
|
|
37697
|
-
var
|
|
37830
|
+
var import_non_secure71 = require("nanoid/non-secure");
|
|
37698
37831
|
var import_ts_dedent57 = require("ts-dedent");
|
|
37699
37832
|
var RaceInputsNodeImpl = class extends NodeImpl {
|
|
37700
37833
|
static create() {
|
|
37701
37834
|
const chartNode = {
|
|
37702
37835
|
type: "raceInputs",
|
|
37703
37836
|
title: "Race Inputs",
|
|
37704
|
-
id: (0,
|
|
37837
|
+
id: (0, import_non_secure71.nanoid)(),
|
|
37705
37838
|
visualData: {
|
|
37706
37839
|
x: 0,
|
|
37707
37840
|
y: 0,
|
|
@@ -37765,14 +37898,14 @@ var RaceInputsNodeImpl = class extends NodeImpl {
|
|
|
37765
37898
|
var raceInputsNode = nodeDefinition(RaceInputsNodeImpl, "Race Inputs");
|
|
37766
37899
|
|
|
37767
37900
|
// src/model/nodes/ToJsonNode.ts
|
|
37768
|
-
var
|
|
37901
|
+
var import_non_secure72 = require("nanoid/non-secure");
|
|
37769
37902
|
var import_ts_dedent58 = require("ts-dedent");
|
|
37770
37903
|
var ToJsonNodeImpl = class extends NodeImpl {
|
|
37771
37904
|
static create() {
|
|
37772
37905
|
const chartNode = {
|
|
37773
37906
|
type: "toJson",
|
|
37774
37907
|
title: "To JSON",
|
|
37775
|
-
id: (0,
|
|
37908
|
+
id: (0, import_non_secure72.nanoid)(),
|
|
37776
37909
|
visualData: {
|
|
37777
37910
|
x: 0,
|
|
37778
37911
|
y: 0,
|
|
@@ -37839,7 +37972,7 @@ var ToJsonNodeImpl = class extends NodeImpl {
|
|
|
37839
37972
|
var toJsonNode = nodeDefinition(ToJsonNodeImpl, "To JSON");
|
|
37840
37973
|
|
|
37841
37974
|
// src/model/nodes/ToBase64Node.ts
|
|
37842
|
-
var
|
|
37975
|
+
var import_non_secure73 = require("nanoid/non-secure");
|
|
37843
37976
|
async function getBytesToEncode(input) {
|
|
37844
37977
|
if (!input) {
|
|
37845
37978
|
throw new Error("No data to encode as base64");
|
|
@@ -37898,7 +38031,7 @@ async function getBytesToEncode(input) {
|
|
|
37898
38031
|
var ToBase64NodeImpl = class extends NodeImpl {
|
|
37899
38032
|
static create() {
|
|
37900
38033
|
return {
|
|
37901
|
-
id: (0,
|
|
38034
|
+
id: (0, import_non_secure73.nanoid)(),
|
|
37902
38035
|
type: "toBase64",
|
|
37903
38036
|
title: "To Base64",
|
|
37904
38037
|
visualData: { x: 0, y: 0, width: 175 },
|
|
@@ -37941,14 +38074,14 @@ var ToBase64NodeImpl = class extends NodeImpl {
|
|
|
37941
38074
|
var toBase64Node = nodeDefinition(ToBase64NodeImpl, "To Base64");
|
|
37942
38075
|
|
|
37943
38076
|
// src/model/nodes/JoinNode.ts
|
|
37944
|
-
var
|
|
38077
|
+
var import_non_secure74 = require("nanoid/non-secure");
|
|
37945
38078
|
var import_ts_dedent59 = require("ts-dedent");
|
|
37946
38079
|
var JoinNodeImpl = class extends NodeImpl {
|
|
37947
38080
|
static create = () => {
|
|
37948
38081
|
const chartNode = {
|
|
37949
38082
|
type: "join",
|
|
37950
38083
|
title: "Join",
|
|
37951
|
-
id: (0,
|
|
38084
|
+
id: (0, import_non_secure74.nanoid)(),
|
|
37952
38085
|
data: {
|
|
37953
38086
|
flatten: true,
|
|
37954
38087
|
joinString: "\n"
|
|
@@ -38047,7 +38180,7 @@ var JoinNodeImpl = class extends NodeImpl {
|
|
|
38047
38180
|
var joinNode = nodeDefinition(JoinNodeImpl, "Coalesce");
|
|
38048
38181
|
|
|
38049
38182
|
// src/model/nodes/FilterNode.ts
|
|
38050
|
-
var
|
|
38183
|
+
var import_non_secure75 = require("nanoid/non-secure");
|
|
38051
38184
|
var import_lodash_es12 = require("lodash");
|
|
38052
38185
|
var import_ts_dedent60 = require("ts-dedent");
|
|
38053
38186
|
var FilterNodeImpl = class extends NodeImpl {
|
|
@@ -38055,7 +38188,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
38055
38188
|
const chartNode = {
|
|
38056
38189
|
type: "filter",
|
|
38057
38190
|
title: "Filter",
|
|
38058
|
-
id: (0,
|
|
38191
|
+
id: (0, import_non_secure75.nanoid)(),
|
|
38059
38192
|
visualData: {
|
|
38060
38193
|
x: 0,
|
|
38061
38194
|
y: 0,
|
|
@@ -38117,7 +38250,7 @@ var FilterNodeImpl = class extends NodeImpl {
|
|
|
38117
38250
|
var filterNode = nodeDefinition(FilterNodeImpl, "Filter");
|
|
38118
38251
|
|
|
38119
38252
|
// src/model/nodes/JSFilterNode.ts
|
|
38120
|
-
var
|
|
38253
|
+
var import_non_secure76 = require("nanoid/non-secure");
|
|
38121
38254
|
var import_ts_dedent62 = require("ts-dedent");
|
|
38122
38255
|
|
|
38123
38256
|
// src/model/nodes/jsListCallbackHelpers.ts
|
|
@@ -38349,7 +38482,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
38349
38482
|
const chartNode = {
|
|
38350
38483
|
type: "jsFilter",
|
|
38351
38484
|
title: "JS Filter",
|
|
38352
|
-
id: (0,
|
|
38485
|
+
id: (0, import_non_secure76.nanoid)(),
|
|
38353
38486
|
visualData: {
|
|
38354
38487
|
x: 0,
|
|
38355
38488
|
y: 0,
|
|
@@ -38409,7 +38542,7 @@ var JSFilterNodeImpl = class extends NodeImpl {
|
|
|
38409
38542
|
var jsFilterNode = nodeDefinition(JSFilterNodeImpl, "JS Filter");
|
|
38410
38543
|
|
|
38411
38544
|
// src/model/nodes/JSMapNode.ts
|
|
38412
|
-
var
|
|
38545
|
+
var import_non_secure77 = require("nanoid/non-secure");
|
|
38413
38546
|
var import_ts_dedent63 = require("ts-dedent");
|
|
38414
38547
|
var DEFAULT_CALLBACK_BODY2 = "return item;";
|
|
38415
38548
|
var JSMapNodeImpl = class extends NodeImpl {
|
|
@@ -38417,7 +38550,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
38417
38550
|
const chartNode = {
|
|
38418
38551
|
type: "jsMap",
|
|
38419
38552
|
title: "JS Map",
|
|
38420
|
-
id: (0,
|
|
38553
|
+
id: (0, import_non_secure77.nanoid)(),
|
|
38421
38554
|
visualData: {
|
|
38422
38555
|
x: 0,
|
|
38423
38556
|
y: 0,
|
|
@@ -38477,7 +38610,7 @@ var JSMapNodeImpl = class extends NodeImpl {
|
|
|
38477
38610
|
var jsMapNode = nodeDefinition(JSMapNodeImpl, "JS Map");
|
|
38478
38611
|
|
|
38479
38612
|
// src/model/nodes/ObjectNode.ts
|
|
38480
|
-
var
|
|
38613
|
+
var import_non_secure78 = require("nanoid/non-secure");
|
|
38481
38614
|
var import_ts_dedent64 = require("ts-dedent");
|
|
38482
38615
|
var DEFAULT_JSON_TEMPLATE = `{
|
|
38483
38616
|
"key": "{{input}}"
|
|
@@ -38566,7 +38699,7 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
38566
38699
|
const chartNode = {
|
|
38567
38700
|
type: "object",
|
|
38568
38701
|
title: "Object",
|
|
38569
|
-
id: (0,
|
|
38702
|
+
id: (0, import_non_secure78.nanoid)(),
|
|
38570
38703
|
visualData: {
|
|
38571
38704
|
x: 0,
|
|
38572
38705
|
y: 0,
|
|
@@ -38667,14 +38800,14 @@ var ObjectNodeImpl = class extends NodeImpl {
|
|
|
38667
38800
|
var objectNode = nodeDefinition(ObjectNodeImpl, "Object");
|
|
38668
38801
|
|
|
38669
38802
|
// src/model/nodes/BooleanNode.ts
|
|
38670
|
-
var
|
|
38803
|
+
var import_non_secure79 = require("nanoid/non-secure");
|
|
38671
38804
|
var import_ts_dedent65 = require("ts-dedent");
|
|
38672
38805
|
var BooleanNodeImpl = class extends NodeImpl {
|
|
38673
38806
|
static create() {
|
|
38674
38807
|
const chartNode = {
|
|
38675
38808
|
type: "boolean",
|
|
38676
38809
|
title: "Bool",
|
|
38677
|
-
id: (0,
|
|
38810
|
+
id: (0, import_non_secure79.nanoid)(),
|
|
38678
38811
|
visualData: {
|
|
38679
38812
|
x: 0,
|
|
38680
38813
|
y: 0,
|
|
@@ -38733,7 +38866,7 @@ var BooleanNodeImpl = class extends NodeImpl {
|
|
|
38733
38866
|
var booleanNode = nodeDefinition(BooleanNodeImpl, "Boolean");
|
|
38734
38867
|
|
|
38735
38868
|
// src/model/nodes/CompareNode.ts
|
|
38736
|
-
var
|
|
38869
|
+
var import_non_secure80 = require("nanoid/non-secure");
|
|
38737
38870
|
var import_lodash_es13 = require("lodash");
|
|
38738
38871
|
var import_ts_pattern4 = require("ts-pattern");
|
|
38739
38872
|
var import_ts_dedent66 = require("ts-dedent");
|
|
@@ -38756,7 +38889,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
38756
38889
|
const chartNode = {
|
|
38757
38890
|
type: "compare",
|
|
38758
38891
|
title: "Compare",
|
|
38759
|
-
id: (0,
|
|
38892
|
+
id: (0, import_non_secure80.nanoid)(),
|
|
38760
38893
|
visualData: {
|
|
38761
38894
|
x: 0,
|
|
38762
38895
|
y: 0,
|
|
@@ -38856,7 +38989,7 @@ var CompareNodeImpl = class extends NodeImpl {
|
|
|
38856
38989
|
var compareNode = nodeDefinition(CompareNodeImpl, "Compare");
|
|
38857
38990
|
|
|
38858
38991
|
// src/model/nodes/EvaluateNode.ts
|
|
38859
|
-
var
|
|
38992
|
+
var import_non_secure81 = require("nanoid/non-secure");
|
|
38860
38993
|
var import_ts_pattern5 = require("ts-pattern");
|
|
38861
38994
|
var import_ts_dedent67 = require("ts-dedent");
|
|
38862
38995
|
var unaryOperation = ["abs", "negate"];
|
|
@@ -38866,7 +38999,7 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
38866
38999
|
const chartNode = {
|
|
38867
39000
|
type: "evaluate",
|
|
38868
39001
|
title: "Evaluate",
|
|
38869
|
-
id: (0,
|
|
39002
|
+
id: (0, import_non_secure81.nanoid)(),
|
|
38870
39003
|
visualData: {
|
|
38871
39004
|
x: 0,
|
|
38872
39005
|
y: 0,
|
|
@@ -38980,14 +39113,14 @@ var EvaluateNodeImpl = class extends NodeImpl {
|
|
|
38980
39113
|
var evaluateNode = nodeDefinition(EvaluateNodeImpl, "Evaluate");
|
|
38981
39114
|
|
|
38982
39115
|
// src/model/nodes/NumberNode.ts
|
|
38983
|
-
var
|
|
39116
|
+
var import_non_secure82 = require("nanoid/non-secure");
|
|
38984
39117
|
var import_ts_dedent68 = require("ts-dedent");
|
|
38985
39118
|
var NumberNodeImpl = class extends NodeImpl {
|
|
38986
39119
|
static create() {
|
|
38987
39120
|
const chartNode = {
|
|
38988
39121
|
type: "number",
|
|
38989
39122
|
title: "Number",
|
|
38990
|
-
id: (0,
|
|
39123
|
+
id: (0, import_non_secure82.nanoid)(),
|
|
38991
39124
|
visualData: {
|
|
38992
39125
|
x: 0,
|
|
38993
39126
|
y: 0,
|
|
@@ -39058,7 +39191,7 @@ var NumberNodeImpl = class extends NodeImpl {
|
|
|
39058
39191
|
var numberNode = nodeDefinition(NumberNodeImpl, "Number");
|
|
39059
39192
|
|
|
39060
39193
|
// src/model/nodes/RandomNumberNode.ts
|
|
39061
|
-
var
|
|
39194
|
+
var import_non_secure83 = require("nanoid/non-secure");
|
|
39062
39195
|
var import_ts_dedent69 = require("ts-dedent");
|
|
39063
39196
|
var randomNumberTypeOptions = [
|
|
39064
39197
|
{ value: false, label: "Float" },
|
|
@@ -39069,7 +39202,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
39069
39202
|
const chartNode = {
|
|
39070
39203
|
type: "randomNumber",
|
|
39071
39204
|
title: "Random number",
|
|
39072
|
-
id: (0,
|
|
39205
|
+
id: (0, import_non_secure83.nanoid)(),
|
|
39073
39206
|
visualData: {
|
|
39074
39207
|
x: 0,
|
|
39075
39208
|
y: 0,
|
|
@@ -39167,7 +39300,7 @@ var RandomNumberNodeImpl = class extends NodeImpl {
|
|
|
39167
39300
|
var randomNumberNode = nodeDefinition(RandomNumberNodeImpl, "Random number");
|
|
39168
39301
|
|
|
39169
39302
|
// src/model/nodes/ShuffleNode.ts
|
|
39170
|
-
var
|
|
39303
|
+
var import_non_secure84 = require("nanoid/non-secure");
|
|
39171
39304
|
var import_lodash_es14 = require("lodash");
|
|
39172
39305
|
var import_ts_dedent70 = require("ts-dedent");
|
|
39173
39306
|
var ShuffleNodeImpl = class extends NodeImpl {
|
|
@@ -39175,7 +39308,7 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
39175
39308
|
const chartNode = {
|
|
39176
39309
|
type: "shuffle",
|
|
39177
39310
|
title: "Shuffle",
|
|
39178
|
-
id: (0,
|
|
39311
|
+
id: (0, import_non_secure84.nanoid)(),
|
|
39179
39312
|
visualData: {
|
|
39180
39313
|
x: 0,
|
|
39181
39314
|
y: 0,
|
|
@@ -39229,14 +39362,14 @@ var ShuffleNodeImpl = class extends NodeImpl {
|
|
|
39229
39362
|
var shuffleNode = nodeDefinition(ShuffleNodeImpl, "Shuffle");
|
|
39230
39363
|
|
|
39231
39364
|
// src/model/nodes/CommentNode.ts
|
|
39232
|
-
var
|
|
39365
|
+
var import_non_secure85 = require("nanoid/non-secure");
|
|
39233
39366
|
var import_ts_dedent71 = require("ts-dedent");
|
|
39234
39367
|
var CommentNodeImpl = class extends NodeImpl {
|
|
39235
39368
|
static create() {
|
|
39236
39369
|
const chartNode = {
|
|
39237
39370
|
type: "comment",
|
|
39238
39371
|
title: "Comment",
|
|
39239
|
-
id: (0,
|
|
39372
|
+
id: (0, import_non_secure85.nanoid)(),
|
|
39240
39373
|
visualData: {
|
|
39241
39374
|
x: 0,
|
|
39242
39375
|
y: 0,
|
|
@@ -39297,11 +39430,11 @@ var CommentNodeImpl = class extends NodeImpl {
|
|
|
39297
39430
|
var commentNode = nodeDefinition(CommentNodeImpl, "Comment");
|
|
39298
39431
|
|
|
39299
39432
|
// src/model/nodes/ImageNode.ts
|
|
39300
|
-
var
|
|
39433
|
+
var import_non_secure86 = require("nanoid/non-secure");
|
|
39301
39434
|
var ImageNodeImpl = class extends NodeImpl {
|
|
39302
39435
|
static create() {
|
|
39303
39436
|
return {
|
|
39304
|
-
id: (0,
|
|
39437
|
+
id: (0, import_non_secure86.nanoid)(),
|
|
39305
39438
|
type: "image",
|
|
39306
39439
|
title: "Image",
|
|
39307
39440
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -39435,11 +39568,11 @@ var ImageNodeImpl = class extends NodeImpl {
|
|
|
39435
39568
|
var imageNode = nodeDefinition(ImageNodeImpl, "Image");
|
|
39436
39569
|
|
|
39437
39570
|
// src/model/nodes/AudioNode.ts
|
|
39438
|
-
var
|
|
39571
|
+
var import_non_secure87 = require("nanoid/non-secure");
|
|
39439
39572
|
var AudioNodeImpl = class extends NodeImpl {
|
|
39440
39573
|
static create() {
|
|
39441
39574
|
return {
|
|
39442
|
-
id: (0,
|
|
39575
|
+
id: (0, import_non_secure87.nanoid)(),
|
|
39443
39576
|
type: "audio",
|
|
39444
39577
|
title: "Audio",
|
|
39445
39578
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -39532,7 +39665,7 @@ var AudioNodeImpl = class extends NodeImpl {
|
|
|
39532
39665
|
var audioNode = nodeDefinition(AudioNodeImpl, "Audio");
|
|
39533
39666
|
|
|
39534
39667
|
// src/model/nodes/HttpCallNode.ts
|
|
39535
|
-
var
|
|
39668
|
+
var import_non_secure88 = require("nanoid/non-secure");
|
|
39536
39669
|
var REQUEST_FAILED_OUTPUT_ID = "requestFailed";
|
|
39537
39670
|
var REQUEST_ERROR_OUTPUT_ID = "requestError";
|
|
39538
39671
|
var STATUS_CODE_OUTPUT_ID = "statusCode";
|
|
@@ -39740,7 +39873,7 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
39740
39873
|
const chartNode = {
|
|
39741
39874
|
type: "httpCall",
|
|
39742
39875
|
title: "Http Call",
|
|
39743
|
-
id: (0,
|
|
39876
|
+
id: (0, import_non_secure88.nanoid)(),
|
|
39744
39877
|
visualData: {
|
|
39745
39878
|
x: 0,
|
|
39746
39879
|
y: 0,
|
|
@@ -40086,14 +40219,14 @@ var HttpCallNodeImpl = class extends NodeImpl {
|
|
|
40086
40219
|
var httpCallNode = nodeDefinition(HttpCallNodeImpl, "Http Call");
|
|
40087
40220
|
|
|
40088
40221
|
// src/model/nodes/DelayNode.ts
|
|
40089
|
-
var
|
|
40222
|
+
var import_non_secure89 = require("nanoid/non-secure");
|
|
40090
40223
|
var import_ts_dedent72 = require("ts-dedent");
|
|
40091
40224
|
var DelayNodeImpl = class extends NodeImpl {
|
|
40092
40225
|
static create() {
|
|
40093
40226
|
const chartNode = {
|
|
40094
40227
|
type: "delay",
|
|
40095
40228
|
title: "Delay",
|
|
40096
|
-
id: (0,
|
|
40229
|
+
id: (0, import_non_secure89.nanoid)(),
|
|
40097
40230
|
visualData: {
|
|
40098
40231
|
x: 0,
|
|
40099
40232
|
y: 0,
|
|
@@ -40175,12 +40308,12 @@ var DelayNodeImpl = class extends NodeImpl {
|
|
|
40175
40308
|
var delayNode = nodeDefinition(DelayNodeImpl, "Delay");
|
|
40176
40309
|
|
|
40177
40310
|
// src/model/nodes/AppendToDatasetNode.ts
|
|
40178
|
-
var
|
|
40311
|
+
var import_non_secure90 = require("nanoid/non-secure");
|
|
40179
40312
|
var import_ts_dedent73 = require("ts-dedent");
|
|
40180
40313
|
var AppendToDatasetNodeImpl = class extends NodeImpl {
|
|
40181
40314
|
static create() {
|
|
40182
40315
|
return {
|
|
40183
|
-
id: (0,
|
|
40316
|
+
id: (0, import_non_secure90.nanoid)(),
|
|
40184
40317
|
type: "appendToDataset",
|
|
40185
40318
|
title: "Append to Dataset",
|
|
40186
40319
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -40786,14 +40919,14 @@ var GetDatasetRowNodeImpl = class extends NodeImpl {
|
|
|
40786
40919
|
var getDatasetRowNode = nodeDefinition(GetDatasetRowNodeImpl, "Get Dataset Row");
|
|
40787
40920
|
|
|
40788
40921
|
// src/model/nodes/SliceNode.ts
|
|
40789
|
-
var
|
|
40922
|
+
var import_non_secure91 = require("nanoid/non-secure");
|
|
40790
40923
|
var import_ts_dedent74 = require("ts-dedent");
|
|
40791
40924
|
var SliceNodeImpl = class extends NodeImpl {
|
|
40792
40925
|
static create() {
|
|
40793
40926
|
const chartNode = {
|
|
40794
40927
|
type: "slice",
|
|
40795
40928
|
title: "Slice",
|
|
40796
|
-
id: (0,
|
|
40929
|
+
id: (0, import_non_secure91.nanoid)(),
|
|
40797
40930
|
visualData: {
|
|
40798
40931
|
x: 0,
|
|
40799
40932
|
y: 0,
|
|
@@ -40879,14 +41012,14 @@ var SliceNodeImpl = class extends NodeImpl {
|
|
|
40879
41012
|
var sliceNode = nodeDefinition(SliceNodeImpl, "Slice");
|
|
40880
41013
|
|
|
40881
41014
|
// src/model/nodes/ExtractMarkdownCodeBlocksNode.ts
|
|
40882
|
-
var
|
|
41015
|
+
var import_non_secure92 = require("nanoid/non-secure");
|
|
40883
41016
|
var import_ts_dedent75 = require("ts-dedent");
|
|
40884
41017
|
var ExtractMarkdownCodeBlocksNodeImpl = class extends NodeImpl {
|
|
40885
41018
|
static create() {
|
|
40886
41019
|
const chartNode = {
|
|
40887
41020
|
type: "extractMarkdownCodeBlocks",
|
|
40888
41021
|
title: "Extract Markdown Code Blocks",
|
|
40889
|
-
id: (0,
|
|
41022
|
+
id: (0, import_non_secure92.nanoid)(),
|
|
40890
41023
|
visualData: {
|
|
40891
41024
|
x: 0,
|
|
40892
41025
|
y: 0,
|
|
@@ -40978,7 +41111,7 @@ var extractMarkdownCodeBlocksNode = nodeDefinition(
|
|
|
40978
41111
|
);
|
|
40979
41112
|
|
|
40980
41113
|
// src/model/nodes/AssembleMessageNode.ts
|
|
40981
|
-
var
|
|
41114
|
+
var import_non_secure93 = require("nanoid/non-secure");
|
|
40982
41115
|
var import_lodash_es15 = require("lodash");
|
|
40983
41116
|
var import_ts_pattern6 = require("ts-pattern");
|
|
40984
41117
|
var messageTypeToTitle = {
|
|
@@ -40993,7 +41126,7 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
40993
41126
|
const chartNode = {
|
|
40994
41127
|
type: "assembleMessage",
|
|
40995
41128
|
title: "Assemble Message",
|
|
40996
|
-
id: (0,
|
|
41129
|
+
id: (0, import_non_secure93.nanoid)(),
|
|
40997
41130
|
visualData: {
|
|
40998
41131
|
x: 0,
|
|
40999
41132
|
y: 0,
|
|
@@ -41183,13 +41316,13 @@ var AssembleMessageNodeImpl = class extends NodeImpl {
|
|
|
41183
41316
|
var assembleMessageNode = nodeDefinition(AssembleMessageNodeImpl, "Assemble Prompt");
|
|
41184
41317
|
|
|
41185
41318
|
// src/model/nodes/URLReferenceNode.ts
|
|
41186
|
-
var
|
|
41319
|
+
var import_non_secure94 = require("nanoid/non-secure");
|
|
41187
41320
|
var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
41188
41321
|
static create() {
|
|
41189
41322
|
const chartNode = {
|
|
41190
41323
|
type: "urlReference",
|
|
41191
41324
|
title: "URL Reference",
|
|
41192
|
-
id: (0,
|
|
41325
|
+
id: (0, import_non_secure94.nanoid)(),
|
|
41193
41326
|
visualData: {
|
|
41194
41327
|
x: 0,
|
|
41195
41328
|
y: 0,
|
|
@@ -41258,14 +41391,14 @@ var UrlReferenceNodeImpl = class extends NodeImpl {
|
|
|
41258
41391
|
var urlReferenceNode = nodeDefinition(UrlReferenceNodeImpl, "URL Reference");
|
|
41259
41392
|
|
|
41260
41393
|
// src/model/nodes/DestructureNode.ts
|
|
41261
|
-
var
|
|
41394
|
+
var import_non_secure95 = require("nanoid/non-secure");
|
|
41262
41395
|
var import_ts_dedent76 = require("ts-dedent");
|
|
41263
41396
|
var DestructureNodeImpl = class extends NodeImpl {
|
|
41264
41397
|
static create() {
|
|
41265
41398
|
const chartNode = {
|
|
41266
41399
|
type: "destructure",
|
|
41267
41400
|
title: "Destructure",
|
|
41268
|
-
id: (0,
|
|
41401
|
+
id: (0, import_non_secure95.nanoid)(),
|
|
41269
41402
|
visualData: {
|
|
41270
41403
|
x: 0,
|
|
41271
41404
|
y: 0,
|
|
@@ -41273,7 +41406,7 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
41273
41406
|
},
|
|
41274
41407
|
data: {
|
|
41275
41408
|
paths: ["$.value"],
|
|
41276
|
-
pathPortIds: [(0,
|
|
41409
|
+
pathPortIds: [(0, import_non_secure95.nanoid)()]
|
|
41277
41410
|
}
|
|
41278
41411
|
};
|
|
41279
41412
|
return chartNode;
|
|
@@ -41361,12 +41494,12 @@ var DestructureNodeImpl = class extends NodeImpl {
|
|
|
41361
41494
|
var destructureNode = nodeDefinition(DestructureNodeImpl, "Destructure");
|
|
41362
41495
|
|
|
41363
41496
|
// src/model/nodes/ReplaceDatasetNode.ts
|
|
41364
|
-
var
|
|
41497
|
+
var import_non_secure96 = require("nanoid/non-secure");
|
|
41365
41498
|
var import_ts_dedent77 = require("ts-dedent");
|
|
41366
41499
|
var ReplaceDatasetNodeImpl = class extends NodeImpl {
|
|
41367
41500
|
static create() {
|
|
41368
41501
|
return {
|
|
41369
|
-
id: (0,
|
|
41502
|
+
id: (0, import_non_secure96.nanoid)(),
|
|
41370
41503
|
type: "replaceDataset",
|
|
41371
41504
|
title: "Replace Dataset",
|
|
41372
41505
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -41537,14 +41670,14 @@ var ListGraphsNodeImpl = class extends NodeImpl {
|
|
|
41537
41670
|
var listGraphsNode = nodeDefinition(ListGraphsNodeImpl, "List Graphs");
|
|
41538
41671
|
|
|
41539
41672
|
// src/model/nodes/GraphReferenceNode.ts
|
|
41540
|
-
var
|
|
41673
|
+
var import_non_secure97 = require("nanoid/non-secure");
|
|
41541
41674
|
var import_ts_dedent78 = require("ts-dedent");
|
|
41542
41675
|
var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
41543
41676
|
static create() {
|
|
41544
41677
|
const chartNode = {
|
|
41545
41678
|
type: "graphReference",
|
|
41546
41679
|
title: "Graph Reference",
|
|
41547
|
-
id: (0,
|
|
41680
|
+
id: (0, import_non_secure97.nanoid)(),
|
|
41548
41681
|
visualData: {
|
|
41549
41682
|
x: 0,
|
|
41550
41683
|
y: 0,
|
|
@@ -41659,7 +41792,7 @@ var GraphReferenceNodeImpl = class extends NodeImpl {
|
|
|
41659
41792
|
var graphReferenceNode = nodeDefinition(GraphReferenceNodeImpl, "Graph Reference");
|
|
41660
41793
|
|
|
41661
41794
|
// src/model/nodes/CallGraphNode.ts
|
|
41662
|
-
var
|
|
41795
|
+
var import_non_secure98 = require("nanoid/non-secure");
|
|
41663
41796
|
var import_ts_dedent79 = require("ts-dedent");
|
|
41664
41797
|
|
|
41665
41798
|
// src/api/looseDataValue.ts
|
|
@@ -41686,7 +41819,7 @@ var CallGraphNodeImpl = class extends NodeImpl {
|
|
|
41686
41819
|
const chartNode = {
|
|
41687
41820
|
type: "callGraph",
|
|
41688
41821
|
title: "Call Graph",
|
|
41689
|
-
id: (0,
|
|
41822
|
+
id: (0, import_non_secure98.nanoid)(),
|
|
41690
41823
|
visualData: {
|
|
41691
41824
|
x: 0,
|
|
41692
41825
|
y: 0,
|
|
@@ -41981,11 +42114,11 @@ function getDelegatedToolCallRecords(input) {
|
|
|
41981
42114
|
var delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, "Delegate Tool Call");
|
|
41982
42115
|
|
|
41983
42116
|
// src/model/nodes/PlayAudioNode.ts
|
|
41984
|
-
var
|
|
42117
|
+
var import_non_secure99 = require("nanoid/non-secure");
|
|
41985
42118
|
var PlayAudioNodeImpl = class extends NodeImpl {
|
|
41986
42119
|
static create() {
|
|
41987
42120
|
return {
|
|
41988
|
-
id: (0,
|
|
42121
|
+
id: (0, import_non_secure99.nanoid)(),
|
|
41989
42122
|
type: "playAudio",
|
|
41990
42123
|
title: "Play Audio",
|
|
41991
42124
|
visualData: { x: 0, y: 0, width: 200 },
|
|
@@ -42039,11 +42172,11 @@ var PlayAudioNodeImpl = class extends NodeImpl {
|
|
|
42039
42172
|
var playAudioNode = nodeDefinition(PlayAudioNodeImpl, "Play Audio");
|
|
42040
42173
|
|
|
42041
42174
|
// src/model/nodes/DocumentNode.ts
|
|
42042
|
-
var
|
|
42175
|
+
var import_non_secure100 = require("nanoid/non-secure");
|
|
42043
42176
|
var DocumentNodeImpl = class extends NodeImpl {
|
|
42044
42177
|
static create() {
|
|
42045
42178
|
return {
|
|
42046
|
-
id: (0,
|
|
42179
|
+
id: (0, import_non_secure100.nanoid)(),
|
|
42047
42180
|
type: "document",
|
|
42048
42181
|
title: "Document",
|
|
42049
42182
|
visualData: { x: 0, y: 0, width: 300 },
|
|
@@ -42209,7 +42342,7 @@ var DocumentNodeImpl = class extends NodeImpl {
|
|
|
42209
42342
|
var documentNode = nodeDefinition(DocumentNodeImpl, "Document");
|
|
42210
42343
|
|
|
42211
42344
|
// src/model/nodes/ChatLoopNode.ts
|
|
42212
|
-
var
|
|
42345
|
+
var import_non_secure101 = require("nanoid/non-secure");
|
|
42213
42346
|
var import_ts_dedent81 = require("ts-dedent");
|
|
42214
42347
|
var chatLoopLegacyDisplayName = "Chat Loop (legacy)";
|
|
42215
42348
|
var ChatLoopNodeImpl = class extends NodeImpl {
|
|
@@ -42217,7 +42350,7 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
42217
42350
|
const chartNode = {
|
|
42218
42351
|
type: "chatLoop",
|
|
42219
42352
|
title: chatLoopLegacyDisplayName,
|
|
42220
|
-
id: (0,
|
|
42353
|
+
id: (0, import_non_secure101.nanoid)(),
|
|
42221
42354
|
visualData: {
|
|
42222
42355
|
x: 0,
|
|
42223
42356
|
y: 0,
|
|
@@ -42350,12 +42483,12 @@ var ChatLoopNodeImpl = class extends NodeImpl {
|
|
|
42350
42483
|
var chatLoopNode = nodeDefinition(ChatLoopNodeImpl, chatLoopLegacyDisplayName);
|
|
42351
42484
|
|
|
42352
42485
|
// src/model/nodes/ReadAllFilesNode.ts
|
|
42353
|
-
var
|
|
42486
|
+
var import_non_secure102 = require("nanoid/non-secure");
|
|
42354
42487
|
var import_ts_dedent82 = require("ts-dedent");
|
|
42355
42488
|
var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
42356
42489
|
static create() {
|
|
42357
42490
|
return {
|
|
42358
|
-
id: (0,
|
|
42491
|
+
id: (0, import_non_secure102.nanoid)(),
|
|
42359
42492
|
type: "readAllFiles",
|
|
42360
42493
|
title: "Read All Files",
|
|
42361
42494
|
visualData: { x: 0, y: 0, width: 250 },
|
|
@@ -42548,14 +42681,14 @@ var ReadAllFilesNodeImpl = class extends NodeImpl {
|
|
|
42548
42681
|
var readAllFilesNode = nodeDefinition(ReadAllFilesNodeImpl, "Read All Files");
|
|
42549
42682
|
|
|
42550
42683
|
// src/model/nodes/ToMarkdownTableNode.ts
|
|
42551
|
-
var
|
|
42684
|
+
var import_non_secure103 = require("nanoid/non-secure");
|
|
42552
42685
|
var import_ts_dedent83 = require("ts-dedent");
|
|
42553
42686
|
var ToMarkdownTableNodeImpl = class extends NodeImpl {
|
|
42554
42687
|
static create() {
|
|
42555
42688
|
const chartNode = {
|
|
42556
42689
|
type: "toMarkdownTable",
|
|
42557
42690
|
title: "To Markdown Table",
|
|
42558
|
-
id: (0,
|
|
42691
|
+
id: (0, import_non_secure103.nanoid)(),
|
|
42559
42692
|
visualData: {
|
|
42560
42693
|
x: 0,
|
|
42561
42694
|
y: 0,
|
|
@@ -42902,7 +43035,7 @@ ${this.data.schedule}`;
|
|
|
42902
43035
|
var cronNode = nodeDefinition(CronNodeImpl, "Cron");
|
|
42903
43036
|
|
|
42904
43037
|
// src/model/nodes/ToTreeNode.ts
|
|
42905
|
-
var
|
|
43038
|
+
var import_non_secure104 = require("nanoid/non-secure");
|
|
42906
43039
|
var import_ts_dedent85 = require("ts-dedent");
|
|
42907
43040
|
var import_lodash_es17 = require("lodash");
|
|
42908
43041
|
var ToTreeNodeImpl = class extends NodeImpl {
|
|
@@ -42910,7 +43043,7 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
42910
43043
|
const chartNode = {
|
|
42911
43044
|
type: "toTree",
|
|
42912
43045
|
title: "To Tree",
|
|
42913
|
-
id: (0,
|
|
43046
|
+
id: (0, import_non_secure104.nanoid)(),
|
|
42914
43047
|
visualData: {
|
|
42915
43048
|
x: 0,
|
|
42916
43049
|
y: 0,
|
|
@@ -43031,14 +43164,14 @@ var ToTreeNodeImpl = class extends NodeImpl {
|
|
|
43031
43164
|
var toTreeNode = nodeDefinition(ToTreeNodeImpl, "To Tree");
|
|
43032
43165
|
|
|
43033
43166
|
// src/model/nodes/LoopUntilNode.ts
|
|
43034
|
-
var
|
|
43167
|
+
var import_non_secure105 = require("nanoid/non-secure");
|
|
43035
43168
|
var import_ts_dedent86 = require("ts-dedent");
|
|
43036
43169
|
var LoopUntilNodeImpl = class extends NodeImpl {
|
|
43037
43170
|
static create() {
|
|
43038
43171
|
const chartNode = {
|
|
43039
43172
|
type: "loopUntil",
|
|
43040
43173
|
title: "Loop Until",
|
|
43041
|
-
id: (0,
|
|
43174
|
+
id: (0, import_non_secure105.nanoid)(),
|
|
43042
43175
|
visualData: {
|
|
43043
43176
|
x: 0,
|
|
43044
43177
|
y: 0,
|
|
@@ -43547,14 +43680,14 @@ var MCPDiscoveryNodeImpl = class extends NodeImpl {
|
|
|
43547
43680
|
var mcpDiscoveryNode = nodeDefinition(MCPDiscoveryNodeImpl, "MCP Discovery");
|
|
43548
43681
|
|
|
43549
43682
|
// src/model/nodes/MCPToolCallNode.ts
|
|
43550
|
-
var
|
|
43683
|
+
var import_non_secure106 = require("nanoid/non-secure");
|
|
43551
43684
|
var import_ts_dedent87 = require("ts-dedent");
|
|
43552
43685
|
var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
43553
43686
|
static create() {
|
|
43554
43687
|
const chartNode = {
|
|
43555
43688
|
type: "mcpToolCall",
|
|
43556
43689
|
title: "MCP Tool Call",
|
|
43557
|
-
id: (0,
|
|
43690
|
+
id: (0, import_non_secure106.nanoid)(),
|
|
43558
43691
|
visualData: {
|
|
43559
43692
|
x: 0,
|
|
43560
43693
|
y: 0,
|
|
@@ -43723,13 +43856,13 @@ var MCPToolCallNodeImpl = class extends NodeImpl {
|
|
|
43723
43856
|
var mcpToolCallNode = nodeDefinition(MCPToolCallNodeImpl, "MCP Tool Call");
|
|
43724
43857
|
|
|
43725
43858
|
// src/model/nodes/MCPGetPromptNode.ts
|
|
43726
|
-
var
|
|
43859
|
+
var import_non_secure107 = require("nanoid/non-secure");
|
|
43727
43860
|
var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
43728
43861
|
static create() {
|
|
43729
43862
|
const chartNode = {
|
|
43730
43863
|
type: "mcpGetPrompt",
|
|
43731
43864
|
title: "MCP Get Prompt",
|
|
43732
|
-
id: (0,
|
|
43865
|
+
id: (0, import_non_secure107.nanoid)(),
|
|
43733
43866
|
visualData: {
|
|
43734
43867
|
x: 0,
|
|
43735
43868
|
y: 0,
|
|
@@ -43876,7 +44009,7 @@ var MCPGetPromptNodeImpl = class extends NodeImpl {
|
|
|
43876
44009
|
var mcpGetPromptNode = nodeDefinition(MCPGetPromptNodeImpl, "MCP Get Prompt");
|
|
43877
44010
|
|
|
43878
44011
|
// src/model/nodes/ReferencedGraphAliasNode.ts
|
|
43879
|
-
var
|
|
44012
|
+
var import_non_secure108 = require("nanoid/non-secure");
|
|
43880
44013
|
var import_ts_dedent88 = require("ts-dedent");
|
|
43881
44014
|
var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
43882
44015
|
static create() {
|
|
@@ -43884,7 +44017,7 @@ var ReferencedGraphAliasNodeImpl = class extends NodeImpl {
|
|
|
43884
44017
|
type: "referencedGraphAlias",
|
|
43885
44018
|
title: "",
|
|
43886
44019
|
// Always set initially by the editor
|
|
43887
|
-
id: (0,
|
|
44020
|
+
id: (0, import_non_secure108.nanoid)(),
|
|
43888
44021
|
visualData: {
|
|
43889
44022
|
x: 0,
|
|
43890
44023
|
y: 0,
|
|
@@ -44052,13 +44185,13 @@ function applyMetricOutputSetting(outputs, outputCostDuration) {
|
|
|
44052
44185
|
}
|
|
44053
44186
|
|
|
44054
44187
|
// src/model/nodes/NodePrefabInstanceNode.ts
|
|
44055
|
-
var
|
|
44188
|
+
var import_non_secure109 = require("nanoid/non-secure");
|
|
44056
44189
|
var NodePrefabInstanceNodeImpl = class extends NodeImpl {
|
|
44057
44190
|
static create() {
|
|
44058
44191
|
return {
|
|
44059
44192
|
type: NODE_PREFAB_INSTANCE_TYPE,
|
|
44060
44193
|
title: "Linked node",
|
|
44061
|
-
id: (0,
|
|
44194
|
+
id: (0, import_non_secure109.nanoid)(),
|
|
44062
44195
|
visualData: {
|
|
44063
44196
|
x: 0,
|
|
44064
44197
|
y: 0,
|
|
@@ -44088,7 +44221,7 @@ var NodePrefabInstanceNodeImpl = class extends NodeImpl {
|
|
|
44088
44221
|
var nodePrefabInstanceNode = nodeDefinition(NodePrefabInstanceNodeImpl, "Linked node");
|
|
44089
44222
|
|
|
44090
44223
|
// src/model/nodes/ClassifierQuestionNode.ts
|
|
44091
|
-
var
|
|
44224
|
+
var import_non_secure110 = require("nanoid/non-secure");
|
|
44092
44225
|
|
|
44093
44226
|
// src/model/classifier/limits.ts
|
|
44094
44227
|
var CLASSIFIER_LIMITS = {
|
|
@@ -44984,17 +45117,17 @@ var entryTypeOptions = [
|
|
|
44984
45117
|
{ value: "object", label: "Object" }
|
|
44985
45118
|
];
|
|
44986
45119
|
function createScoreCriterion() {
|
|
44987
|
-
return { id: (0,
|
|
45120
|
+
return { id: (0, import_non_secure110.nanoid)(), type: "text", text: "", lines: [""], objectTemplate: "{}" };
|
|
44988
45121
|
}
|
|
44989
45122
|
function createChoiceCriterion() {
|
|
44990
|
-
return { id: (0,
|
|
45123
|
+
return { id: (0, import_non_secure110.nanoid)(), key: "", text: "", lines: [""], objectTemplate: "{}" };
|
|
44991
45124
|
}
|
|
44992
45125
|
var ClassifierQuestionNodeImpl = class extends NodeImpl {
|
|
44993
45126
|
static create() {
|
|
44994
45127
|
return {
|
|
44995
45128
|
type: "classifierQuestion",
|
|
44996
45129
|
title: "Decision AI Question",
|
|
44997
|
-
id: (0,
|
|
45130
|
+
id: (0, import_non_secure110.nanoid)(),
|
|
44998
45131
|
visualData: { x: 0, y: 0, width: 280 },
|
|
44999
45132
|
data: {
|
|
45000
45133
|
questionType: "choice",
|
|
@@ -45551,7 +45684,7 @@ function hasClassifierCriteriaValue(value) {
|
|
|
45551
45684
|
var classifierQuestionNode = nodeDefinition(ClassifierQuestionNodeImpl, "Decision AI Question");
|
|
45552
45685
|
|
|
45553
45686
|
// src/model/nodes/ClassifierEvaluateNode.ts
|
|
45554
|
-
var
|
|
45687
|
+
var import_non_secure111 = require("nanoid/non-secure");
|
|
45555
45688
|
|
|
45556
45689
|
// src/model/classifier/credentials.ts
|
|
45557
45690
|
var ClassifierCredentialMissingError = class extends Error {
|
|
@@ -46042,7 +46175,8 @@ function assertSubQDecisionLimits({ state, questions }, check) {
|
|
|
46042
46175
|
// src/model/classifier/baseten.ts
|
|
46043
46176
|
var BASETEN_DECISION_MODELS = [
|
|
46044
46177
|
"decision-models/baseten-elephant-9b-latest",
|
|
46045
|
-
"decision-models/baseten-mammoth-27b-latest"
|
|
46178
|
+
"decision-models/baseten-mammoth-27b-latest",
|
|
46179
|
+
"decision-models/baseten-joey-2b-latest"
|
|
46046
46180
|
];
|
|
46047
46181
|
function basetenDecisionState(state) {
|
|
46048
46182
|
if (state.kind === "json") return state.value;
|
|
@@ -46122,7 +46256,6 @@ var LIQUID_TOKEN_PRICING = {
|
|
|
46122
46256
|
inputPerMillionTokens: 0.02,
|
|
46123
46257
|
outputPerMillionTokens: 0
|
|
46124
46258
|
};
|
|
46125
|
-
var TOKENS_PER_MILLION = 1e6;
|
|
46126
46259
|
var MAX_AUTOMATIC_ATTEMPTS = 3;
|
|
46127
46260
|
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
46128
46261
|
var RETRYABLE_STATUSES = /* @__PURE__ */ new Set([429, 529]);
|
|
@@ -46144,7 +46277,11 @@ var jevClassifierProvider = createClassifierProvider({
|
|
|
46144
46277
|
id: "jev",
|
|
46145
46278
|
label: "Jev",
|
|
46146
46279
|
defaultModel: "jev-latest",
|
|
46147
|
-
modelOptions: ["jev-latest", "jev-preview", "jev-1.14.0", "jev-1.13.0"].map((value) => ({
|
|
46280
|
+
modelOptions: ["jev-latest", "jev-preview", "jev-1.14.0", "jev-1.13.0"].map((value) => ({
|
|
46281
|
+
value,
|
|
46282
|
+
label: value,
|
|
46283
|
+
aggregateTokenUsageOnly: true
|
|
46284
|
+
})),
|
|
46148
46285
|
modelHelp: "Jev images are experimental: use still PNG/JPEG, 280\u20131568 pixels per side. Image requests enable TypeSafe\u2019s experimental image API.",
|
|
46149
46286
|
credentialNames: JEV_DEFAULT_CREDENTIAL_NAMES,
|
|
46150
46287
|
endpoint: JEV_SYSTEM_ONE_ENDPOINT,
|
|
@@ -46174,7 +46311,7 @@ var liquidClassifierProvider = createApiCompatibleClassifierProvider({
|
|
|
46174
46311
|
id: "liquid",
|
|
46175
46312
|
label: "Liquid AI",
|
|
46176
46313
|
defaultModel: "d1",
|
|
46177
|
-
modelOptions: ["d1", "d1.1"].map((value) => ({ value, label: value })),
|
|
46314
|
+
modelOptions: ["d1", "d1.1"].map((value) => ({ value, label: value, aggregateTokenUsageOnly: true })),
|
|
46178
46315
|
modelHelp: "Images belong in shared State, not Question Instructions.",
|
|
46179
46316
|
credentialNames: LIQUID_DEFAULT_CREDENTIAL_NAMES,
|
|
46180
46317
|
endpoint: LIQUID_SYSTEM_ONE_ENDPOINT,
|
|
@@ -46189,7 +46326,9 @@ var openrouterClassifierProvider = createApiCompatibleClassifierProvider({
|
|
|
46189
46326
|
id: "openrouter",
|
|
46190
46327
|
label: "OpenRouter",
|
|
46191
46328
|
defaultModel: "microsoft/microsoft-decision-1",
|
|
46192
|
-
modelOptions: [
|
|
46329
|
+
modelOptions: [
|
|
46330
|
+
{ value: "microsoft/microsoft-decision-1", label: "Microsoft Decision-1 (9b)", aggregateTokenUsageOnly: true }
|
|
46331
|
+
],
|
|
46193
46332
|
credentialNames: OPENROUTER_DEFAULT_CREDENTIAL_NAMES,
|
|
46194
46333
|
endpoint: OPENROUTER_DECISIONS_ENDPOINT,
|
|
46195
46334
|
modelPricing: [
|
|
@@ -46206,6 +46345,7 @@ var openaiClassifierProvider = createClassifierProvider({
|
|
|
46206
46345
|
modelOptions: [{ value: "gpt-6-luna", label: "gpt-6-luna" }],
|
|
46207
46346
|
credentialNames: OPENAI_DEFAULT_CREDENTIAL_NAMES,
|
|
46208
46347
|
browserExecutionSupported: false,
|
|
46348
|
+
cacheTokenUsageSupported: true,
|
|
46209
46349
|
endpoint: OPENAI_DECISIONS_ENDPOINT,
|
|
46210
46350
|
supportsImages: (model) => model === "gpt-6-luna",
|
|
46211
46351
|
supportsQuestionImages: (model) => model === "gpt-6-luna",
|
|
@@ -46215,7 +46355,15 @@ var openaiClassifierProvider = createClassifierProvider({
|
|
|
46215
46355
|
pricing: {
|
|
46216
46356
|
inputPerMillionTokens: 0.1,
|
|
46217
46357
|
outputPerMillionTokens: 0,
|
|
46218
|
-
|
|
46358
|
+
cacheReadPerMillionTokens: 0.01,
|
|
46359
|
+
cacheWritePerMillionTokens: 0.125,
|
|
46360
|
+
longContext: {
|
|
46361
|
+
aboveInputTokens: 272e3,
|
|
46362
|
+
inputPerMillionTokens: 0.2,
|
|
46363
|
+
outputPerMillionTokens: 0,
|
|
46364
|
+
cacheReadPerMillionTokens: 0.02,
|
|
46365
|
+
cacheWritePerMillionTokens: 0.25
|
|
46366
|
+
}
|
|
46219
46367
|
}
|
|
46220
46368
|
}
|
|
46221
46369
|
],
|
|
@@ -46226,7 +46374,11 @@ var perplexityClassifierProvider = createClassifierProvider({
|
|
|
46226
46374
|
id: "perplexity",
|
|
46227
46375
|
label: "Perplexity",
|
|
46228
46376
|
defaultModel: "pplx-decider-v1.1-27b",
|
|
46229
|
-
modelOptions: PERPLEXITY_DECISION_MODELS.map((value) => ({
|
|
46377
|
+
modelOptions: PERPLEXITY_DECISION_MODELS.map((value) => ({
|
|
46378
|
+
value,
|
|
46379
|
+
label: value.replace(/-27b$/, " (27b)"),
|
|
46380
|
+
aggregateTokenUsageOnly: true
|
|
46381
|
+
})),
|
|
46230
46382
|
credentialNames: PERPLEXITY_DEFAULT_CREDENTIAL_NAMES,
|
|
46231
46383
|
browserExecutionSupported: false,
|
|
46232
46384
|
endpoint: PERPLEXITY_DECISIONS_ENDPOINT,
|
|
@@ -46249,7 +46401,7 @@ var subqClassifierProvider = createClassifierProvider({
|
|
|
46249
46401
|
id: "subq",
|
|
46250
46402
|
label: "SubQ",
|
|
46251
46403
|
defaultModel: "subq-snap-1.1",
|
|
46252
|
-
modelOptions: SUBQ_DECISION_MODELS.map((value) => ({ value, label: value })),
|
|
46404
|
+
modelOptions: SUBQ_DECISION_MODELS.map((value) => ({ value, label: value, aggregateTokenUsageOnly: true })),
|
|
46253
46405
|
credentialNames: SUBQ_DEFAULT_CREDENTIAL_NAMES,
|
|
46254
46406
|
browserExecutionSupported: false,
|
|
46255
46407
|
endpoint: SUBQ_DECISIONS_ENDPOINT,
|
|
@@ -46269,8 +46421,9 @@ var basetenClassifierProvider = createClassifierProvider({
|
|
|
46269
46421
|
label: "Baseten",
|
|
46270
46422
|
defaultModel: BASETEN_DECISION_MODELS[0],
|
|
46271
46423
|
modelOptions: [
|
|
46272
|
-
{ value: BASETEN_DECISION_MODELS[0], label: "Elephant-1" },
|
|
46273
|
-
{ value: BASETEN_DECISION_MODELS[1], label: "Mammoth-1" }
|
|
46424
|
+
{ value: BASETEN_DECISION_MODELS[0], label: "Elephant-1 (9b)", aggregateTokenUsageOnly: true },
|
|
46425
|
+
{ value: BASETEN_DECISION_MODELS[1], label: "Mammoth-1 (27b)", aggregateTokenUsageOnly: true },
|
|
46426
|
+
{ value: BASETEN_DECISION_MODELS[2], label: "Joey-1 (2b)", aggregateTokenUsageOnly: true }
|
|
46274
46427
|
],
|
|
46275
46428
|
modelHelp: "Images belong in shared State, not Question Instructions.",
|
|
46276
46429
|
credentialNames: BASETEN_DEFAULT_CREDENTIAL_NAMES,
|
|
@@ -46435,11 +46588,15 @@ function getClassifierProviderEnvironmentVariableNames() {
|
|
|
46435
46588
|
return [...new Set(classifierProviders.map((provider) => provider.credentialNames.environmentVariableName))];
|
|
46436
46589
|
}
|
|
46437
46590
|
function calculateClassifierUsageCost(provider, usage, models, tokenPricing) {
|
|
46438
|
-
|
|
46439
|
-
|
|
46440
|
-
|
|
46441
|
-
|
|
46442
|
-
|
|
46591
|
+
let inputTokenDetails;
|
|
46592
|
+
if (provider.cacheTokenUsageSupported && usage.input_tokens_details !== void 0) {
|
|
46593
|
+
const details = usage.input_tokens_details;
|
|
46594
|
+
if (details === null || typeof details !== "object" || Array.isArray(details) || !isReportedTokenCount(details.cached_tokens) || !isReportedTokenCount(details.cache_write_tokens))
|
|
46595
|
+
return void 0;
|
|
46596
|
+
inputTokenDetails = { cacheReadTokens: details.cached_tokens, cacheWriteTokens: details.cache_write_tokens };
|
|
46597
|
+
}
|
|
46598
|
+
const reportedUsage = { inputTokens: usage.input_tokens, outputTokens: usage.output_tokens, inputTokenDetails };
|
|
46599
|
+
if (tokenPricing !== void 0) return calculateTokenUsageCost(tokenPricing, reportedUsage);
|
|
46443
46600
|
if (!models) return void 0;
|
|
46444
46601
|
const entries2 = normalizeModelPricing(provider);
|
|
46445
46602
|
const entry = entries2.find(
|
|
@@ -46447,13 +46604,15 @@ function calculateClassifierUsageCost(provider, usage, models, tokenPricing) {
|
|
|
46447
46604
|
);
|
|
46448
46605
|
const base = entry == null ? void 0 : entry.pricing;
|
|
46449
46606
|
const tier = base == null ? void 0 : base.longContext;
|
|
46450
|
-
|
|
46451
|
-
|
|
46607
|
+
if (base == null || tier != null && !isReportedTokenCount(tier.aboveInputTokens)) return void 0;
|
|
46608
|
+
try {
|
|
46609
|
+
validateTokenPricing(base);
|
|
46610
|
+
if (tier != null) validateTokenPricing(tier);
|
|
46611
|
+
} catch {
|
|
46452
46612
|
return void 0;
|
|
46453
46613
|
}
|
|
46454
46614
|
const pricing = tier && usage.input_tokens > tier.aboveInputTokens ? tier : base;
|
|
46455
|
-
|
|
46456
|
-
return Number.isFinite(totalCost) && totalCost >= 0 ? totalCost : void 0;
|
|
46615
|
+
return calculateTokenUsageCost(pricing, reportedUsage);
|
|
46457
46616
|
}
|
|
46458
46617
|
async function callClassifierHttp(args, spec, prepared, buildRequest, operation) {
|
|
46459
46618
|
var _a;
|
|
@@ -47311,7 +47470,7 @@ var ClassifierEvaluateNodeImpl = class extends NodeImpl {
|
|
|
47311
47470
|
return {
|
|
47312
47471
|
type: "classifierEvaluate",
|
|
47313
47472
|
title: "Decision AI run",
|
|
47314
|
-
id: (0,
|
|
47473
|
+
id: (0, import_non_secure111.nanoid)(),
|
|
47315
47474
|
visualData: { x: 0, y: 0, width: 260 },
|
|
47316
47475
|
// Keep the default model in the provider descriptor rather than
|
|
47317
47476
|
// serializing Jev's model into every new node. A future provider then
|
|
@@ -47628,7 +47787,7 @@ var ClassifierEvaluateNodeImpl = class extends NodeImpl {
|
|
|
47628
47787
|
attempts.push(event);
|
|
47629
47788
|
(_a2 = context.onLLMProfileAttempt) == null ? void 0 : _a2.call(context, {
|
|
47630
47789
|
...structuredClone(event),
|
|
47631
|
-
eventId: (0,
|
|
47790
|
+
eventId: (0, import_non_secure111.nanoid)(),
|
|
47632
47791
|
nodeId: this.chartNode.id,
|
|
47633
47792
|
processId: context.processId
|
|
47634
47793
|
});
|
|
@@ -47713,7 +47872,7 @@ var ClassifierEvaluateNodeImpl = class extends NodeImpl {
|
|
|
47713
47872
|
attempts.push(attempt);
|
|
47714
47873
|
(_a2 = context.onLLMProfileAttempt) == null ? void 0 : _a2.call(context, {
|
|
47715
47874
|
...structuredClone(attempt),
|
|
47716
|
-
eventId: (0,
|
|
47875
|
+
eventId: (0, import_non_secure111.nanoid)(),
|
|
47717
47876
|
nodeId: this.chartNode.id,
|
|
47718
47877
|
processId: context.processId
|
|
47719
47878
|
});
|
|
@@ -47845,13 +48004,13 @@ function flattenQuestions(value, target, check, seen = /* @__PURE__ */ new Set()
|
|
|
47845
48004
|
var classifierEvaluateNode = nodeDefinition(ClassifierEvaluateNodeImpl, "Decision AI run");
|
|
47846
48005
|
|
|
47847
48006
|
// src/model/nodes/ClassifierProfileNode.ts
|
|
47848
|
-
var
|
|
48007
|
+
var import_non_secure112 = require("nanoid/non-secure");
|
|
47849
48008
|
var ClassifierProfileNodeImpl = class extends NodeImpl {
|
|
47850
48009
|
static create() {
|
|
47851
48010
|
return {
|
|
47852
48011
|
type: "classifierProfile",
|
|
47853
48012
|
title: "Decision AI Profile",
|
|
47854
|
-
id: (0,
|
|
48013
|
+
id: (0, import_non_secure112.nanoid)(),
|
|
47855
48014
|
visualData: { x: 0, y: 0, width: 260 },
|
|
47856
48015
|
data: { provider: "jev", responseTimeoutMs: DEFAULT_CLASSIFIER_PROFILE_RESPONSE_TIMEOUT_MS }
|
|
47857
48016
|
};
|
|
@@ -47967,7 +48126,7 @@ var classifierProfileNode = nodeDefinition(ClassifierProfileNodeImpl, "Decision
|
|
|
47967
48126
|
|
|
47968
48127
|
// src/model/Nodes.ts
|
|
47969
48128
|
var registerBuiltInNodes = (registry) => {
|
|
47970
|
-
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(streamValueNode).register(catchStreamingChunksNode).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(toBase64Node).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(classifierQuestionNode).register(classifierEvaluateNode).register(classifierProfileNode).register(nodePrefabInstanceNode);
|
|
48129
|
+
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(aiCostNode).register(coalesceNode).register(coalesceNewNode).register(didRunNode).register(passthroughNode).register(dataBusNode).register(startBackgroundBranchNode).register(watchStreamingOutputNode).register(stopWatchingStreamingOutputNode).register(streamValueNode).register(catchStreamingChunksNode).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(toBase64Node).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(classifierQuestionNode).register(classifierEvaluateNode).register(classifierProfileNode).register(nodePrefabInstanceNode);
|
|
47971
48130
|
};
|
|
47972
48131
|
var globalRivetNodeRegistry = registerBuiltInNodes(new NodeRegistration());
|
|
47973
48132
|
function resetGlobalRivetNodeRegistry() {
|
|
@@ -49081,7 +49240,7 @@ function isRecord10(value) {
|
|
|
49081
49240
|
}
|
|
49082
49241
|
|
|
49083
49242
|
// src/plugins/anthropic/nodes/ChatAnthropicNode.ts
|
|
49084
|
-
var
|
|
49243
|
+
var import_non_secure113 = require("nanoid/non-secure");
|
|
49085
49244
|
var import_ts_dedent89 = require("ts-dedent");
|
|
49086
49245
|
var import_p_retry2 = __toESM(require("p-retry-4"), 1);
|
|
49087
49246
|
|
|
@@ -49096,7 +49255,7 @@ var ChatAnthropicNodeImpl = {
|
|
|
49096
49255
|
const chartNode = {
|
|
49097
49256
|
type: "chatAnthropic",
|
|
49098
49257
|
title: "Chat (Anthropic, Legacy)",
|
|
49099
|
-
id: (0,
|
|
49258
|
+
id: (0, import_non_secure113.nanoid)(),
|
|
49100
49259
|
visualData: {
|
|
49101
49260
|
x: 0,
|
|
49102
49261
|
y: 0,
|
|
@@ -49846,7 +50005,7 @@ var anthropicPlugin = {
|
|
|
49846
50005
|
var anthropic_default = anthropicPlugin;
|
|
49847
50006
|
|
|
49848
50007
|
// src/plugins/autoevals/AutoEvalsNode.ts
|
|
49849
|
-
var
|
|
50008
|
+
var import_non_secure114 = require("nanoid/non-secure");
|
|
49850
50009
|
var import_ts_dedent90 = require("ts-dedent");
|
|
49851
50010
|
var import_autoevals = require("autoevals");
|
|
49852
50011
|
var import_ts_pattern7 = require("ts-pattern");
|
|
@@ -49866,7 +50025,7 @@ var AutoEvalsNodeImpl = {
|
|
|
49866
50025
|
const chartNode = {
|
|
49867
50026
|
type: "autoevals",
|
|
49868
50027
|
title: "Autoevals",
|
|
49869
|
-
id: (0,
|
|
50028
|
+
id: (0, import_non_secure114.nanoid)(),
|
|
49870
50029
|
visualData: {
|
|
49871
50030
|
x: 0,
|
|
49872
50031
|
y: 0,
|
|
@@ -50063,7 +50222,7 @@ var autoevalsPlugin = {
|
|
|
50063
50222
|
var autoevals_default = autoevalsPlugin;
|
|
50064
50223
|
|
|
50065
50224
|
// src/plugins/assemblyAi/LemurQaNode.ts
|
|
50066
|
-
var
|
|
50225
|
+
var import_non_secure115 = require("nanoid/non-secure");
|
|
50067
50226
|
var import_ts_dedent91 = require("ts-dedent");
|
|
50068
50227
|
|
|
50069
50228
|
// src/plugins/assemblyAi/lemurHelpers.ts
|
|
@@ -50183,7 +50342,7 @@ var LemurQaNodeImpl = {
|
|
|
50183
50342
|
const chartNode = {
|
|
50184
50343
|
type: "assemblyAiLemurQa",
|
|
50185
50344
|
title: "LeMUR Question & Answers",
|
|
50186
|
-
id: (0,
|
|
50345
|
+
id: (0, import_non_secure115.nanoid)(),
|
|
50187
50346
|
visualData: {
|
|
50188
50347
|
x: 0,
|
|
50189
50348
|
y: 0,
|
|
@@ -50320,14 +50479,14 @@ function applyQuestionEditors(data, question) {
|
|
|
50320
50479
|
var lemurQaNode = pluginNodeDefinition(LemurQaNodeImpl, "LeMUR Q&A");
|
|
50321
50480
|
|
|
50322
50481
|
// src/plugins/assemblyAi/TranscribeAudioNode.ts
|
|
50323
|
-
var
|
|
50482
|
+
var import_non_secure116 = require("nanoid/non-secure");
|
|
50324
50483
|
var import_ts_dedent92 = require("ts-dedent");
|
|
50325
50484
|
var TranscribeAudioNodeImpl = {
|
|
50326
50485
|
create() {
|
|
50327
50486
|
const chartNode = {
|
|
50328
50487
|
type: "assemblyAiTranscribeAudio",
|
|
50329
50488
|
title: "Transcribe Audio",
|
|
50330
|
-
id: (0,
|
|
50489
|
+
id: (0, import_non_secure116.nanoid)(),
|
|
50331
50490
|
visualData: {
|
|
50332
50491
|
x: 0,
|
|
50333
50492
|
y: 0,
|
|
@@ -50441,7 +50600,7 @@ function getAdditionalParameters(data) {
|
|
|
50441
50600
|
}
|
|
50442
50601
|
|
|
50443
50602
|
// src/plugins/assemblyAi/LemurSummaryNode.ts
|
|
50444
|
-
var
|
|
50603
|
+
var import_non_secure117 = require("nanoid/non-secure");
|
|
50445
50604
|
var import_ts_dedent93 = require("ts-dedent");
|
|
50446
50605
|
var import_assemblyai3 = require("assemblyai");
|
|
50447
50606
|
var LemurSummaryNodeImpl = {
|
|
@@ -50449,7 +50608,7 @@ var LemurSummaryNodeImpl = {
|
|
|
50449
50608
|
const chartNode = {
|
|
50450
50609
|
type: "assemblyAiLemurSummary",
|
|
50451
50610
|
title: "LeMUR Summary",
|
|
50452
|
-
id: (0,
|
|
50611
|
+
id: (0, import_non_secure117.nanoid)(),
|
|
50453
50612
|
visualData: {
|
|
50454
50613
|
x: 0,
|
|
50455
50614
|
y: 0,
|
|
@@ -50519,7 +50678,7 @@ var LemurSummaryNodeImpl = {
|
|
|
50519
50678
|
var lemurSummaryNode = pluginNodeDefinition(LemurSummaryNodeImpl, "LeMUR Summary");
|
|
50520
50679
|
|
|
50521
50680
|
// src/plugins/assemblyAi/LemurTaskNode.ts
|
|
50522
|
-
var
|
|
50681
|
+
var import_non_secure118 = require("nanoid/non-secure");
|
|
50523
50682
|
var import_ts_dedent94 = require("ts-dedent");
|
|
50524
50683
|
var import_assemblyai4 = require("assemblyai");
|
|
50525
50684
|
var LemurTaskNodeImpl = {
|
|
@@ -50527,7 +50686,7 @@ var LemurTaskNodeImpl = {
|
|
|
50527
50686
|
const chartNode = {
|
|
50528
50687
|
type: "assemblyAiLemurTask",
|
|
50529
50688
|
title: "LeMUR Task",
|
|
50530
|
-
id: (0,
|
|
50689
|
+
id: (0, import_non_secure118.nanoid)(),
|
|
50531
50690
|
visualData: {
|
|
50532
50691
|
x: 0,
|
|
50533
50692
|
y: 0,
|
|
@@ -50598,14 +50757,14 @@ var LemurTaskNodeImpl = {
|
|
|
50598
50757
|
var lemurTaskNode = pluginNodeDefinition(LemurTaskNodeImpl, "LeMUR Task");
|
|
50599
50758
|
|
|
50600
50759
|
// src/plugins/assemblyAi/LemurActionItemsNode.ts
|
|
50601
|
-
var
|
|
50760
|
+
var import_non_secure119 = require("nanoid/non-secure");
|
|
50602
50761
|
var import_ts_dedent95 = require("ts-dedent");
|
|
50603
50762
|
var LemurActionItemsNodeImpl = {
|
|
50604
50763
|
create() {
|
|
50605
50764
|
const chartNode = {
|
|
50606
50765
|
type: "assemblyAiLemurActionItems",
|
|
50607
50766
|
title: "LeMUR Action Items",
|
|
50608
|
-
id: (0,
|
|
50767
|
+
id: (0, import_non_secure119.nanoid)(),
|
|
50609
50768
|
visualData: {
|
|
50610
50769
|
x: 0,
|
|
50611
50770
|
y: 0,
|
|
@@ -50703,12 +50862,12 @@ var assemblyAiPlugin = {
|
|
|
50703
50862
|
var assemblyAi_default = assemblyAiPlugin;
|
|
50704
50863
|
|
|
50705
50864
|
// src/plugins/huggingface/nodes/ChatHuggingFace.ts
|
|
50706
|
-
var
|
|
50865
|
+
var import_non_secure120 = require("nanoid/non-secure");
|
|
50707
50866
|
var import_inference = require("@huggingface/inference");
|
|
50708
50867
|
var ChatHuggingFaceNodeImpl = {
|
|
50709
50868
|
create() {
|
|
50710
50869
|
return {
|
|
50711
|
-
id: (0,
|
|
50870
|
+
id: (0, import_non_secure120.nanoid)(),
|
|
50712
50871
|
type: "chatHuggingFace",
|
|
50713
50872
|
data: {
|
|
50714
50873
|
model: "",
|
|
@@ -50938,13 +51097,13 @@ var ChatHuggingFaceNodeImpl = {
|
|
|
50938
51097
|
var chatHuggingFaceNode = pluginNodeDefinition(ChatHuggingFaceNodeImpl, "Chat (Hugging Face, Legacy)");
|
|
50939
51098
|
|
|
50940
51099
|
// src/plugins/huggingface/nodes/TextToImageHuggingFace.ts
|
|
50941
|
-
var
|
|
51100
|
+
var import_non_secure121 = require("nanoid/non-secure");
|
|
50942
51101
|
var import_inference2 = require("@huggingface/inference");
|
|
50943
51102
|
var import_ts_dedent96 = require("ts-dedent");
|
|
50944
51103
|
var TextToImageHuggingFaceNodeImpl = {
|
|
50945
51104
|
create() {
|
|
50946
51105
|
return {
|
|
50947
|
-
id: (0,
|
|
51106
|
+
id: (0, import_non_secure121.nanoid)(),
|
|
50948
51107
|
type: "textToImageHuggingFace",
|
|
50949
51108
|
data: {
|
|
50950
51109
|
model: "",
|
|
@@ -54625,7 +54784,7 @@ var openAIPlugin = {
|
|
|
54625
54784
|
};
|
|
54626
54785
|
|
|
54627
54786
|
// src/plugins/google/nodes/ChatGoogleNode.ts
|
|
54628
|
-
var
|
|
54787
|
+
var import_non_secure122 = require("nanoid/non-secure");
|
|
54629
54788
|
var import_ts_dedent97 = require("ts-dedent");
|
|
54630
54789
|
var import_p_retry3 = __toESM(require("p-retry-4"), 1);
|
|
54631
54790
|
var import_ts_pattern8 = require("ts-pattern");
|
|
@@ -54653,7 +54812,7 @@ var ChatGoogleNodeImpl = {
|
|
|
54653
54812
|
const chartNode = {
|
|
54654
54813
|
type: "chatGoogle",
|
|
54655
54814
|
title: "Chat (Google, Legacy)",
|
|
54656
|
-
id: (0,
|
|
54815
|
+
id: (0, import_non_secure122.nanoid)(),
|
|
54657
54816
|
visualData: {
|
|
54658
54817
|
x: 0,
|
|
54659
54818
|
y: 0,
|
|
@@ -55698,6 +55857,143 @@ function loadProjectAndAttachedDataFromString(content) {
|
|
|
55698
55857
|
return deserializeProject(content);
|
|
55699
55858
|
}
|
|
55700
55859
|
|
|
55860
|
+
// src/model/LatestDebuggerProtocol.ts
|
|
55861
|
+
var diagnosticCodes = ["history-truncated", "history-gap", "event-too-large", "owner-unavailable"];
|
|
55862
|
+
var LATEST_DEBUGGER_PATH = "/ws/latest-debugger";
|
|
55863
|
+
var managedProcessMessages = {
|
|
55864
|
+
codeConsole: true,
|
|
55865
|
+
nodeStart: true,
|
|
55866
|
+
nodeFinish: true,
|
|
55867
|
+
nodeError: true,
|
|
55868
|
+
nodeExcluded: true,
|
|
55869
|
+
userInput: true,
|
|
55870
|
+
start: true,
|
|
55871
|
+
done: true,
|
|
55872
|
+
abort: true,
|
|
55873
|
+
graphAbort: true,
|
|
55874
|
+
graphStart: true,
|
|
55875
|
+
webAppStoragePatch: true,
|
|
55876
|
+
graphFinish: true,
|
|
55877
|
+
graphOutputsReady: true,
|
|
55878
|
+
partialOutput: true,
|
|
55879
|
+
progress: true,
|
|
55880
|
+
llmCallFinished: true,
|
|
55881
|
+
llmChatOutputSnapshot: true,
|
|
55882
|
+
llmProfileAttempt: true,
|
|
55883
|
+
toolCallFinished: true,
|
|
55884
|
+
nodeOutputsCleared: true,
|
|
55885
|
+
streamingOutputWatchSummary: true,
|
|
55886
|
+
error: true,
|
|
55887
|
+
graphError: true,
|
|
55888
|
+
trace: true,
|
|
55889
|
+
pause: true,
|
|
55890
|
+
resume: true
|
|
55891
|
+
};
|
|
55892
|
+
function isLatestDebuggerExecutionMessage(message2) {
|
|
55893
|
+
return Object.hasOwn(managedProcessMessages, message2) || message2 === "latest-settled" || message2 === "latest-prompt-closed";
|
|
55894
|
+
}
|
|
55895
|
+
function encodeLatestDebuggerEnvelope(serialized, scope, eventId, history = false) {
|
|
55896
|
+
if (!scope && !eventId && !history) return serialized;
|
|
55897
|
+
const metadata = JSON.stringify({
|
|
55898
|
+
...eventId ? { rivetEventId: eventId } : {},
|
|
55899
|
+
...scope ? { rivetScope: scope } : {},
|
|
55900
|
+
...history ? { rivetHistory: history } : {}
|
|
55901
|
+
});
|
|
55902
|
+
return `${metadata.slice(0, -1)},${serialized.slice(1)}`;
|
|
55903
|
+
}
|
|
55904
|
+
function createLatestDebuggerSession(channel, historyThrough) {
|
|
55905
|
+
return {
|
|
55906
|
+
message: "latest-session",
|
|
55907
|
+
data: {
|
|
55908
|
+
protocol: 2,
|
|
55909
|
+
channel,
|
|
55910
|
+
channelIsolation: true,
|
|
55911
|
+
runScopedControls: true,
|
|
55912
|
+
...historyThrough ? { historyThrough } : {}
|
|
55913
|
+
}
|
|
55914
|
+
};
|
|
55915
|
+
}
|
|
55916
|
+
function isLatestDebuggerSession(value) {
|
|
55917
|
+
var _a;
|
|
55918
|
+
const frame = value;
|
|
55919
|
+
return (frame == null ? void 0 : frame.message) === "latest-session" && ((_a = frame.data) == null ? void 0 : _a.protocol) === 2 && (frame.data.channel === null || typeof frame.data.channel === "string" && /^[A-Za-z0-9_-]{1,32}$/.test(frame.data.channel)) && frame.data.channelIsolation === true && frame.data.runScopedControls === true && (frame.data.historyThrough === void 0 || Array.isArray(frame.data.historyThrough) && frame.data.historyThrough.length <= 8192 && frame.data.historyThrough.every((id) => readLatestDebuggerEventPosition(id) !== void 0));
|
|
55920
|
+
}
|
|
55921
|
+
function readLatestDebuggerExecution(value) {
|
|
55922
|
+
var _a, _b, _c;
|
|
55923
|
+
const frame = value;
|
|
55924
|
+
if (!frame || typeof frame.message !== "string" || !isLatestDebuggerScope(frame.rivetScope)) return;
|
|
55925
|
+
if (!isLatestDebuggerExecutionMessage(frame.message)) return;
|
|
55926
|
+
if (frame.message === "latest-prompt-closed") {
|
|
55927
|
+
const id = (_a = frame.data) == null ? void 0 : _a.promptId;
|
|
55928
|
+
if (typeof id !== "string" || id.length === 0 || id.length > 200) return;
|
|
55929
|
+
}
|
|
55930
|
+
const root = (_c = (_b = frame.data) == null ? void 0 : _b.execution) == null ? void 0 : _c.rootRunId;
|
|
55931
|
+
if (root !== void 0 && root !== frame.rivetScope.rootRunId) return;
|
|
55932
|
+
return value;
|
|
55933
|
+
}
|
|
55934
|
+
function createLatestDebuggerDiagnostic(code) {
|
|
55935
|
+
return { message: "latest-diagnostic", data: { protocol: 1, code } };
|
|
55936
|
+
}
|
|
55937
|
+
function isLatestDebuggerDiagnostic(value) {
|
|
55938
|
+
var _a;
|
|
55939
|
+
const frame = value;
|
|
55940
|
+
return (frame == null ? void 0 : frame.message) === "latest-diagnostic" && ((_a = frame.data) == null ? void 0 : _a.protocol) === 1 && diagnosticCodes.includes(frame.data.code);
|
|
55941
|
+
}
|
|
55942
|
+
function createLatestDebuggerControlResult(commandId, result) {
|
|
55943
|
+
return {
|
|
55944
|
+
message: "latest-control-result",
|
|
55945
|
+
data: { status: result.status, ...result.reason === void 0 ? {} : { reason: result.reason }, commandId }
|
|
55946
|
+
};
|
|
55947
|
+
}
|
|
55948
|
+
function readLatestDebuggerControl(value) {
|
|
55949
|
+
var _a;
|
|
55950
|
+
const message2 = value;
|
|
55951
|
+
const data = message2 == null ? void 0 : message2.data;
|
|
55952
|
+
if ((message2 == null ? void 0 : message2.type) !== "latest-control" || !data || typeof data.commandId !== "string" || !data.commandId || data.commandId.length > 200 || !isLatestDebuggerScope(data.target))
|
|
55953
|
+
return;
|
|
55954
|
+
if (data.action === "pause" || data.action === "resume" || data.action === "abort") return message2;
|
|
55955
|
+
if (data.action === "user-input" && typeof data.promptId === "string" && data.promptId.length > 0 && data.promptId.length <= 200 && ((_a = data.answers) == null ? void 0 : _a.type) === "string[]" && Array.isArray(data.answers.value) && data.answers.value.every((answer) => typeof answer === "string"))
|
|
55956
|
+
return message2;
|
|
55957
|
+
}
|
|
55958
|
+
function readLatestDebuggerEventId(value) {
|
|
55959
|
+
if (!value || typeof value !== "object") return;
|
|
55960
|
+
const id = value.rivetEventId;
|
|
55961
|
+
return typeof id === "string" && /^[a-z0-9:-]{1,200}$/.test(id) ? id : void 0;
|
|
55962
|
+
}
|
|
55963
|
+
function readLatestDebuggerEventPosition(value) {
|
|
55964
|
+
if (typeof value !== "string" || value.length > 200 || !/^[a-z0-9:-]+:[1-9]\d{0,15}$/.test(value)) return;
|
|
55965
|
+
const split = value.lastIndexOf(":");
|
|
55966
|
+
const sequence = Number(value.slice(split + 1));
|
|
55967
|
+
if (!Number.isSafeInteger(sequence)) return;
|
|
55968
|
+
return { origin: value.slice(0, split), sequence };
|
|
55969
|
+
}
|
|
55970
|
+
function isLatestDebuggerControlResult(value) {
|
|
55971
|
+
var _a;
|
|
55972
|
+
const message2 = value;
|
|
55973
|
+
return (message2 == null ? void 0 : message2.message) === "latest-control-result" && typeof ((_a = message2.data) == null ? void 0 : _a.commandId) === "string" && message2.data.commandId.length > 0 && message2.data.commandId.length <= 200 && ["accepted", "rejected", "outcome-unknown"].includes(message2.data.status) && (message2.data.reason === void 0 || typeof message2.data.reason === "string");
|
|
55974
|
+
}
|
|
55975
|
+
function parseLatestEndpointSegment(segment) {
|
|
55976
|
+
const [endpointName, channel, extra] = segment.split("@");
|
|
55977
|
+
if (!endpointName || !/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/.test(endpointName) || extra !== void 0 || channel !== void 0 && !/^[A-Za-z0-9_-]{1,32}$/.test(channel))
|
|
55978
|
+
throw new Error("Invalid latest endpoint or debugger channel");
|
|
55979
|
+
return { endpointName, channel: channel ?? null };
|
|
55980
|
+
}
|
|
55981
|
+
function parseLatestDebuggerPath(pathname) {
|
|
55982
|
+
const decoded = decodeURIComponent(pathname);
|
|
55983
|
+
if (decoded === LATEST_DEBUGGER_PATH) return null;
|
|
55984
|
+
if (!decoded.startsWith(`${LATEST_DEBUGGER_PATH}@`)) throw new Error("Invalid latest debugger path");
|
|
55985
|
+
const channel = decoded.slice(LATEST_DEBUGGER_PATH.length + 1);
|
|
55986
|
+
if (!/^[A-Za-z0-9_-]{1,32}$/.test(channel)) throw new Error("Invalid debugger channel");
|
|
55987
|
+
return channel;
|
|
55988
|
+
}
|
|
55989
|
+
function isLatestDebuggerScope(value) {
|
|
55990
|
+
if (!value || typeof value !== "object") return false;
|
|
55991
|
+
const scope = value;
|
|
55992
|
+
return (scope.channel === null || typeof scope.channel === "string" && /^[A-Za-z0-9_-]{1,32}$/.test(scope.channel)) && [scope.rootRunId, scope.projectId, scope.owner, scope.incarnation].every(
|
|
55993
|
+
(v) => typeof v === "string" && v.length > 0 && v.length <= 200
|
|
55994
|
+
) && (scope.promptId === void 0 || typeof scope.promptId === "string" && scope.promptId.length > 0 && scope.promptId.length <= 200) && (scope.admittedAt === void 0 || Number.isSafeInteger(scope.admittedAt) && scope.admittedAt >= 0) && (scope.promptLifecycle === void 0 || scope.promptLifecycle === 1);
|
|
55995
|
+
}
|
|
55996
|
+
|
|
55701
55997
|
// src/index.ts
|
|
55702
55998
|
installCodeRunnerNamespace(exports_exports);
|
|
55703
55999
|
var Rivet = void 0;
|
|
@@ -55707,6 +56003,7 @@ var Rivet = void 0;
|
|
|
55707
56003
|
AGENT_RESPONSE_TRACE_MAX_PROFILE_ATTEMPTS,
|
|
55708
56004
|
AGENT_RESPONSE_TRACE_MAX_TOOL_CALLS,
|
|
55709
56005
|
AGENT_RESPONSE_TRACE_SCHEMA_VERSION,
|
|
56006
|
+
AICostNodeImpl,
|
|
55710
56007
|
ALL_CODE_RUNNER_OPTIONS,
|
|
55711
56008
|
AbortGraphNodeImpl,
|
|
55712
56009
|
AgentResponseTraceCollector,
|
|
@@ -55810,6 +56107,7 @@ var Rivet = void 0;
|
|
|
55810
56107
|
KnowledgeDocumentNodeImpl,
|
|
55811
56108
|
KnowledgeSourceNodeImpl,
|
|
55812
56109
|
KnowledgeStoreController,
|
|
56110
|
+
LATEST_DEBUGGER_PATH,
|
|
55813
56111
|
LIQUID_DEFAULT_CREDENTIAL_NAMES,
|
|
55814
56112
|
LIQUID_SYSTEM_ONE_ENDPOINT,
|
|
55815
56113
|
LIQUID_TOKEN_PRICING,
|
|
@@ -55918,6 +56216,7 @@ var Rivet = void 0;
|
|
|
55918
56216
|
WatchStreamingOutputNodeImpl,
|
|
55919
56217
|
abortGraphNode,
|
|
55920
56218
|
addWarning,
|
|
56219
|
+
aiCostNode,
|
|
55921
56220
|
analyzeCodeOutputs,
|
|
55922
56221
|
anthropicCacheControlTtlOptions,
|
|
55923
56222
|
anthropicEffortOptions,
|
|
@@ -56023,6 +56322,9 @@ var Rivet = void 0;
|
|
|
56023
56322
|
createKnowledgeStoreFieldDraftDefaults,
|
|
56024
56323
|
createLLMChatV2NodeData,
|
|
56025
56324
|
createLLMProfileNodeData,
|
|
56325
|
+
createLatestDebuggerControlResult,
|
|
56326
|
+
createLatestDebuggerDiagnostic,
|
|
56327
|
+
createLatestDebuggerSession,
|
|
56026
56328
|
createProjectBundleRuntime,
|
|
56027
56329
|
createResolvedChatV2Provider,
|
|
56028
56330
|
createRivetLLMProfileHealthIdentity,
|
|
@@ -56061,6 +56363,7 @@ var Rivet = void 0;
|
|
|
56061
56363
|
documentNode,
|
|
56062
56364
|
doubleCheckProject,
|
|
56063
56365
|
emptyNodeGraph,
|
|
56366
|
+
encodeLatestDebuggerEnvelope,
|
|
56064
56367
|
encodeProjectGlobalVariable,
|
|
56065
56368
|
encodeRivetWebAppStorageBinaryFrame,
|
|
56066
56369
|
evaluateJsonPath,
|
|
@@ -56244,6 +56547,11 @@ var Rivet = void 0;
|
|
|
56244
56547
|
isKnowledgeSourceReference,
|
|
56245
56548
|
isKnowledgeStoreProviderFieldDefaultValid,
|
|
56246
56549
|
isLLMChatV2StructuredResponseFormat,
|
|
56550
|
+
isLatestDebuggerControlResult,
|
|
56551
|
+
isLatestDebuggerDiagnostic,
|
|
56552
|
+
isLatestDebuggerExecutionMessage,
|
|
56553
|
+
isLatestDebuggerScope,
|
|
56554
|
+
isLatestDebuggerSession,
|
|
56247
56555
|
isNodePrefabInstanceNode,
|
|
56248
56556
|
isNotFunctionDataValue,
|
|
56249
56557
|
isReportedTokenCount,
|
|
@@ -56350,6 +56658,8 @@ var Rivet = void 0;
|
|
|
56350
56658
|
parseDataBusChannelIndex,
|
|
56351
56659
|
parseInterpolationExpression,
|
|
56352
56660
|
parseInterpolationTemplate,
|
|
56661
|
+
parseLatestDebuggerPath,
|
|
56662
|
+
parseLatestEndpointSegment,
|
|
56353
56663
|
parseProviderJsonChunk,
|
|
56354
56664
|
parseRivetWebAppBrowserStorageClientMessage,
|
|
56355
56665
|
parseRivetWebAppBrowserStorageServerMessage,
|
|
@@ -56379,6 +56689,10 @@ var Rivet = void 0;
|
|
|
56379
56689
|
readFileNode,
|
|
56380
56690
|
readKnowledgeStoreConnectionCredentials,
|
|
56381
56691
|
readKnowledgeStoreConnectionCredentialsDraft,
|
|
56692
|
+
readLatestDebuggerControl,
|
|
56693
|
+
readLatestDebuggerEventId,
|
|
56694
|
+
readLatestDebuggerEventPosition,
|
|
56695
|
+
readLatestDebuggerExecution,
|
|
56382
56696
|
reconcileProjectUiGraphBindings,
|
|
56383
56697
|
reconcileProjectUiGraphButtonBindings,
|
|
56384
56698
|
reconcileSubgraphTargetBoundary,
|