nothumanallowed 13.5.189 → 13.5.191
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.
|
|
3
|
+
"version": "13.5.191",
|
|
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.
|
|
8
|
+
export const VERSION = '13.5.191';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/llm.mjs
CHANGED
|
@@ -600,7 +600,7 @@ export async function callLLMStream(config, systemPrompt, userMessage, onToken,
|
|
|
600
600
|
function buildRequestBody(provider, model, systemPrompt, userMessage, stream) {
|
|
601
601
|
if (provider === 'anthropic') {
|
|
602
602
|
return {
|
|
603
|
-
model: model || 'claude-sonnet-4-
|
|
603
|
+
model: model || 'claude-sonnet-4-6',
|
|
604
604
|
max_tokens: 8192,
|
|
605
605
|
system: systemPrompt,
|
|
606
606
|
messages: [{ role: 'user', content: userMessage }],
|
|
@@ -617,7 +617,7 @@ function buildRequestBody(provider, model, systemPrompt, userMessage, stream) {
|
|
|
617
617
|
};
|
|
618
618
|
const req = {
|
|
619
619
|
model: model || modelDefaults[provider] || 'gpt-4o',
|
|
620
|
-
max_tokens:
|
|
620
|
+
max_tokens: 8192,
|
|
621
621
|
messages: [
|
|
622
622
|
{ role: 'system', content: systemPrompt },
|
|
623
623
|
{ role: 'user', content: userMessage },
|
|
@@ -136,7 +136,7 @@ function routeMessage(text, useAutoRoute = true) {
|
|
|
136
136
|
|
|
137
137
|
// ── Language detection from message text ─────────────────────────────────────
|
|
138
138
|
|
|
139
|
-
const IT_WORDS = new Set(['il','lo','la','le','gli','un','una','che','di','da','in','con','su','per','tra','fra','non','ma','se','come','dove','quando','chi','cosa','ho','hai','ha','sono','sei','siamo','avere','essere','fare','dire','andare','mi','ti','ci','si','vi','li','le','gli','mio','tuo','suo','nostro','vostro','loro','questo','quello','questi','quelli','anche','già','ancora','sempre','mai','oggi','domani','ieri','adesso','ora','poi','dopo','prima','qui','qua','lì','là','più','meno','molto','poco','bene','male','sì','no','grazie','prego','ciao','buongiorno','buonasera','appuntamenti','calendario','riunione','meteo','temperatura','email','posta','notizie']);
|
|
139
|
+
const IT_WORDS = new Set(['il','lo','la','le','gli','un','una','che','di','da','in','con','su','per','tra','fra','non','ma','se','come','dove','quando','chi','cosa','ho','hai','ha','sono','sei','siamo','avere','essere','fare','dire','andare','mi','ti','ci','si','vi','li','le','gli','mio','tuo','suo','nostro','vostro','loro','questo','quello','questi','quelli','anche','già','ancora','sempre','mai','oggi','domani','ieri','adesso','ora','poi','dopo','prima','qui','qua','lì','là','più','meno','molto','poco','bene','male','sì','no','grazie','prego','ciao','buongiorno','buonasera','appuntamenti','appuntamento','calendario','riunione','meteo','temperatura','email','posta','notizie','del','dello','della','degli','delle','nel','nello','nella','negli','nelle','dal','dallo','dalla','dagli','dalle','sul','sullo','sulla','sugli','sulle','col','coi','quello','quella','quelli','quelle','cancella','cancellare','elimina','eliminare','crea','creare','sposta','spostare','aggiungi','aggiungere','modifica','modificare','ricerca','trovami','trovare','mostra','mostrami','dimmi','rispondimi','aiutami','puoi','voglio','vorrei','devo','posso','giorno','giorni','mese','mesi','anno','anni','settimana','settimane','ore','minuto','minuti','mattina','pomeriggio','sera','notte','veterinario','medico','dentista','dottore','riunioni','scadenza','scadenze']);
|
|
140
140
|
const ES_WORDS = new Set(['el','la','los','las','un','una','que','de','en','con','por','para','pero','como','donde','cuando','quien','qué','tengo','tienes','tiene','somos','soy','eres','hacer','decir','ir','me','te','se','nos','este','ese','estos','esos','también','ya','todavía','siempre','nunca','hoy','mañana','ayer','aquí','allí','más','menos','muy','bien','mal','sí','no','gracias','hola','buenos']);
|
|
141
141
|
const FR_WORDS = new Set(['le','la','les','un','une','des','que','de','en','avec','pour','par','mais','comme','où','quand','qui','je','tu','il','elle','nous','vous','ils','elles','avoir','être','faire','dire','aller','me','te','se','ce','cet','cette','ces','aussi','déjà','toujours','jamais','aujourd','demain','hier','ici','là','plus','moins','très','bien','mal','oui','non','merci','bonjour','bonsoir']);
|
|
142
142
|
const DE_WORDS = new Set(['der','die','das','ein','eine','und','oder','aber','nicht','mit','für','von','zu','an','auf','ist','sind','hat','haben','sein','werden','ich','du','er','sie','es','wir','ihr','mich','dich','sich','uns','euch','diesem','diesen','dieser','dieses','auch','schon','noch','immer','nie','heute','morgen','gestern','hier','dort','mehr','weniger','sehr','gut','schlecht','ja','nein','danke','hallo']);
|
|
@@ -566,8 +566,7 @@ class TelegramResponder {
|
|
|
566
566
|
if (isVoice) {
|
|
567
567
|
await this._telegramCall('sendMessage', {
|
|
568
568
|
chat_id: chatId,
|
|
569
|
-
text: `🎤
|
|
570
|
-
parse_mode: 'Markdown',
|
|
569
|
+
text: `🎤 "${cleanText}"`,
|
|
571
570
|
}).catch(() => {});
|
|
572
571
|
}
|
|
573
572
|
|
|
@@ -606,11 +605,10 @@ class TelegramResponder {
|
|
|
606
605
|
? response.slice(0, 3950) + '\n\n... [truncated]'
|
|
607
606
|
: response;
|
|
608
607
|
|
|
609
|
-
// Send response as text
|
|
608
|
+
// Send response as plain text — no parse_mode to avoid Markdown entity parse errors
|
|
610
609
|
await this._telegramCall('sendMessage', {
|
|
611
610
|
chat_id: chatId,
|
|
612
611
|
text: `[${agent.toUpperCase()}]\n\n${truncated}`,
|
|
613
|
-
parse_mode: 'Markdown',
|
|
614
612
|
});
|
|
615
613
|
|
|
616
614
|
this.log(`[Telegram] Responded to ${fromUser} via ${agent.toUpperCase()} (${response.length} chars)`);
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -7548,6 +7548,7 @@ var _wcTokIn = 0; // global token counters (accumulate across generat
|
|
|
7548
7548
|
var _wcTokOut = 0;
|
|
7549
7549
|
var _wcGenOverlayState = { fi: 0, total: 0, name: '' };
|
|
7550
7550
|
var _wcGenStartTime = 0;
|
|
7551
|
+
var _wcRepairStartTime = 0;
|
|
7551
7552
|
var _wcTimerInterval = null;
|
|
7552
7553
|
|
|
7553
7554
|
function wcGenElapsed() {
|
|
@@ -7556,14 +7557,29 @@ function wcGenElapsed() {
|
|
|
7556
7557
|
return (m > 0 ? m + 'm ' : '') + s + 's';
|
|
7557
7558
|
}
|
|
7558
7559
|
|
|
7560
|
+
function wcRepairElapsed() {
|
|
7561
|
+
var s = Math.floor((Date.now() - _wcRepairStartTime) / 1000);
|
|
7562
|
+
var m = Math.floor(s / 60); s = s % 60;
|
|
7563
|
+
return (m > 0 ? m + 'm ' : '') + s + 's';
|
|
7564
|
+
}
|
|
7565
|
+
|
|
7559
7566
|
function wcStartGenTimer() {
|
|
7560
7567
|
if (_wcTimerInterval) clearInterval(_wcTimerInterval);
|
|
7561
7568
|
_wcTimerInterval = setInterval(function() {
|
|
7562
7569
|
if (!wcState.running && !wcState.repairing) { clearInterval(_wcTimerInterval); _wcTimerInterval = null; return; }
|
|
7563
7570
|
// Always update time in-place — never re-render the whole component
|
|
7564
|
-
|
|
7571
|
+
if (wcState.running) {
|
|
7572
|
+
wcUpdateGenOverlay(_wcGenOverlayState.fi, _wcGenOverlayState.total, _wcGenOverlayState.name);
|
|
7573
|
+
}
|
|
7565
7574
|
var repairTime = document.getElementById('wcRepairTime');
|
|
7566
|
-
if (repairTime) repairTime.textContent =
|
|
7575
|
+
if (repairTime) repairTime.textContent = wcRepairElapsed();
|
|
7576
|
+
// Live token counters during repair (both in repair bar and left sidebar)
|
|
7577
|
+
var tokEl = document.getElementById('wcLiveTokCounter');
|
|
7578
|
+
if (tokEl) tokEl.textContent = _wcTokIn.toLocaleString() + ' in / ' + _wcTokOut.toLocaleString() + ' out';
|
|
7579
|
+
var leftIn = document.getElementById('wcLeftTokIn');
|
|
7580
|
+
var leftOut = document.getElementById('wcLeftTokOut');
|
|
7581
|
+
if (leftIn) leftIn.textContent = _wcTokIn.toLocaleString();
|
|
7582
|
+
if (leftOut) leftOut.textContent = _wcTokOut.toLocaleString();
|
|
7567
7583
|
}, 1000);
|
|
7568
7584
|
}
|
|
7569
7585
|
|
|
@@ -7727,8 +7743,8 @@ function renderWebCraft(el) {
|
|
|
7727
7743
|
(wcState.repairing ?
|
|
7728
7744
|
'<div style="width:100%;padding:10px 12px;background:rgba(234,179,8,0.08);border:1px solid rgba(234,179,8,0.4);border-radius:8px;display:flex;flex-direction:column;gap:4px">' +
|
|
7729
7745
|
'<div style="display:flex;align-items:center;gap:6px;font-size:11px;color:#facc15;font-weight:600">🔧 Correzione automatica in corso...</div>' +
|
|
7730
|
-
'<div style="font-size:10px;color:var(--dim)">'+wcState.repairDone+' / '+wcState.repairTotal+' file</div>' +
|
|
7731
|
-
|
|
7746
|
+
'<div style="font-size:10px;color:var(--dim)" id="wcLeftRepairProgress">'+wcState.repairDone+' / '+wcState.repairTotal+' file</div>' +
|
|
7747
|
+
'<div style="font-size:10px;color:#fde68a;font-family:var(--mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap" id="wcLeftRepairFile">'+wcEsc(wcState.repairCurrent || '')+'</div>' +
|
|
7732
7748
|
'</div>'
|
|
7733
7749
|
: '') +
|
|
7734
7750
|
(wcState.generatedFiles.length > 0 && !wcState.running ?
|
|
@@ -7742,7 +7758,12 @@ function renderWebCraft(el) {
|
|
|
7742
7758
|
'<button onclick="wcTriggerRepair()" style="width:100%;padding:9px;background:rgba(234,179,8,0.08);border:1px solid rgba(234,179,8,0.5);border-radius:8px;color:#facc15;font-size:11px;font-weight:600;cursor:pointer">🔧 Correggi tutti i file rossi</button>'
|
|
7743
7759
|
: '') +
|
|
7744
7760
|
'<button onclick="wcStartSandbox()" id="wcSandboxBtn" style="width:100%;padding:10px;background:var(--bg3);border:1px solid var(--green3);border-radius:8px;color:var(--green);font-size:12px;font-weight:600;cursor:pointer">▶ '+t('wc_sandbox_start')+'</button>' +
|
|
7745
|
-
(wcState.
|
|
7761
|
+
(wcState.repairing ?
|
|
7762
|
+
'<div style="padding:6px 8px;background:var(--bg3);border:1px solid var(--border);border-radius:6px;font-size:10px;color:var(--dim);font-family:var(--mono);display:flex;flex-wrap:wrap;gap:6px">' +
|
|
7763
|
+
'<span>⇧ <span id="wcLeftTokIn">'+_wcTokIn.toLocaleString()+'</span> tok in</span>' +
|
|
7764
|
+
'<span>⇩ <span id="wcLeftTokOut">'+_wcTokOut.toLocaleString()+'</span> tok out</span>' +
|
|
7765
|
+
'</div>'
|
|
7766
|
+
: wcState.lastGenStats ? '<div style="padding:6px 8px;background:var(--bg3);border:1px solid var(--border);border-radius:6px;font-size:10px;color:var(--dim);font-family:var(--mono);display:flex;flex-wrap:wrap;gap:6px">' +
|
|
7746
7767
|
'<span>⏱ '+(wcState.lastGenStats.seconds >= 60 ? Math.floor(wcState.lastGenStats.seconds/60)+'m '+(wcState.lastGenStats.seconds%60)+'s' : wcState.lastGenStats.seconds+'s')+'</span>' +
|
|
7747
7768
|
'<span>⇧ '+wcState.lastGenStats.tokIn.toLocaleString()+' tok in</span>' +
|
|
7748
7769
|
'<span>⇩ '+wcState.lastGenStats.tokOut.toLocaleString()+' tok out</span>' +
|
|
@@ -7764,6 +7785,8 @@ function renderWebCraft(el) {
|
|
|
7764
7785
|
+'<span style="font-size:10px;font-weight:700;color:#facc15;flex-shrink:0">Auto-fix</span>'
|
|
7765
7786
|
+'<span style="font-size:10px;color:#fde68a;font-family:var(--mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1" id="wcRepairFile">'+wcEsc(wcState.repairCurrent || '')+'</span>'
|
|
7766
7787
|
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcRepairCounter">'+wcState.repairDone+' / '+wcState.repairTotal+'</span>'
|
|
7788
|
+
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcRepairTime">'+wcRepairElapsed()+'</span>'
|
|
7789
|
+
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcLiveTokCounter">'+_wcTokIn.toLocaleString()+' in / '+_wcTokOut.toLocaleString()+' out</span>'
|
|
7767
7790
|
+'<span style="display:flex;gap:3px">'+[0,1,2].map(function(_,idx){ return '<span style="width:4px;height:4px;border-radius:50%;background:#facc15;animation:wcDot 1.1s ease-in-out infinite '+(idx*0.18)+'s"></span>'; }).join('')+'</span>'
|
|
7768
7791
|
+'<button onclick="wcStopRepair()" style="padding:2px 8px;background:rgba(239,68,68,0.15);border:1px solid rgba(239,68,68,0.4);border-radius:4px;color:#f87171;font-size:10px;font-weight:700;cursor:pointer;flex-shrink:0">■ Stop</button>'
|
|
7769
7792
|
+'</div>'
|
|
@@ -9221,10 +9244,12 @@ async function wcAutoRepair(filePlan, sysPreamble) {
|
|
|
9221
9244
|
|
|
9222
9245
|
_wcRepairAbortCtrl = new AbortController();
|
|
9223
9246
|
_wcRepairRunning = true;
|
|
9247
|
+
_wcRepairStartTime = Date.now();
|
|
9224
9248
|
wcState.repairing = true;
|
|
9225
9249
|
wcState.repairTotal = toFix.length;
|
|
9226
9250
|
wcState.repairDone = 0;
|
|
9227
9251
|
renderWebCraft(document.getElementById('content'));
|
|
9252
|
+
wcStartGenTimer();
|
|
9228
9253
|
|
|
9229
9254
|
// Build a map name→plan for prompt lookup
|
|
9230
9255
|
var planMap = {};
|
|
@@ -9330,9 +9355,27 @@ function wcUpdateRepairOverlay() {
|
|
|
9330
9355
|
var counter = document.getElementById('wcRepairCounter');
|
|
9331
9356
|
var fileEl = document.getElementById('wcRepairFile');
|
|
9332
9357
|
var prog = document.getElementById('wcRepairProg');
|
|
9358
|
+
var pct = wcState.repairTotal > 0 ? Math.round((wcState.repairDone / wcState.repairTotal) * 100) : 0;
|
|
9333
9359
|
if (counter) counter.textContent = wcState.repairDone + ' / ' + wcState.repairTotal;
|
|
9334
9360
|
if (fileEl) fileEl.textContent = wcState.repairCurrent;
|
|
9335
|
-
if (prog) prog.style.width =
|
|
9361
|
+
if (prog) prog.style.width = pct + '%';
|
|
9362
|
+
// Bug 1 fix: update left sidebar
|
|
9363
|
+
var leftFile = document.getElementById('wcLeftRepairFile');
|
|
9364
|
+
var leftProgress = document.getElementById('wcLeftRepairProgress');
|
|
9365
|
+
if (leftFile) leftFile.textContent = wcState.repairCurrent;
|
|
9366
|
+
if (leftProgress) leftProgress.textContent = wcState.repairDone + ' / ' + wcState.repairTotal + ' file';
|
|
9367
|
+
// Bug 2 fix: update right file tab highlights
|
|
9368
|
+
var activeIdx = wcState.activeFile;
|
|
9369
|
+
wcState.generatedFiles.forEach(function(f, i) {
|
|
9370
|
+
var tab = document.getElementById('wcTab' + i);
|
|
9371
|
+
if (!tab) return;
|
|
9372
|
+
var hasErr = !!f._error || !!f._syntaxError;
|
|
9373
|
+
var isActive = i === activeIdx;
|
|
9374
|
+
tab.style.background = isActive ? 'var(--bg3)' : 'transparent';
|
|
9375
|
+
tab.style.borderLeft = hasErr ? '2px solid #f87171' : isActive ? '2px solid var(--green3)' : '2px solid transparent';
|
|
9376
|
+
var nameSpan = tab.querySelector('span > span:last-child');
|
|
9377
|
+
if (nameSpan) nameSpan.style.color = hasErr ? '#f87171' : isActive ? 'var(--text)' : 'var(--dim)';
|
|
9378
|
+
});
|
|
9336
9379
|
}
|
|
9337
9380
|
|
|
9338
9381
|
function wcTriggerRepair() {
|