nothumanallowed 13.5.196 → 13.5.197
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": "13.5.
|
|
3
|
+
"version": "13.5.197",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). 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": {
|
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 = '13.5.
|
|
8
|
+
export const VERSION = '13.5.197';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -264,16 +264,42 @@ async function callAgentWithTools(config, agentName, userMessage, languageOverri
|
|
|
264
264
|
|
|
265
265
|
// Execute all tools
|
|
266
266
|
const toolResults = [];
|
|
267
|
+
let authError = null;
|
|
267
268
|
for (const { action, params } of actions) {
|
|
268
269
|
try {
|
|
269
270
|
const result = await executeTool(action, params, config);
|
|
270
271
|
const resultStr = typeof result === 'string' ? result : JSON.stringify(result);
|
|
271
272
|
toolResults.push(`[${action}] ${resultStr}`);
|
|
272
273
|
} catch (err) {
|
|
274
|
+
// Detect Google/Microsoft OAuth token expiry — give user a clear fix instruction
|
|
275
|
+
const msg = err.message || '';
|
|
276
|
+
const isAuthErr = /invalid.?credentials|token.*expired|unauthorized|401|invalid_grant|auth.*failed|authentication.*failed/i.test(msg);
|
|
277
|
+
if (isAuthErr) {
|
|
278
|
+
authError = action.startsWith('gmail') || action.startsWith('imap') || action.startsWith('calendar') || action.startsWith('contact') || action.startsWith('drive') || action.startsWith('gtask')
|
|
279
|
+
? 'google' : 'microsoft';
|
|
280
|
+
}
|
|
273
281
|
toolResults.push(`[${action}] Error: ${err.message}`);
|
|
274
282
|
}
|
|
275
283
|
}
|
|
276
284
|
|
|
285
|
+
// If auth error detected, return a user-friendly message immediately — don't pass to LLM
|
|
286
|
+
if (authError === 'google') {
|
|
287
|
+
return {
|
|
288
|
+
text: language === 'Italian'
|
|
289
|
+
? 'Il token Google è scaduto. Esegui questo comando sul tuo computer per rinnovarlo:\n\nnha google auth\n\nDopo il login si rinnova tutto automaticamente.'
|
|
290
|
+
: 'Your Google token has expired. Run this command on your computer to renew it:\n\nnha google auth\n\nAfter logging in everything will work again.',
|
|
291
|
+
history,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (authError === 'microsoft') {
|
|
295
|
+
return {
|
|
296
|
+
text: language === 'Italian'
|
|
297
|
+
? 'Il token Microsoft è scaduto. Esegui:\n\nnha microsoft auth'
|
|
298
|
+
: 'Your Microsoft token has expired. Run:\n\nnha microsoft auth',
|
|
299
|
+
history,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
277
303
|
history.push({ role: 'assistant', content: response });
|
|
278
304
|
userMessage = 'Tool results:\n' + toolResults.join('\n') + '\n\nNow give the user a short, clear confirmation in ' + language + '. Be direct — no preamble, no HERALD format. If an action was completed, say so clearly.';
|
|
279
305
|
}
|