n8n-nodes-tembory 1.3.3 → 1.3.4
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/README.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Node de memoria operacional da Tembory para agentes de IA no n8n.
|
|
4
4
|
|
|
5
|
-
Versao atual: `1.3.
|
|
5
|
+
Versao atual: `1.3.4`.
|
|
6
|
+
|
|
7
|
+
## 1.3.4
|
|
8
|
+
|
|
9
|
+
- Torna a credencial `Tembory API` obrigatoria nos nodes `Tembory Memory` e `Tembory Agent Memory`.
|
|
10
|
+
- Bloqueia `loadMemoryVariables`, `saveContext` e execucao direta quando nao houver API key configurada.
|
|
11
|
+
- Remove o comportamento enganoso de fallback local silencioso sem credencial: fallback interno so pode existir depois que o node estiver autenticado.
|
|
6
12
|
|
|
7
13
|
## 1.3.3
|
|
8
14
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertTemboryCredentials = assertTemboryCredentials;
|
|
3
4
|
exports.temboryApiRequest = temboryApiRequest;
|
|
4
5
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
6
|
async function getTemboryCredentials(ctx) {
|
|
@@ -13,8 +14,15 @@ async function getTemboryCredentials(ctx) {
|
|
|
13
14
|
catch { }
|
|
14
15
|
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Credentials for Tembory are not set. Select a Tembory API credential and save the workflow.');
|
|
15
16
|
}
|
|
17
|
+
async function assertTemboryCredentials(ctx) {
|
|
18
|
+
const credentials = await getTemboryCredentials(ctx);
|
|
19
|
+
if (!credentials || !credentials.apiKey) {
|
|
20
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Tembory API credential is missing an API key. Configure a valid Tembory API credential before using this memory node.');
|
|
21
|
+
}
|
|
22
|
+
return credentials;
|
|
23
|
+
}
|
|
16
24
|
async function temboryApiRequest(method, endpoint, body = {}, qs = {}) {
|
|
17
|
-
const credentials = await
|
|
25
|
+
const credentials = await assertTemboryCredentials(this);
|
|
18
26
|
const baseUrl = 'https://api.tembory.com';
|
|
19
27
|
const operation = resolveGatewayOperation(method, endpoint);
|
|
20
28
|
const payload = {
|
|
@@ -4433,7 +4433,7 @@ class TemboryMemory {
|
|
|
4433
4433
|
credentials: [
|
|
4434
4434
|
{
|
|
4435
4435
|
name: 'temboryApi',
|
|
4436
|
-
required:
|
|
4436
|
+
required: true,
|
|
4437
4437
|
},
|
|
4438
4438
|
],
|
|
4439
4439
|
codex: {
|
|
@@ -4785,6 +4785,7 @@ class TemboryMemory {
|
|
|
4785
4785
|
return { saved: false, input: inputValues, output: outputValues, toolCalls: toolContext };
|
|
4786
4786
|
}
|
|
4787
4787
|
async saveContextForItem(itemIndex, inputValues = {}, outputValues = {}) {
|
|
4788
|
+
await GenericFunctions_1.assertTemboryCredentials(this);
|
|
4788
4789
|
const threadId = this.getNodeParameter('threadId', itemIndex);
|
|
4789
4790
|
const project = this.getNodeParameter('project', itemIndex, '');
|
|
4790
4791
|
const adv = applyOperationalPreset(readAdvancedOptions(this, itemIndex));
|
|
@@ -5281,6 +5282,7 @@ class TemboryMemory {
|
|
|
5281
5282
|
}
|
|
5282
5283
|
async loadMemoryVariablesForItem(itemIndex, inputValues = {}) {
|
|
5283
5284
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
5285
|
+
await GenericFunctions_1.assertTemboryCredentials(this);
|
|
5284
5286
|
const memoryKey = resolveRuntimeMemoryKey(this, itemIndex);
|
|
5285
5287
|
const requestedRetrievalMode = this.getNodeParameter('retrievalMode', itemIndex, 'basic');
|
|
5286
5288
|
let payloadFormat = this.getNodeParameter('payloadFormat', itemIndex, 'structured');
|
|
@@ -5920,6 +5922,7 @@ class TemboryMemory {
|
|
|
5920
5922
|
return { response };
|
|
5921
5923
|
}
|
|
5922
5924
|
async execute() {
|
|
5925
|
+
await GenericFunctions_1.assertTemboryCredentials(this);
|
|
5923
5926
|
const items = this.getInputData();
|
|
5924
5927
|
const returnData = [];
|
|
5925
5928
|
const count = Math.max(items.length, 1);
|
package/package.json
CHANGED