nothumanallowed 13.5.6 → 13.5.7

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.6",
3
+ "version": "13.5.7",
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.6';
8
+ export const VERSION = '13.5.7';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3908,11 +3908,13 @@ function renderStudioNodes() {
3908
3908
  el.innerHTML =
3909
3909
  \x27<div class="prl-wrap" style="border-color:\x27+phaseColor2+\x2744;padding-bottom:8px">\x27+
3910
3910
  \x27<div class="prl-header"><span class="prl-phase-chip" style="--pc:\x27+phaseColor2+\x27">\x27+phaseLabel2+\x27</span></div>\x27+
3911
- \x27<div class="iso-scene" style="position:relative;width:\x27+SCENE_W+\x27px;height:\x27+SCENE_H+\x27px;overflow:hidden;border-radius:10px">\x27+
3911
+ \x27<div style="display:flex;justify-content:center;width:100%;overflow-x:auto">\x27+
3912
+ \x27<div class="iso-scene" style="position:relative;width:\x27+SCENE_W+\x27px;min-width:\x27+SCENE_W+\x27px;height:\x27+SCENE_H+\x27px;overflow:hidden;border-radius:10px">\x27+
3912
3913
  isoFloorSvg(ISO_COLS + 2, 4)+
3913
3914
  agentsHtml+
3914
3915
  orchHtml+
3915
3916
  \x27</div>\x27+
3917
+ \x27</div>\x27+
3916
3918
  \x27</div>\x27;
3917
3919
  }
3918
3920
 
@@ -4440,7 +4442,7 @@ async function runStudio() {
4440
4442
  nudge = document.createElement(\x27div\x27);
4441
4443
  nudge.id = \x27studioParliamentNudge\x27;
4442
4444
  nudge.style.cssText = \x27margin:8px 0;padding:8px 12px;background:#1a1a2e;border:1px solid #6366f1;border-radius:8px;font-size:11px;color:#a5b4fc;display:flex;align-items:center;gap:10px\x27;
4443
- nudge.innerHTML = \x27&#x2656; <span><strong>Suggerimento:</strong> questo workflow ha \x27 + specialistAgents.length + \x27 agenti specialisti — attiva <strong>Parlamento</strong> per un confronto critico tra le loro analisi.</span><button onclick="document.getElementById(\\\x27studioParliamentMode\\\x27).checked=true;studioState.parliamentMode=true;this.parentNode.remove()" style="margin-left:auto;background:#6366f1;border:none;border-radius:6px;color:#fff;padding:4px 10px;cursor:pointer;font-size:10px;white-space:nowrap">Attiva &#x2656;</button>\x27;
4445
+ nudge.innerHTML = \x27&#x1f4bc; <span><strong>Suggerimento:</strong> questo workflow ha \x27 + specialistAgents.length + \x27 agenti specialisti — attiva il <strong>Consiglio</strong> per un confronto critico tra le loro analisi.</span><button onclick="document.getElementById(\\\x27studioParliamentMode\\\x27).checked=true;studioState.parliamentMode=true;this.parentNode.remove()" style="margin-left:auto;background:#6366f1;border:none;border-radius:6px;color:#fff;padding:4px 10px;cursor:pointer;font-size:10px;white-space:nowrap">Attiva &#x1f4bc;</button>\x27;
4444
4446
  var tokenBar = document.getElementById(\x27studioTokenBar\x27);
4445
4447
  if (tokenBar && tokenBar.parentNode) tokenBar.parentNode.insertBefore(nudge, tokenBar.parentNode.firstChild);
4446
4448
  }
@@ -4511,10 +4513,10 @@ async function runStudio() {
4511
4513
  proposals.push({agent: \x27Context\x27, label: \x27Contesto workflow\x27, output: context});
4512
4514
  }
