nothumanallowed 13.2.79 → 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 +1 -1
- package/src/commands/ui.mjs +7 -3
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +23 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
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": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -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
|
|
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
|
-
${
|
|
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.
|
|
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
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -3278,6 +3278,8 @@ function studioReset() {
|
|
|
3278
3278
|
if (ta) ta.value = '';
|
|
3279
3279
|
var tb = document.getElementById('studioTokenBar');
|
|
3280
3280
|
if (tb) tb.textContent = '';
|
|
3281
|
+
var inlinePdfBtn = document.getElementById('studioInlinePdfBtn');
|
|
3282
|
+
if (inlinePdfBtn) inlinePdfBtn.style.display = 'none';
|
|
3281
3283
|
renderStudioNodes();
|
|
3282
3284
|
renderStudioLog();
|
|
3283
3285
|
renderStudioResult();
|
|
@@ -3655,8 +3657,17 @@ function renderStudioResult() {
|
|
|
3655
3657
|
var body = hasCanvas
|
|
3656
3658
|
? '<div style="display:flex;align-items:center;gap:12px;flex-wrap:wrap"><span style="color:var(--dim);font-size:13px">✓ ' + 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">▣ ' + t('canvas_open') + '</button></div>'
|
|
3657
3659
|
: '<div class="md-body">' + renderMd(studioState.result) + '</div>';
|
|
3658
|
-
var
|
|
3659
|
-
|
|
3660
|
+
var tokLine = (studioTokens && (studioTokens.in > 0 || studioTokens.out > 0))
|
|
3661
|
+
? '<div style="margin-top:8px;font-size:11px;color:var(--dim);font-family:var(--mono)">⬆ ' + (studioTokens.in||0).toLocaleString() + ' token in ⬇ ' + (studioTokens.out||0).toLocaleString() + ' token out • <strong style="color:var(--green)">' + ((studioTokens.in||0)+(studioTokens.out||0)).toLocaleString() + '</strong> totale</div>'
|
|
3662
|
+
: '';
|
|
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
|
+
'<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)">⤓ Download PDF</button>' +
|
|
3665
|
+
'<span style="font-size:11px;color:var(--dim)">Scarica il workflow completo come documento PDF</span>' +
|
|
3666
|
+
'</div>';
|
|
3667
|
+
el.innerHTML = '<div class="studio-result__title">✓ ' + t('workflow_complete') + '</div>' + body + tokLine + dlBtn;
|
|
3668
|
+
// Show/hide inline PDF button in the prompt bar
|
|
3669
|
+
var inlinePdfBtn = document.getElementById('studioInlinePdfBtn');
|
|
3670
|
+
if (inlinePdfBtn) inlinePdfBtn.style.display = 'inline-flex';
|
|
3660
3671
|
// Update canvas button style: bright green when canvas exists, dimmed otherwise
|
|
3661
3672
|
var canvasBtn = document.getElementById('studioCanvasBtn');
|
|
3662
3673
|
if (canvasBtn) {
|
|
@@ -3794,8 +3805,15 @@ async function runStudio() {
|
|
|
3794
3805
|
var parliamentActive = studioState.parliamentMode || (parliamentChk && parliamentChk.checked);
|
|
3795
3806
|
if (parliamentActive && studioState.nodes.length >= 1) {
|
|
3796
3807
|
var proposals = studioState.nodes
|
|
3797
|
-
.filter(function(n) {
|
|
3798
|
-
|
|
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}; });
|
|
3799
3817
|
// Need at least 2 proposals for cross-reading; if only 1, include the full context as a second proposal
|
|
3800
3818
|
if (proposals.length === 1 && context) {
|
|
3801
3819
|
proposals.push({agent: \x27Context\x27, label: \x27Contesto workflow\x27, output: context});
|
|
@@ -4186,6 +4204,7 @@ function renderStudio(el) {
|
|
|
4186
4204
|
'<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' : '') + '>📎</button>' +
|
|
4187
4205
|
'<button id="studioRunBtn" class="studio-run-btn" onclick="runStudio()" style="flex:1" ' + (studioState.running ? 'disabled' : '') + '>' + t('run') + '</button>' +
|
|
4188
4206
|
'<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') + '">■ ' + t('stop') + '</button>' +
|
|
4207
|
+
'<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)">⤓ PDF</button>' +
|
|
4189
4208
|
'<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' : '') + '>↻</button>' +
|
|
4190
4209
|
'</div>' +
|
|
4191
4210
|
'</div>' +
|