n8n-nodes-tembory 1.1.2 → 1.1.3

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,9 +2,9 @@
2
2
 
3
3
  Node de memoria operacional da Tembory para agentes de IA no n8n.
4
4
 
5
- Versao atual: `1.1.1`.
5
+ Versao atual: `1.1.2`.
6
6
 
7
- ## 1.1.1
7
+ ## 1.1.2
8
8
 
9
9
  - Torna a entrada `LLM` obrigatoria no node.
10
10
  - Remove opcoes visiveis de vetor, grafo e configuracao legada da interface do node.
@@ -2267,30 +2267,15 @@ const wrapTemboryMemory = (memory, ctx, memoryKey) => new Proxy(memory, {
2267
2267
  const chatHistory = cacheHit
2268
2268
  ? [{ cached: true, messages: Array.isArray(response[memoryKey] || response.chatHistory) ? (response[memoryKey] || response.chatHistory).length : 0 }]
2269
2269
  : snapshotJson(response[memoryKey] || response.chatHistory || []);
2270
+ const messages = Array.isArray(response[memoryKey] || response.chatHistory) ? (response[memoryKey] || response.chatHistory).length : 0;
2270
2271
  ctx.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiMemory, index, [
2271
2272
  [{
2272
2273
  json: {
2273
2274
  action: 'loadMemoryVariables',
2274
2275
  cached: cacheHit || undefined,
2275
- chatHistory,
2276
- context: response.temboryContext,
2277
- contextText: response.temboryContextText,
2278
- summary: response.temborySummary,
2279
- activeSummary: response.temboryActiveSummary,
2280
- connectedModelSummary: response.temboryConnectedModelSummary,
2281
- workingMemory: response.temboryWorkingMemory,
2282
- decisionState: response.temboryDecisionState,
2283
- memoryCompression: response.temboryMemoryCompression,
2284
- profileFacts: response.temboryProfileFacts,
2285
- operationalState: response.temboryOperationalState,
2286
- actionLedger: response.temboryActionLedger,
2287
- entityTimeline: response.temboryEntityTimeline,
2288
- vectorMemories: response.temboryVectorMemories,
2289
- graph: response.temboryGraph,
2290
- recentMessages: response.temboryRecentMessages,
2291
- recentHighlights: response.temboryRecentHighlights,
2292
- toolHistory: response.temboryToolHistory,
2293
- diagnostics: response.temboryDiagnostics,
2276
+ messages,
2277
+ contextQualityScore: response.temboryContextQualityScore,
2278
+ contextStatus: response.temboryContextHealth && response.temboryContextHealth.status,
2294
2279
  },
2295
2280
  }],
2296
2281
  ]);
@@ -2311,7 +2296,15 @@ const wrapTemboryMemory = (memory, ctx, memoryKey) => new Proxy(memory, {
2311
2296
  const response = await target.saveContext(input, output);
2312
2297
  const chatHistory = snapshotJson(await target.chatHistory.getMessages());
2313
2298
  ctx.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiMemory, index, [
2314
- [{ json: { action: 'saveContext', input, output, chatHistory, saved: true } }],
2299
+ [{
2300
+ json: {
2301
+ action: 'saveContext',
2302
+ saved: true,
2303
+ inputChars: JSON.stringify(input || {}).length,
2304
+ outputChars: JSON.stringify(output || {}).length,
2305
+ messages: Array.isArray(chatHistory) ? chatHistory.length : 0,
2306
+ },
2307
+ }],
2315
2308
  ]);
2316
2309
  return response;
2317
2310
  }
@@ -2921,11 +2914,8 @@ class TemboryMemory {
2921
2914
  }
2922
2915
  }
2923
2916
  const chatHistory = (result.response[memoryKey] || []).map(toBaseMessage);
2924
- const extra = { ...(result.response || {}) };
2925
- delete extra[memoryKey];
2926
2917
  currentMessages = chatHistory;
2927
2918
  return {
2928
- ...extra,
2929
2919
  [memoryKey]: chatHistory,
2930
2920
  chatHistory,
2931
2921
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-tembory",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Tembory node for n8n AI Agents with operational memory, tool history and decision state",
5
5
  "license": "MIT",
6
6
  "homepage": "https://tembory.com",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "scripts": {
20
- "build": "tsc && gulp build:icons",
20
+ "build": "node --check index.js && node --check dist/credentials/TemboryApi.credentials.js && node --check dist/nodes/Tembory/GenericFunctions.js && node --check dist/nodes/Tembory/TemboryMemory.node.js",
21
21
  "dev": "tsc --watch",
22
22
  "format": "prettier nodes credentials --write",
23
23
  "lint": "tslint -p tsconfig.json -c tslint.json",