nothumanallowed 13.2.16 → 13.2.18
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 +19 -11
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.18",
|
|
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
|
@@ -2543,13 +2543,16 @@ export async function cmdUI(args) {
|
|
|
2543
2543
|
const task = (body.task || '').trim();
|
|
2544
2544
|
if (!task) { sendJSON(res, 400, { error: 'task required' }); logRequest(method, pathname, 400, Date.now() - start); return; }
|
|
2545
2545
|
|
|
2546
|
+
const plannerLang = (() => { const LANG_MAP2 = {en:'English',it:'Italian',es:'Spanish',fr:'French',de:'German',pt:'Portuguese',zh:'Chinese',ja:'Japanese',ar:'Arabic',hi:'Hindi',ru:'Russian',nl:'Dutch',pl:'Polish',tr:'Turkish',ko:'Korean'}; const lc = (config?.language||'it').slice(0,2); return LANG_MAP2[lc]||'Italian'; })();
|
|
2546
2547
|
const planPrompt = `You are a workflow planner for NHA Studio. The user wants to accomplish this task: "${task}"
|
|
2548
|
+
The workflow will run in ${plannerLang} — all agent prompts must be in ${plannerLang}.
|
|
2547
2549
|
|
|
2548
|
-
Design a sequential workflow of 2-
|
|
2550
|
+
Design a sequential workflow of 2-6 steps. RULES:
|
|
2549
2551
|
- Use tool-agents (WebSearchAgent, EmailAgent, CalendarAgent, GitHubAgent, NotionAgent, SlackAgent) FIRST when real live data is needed
|
|
2550
|
-
-
|
|
2551
|
-
-
|
|
2552
|
-
-
|
|
2552
|
+
- ALWAYS use specialist agents (HERALD, ORACLE, NAVI, ATHENA, CASSANDRA, etc.) for analysis, briefings, and synthesis — NOT WriterAgent or DataAnalystAgent
|
|
2553
|
+
- For executive briefings use HERALD. For data analysis use NAVI or ORACLE. For tech analysis use ATHENA. For risk use CASSANDRA.
|
|
2554
|
+
- Use CanvasAgent as the LAST step ONLY when a visual HTML report/dashboard is explicitly requested
|
|
2555
|
+
- The "prompt" field must be a plain language instruction in ${plannerLang} — never JSON or code
|
|
2553
2556
|
- Each agent receives the previous step's output as context automatically
|
|
2554
2557
|
- Pick the most relevant agents for the task — don't use all of them
|
|
2555
2558
|
|
|
@@ -2747,14 +2750,19 @@ Respond with ONLY valid JSON, no markdown:
|
|
|
2747
2750
|
}
|
|
2748
2751
|
|
|
2749
2752
|
// ── Build system prompt with real tool data ───────────────────
|
|
2753
|
+
const LANG_MAP = {en:'English',it:'Italian',es:'Spanish',fr:'French',de:'German',pt:'Portuguese',zh:'Chinese',ja:'Japanese',ar:'Arabic',hi:'Hindi',ru:'Russian',nl:'Dutch',pl:'Polish',tr:'Turkish',ko:'Korean',sv:'Swedish',da:'Danish',fi:'Finnish',no:'Norwegian',cs:'Czech'};
|
|
2754
|
+
const langCode = (config?.language || 'it').toLowerCase().slice(0,2);
|
|
2755
|
+
const language = LANG_MAP[langCode] || config?.language || 'Italian';
|
|
2756
|
+
const today = new Date().toISOString().split('T')[0];
|
|
2750
2757
|
const isCanvasAgent = agent === 'CanvasAgent';
|
|
2751
2758
|
// Tool-data agents: fetch real live data and use buildSystemPrompt (tool calls allowed)
|
|
2752
2759
|
const isLiveDataAgent = ['CalendarAgent','EmailAgent','GitHubAgent','NotionAgent','SlackAgent','DriveAgent','BrowserAgent','WebSearchAgent','ResearchAgent'].includes(agent);
|
|
2753
2760
|
|
|
2754
|
-
const canvasSystemPrompt = `You are an HTML report generator. Output a single complete HTML document. No preamble, no explanation.
|
|
2761
|
+
const canvasSystemPrompt = `You are an HTML report generator. Output a single complete HTML document in ${language}. No preamble, no explanation.
|
|
2755
2762
|
RULES:
|
|
2756
2763
|
- First character of your response must be < (start of <!DOCTYPE html>)
|
|
2757
2764
|
- Do NOT use markdown code blocks, JSON, or any wrapper
|
|
2765
|
+
- All text content must be in ${language}
|
|
2758
2766
|
- Use clean design: white background, Inter/system-ui font, #6366f1 accent color
|
|
2759
2767
|
- Structure: gradient header, then card sections with the content
|
|
2760
2768
|
- Make it complete and self-contained`;
|
|
@@ -2766,10 +2774,10 @@ RULES:
|
|
|
2766
2774
|
userMsg = `Generate a beautiful HTML dashboard report for this content. Start immediately with <!DOCTYPE html>:\n\n${context.slice(0, 8000)}`;
|
|
2767
2775
|
} else if (isLiveDataAgent) {
|
|
2768
2776
|
// These agents fetched real data — use buildSystemPrompt so they can call tools too
|
|
2769
|
-
const agentInstruction = `You are ${agent}, a specialist AI agent inside NHA Studio.\nYour task: ${stepPrompt}\n` +
|
|
2777
|
+
const agentInstruction = `You are ${agent}, a specialist AI agent inside NHA Studio. Respond in ${language}.\nYour task: ${stepPrompt}\n` +
|
|
2770
2778
|
(toolData ? `\n## DATA FROM TOOLS:\n${toolData.slice(0, 4000)}\n` : '') +
|
|
2771
2779
|
(context ? `\n## OUTPUT FROM PREVIOUS AGENTS:\n${context.slice(0, 3000)}\n` : '') +
|
|
2772
|
-
|
|
2780
|
+
`\nWrite your analysis in plain text in ${language}. Do NOT output JSON, tool calls, or code blocks. Summarize the data clearly.`;
|
|
2773
2781
|
sysPrompt = buildSystemPrompt(agent, agentInstruction, config);
|
|
2774
2782
|
userMsg = toolData
|
|
2775
2783
|
? `Summarize the data above for: ${stepPrompt}`
|
|
@@ -2779,9 +2787,7 @@ RULES:
|
|
|
2779
2787
|
} else {
|
|
2780
2788
|
// All other agents (WriterAgent, DataAnalystAgent, specialist agents, etc.)
|
|
2781
2789
|
// Use a focused prompt with NO TOOL_DEFINITIONS to prevent JSON/tool-call output
|
|
2782
|
-
|
|
2783
|
-
const language = config?.language || 'Italian';
|
|
2784
|
-
sysPrompt = `You are ${agent}, a specialist AI agent inside NHA Studio. Today is ${today}. Respond in ${language}.
|
|
2790
|
+
sysPrompt = `You are ${agent}, a specialist AI agent inside NHA Studio. Today is ${today}. You MUST respond entirely in ${language}.
|
|
2785
2791
|
|
|
2786
2792
|
CRITICAL RULES:
|
|
2787
2793
|
- Do NOT output JSON, tool calls, function calls, or code blocks
|
|
@@ -2801,6 +2807,7 @@ ${context ? `## CONTEXT FROM PREVIOUS AGENTS:\n${context.slice(0, 5000)}\n` : ''
|
|
|
2801
2807
|
// ── Stream LLM response ───────────────────────────────────────
|
|
2802
2808
|
let fullOutput = '';
|
|
2803
2809
|
sendToken(isCanvasAgent ? 'Generating visual report...' : '');
|
|
2810
|
+
const llmTimeout = isCanvasAgent ? 120000 : 90000;
|
|
2804
2811
|
try {
|
|
2805
2812
|
await withTimeout(
|
|
2806
2813
|
callLLMStream(config, sysPrompt, userMsg,
|
|
@@ -2812,8 +2819,9 @@ ${context ? `## CONTEXT FROM PREVIOUS AGENTS:\n${context.slice(0, 5000)}\n` : ''
|
|
|
2812
2819
|
if (stripped) sendToken(stripped);
|
|
2813
2820
|
}
|
|
2814
2821
|
},
|
|
2822
|
+
{ max_tokens: isCanvasAgent ? 4096 : 2048 },
|
|
2815
2823
|
),
|
|
2816
|
-
|
|
2824
|
+
llmTimeout
|
|
2817
2825
|
);
|
|
2818
2826
|
} catch (e) {
|
|
2819
2827
|
if (!isCanvasAgent) sendToken(`[Error: ${e.message}]`);
|
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.18';
|
|
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
|
@@ -3036,14 +3036,20 @@ function runStudioStep(idx, node, task, context, stepDef) {
|
|
|
3036
3036
|
var ev = JSON.parse(d);
|
|
3037
3037
|
if (ev.token) {
|
|
3038
3038
|
// Tool status tokens (start with '[') shown in dim color, LLM output streamed normally
|
|
3039
|
-
var isStatus = ev.token.charAt(0) === '[' && ev.token.indexOf(']') > 0 && ev.token.length <
|
|
3039
|
+
var isStatus = ev.token.charAt(0) === '[' && ev.token.indexOf(']') > 0 && ev.token.length < 80;
|
|
3040
3040
|
if (!isStatus) output += ev.token;
|
|
3041
3041
|
// Update live log entry
|
|
3042
3042
|
var entries = document.querySelectorAll('.studio-log-entry');
|
|
3043
3043
|
var last = entries[entries.length - 1];
|
|
3044
3044
|
if (last) {
|
|
3045
3045
|
var tb = last.querySelector('.studio-log-entry__text');
|
|
3046
|
-
if (tb)
|
|
3046
|
+
if (tb) {
|
|
3047
|
+
if (isStatus) {
|
|
3048
|
+
tb.textContent = ev.token.split('\\r').join('').split('\\n').join(' ');
|
|
3049
|
+
} else {
|
|
3050
|
+
tb.innerHTML = renderMd(output);
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3047
3053
|
}
|
|
3048
3054
|
}
|
|
3049
3055
|
if (ev.canvas) {
|