wormclaude 1.0.206 → 1.0.207
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/dist/theme.js +1 -1
- package/dist/tools.js +13 -0
- package/package.json +2 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -1476,6 +1476,19 @@ export async function executeTool(name, args) {
|
|
|
1476
1476
|
return { ok: false, output: `Error: file does not exist: ${fp}` };
|
|
1477
1477
|
if (fs.statSync(fp).isDirectory())
|
|
1478
1478
|
return { ok: false, output: 'Error: path is a directory. Use an ls command via Bash to read a directory.' };
|
|
1479
|
+
// PDF → metin çıkar (native, kütüphane gömülü). Ham bayt yerine sayfaların metni.
|
|
1480
|
+
if (/\.pdf$/i.test(fp)) {
|
|
1481
|
+
try {
|
|
1482
|
+
const { PDFParse } = await import('pdf-parse');
|
|
1483
|
+
const r = await new PDFParse({ data: fs.readFileSync(fp) }).getText();
|
|
1484
|
+
readFiles.add(norm(fp));
|
|
1485
|
+
const txt = String(r?.text || '').trim();
|
|
1486
|
+
return { ok: true, output: txt ? `[PDF metni — ${fp}]\n${txt.slice(0, 60000)}` : '<system-reminder>PDF açıldı ama metin çıkmadı (taranmış/görsel PDF olabilir).</system-reminder>' };
|
|
1487
|
+
}
|
|
1488
|
+
catch (e) {
|
|
1489
|
+
return { ok: false, output: 'PDF okuma hatası: ' + (e?.message || e) };
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1479
1492
|
const raw = fs.readFileSync(fp, 'utf8');
|
|
1480
1493
|
readFiles.add(norm(fp));
|
|
1481
1494
|
if (raw.length === 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wormclaude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.207",
|
|
4
4
|
"description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"ink-spinner": "^5.0.0",
|
|
23
23
|
"ink-text-input": "^6.0.0",
|
|
24
24
|
"log-update": "^5.0.1",
|
|
25
|
+
"pdf-parse": "^2.4.5",
|
|
25
26
|
"pdfkit": "^0.19.1",
|
|
26
27
|
"pptxgenjs": "^4.0.1",
|
|
27
28
|
"react": "^18.3.1",
|