nothumanallowed 13.2.76 → 13.2.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 +19 -14
- package/src/constants.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.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
|
@@ -2852,24 +2852,29 @@ export async function cmdUI(args) {
|
|
|
2852
2852
|
|
|
2853
2853
|
// ── Fetch REAL data for each agent type ──────────────────────
|
|
2854
2854
|
if (agent === 'DocumentReaderAgent') {
|
|
2855
|
-
//
|
|
2856
|
-
//
|
|
2857
|
-
|
|
2855
|
+
// Always use vision for PDF reading — text extraction loses table structure,
|
|
2856
|
+
// column alignment, and layout-dependent data for the vast majority of
|
|
2857
|
+
// technical PDFs (datasheets, catalogs, forms, scanned docs).
|
|
2858
|
+
// Vision reads exactly what a human sees on the page.
|
|
2859
|
+
sendToken('[Reading document with vision...] ');
|
|
2858
2860
|
let rawText = '';
|
|
2859
2861
|
if (stepPdfBase64) {
|
|
2860
2862
|
try {
|
|
2861
2863
|
const b64 = stepPdfBase64.includes(',') ? stepPdfBase64.split(',')[1] : stepPdfBase64;
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2864
|
+
rawText = await callLLMVision(
|
|
2865
|
+
config,
|
|
2866
|
+
'You are a technical document analyst. Extract ALL content exactly as it appears on the page.',
|
|
2867
|
+
'Extract ALL content from this document: all text, tables (preserve rows and columns with exact values), product codes, numbers, units, notes, headers. Do not summarize — transcribe everything visible.',
|
|
2868
|
+
{ base64: b64, mimeType: 'application/pdf' }
|
|
2869
|
+
);
|
|
2870
|
+
} catch (ve) {
|
|
2871
|
+
// Vision failed — fall back to text extraction
|
|
2872
|
+
sendToken('[Vision unavailable — falling back to text extraction...] ');
|
|
2873
|
+
try {
|
|
2874
|
+
const b64 = stepPdfBase64.includes(',') ? stepPdfBase64.split(',')[1] : stepPdfBase64;
|
|
2875
|
+
rawText = extractTextFromPdf(Buffer.from(b64, 'base64')) || '';
|
|
2876
|
+
} catch (e) { rawText = ''; }
|
|
2877
|
+
}
|
|
2873
2878
|
}
|
|
2874
2879
|
if (!rawText) {
|
|
2875
2880
|
sendToken('Could not extract text from the attached document.');
|
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.
|
|
8
|
+
export const VERSION = '13.2.78';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|