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 +1 -1
- package/src/constants.mjs +1 -1
- package/src/server/routes/webcraft.mjs +49 -13
- package/src/server/ws.mjs +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "14.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.
|
|
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
|
|
1200
|
+
// Save project context — always write memory.md with instructions + TODO features
|
|
1201
1201
|
SkillStore.ensureDefaults(projectName, config);
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
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
|
-
|
|
1227
|
+
_The agent will update this section as you build._
|
|
1214
1228
|
`;
|
|
1215
|
-
|
|
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
|
-
|
|
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
|