nothumanallowed 13.2.28 β†’ 13.2.29

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.28",
3
+ "version": "13.2.29",
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": {
@@ -2586,12 +2586,14 @@ Example output:
2586
2586
  const hasCalendar = /calendar|agenda|calendari/i.test(task);
2587
2587
  const hasSearch = /cerca|search|notizie|news/i.test(task);
2588
2588
  const hasCanvas = /html|dashboard|visua|report/i.test(task);
2589
+ // Extract a short search query from the task (take key noun phrases, max 80 chars)
2590
+ const searchQueryFallback = task.replace(/^[^:]+:\s*/,'').split(/[,\n]/)[0].slice(0,80).trim() || task.slice(0,80);
2589
2591
  steps = [];
2590
- if (hasEmail) steps.push({icon:'πŸ“§',agent:'EmailAgent',label:'Controlla email',prompt:task});
2591
- if (hasCalendar) steps.push({icon:'πŸ“…',agent:'CalendarAgent',label:'Rivedi calendario',prompt:task});
2592
- if (hasSearch || steps.length === 0) steps.push({icon:'πŸ”',agent:'WebSearchAgent',label:'Ricerca web',prompt:task});
2593
- steps.push({icon:'πŸ“°',agent:'HERALD',label:'Analisi e briefing',prompt:task});
2594
- if (hasCanvas) steps.push({icon:'πŸ“Š',agent:'CanvasAgent',label:'Dashboard HTML',prompt:task});
2592
+ if (hasEmail) steps.push({icon:'\u{1F4E7}',agent:'EmailAgent',label:'Controlla email',prompt:'Leggi le ultime email non lette e identifica elementi urgenti'});
2593
+ if (hasCalendar) steps.push({icon:'\u{1F4C5}',agent:'CalendarAgent',label:'Rivedi calendario',prompt:'Controlla gli eventi di oggi e identifica eventuali conflitti'});
2594
+ if (hasSearch || steps.length === 0) steps.push({icon:'\u{1F50D}',agent:'WebSearchAgent',label:'Ricerca web',prompt:searchQueryFallback});
2595
+ steps.push({icon:'\u{1F4F0}',agent:'HERALD',label:'Analisi e briefing',prompt:'Analizza tutti i dati forniti e scrivi un briefing esecutivo dettagliato con priorit\u00e0 e raccomandazioni'});
2596
+ if (hasCanvas) steps.push({icon:'\u{1F4CA}',agent:'CanvasAgent',label:'Dashboard HTML',prompt:'Crea una dashboard HTML visuale con i dati del briefing'});
2595
2597
  }
