nothumanallowed 13.2.45 → 13.2.46
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 +1 -1
- package/src/commands/ui.mjs +13 -5
- package/src/constants.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.46",
|
|
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/commands/ui.mjs
CHANGED
|
@@ -2911,21 +2911,29 @@ ${context ? `## OUTPUT FROM PREVIOUS AGENTS:\n${context.slice(0, 6000)}\n` : ''}
|
|
|
2911
2911
|
const bodyStart = bodyHtml.search(/<body[^>]*>/i);
|
|
2912
2912
|
if (bodyStart >= 0) bodyHtml = bodyHtml.slice(bodyStart).replace(/<body[^>]*>/i, '').replace(/<\/body>[\s\S]*/i, '').trim();
|
|
2913
2913
|
}
|
|
2914
|
+
// Derive a short report title from the task (skip stop words, take first 5-6 meaningful words)
|
|
2915
|
+
const stopWords = new Set(['di','la','il','lo','le','gli','un','una','dei','del','della','per','che','con','su','in','e','a','da','è','come','analizza','analisi','ricerca','crea','genera','fai','fammi','dammi','the','of','for','and','a','an','in','with','on','about','analyze','analysis','research','create','generate','make','find','search']);
|
|
2916
|
+
const titleWords = task.replace(/[.,;:!?]/g,'').split(/\s+/).filter(w => w.length > 2 && !stopWords.has(w.toLowerCase())).slice(0, 6);
|
|
2917
|
+
const reportTitle = titleWords.length > 0 ? titleWords.map(w => w.charAt(0).toUpperCase()+w.slice(1)).join(' ') : 'Studio Report';
|
|
2914
2918
|
// Fallback: if LLM output is empty or has no HTML tags, build body from context using markdown→HTML conversion
|
|
2915
2919
|
if (!bodyHtml || !bodyHtml.includes('<')) {
|
|
2916
|
-
const reportTitle = task.slice(0, 80).replace(/</g,'<');
|
|
2917
2920
|
const sections = context.split(/\n#{1,3} |(?=\n\n)/).filter(s => s.trim()).slice(0, 12);
|
|
2918
|
-
bodyHtml = `<div class="header"><h1>${reportTitle}</h1><p>NHA Studio Report \u00b7 ${today}</p><div class="meta"><span>${today}</span></div></div>` +
|
|
2921
|
+
bodyHtml = `<div class="header"><h1>${reportTitle.replace(/</g,'<')}</h1><p>NHA Studio Report \u00b7 ${today}</p><div class="meta"><span>${today}</span></div></div>` +
|
|
2919
2922
|
sections.map(s => {
|
|
2920
2923
|
const lines = s.replace(/\*\*/g,'').replace(/\*/g,'').trim().split('\n').filter(Boolean);
|
|
2921
|
-
const
|
|
2924
|
+
const stitle = lines[0] || '';
|
|
2922
2925
|
const body = lines.slice(1).map(l => `<p>${l.replace(/</g,'<')}</p>`).join('');
|
|
2923
|
-
return `<div class="section"><div class="section-title">${
|
|
2926
|
+
return `<div class="section"><div class="section-title">${stitle.replace(/</g,'<')}</div>${body}</div>`;
|
|
2924
2927
|
}).join('') +
|
|
2925
2928
|
`<div class="footer">NHA Studio \u00b7 ${today}</div>`;
|
|
2929
|
+
} else {
|
|
2930
|
+
// Replace the h1 inside existing header div if the model included the full prompt as title
|
|
2931
|
+
bodyHtml = bodyHtml.replace(/(<div[^>]*class="header"[^>]*>[\s\S]*?<h1[^>]*>)([^<]{60,})(<\/h1>)/, (m, open, title, close) => {
|
|
2932
|
+
return open + reportTitle.replace(/</g,'<') + close;
|
|
2933
|
+
});
|
|
2926
2934
|
}
|
|
2927
2935
|
// Always wrap in the guaranteed NHA dark CSS template
|
|
2928
|
-
const finalHtml = wrapInNHATemplate(bodyHtml,
|
|
2936
|
+
const finalHtml = wrapInNHATemplate(bodyHtml, reportTitle);
|
|
2929
2937
|
sendToken('\n\n[Report generato]');
|
|
2930
2938
|
sendEvent({ canvas: finalHtml });
|
|
2931
2939
|
}
|
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.
|
|
8
|
+
export const VERSION = '13.2.46';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|