4513
4515
  if (proposals.length >= 2) {
4514
- studioLog(\x27Parlamento\x27, \x27&#x2656;\x27, \x27Avvio deliberazioneRound 2 cross-reading tra agenti...\x27, \x27system\x27);
4515
- // Add Parliament node to pipeline visual
4516
+ studioLog(\x27Consiglio\x27, \x27&#x1f4bc;\x27, \x27Avvio Consigliogli agenti si riuniscono per confrontare e raffinare i risultati...\x27, \x27system\x27);
4517
+ // Add Consiglio node to pipeline visual
4516
4518
  var parlNodeIdx = studioState.nodes.length;
4517
- studioState.nodes.push({icon:\x27&#x2656;\x27, agent:\x27Parliament\x27, label:\x27Parlamento\x27, status:\x27running\x27, output:\x27\x27, _rendered:false});
4519
+ studioState.nodes.push({icon:\x27&#x1f4bc;\x27, agent:\x27Consiglio\x27, label:\x27Consiglio\x27, status:\x27running\x27, output:\x27\x27, _rendered:false});
4518
4520
  renderStudioNodes();
4519
4521
 
4520
4522
  // ── Parliament visual block ──────────────────────────────────────
@@ -4532,10 +4534,10 @@ async function runStudio() {
4532
4534
 
4533
4535
  var phaseColor = {r1:\x27#6366f1\x27,r2:\x27#22d3ee\x27,r3:\x27#f59e0b\x27,done:\x27#22c55e\x27}[phase]||\x27#6366f1\x27;
4534
4536
  var phaseLabel = {
4535
- r1:\x27Round 1 \u2014 Ogni agente analizza\x27,
4536
- r2:\x27Round 2 \u2014 Cross-reading e raffinamento\x27,
4537
- r3:\x27Round 3 \u2014 HERALD media le divergenze\x27,
4538
- done:\x27Deliberazione completata\x27
4537
+ r1:\x27Consiglio \u2014 Analisi individuale\x27,
4538
+ r2:\x27Consiglio \u2014 Confronto e raffinamento\x27,
4539
+ r3:\x27Consiglio \u2014 Sintesi finale HERALD\x27,
4540
+ done:\x27Consiglio concluso \u2014 consenso raggiunto\x27
4539
4541
  }[phase]||\x27\x27;
4540
4542
  var n = proposals.length;
4541
4543
  var doneCount = Object.keys(parlDoneAgents).length;
@@ -4646,7 +4648,7 @@ async function runStudio() {
4646
4648
  var orchHtml = \x27<div class="br-orch" id="brOrch">\x27+
4647
4649
  \x27<div class="br-orch-speech" id="brOrchSpeech"></div>\x27+
4648
4650
  orchSvg+
4649
- \x27<div class="br-orch-label">Orchestratore</div>\x27+
4651
+ \x27<div class="br-orch-label">NHA Studio</div>\x27+
4650
4652
  \x27</div>\x27;
4651
4653
 
4652
4654
  // Phase indicator + progress
@@ -4685,17 +4687,17 @@ async function runStudio() {
4685
4687
  if (convEl && convergence != null) {
4686
4688
  convEl.style.display = \x27block\x27;
4687
4689
  convEl.innerHTML = \x27<div class="br-conv-bar-outer"><div class="br-conv-bar-inner" style="width:\x27+Math.min(convergence,100)+\x27%"></div></div>\x27+
4688
- \x27<div class="br-conv-text"><strong>\u2714 Convergenza \x27+convergence+\x27%</strong> \u2014 HERALD ha sintetizzato il consenso finale.</div>\x27;
4690
+ \x27<div class="br-conv-text"><strong>\u2714 Convergenza: \x27+convergence+\x27%</strong> \u2014 Il Consiglio ha raggiunto il consenso. HERALD ha sintetizzato il risultato finale.</div>\x27;
4689
4691
  }
4690
4692
 
4691
4693
  // Orchestrator speech bubble
4692
4694
  var orchSpeech = document.getElementById(\x27brOrchSpeech\x27);
4693
4695
  if (orchSpeech) {
4694
4696
  var orchSpeeches = {
4695
- r1: [\x27Analizzate!\x27,\x27Al lavoro!\x27,\x27Forza!\x27,\x27Pensate!\x27],
4696
- r2: [\x27Confrontate!\x27,\x27Leggete tutto!\x27,\x27Raffinare!\x27,\x27Scambiate!\x27],
4697
- r3: [\x27Mediazione!\x27,\x27Convergete!\x27,\x27Trovate accordo!\x27],
4698
- done: [\x27Ottimo!\x27,\x27Consenso!\x27,\x27Bene!\x27]
4697
+ r1: [\x27Analisi in corso...\x27,\x27Ogni team al lavoro\x27,\x27Raccolta dati\x27,\x27Prima bozza...\x27],
4698
+ r2: [\x27Confronto in corso\x27,\x27Cross-review...\x27,\x27Raffinamento\x27,\x27Scambio idee\x27],
4699
+ r3: [\x27Sintesi finale\x27,\x27Convergenza...\x27,\x27Accordo in vista\x27],
4700
+ done: [\x27Consiglio concluso\x27,\x27Consenso raggiunto\x27,\x27Report pronto\x27]
4699
4701
  };
4700
4702
  var spArr = orchSpeeches[phase] || orchSpeeches.r1;
4701
4703
  if (phase === \x27done\x27) {
@@ -4716,6 +4718,42 @@ async function runStudio() {
4716
4718
  orchEl.style.setProperty(\x27--oc\x27, phaseColor);
4717
4719
  }
4718
4720
 
4721
+ // Draw attention line from orchestrator to active agent seat
4722
+ var orchEl2 = document.getElementById(\x27brOrch\x27);
4723
+ var brRoom2 = orchEl2 ? orchEl2.closest(\x27.br-room\x27) : null;
4724
+ if (brRoom2) {
4725
+ var existLine = brRoom2.querySelector(\x27.br-attention-line\x27);
4726
+ if (existLine) existLine.parentNode.removeChild(existLine);
4727
+ if (activeLabel && phase !== \x27done\x27) {
4728
+ var aLblSafe = activeLabel.replace(/[^a-zA-Z0-9_-]/g,\x27_\x27);
4729
+ var activeSeatEl = document.getElementById(\x27brseat_\x27+aLblSafe);
4730
+ if (activeSeatEl && orchEl2) {
4731
+ var roomRect = brRoom2.getBoundingClientRect();
4732
+ var orchRect = orchEl2.getBoundingClientRect();
4733
+ var seatRect = activeSeatEl.getBoundingClientRect();
4734
+ var x1 = orchRect.left + orchRect.width/2 - roomRect.left;
4735
+ var y1 = orchRect.top + orchRect.height/2 - roomRect.top;
4736
+ var x2 = seatRect.left + seatRect.width/2 - roomRect.left;
4737
+ var y2 = seatRect.top + seatRect.height/2 - roomRect.top;
4738
+ var lineSvg = document.createElementNS(\x27http://www.w3.org/2000/svg\x27, \x27svg\x27);
4739
+ lineSvg.setAttribute(\x27class\x27, \x27br-attention-line\x27);
4740
+ lineSvg.style.cssText = \x27position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10;overflow:visible\x27;
4741
+ var lineEl = document.createElementNS(\x27http://www.w3.org/2000/svg\x27, \x27line\x27);
4742
+ lineEl.setAttribute(\x27x1\x27, String(Math.round(x1)));
4743
+ lineEl.setAttribute(\x27y1\x27, String(Math.round(y1)));
4744
+ lineEl.setAttribute(\x27x2\x27, String(Math.round(x2)));
4745
+ lineEl.setAttribute(\x27y2\x27, String(Math.round(y2)));
4746
+ lineEl.setAttribute(\x27stroke\x27, \x27#6366f1\x27);
4747
+ lineEl.setAttribute(\x27stroke-width\x27, \x272\x27);
4748
+ lineEl.setAttribute(\x27stroke-dasharray\x27, \x276 4\x27);
4749
+ lineEl.setAttribute(\x27opacity\x27, \x27.6\x27);
4750
+ lineEl.style.animation = \x27brDashFlow 1s linear infinite\x27;
4751
+ lineSvg.appendChild(lineEl);
4752
+ brRoom2.appendChild(lineSvg);
4753
+ }
4754
+ }
4755
+ }
4756
+
4719
4757
  // Update each agent seat state
4720
4758
  proposals.forEach(function(prop) {
4721
4759
  var lbl = prop.label || prop.agent;
@@ -5198,7 +5236,7 @@ async function runStudio() {
5198
5236
  if (r2StartM) {
5199
5237
  var r2Label = r2StartM[1];
5200
5238
  parlActiveAgent = r2Label;
5201
- studioLog(r2Label, \x27&#x2656;\x27, \x27\x27, \x27agent\x27, false);
5239
+ studioLog(r2Label, \x27&#x1f4bc;\x27, \x27\x27, \x27agent\x27, false);
5202
5240
  var delEnts2 = document.querySelectorAll(\x27.studio-log-entry\x27);
5203
5241
  var delL2 = delEnts2[delEnts2.length - 1];
5204
5242
  if (delL2) {
@@ -5232,10 +5270,25 @@ async function runStudio() {
5232
5270
  var delEntries = document.querySelectorAll(\x27.studio-log-entry\x27);
5233
5271
  var delLast = delEntries[delEntries.length - 1];
5234
5272
  if (delLast) { var delTb = delLast.querySelector(\x27.studio-log-entry__text\x27); if (delTb) delTb.textContent = dev.token.replace(new RegExp(\x27[\\r\\n]+\x27,\x27g\x27),\x27 \x27); }
5273
+ // Mirror live token to the active agent boardroom bubble
5274
+ if (parlActiveAgent) {
5275
+ var brSafe2 = parlActiveAgent.replace(new RegExp(\x27[^a-zA-Z0-9_-]\x27,\x27g\x27),\x27_\x27);
5276
+ var brLiveBubble = document.getElementById(\x27brbubble_\x27+brSafe2);
5277
+ if (brLiveBubble) {
5278
+ var rawTok = dev.token.replace(new RegExp(\x27[\\r\\n]+\x27,\x27g\x27),\x27 \x27);
5279
+ var safeTok = rawTok.replace(/&/g,\x27&amp;\x27).replace(/</g,\x27&lt;\x27).replace(/>/g,\x27&gt;\x27);
5280
+ var truncTok = rawTok.length > 60 ? rawTok.slice(-60) : rawTok;
5281
+ var safeTrunc = truncTok.replace(/&/g,\x27&amp;\x27).replace(/</g,\x27&lt;\x27).replace(/>/g,\x27&gt;\x27);
5282
+ brLiveBubble.style.display = \x27\x27;
5283
+ brLiveBubble.innerHTML = safeTrunc + \x27<span style="display:inline-block;width:2px;height:8px;background:var(--green);margin-left:1px;vertical-align:text-bottom;animation:streamBlink .7s step-end infinite">&#8203;</span>\x27;
5284
+ brLiveBubble.style.borderColor = \x27#6366f1\x27;
5285
+ brLiveBubble.style.color = \x27#a5b4fc\x27;
5286
+ }
5287
+ }
5235
5288
  }
5236
5289
  } else if (dev.deliberation_r2) {
5237
5290
  var r2d = dev.deliberation_r2;
5238
- studioLog(r2d.label || r2d.agent, \x27&#x2656;\x27, \x27[R2] \x27 + (r2d.output || \x27\x27), \x27agent\x27, true);
5291
+ studioLog(r2d.label || r2d.agent, \x27&#x1f4bc;\x27, \x27[Consiglio R2] \x27 + (r2d.output || \x27\x27), \x27agent\x27, true);
5239
5292
  var ni2 = studioState.nodes.findIndex(function(x){return x.agent===r2d.agent;});
5240
5293
  if (ni2 >= 0) { studioState.nodes[ni2].output = r2d.output; studioState.nodes[ni2].status = \x27done\x27; }
5241
5294
  studioAddTokens(0, Math.ceil((r2d.output||'').length / 4));
@@ -5252,12 +5305,12 @@ async function runStudio() {
5252
5305
  context = dev.deliberation_r3.output || context;
5253
5306
  } else if (dev.deliberation_done) {
5254
5307
  var r2Conv = Math.round((dev.r2_convergence || 0) * 100);
5255
- studioLog(\x27Parlamento\x27, \x27&#x2656;\x27, \x27Deliberazione completa — convergenza R2: \x27 + r2Conv + \x27%\x27, \x27system\x27);
5308
+ studioLog(\x27Consiglio\x27, \x27&#x1f4bc;\x27, \x27Consiglio concluso — convergenza R2: \x27 + r2Conv + \x27%\x27, \x27system\x27);
5256
5309
  if (dev.mediation) { context = dev.mediation; }
5257
5310
  renderParlBlock(\x27done\x27, null, r2Conv);
5258
5311
  if (studioState.nodes[parlNodeIdx]) {
5259
5312
  studioState.nodes[parlNodeIdx].status = \x27done\x27;
5260
- studioState.nodes[parlNodeIdx].label = \x27Parlamento (\x27 + r2Conv + \x27%)\x27;
5313
+ studioState.nodes[parlNodeIdx].label = \x27Consiglio (\x27 + r2Conv + \x27%)\x27;
5261
5314
  renderStudioNodes();
5262
5315
  }
5263
5316
  delDone = true;
@@ -5270,7 +5323,7 @@ async function runStudio() {
5270
5323
  }
5271
5324
  } catch(e3) {
5272
5325
  if (e3.name !== \x27AbortError\x27) {
5273
- studioLog(\x27Parlamento\x27, \x27&#x2656;\x27, \x27Deliberazione non disponibile: \x27 + (e3.message || String(e3)), \x27error\x27);
5326
+ studioLog(\x27Consiglio\x27, \x27&#x1f4bc;\x27, \x27Consiglio non disponibile: \x27 + (e3.message || String(e3)), \x27error\x27);
5274
5327
  // Do NOT hide the parliament block if it already has content — user is watching it
5275
5328
  }
5276
5329
  }
@@ -5341,7 +5394,9 @@ function saveStudioSession(task, nodes, log, result) {
5341
5394
  var sessions = JSON.parse(localStorage.getItem('nha_studio_sessions') || '[]');
5342
5395
  // Save parliament block HTML if present (static snapshot — animations not needed on restore)
5343
5396
  var parlEl = document.getElementById('studioParliamentBlock');
5344
- var parlHtml = (parlEl && parlEl.style.display !== 'none') ? parlEl.innerHTML : null;
5397
+ var parlRaw = (parlEl && parlEl.style.display !== 'none') ? parlEl.innerHTML : null;
5398
+ // Limit parlHtml to 30KB to avoid localStorage quota issues
5399
+ var parlHtml = parlRaw ? (parlRaw.length > 30000 ? parlRaw.slice(0, 30000) : parlRaw) : null;
5345
5400
  sessions.unshift({
5346
5401
  id: Date.now(),
5347
5402
  task: task,
@@ -5352,8 +5407,14 @@ function saveStudioSession(task, nodes, log, result) {
5352
5407
  log: log.map(function(e){return {agent:e.agent,icon:e.icon,text:e.text,type:e.type,time:e.time};}),
5353
5408
  ts: new Date().toLocaleString()
5354
5409
  });
5355
- sessions = sessions.slice(0, 20); // keep last 20
5356
- localStorage.setItem('nha_studio_sessions', JSON.stringify(sessions));
5410
+ sessions = sessions.slice(0, 10); // keep last 10 (save space)
5411
+ try {
5412
+ localStorage.setItem('nha_studio_sessions', JSON.stringify(sessions));
5413
+ } catch(qe) {
5414
+ // Quota exceeded: save without canvas/parlHtml
5415
+ sessions[0].canvas = null; sessions[0].parlHtml = null;
5416
+ try { localStorage.setItem('nha_studio_sessions', JSON.stringify(sessions)); } catch(e2) {}
5417
+ }
5357
5418
  } catch(e) {}
5358
5419
  }
5359
5420
 
@@ -5403,6 +5464,10 @@ function restoreStudioSession(idx) {
5403
5464
  if (s.parlHtml) {
5404
5465
  parlEl.innerHTML = s.parlHtml;
5405
5466
  parlEl.style.display = 'block';
5467
+ // Scroll into view after DOM settles
5468
+ setTimeout(function() {
5469
+ if (parlEl) parlEl.scrollIntoView({behavior: 'smooth', block: 'start'});
5470
+ }, 150);
5406
5471
  } else {
5407
5472
  parlEl.style.display = 'none';
5408
5473
  }
@@ -5779,7 +5844,7 @@ function renderStudio(el) {
5779
5844
  '</div>' +
5780
5845
  '<label style="display:flex;align-items:center;gap:8px;margin-top:8px;cursor:pointer;user-select:none">' +
5781
5846
  '<input type="checkbox" id="studioParliamentMode" style="width:15px;height:15px;accent-color:var(--green3)" ' + (studioState.parliamentMode ? \x27checked\x27 : \x27\x27) + ' onchange="studioState.parliamentMode=this.checked">' +
5782
- '<span style="font-size:12px;color:var(--dim)">&#x2656; <strong style="color:var(--green)">Parlamento</strong> — Round 2 cross-reading tra agenti (2x token)</span>' +
5847
+ '<span style="font-size:12px;color:var(--dim)">&#x1f4bc; <strong style="color:var(--green)">Consiglio</strong> — gli agenti si confrontano dopo aver lavorato in autonomia (2x token)</span>' +
5783
5848
  '</label>' +
5784
5849
  '</div>' +
5785
5850
 
@@ -6424,6 +6489,7 @@ input:focus,textarea:focus{border-color:var(--green3)}
6424
6489
  .br-conv-bar-outer{height:4px;background:#1a2e1a;border-radius:4px;overflow:hidden;margin-bottom:6px}
6425
6490
  .br-conv-bar-inner{height:100%;background:linear-gradient(90deg,#22c55e,#4ade80);border-radius:4px;transition:width .8s ease}
6426
6491
  .br-conv-text{font-size:9px;color:#86efac;line-height:1.55}
6492
+ @keyframes brDashFlow{0%{stroke-dashoffset:20}100%{stroke-dashoffset:0}}
6427
6493
  /* Keep old prl-* classes for workflow (not touched) */
6428
6494
  .prl-wrap{background:#0b0918;border:1.5px solid #6366f1;border-radius:14px;padding:14px 16px 12px;margin-bottom:16px;animation:stNodeIn .35s ease forwards;overflow:hidden}
6429
6495
  @keyframes parlPulse{0%,100%{border-color:#6366f1;box-shadow:none}50%{border-color:#818cf8;box-shadow:0 0 20px rgba(99,102,241,.3)}}