2596
2598
  if (!Array.isArray(steps) || !steps.length) {
2597
2599
  sendJSON(res, 500, { error: 'Empty workflow plan' });
@@ -2663,8 +2665,22 @@ Example output:
2663
2665
  } else if (agent === 'WebSearchAgent' || agent === 'ResearchAgent') {
2664
2666
  sendToken('[Searching the web and reading pages...] ');
2665
2667
  try {
2668
+ // Extract a concise search query from the step prompt (avoid sending the whole task as query)
2669
+ // The planner should provide a short query, but if not, extract key terms
2670
+ let searchQuery = stepPrompt;
2671
+ // If the prompt is very long (> 120 chars), extract the core search terms
2672
+ if (searchQuery.length > 120) {
2673
+ // Try to extract a meaningful short query
2674
+ const keywordMatch = searchQuery.match(/(?:cerca|search|find|ricerca|notizie su|news about|latest on|aggiornamenti su)\s+(.{5,80}?)(?:\s+(?:e|and|per|for|poi|then)|$)/i);
2675
+ if (keywordMatch) {
2676
+ searchQuery = keywordMatch[1].trim();
2677
+ } else {
2678
+ // Take first meaningful clause before comma/period
2679
+ searchQuery = searchQuery.split(/[,\.\n]/)[0].slice(0, 100).trim();
2680
+ }
2681
+ }
2666
2682
  // Use deep search: fetches and reads top 3 pages for real content
2667
- const searchResult = await withTimeout(executeTool('web_search', { query: stepPrompt, deep: true }, config), 25000);
2683
+ const searchResult = await withTimeout(executeTool('web_search', { query: searchQuery, deep: true }, config), 25000);
2668
2684
  toolData = typeof searchResult === 'string' ? searchResult : JSON.stringify(searchResult);
2669
2685
  } catch (e) { toolData = `Web search failed: ${e.message}`; }
2670
2686
 
@@ -2813,37 +2829,43 @@ Output ONLY the full HTML. Replace all bracketed instructions above with real HT
2813
2829
 
2814
2830
  if (isCanvasAgent) {
2815
2831
  sysPrompt = canvasSystemPrompt;
2816
- userMsg = `Generate a beautiful HTML dashboard report for this content. Start immediately with <!DOCTYPE html>:\n\n${context.slice(0, 8000)}`;
2832
+ userMsg = `Generate a beautiful HTML dashboard report for this content. Start immediately with <!DOCTYPE html>:\n\n${context.slice(0, 10000)}`;
2817
2833
  } else if (isLiveDataAgent) {
2818
- // These agents fetched real data β€” use buildSystemPrompt so they can call tools too
2819
- const agentInstruction = `You are ${agent}, a specialist AI agent inside NHA Studio. Respond in ${language}.\nYour task: ${stepPrompt}\n` +
2820
- (toolData ? `\n## DATA FROM TOOLS:\n${toolData.slice(0, 4000)}\n` : '') +
2821
- (context ? `\n## OUTPUT FROM PREVIOUS AGENTS:\n${context.slice(0, 3000)}\n` : '') +
2822
- `\nWrite your analysis in plain text in ${language}. Do NOT output JSON, tool calls, or code blocks. Summarize the data clearly.`;
2823
- sysPrompt = buildSystemPrompt(agent, agentInstruction, config);
2834
+ // These agents fetched real data β€” use a focused prompt (no tool definitions to avoid JSON output)
2835
+ const agentInstruction = `You are ${agent}, a specialist AI agent inside NHA Studio. Today is ${today}. Respond entirely in ${language}.
2836
+
2837
+ CRITICAL: Do NOT invent, hallucinate, or add any data not present in the DATA sections below. ONLY use the exact data provided.
2838
+ Do NOT output JSON, tool calls, or code blocks. Write in plain text with markdown headers.
2839
+
2840
+ ${toolData ? `## DATA FROM TOOLS:\n${toolData.slice(0, 6000)}\n` : '## DATA: No data was retrieved by this agent.\n'}
2841
+ ${context ? `## OUTPUT FROM PREVIOUS AGENTS:\n${context.slice(0, 4000)}\n` : ''}
2842
+
2843
+ Your task: ${stepPrompt}`;
2844
+ sysPrompt = agentInstruction;
2824
2845
  userMsg = toolData
2825
- ? `Summarize the data above for: ${stepPrompt}`
2846
+ ? `Summarize and analyze the REAL data above. Do not add anything not present in the data.`
2826
2847
  : context
2827
- ? `Based on the previous output, complete: ${stepPrompt}`
2848
+ ? `Based ONLY on the previous agent outputs above, complete: ${stepPrompt}`
2828
2849
  : stepPrompt;
2829
2850
  } else {
2830
2851
  // All other agents (WriterAgent, DataAnalystAgent, specialist agents, etc.)
2831
2852
  // Use a focused prompt with NO TOOL_DEFINITIONS to prevent JSON/tool-call output
2853
+ const hasRealData = !!(toolData || context);
2832
2854
  sysPrompt = `You are ${agent}, a specialist AI agent inside NHA Studio. Today is ${today}. You MUST respond entirely in ${language}.
2833
2855
 
2834
2856
  CRITICAL RULES:
2835
2857
  - Do NOT output JSON, tool calls, function calls, or code blocks
2836
- - Do NOT ask for more information β€” use only the data provided below
2837
- - Write in plain prose, structured with headers and bullet points where appropriate
2838
- - Be thorough and specific β€” this is for an executive briefing
2839
-
2840
- ${toolData ? `## LIVE DATA:\n${toolData.slice(0, 4000)}\n` : ''}
2841
- ${context ? `## CONTEXT FROM PREVIOUS AGENTS:\n${context.slice(0, 5000)}\n` : ''}`;
2842
- userMsg = toolData
2843
- ? `Use the live data and context above to complete this task: ${stepPrompt}`
2844
- : context
2845
- ? `Using the context from previous steps, complete this task: ${stepPrompt}`
2846
- : stepPrompt;
2858
+ - NEVER invent, fabricate, or hallucinate data, events, emails, meetings, or news
2859
+ - ONLY use the EXACT data provided in the DATA sections below β€” if no data is provided, say so clearly
2860
+ - Do NOT add fictional examples, placeholder content, or generic suggestions not grounded in the data
2861
+ - Write in plain prose, structured with markdown headers (##) and bullet points (-)
2862
+ - Be thorough and specific β€” this is for an executive briefing based on REAL data only
2863
+
2864
+ ${toolData ? `## LIVE DATA FROM TOOLS:\n${toolData.slice(0, 6000)}\n` : '## LIVE DATA: No tool data was fetched for this step.\n'}
2865
+ ${context ? `## OUTPUT FROM PREVIOUS AGENTS:\n${context.slice(0, 6000)}\n` : ''}`;
2866
+ userMsg = hasRealData
2867
+ ? `Based ONLY on the real data above, complete this task: ${stepPrompt}`
2868
+ : `No real data is available. State clearly that no data was retrieved and explain what would be needed: ${stepPrompt}`;
2847
2869
  }
2848
2870
 
2849
2871
  // ── Stream LLM response ───────────────────────────────────────
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.28';
8
+ export const VERSION = '13.2.29';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3298,44 +3298,44 @@ function renderStudio(el) {
3298
3298
 
3299
3299
  // 38 specialist agents sidebar
3300
3300
  var SPECIALIST_AGENTS = [
3301
- {icon:'\\u{1F6E1}',name:'saber',desc:'Security audits, pentest, OWASP'},
3302
- {icon:'\\u{1F50D}',name:'zero',desc:'Vulnerability & dependency audit'},
3303
- {icon:'\\u2713',name:'veritas',desc:'Fact-checking & hallucination detection'},
3304
- {icon:'\\u{1F52C}',name:'ade',desc:'Full security review, forensics'},
3305
- {icon:'\\u{1F512}',name:'heimdall',desc:'OAuth, JWT, RBAC design'},
3306
- {icon:'\\u{1F4BB}',name:'jarvis',desc:'Full-stack architecture & API'},
3307
- {icon:'\\u2699',name:'forge',desc:'CI/CD, deployment, infra'},
3308
- {icon:'\\u{1F527}',name:'pipe',desc:'Build systems, Airflow, automation'},
3309
- {icon:'\\u{1F4DF}',name:'shell',desc:'Shell scripts, CLI tools'},
3310
- {icon:'\\u{1F41B}',name:'glitch',desc:'Debugging & root cause'},
3311
- {icon:'\\u{1F4CA}',name:'oracle',desc:'Data analysis, stats, ML'},
3312
- {icon:'\\u{1F9EE}',name:'logos',desc:'Logic, proofs, formal reasoning'},
3313
- {icon:'\\u{1F5FA}',name:'atlas',desc:'Terraform, CloudFormation, IaC'},
3314
- {icon:'\\u{1F30D}',name:'cartographer',desc:'Geo data, mapping, routing'},
3315
- {icon:'\\u270D',name:'scheherazade',desc:'Docs, tutorials, blog posts'},
3316
- {icon:'\\u{1F4DD}',name:'quill',desc:'Posts, summaries, abstracts'},
3317
- {icon:'\\u{1F3A8}',name:'muse',desc:'Creative brainstorming & ideation'},
3318
- {icon:'\\u{1F58C}',name:'murasaki',desc:'UI/UX design, accessibility'},
3319
- {icon:'\\u{1F517}',name:'hermes',desc:'Kafka, RabbitMQ, event-driven'},
3320
- {icon:'\\u{1F50C}',name:'link',desc:'Community, reputation, engagement'},
3321
- {icon:'\\u{1F310}',name:'mercury',desc:'Finance, market, ROI analysis'},
3322
- {icon:'\\u2638',name:'shogun',desc:'Kubernetes, Helm, pod security'},
3323
- {icon:'\\u{1F504}',name:'flux',desc:'GitOps, rollback planning'},
3324
- {icon:'\\u23F0',name:'cron',desc:'GitHub Actions, GitLab CI'},
3325
- {icon:'\\u{1F30E}',name:'babel',desc:'API integration, microservices'},
3326
- {icon:'\\u{1F5E3}',name:'polyglot',desc:'i18n, localization, translation'},
3327
- {icon:'\\u{1F4E2}',name:'herald',desc:'News analysis, trend detection'},
3328
- {icon:'\\u{1F4E1}',name:'echo',desc:'Content repurposing: blog→social'},
3329
- {icon:'\\u26A1',name:'macro',desc:'Batch processing, data migration'},
3330
- {icon:'\\u{1F525}',name:'prometheus',desc:'Strategy, architecture trade-offs'},
3331
- {icon:'\\u26A0',name:'cassandra',desc:'Risk prediction, worst-case analysis'},
3332
- {icon:'\\u{1F9E0}',name:'athena',desc:'Tech evaluation, benchmarks'},
3333
- {icon:'\\u{1F441}',name:'sauron',desc:'Performance profiling, bottlenecks'},
3334
- {icon:'\\u{1F3BC}',name:'conductor',desc:'Workflow orchestration'},
3335
- {icon:'\\u{1F9ED}',name:'navi',desc:'Data profiling, schema inference'},
3336
- {icon:'\\u{1F4C8}',name:'edi',desc:'A/B testing, hypothesis testing'},
3337
- {icon:'\\u26C8',name:'tempest',desc:'Climate, weather, environmental'},
3338
- {icon:'\\u{1F37D}',name:'epicure',desc:'Recipes, nutrition, dietary'},
3301
+ {icon:'\u{1F6E1}',name:'saber',desc:'Security audits, pentest, OWASP'},
3302
+ {icon:'\u{1F50D}',name:'zero',desc:'Vulnerability & dependency audit'},
3303
+ {icon:'\u2713',name:'veritas',desc:'Fact-checking & hallucination detection'},
3304
+ {icon:'\u{1F52C}',name:'ade',desc:'Full security review, forensics'},
3305
+ {icon:'\u{1F512}',name:'heimdall',desc:'OAuth, JWT, RBAC design'},
3306
+ {icon:'\u{1F4BB}',name:'jarvis',desc:'Full-stack architecture & API'},
3307
+ {icon:'\u2699',name:'forge',desc:'CI/CD, deployment, infra'},
3308
+ {icon:'\u{1F527}',name:'pipe',desc:'Build systems, Airflow, automation'},
3309
+ {icon:'\u{1F4DF}',name:'shell',desc:'Shell scripts, CLI tools'},
3310
+ {icon:'\u{1F41B}',name:'glitch',desc:'Debugging & root cause'},
3311
+ {icon:'\u{1F4CA}',name:'oracle',desc:'Data analysis, stats, ML'},
3312
+ {icon:'\u{1F9EE}',name:'logos',desc:'Logic, proofs, formal reasoning'},
3313
+ {icon:'\u{1F5FA}',name:'atlas',desc:'Terraform, CloudFormation, IaC'},
3314
+ {icon:'\u{1F30D}',name:'cartographer',desc:'Geo data, mapping, routing'},
3315
+ {icon:'\u270D',name:'scheherazade',desc:'Docs, tutorials, blog posts'},
3316
+ {icon:'\u{1F4DD}',name:'quill',desc:'Posts, summaries, abstracts'},
3317
+ {icon:'\u{1F3A8}',name:'muse',desc:'Creative brainstorming & ideation'},
3318
+ {icon:'\u{1F58C}',name:'murasaki',desc:'UI/UX design, accessibility'},
3319
+ {icon:'\u{1F517}',name:'hermes',desc:'Kafka, RabbitMQ, event-driven'},
3320
+ {icon:'\u{1F50C}',name:'link',desc:'Community, reputation, engagement'},
3321
+ {icon:'\u{1F310}',name:'mercury',desc:'Finance, market, ROI analysis'},
3322
+ {icon:'\u2638',name:'shogun',desc:'Kubernetes, Helm, pod security'},
3323
+ {icon:'\u{1F504}',name:'flux',desc:'GitOps, rollback planning'},
3324
+ {icon:'\u23F0',name:'cron',desc:'GitHub Actions, GitLab CI'},
3325
+ {icon:'\u{1F30E}',name:'babel',desc:'API integration, microservices'},
3326
+ {icon:'\u{1F5E3}',name:'polyglot',desc:'i18n, localization, translation'},
3327
+ {icon:'\u{1F4E2}',name:'herald',desc:'News analysis, trend detection'},
3328
+ {icon:'\u{1F4E1}',name:'echo',desc:'Content repurposing: blog\u2192social'},
3329
+ {icon:'\u26A1',name:'macro',desc:'Batch processing, data migration'},
3330
+ {icon:'\u{1F525}',name:'prometheus',desc:'Strategy, architecture trade-offs'},
3331
+ {icon:'\u26A0',name:'cassandra',desc:'Risk prediction, worst-case analysis'},
3332
+ {icon:'\u{1F9E0}',name:'athena',desc:'Tech evaluation, benchmarks'},
3333
+ {icon:'\u{1F441}',name:'sauron',desc:'Performance profiling, bottlenecks'},
3334
+ {icon:'\u{1F3BC}',name:'conductor',desc:'Workflow orchestration'},
3335
+ {icon:'\u{1F9ED}',name:'navi',desc:'Data profiling, schema inference'},
3336
+ {icon:'\u{1F4C8}',name:'edi',desc:'A/B testing, hypothesis testing'},
3337
+ {icon:'\u26C8',name:'tempest',desc:'Climate, weather, environmental'},
3338
+ {icon:'\u{1F37D}',name:'epicure',desc:'Recipes, nutrition, dietary'},
3339
3339
  ];
3340
3340
  var specialistHtml = SPECIALIST_AGENTS.map(function(t){
3341
3341
  var ic = t.icon;
@@ -3392,7 +3392,7 @@ function renderStudio(el) {
3392
3392
 
3393
3393
  '<div style="display:flex;align-items:center;gap:8px;margin:8px 0">' +
3394
3394
  '<div id="studioTokenBar" style="font-size:10px;color:var(--dim);font-family:var(--mono);flex:1"></div>' +
3395
- '<button id="studioCanvasBtn" onclick="var p=document.getElementById(\\x27canvasPanel\\x27);if(p)p.classList.add(\\x27open\\x27)" style="display:none;font-size:10px;padding:3px 9px;background:none;border:1px solid var(--green3);border-radius:5px;color:var(--green);cursor:pointer;font-family:var(--mono)">&#9632; Open Canvas</button>' +
3395
+ '<button id="studioCanvasBtn" onclick="openCanvasPanel()" style="display:none;font-size:12px;padding:5px 14px;background:var(--greendim);border:1px solid var(--green3);border-radius:6px;color:var(--green);cursor:pointer;font-weight:700">&#9632; ' + t('canvas_open') + '</button>' +
3396
3396
  '</div>' +
3397
3397
  '<div class="studio-canvas" id="studioNodes"></div>' +
3398
3398
  '<div class="studio-log" id="studioLog" style="display:none"></div>' +