nothumanallowed 9.4.7 → 9.4.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "9.4.7",
3
+ "version": "9.4.9",
4
4
  "description": "NotHumanAllowed — 38 AI agents + 58 tools + browser automation + web search. Streaming chat, headless Chrome CDP, multi-conversation, export. Gmail, Calendar, Drive, GitHub, Notion, Slack. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1229,8 +1229,18 @@ export async function cmdUI(args) {
1229
1229
  const { textParts, actions } = parseActions(fullResponse);
1230
1230
  const toolResults = [];
1231
1231
 
1232
- // Auto-detect screenshot intent from user message
1232
+ // Auto-detect search + screenshot intent from user message
1233
1233
  const wantsScreenshot = /screenshot|screen\s*shot|schermo|cattura|foto|immagine/i.test(msg);
1234
+ const wantsSearch = /\b(cerca|search|find|look\s*up|ricerca|cercare)\b/i.test(msg);
1235
+
1236
+ // If user asked to search but LLM didn't call web_search, force it
1237
+ if (wantsSearch && !actions.some(a => a.action === 'web_search')) {
1238
+ // Extract search query from message (remove action words)
1239
+ const searchQuery = msg.replace(/\b(cerca|search|find|look\s*up|ricerca|cercare|e\s+fai|and\s+take|screenshot|screen\s*shot|schermo|cattura|foto|immagine|dei|dei\s+risultati|of\s+the\s+results|risultati|results)\b/gi, '').replace(/["""]/g, '').trim();
1240
+ if (searchQuery.length > 2) {
1241
+ actions.push({ action: 'web_search', params: { query: searchQuery, screenshot: wantsScreenshot } });
1242
+ }
1243
+ }
1234
1244
 
1235
1245
  for (const { action, params } of actions) {
1236
1246
  // Force screenshot=true on web_search if user asked for screenshot
@@ -1296,6 +1306,7 @@ export async function cmdUI(args) {
1296
1306
  }
1297
1307
 
1298
1308
  // If the tool produced a screenshot (web_search with screenshot=true), send it via SSE
1309
+ console.log(` [debug] action=${action} resultStr.length=${resultStr.length} hasScreenshot=${resultStr.includes('[Screenshot')} last80=${resultStr.slice(-80)}`);
1299
1310
  if (resultStr.includes('[Screenshot of results captured')) {
1300
1311
  try {
1301
1312
  const fileMatch = resultStr.match(/file:(ss-\d+\.jpg)/);
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 = '9.4.7';
8
+ export const VERSION = '9.4.9';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11