@n8n/ai-utilities 0.18.0 → 0.19.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.
@@ -7,8 +7,8 @@ export { getMetadataFiltersValues, hasLongSequentialRepeat } from './utils/helpe
7
7
  export { N8nBinaryLoader } from './utils/n8n-binary-loader';
8
8
  export { N8nJsonLoader } from './utils/n8n-json-loader';
9
9
  export { N8nLlmTracing } from './utils/n8n-llm-tracing';
10
- export { TextEditorDocument, NoMatchFoundError, MultipleMatchesError, InvalidLineNumberError, InvalidViewRangeError, InvalidPathError, FileExistsError, FileNotFoundError, BatchReplacementError, formatTextWithLineNumbers, findDivergenceContext, parseStrReplacements, } from './utils/text-editor';
11
- export type { ViewCommand, CreateCommand, StrReplaceCommand, InsertCommand, BatchStrReplaceCommand, TextEditorCommand, TextEditorCommandWithBatch, TextEditorToolCall, TextEditorResult, StrReplacement, BatchReplaceResult, TextEditorDocumentOptions, } from './utils/text-editor';
10
+ export { TextEditorDocument, NoMatchFoundError, MultipleMatchesError, InvalidLineNumberError, InvalidViewRangeError, InvalidPathError, FileExistsError, FileNotFoundError, BatchReplacementError, formatTextWithLineNumbers, findDivergenceContext, parseStrReplacements, } from './utils/workflow-text-editor';
11
+ export type { ViewCommand, CreateCommand, StrReplaceCommand, InsertCommand, BatchStrReplaceCommand, TextEditorCommand, TextEditorCommandWithBatch, TextEditorToolCall, TextEditorResult, StrReplacement, BatchReplaceResult, TextEditorDocumentOptions, } from './utils/workflow-text-editor';
12
12
  export { estimateTokensFromStringList, estimateTokensByCharCount, estimateTextSplitsByTokens, } from './utils/tokenizer/token-estimator';
13
13
  export { encodingForModel, getEncoding } from './utils/tokenizer/tiktoken';
14
14
  export { makeN8nLlmFailedAttemptHandler } from './utils/failed-attempt-handler/n8nLlmFailedAttemptHandler';
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@
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/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/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";
@@ -30,19 +30,19 @@
30
30
  Object.defineProperty(exports, "N8nJsonLoader", { enumerable: true, get: function () { return n8n_json_loader_1.N8nJsonLoader; } });
31
31
  var n8n_llm_tracing_1 = require("./utils/n8n-llm-tracing");
32
32
  Object.defineProperty(exports, "N8nLlmTracing", { enumerable: true, get: function () { return n8n_llm_tracing_1.N8nLlmTracing; } });
33
- var text_editor_1 = require("./utils/text-editor");
34
- Object.defineProperty(exports, "TextEditorDocument", { enumerable: true, get: function () { return text_editor_1.TextEditorDocument; } });
35
- Object.defineProperty(exports, "NoMatchFoundError", { enumerable: true, get: function () { return text_editor_1.NoMatchFoundError; } });
36
- Object.defineProperty(exports, "MultipleMatchesError", { enumerable: true, get: function () { return text_editor_1.MultipleMatchesError; } });
37
- Object.defineProperty(exports, "InvalidLineNumberError", { enumerable: true, get: function () { return text_editor_1.InvalidLineNumberError; } });
38
- Object.defineProperty(exports, "InvalidViewRangeError", { enumerable: true, get: function () { return text_editor_1.InvalidViewRangeError; } });
39
- Object.defineProperty(exports, "InvalidPathError", { enumerable: true, get: function () { return text_editor_1.InvalidPathError; } });
40
- Object.defineProperty(exports, "FileExistsError", { enumerable: true, get: function () { return text_editor_1.FileExistsError; } });
41
- Object.defineProperty(exports, "FileNotFoundError", { enumerable: true, get: function () { return text_editor_1.FileNotFoundError; } });
42
- Object.defineProperty(exports, "BatchReplacementError", { enumerable: true, get: function () { return text_editor_1.BatchReplacementError; } });
43
- Object.defineProperty(exports, "formatTextWithLineNumbers", { enumerable: true, get: function () { return text_editor_1.formatTextWithLineNumbers; } });
44
- Object.defineProperty(exports, "findDivergenceContext", { enumerable: true, get: function () { return text_editor_1.findDivergenceContext; } });
45
- Object.defineProperty(exports, "parseStrReplacements", { enumerable: true, get: function () { return text_editor_1.parseStrReplacements; } });
33
+ var workflow_text_editor_1 = require("./utils/workflow-text-editor");
34
+ Object.defineProperty(exports, "TextEditorDocument", { enumerable: true, get: function () { return workflow_text_editor_1.TextEditorDocument; } });
35
+ Object.defineProperty(exports, "NoMatchFoundError", { enumerable: true, get: function () { return workflow_text_editor_1.NoMatchFoundError; } });
36
+ Object.defineProperty(exports, "MultipleMatchesError", { enumerable: true, get: function () { return workflow_text_editor_1.MultipleMatchesError; } });
37
+ Object.defineProperty(exports, "InvalidLineNumberError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidLineNumberError; } });
38
+ Object.defineProperty(exports, "InvalidViewRangeError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidViewRangeError; } });
39
+ Object.defineProperty(exports, "InvalidPathError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidPathError; } });
40
+ Object.defineProperty(exports, "FileExistsError", { enumerable: true, get: function () { return workflow_text_editor_1.FileExistsError; } });
41
+ Object.defineProperty(exports, "FileNotFoundError", { enumerable: true, get: function () { return workflow_text_editor_1.FileNotFoundError; } });
42
+ Object.defineProperty(exports, "BatchReplacementError", { enumerable: true, get: function () { return workflow_text_editor_1.BatchReplacementError; } });
43
+ Object.defineProperty(exports, "formatTextWithLineNumbers", { enumerable: true, get: function () { return workflow_text_editor_1.formatTextWithLineNumbers; } });
44
+ Object.defineProperty(exports, "findDivergenceContext", { enumerable: true, get: function () { return workflow_text_editor_1.findDivergenceContext; } });
45
+ Object.defineProperty(exports, "parseStrReplacements", { enumerable: true, get: function () { return workflow_text_editor_1.parseStrReplacements; } });
46
46
  var token_estimator_1 = require("./utils/tokenizer/token-estimator");
47
47
  Object.defineProperty(exports, "estimateTokensFromStringList", { enumerable: true, get: function () { return token_estimator_1.estimateTokensFromStringList; } });
48
48
  Object.defineProperty(exports, "estimateTokensByCharCount", { enumerable: true, get: function () { return token_estimator_1.estimateTokensByCharCount; } });
@@ -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;IA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