nothumanallowed 15.1.1 → 15.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.mjs +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "15.1.1",
3
+ "version": "15.1.2",
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/cli.mjs CHANGED
@@ -57,7 +57,7 @@ export async function main(argv) {
57
57
  if (result?.updateAvailable) {
58
58
  console.log('');
59
59
  warn(`New NHA version available: ${result.current} → ${result.latest}`);
60
- info('Run "nha update" to upgrade (includes npm self-update).');
60
+ info(`Run "nha update" to upgrade, or: npm cache clean --force && npm install -g nothumanallowed@${result.latest}`);
61
61
  }
62
62
  }).catch(() => {});
63
63
  }
@@ -245,10 +245,15 @@ async function cmdSelfUpdate() {
245
245
 
246
246
  info(`Updating: ${npmCheck.current} → ${npmCheck.latest}`);
247
247
 
248
- // Try without sudo first, then with sudo if needed (Linux/VM)
248
+ // Clear npm cache first to avoid stale versions
249
+ try { execSync('npm cache clean --force 2>/dev/null', { timeout: 15000, stdio: 'ignore' }); } catch {}
250
+ try { execSync('sudo npm cache clean --force 2>/dev/null', { timeout: 15000, stdio: 'ignore' }); } catch {}
251
+
252
+ // Install exact version (not @latest tag which can be stale)
253
+ const target = npmCheck.latest;
249
254
  const cmds = [
250
- 'npm install -g nothumanallowed@latest',
251
- 'sudo npm install -g nothumanallowed@latest',
255
+ `npm install -g nothumanallowed@${target}`,
256
+ `sudo npm install -g nothumanallowed@${target}`,
252
257
  ];
253
258
 
254
259
  for (const cmd of cmds) {