n8n-nodes-tembory 1.1.33 → 1.1.34

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.1.33`.
5
+ Versao atual: `1.1.34`.
6
+
7
+ ## 1.1.34
8
+
9
+ - Adiciona `statusAnswerMaterial` no contexto do Agent para perguntas sobre historico operacional.
10
+ - Quando o usuario pergunta quais tools foram chamadas, o Agent recebe um bloco direto com tool count, inputs, outputs, timestamps e action ledger.
11
+ - Instrui explicitamente o Agent a responder desse material e nao dizer que nao tem acesso quando o historico existe.
6
12
 
7
13
  ## 1.1.33
8
14
 
@@ -2609,6 +2609,22 @@ const compactSaveAuditForAgent = (capture = {}) => cleanContextValue({
2609
2609
  dedupe: capture.last_save_dedupe_summary,
2610
2610
  },
2611
2611
  });
2612
+ const buildStatusAnswerMaterialForAgent = ({ query, workingMemory = {}, toolHistory = [], actionLedger = [] }) => {
2613
+ const intent = workingMemory.last_user_intent || inferUserIntent(query, []);
2614
+ if (intent !== 'operational_status_question')
2615
+ return undefined;
2616
+ const toolEvents = pruneByLimit(toolHistory || [], 12).map((tool) => compactToolAuditForSideChannel(tool));
2617
+ const ledgerItems = compactActionLedgerForAgent(actionLedger || [], 12, true);
2618
+ return cleanContextValue({
2619
+ instruction: toolEvents.length
2620
+ ? 'The current user is asking about prior tool calls. Answer directly from this material. Do not call tools. Do not say you lack access to tool history, inputs, outputs, or timestamps.'
2621
+ : 'The current user is asking about prior tool calls, but no prior tool events are available in memory. Answer that no prior tool calls are available in this thread unless the current transcript shows otherwise.',
2622
+ current_user_request: truncate(query, 500),
2623
+ tool_count: toolEvents.length,
2624
+ tool_events: toolEvents,
2625
+ action_ledger: ledgerItems,
2626
+ });
2627
+ };
2612
2628
  const compactEntityTimelineForAgent = (timeline = [], maxItems = 8) => pruneByLimit(timeline || [], maxItems).map((item) => cleanContextValue({
2613
2629
  entity: item.entity || item.source || item.name,
2614
2630
  event: truncate(item.event || item.fact || item.relation || item.kind || item.value, 220),
@@ -2885,6 +2901,7 @@ const loadedSectionsForSideChannel = (parsed = {}, memoryAudit = {}) => cleanCon
2885
2901
  memoryCompression: Boolean(parsed.memoryCompression),
2886
2902
  operationalState: Boolean(parsed.operationalState),
2887
2903
  actionLedger: Array.isArray(parsed.actionLedger),
2904
+ statusAnswerMaterial: Boolean(parsed.statusAnswerMaterial || parsed.status_answer_material),
2888
2905
  turnBrief: Boolean(parsed.turnBrief || parsed.turn_brief),
2889
2906
  memoryAudit: Boolean(memoryAudit && Object.keys(memoryAudit).length),
2890
2907
  entityTimeline: Array.isArray(parsed.entityTimeline),
@@ -2923,6 +2940,7 @@ const agentContextBudgetForSideChannel = (messages = [], parsed = {}) => {
2923
2940
  ['conversation', parsed.conversation],
2924
2941
  ['current_turn_focus', parsed.current_turn_focus || parsed.currentTurn || parsed.current_turn],
2925
2942
  ['action_directive', parsed.action_directive],
2943
+ ['status_answer_material', parsed.statusAnswerMaterial || parsed.status_answer_material],
2926
2944
  ['turn_brief', parsed.turnBrief || parsed.turn_brief],
2927
2945
  ['summary', parsed.summary],
2928
2946
  ['working_memory', parsed.workingMemory || parsed.working_memory],
@@ -3174,6 +3192,14 @@ const buildContextMessages = ({ payloadFormat, query, userId, profileFacts, work
3174
3192
  title: 'Turn brief',
3175
3193
  value: turnBrief,
3176
3194
  });
3195
+ const statusAnswerMaterial = buildStatusAnswerMaterialForAgent({ query, workingMemory, toolHistory, actionLedger });
3196
+ if (statusAnswerMaterial) {
3197
+ sections.push({
3198
+ section: 'status_answer_material',
3199
+ title: 'Status answer material',
3200
+ value: statusAnswerMaterial,
3201
+ });
3202
+ }
3177
3203
  const actionDirective = buildActionDirective({ workingMemory, operationalState });
3178
3204
  if (actionDirective) {
3179
3205
  sections.push({
@@ -3289,6 +3315,7 @@ const buildContextMessages = ({ payloadFormat, query, userId, profileFacts, work
3289
3315
  instruction: focus.instruction,
3290
3316
  }),
3291
3317
  currentTurn: diagnostics?.currentTurn,
3318
+ statusAnswerMaterial: sectionValue('status_answer_material'),
3292
3319
  action_directive: directive ? cleanContextValue({
3293
3320
  required_tool: directive.required_tool,
3294
3321
  next_expected_action: directive.next_expected_action,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-tembory",
3
- "version": "1.1.33",
3
+ "version": "1.1.34",
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",