n8n-nodes-tembory 1.2.2 → 1.3.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/README.md +8 -1
- package/dist/nodes/Tembory/TemboryMemory.node.js +27 -2
- package/dist/nodes/TemboryAgentMemory/TemboryAgentMemory.node.d.ts +4 -0
- package/dist/nodes/TemboryAgentMemory/TemboryAgentMemory.node.js +106 -0
- package/dist/nodes/TemboryAgentMemory/tembory-brain.svg +23 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Node de memoria operacional da Tembory para agentes de IA no n8n.
|
|
4
4
|
|
|
5
|
-
Versao atual: `1.
|
|
5
|
+
Versao atual: `1.3.0`.
|
|
6
|
+
|
|
7
|
+
## 1.3.0
|
|
8
|
+
|
|
9
|
+
- Adiciona um segundo node no pacote: `Tembory Agent Memory`, com internal name `temboryAgentMemory`.
|
|
10
|
+
- Mantem o node atual `Tembory` com internal name `temboryMemory`, sem migracao automatica de workflows existentes.
|
|
11
|
+
- O novo node nasce como caminho opt in para a experiencia v2: menos campos visiveis, controles avancados recolhidos e base para `tembory.visual.v2`.
|
|
12
|
+
- Reaproveita o runtime estavel de memoria, captura de tools e persistencia enquanto a timeline v2 e a `slmAnalysis` incremental sao implementadas em cortes posteriores.
|
|
6
13
|
|
|
7
14
|
## 1.2.2
|
|
8
15
|
|
|
@@ -1583,7 +1583,8 @@ const applyOperationalPreset = (advanced = {}) => {
|
|
|
1583
1583
|
},
|
|
1584
1584
|
};
|
|
1585
1585
|
const presetKey = preset === 'lab' ? 'diagnostic' : preset;
|
|
1586
|
-
const resolved = { ...(presets[presetKey] || {}), ...advanced, ...simpleOverrides, configurationMode };
|
|
1586
|
+
const resolved = { ...(presets[presetKey] || {}), ...advanced, ...simpleOverrides, ...(advanced.__topLevelOverrides || {}), configurationMode };
|
|
1587
|
+
delete resolved.__topLevelOverrides;
|
|
1587
1588
|
if (/^production/i.test(presetKey)) {
|
|
1588
1589
|
resolved.compactForAgent = true;
|
|
1589
1590
|
resolved.compactStateSections = true;
|
|
@@ -1618,6 +1619,7 @@ const flattenAdvancedGroups = (groups = {}) => {
|
|
|
1618
1619
|
const readAdvancedOptions = (ctx, itemIndex) => {
|
|
1619
1620
|
let legacy = {};
|
|
1620
1621
|
let grouped = {};
|
|
1622
|
+
const topLevelOverrides = {};
|
|
1621
1623
|
try {
|
|
1622
1624
|
legacy = ctx.getNodeParameter('advanced', itemIndex, {}) || {};
|
|
1623
1625
|
}
|
|
@@ -1631,7 +1633,30 @@ const readAdvancedOptions = (ctx, itemIndex) => {
|
|
|
1631
1633
|
configurationMode = String(ctx.getNodeParameter('configurationMode', itemIndex, 'simple') || 'simple');
|
|
1632
1634
|
}
|
|
1633
1635
|
catch { }
|
|
1634
|
-
|
|
1636
|
+
try {
|
|
1637
|
+
if (ctx.getNodeParameter('showAdvanced', itemIndex, false))
|
|
1638
|
+
configurationMode = 'advanced';
|
|
1639
|
+
}
|
|
1640
|
+
catch { }
|
|
1641
|
+
const readTopLevelOverride = (parameterName, optionName = parameterName) => {
|
|
1642
|
+
try {
|
|
1643
|
+
const value = ctx.getNodeParameter(parameterName, itemIndex, undefined);
|
|
1644
|
+
if (value !== undefined && value !== '')
|
|
1645
|
+
topLevelOverrides[optionName] = value;
|
|
1646
|
+
}
|
|
1647
|
+
catch { }
|
|
1648
|
+
};
|
|
1649
|
+
readTopLevelOverride('contextMaxChars');
|
|
1650
|
+
readTopLevelOverride('recentMessagesLastN');
|
|
1651
|
+
try {
|
|
1652
|
+
const debugVisualOutput = ctx.getNodeParameter('debugVisualOutput', itemIndex, undefined);
|
|
1653
|
+
if (debugVisualOutput !== undefined) {
|
|
1654
|
+
topLevelOverrides.includeDiagnostics = Boolean(debugVisualOutput);
|
|
1655
|
+
topLevelOverrides.includeContextHealth = Boolean(debugVisualOutput);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
catch { }
|
|
1659
|
+
return { ...legacy, ...grouped, ...topLevelOverrides, __topLevelOverrides: topLevelOverrides, configurationMode };
|
|
1635
1660
|
};
|
|
1636
1661
|
const pruneByLimit = (items, limit) => items.slice(Math.max(0, items.length - Math.max(1, Number(limit) || 1)));
|
|
1637
1662
|
const dedupeRecentMessages = (items) => {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TemboryAgentMemory = void 0;
|
|
4
|
+
const TemboryMemory_node_1 = require("../Tembory/TemboryMemory.node");
|
|
5
|
+
const deepClone = (value) => {
|
|
6
|
+
if (Array.isArray(value))
|
|
7
|
+
return value.map(deepClone);
|
|
8
|
+
if (value && typeof value === 'object') {
|
|
9
|
+
const out = {};
|
|
10
|
+
for (const [key, child] of Object.entries(value))
|
|
11
|
+
out[key] = deepClone(child);
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
const displayWhenAdvanced = {
|
|
17
|
+
show: {
|
|
18
|
+
showAdvanced: [true],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const cloneProperty = (properties, name) => {
|
|
22
|
+
const property = properties.find((item) => item.name === name);
|
|
23
|
+
if (!property)
|
|
24
|
+
throw new Error(`Missing base Tembory property: ${name}`);
|
|
25
|
+
return deepClone(property);
|
|
26
|
+
};
|
|
27
|
+
const advancedOnly = (property) => ({
|
|
28
|
+
...property,
|
|
29
|
+
displayOptions: displayWhenAdvanced,
|
|
30
|
+
});
|
|
31
|
+
const buildAgentMemoryDescription = () => {
|
|
32
|
+
const base = new TemboryMemory_node_1.TemboryMemory().description;
|
|
33
|
+
const baseProperties = base.properties || [];
|
|
34
|
+
const threadId = cloneProperty(baseProperties, 'threadId');
|
|
35
|
+
const project = cloneProperty(baseProperties, 'project');
|
|
36
|
+
const query = cloneProperty(baseProperties, 'query');
|
|
37
|
+
const retrievalMode = advancedOnly(cloneProperty(baseProperties, 'retrievalMode'));
|
|
38
|
+
const memoryKey = advancedOnly(cloneProperty(baseProperties, 'memoryKey'));
|
|
39
|
+
const payloadFormat = advancedOnly(cloneProperty(baseProperties, 'payloadFormat'));
|
|
40
|
+
const advancedGroups = advancedOnly(cloneProperty(baseProperties, 'advancedGroups'));
|
|
41
|
+
retrievalMode.description = 'Opcional. No v2 recomendado, o Tembory usa contexto operacional estruturado por padrão.';
|
|
42
|
+
advancedGroups.displayName = 'Configuração Avançada Tembory';
|
|
43
|
+
advancedGroups.description = 'Controles brutos para debug e casos avançados. O uso recomendado já ativa timeline, toolLog, SLM analysis, dedupe e retenção segura.';
|
|
44
|
+
return {
|
|
45
|
+
...deepClone(base),
|
|
46
|
+
displayName: 'Tembory Agent Memory',
|
|
47
|
+
name: 'temboryAgentMemory',
|
|
48
|
+
version: 1,
|
|
49
|
+
description: 'Recommended Tembory memory for n8n AI Agents with stable node identity for the v2 experience',
|
|
50
|
+
defaults: {
|
|
51
|
+
name: 'Tembory Agent Memory',
|
|
52
|
+
},
|
|
53
|
+
codex: {
|
|
54
|
+
...(base.codex || {}),
|
|
55
|
+
categories: ['AI', 'Memory'],
|
|
56
|
+
subcategories: {
|
|
57
|
+
AI: ['Memory', 'Agents & LLMs'],
|
|
58
|
+
Memory: ['AI Memory'],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
properties: [
|
|
62
|
+
threadId,
|
|
63
|
+
project,
|
|
64
|
+
query,
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Context Budget',
|
|
67
|
+
name: 'contextMaxChars',
|
|
68
|
+
type: 'number',
|
|
69
|
+
default: 20000,
|
|
70
|
+
description: 'Máximo aproximado de caracteres do contexto enviado ao agente. No v2 recomendado, isso substitui o toggle avançado equivalente.',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Recent Messages',
|
|
74
|
+
name: 'recentMessagesLastN',
|
|
75
|
+
type: 'number',
|
|
76
|
+
default: 30,
|
|
77
|
+
description: 'Quantidade de mensagens recentes consideradas na timeline e no contexto operacional.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Debug Visual Output',
|
|
81
|
+
name: 'debugVisualOutput',
|
|
82
|
+
type: 'boolean',
|
|
83
|
+
default: true,
|
|
84
|
+
description: 'Inclui mais material visual e diagnóstico no output de execução. A memória operacional continua preservada independentemente deste valor.',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Advanced Settings',
|
|
88
|
+
name: 'showAdvanced',
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
default: false,
|
|
91
|
+
description: 'Mostra controles brutos de memória, auditoria, TTL e payload. Use apenas para debug ou ajuste fino.',
|
|
92
|
+
},
|
|
93
|
+
retrievalMode,
|
|
94
|
+
memoryKey,
|
|
95
|
+
payloadFormat,
|
|
96
|
+
advancedGroups,
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
class TemboryAgentMemory extends TemboryMemory_node_1.TemboryMemory {
|
|
101
|
+
constructor() {
|
|
102
|
+
super();
|
|
103
|
+
this.description = buildAgentMemoryDescription();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.TemboryAgentMemory = TemboryAgentMemory;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
4
|
+
viewBox="0 0 460 460" xml:space="preserve">
|
|
5
|
+
<g>
|
|
6
|
+
<path style="fill:#FF926E;" d="M230,203.06h-29.375v50h-31.25v-50H85.04v-30H120V133.1h30v39.96h109.375v50h31.25v-50h84.335v-30
|
|
7
|
+
H340V103.1h-30v39.96h-80v-36h-49.96v-30H230V0c-23.02,0-42.99,12.97-53.06,31.99c-18.22-11.44-42.01-12.68-61.94-1.18
|
|
8
|
+
C95.07,42.32,84.25,63.54,85.04,85.04C63.54,84.25,42.32,95.07,30.81,115c-11.5,19.93-10.26,43.72,1.18,61.94
|
|
9
|
+
C12.97,187.01,0,206.98,0,230s12.97,42.99,31.99,53.06H230V203.06z"/>
|
|
10
|
+
<path style="fill:#F46A1A;" d="M428.01,176.94c11.44-18.22,12.68-42.01,1.18-61.94c-11.51-19.93-32.73-30.75-54.23-29.96
|
|
11
|
+
c0.79-21.5-10.03-42.72-29.96-54.23c-19.93-11.5-43.72-10.26-61.94,1.18C272.99,12.97,253.02,0,230,0v77.06h50.04v30H230v36h80
|
|
12
|
+
V103.1h30v39.96h34.96v30h-84.335v50h-31.25v-50H230v110h198.01C447.03,272.99,460,253.02,460,230S447.03,187.01,428.01,176.94z
|
|
13
|
+
M393.51,253.06h-30v-30h30V253.06z"/>
|
|
14
|
+
<path style="fill:#FFB76E;" d="M329.01,283.06h-99c0,47.828,33.909,87.729,79,96.979V460h40v-79.961
|
|
15
|
+
c-6.459,1.325-13.148,2.021-20,2.021V283.06z"/>
|
|
16
|
+
<rect x="180.04" y="77.06" style="fill:#FFB76E;" width="50" height="30"/>
|
|
17
|
+
<polygon style="fill:#FFB76E;" points="150,133.1 120,133.1 120,173.06 85.04,173.06 85.04,203.06 169.375,203.06 169.375,253.06
|
|
18
|
+
200.625,253.06 200.625,203.06 230,203.06 230,173.06 150,173.06 "/>
|
|
19
|
+
<rect x="230.04" y="77.06" style="fill:#FF926E;" width="50" height="30"/>
|
|
20
|
+
<rect x="363.51" y="223.06" style="fill:#FF926E;" width="30" height="30"/>
|
|
21
|
+
<path style="fill:#FF926E;" d="M329.01,382.06c6.852,0,13.54-0.697,20-2.021c45.091-9.249,79-49.15,79-96.979h-99V382.06z"/>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-tembory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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": "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",
|
|
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 && node --check dist/nodes/TemboryAgentMemory/TemboryAgentMemory.node.js",
|
|
21
21
|
"dev": "tsc --watch",
|
|
22
22
|
"format": "prettier nodes credentials --write",
|
|
23
23
|
"lint": "tslint -p tsconfig.json -c tslint.json",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"dist/credentials/TemboryApi.credentials.js"
|
|
42
42
|
],
|
|
43
43
|
"nodes": [
|
|
44
|
-
"dist/nodes/Tembory/TemboryMemory.node.js"
|
|
44
|
+
"dist/nodes/Tembory/TemboryMemory.node.js",
|
|
45
|
+
"dist/nodes/TemboryAgentMemory/TemboryAgentMemory.node.js"
|
|
45
46
|
]
|
|
46
47
|
},
|
|
47
48
|
"keywords": [
|