nothumanallowed 9.7.0 → 9.7.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 +1 -1
- package/src/commands/ui.mjs +12 -0
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +11 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.2",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 53 tools. Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, GitHub, Notion, Slack, voice chat, 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -1059,6 +1059,18 @@ export async function cmdUI(args) {
|
|
|
1059
1059
|
if (!noBrowser) {
|
|
1060
1060
|
openBrowser(localUrl);
|
|
1061
1061
|
}
|
|
1062
|
+
|
|
1063
|
+
// Auto-start daemon if not running (for live email/calendar/cron updates)
|
|
1064
|
+
import('../services/ops-daemon.mjs').then(({ isRunning, startDaemon }) => {
|
|
1065
|
+
if (!isRunning()) {
|
|
1066
|
+
const daemonResult = startDaemon();
|
|
1067
|
+
if (daemonResult.ok) {
|
|
1068
|
+
console.log(` ${G}Daemon started${NC} (PID ${daemonResult.pid}) — live updates active`);
|
|
1069
|
+
}
|
|
1070
|
+
} else {
|
|
1071
|
+
console.log(` ${G}Daemon running${NC} — live updates active`);
|
|
1072
|
+
}
|
|
1073
|
+
}).catch(() => { /* daemon start failed — non-critical */ });
|
|
1062
1074
|
});
|
|
1063
1075
|
|
|
1064
1076
|
// Graceful shutdown
|
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 = '9.7.
|
|
8
|
+
export const VERSION = '9.7.2';
|
|
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/web-ui.mjs
CHANGED
|
@@ -96,6 +96,8 @@ input:focus,textarea:focus{border-color:var(--green3)}
|
|
|
96
96
|
.msg{margin-bottom:12px}
|
|
97
97
|
.msg--user .msg__bubble{background:var(--bg3);border:1px solid var(--border2);border-radius:8px 8px 2px 8px;padding:10px 14px;max-width:85%;margin-left:auto;color:var(--bright)}
|
|
98
98
|
.msg--assistant .msg__bubble{background:var(--greendim);border:1px solid var(--green3);border-radius:8px 8px 8px 2px;padding:10px 14px;max-width:85%;color:var(--text);white-space:pre-wrap;word-wrap:break-word}
|
|
99
|
+
.msg__actions{opacity:0.15;transition:opacity 0.2s}
|
|
100
|
+
.msg:hover .msg__actions{opacity:1}
|
|
99
101
|
.msg__label{font-size:10px;color:var(--dim);margin-bottom:2px}
|
|
100
102
|
.msg--thinking{color:var(--dim);font-style:italic}
|
|
101
103
|
.chat__bar{display:flex;gap:8px;padding:10px 0 0 0;border-top:1px solid var(--border);flex-shrink:0}
|
|
@@ -337,28 +339,28 @@ function renderMessages(){
|
|
|
337
339
|
|
|
338
340
|
if (isAssistant) {
|
|
339
341
|
// Handle canvas render markers
|
|
340
|
-
var canvasMatch = content.match(
|
|
342
|
+
var canvasMatch = content.match(/\\[CANVAS_RENDER\\]([\\s\\S]*?)\\[\\/CANVAS_RENDER\\]/);
|
|
341
343
|
if (canvasMatch) {
|
|
342
344
|
try { var cd = JSON.parse(canvasMatch[1]); showCanvas(cd.html, cd.title); } catch(e){}
|
|
343
|
-
content = content.replace(
|
|
345
|
+
content = content.replace(/\\[CANVAS_RENDER\\][\\s\\S]*?\\[\\/CANVAS_RENDER\\]/, '').trim();
|
|
344
346
|
}
|
|
345
347
|
if (content.indexOf('[CANVAS_CLEAR]') !== -1) {
|
|
346
348
|
closeCanvas();
|
|
347
|
-
content = content.replace(
|
|
349
|
+
content = content.replace(/\\[CANVAS_CLEAR\\][\\s\\S]*?\\[\\/CANVAS_CLEAR\\]/, '').trim();
|
|
348
350
|
}
|
|
349
351
|
// Handle screenshot file markers
|
|
350
|
-
var ssMatch = content.match(
|
|
352
|
+
var ssMatch = content.match(/\\[SCREENSHOT_FILE\\](.*?)\\[\\/SCREENSHOT_FILE\\]/);
|
|
351
353
|
if (ssMatch) {
|
|
352
354
|
var fname = ssMatch[1].split('/').pop();
|
|
353
355
|
extraHtml = '<img src="/api/screenshots/' + encodeURIComponent(fname) + '" style="max-width:100%;border-radius:8px;margin:8px 0;border:1px solid rgba(0,255,65,0.2)" />';
|
|
354
|
-
content = content.replace(
|
|
356
|
+
content = content.replace(/\\[SCREENSHOT_FILE\\].*?\\[\\/SCREENSHOT_FILE\\]/, '').trim();
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
359
|
|
|
358
|
-
var bubbleContent = isAssistant ? extraHtml + esc(content).replace(
|
|
360
|
+
var bubbleContent = isAssistant ? extraHtml + esc(content).replace(/\\n/g, '<br>') : esc(content).replace(/\\n/g, '<br>');
|
|
359
361
|
|
|
360
362
|
// Action buttons for each message
|
|
361
|
-
var actions = '<div class="msg__actions" style="display:flex;gap:6px;margin-top:4px
|
|
363
|
+
var actions = '<div class="msg__actions" style="display:flex;gap:6px;margin-top:4px">';
|
|
362
364
|
actions += '<button onclick="copyMessage('+idx+')" style="background:none;border:none;color:var(--dim);cursor:pointer;font-size:10px;font-family:var(--mono)" title="Copy">Copy</button>';
|
|
363
365
|
if (isAssistant) {
|
|
364
366
|
actions += '<button onclick="retryMessage('+idx+')" style="background:none;border:none;color:var(--dim);cursor:pointer;font-size:10px;font-family:var(--mono)" title="Retry">Retry</button>';
|
|
@@ -367,13 +369,13 @@ function renderMessages(){
|
|
|
367
369
|
}
|
|
368
370
|
actions += '</div>';
|
|
369
371
|
|
|
370
|
-
h+='<div class="msg msg--'+esc(m.role)+'"
|
|
372
|
+
h+='<div class="msg msg--'+esc(m.role)+'"><div class="msg__label">'+esc(m.role==='user'?'You':'NHA')+'</div><div class="msg__bubble">'+bubbleContent+'</div>'+actions+'</div>';
|
|
371
373
|
});
|
|
372
374
|
el.innerHTML=h;el.scrollTop=el.scrollHeight;
|
|
373
375
|
}
|
|
374
376
|
function copyMessage(idx){
|
|
375
377
|
var m=chatHistory[idx];if(!m)return;
|
|
376
|
-
var text=m.content.replace(
|
|
378
|
+
var text=m.content.replace(/\\[SCREENSHOT_FILE\\].*?\\[\\/SCREENSHOT_FILE\\]/g,'').replace(/\\[CANVAS_RENDER\\][\\s\\S]*?\\[\\/CANVAS_RENDER\\]/g,'').trim();
|
|
377
379
|
navigator.clipboard.writeText(text).then(function(){showToast('copy','Copied','Message copied to clipboard',2000)}).catch(function(){});
|
|
378
380
|
}
|
|
379
381
|
function retryMessage(idx){
|