nothumanallowed 14.4.4 → 14.4.6

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": "14.4.4",
3
+ "version": "14.4.6",
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 = '14.4.4';
8
+ export const VERSION = '14.4.6';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -1197,23 +1197,59 @@ async function runGenerate(config, projectName, description, blocks, authFields,
1197
1197
  ? `Auth fields: ${authFields.map((f) => `${f.label}(${f.type}${f.required ? ',required' : ''})`).join(', ')}`
1198
1198
  : '';
1199
1199
 
1200
- // Save blocks as planned features in memory.md
1200
+ // Save project context always write memory.md with instructions + TODO features
1201
1201
  SkillStore.ensureDefaults(projectName, config);
1202
- if (enabledBlocks.length > 0) {
1203
- const ctxDir = SkillStore.dir(projectName);
1204
- const memPath = path.join(ctxDir, 'memory.md');
1205
- const blockInstructions = `# ${projectName} Project Memory
1206
-
1207
- ## Planned Features (ask the AI agent to implement these one by one)
1208
- ${enabledBlocks.includes('auth') ? `- [ ] **Authentication** (register/login/JWT) — ${authDesc || 'email + password'}\n` : ''}${enabledBlocks.includes('cookieBanner') ? '- [ ] **GDPR Cookie Banner** — consent modal, localStorage tracking\n' : ''}${enabledBlocks.includes('securityMiddleware') ? '- [ ] **Security Middleware** — helmet CSP, rate limiting, CORS\n' : ''}${enabledBlocks.includes('emailVerification') ? '- [ ] **Email Verification** — send verification link, confirm endpoint\n' : ''}
1209
- ## How to implement
1210
- Ask the AI in chat: "Add authentication" or "Add cookie banner" the agent will modify your code.
1202
+ const ctxDir = SkillStore.dir(projectName);
1203
+ const memPath = path.join(ctxDir, 'memory.md');
1204
+ const blockTodos = [
1205
+ enabledBlocks.includes('auth') ? `- [ ] **Authentication** (register/login/JWT) — ${authDesc || 'email + password'}` : '',
1206
+ enabledBlocks.includes('cookieBanner') ? '- [ ] **GDPR Cookie Banner** — consent modal, localStorage tracking' : '',
1207
+ enabledBlocks.includes('securityMiddleware') ? '- [ ] **Security Middleware** helmet CSP, rate limiting, CORS' : '',
1208
+ enabledBlocks.includes('emailVerification') ? '- [ ] **Email Verification** — send verification link, confirm endpoint' : '',
1209
+ ].filter(Boolean);
1210
+ const memContent = `# ${projectName}Project Memory
1211
+
1212
+ ## Description
1213
+ ${description}
1214
+
1215
+ ## Planned Features
1216
+ ${blockTodos.length > 0 ? blockTodos.join('\n') : '_(No features selected — add them via chat)_'}
1217
+
1218
+ ## How to Build (step by step)
1219
+ 1. **Start with the generated base** — the site works immediately
1220
+ 2. **Ask the AI agent** to add features one by one: "Add authentication", "Add a contact form"
1221
+ 3. **Refine the design** in chat: "Make the hero section more modern", "Add dark mode"
1222
+ 4. **Add security** when ready: "Add cookie consent banner", "Harden security headers"
1223
+ 5. **Test with Sandbox** — click ▶ Sandbox to preview your site live
1224
+ 6. **Download ZIP** when done — deploy anywhere
1211
1225
 
1212
1226
  ## Architecture Decisions
1213
- _Add notes here as you build._
1227
+ _The agent will update this section as you build._
1214
1228
  `;
1215
- fs.writeFileSync(memPath, blockInstructions, 'utf-8');
1216
- }
1229
+ fs.writeFileSync(memPath, memContent, 'utf-8');
1230
+
1231
+ // Write anthropic.md / provider.md with useful context
1232
+ const provider = config.llm?.provider || 'nha';
1233
+ const model = config.llm?.model || '';
1234
+ const providerPath = path.join(ctxDir, `${provider}.md`);
1235
+ const providerContent = `# ${provider.toUpperCase()} — ${model || 'Default'}
1236
+
1237
+ ## Project: ${projectName}
1238
+ ## Description: ${description}
1239
+
1240
+ ## Code Style
1241
+ - Modern ES6+: async/await, const/let, arrow functions
1242
+ - Express.js backend with middleware stack
1243
+ - Vanilla HTML/CSS/JS frontend (no framework)
1244
+ - Mobile-first responsive CSS
1245
+ - Accessible HTML with semantic tags
1246
+
1247
+ ## Important
1248
+ - Always generate COMPLETE files — no truncation
1249
+ - Use external CSS/JS files, avoid inline scripts >20 lines
1250
+ - Every function must be fully implemented
1251
+ `;
1252
+ fs.writeFileSync(providerPath, providerContent, 'utf-8');
1217
1253
 
1218
1254
  const planPrompt = `Project: ${projectName}
1219
1255
  Description: ${description}
package/src/server/ws.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { createRequire } from 'module';
7
+ import fs from 'fs';
7
8
  import path from 'path';
8
9
  import os from 'os';
9
10
  import { fileURLToPath } from 'url';
@@ -57,9 +58,7 @@ export function setupWebSocket(server) {
57
58
  // Security: ensure cwd is under NHA_DIR or home
58
59
  const home = os.homedir();
59
60
  if (!cwd.startsWith(NHA_DIR) && !cwd.startsWith(home)) cwd = home;
60
- // Ensure dir exists
61
- const fs = await import('fs');
62
- if (!fs.default.existsSync(cwd)) cwd = home;
61
+ if (!fs.existsSync(cwd)) cwd = home;
63
62
 
64
63
  const shell = process.platform === 'win32' ? 'cmd.exe' : (process.env.SHELL || '/bin/sh');
65
64
  const shellArgs = process.platform === 'win32' ? [] : ['-i']; // interactive