nothumanallowed 15.1.2 → 15.1.3
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/server/routes/studio.mjs +20 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.3",
|
|
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": {
|
|
@@ -286,8 +286,25 @@ Select the optimal agent pipeline. Output ONLY the JSON.`;
|
|
|
286
286
|
const useWebTools = WEB_TOOL_AGENTS.has(agent);
|
|
287
287
|
let webDataBlock = '';
|
|
288
288
|
|
|
289
|
+
// ALWAYS pre-fetch URLs found in the task — every agent needs real data
|
|
290
|
+
const taskUrls = [...(task || '').matchAll(/https?:\/\/[^\s,)]+/gi)].map(m => m[0]);
|
|
291
|
+
if (taskUrls.length > 0 && !webDataBlock) {
|
|
292
|
+
sse({ token: '[Fetching task URLs...]' });
|
|
293
|
+
const urlFetches = await Promise.all(
|
|
294
|
+
taskUrls.slice(0, 3).map(async (url) => {
|
|
295
|
+
sse({ token: `[Fetching: ${url}]` });
|
|
296
|
+
return { url, content: await runFetchUrl(url) };
|
|
297
|
+
})
|
|
298
|
+
);
|
|
299
|
+
const urlBlock = urlFetches.filter(f => f.content).map(f => `### Content from ${f.url}:\n${f.content}`).join('\n\n---\n\n');
|
|
300
|
+
if (urlBlock) {
|
|
301
|
+
webDataBlock = `\n\n## FETCHED WEBSITE CONTENT (THIS IS THE REAL DATA — base your analysis ONLY on this, do NOT invent):\n\n${urlBlock}`;
|
|
302
|
+
}
|
|
303
|
+
sse({ token: '\n' });
|
|
304
|
+
}
|
|
305
|
+
|
|
289
306
|
// Pre-fetch web data BEFORE the LLM call so the model writes with real facts
|
|
290
|
-
if (useWebTools) {
|
|
307
|
+
if (useWebTools && !webDataBlock) {
|
|
291
308
|
sse({ token: '[Raccolta dati web...]' });
|
|
292
309
|
|
|
293
310
|
const queries = extractSearchQueries(task, stepDef?.prompt);
|
|
@@ -461,7 +478,8 @@ function buildKeywordFallback(task, sanitizedTask, hasPdf, pdfName, it) {
|
|
|
461
478
|
|
|
462
479
|
const hasEmail = /email|mail|inbox|posta/i.test(taskLow);
|
|
463
480
|
const hasCalendar = /calendar|agenda|calendari|eventi|schedule/i.test(taskLow);
|
|
464
|
-
const
|
|
481
|
+
const hasUrl = /https?:\/\/[^\s]+/i.test(taskLow);
|
|
482
|
+
const hasSearch = hasUrl || /cerca|search|notizie|news|ultime|latest|web|internet|tendenz|trend|acquista|compra|dove\s+trovare|where\s+to\s+buy|similar|simile|esamina|analizza.*sito|analisi.*sito|sito\s+web/i.test(taskLow);
|
|
465
483
|
const hasCanvas = /html|dashboard|visua|report|grafico|chart/i.test(taskLow);
|
|
466
484
|
const hasGitHub = /github|git\b|issue\b|pull request|\bPR\b/i.test(taskLow);
|
|
467
485
|
const hasSlack = /slack/i.test(taskLow);
|