nothumanallowed 13.2.80 → 13.2.81

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": "13.2.80",
3
+ "version": "13.2.81",
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": {
@@ -2692,7 +2692,7 @@ export async function cmdUI(args) {
2692
2692
 
2693
2693
  // ── Fast keyword-based planning (no LLM call needed for common patterns) ──────
2694
2694
  const taskLow = task.toLowerCase();
2695
- const hasPdf = !!(body.hasPdf) || /pdf|allegat|catalogo|scheda\s*tecnic|document/i.test(taskLow);
2695
+ const hasPdf = !!(body.hasPdf) || /pdf|allegat|catalogo|scheda\s*tecnic/i.test(taskLow);
2696
2696
  const hasEmail = /email|mail|inbox|posta/i.test(taskLow);
2697
2697
  const hasCalendar = /calendar|agenda|calendari|eventi|schedule/i.test(taskLow);
2698
2698
  const hasSearch = /cerca|search|notizie|news|ultime|latest|web|internet|tendenz|trend|acquista|compra|dove\s+trovare|where\s+to\s+buy|similar|simile/i.test(taskLow);
@@ -3154,6 +3154,11 @@ RULES:
3154
3154
  userMsg = `Create a professional dashboard report for this data. Output ONLY the inner HTML body content (starting with <div class="header">):\n\n${canvasData}`;
3155
3155
  } else if (isLiveDataAgent) {
3156
3156
  // These agents fetched real data — use a focused prompt (no tool definitions to avoid JSON output)
3157
+ // Live data agents that fetched their own data: do NOT inject previous context
3158
+ // (prevents EmailAgent output from being repeated by GitHubAgent, CalendarAgent, etc.)
3159
+ const contextBlock = toolData
3160
+ ? '' // Has own live data — ignore previous agent outputs to avoid repetition
3161
+ : (context ? `## OUTPUT FROM PREVIOUS AGENTS:\n${context}\n` : '');
3157
3162
  const agentInstruction = `You are ${agent}, a specialist AI agent inside NHA Studio. Today is ${today}. Respond entirely in ${language}.
3158
3163
 
3159
3164
  ## OVERALL WORKFLOW GOAL:
@@ -3164,8 +3169,7 @@ Do NOT output JSON, tool calls, or code blocks. Write in plain text with markdow
3164
3169
  Always apply your analysis specifically to the subject mentioned in the WORKFLOW GOAL.
3165
3170
 
3166
3171
  ${attachmentText ? `## ATTACHED FILE CONTENT:\n${attachmentText}\n` : ''}${toolData ? `## DATA FROM TOOLS:\n${toolData}\n` : '## DATA: No data was retrieved by this agent.\n'}
3167
- ${context ? `## OUTPUT FROM PREVIOUS AGENTS:\n${context}\n` : ''}
3168
-
3172
+ ${contextBlock}
3169
3173
  Your task: ${stepPrompt}`;
3170
3174
  sysPrompt = agentInstruction;
3171
3175
  userMsg = toolData
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 = '13.2.80';
8
+ export const VERSION = '13.2.81';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3660,7 +3660,7 @@ function renderStudioResult() {
3660
3660
  var tokLine = (studioTokens && (studioTokens.in > 0 || studioTokens.out > 0))
3661
3661
  ? '<div style="margin-top:8px;font-size:11px;color:var(--dim);font-family:var(--mono)">&#x2B06; ' + (studioTokens.in||0).toLocaleString() + ' token in &nbsp;&#x2B07; ' + (studioTokens.out||0).toLocaleString() + ' token out &nbsp;&#x2022;&nbsp; <strong style="color:var(--green)">' + ((studioTokens.in||0)+(studioTokens.out||0)).toLocaleString() + '</strong> totale</div>'
3662
3662
  : '';
3663
- var dlBtn = '<div style="margin-top:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap">' +
3663
+ var dlBtn = '<div style="margin-top:14px;padding-top:12px;border-top:1px solid var(--border);display:flex;align-items:center;gap:10px;flex-wrap:wrap">' +
3664
3664
  '<button onclick="downloadStudioPDF()" title="Scarica il workflow come PDF" style="display:inline-flex;align-items:center;gap:6px;padding:8px 18px;background:linear-gradient(135deg,#4f46e5,#2563eb);border:none;border-radius:8px;color:#fff;font-size:12px;font-weight:600;cursor:pointer;letter-spacing:.3px;box-shadow:0 2px 8px rgba(79,70,229,.35)">&#x2913; Download PDF</button>' +
3665
3665
  '<span style="font-size:11px;color:var(--dim)">Scarica il workflow completo come documento PDF</span>' +
3666
3666
  '</div>';
@@ -3805,8 +3805,15 @@ async function runStudio() {
3805
3805
  var parliamentActive = studioState.parliamentMode || (parliamentChk && parliamentChk.checked);
3806
3806
  if (parliamentActive && studioState.nodes.length >= 1) {
3807
3807
  var proposals = studioState.nodes
3808
- .filter(function(n) { return n.output && n.output !== \x27(no output)\x27 && n.agent !== \x27CanvasAgent\x27; })
3809
- .map(function(n) { return {agent: n.agent, label: n.label, output: n.output}; });
3808
+ .filter(function(n) {
3809
+ if (!n.output || n.output === \x27(no output)\x27) return false;
3810
+ if (n.agent === \x27CanvasAgent\x27 || n.agent === \x27DocumentReaderAgent\x27) return false;
3811
+ if (n.status === \x27error\x27) return false;
3812
+ // Exclude nodes whose output is a short error message (< 80 chars containing "error"/"could not")
3813
+ if (n.output.length < 120 && /error|could not|fallito|errore/i.test(n.output)) return false;
3814
+ return true;
3815
+ })
3816
+ .map(function(n) { return {agent: n.agent, label: n.label, icon: n.icon, output: n.output}; });
3810
3817
  // Need at least 2 proposals for cross-reading; if only 1, include the full context as a second proposal
3811
3818
  if (proposals.length === 1 && context) {
3812
3819
  proposals.push({agent: \x27Context\x27, label: \x27Contesto workflow\x27, output: context});