nothumanallowed 9.3.4 → 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.4",
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.4';
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
 
@@ -1092,10 +1092,25 @@ export async function executeTool(action, params, config) {
1092
1092
 
1093
1093
  // ── Browser Automation ────────────────────────────────────────────
1094
1094
  case 'browser_open': {
1095
- const be = await import('./browser-engine.mjs');
1096
1095
  const url = params.url;
1097
1096
  if (!url) return 'A URL is required.';
1098
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');
1099
1114
  const result = await be.browserOpen(url, {
1100
1115
  waitForLoad: params.waitForLoad !== false,
1101
1116
  });