nothumanallowed 12.1.1 → 12.1.2

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": "12.1.1",
3
+ "version": "12.1.2",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools. 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": {
@@ -1683,6 +1683,28 @@ export async function cmdUI(args) {
1683
1683
  }
1684
1684
  }
1685
1685
 
1686
+ // Auto-correct: if LLM called web_search but query looks like a domain, switch to browser_open
1687
+ for (const a of actions) {
1688
+ if (a.action === 'web_search' && a.params.query) {
1689
+ const q = a.params.query.trim();
1690
+ // Detect domain names: corriere.it, github.com, youtube.com, etc.
1691
+ if (/^[a-zA-Z0-9][a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(q) || /^(https?:\/\/)/.test(q)) {
1692
+ a.action = 'browser_open';
1693
+ a.params = { url: q.startsWith('http') ? q : 'https://' + q };
1694
+ }
1695
+ }
1696
+ }
1697
+
1698
+ // Auto-correct: if user said "visita/vai su/apri/open" + domain but LLM used web_search
1699
+ const visitMatch = msg.match(/(?:visita|vai su|apri|open|go to)\s+([a-zA-Z0-9][a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/i);
1700
+ if (visitMatch && !actions.some(a => a.action === 'browser_open')) {
1701
+ const domain = visitMatch[1];
1702
+ // Remove any web_search that was targeting this domain
1703
+ const wsIdx = actions.findIndex(a => a.action === 'web_search' && a.params.query?.toLowerCase().includes(domain.toLowerCase()));
1704
+ if (wsIdx >= 0) actions.splice(wsIdx, 1);
1705
+ actions.unshift({ action: 'browser_open', params: { url: 'https://' + domain } });
1706
+ }
1707
+
1686
1708
  for (const { action, params } of actions) {
1687
1709
  // Force screenshot=true on web_search if user asked for screenshot
1688
1710
  if (action === 'web_search' && wantsScreenshot && !params.screenshot) {
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 = '12.1.1';
8
+ export const VERSION = '12.1.2';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -445,8 +445,12 @@ TOOLS:
445
445
 
446
446
  RULES:
447
447
  - ABSOLUTE RULE: NEVER LIE. NEVER fabricate, invent, or guess information. If you do not know, say "I don't know." If a tool fails, say it failed. If you cannot see something, say so. Honesty is MORE important than being helpful.
448
- - CRITICAL: For web searches, ALWAYS use web_search — NEVER open Google/Bing/DuckDuckGo in the browser.
449
- - 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).
448
+ - CRITICAL ROUTING RULE browser_open vs web_search:
449
+ * "visita X.com", "vai su X", "apri X.com", "open X", "go to X" ALWAYS use browser_open("https://X.com"). The user wants to SEE a specific website.
450
+ * "cerca X", "search for X", "find X", "look up X" → ALWAYS use web_search. The user wants search results.
451
+ * If the user mentions a SPECIFIC domain name (corriere.it, github.com, youtube.com, etc.) → browser_open, NEVER web_search.
452
+ * NEVER open Google/Bing/DuckDuckGo in the browser — use web_search for searching.
453
+ * web_search is for QUERIES. browser_open is for URLS. If it looks like a website name, it's a URL.
450
454
  - For search/read operations, execute immediately and present results conversationally.
451
455
  - For write/send/delete operations (gmail_send, gmail_reply, gmail_delete, calendar_create, calendar_move, calendar_update, contact_delete, task_done, notify_remind, file_write), DESCRIBE what you're about to do and include the JSON block so the system can ask the user for confirmation.
452
456
  - For schedule_meeting and schedule_draft_email, execute immediately — these are read operations that suggest slots.