nothumanallowed 9.7.0 → 9.7.1

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": "9.7.0",
3
+ "version": "9.7.1",
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": {
@@ -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
@@ -337,25 +337,25 @@ function renderMessages(){
337
337
 
338
338
  if (isAssistant) {
339
339
  // Handle canvas render markers
340
- var canvasMatch = content.match(/\[CANVAS_RENDER\]([\s\S]*?)\[\/CANVAS_RENDER\]/);
340
+ var canvasMatch = content.match(/\\[CANVAS_RENDER\\]([\\s\\S]*?)\\[\\/CANVAS_RENDER\\]/);
341
341
  if (canvasMatch) {
342
342
  try { var cd = JSON.parse(canvasMatch[1]); showCanvas(cd.html, cd.title); } catch(e){}
343
- content = content.replace(/\[CANVAS_RENDER\][\s\S]*?\[\/CANVAS_RENDER\]/, '').trim();
343
+ content = content.replace(/\\[CANVAS_RENDER\\][\\s\\S]*?\\[\\/CANVAS_RENDER\\]/, '').trim();
344
344
  }
345
345
  if (content.indexOf('[CANVAS_CLEAR]') !== -1) {
346
346
  closeCanvas();
347
- content = content.replace(/\[CANVAS_CLEAR\][\s\S]*?\[\/CANVAS_CLEAR\]/, '').trim();
347
+ content = content.replace(/\\[CANVAS_CLEAR\\][\\s\\S]*?\\[\\/CANVAS_CLEAR\\]/, '').trim();
348
348
  }
349
349
  // Handle screenshot file markers
350
- var ssMatch = content.match(/\[SCREENSHOT_FILE\](.*?)\[\/SCREENSHOT_FILE\]/);
350
+ var ssMatch = content.match(/\\[SCREENSHOT_FILE\\](.*?)\\[\\/SCREENSHOT_FILE\\]/);
351
351
  if (ssMatch) {
352
352
  var fname = ssMatch[1].split('/').pop();
353
353
  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(/\[SCREENSHOT_FILE\].*?\[\/SCREENSHOT_FILE\]/, '').trim();
354
+ content = content.replace(/\\[SCREENSHOT_FILE\\].*?\\[\\/SCREENSHOT_FILE\\]/, '').trim();
355
355
  }
356
356
  }
357
357
 
358
- var bubbleContent = isAssistant ? extraHtml + esc(content).replace(/\n/g, '<br>') : esc(content).replace(/\n/g, '<br>');
358
+ var bubbleContent = isAssistant ? extraHtml + esc(content).replace(/\\n/g, '<br>') : esc(content).replace(/\\n/g, '<br>');
359
359
 
360
360
  // Action buttons for each message
361
361
  var actions = '<div class="msg__actions" style="display:flex;gap:6px;margin-top:4px;opacity:0.3">';
@@ -373,7 +373,7 @@ function renderMessages(){
373
373
  }
374
374
  function copyMessage(idx){
375
375
  var m=chatHistory[idx];if(!m)return;
376
- var text=m.content.replace(/\[SCREENSHOT_FILE\].*?\[\/SCREENSHOT_FILE\]/g,'').replace(/\[CANVAS_RENDER\][\s\S]*?\[\/CANVAS_RENDER\]/g,'').trim();
376
+ var text=m.content.replace(/\\[SCREENSHOT_FILE\\].*?\\[\\/SCREENSHOT_FILE\\]/g,'').replace(/\\[CANVAS_RENDER\\][\\s\\S]*?\\[\\/CANVAS_RENDER\\]/g,'').trim();
377
377
  navigator.clipboard.writeText(text).then(function(){showToast('copy','Copied','Message copied to clipboard',2000)}).catch(function(){});
378
378
  }
379
379
  function retryMessage(idx){