nothumanallowed 13.5.158 → 13.5.159

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.158",
3
+ "version": "13.5.159",
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.158';
8
+ export const VERSION = '13.5.159';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -8951,50 +8951,43 @@ async function wcGenerate() {
8951
8951
  }, 80);
8952
8952
  }
8953
8953
 
8954
- // Generate in parallel batches of 4 each call is independent/fresh to Liara
8955
- // Counter increments 1 per file as it completes, not per batch
8956
- var BATCH = 4;
8954
+ // Generate sequentially one file at a time so every file streams visibly
8955
+ // and the progress bar increments file by file
8957
8956
  var doneCount = 0;
8958
8957
  wcUpdateGenOverlay(0, filePlan.length, '');
8959
- for (var bi = 0; bi < filePlan.length; bi += BATCH) {
8958
+ for (var si = 0; si < filePlan.length; si++) {
8960
8959
  if (_wcGenAbortCtrl && _wcGenAbortCtrl.signal.aborted) break;
8961
- var batch = filePlan.slice(bi, bi + BATCH);
8962
- var results = await Promise.allSettled(batch.map(function(fp, bii) {
8963
- // Point activeFile at the first file of this batch so tokens appear immediately
8964
- if (bii === 0) {
8965
- var firstIdx = wcState.generatedFiles.findIndex(function(f){ return f.name === fp.name; });
8966
- if (firstIdx >= 0) wcState.activeFile = firstIdx;
8967
- }
8968
- // Show file name in overlay as soon as it starts
8969
- wcUpdateGenOverlay(doneCount, filePlan.length, fp.name);
8970
- var liveCallback = function(partial) { wcLiveUpdateFile(fp.name, fp.lang, partial); };
8971
- return wcGenOneFile(fp, _wcGenAbortCtrl ? _wcGenAbortCtrl.signal : null, liveCallback).then(function(c){ return { fp: fp, content: c }; });
8972
- }));
8973
- results.forEach(function(r, ri) {
8974
- var batchIdx = ri;
8975
- if (r.status === 'fulfilled') {
8976
- var fp = r.value.fp;
8977
- for (var gi = 0; gi < wcState.generatedFiles.length; gi++) {
8978
- if (wcState.generatedFiles[gi].name === fp.name) {
8979
- wcState.generatedFiles[gi] = { name: fp.name, content: r.value.content, lang: fp.lang };
8980
- break;
8981
- }
8960
+ var fp = filePlan[si];
8961
+
8962
+ // Switch viewer to this file and show its name in the bar
8963
+ var fileIdx = wcState.generatedFiles.findIndex(function(f){ return f.name === fp.name; });
8964
+ if (fileIdx >= 0) wcState.activeFile = fileIdx;
8965
+ wcUpdateGenOverlay(doneCount, filePlan.length, fp.name);
8966
+
8967
+ var liveCallback = (function(fpCap) {
8968
+ return function(partial) { wcLiveUpdateFile(fpCap.name, fpCap.lang, partial); };
8969
+ }(fp));
8970
+
8971
+ try {
8972
+ var genContent = await wcGenOneFile(fp, _wcGenAbortCtrl ? _wcGenAbortCtrl.signal : null, liveCallback);
8973
+ for (var gi = 0; gi < wcState.generatedFiles.length; gi++) {
8974
+ if (wcState.generatedFiles[gi].name === fp.name) {
8975
+ wcState.generatedFiles[gi] = { name: fp.name, content: genContent, lang: fp.lang };
8976
+ break;
8982
8977
  }
8983
- } else if (r.reason && r.reason.name !== 'AbortError') {
8984
- var fpErr = batch[batchIdx];
8985
- if (fpErr) {
8986
- for (var gi2 = 0; gi2 < wcState.generatedFiles.length; gi2++) {
8987
- if (wcState.generatedFiles[gi2].name === fpErr.name) {
8988
- wcState.generatedFiles[gi2] = { name: fpErr.name, content: '// Error generating this file: ' + (r.reason.message || 'unknown error'), lang: fpErr.lang || '', _error: true };
8989
- break;
8990
- }
8991
- }
8978
+ }
8979
+ } catch(genErr) {
8980
+ if (genErr && genErr.name === 'AbortError') break;
8981
+ for (var gi2 = 0; gi2 < wcState.generatedFiles.length; gi2++) {
8982
+ if (wcState.generatedFiles[gi2].name === fp.name) {
8983
+ wcState.generatedFiles[gi2] = { name: fp.name, content: '// Error generating this file: ' + (genErr && genErr.message || 'unknown error'), lang: fp.lang || '', _error: true };
8984
+ break;
8992
8985
  }
8993
8986
  }
8994
- doneCount++;
8995
- // Update counter immediately on each file completion — no full re-render
8996
- wcUpdateGenOverlay(doneCount, filePlan.length, doneCount < filePlan.length ? (batch[Math.min(batchIdx+1, batch.length-1)] || batch[batchIdx] || {}).name || '' : '');
8997
- });
8987
+ }
8988
+
8989
+ doneCount++;
8990
+ wcUpdateGenOverlay(doneCount, filePlan.length, si + 1 < filePlan.length ? filePlan[si + 1].name : '');
8998
8991
  }
8999
8992
 
9000
8993
  if (_wcTimerInterval) { clearInterval(_wcTimerInterval); _wcTimerInterval = null; }