nothumanallowed 9.3.3 → 9.3.5

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.3.3",
3
+ "version": "9.3.5",
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": {
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.3.3';
8
+ export const VERSION = '9.3.5';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -270,8 +270,8 @@ TOOLS:
270
270
  47. web_search(query: string, deep?: boolean)
271
271
  Search the web using DuckDuckGo. Returns titles, URLs, and snippets.
272
272
  Set deep=true to also fetch and extract the top 3 pages' full content (slower but more detailed).
273
- Use this when the user asks about current events, recent news, or needs up-to-date information
274
- that you don't have in your training data.
273
+ ALWAYS use this for ANY web search request ("search for X", "find X", "look up X", "cerca X").
274
+ Do NOT open Google/Bing in the browser for searches — use this tool instead. It's faster and never gets blocked.
275
275
 
276
276
  48. fetch_url(url: string)
277
277
  Fetch a web page and extract its text content. SSRF-protected (blocks private IPs, localhost).
@@ -284,6 +284,7 @@ TOOLS:
284
284
  Open a URL in a headless Chrome browser. Launches Chrome automatically on first use.
285
285
  SSRF-protected (blocks private IPs, localhost). Renders JavaScript, SPAs, and dynamic pages.
286
286
  Use this when you need to interact with a page (click, type, screenshot) or when fetch_url fails on JS-rendered content.
287
+ WARNING: Do NOT use this to search the web — use web_search instead. Google/Bing block automated browsers with CAPTCHAs.
287
288
 
288
289
  50. browser_screenshot(fullPage?: boolean, format?: "png"|"jpeg"|"webp", quality?: number, saveTo?: string)
289
290
  Capture a screenshot of the current browser page.
@@ -330,6 +331,7 @@ TOOLS:
330
331
  Close the browser. Frees resources. Browser auto-closes when NHA exits.
331
332
 
332
333
  RULES:
334
+ - CRITICAL: For web searches ("search for X", "find X online", "look up X"), ALWAYS use web_search — NEVER open Google/Bing/DuckDuckGo in the browser. web_search is faster, more reliable, and doesn't get blocked by CAPTCHAs. Only use browser_open for interacting with specific websites (filling forms, clicking buttons, taking screenshots of specific pages).
333
335
  - For search/read operations, execute immediately and present results conversationally.
334
336
  - For write/send/delete operations (gmail_send, gmail_reply, gmail_delete, calendar_create, calendar_move, calendar_update, contact_delete, task_done, notify_remind), DESCRIBE what you're about to do and include the JSON block so the system can ask the user for confirmation.
335
337
  - For schedule_meeting and schedule_draft_email, execute immediately — these are read operations that suggest slots.
@@ -1090,10 +1092,25 @@ export async function executeTool(action, params, config) {
1090
1092
 
1091
1093
  // ── Browser Automation ────────────────────────────────────────────
1092
1094
  case 'browser_open': {
1093
- const be = await import('./browser-engine.mjs');
1094
1095
  const url = params.url;
1095
1096
  if (!url) return 'A URL is required.';
1096
1097
 
1098
+ // Intercept search engine URLs — redirect to web_search tool
1099
+ const searchEngines = /^https?:\/\/(www\.)?(google|bing|duckduckgo|yahoo|baidu|yandex)\.(com|it|co\.uk|de|fr|es|org|net)/i;
1100
+ if (searchEngines.test(url)) {
1101
+ // Extract search query if present in URL
1102
+ try {
1103
+ const u = new URL(url);
1104
+ const q = u.searchParams.get('q') || u.searchParams.get('query') || u.searchParams.get('p');
1105
+ if (q) {
1106
+ return `REDIRECT: Use web_search instead. Search engines block automated browsers. Executing web_search for "${q}"...\n\n` +
1107
+ await executeTool('web_search', { query: q }, config);
1108
+ }
1109
+ } catch {}
1110
+ return 'Do NOT open search engines in the browser — they block automated access with CAPTCHAs. Use the web_search tool instead: {"action": "web_search", "params": {"query": "your search terms"}}';
1111
+ }
1112
+
1113
+ const be = await import('./browser-engine.mjs');
1097
1114
  const result = await be.browserOpen(url, {
1098
1115
  waitForLoad: params.waitForLoad !== false,
1099
1116
  });