@n8n/ai-utilities 0.20.2 → 0.21.1
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/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/node-catalog/dynamic-node-parameters.d.ts +38 -0
- package/dist/cjs/node-catalog/dynamic-node-parameters.js +200 -0
- package/dist/cjs/node-catalog/dynamic-node-parameters.js.map +1 -0
- package/dist/cjs/node-catalog/index.d.ts +2 -0
- package/dist/cjs/node-catalog/index.js +14 -2
- package/dist/cjs/node-catalog/index.js.map +1 -1
- package/dist/cjs/typecheck.tsbuildinfo +1 -1
- package/dist/cjs/utils/follow-redirects.js +1 -1
- package/dist/cjs/utils/http-proxy-agent.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node-catalog/dynamic-node-parameters.d.ts +38 -0
- package/dist/esm/node-catalog/dynamic-node-parameters.js +190 -0
- package/dist/esm/node-catalog/dynamic-node-parameters.js.map +1 -0
- package/dist/esm/node-catalog/index.d.ts +2 -0
- package/dist/esm/node-catalog/index.js +13 -1
- package/dist/esm/node-catalog/index.js.map +1 -1
- package/dist/esm/typecheck.tsbuildinfo +1 -1
- package/dist/esm/utils/follow-redirects.js +1 -1
- package/dist/esm/utils/http-proxy-agent.js.map +1 -1
- package/package.json +7 -8
package/dist/cjs/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { validateEmbedQueryInput, validateEmbedDocumentsInput, } from './utils/e
|
|
|
6
6
|
export { getMetadataFiltersValues, hasLongSequentialRepeat } from './utils/helpers';
|
|
7
7
|
export { N8nBinaryLoader } from './utils/n8n-binary-loader';
|
|
8
8
|
export { N8nJsonLoader } from './utils/n8n-json-loader';
|
|
9
|
+
export { N8nPdfLoader } from './utils/loaders/n8n-pdf-loader';
|
|
9
10
|
export { N8nLlmTracing } from './utils/n8n-llm-tracing';
|
|
10
11
|
export { TextEditorDocument, NoMatchFoundError, MultipleMatchesError, InvalidLineNumberError, InvalidViewRangeError, InvalidPathError, FileExistsError, FileNotFoundError, BatchReplacementError, formatTextWithLineNumbers, findDivergenceContext, parseStrReplacements, } from './utils/workflow-text-editor';
|
|
11
12
|
export type { ViewCommand, CreateCommand, StrReplaceCommand, InsertCommand, BatchStrReplaceCommand, TextEditorCommand, TextEditorCommandWithBatch, TextEditorToolCall, TextEditorResult, StrReplacement, BatchReplaceResult, TextEditorDocumentOptions, } from './utils/workflow-text-editor';
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./ai-node-sdk-version", "./utils/log-wrapper", "./utils/log-ai-event", "./utils/sse", "./utils/embeddings-input-validation", "./utils/helpers", "./utils/n8n-binary-loader", "./utils/n8n-json-loader", "./utils/n8n-llm-tracing", "./utils/workflow-text-editor", "./utils/tokenizer/token-estimator", "./utils/tokenizer/tiktoken", "./utils/failed-attempt-handler/n8nLlmFailedAttemptHandler", "./utils/http-proxy-agent", "./web-search", "./utils/follow-redirects", "./utils/shared-fields", "./utils/fromai-tool-factory", "./utils/vector-store/createVectorStoreNode/createVectorStoreNode", "./utils/vector-store/MemoryManager/MemoryVectorStoreManager", "./utils/vector-store/processDocuments", "./converters/tool", "./converters/message", "./guards", "./adapters/langchain-chat-model", "./chat-model/base", "./memory/base-chat-history", "./memory/base-chat-memory", "./memory/windowed-chat-memory", "./suppliers/supplyMemory", "./suppliers/supplyModel"], factory);
|
|
7
|
+
define(["require", "exports", "./ai-node-sdk-version", "./utils/log-wrapper", "./utils/log-ai-event", "./utils/sse", "./utils/embeddings-input-validation", "./utils/helpers", "./utils/n8n-binary-loader", "./utils/n8n-json-loader", "./utils/loaders/n8n-pdf-loader", "./utils/n8n-llm-tracing", "./utils/workflow-text-editor", "./utils/tokenizer/token-estimator", "./utils/tokenizer/tiktoken", "./utils/failed-attempt-handler/n8nLlmFailedAttemptHandler", "./utils/http-proxy-agent", "./web-search", "./utils/follow-redirects", "./utils/shared-fields", "./utils/fromai-tool-factory", "./utils/vector-store/createVectorStoreNode/createVectorStoreNode", "./utils/vector-store/MemoryManager/MemoryVectorStoreManager", "./utils/vector-store/processDocuments", "./converters/tool", "./converters/message", "./guards", "./adapters/langchain-chat-model", "./chat-model/base", "./memory/base-chat-history", "./memory/base-chat-memory", "./memory/windowed-chat-memory", "./suppliers/supplyMemory", "./suppliers/supplyModel"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.supplyModel = exports.supplyMemory = exports.WindowedChatMemory = exports.BaseChatMemory = exports.BaseChatHistory = exports.BaseChatModel = exports.LangchainChatModelAdapter = exports.isToolsInstance = exports.isChatInstance = exports.isBaseChatMessageHistory = exports.isBaseChatMemory = exports.fromLcContent = exports.toLcContent = exports.toLcMessage = exports.fromLcMessage = exports.getParametersJsonSchema = exports.processDocument = exports.processDocuments = exports.MemoryVectorStoreManager = exports.createVectorStoreNode = exports.extractFromAIParameters = exports.createZodSchemaFromArgs = exports.createToolFromNode = exports.getTemplateNoticeField = exports.getBatchingOptionFields = exports.metadataFilterField = exports.getConnectionHintNoticeField = exports.fetchFollowingRedirects = exports.searxngSearch = exports.braveSearch = exports.proxyFetch = exports.getNodeProxyAgent = exports.getProxyAgent = exports.makeN8nLlmFailedAttemptHandler = exports.getEncoding = exports.encodingForModel = exports.estimateTextSplitsByTokens = exports.estimateTokensByCharCount = exports.estimateTokensFromStringList = exports.parseStrReplacements = exports.findDivergenceContext = exports.formatTextWithLineNumbers = exports.BatchReplacementError = exports.FileNotFoundError = exports.FileExistsError = exports.InvalidPathError = exports.InvalidViewRangeError = exports.InvalidLineNumberError = exports.MultipleMatchesError = exports.NoMatchFoundError = exports.TextEditorDocument = exports.N8nLlmTracing = exports.N8nJsonLoader = exports.N8nBinaryLoader = exports.hasLongSequentialRepeat = exports.getMetadataFiltersValues = exports.validateEmbedDocumentsInput = exports.validateEmbedQueryInput = exports.parseSSEStream = exports.logAiEvent = exports.logWrapper = exports.AI_NODE_SDK_VERSION = void 0;
|
|
12
|
+
exports.supplyModel = exports.supplyMemory = exports.WindowedChatMemory = exports.BaseChatMemory = exports.BaseChatHistory = exports.BaseChatModel = exports.LangchainChatModelAdapter = exports.isToolsInstance = exports.isChatInstance = exports.isBaseChatMessageHistory = exports.isBaseChatMemory = exports.fromLcContent = exports.toLcContent = exports.toLcMessage = exports.fromLcMessage = exports.getParametersJsonSchema = exports.processDocument = exports.processDocuments = exports.MemoryVectorStoreManager = exports.createVectorStoreNode = exports.extractFromAIParameters = exports.createZodSchemaFromArgs = exports.createToolFromNode = exports.getTemplateNoticeField = exports.getBatchingOptionFields = exports.metadataFilterField = exports.getConnectionHintNoticeField = exports.fetchFollowingRedirects = exports.searxngSearch = exports.braveSearch = exports.proxyFetch = exports.getNodeProxyAgent = exports.getProxyAgent = exports.makeN8nLlmFailedAttemptHandler = exports.getEncoding = exports.encodingForModel = exports.estimateTextSplitsByTokens = exports.estimateTokensByCharCount = exports.estimateTokensFromStringList = exports.parseStrReplacements = exports.findDivergenceContext = exports.formatTextWithLineNumbers = exports.BatchReplacementError = exports.FileNotFoundError = exports.FileExistsError = exports.InvalidPathError = exports.InvalidViewRangeError = exports.InvalidLineNumberError = exports.MultipleMatchesError = exports.NoMatchFoundError = exports.TextEditorDocument = exports.N8nLlmTracing = exports.N8nPdfLoader = exports.N8nJsonLoader = exports.N8nBinaryLoader = exports.hasLongSequentialRepeat = exports.getMetadataFiltersValues = exports.validateEmbedDocumentsInput = exports.validateEmbedQueryInput = exports.parseSSEStream = exports.logAiEvent = exports.logWrapper = exports.AI_NODE_SDK_VERSION = void 0;
|
|
13
13
|
var ai_node_sdk_version_1 = require("./ai-node-sdk-version");
|
|
14
14
|
Object.defineProperty(exports, "AI_NODE_SDK_VERSION", { enumerable: true, get: function () { return ai_node_sdk_version_1.AI_NODE_SDK_VERSION; } });
|
|
15
15
|
var log_wrapper_1 = require("./utils/log-wrapper");
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
Object.defineProperty(exports, "N8nBinaryLoader", { enumerable: true, get: function () { return n8n_binary_loader_1.N8nBinaryLoader; } });
|
|
29
29
|
var n8n_json_loader_1 = require("./utils/n8n-json-loader");
|
|
30
30
|
Object.defineProperty(exports, "N8nJsonLoader", { enumerable: true, get: function () { return n8n_json_loader_1.N8nJsonLoader; } });
|
|
31
|
+
var n8n_pdf_loader_1 = require("./utils/loaders/n8n-pdf-loader");
|
|
32
|
+
Object.defineProperty(exports, "N8nPdfLoader", { enumerable: true, get: function () { return n8n_pdf_loader_1.N8nPdfLoader; } });
|
|
31
33
|
var n8n_llm_tracing_1 = require("./utils/n8n-llm-tracing");
|
|
32
34
|
Object.defineProperty(exports, "N8nLlmTracing", { enumerable: true, get: function () { return n8n_llm_tracing_1.N8nLlmTracing; } });
|
|
33
35
|
var workflow_text_editor_1 = require("./utils/workflow-text-editor");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,6DAA4D;IAAnD,0HAAA,mBAAmB,OAAA;IAG5B,mDAAiD;IAAxC,yGAAA,UAAU,OAAA;IACnB,qDAAkD;IAAzC,0GAAA,UAAU,OAAA;IACnB,mCAA6C;IAApC,qGAAA,cAAc,OAAA;IACvB,mFAG6C;IAF5C,sIAAA,uBAAuB,OAAA;IACvB,0IAAA,2BAA2B,OAAA;IAE5B,2CAAoF;IAA3E,mHAAA,wBAAwB,OAAA;IAAE,kHAAA,uBAAuB,OAAA;IAC1D,+DAA4D;IAAnD,oH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mCAKkB;IAJjB,0GAAA,gBAAgB,OAAA;IAChB,kHAAA,wBAAwB,OAAA;IACxB,wGAAA,cAAc,OAAA;IACd,yGAAA,eAAe,OAAA;IAsBhB,wEAA4E;IAAnE,iIAAA,yBAAyB,OAAA;IAClC,0CAAkD;IAAzC,qGAAA,aAAa,OAAA;IAGtB,gEAA6D;IAApD,oHAAA,eAAe,OAAA;IACxB,8DAA2D;IAAlD,kHAAA,cAAc,OAAA;IAGvB,sEAAkG;IAAzF,0HAAA,kBAAkB,OAAA;IAG3B,yDAAkF;IAAzE,4GAAA,YAAY,OAAA;IACrB,uDAAiG;IAAxF,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ILoadOptions, INodeCredentials, INodeListSearchItems, INodeParameterResourceLocator, INodeProperties, INodePropertyCollection, INodePropertyOptions, INodeTypeDescription, NodeParameterValue } from 'n8n-workflow';
|
|
2
|
+
export type DynamicNodeParameterLookup = {
|
|
3
|
+
kind: 'resourceLocator';
|
|
4
|
+
methodName: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
skipCredentialsCheck: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'loadOptionsMethod';
|
|
9
|
+
methodName: string;
|
|
10
|
+
skipCredentialsCheck: false;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'loadOptionsRouting';
|
|
13
|
+
loadOptions: ILoadOptions;
|
|
14
|
+
skipCredentialsCheck: false;
|
|
15
|
+
};
|
|
16
|
+
export type DynamicNodeParameterPath = {
|
|
17
|
+
path: string;
|
|
18
|
+
type: INodeProperties['type'];
|
|
19
|
+
method: string;
|
|
20
|
+
};
|
|
21
|
+
export type RequiredNodeCredentialSlot = {
|
|
22
|
+
credentialType: string;
|
|
23
|
+
credentialSlot: string;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
};
|
|
26
|
+
type NodePropertyItem = INodeProperties | INodePropertyCollection | INodePropertyOptions;
|
|
27
|
+
export declare function normalizeParameterPath(path: string): string;
|
|
28
|
+
export declare function toDynamicParameterPath(parameterPath: string): string;
|
|
29
|
+
export declare function findNodeParameterProperty(properties: INodeProperties[], parameterPath: string): INodeProperties | null;
|
|
30
|
+
export declare function getDynamicNodeParameterLookup(property: INodeProperties): DynamicNodeParameterLookup | null;
|
|
31
|
+
export declare function collectDynamicNodeParameterPaths(items: NodePropertyItem[], prefix?: string[]): DynamicNodeParameterPath[];
|
|
32
|
+
export declare function getRequiredNodeCredentialSlots(nodeType: INodeTypeDescription): RequiredNodeCredentialSlot[];
|
|
33
|
+
export declare function hasNodeCredentials(credentials: INodeCredentials | undefined): boolean;
|
|
34
|
+
export declare function toResourceLocatorParameterValue(option: INodeListSearchItems, mode: string): INodeParameterResourceLocator;
|
|
35
|
+
export declare function toLoadedOptionParameterValue(option: INodePropertyOptions): NodeParameterValue;
|
|
36
|
+
export declare function detectAuthenticationParameterValue(nodeDesc: INodeTypeDescription, credentialType: string): string | undefined;
|
|
37
|
+
export declare function formatResourceLocatorOptionsForLLM(options: INodeListSearchItems[], parameterPath: string): string;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "n8n-workflow"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.normalizeParameterPath = normalizeParameterPath;
|
|
13
|
+
exports.toDynamicParameterPath = toDynamicParameterPath;
|
|
14
|
+
exports.findNodeParameterProperty = findNodeParameterProperty;
|
|
15
|
+
exports.getDynamicNodeParameterLookup = getDynamicNodeParameterLookup;
|
|
16
|
+
exports.collectDynamicNodeParameterPaths = collectDynamicNodeParameterPaths;
|
|
17
|
+
exports.getRequiredNodeCredentialSlots = getRequiredNodeCredentialSlots;
|
|
18
|
+
exports.hasNodeCredentials = hasNodeCredentials;
|
|
19
|
+
exports.toResourceLocatorParameterValue = toResourceLocatorParameterValue;
|
|
20
|
+
exports.toLoadedOptionParameterValue = toLoadedOptionParameterValue;
|
|
21
|
+
exports.detectAuthenticationParameterValue = detectAuthenticationParameterValue;
|
|
22
|
+
exports.formatResourceLocatorOptionsForLLM = formatResourceLocatorOptionsForLLM;
|
|
23
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
24
|
+
function normalizeParameterPath(path) {
|
|
25
|
+
return path
|
|
26
|
+
.replace(/^parameters\./, '')
|
|
27
|
+
.split('.')
|
|
28
|
+
.filter((part) => part.length > 0)
|
|
29
|
+
.join('.');
|
|
30
|
+
}
|
|
31
|
+
function toDynamicParameterPath(parameterPath) {
|
|
32
|
+
return `parameters.${normalizeParameterPath(parameterPath)}`;
|
|
33
|
+
}
|
|
34
|
+
function isPropertyOption(item) {
|
|
35
|
+
return !(0, n8n_workflow_1.isINodeProperties)(item) && !(0, n8n_workflow_1.isINodePropertyCollection)(item);
|
|
36
|
+
}
|
|
37
|
+
function findPropertyInProperty(property, pathParts) {
|
|
38
|
+
const options = property.options;
|
|
39
|
+
if (!Array.isArray(options))
|
|
40
|
+
return null;
|
|
41
|
+
return findPropertyInItems(options, pathParts);
|
|
42
|
+
}
|
|
43
|
+
function findPropertyInItems(items, pathParts) {
|
|
44
|
+
if (pathParts.length === 0)
|
|
45
|
+
return null;
|
|
46
|
+
for (const item of items) {
|
|
47
|
+
if (isPropertyOption(item))
|
|
48
|
+
continue;
|
|
49
|
+
if ((0, n8n_workflow_1.isINodePropertyCollection)(item)) {
|
|
50
|
+
if (item.name === pathParts[0]) {
|
|
51
|
+
const nested = findPropertyInItems(item.values, pathParts.slice(1));
|
|
52
|
+
if (nested)
|
|
53
|
+
return nested;
|
|
54
|
+
}
|
|
55
|
+
const nested = findPropertyInItems(item.values, pathParts);
|
|
56
|
+
if (nested)
|
|
57
|
+
return nested;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (item.name === pathParts[0]) {
|
|
61
|
+
if (pathParts.length === 1)
|
|
62
|
+
return item;
|
|
63
|
+
const nested = findPropertyInProperty(item, pathParts.slice(1));
|
|
64
|
+
if (nested)
|
|
65
|
+
return nested;
|
|
66
|
+
}
|
|
67
|
+
const nested = findPropertyInProperty(item, pathParts);
|
|
68
|
+
if (nested)
|
|
69
|
+
return nested;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
function findNodeParameterProperty(properties, parameterPath) {
|
|
74
|
+
return findPropertyInItems(properties, normalizeParameterPath(parameterPath).split('.'));
|
|
75
|
+
}
|
|
76
|
+
function getDynamicNodeParameterLookup(property) {
|
|
77
|
+
if (property.type === 'resourceLocator') {
|
|
78
|
+
const listMode = property.modes?.find((mode) => mode.type === 'list' && mode.typeOptions?.searchListMethod);
|
|
79
|
+
if (listMode?.typeOptions?.searchListMethod) {
|
|
80
|
+
return {
|
|
81
|
+
kind: 'resourceLocator',
|
|
82
|
+
methodName: listMode.typeOptions.searchListMethod,
|
|
83
|
+
mode: listMode.name,
|
|
84
|
+
skipCredentialsCheck: listMode.typeOptions.skipCredentialsCheckInRLC === true,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (property.typeOptions?.loadOptionsMethod) {
|
|
89
|
+
return {
|
|
90
|
+
kind: 'loadOptionsMethod',
|
|
91
|
+
methodName: property.typeOptions.loadOptionsMethod,
|
|
92
|
+
skipCredentialsCheck: false,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (property.typeOptions?.loadOptions) {
|
|
96
|
+
return {
|
|
97
|
+
kind: 'loadOptionsRouting',
|
|
98
|
+
loadOptions: property.typeOptions.loadOptions,
|
|
99
|
+
skipCredentialsCheck: false,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
function collectDynamicNodeParameterPaths(items, prefix = []) {
|
|
105
|
+
const out = [];
|
|
106
|
+
for (const item of items) {
|
|
107
|
+
if (isPropertyOption(item))
|
|
108
|
+
continue;
|
|
109
|
+
if ((0, n8n_workflow_1.isINodePropertyCollection)(item)) {
|
|
110
|
+
out.push(...collectDynamicNodeParameterPaths(item.values, [...prefix, item.name]));
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
const path = [...prefix, item.name].join('.');
|
|
114
|
+
const lookup = getDynamicNodeParameterLookup(item);
|
|
115
|
+
if (lookup) {
|
|
116
|
+
out.push({
|
|
117
|
+
path,
|
|
118
|
+
type: item.type,
|
|
119
|
+
method: lookup.kind === 'loadOptionsRouting' ? 'loadOptions.routing' : lookup.methodName,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (Array.isArray(item.options)) {
|
|
123
|
+
out.push(...collectDynamicNodeParameterPaths(item.options, [...prefix, item.name]));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
function getRequiredNodeCredentialSlots(nodeType) {
|
|
129
|
+
return (nodeType.credentials ?? [])
|
|
130
|
+
.filter((credential) => credential.required !== false)
|
|
131
|
+
.map((credential) => ({
|
|
132
|
+
credentialType: credential.name,
|
|
133
|
+
credentialSlot: credential.name,
|
|
134
|
+
...(credential.displayName ? { displayName: credential.displayName } : {}),
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
function hasNodeCredentials(credentials) {
|
|
138
|
+
return credentials !== undefined && Object.keys(credentials).length > 0;
|
|
139
|
+
}
|
|
140
|
+
function toResourceLocatorParameterValue(option, mode) {
|
|
141
|
+
const value = typeof option.value === 'boolean' ? String(option.value) : option.value;
|
|
142
|
+
return {
|
|
143
|
+
__rl: true,
|
|
144
|
+
mode,
|
|
145
|
+
value,
|
|
146
|
+
cachedResultName: option.name,
|
|
147
|
+
...(option.url ? { cachedResultUrl: option.url } : {}),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function toLoadedOptionParameterValue(option) {
|
|
151
|
+
return option.value;
|
|
152
|
+
}
|
|
153
|
+
function detectAuthenticationParameterValue(nodeDesc, credentialType) {
|
|
154
|
+
const authProp = nodeDesc.properties.find((p) => p.name === 'authentication');
|
|
155
|
+
if (!authProp?.options)
|
|
156
|
+
return undefined;
|
|
157
|
+
for (const opt of authProp.options) {
|
|
158
|
+
if (typeof opt === 'object' && 'value' in opt && typeof opt.value === 'string') {
|
|
159
|
+
const credTypes = nodeDesc.credentials
|
|
160
|
+
?.filter((c) => {
|
|
161
|
+
const show = c.displayOptions?.show?.authentication;
|
|
162
|
+
return Array.isArray(show) && show.includes(opt.value);
|
|
163
|
+
})
|
|
164
|
+
.map((c) => c.name);
|
|
165
|
+
if (credTypes?.includes(credentialType)) {
|
|
166
|
+
return opt.value;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
function escapeXmlText(value) {
|
|
173
|
+
return value
|
|
174
|
+
.replaceAll('&', '&')
|
|
175
|
+
.replaceAll('<', '<')
|
|
176
|
+
.replaceAll('>', '>')
|
|
177
|
+
.replaceAll('"', '"')
|
|
178
|
+
.replaceAll("'", ''');
|
|
179
|
+
}
|
|
180
|
+
function formatResourceLocatorOptionsForLLM(options, parameterPath) {
|
|
181
|
+
if (options.length === 0) {
|
|
182
|
+
return `No options available for parameter "${parameterPath}". The resource may require credentials to be set up first or the external service returned no results.`;
|
|
183
|
+
}
|
|
184
|
+
const parts = [
|
|
185
|
+
`<resource_locator_options parameter="${escapeXmlText(parameterPath)}">`,
|
|
186
|
+
`<total_count>${options.length}</total_count>`,
|
|
187
|
+
'<options>',
|
|
188
|
+
];
|
|
189
|
+
options.forEach((opt, index) => {
|
|
190
|
+
parts.push(` <option index="${index}">`);
|
|
191
|
+
parts.push(` <display_name>${escapeXmlText(opt.name)}</display_name>`);
|
|
192
|
+
parts.push(` <id>${escapeXmlText(String(opt.value))}</id>`);
|
|
193
|
+
parts.push(' </option>');
|
|
194
|
+
});
|
|
195
|
+
parts.push('</options>');
|
|
196
|
+
parts.push('</resource_locator_options>');
|
|
197
|
+
return parts.join('\n');
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
//# sourceMappingURL=dynamic-node-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-node-parameters.js","sourceRoot":"","sources":["../../../src/node-catalog/dynamic-node-parameters.ts"],"names":[],"mappings":";;;;;;;;;;;IA8CA,wDAMC;IAED,wDAEC;IAkDD,8DAKC;IAED,sEAmCC;IAED,4EA8BC;IAED,wEAUC;IAED,gDAEC;IAED,0EAaC;IAED,oEAEC;IAUD,gFAuBC;IAWD,gFAyBC;IAhRD,+CAA4E;IAkC5E,SAAgB,sBAAsB,CAAC,IAAY;QAClD,OAAO,IAAI;aACT,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;aAC5B,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;aACjC,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED,SAAgB,sBAAsB,CAAC,aAAqB;QAC3D,OAAO,cAAc,sBAAsB,CAAC,aAAa,CAAC,EAAE,CAAC;IAC9D,CAAC;IAED,SAAS,gBAAgB,CAAC,IAAsB;QAC/C,OAAO,CAAC,IAAA,gCAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,IAAA,wCAAyB,EAAC,IAAI,CAAC,CAAC;IACrE,CAAC;IAED,SAAS,sBAAsB,CAC9B,QAAyB,EACzB,SAAmB;QAEnB,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC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,WAAW;SACX,CAAC;QAEF,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YAC9B,KAAK,CAAC,IAAI,CAAC,oBAAoB,KAAK,IAAI,CAAC,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,qBAAqB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC1E,KAAK,CAAC,IAAI,CAAC,WAAW,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YAC/D,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAE1C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC"}
|
|
@@ -11,4 +11,6 @@ export { extractModeDiscriminator, extractOperationOnlyDiscriminator, } from './
|
|
|
11
11
|
export type { ModeInfo, ModeDiscriminatorInfo, OperationOnlyInfo, OperationOnlyDiscriminatorInfo, } from './discriminator-utils';
|
|
12
12
|
export { extractResourceOperations, createResourceCacheKey, formatResourceOperationsForPrompt, } from './resource-operation-extractor';
|
|
13
13
|
export type { OperationInfo, ResourceInfo, ResourceOperationInfo, ExtractOptions, } from './resource-operation-extractor';
|
|
14
|
+
export { collectDynamicNodeParameterPaths, detectAuthenticationParameterValue, findNodeParameterProperty, formatResourceLocatorOptionsForLLM, getDynamicNodeParameterLookup, getRequiredNodeCredentialSlots, hasNodeCredentials, normalizeParameterPath, toDynamicParameterPath, toLoadedOptionParameterValue, toResourceLocatorParameterValue, } from './dynamic-node-parameters';
|
|
15
|
+
export type { DynamicNodeParameterLookup, DynamicNodeParameterPath, RequiredNodeCredentialSlot, } from './dynamic-node-parameters';
|
|
14
16
|
export type { SubnodeRequirement, CodeBuilderNodeSearchResult } from './types';
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "./node-type-parser", "./search-engine", "./search", "./get", "./suggested", "./suggested-nodes-data", "./discriminator-utils", "./resource-operation-extractor"], factory);
|
|
7
|
+
define(["require", "exports", "./node-type-parser", "./search-engine", "./search", "./get", "./suggested", "./suggested-nodes-data", "./discriminator-utils", "./resource-operation-extractor", "./dynamic-node-parameters"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.formatResourceOperationsForPrompt = exports.createResourceCacheKey = exports.extractResourceOperations = exports.extractOperationOnlyDiscriminator = exports.extractModeDiscriminator = exports.suggestedNodesData = exports.categoryList = exports.getSuggestedNodes = exports.toSnakeCase = exports.parseNodeId = exports.validatePathWithinBase = exports.isValidPathComponent = exports.getNodeTypes = exports.formatNodeResult = exports.searchCodeBuilderNodes = exports.SCORE_WEIGHTS = exports.CodeBuilderNodeSearchEngine = exports.NodeTypeParser = void 0;
|
|
12
|
+
exports.toResourceLocatorParameterValue = exports.toLoadedOptionParameterValue = exports.toDynamicParameterPath = exports.normalizeParameterPath = exports.hasNodeCredentials = exports.getRequiredNodeCredentialSlots = exports.getDynamicNodeParameterLookup = exports.formatResourceLocatorOptionsForLLM = exports.findNodeParameterProperty = exports.detectAuthenticationParameterValue = exports.collectDynamicNodeParameterPaths = exports.formatResourceOperationsForPrompt = exports.createResourceCacheKey = exports.extractResourceOperations = exports.extractOperationOnlyDiscriminator = exports.extractModeDiscriminator = exports.suggestedNodesData = exports.categoryList = exports.getSuggestedNodes = exports.toSnakeCase = exports.parseNodeId = exports.validatePathWithinBase = exports.isValidPathComponent = exports.getNodeTypes = exports.formatNodeResult = exports.searchCodeBuilderNodes = exports.SCORE_WEIGHTS = exports.CodeBuilderNodeSearchEngine = exports.NodeTypeParser = void 0;
|
|
13
13
|
var node_type_parser_1 = require("./node-type-parser");
|
|
14
14
|
Object.defineProperty(exports, "NodeTypeParser", { enumerable: true, get: function () { return node_type_parser_1.NodeTypeParser; } });
|
|
15
15
|
var search_engine_1 = require("./search-engine");
|
|
@@ -36,5 +36,17 @@
|
|
|
36
36
|
Object.defineProperty(exports, "extractResourceOperations", { enumerable: true, get: function () { return resource_operation_extractor_1.extractResourceOperations; } });
|
|
37
37
|
Object.defineProperty(exports, "createResourceCacheKey", { enumerable: true, get: function () { return resource_operation_extractor_1.createResourceCacheKey; } });
|
|
38
38
|
Object.defineProperty(exports, "formatResourceOperationsForPrompt", { enumerable: true, get: function () { return resource_operation_extractor_1.formatResourceOperationsForPrompt; } });
|
|
39
|
+
var dynamic_node_parameters_1 = require("./dynamic-node-parameters");
|
|
40
|
+
Object.defineProperty(exports, "collectDynamicNodeParameterPaths", { enumerable: true, get: function () { return dynamic_node_parameters_1.collectDynamicNodeParameterPaths; } });
|
|
41
|
+
Object.defineProperty(exports, "detectAuthenticationParameterValue", { enumerable: true, get: function () { return dynamic_node_parameters_1.detectAuthenticationParameterValue; } });
|
|
42
|
+
Object.defineProperty(exports, "findNodeParameterProperty", { enumerable: true, get: function () { return dynamic_node_parameters_1.findNodeParameterProperty; } });
|
|
43
|
+
Object.defineProperty(exports, "formatResourceLocatorOptionsForLLM", { enumerable: true, get: function () { return dynamic_node_parameters_1.formatResourceLocatorOptionsForLLM; } });
|
|
44
|
+
Object.defineProperty(exports, "getDynamicNodeParameterLookup", { enumerable: true, get: function () { return dynamic_node_parameters_1.getDynamicNodeParameterLookup; } });
|
|
45
|
+
Object.defineProperty(exports, "getRequiredNodeCredentialSlots", { enumerable: true, get: function () { return dynamic_node_parameters_1.getRequiredNodeCredentialSlots; } });
|
|
46
|
+
Object.defineProperty(exports, "hasNodeCredentials", { enumerable: true, get: function () { return dynamic_node_parameters_1.hasNodeCredentials; } });
|
|
47
|
+
Object.defineProperty(exports, "normalizeParameterPath", { enumerable: true, get: function () { return dynamic_node_parameters_1.normalizeParameterPath; } });
|
|
48
|
+
Object.defineProperty(exports, "toDynamicParameterPath", { enumerable: true, get: function () { return dynamic_node_parameters_1.toDynamicParameterPath; } });
|
|
49
|
+
Object.defineProperty(exports, "toLoadedOptionParameterValue", { enumerable: true, get: function () { return dynamic_node_parameters_1.toLoadedOptionParameterValue; } });
|
|
50
|
+
Object.defineProperty(exports, "toResourceLocatorParameterValue", { enumerable: true, get: function () { return dynamic_node_parameters_1.toResourceLocatorParameterValue; } });
|
|
39
51
|
});
|
|
40
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node-catalog/index.ts"],"names":[],"mappings":";;;;;;;;;;;;IAUA,uDAAoD;IAA3C,kHAAA,cAAc,OAAA;IAGvB,iDAA6E;IAApE,4HAAA,2BAA2B,OAAA;IAAE,8GAAA,aAAa,OAAA;IAEnD,mCAAoE;IAA3D,gHAAA,sBAAsB,OAAA;IAAE,0GAAA,gBAAgB,OAAA;IAMjD,6BAMe;IALd,mGAAA,YAAY,OAAA;IACZ,2GAAA,oBAAoB,OAAA;IACpB,6GAAA,sBAAsB,OAAA;IACtB,kGAAA,WAAW,OAAA;IACX,kGAAA,WAAW,OAAA;IAIZ,yCAA8D;IAArD,8GAAA,iBAAiB,OAAA;IAAE,yGAAA,YAAY,OAAA;IAExC,+DAIgC;IAH/B,0HAAA,kBAAkB,OAAA;IAKnB,6DAG+B;IAF9B,+HAAA,wBAAwB,OAAA;IACxB,wIAAA,iCAAiC,OAAA;IASlC,+EAIwC;IAHvC,yIAAA,yBAAyB,OAAA;IACzB,sIAAA,sBAAsB,OAAA;IACtB,iJAAA,iCAAiC,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node-catalog/index.ts"],"names":[],"mappings":";;;;;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