nothumanallowed 14.4.1 → 14.4.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.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/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.2';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -1031,46 +1031,40 @@ RULES:
|
|
|
1031
1031
|
|
|
1032
1032
|
// ── Generation pipeline (SSE) ─────────────────────────────────────────────────
|
|
1033
1033
|
|
|
1034
|
-
const FILE_PLAN_SYSTEM = `You are
|
|
1035
|
-
Output ONLY a JSON array: [{"name":"path/
|
|
1036
|
-
|
|
1037
|
-
CRITICAL:
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
-
|
|
1041
|
-
-
|
|
1042
|
-
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
-
|
|
1058
|
-
- public/
|
|
1059
|
-
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
-
|
|
1063
|
-
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
- HTML pages: use <script src="js/page.js"> and <link href="css/page.css"> — NOT inline
|
|
1069
|
-
- CSS: one file per concern (max 150 lines each), NOT one giant file
|
|
1070
|
-
- JS: one file per feature (max 150 lines each)
|
|
1071
|
-
- Token estimates must be realistic: CSS files 1500-3000, JS files 1000-2000, HTML pages 2000-4000
|
|
1072
|
-
- Use relative paths only
|
|
1073
|
-
- No explanation, no markdown, ONLY the JSON array.`;
|
|
1034
|
+
const FILE_PLAN_SYSTEM = `You are a senior architect. Design a MINIMAL but COMPLETE working website.
|
|
1035
|
+
Output ONLY a JSON array: [{"name":"path/file.ext","purpose":"description","tokens":N}]
|
|
1036
|
+
|
|
1037
|
+
CRITICAL RULES:
|
|
1038
|
+
- Generate 8-15 files MAXIMUM — every file must be COMPLETE and WORKING
|
|
1039
|
+
- Each file should be 100-300 lines — substantial but not truncated
|
|
1040
|
+
- Token estimate per file: 500-2000 tokens (no file should need more than 2500)
|
|
1041
|
+
- The generated site must work IMMEDIATELY when you run "node server.js"
|
|
1042
|
+
- Users can add more features later via chat — start with a solid foundation
|
|
1043
|
+
|
|
1044
|
+
REQUIRED FILES:
|
|
1045
|
+
1. package.json — dependencies (express, helmet, cors, compression, morgan, bcryptjs, jsonwebtoken, dotenv, cookie-parser, express-rate-limit)
|
|
1046
|
+
2. .env.example — environment variables
|
|
1047
|
+
3. server.js — Express server with ALL middleware, routes, and static serving
|
|
1048
|
+
4. public/index.html — COMPLETE landing page (hero, features, footer — all CSS inline in <style>, all JS inline in <script>)
|
|
1049
|
+
5. public/login.html — Login + register page (complete with inline CSS/JS, form validation, API calls)
|
|
1050
|
+
6. public/css/style.css — ONE main stylesheet (variables, reset, layout, components, responsive — everything in one file)
|
|
1051
|
+
7. public/js/app.js — Main JS (SPA routing, auth, API client, dark mode, toasts, form validation)
|
|
1052
|
+
8. middleware/auth.js — JWT authentication middleware
|
|
1053
|
+
9. routes/auth.js — Auth routes (register, login, logout, refresh)
|
|
1054
|
+
10. models/user.js — User model with JSON file storage
|
|
1055
|
+
|
|
1056
|
+
OPTIONAL (only if the project type requires them):
|
|
1057
|
+
- routes/api.js — REST API routes for the specific project
|
|
1058
|
+
- public/dashboard.html — Protected dashboard page
|
|
1059
|
+
- Additional pages specific to the project type
|
|
1060
|
+
|
|
1061
|
+
DO NOT generate:
|
|
1062
|
+
- Separate CSS files per component (put everything in style.css)
|
|
1063
|
+
- Separate JS files per feature (put everything in app.js)
|
|
1064
|
+
- README.md, .gitignore (not essential for a working site)
|
|
1065
|
+
- Animation/responsive separate files
|
|
1066
|
+
|
|
1067
|
+
Output ONLY the JSON array, no explanation.`;
|
|
1074
1068
|
|
|
1075
1069
|
// Token counter — approximate based on character count (1 token ≈ 4 chars)
|
|
1076
1070
|
function countTokens(text) {
|
|
@@ -1197,20 +1191,36 @@ function _isSeverelyTruncated(content, filename) {
|
|
|
1197
1191
|
}
|
|
1198
1192
|
|
|
1199
1193
|
async function runGenerate(config, projectName, description, blocks, authFields, emit, abortSignal) {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
.map(([key]) => key)
|
|
1203
|
-
.join(', ');
|
|
1194
|
+
// Blocks → write to memory.md as TODO features (NOT generated now)
|
|
1195
|
+
const enabledBlocks = Object.entries(blocks).filter(([, enabled]) => enabled).map(([key]) => key);
|
|
1204
1196
|
const authDesc = blocks.auth
|
|
1205
1197
|
? `Auth fields: ${authFields.map((f) => `${f.label}(${f.type}${f.required ? ',required' : ''})`).join(', ')}`
|
|
1206
1198
|
: '';
|
|
1207
1199
|
|
|
1200
|
+
// Save blocks as planned features in memory.md
|
|
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.
|
|
1211
|
+
|
|
1212
|
+
## Architecture Decisions
|
|
1213
|
+
_Add notes here as you build._
|
|
1214
|
+
`;
|
|
1215
|
+
fs.writeFileSync(memPath, blockInstructions, 'utf-8');
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1208
1218
|
const planPrompt = `Project: ${projectName}
|
|
1209
1219
|
Description: ${description}
|
|
1210
|
-
${blocksDesc ? `Required blocks: ${blocksDesc}` : ''}
|
|
1211
|
-
${authDesc}
|
|
1212
1220
|
|
|
1213
|
-
Design a COMPLETE
|
|
1221
|
+
Design a MINIMAL but COMPLETE file structure for a working website.
|
|
1222
|
+
Focus on the core: a beautiful landing page, server, and main CSS/JS.
|
|
1223
|
+
The user will add features like auth, cookie banner, etc. later via chat.`;
|
|
1214
1224
|
|
|
1215
1225
|
// Emit immediately so the browser connection stays alive and the UI shows activity
|
|
1216
1226
|
emit({ type: 'processing', msg: 'Planning file structure...' });
|
|
@@ -1290,9 +1300,9 @@ Design a COMPLETE production-ready file structure. Include ALL files needed for
|
|
|
1290
1300
|
})
|
|
1291
1301
|
.join('\n\n');
|
|
1292
1302
|
|
|
1293
|
-
// max_tokens
|
|
1303
|
+
// max_tokens — generous for fewer, more complete files
|
|
1294
1304
|
const estimatedTokens = fileSpec.tokens || 1500;
|
|
1295
|
-
const maxTokens = Math.min(Math.max(estimatedTokens *
|
|
1305
|
+
const maxTokens = Math.min(Math.max(estimatedTokens * 3, 3000), 12000);
|
|
1296
1306
|
|
|
1297
1307
|
const fileSys = `You are a team of 200 senior full-stack developers generating ENTERPRISE-GRADE production code.
|
|
1298
1308
|
|
|
@@ -1332,8 +1342,6 @@ FRONTEND STANDARDS:
|
|
|
1332
1342
|
|
|
1333
1343
|
const filePrompt = `Project: ${projectName}
|
|
1334
1344
|
Description: ${description}
|
|
1335
|
-
${blocksDesc ? `Enabled blocks: ${blocksDesc}` : ''}
|
|
1336
|
-
${authDesc}
|
|
1337
1345
|
Full project file list: ${allFileNames}
|
|
1338
1346
|
|
|
1339
1347
|
NOW GENERATE: ${fileSpec.name}
|