nothumanallowed 16.0.7 → 16.0.8

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": "16.0.7",
3
+ "version": "16.0.8",
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 = '16.0.7';
8
+ export const VERSION = '16.0.8';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -207,6 +207,14 @@ export async function uploadFile(config, name, content, mimeType = 'text/plain',
207
207
 
208
208
  if (!res.ok) {
209
209
  const err = await res.text();
210
+ // Translate the 403 "insufficient scopes" mess into a clear instruction.
211
+ if (res.status === 403 && /insufficient/i.test(err)) {
212
+ throw new Error(
213
+ 'Permessi Google Drive non sufficienti per scrivere file. ' +
214
+ 'Riautorizza con: `nha google auth` (Settings → Google → Authorize). ' +
215
+ 'Da v16.0.8 chiediamo anche lo scope drive.file per creare i file.'
216
+ );
217
+ }
210
218
  throw new Error(`Drive upload ${res.status}: ${err.slice(0, 200)}`);
211
219
  }
212
220
 
@@ -23,6 +23,10 @@ const SCOPES = [
23
23
  'https://www.googleapis.com/auth/calendar.events',
24
24
  'https://www.googleapis.com/auth/drive.readonly',
25
25
  'https://www.googleapis.com/auth/drive.metadata.readonly',
26
+ // drive.file: app può CREARE/MODIFICARE/ELIMINARE solo i file generati
27
+ // dall'app stessa. Principio del privilegio minimo, raccomandato da Google.
28
+ // Necessario per action_drive (workflow AWF), webhook automatic upload, etc.
29
+ 'https://www.googleapis.com/auth/drive.file',
26
30
  'https://www.googleapis.com/auth/contacts',
27
31
  'https://www.googleapis.com/auth/tasks',
28
32
  'https://www.googleapis.com/auth/userinfo.email',