nothumanallowed 13.5.33 → 13.5.35
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 +39 -8
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +20 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.35",
|
|
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
|
@@ -3050,6 +3050,21 @@ ${rawText.slice(0, 18000)}`;
|
|
|
3050
3050
|
} else if (agent === 'WebSearchAgent' || agent === 'ResearchAgent') {
|
|
3051
3051
|
sendToken('[Searching the web and reading pages...] ');
|
|
3052
3052
|
try {
|
|
3053
|
+
// If the task or stepPrompt contains explicit URLs, fetch them directly first
|
|
3054
|
+
const explicitUrls = (task + ' ' + stepPrompt).match(/https?:\/\/[^\s"'<>)]+/g);
|
|
3055
|
+
if (explicitUrls && explicitUrls.length > 0) {
|
|
3056
|
+
const uniqueUrls = [...new Set(explicitUrls)].slice(0, 4);
|
|
3057
|
+
for (const u of uniqueUrls) {
|
|
3058
|
+
sendToken(`[Fetching ${u}...] `);
|
|
3059
|
+
try {
|
|
3060
|
+
const fetchRes = await withTimeout(executeTool('fetch_url', { url: u }, config), 30000);
|
|
3061
|
+
const fetchStr = typeof fetchRes === 'string' ? fetchRes : JSON.stringify(fetchRes);
|
|
3062
|
+
if (fetchStr && fetchStr.length > 100) {
|
|
3063
|
+
toolData += (toolData ? '\n\n' : '') + `## Page content: ${u}\n${fetchStr.slice(0, 8000)}`;
|
|
3064
|
+
}
|
|
3065
|
+
} catch (e) { toolData += (toolData ? '\n\n' : '') + `## Fetch ${u} failed: ${e.message}`; }
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3053
3068
|
// If there is document context from a previous step, ask the LLM to derive
|
|
3054
3069
|
// the optimal search queries. This is generic and works for any document/task.
|
|
3055
3070
|
let searchQueries = [stepPrompt.slice(0, 120)];
|
|
@@ -3111,17 +3126,33 @@ ${rawText.slice(0, 18000)}`;
|
|
|
3111
3126
|
} catch (e) { toolData = toolData || `Web search failed: ${e.message}`; }
|
|
3112
3127
|
|
|
3113
3128
|
} else if (agent === 'BrowserAgent') {
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3129
|
+
// Collect all URLs from stepPrompt + task, plus infer subpaths mentioned (e.g. /about, /docs)
|
|
3130
|
+
const allUrlMatches = [...new Set((stepPrompt + ' ' + task).match(/https?:\/\/[^\s"'<>)]+/g) || [])];
|
|
3131
|
+
// Also extract any relative paths like /about, /download, /docs mentioned near a base URL
|
|
3132
|
+
const baseUrlMatch = (stepPrompt + ' ' + task).match(/https?:\/\/[^\s"'<>/]+/);
|
|
3133
|
+
if (baseUrlMatch) {
|
|
3134
|
+
const base = baseUrlMatch[0].replace(/\/$/, '');
|
|
3135
|
+
const subpaths = (stepPrompt + ' ' + task).match(/\/[a-z][a-z0-9_/-]*/g) || [];
|
|
3136
|
+
for (const sp of subpaths) {
|
|
3137
|
+
if (sp.length > 1 && sp.length < 40) allUrlMatches.push(base + sp);
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
const urlsToFetch = [...new Set(allUrlMatches)].slice(0, 5);
|
|
3141
|
+
if (urlsToFetch.length > 0) {
|
|
3142
|
+
for (const u of urlsToFetch) {
|
|
3143
|
+
sendToken(`[Fetching ${u}...] `);
|
|
3144
|
+
try {
|
|
3145
|
+
const fetchResult = await withTimeout(executeTool('fetch_url', { url: u }, config), 30000);
|
|
3146
|
+
const fetchStr = typeof fetchResult === 'string' ? fetchResult : JSON.stringify(fetchResult);
|
|
3147
|
+
if (fetchStr && fetchStr.length > 100) {
|
|
3148
|
+
toolData += (toolData ? '\n\n' : '') + `## Page: ${u}\n${fetchStr.slice(0, 8000)}`;
|
|
3149
|
+
}
|
|
3150
|
+
} catch (e) { toolData += (toolData ? '\n\n' : '') + `## Fetch ${u} failed: ${e.message}`; }
|
|
3151
|
+
}
|
|
3121
3152
|
} else {
|
|
3122
3153
|
sendToken('[Searching web...] ');
|
|
3123
3154
|
try {
|
|
3124
|
-
const searchResult = await withTimeout(executeTool('web_search', { query: stepPrompt }, config),
|
|
3155
|
+
const searchResult = await withTimeout(executeTool('web_search', { query: stepPrompt }, config), 30000);
|
|
3125
3156
|
toolData = typeof searchResult === 'string' ? searchResult : JSON.stringify(searchResult);
|
|
3126
3157
|
} catch (e) { toolData = `Browser search failed: ${e.message}`; }
|
|
3127
3158
|
}
|
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.5.
|
|
8
|
+
export const VERSION = '13.5.35';
|
|
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
|
@@ -257,10 +257,12 @@ function switchView(v) {
|
|
|
257
257
|
function openSidebar() {
|
|
258
258
|
document.getElementById('sidebar').classList.add('sidebar--open');
|
|
259
259
|
document.getElementById('overlay').classList.add('sidebar__overlay--open');
|
|
260
|
+
var mb = document.getElementById('mobileBurger'); if (mb) mb.style.display = 'none';
|
|
260
261
|
}
|
|
261
262
|
function closeSidebar() {
|
|
262
263
|
document.getElementById('sidebar').classList.remove('sidebar--open');
|
|
263
264
|
document.getElementById('overlay').classList.remove('sidebar__overlay--open');
|
|
265
|
+
var mb = document.getElementById('mobileBurger'); if (mb) mb.style.display = '';
|
|
264
266
|
}
|
|
265
267
|
function toggleSidebar() {
|
|
266
268
|
var sb = document.getElementById('sidebar');
|
|
@@ -3338,7 +3340,7 @@ var studioAbortController = null;
|
|
|
3338
3340
|
var parlActiveAgent = null; // active agent label during parliament streaming
|
|
3339
3341
|
var parlDoneAgents = {}; // set of completed agent labels during parliament
|
|
3340
3342
|
var _parlPersistHtml = null; // persists parliament block HTML across tab navigations
|
|
3341
|
-
var _PARL_STAMP = '<!--nha-parl-v13.5.
|
|
3343
|
+
var _PARL_STAMP = '<!--nha-parl-v13.5.35-->';
|
|
3342
3344
|
|
|
3343
3345
|
function stopStudio() {
|
|
3344
3346
|
if (!studioState.running) return;
|
|
@@ -5863,8 +5865,9 @@ function renderStudio(el) {
|
|
|
5863
5865
|
'<h2>⚙ NHA Studio</h2>' +
|
|
5864
5866
|
'<p>Build a pipeline manually — click agents to add them in order — or describe your task in natural language and let Studio plan it automatically.</p>' +
|
|
5865
5867
|
'</div>' +
|
|
5866
|
-
'<div style="display:flex;gap:16px;
|
|
5868
|
+
'<div style="display:flex;gap:16px;align-items:flex-start" id="studioMainRow">' +
|
|
5867
5869
|
'<div style="flex:1;min-width:0">' +
|
|
5870
|
+
'<button class="studio-sidebar-toggle" onclick="(function(){var sb=document.getElementById(\\x27studioSidebar\\x27);sb.classList.toggle(\\x27studio-sidebar--open\\x27)})()" title="Tools & Agents">🔧 Tools & Agents</button>' +
|
|
5868
5871
|
|
|
5869
5872
|
// ── MODE TABS ──
|
|
5870
5873
|
'<div style="display:flex;gap:0;margin-bottom:14px;border:1px solid var(--border);border-radius:8px;overflow:hidden">' +
|
|
@@ -5921,7 +5924,7 @@ function renderStudio(el) {
|
|
|
5921
5924
|
'</div>' +
|
|
5922
5925
|
|
|
5923
5926
|
// ── AGENT SIDEBAR ──
|
|
5924
|
-
'<div
|
|
5927
|
+
'<div id="studioSidebar" class="studio-sidebar">' +
|
|
5925
5928
|
'<div class="studio-tools-panel">' +
|
|
5926
5929
|
// Tab bar
|
|
5927
5930
|
'<div style="display:flex;gap:0;margin-bottom:10px;border:1px solid var(--border);border-radius:6px;overflow:hidden">' +
|
|
@@ -6215,6 +6218,7 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
6215
6218
|
|
|
6216
6219
|
/* Mobile burger button */
|
|
6217
6220
|
#mobileBurger{display:block}
|
|
6221
|
+
.sidebar--open~* #mobileBurger,.sidebar--open+* #mobileBurger{opacity:0;pointer-events:none}
|
|
6218
6222
|
.sidebar__close{position:absolute;top:12px;right:12px;background:none;border:none;color:var(--dim);font-size:20px;cursor:pointer;padding:4px 8px;z-index:10;line-height:1}
|
|
6219
6223
|
.sidebar__close:hover{color:var(--bright)}
|
|
6220
6224
|
.sidebar__brand{position:relative}
|
|
@@ -6268,6 +6272,7 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
6268
6272
|
#canvasPanel .cvs-header span{font-family:var(--mono);color:var(--green);font-size:12px}
|
|
6269
6273
|
#canvasPanel .cvs-header button{background:none;border:none;color:var(--dim);cursor:pointer;font-size:14px;margin-left:8px}
|
|
6270
6274
|
#canvasPanel iframe{flex:1;border:none;background:#fff;min-height:350px;width:100%}
|
|
6275
|
+
@media(max-width:600px){#canvasPanel{top:0;right:0;left:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border-left:none;border-right:none}}
|
|
6271
6276
|
.msg--thinking{color:var(--dim);font-style:italic}
|
|
6272
6277
|
.tool-indicator{display:inline-block;padding:2px 8px;margin:2px 0;border-radius:4px;font-size:11px;background:var(--bg3);border:1px solid var(--border)}
|
|
6273
6278
|
.tool-indicator--browser{border-color:#9c27b0;color:#ce93d8}
|
|
@@ -6440,6 +6445,17 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
6440
6445
|
.studio-header{margin-bottom:20px}
|
|
6441
6446
|
.studio-header h2{font-size:15px;color:var(--green);margin-bottom:4px}
|
|
6442
6447
|
.studio-header p{font-size:11px;color:var(--dim);line-height:1.5}
|
|
6448
|
+
.studio-sidebar{display:flex;flex-direction:column;gap:12px;width:220px;flex-shrink:0;position:sticky;top:16px;align-self:flex-start}
|
|
6449
|
+
.studio-sidebar-toggle{display:none}
|
|
6450
|
+
@media(max-width:600px){
|
|
6451
|
+
#studioMainRow{flex-direction:column}
|
|
6452
|
+
.studio-sidebar{position:fixed;top:0;right:0;bottom:0;width:260px;max-width:85vw;background:var(--bg2);border-left:1px solid var(--border);z-index:500;padding:16px 12px;overflow-y:auto;transform:translateX(110%);transition:transform .3s cubic-bezier(.4,0,.2,1);box-shadow:-4px 0 24px rgba(0,0,0,.4);flex-shrink:0}
|
|
6453
|
+
.studio-sidebar--open{transform:translateX(0)}
|
|
6454
|
+
.studio-sidebar-toggle{display:flex;align-items:center;gap:6px;margin-bottom:12px;padding:8px 14px;background:var(--bg3);border:1px solid var(--border2);border-radius:8px;color:var(--cyan);font-size:12px;font-weight:600;cursor:pointer;width:100%;justify-content:center}
|
|
6455
|
+
.studio-header p{display:none}
|
|
6456
|
+
.studio-input-row{flex-direction:column}
|
|
6457
|
+
.studio-input-row textarea{min-height:72px;font-size:13px}
|
|
6458
|
+
}
|
|
6443
6459
|
.studio-input-row{display:flex;gap:8px;margin-bottom:16px;align-items:flex-start}
|
|
6444
6460
|
.studio-input-row textarea{flex:1;resize:vertical;min-height:90px;max-height:200px;padding:10px 14px;font-size:13px;border-radius:var(--r);border:1px solid var(--border2);line-height:1.5}
|
|
6445
6461
|
.studio-input-row textarea:focus{border-color:var(--green3)}
|
|
@@ -6756,7 +6772,7 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
6756
6772
|
<div class="app">
|
|
6757
6773
|
<nav class="sidebar" id="sidebar"></nav>
|
|
6758
6774
|
|
|
6759
|
-
<button onclick="openSidebar()" style="position:fixed;
|
|
6775
|
+
<button onclick="openSidebar()" style="position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:100;background:var(--bg2);border:1px solid var(--green3);border-radius:24px;color:var(--green);font-size:13px;font-weight:700;padding:8px 20px;cursor:pointer;line-height:1;box-shadow:0 2px 12px rgba(0,0,0,.5);letter-spacing:.3px" id="mobileBurger">☰ Menu</button>
|
|
6760
6776
|
|
|
6761
6777
|
<div class="content" id="content"></div>
|
|
6762
6778
|
|