nothumanallowed 13.2.51 → 13.2.52

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.2.51",
3
+ "version": "13.2.52",
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.2.51';
8
+ export const VERSION = '13.2.52';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -3123,20 +3123,34 @@ function downloadStudioPDF() {
3123
3123
  var nodes = studioState.nodes || [];
3124
3124
 
3125
3125
  // Build sections for each agent
3126
+ function mdToPdfHtml(raw) {
3127
+ var lines = raw.split('\n');
3128
+ var out = '';
3129
+ var inList = false;
3130
+ for (var li = 0; li < lines.length; li++) {
3131
+ var line = lines[li]
3132
+ .replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
3133
+ // Inline bold: **text**
3134
+ line = line.replace(new RegExp('[*][*]([^*]+)[*][*]','g'),'<strong>$1</strong>');
3135
+ // Inline italic: *text*
3136
+ line = line.replace(new RegExp('[*]([^*]+)[*]','g'),'<em>$1</em>');
3137
+ if (line.slice(0,4) === '### ') { if(inList){out+='</ul>';inList=false;} out += '<h3>' + line.slice(4) + '</h3>'; continue; }
3138
+ if (line.slice(0,3) === '## ') { if(inList){out+='</ul>';inList=false;} out += '<h2>' + line.slice(3) + '</h2>'; continue; }
3139
+ if (line.slice(0,2) === '# ') { if(inList){out+='</ul>';inList=false;} out += '<h2>' + line.slice(2) + '</h2>'; continue; }
3140
+ if (line.slice(0,2) === '- ' || line.slice(0,2) === '* ') {
3141
+ if (!inList) { out += '<ul>'; inList = true; }
3142
+ out += '<li>' + line.slice(2) + '</li>';
3143
+ continue;
3144
+ }
3145
+ if (inList) { out += '</ul>'; inList = false; }
3146
+ if (line.trim() === '') { out += '</p><p>'; } else { out += line + '<br>'; }
3147
+ }
3148
+ if (inList) out += '</ul>';
3149
+ return '<p>' + out + '</p>';
3150
+ }
3126
3151
  var sectionsHtml = nodes.map(function(n) {
3127
3152
  if (!n.output || n.output === '(no output)' || n.agent === 'CanvasAgent') return '';
3128
- var mdHtml = (n.output || '')
3129
- .replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')
3130
- .replace(/\*\*(.*?)\*\*/g,'<strong>$1</strong>')
3131
- .replace(/\*(.*?)\*/g,'<em>$1</em>')
3132
- .replace(new RegExp('^#{3}[ \\t]+(.+)$','gm'),'<h3>$1</h3>')
3133
- .replace(new RegExp('^#{2}[ \\t]+(.+)$','gm'),'<h2>$1</h2>')
3134
- .replace(new RegExp('^#{1}[ \\t]+(.+)$','gm'),'<h2>$1</h2>')
3135
- .replace(new RegExp('^-[ \\t]+(.+)$','gm'),'<li>$1</li>')
3136
- .replace(/(<li>[\s\S]*?<\/li>)/g,'<ul>$1</ul>')
3137
- .replace(/\n{2,}/g,'</p><p>')
3138
- .replace(/\n/g,'<br>');
3139
- return '<div class="section"><div class="agent-label">' + (n.icon||'') + ' ' + esc(n.label||n.agent) + '</div><div class="section-body"><p>' + mdHtml + '</p></div></div>';
3153
+ return '<div class="section"><div class="agent-label">' + (n.icon||'') + ' ' + esc(n.label||n.agent) + '</div><div class="section-body">' + mdToPdfHtml(n.output) + '</div></div>';
3140
3154
  }).join('');
3141
3155
 
3142
3156
  // Include canvas if present (as an embedded iframe screenshot fallback note)