nothumanallowed 11.1.0 → 11.1.1
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/constants.mjs +1 -1
- package/src/services/tool-executor.mjs +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 53 tools. Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, GitHub, Notion, Slack, voice chat, 28 languages. 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 = '11.1.
|
|
8
|
+
export const VERSION = '11.1.1';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -1181,7 +1181,11 @@ export async function executeTool(action, params, config) {
|
|
|
1181
1181
|
const result = await be.browserOpen(url, {
|
|
1182
1182
|
waitForLoad: params.waitForLoad !== false,
|
|
1183
1183
|
});
|
|
1184
|
-
if (result.error)
|
|
1184
|
+
if (result.error) {
|
|
1185
|
+
// Navigate to blank to prevent stale screenshots from previous page
|
|
1186
|
+
try { await be.browserOpen('about:blank', { waitForLoad: false }); } catch {}
|
|
1187
|
+
return `Browser error: ${result.message}`;
|
|
1188
|
+
}
|
|
1185
1189
|
|
|
1186
1190
|
return `Page loaded: "${result.title}"\nURL: ${result.url}`;
|
|
1187
1191
|
}
|
|
@@ -1190,6 +1194,12 @@ export async function executeTool(action, params, config) {
|
|
|
1190
1194
|
const be = await import('./browser-engine.mjs');
|
|
1191
1195
|
if (!be.isBrowserRunning()) return 'No browser open. Use browser_open first.';
|
|
1192
1196
|
|
|
1197
|
+
// Check current URL — don't screenshot blank or error pages
|
|
1198
|
+
const currentInfo = await be.browserInfo();
|
|
1199
|
+
if (currentInfo.url === 'about:blank' || !currentInfo.url || currentInfo.url === '') {
|
|
1200
|
+
return 'No page loaded in browser. Use browser_open to navigate to a page first.';
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1193
1203
|
// Scroll to top before screenshot so user sees the most important content
|
|
1194
1204
|
await be.browserScroll({ direction: 'top' });
|
|
1195
1205
|
await new Promise(r => setTimeout(r, 300));
|