nothumanallowed 16.0.19 → 16.0.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "16.0.19",
3
+ "version": "16.0.20",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/constants.mjs CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = path.dirname(__filename);
7
7
 
8
- export const VERSION = '16.0.19';
8
+ export const VERSION = '16.0.20';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -329,7 +329,7 @@ function isCompletedAction(text) {
329
329
  return DONE_SIGNALS.some(s => lower.includes(s));
330
330
  }
331
331
 
332
- async function callAgentWithTools(config, agentName, userMessage, languageOverride, preHistory) {
332
+ async function callAgentWithTools(config, agentName, userMessage, languageOverride, preHistory, chatId) {
333
333
  const today = new Date().toISOString().split('T')[0];
334
334
  const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
335
335
  const locale = Intl.DateTimeFormat().resolvedOptions().locale || 'en';
@@ -397,12 +397,17 @@ async function callAgentWithTools(config, agentName, userMessage, languageOverri
397
397
  break;
398
398
  }
399
399
 
400
- // Execute all tools
400
+ // Execute all tools — use the remembering variant so list-tools auto-
401
+ // populate the anaphoric cache (lastList_*). Critical for "Si spostalo"
402
+ // pattern: HERALD calls calendar_find inside the loop, the result must
403
+ // land in lastCalendarEvents so the next turn's anaphoric dispatcher
404
+ // can resolve "spostalo" deterministically.
405
+ const { executeToolAndRemember: _exec } = await import('./tool-executor.mjs');
401
406
  const toolResults = [];
402
407
  let authError = null;
403
408
  for (const { action, params } of actions) {
404
409
  try {
405
- const result = await executeTool(action, params, config);
410
+ const result = await _exec(action, params, config, chatId);
406
411
  const resultStr = typeof result === 'string' ? result : JSON.stringify(result);
407
412
  toolResults.push(`[${action}] ${resultStr}`);
408
413
  } catch (err) {
@@ -1275,7 +1280,7 @@ class TelegramResponder {
1275
1280
  } catch {}
1276
1281
 
1277
1282
  if (TOOL_AGENTS.has(agent)) {
1278
- const result = await callAgentWithTools(this.config, agent, enrichedMessage, detectedLang, preHistory);
1283
+ const result = await callAgentWithTools(this.config, agent, enrichedMessage, detectedLang, preHistory, chatId);
1279
1284
  responseText = result.text;
1280
1285
  responseHistory = result.history;
1281
1286
  } else {