nothumanallowed 13.5.77 → 13.5.78
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/commands/ui.mjs +6 -5
- package/src/services/web-ui.mjs +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.78",
|
|
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/commands/ui.mjs
CHANGED
|
@@ -4606,17 +4606,18 @@ module.exports = { validateEmail, sanitizeText, validatePassword, validateUserna
|
|
|
4606
4606
|
sendLog(`✅ Sandbox pronta!`);
|
|
4607
4607
|
|
|
4608
4608
|
// Write sandbox log to skills/ so the agent can read it as context
|
|
4609
|
+
// Always overwrite the same file (latest.log) — no accumulation across restarts
|
|
4609
4610
|
try {
|
|
4610
4611
|
const _nl = '\n';
|
|
4611
4612
|
const _now = new Date();
|
|
4612
4613
|
const _pad = n => String(n).padStart(2,'0');
|
|
4613
4614
|
const logTs = _now.getFullYear()+'-'+_pad(_now.getMonth()+1)+'-'+_pad(_now.getDate())+' '+_pad(_now.getHours())+':'+_pad(_now.getMinutes())+':'+_pad(_now.getSeconds());
|
|
4614
|
-
const logName = projName + '-
|
|
4615
|
+
const logName = projName + '-latest.log';
|
|
4615
4616
|
const logsDir = path.join(sandboxDir, 'skills');
|
|
4616
4617
|
fs.mkdirSync(logsDir, { recursive: true });
|
|
4617
|
-
//
|
|
4618
|
-
const
|
|
4619
|
-
|
|
4618
|
+
// Clean up old timestamped log files (migration from previous format)
|
|
4619
|
+
const oldLogs = fs.readdirSync(logsDir).filter(f => f.endsWith('.log') && f.startsWith(projName + '-') && f !== logName);
|
|
4620
|
+
oldLogs.forEach(f => { try { fs.unlinkSync(path.join(logsDir, f)); } catch(_) {} });
|
|
4620
4621
|
const logContent = '# Sandbox Log — ' + projName + _nl + 'Avviato: ' + logTs + _nl + 'Porta: ' + freePort + _nl + _nl + _sbLogLines.join(_nl);
|
|
4621
4622
|
fs.writeFileSync(path.join(logsDir, logName), logContent, 'utf8');
|
|
4622
4623
|
// Also update _index.json so the UI knows the type
|
|
@@ -4635,7 +4636,7 @@ module.exports = { validateEmail, sanitizeText, validatePassword, validateUserna
|
|
|
4635
4636
|
const _now2 = new Date();
|
|
4636
4637
|
const _pad2 = n => String(n).padStart(2,'0');
|
|
4637
4638
|
const logTs = _now2.getFullYear()+'-'+_pad2(_now2.getMonth()+1)+'-'+_pad2(_now2.getDate())+' '+_pad2(_now2.getHours())+':'+_pad2(_now2.getMinutes())+':'+_pad2(_now2.getSeconds());
|
|
4638
|
-
const logName = projName + '-
|
|
4639
|
+
const logName = projName + '-latest.log';
|
|
4639
4640
|
const logsDir = path.join(sandboxDir, 'skills');
|
|
4640
4641
|
fs.mkdirSync(logsDir, { recursive: true });
|
|
4641
4642
|
const logContent = '# Sandbox Log — ' + projName + ' [ERRORE]' + _nl + 'Avviato: ' + logTs + _nl + _nl + _sbLogLines.join(_nl) + _nl + _nl + '❌ ERRORE: ' + e.message;
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -6568,14 +6568,19 @@ function renderWebCraft(el) {
|
|
|
6568
6568
|
? '<div id="wcFileTabsRow" style="display:flex;gap:0;overflow-x:auto;border-bottom:1px solid var(--border);margin-bottom:0;flex-shrink:0;scrollbar-width:none">' +
|
|
6569
6569
|
wcState.generatedFiles.map(function(f,i){
|
|
6570
6570
|
var active = i === wcState.activeFile;
|
|
6571
|
-
|
|
6571
|
+
var hasErr = !!f._error;
|
|
6572
|
+
var tabColor = hasErr ? (active ? '#f87171' : '#7f4040') : (active ? 'var(--green)' : 'var(--dim)');
|
|
6573
|
+
var tabBorder = hasErr ? (active ? '#f87171' : 'transparent') : (active ? 'var(--green3)' : 'transparent');
|
|
6574
|
+
return '<button id="wcTab'+i+'" onclick="wcSetFile('+i+')" style="padding:6px 14px;font-size:11px;font-family:var(--mono);font-weight:'+(active?'700':'400')+';background:'+(active?'var(--bg3)':'transparent')+';border:none;border-bottom:2px solid '+tabBorder+';color:'+tabColor+';cursor:pointer;white-space:nowrap;flex-shrink:0">'+(hasErr?'⚠ ':'')+wcEsc(f.name)+'</button>';
|
|
6572
6575
|
}).join('') +
|
|
6573
6576
|
'</div>'
|
|
6574
6577
|
: '';
|
|
6575
6578
|
|
|
6576
|
-
var
|
|
6579
|
+
var _activeFile = wcState.generatedFiles[wcState.activeFile];
|
|
6580
|
+
var codeHtml = wcState.generatedFiles.length > 0 && _activeFile
|
|
6577
6581
|
? '<div id="wcCodeWrap" style="flex:1;overflow:auto;background:var(--bg3);border-radius:0 0 8px 8px">' +
|
|
6578
|
-
'<
|
|
6582
|
+
(_activeFile._error ? '<div style="padding:8px 14px;background:rgba(239,68,68,0.12);border-bottom:1px solid rgba(239,68,68,0.3);font-size:11px;color:#f87171;display:flex;align-items:center;gap:6px">⚠ Generazione fallita — chiedi al modello di rigenerare questo file</div>' : '') +
|
|
6583
|
+
'<pre style="margin:0;padding:14px 16px;font-size:11px;line-height:1.6;color:'+(_activeFile._error?'#f87171':'var(--text)')+';font-family:var(--mono);white-space:pre-wrap;word-break:break-all">'+wcEsc(_activeFile.content)+'</pre>' +
|
|
6579
6584
|
'</div>'
|
|
6580
6585
|
: '<div style="flex:1;display:flex;align-items:center;justify-content:center;color:var(--dim);font-size:12px;flex-direction:column;gap:8px">' +
|
|
6581
6586
|
'<span style="font-size:36px;opacity:.25">🛠</span>' +
|
|
@@ -7901,7 +7906,7 @@ async function wcGenerate() {
|
|
|
7901
7906
|
renderWebCraft(document.getElementById('content'));
|
|
7902
7907
|
} catch(e) {
|
|
7903
7908
|
if (e && e.name === 'AbortError') break;
|
|
7904
|
-
wcState.generatedFiles.push({ name: fp.name, content: '// Error generating this file: ' + (e.message || 'unknown error'), lang: fp.lang });
|
|
7909
|
+
wcState.generatedFiles.push({ name: fp.name, content: '// Error generating this file: ' + (e.message || 'unknown error'), lang: fp.lang, _error: true });
|
|
7905
7910
|
if (fi === 0) wcState.activeFile = 0;
|
|
7906
7911
|
renderWebCraft(document.getElementById('content'));
|
|
7907
7912
|
}
|
|
@@ -8095,7 +8100,7 @@ async function wcStartSandbox() {
|
|
|
8095
8100
|
headers: {'Content-Type':'application/json'},
|
|
8096
8101
|
body: JSON.stringify({
|
|
8097
8102
|
projectName: wcState.projectName || 'webcraft-sandbox',
|
|
8098
|
-
files: wcState.generatedFiles
|
|
8103
|
+
files: wcState.generatedFiles.filter(function(f){ return !f._error; })
|
|
8099
8104
|
})
|
|
8100
8105
|
});
|
|
8101
8106
|
if (!r.ok || !r.body) throw new Error('Sandbox error ' + r.status);
|