nothumanallowed 13.2.26 → 13.2.28

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.26",
3
+ "version": "13.2.28",
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": {
@@ -2661,9 +2661,10 @@ Example output:
2661
2661
  } catch (e) { toolData = `Calendar read failed: ${e.message}`; }
2662
2662
 
2663
2663
  } else if (agent === 'WebSearchAgent' || agent === 'ResearchAgent') {
2664
- sendToken('[Searching the web...] ');
2664
+ sendToken('[Searching the web and reading pages...] ');
2665
2665
  try {
2666
- const searchResult = await withTimeout(executeTool('web_search', { query: stepPrompt }, config), 'WebSearch');
2666
+ // 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);
2667
2668
  toolData = typeof searchResult === 'string' ? searchResult : JSON.stringify(searchResult);
2668
2669
  } catch (e) { toolData = `Web search failed: ${e.message}`; }
2669
2670
 
@@ -2725,92 +2726,88 @@ Example output:
2725
2726
  // Tool-data agents: fetch real live data and use buildSystemPrompt (tool calls allowed)
2726
2727
  const isLiveDataAgent = ['CalendarAgent','EmailAgent','GitHubAgent','NotionAgent','SlackAgent','DriveAgent','BrowserAgent','WebSearchAgent','ResearchAgent'].includes(agent);
2727
2728
 
2728
- const canvasSystemPrompt = `You are an HTML report generator. Output ONLY a single complete HTML document in ${language}. No preamble, no explanation, no markdown.
2729
- STRICT RULES:
2730
- - Your ENTIRE response must be valid HTML starting with <!DOCTYPE html>
2731
- - Do NOT output markdown code blocks, JSON, or any wrapper text
2732
- - ALL text content (titles, descriptions, labels, body text) must be in ${language}
2733
- - Use EXACTLY this CSS template structure — only change the content inside, never the style
2734
-
2735
- USE THIS EXACT HTML STRUCTURE (replace placeholders with real content):
2729
+ const canvasSystemPrompt = `You are an expert HTML report designer. Output ONLY a complete HTML document in ${language}. Start immediately with <!DOCTYPE html>. No markdown, no explanation.
2730
+
2731
+ FORMATTING RULES use ALL of these in the report:
2732
+ - <strong> for bold key terms and important values
2733
+ - <em> for emphasis and technical terms
2734
+ - <u> for critical warnings or deadlines
2735
+ - <ul><li> for bullet lists, <ol><li> for numbered/priority lists
2736
+ - <a href="URL" target="_blank" style="color:#22d3ee;text-decoration:underline"> for ALL source URLs — ALWAYS make URLs clickable hyperlinks, never plain text
2737
+ - Bar charts: use CSS width% on colored divs to visualize percentages/scores
2738
+ - Use <span class="badge-high">, <span class="badge-med">, <span class="badge-low"> for priority labels
2739
+
2740
+ CONTENT RULES:
2741
+ - ALL text must be in ${language}
2742
+ - Include ALL real content from the data: titles, descriptions, URLs, key findings
2743
+ - Do NOT summarize — include specific details, names, numbers, dates from the source data
2744
+ - For each news item/source: show title as <strong>, URL as clickable <a href>, and a real summary paragraph
2745
+ - Use <blockquote> for direct quotes or key excerpts
2746
+
2747
+ USE EXACTLY THIS CSS (do not change it, only add content):
2736
2748
  <!DOCTYPE html>
2737
2749
  <html lang="${language.slice(0,2).toLowerCase()}">
2738
2750
  <head>
2739
2751
  <meta charset="UTF-8">
2740
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
2741
- <title>REPORT TITLE HERE</title>
2752
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
2753
+ <title>NHA Studio Report</title>
2742
2754
  <style>
2743
2755
  *{margin:0;padding:0;box-sizing:border-box}
2744
- body{font-family:'Inter',system-ui,sans-serif;background:#0d0d14;color:#f0f0f5;min-height:100vh;padding:24px}
2745
- .header{background:linear-gradient(135deg,#6366f1 0%,#22d3ee 100%);border-radius:16px;padding:32px 40px;margin-bottom:24px}
2746
- .header h1{font-size:28px;font-weight:700;color:#fff;margin-bottom:8px}
2747
- .header p{font-size:14px;color:rgba(255,255,255,0.8)}
2748
- .meta{display:flex;gap:16px;margin-top:16px;flex-wrap:wrap}
2749
- .meta span{background:rgba(255,255,255,0.2);border-radius:20px;padding:4px 12px;font-size:12px;color:#fff}
2750
- .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-bottom:24px}
2751
- .card{background:#15151f;border:1px solid #2a2a38;border-radius:12px;padding:20px}
2752
- .card h2{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#6366f1;margin-bottom:12px;font-weight:600}
2753
- .card h3{font-size:16px;font-weight:600;color:#f0f0f5;margin-bottom:8px}
2754
- .card p{font-size:13px;color:#8b8b9e;line-height:1.6}
2755
- .card ul{list-style:none;padding:0}
2756
- .card ul li{font-size:13px;color:#8b8b9e;line-height:1.8;padding-left:16px;position:relative}
2757
- .card ul li::before{content:'›';position:absolute;left:0;color:#6366f1}
2758
- .badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;margin-right:6px;margin-bottom:4px}
2759
- .badge-high{background:#7f1d1d;color:#ef4444}
2760
- .badge-med{background:#713f12;color:#f59e0b}
2761
- .badge-low{background:#14532d;color:#34d399}
2762
- .badge-info{background:#1e1b4b;color:#6366f1}
2763
- .section{background:#15151f;border:1px solid #2a2a38;border-radius:12px;padding:24px;margin-bottom:16px}
2764
- .section h2{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#22d3ee;margin-bottom:16px;font-weight:600}
2765
- .section h3{font-size:15px;font-weight:600;color:#f0f0f5;margin-bottom:6px}
2766
- .section p{font-size:13px;color:#8b8b9e;line-height:1.7;margin-bottom:12px}
2767
- .priority-list{display:flex;flex-direction:column;gap:10px}
2756
+ body{font-family:'Inter',system-ui,sans-serif;background:#0d0d14;color:#f0f0f5;min-height:100vh;padding:20px;font-size:14px;line-height:1.65}
2757
+ a{color:#22d3ee;text-decoration:underline}a:hover{color:#6366f1}
2758
+ strong{color:#f0f0f5;font-weight:700}
2759
+ em{color:#a5b4fc;font-style:italic}
2760
+ u{text-decoration-color:#ef4444}
2761
+ blockquote{border-left:3px solid #6366f1;padding:8px 16px;margin:10px 0;background:#15151f;border-radius:0 8px 8px 0;color:#8b8b9e;font-style:italic}
2762
+ .header{background:linear-gradient(135deg,#4f46e5 0%,#06b6d4 100%);border-radius:16px;padding:28px 36px;margin-bottom:20px}
2763
+ .header h1{font-size:26px;font-weight:800;color:#fff;margin-bottom:6px}
2764
+ .header p{font-size:13px;color:rgba(255,255,255,0.85);margin:0}
2765
+ .meta{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
2766
+ .meta span{background:rgba(255,255,255,0.18);border-radius:20px;padding:3px 12px;font-size:11px;color:#fff;font-weight:500}
2767
+ .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-bottom:20px}
2768
+ .card{background:#15151f;border:1px solid #2a2a38;border-radius:12px;padding:18px}
2769
+ .card-label{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:#6366f1;font-weight:700;margin-bottom:8px}
2770
+ .card h3{font-size:18px;font-weight:700;color:#f0f0f5;margin-bottom:4px}
2771
+ .card p{font-size:12px;color:#8b8b9e;margin:0}
2772
+ .section{background:#15151f;border:1px solid #2a2a38;border-radius:12px;padding:22px;margin-bottom:16px}
2773
+ .section-title{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:#22d3ee;font-weight:700;margin-bottom:16px}
2774
+ .section h3{font-size:15px;font-weight:600;color:#f0f0f5;margin-bottom:6px;margin-top:14px}
2775
+ .section p{font-size:13px;color:#8b8b9e;line-height:1.7;margin-bottom:10px}
2776
+ ul{list-style:none;padding:0;margin:8px 0}
2777
+ ul li{padding:4px 0 4px 18px;position:relative;font-size:13px;color:#8b8b9e}
2778
+ ul li::before{content:'›';position:absolute;left:0;color:#6366f1;font-weight:700}
2779
+ ol{padding-left:20px;margin:8px 0}
2780
+ ol li{padding:4px 0;font-size:13px;color:#8b8b9e;line-height:1.6}
2781
+ .priority-list{display:flex;flex-direction:column;gap:8px}
2768
2782
  .priority-item{display:flex;align-items:flex-start;gap:12px;padding:12px;background:#1c1c28;border-radius:8px}
2769
- .priority-num{width:28px;height:28px;border-radius:50%;background:#6366f1;color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
2770
- .priority-item h4{font-size:13px;font-weight:600;color:#f0f0f5;margin-bottom:2px}
2783
+ .priority-num{width:26px;height:26px;border-radius:50%;background:#6366f1;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
2784
+ .priority-item h4{font-size:13px;font-weight:600;color:#f0f0f5;margin-bottom:3px}
2771
2785
  .priority-item p{font-size:12px;color:#8b8b9e;line-height:1.5;margin:0}
2772
- .footer{text-align:center;padding:20px;font-size:11px;color:#4a4a5e;margin-top:8px}
2786
+ .source-item{padding:14px;background:#1c1c28;border-radius:8px;margin-bottom:10px;border-left:3px solid #6366f1}
2787
+ .source-item h4{font-size:13px;font-weight:600;color:#f0f0f5;margin-bottom:4px}
2788
+ .source-item p{font-size:12px;color:#8b8b9e;line-height:1.6;margin:4px 0}
2789
+ .source-item a{font-size:11px}
2790
+ .bar-row{margin-bottom:10px}
2791
+ .bar-label{font-size:12px;color:#8b8b9e;margin-bottom:4px;display:flex;justify-content:space-between}
2792
+ .bar-track{background:#1c1c28;border-radius:4px;height:8px;overflow:hidden}
2793
+ .bar-fill{height:100%;border-radius:4px;background:linear-gradient(90deg,#6366f1,#22d3ee)}
2794
+ .badge-high{display:inline-block;background:#7f1d1d;color:#ef4444;border-radius:12px;padding:2px 10px;font-size:10px;font-weight:700;margin-right:4px}
2795
+ .badge-med{display:inline-block;background:#713f12;color:#f59e0b;border-radius:12px;padding:2px 10px;font-size:10px;font-weight:700;margin-right:4px}
2796
+ .badge-low{display:inline-block;background:#14532d;color:#34d399;border-radius:12px;padding:2px 10px;font-size:10px;font-weight:700;margin-right:4px}
2797
+ .badge-info{display:inline-block;background:#1e1b4b;color:#a5b4fc;border-radius:12px;padding:2px 10px;font-size:10px;font-weight:700;margin-right:4px}
2798
+ .divider{border:none;border-top:1px solid #2a2a38;margin:16px 0}
2799
+ .footer{text-align:center;padding:18px;font-size:11px;color:#4a4a5e;margin-top:8px}
2773
2800
  </style>
2774
2801
  </head>
2775
2802
  <body>
2776
- <!-- HEADER: put report title, subtitle, date, and 2-3 meta tags -->
2777
- <div class="header">
2778
- <h1>REPLACE WITH REPORT TITLE</h1>
2779
- <p>REPLACE WITH SUBTITLE/DESCRIPTION</p>
2780
- <div class="meta">
2781
- <span>📅 ${today}</span>
2782
- <span>META TAG 2</span>
2783
- <span>META TAG 3</span>
2784
- </div>
2785
- </div>
2786
-
2787
- <!-- STATS GRID: 3-4 cards with key numbers/stats -->
2788
- <div class="grid">
2789
- <div class="card">
2790
- <h2>LABEL 1</h2>
2791
- <h3>STAT OR TITLE</h3>
2792
- <p>DESCRIPTION</p>
2793
- </div>
2794
- <!-- Add more cards for other stats -->
2795
- </div>
2796
-
2797
- <!-- MAIN SECTIONS: 2-4 sections with content -->
2798
- <div class="section">
2799
- <h2>SECTION LABEL</h2>
2800
- <div class="priority-list">
2801
- <div class="priority-item">
2802
- <div class="priority-num">1</div>
2803
- <div><h4>ITEM TITLE</h4><p>ITEM DESCRIPTION</p></div>
2804
- </div>
2805
- <!-- Add more priority items -->
2806
- </div>
2807
- </div>
2808
-
2809
- <div class="footer">Generated by NHA Studio · ${today}</div>
2810
- </body>
2811
- </html>
2812
-
2813
- Fill ALL placeholder text with the actual content from the data provided. Keep ALL CSS exactly as above. Output ONLY the HTML.`;
2803
+
2804
+ [HEADER — gradient card with h1 title, subtitle p, and .meta spans for date/stats]
2805
+ [GRID 3-4 .card stat boxes with real numbers from the data]
2806
+ [SECTIONS — use .section with .section-title, then real content with h3, p, ul/ol, .source-item for URLs, .priority-list for ranked items, .bar-row for visual charts]
2807
+ [For every URL in the data: wrap in <a href="..." target="_blank"> as a clickable hyperlink]
2808
+ [FOOTER — "NHA Studio · ${today}"]
2809
+
2810
+ Output ONLY the full HTML. Replace all bracketed instructions above with real HTML content.`;
2814
2811
 
2815
2812
  let sysPrompt, userMsg;
2816
2813
 
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.26';
8
+ export const VERSION = '13.2.28';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -2774,7 +2774,7 @@ var I18N = {
2774
2774
  placeholder_chat:'Scrivi a NHA... (Invio per inviare)',
2775
2775
  placeholder_studio:'Descrivi cosa vuoi fare... (Ctrl+Invio per avviare)',
2776
2776
  planning:'Pianificazione...', workflow_complete:'Workflow completato.',
2777
- workflow_stopped:'Workflow fermato dall\'utente.',
2777
+ workflow_stopped:'Workflow fermato dall\u2019utente.',
2778
2778
  canvas_open:'Apri Canvas', canvas_generated:'Dashboard HTML generata nel pannello Canvas.',
2779
2779
  saved:'Salvato!', lang_set:'Lingua impostata su',
2780
2780
  agents_respond:'Tutti gli agenti risponderanno in',
@@ -2808,7 +2808,7 @@ var I18N = {
2808
2808
  placeholder_chat:'Message à NHA... (Entrée pour envoyer)',
2809
2809
  placeholder_studio:'Décrivez ce que vous voulez faire... (Ctrl+Entrée pour lancer)',
2810
2810
  planning:'Planification...', workflow_complete:'Flux terminé.',
2811
- workflow_stopped:'Flux arrêté par l\'utilisateur.',
2811
+ workflow_stopped:'Flux arr\u00eat\u00e9 par l\u2019utilisateur.',
2812
2812
  canvas_open:'Ouvrir Canvas', canvas_generated:'Tableau de bord HTML généré dans Canvas.',
2813
2813
  saved:'Sauvegardé!', lang_set:'Langue définie sur',
2814
2814
  agents_respond:'Tous les agents répondront en',
@@ -2975,7 +2975,10 @@ function renderStudioResult() {
2975
2975
  var body = isHtml
2976
2976
  ? '<div style="display:flex;align-items:center;gap:12px;flex-wrap:wrap"><span style="color:var(--dim);font-size:13px">&#10003; ' + t('canvas_generated') + '</span><button onclick="openCanvasPanel()" style="padding:6px 14px;background:var(--greendim);border:1px solid var(--green3);border-radius:8px;color:var(--green);font-size:12px;cursor:pointer;font-weight:700">&#x25A3; ' + t('canvas_open') + '</button></div>'
2977
2977
  : '<div class="md-body">' + renderMd(studioState.result) + '</div>';
2978
- el.innerHTML = '<div class="studio-result__title">&#10003; Workflow completato</div>' + body;
2978
+ el.innerHTML = '<div class="studio-result__title">&#10003; ' + t('workflow_complete') + '</div>' + body;
2979
+ // Show/hide persistent canvas button in toolbar
2980
+ var canvasBtn = document.getElementById('studioCanvasBtn');
2981
+ if (canvasBtn) canvasBtn.style.display = isHtml ? '' : 'none';
2979
2982
  }
2980
2983
 
2981
2984
  function studioSetNodeStatus(idx, status) {