nothumanallowed 13.5.154 → 13.5.156

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.154",
3
+ "version": "13.5.156",
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.154';
8
+ export const VERSION = '13.5.156';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3195,7 +3195,7 @@ function renderSettings(el) {
3195
3195
  ['model', 'Model', 'Leave empty for default'],
3196
3196
  ['thinking', 'Extended Thinking', 'on / off - Qwen3 reasoning mode (NHA Free only)'],
3197
3197
  ]) +
3198
- settingsSection('responder', 'Message Responder', 'Auto-reply to Telegram and Discord messages.', [
3198
+ settingsSection('responder', 'Telegram & Discord Bot', 'Auto-reply to Telegram and Discord messages.', [
3199
3199
  ['telegram-bot-token', 'Telegram Bot Token', 'Get from @BotFather', true],
3200
3200
  ['discord-bot-token', 'Discord Bot Token', 'From Discord Developer Portal', true],
3201
3201
  ]) +
@@ -8844,7 +8844,7 @@ async function wcGenerate() {
8844
8844
  }
8845
8845
 
8846
8846
  var _nl = String.fromCharCode(10);
8847
- var sysPreamble = 'You are an expert full-stack engineer generating production-quality code.' + _nl + _nl + 'SECURITY RULES (non-negotiable):' + _nl + SECURITY_RULES + _nl + _nl + 'Project: ' + projName + _nl + 'Description: ' + desc + _nl + 'Enabled blocks: ' + blocksEnabled + _nl + _nl + 'Generate ONLY the file content requested. No explanations, no markdown code fences, no comments like "here is the file". Output raw file content only.';
8847
+ var sysPreamble = 'You are an expert full-stack engineer generating production-quality code.' + _nl + _nl + 'SECURITY RULES (non-negotiable):' + _nl + SECURITY_RULES + _nl + _nl + 'JSON FILES RULES (non-negotiable):' + _nl + '- NEVER add spaces inside JSON keys or string values that are identifiers (package names, field names).' + _nl + '- package.json "name" must be lowercase with no spaces. All dependency names must match exactly the npm package name (no spaces, no leading/trailing spaces).' + _nl + '- NEVER duplicate dependency entries. Each package name appears exactly once.' + _nl + '- "devDependencies" key has NO trailing space. All JSON keys are exact.' + _nl + _nl + 'Project: ' + projName + _nl + 'Description: ' + desc + _nl + 'Enabled blocks: ' + blocksEnabled + _nl + _nl + 'Generate ONLY the file content requested. No explanations, no markdown code fences, no comments like "here is the file". Output raw file content only.';
8848
8848
  _wcLastFilePlan = filePlan;
8849
8849
  _wcLastSysPreamble = sysPreamble;
8850
8850
 
@@ -8888,7 +8888,27 @@ async function wcGenerate() {
8888
8888
  return part1 + _nl2 + _nl2 + part2;
8889
8889
  }
8890
8890
  var content = await wcCallLLM(sysPreamble, fp.prompt + _nl2 + _nl2 + 'File to generate: ' + fp.name, signal, fp.lang, undefined, onLiveUpdate);
8891
- return wcStripFences(content);
8891
+ content = wcStripFences(content);
8892
+ // Post-process package.json: fix common LLM mistakes (spaces in keys/names, duplicates)
8893
+ if (fp.name === 'package.json' && fp.lang === 'json') {
8894
+ try {
8895
+ var pkg = JSON.parse(content);
8896
+ // Fix name field
8897
+ if (typeof pkg.name === 'string') pkg.name = pkg.name.trim().toLowerCase().replace(/\s+/g, '-');
8898
+ // Fix all dependency sections: strip spaces from keys, deduplicate
8899
+ ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'].forEach(function(section) {
8900
+ if (!pkg[section] || typeof pkg[section] !== 'object') return;
8901
+ var clean = {};
8902
+ Object.keys(pkg[section]).forEach(function(k) {
8903
+ var cleanKey = k.trim();
8904
+ if (cleanKey && !clean[cleanKey]) clean[cleanKey] = pkg[section][k];
8905
+ });
8906
+ pkg[section] = clean;
8907
+ });
8908
+ content = JSON.stringify(pkg, null, 2);
8909
+ } catch(_) { /* if JSON is already broken, leave as-is for repair to handle */ }
8910
+ }
8911
+ return content;
8892
8912
  }
8893
8913
 
8894
8914
  wcStartGenTimer();