nothumanallowed 13.2.88 → 13.2.90

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.88",
3
+ "version": "13.2.90",
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": {
@@ -3218,7 +3218,16 @@ RULES:
3218
3218
  if (isCanvasAgent) {
3219
3219
  sysPrompt = canvasSystemPrompt;
3220
3220
  const canvasData = [attachmentText, context].filter(Boolean).join('\n\n');
3221
- userMsg = `Create a professional dashboard report for this data. Output ONLY the inner HTML body content (starting with <div class="header">):\n\n${canvasData}`;
3221
+ userMsg = `Create a professional dashboard report in ${language}. CRITICAL RULES:
3222
+ 1. Start immediately with <div class="header"> — no preamble
3223
+ 2. Every <div class="section"> MUST contain actual content from the data below — NEVER leave a section empty
3224
+ 3. If data for a section exists, include it verbatim with all details
3225
+ 4. If data for a section does NOT exist, omit that section entirely — do NOT create empty placeholder sections
3226
+ 5. Copy specific facts, names, dates, numbers exactly as they appear in the data
3227
+ 6. Output ONLY HTML starting with <div class="header">
3228
+
3229
+ DATA FROM AGENTS:
3230
+ ${canvasData}`;
3222
3231
  } else if (isLiveDataAgent) {
3223
3232
  // These agents fetched real data — use a focused prompt (no tool definitions to avoid JSON output)
3224
3233
  // Live data agents that fetched their own data: do NOT inject previous context
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.88';
8
+ export const VERSION = '13.2.90';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3639,17 +3639,22 @@ function downloadStudioPDF() {
3639
3639
  '</div>' +
3640
3640
  '</body></html>';
3641
3641
 
3642
- // Use Blob URL to avoid popup blockers opens in new tab, user can Cmd+P to print as PDF
3643
- var blob = new Blob([html], {type: 'text/html'});
3642
+ // Inject auto-print script so the browser shows the Print dialog immediately.
3643
+ // User selects "Save as PDF" in the print dialog to get a real PDF.
3644
+ var printScript = '<script>window.onload=function(){setTimeout(function(){window.print();},400);}<\/script>';
3645
+ var htmlWithPrint = html.replace('</head>', printScript + '</head>');
3646
+ var blob = new Blob([htmlWithPrint], {type: 'text/html'});
3644
3647
  var url = URL.createObjectURL(blob);
3645
- var a = document.createElement('a');
3646
- a.href = url;
3647
- a.target = '_blank';
3648
- a.download = (studioState.task || 'NHA Studio Report').slice(0, 60).replace(/[^a-z0-9\s]/gi,'').trim().replace(/\s+/g,'-') + '.html';
3649
- document.body.appendChild(a);
3650
- a.click();
3651
- document.body.removeChild(a);
3652
- setTimeout(function(){ URL.revokeObjectURL(url); }, 5000);
3648
+ // Open in new tab — the page auto-triggers print dialog (user saves as PDF)
3649
+ var tab = window.open(url, '_blank');
3650
+ if (!tab) {
3651
+ // Popup blocked fallback download as .html with instructions
3652
+ var a = document.createElement('a');
3653
+ a.href = url;
3654
+ a.download = (studioState.task || 'NHA Studio Report').slice(0, 60).replace(/[^a-z0-9\s]/gi,'').trim().replace(/\s+/g,'-') + '.html';
3655
+ document.body.appendChild(a); a.click(); document.body.removeChild(a);
3656
+ }
3657
+ setTimeout(function(){ URL.revokeObjectURL(url); }, 30000);
3653
3658
  }
3654
3659
 
3655
3660
  function renderStudioResult() {
@@ -3665,8 +3670,8 @@ function renderStudioResult() {
3665
3670
  ? '<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>'
3666
3671
  : '';
3667
3672
  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">' +
3668
- '<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>' +
3669
- '<span style="font-size:11px;color:var(--dim)">Scarica il workflow completo come documento PDF</span>' +
3673
+ '<button onclick="downloadStudioPDF()" title="Apri il report in una nuova tab — usa Stampa > Salva 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; Stampa / PDF</button>' +
3674
+ '<span style="font-size:11px;color:var(--dim)">Apre il report completo — usa Cmd+P &rarr; Salva come PDF</span>' +
3670
3675
  '</div>';
3671
3676
  el.innerHTML = '<div class="studio-result__title">&#10003; ' + t('workflow_complete') + '</div>' + body + tokLine + dlBtn;
3672
3677
  // Show/hide inline PDF button in the prompt bar
@@ -4293,7 +4298,7 @@ function renderStudio(el) {
4293
4298
  '<button onclick="document.getElementById(\\x27studioFileInput\\x27).click()" title="Attach PDF or image" style="padding:8px 10px;background:none;border:1px solid var(--border);border-radius:8px;color:var(--dim);cursor:pointer;font-size:15px" ' + (studioState.running ? 'disabled' : '') + '>&#128206;</button>' +
4294
4299
  '<button id="studioRunBtn" class="studio-run-btn" onclick="runStudio()" style="flex:1" ' + (studioState.running ? 'disabled' : '') + '>' + t('run') + '</button>' +
4295
4300
  '<button id="studioStopBtn" onclick="stopStudio()" title="' + t('stop') + '" style="padding:8px 14px;background:#7f1d1d;border:1px solid #ef4444;border-radius:8px;color:#ef4444;cursor:pointer;font-size:13px;font-weight:700;white-space:nowrap;' + (studioState.running ? '' : 'display:none') + '">&#9632; ' + t('stop') + '</button>' +
4296
- '<button id="studioInlinePdfBtn" onclick="downloadStudioPDF()" title="Scarica PDF del risultato" style="display:' + (studioState.result ? 'inline-flex' : 'none') + ';align-items:center;gap:5px;padding:8px 12px;background:linear-gradient(135deg,#4f46e5,#2563eb);border:none;border-radius:8px;color:#fff;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;box-shadow:0 2px 6px rgba(79,70,229,.35)">&#x2913; PDF</button>' +
4301
+ '<button id="studioInlinePdfBtn" onclick="downloadStudioPDF()" title="Apri report - usa Cmd+P per salvare PDF" style="display:' + (studioState.result ? 'inline-flex' : 'none') + ';align-items:center;gap:5px;padding:8px 12px;background:linear-gradient(135deg,#4f46e5,#2563eb);border:none;border-radius:8px;color:#fff;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;box-shadow:0 2px 6px rgba(79,70,229,.35)">&#x2913; PDF</button>' +
4297
4302
  '<button onclick="studioReset()" title="' + t('reset') + '" style="padding:8px 12px;background:none;border:1px solid var(--border);border-radius:8px;color:var(--dim);cursor:pointer;font-size:16px;line-height:1" ' + (studioState.running ? 'disabled' : '') + '>&#8635;</button>' +
4298
4303
  '</div>' +
4299
4304
  '</div>' +