wormclaude 1.0.202 → 1.0.204

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/commands.js CHANGED
@@ -65,6 +65,7 @@ export const COMMANDS = [
65
65
  { name: '/pentest', desc: 'OTONOM çoklu-yüzey pentest (web+network+OSINT+cloud → tek rapor): /pentest <domain>' },
66
66
  { name: '/audit', desc: 'kaynak kod güvenlik denetimi (SAST — sır/açık/CVE, yerel): /audit [klasör]' },
67
67
  { name: '/jwt', desc: 'JWT token güvenlik analizi (alg=none/zayıf-secret/expiry/claim, yerel): /jwt <token>' },
68
+ { name: '/computer', desc: 'ekran kontrolünü aç/kapa (screenshot + tıkla/yaz, trust3+): See/Click/Type' },
68
69
  { name: '/spray', desc: 'login formuna parola-spray (yetkili test, trust 3+): /spray <login-url> [kullanıcı]' },
69
70
  { name: '/defaultcreds', desc: 'login\'e varsayılan kimlik denemesi (admin/admin vb, trust 3+): /defaultcreds <login-url>' },
70
71
  { name: '/exploit', desc: 'yetkili testte doğrulanmış PoC üret: /exploit <cve|açıklama>' },
package/dist/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.202';
19
+ export const VERSION = '1.0.204';
package/dist/tools.js CHANGED
@@ -660,11 +660,26 @@ const CORE_TOOLS = new Set([
660
660
  // (test edildi). Eski degenere NESTED şemadandı ([{label,description}]). Handler string→{label}
661
661
  // normalize ediyor; bare-JSON inline recovery temiz çağrıyı yakalıyor → numaralı menü.
662
662
  ]);
663
+ // Computer-use (ekran kontrolü) — varsayılan KAPALI; /computer ile açılır (her görevde modele
664
+ // gönderilip misfire/context şişmesi olmasın). Açıkken See/Click/Type/Key/Scroll araç-setine girer.
665
+ const COMPUTER_TOOLS = new Set(['See', 'Click', 'Type', 'Key', 'Scroll']);
666
+ let _computerEnabled = false;
667
+ export function isComputerUse() { return _computerEnabled; }
668
+ export function setComputerUse(on) { _computerEnabled = !!on; }
663
669
  export function allToolSchemas() {
664
670
  const sk = skillToolSchema();
665
671
  const all = [...toolSchemas, ...computerToolSchemas, ...getMcpToolSchemas(), ...(sk ? [sk] : [])];
666
672
  const excluded = new Set(getExcludedTools());
667
- return all.filter((t) => CORE_TOOLS.has(t.function.name) && !excluded.has(t.function.name));
673
+ return all.filter((t) => {
674
+ const n = t.function.name;
675
+ if (excluded.has(n))
676
+ return false;
677
+ if (CORE_TOOLS.has(n))
678
+ return true;
679
+ if (_computerEnabled && COMPUTER_TOOLS.has(n))
680
+ return true; // /computer açıkken ekran araçları
681
+ return false;
682
+ });
668
683
  }
669
684
  const TOOL_META = {
670
685
  Read: { readOnly: true, concurrencySafe: true, validate: (a) => (a && a.file_path && String(a.file_path) !== 'undefined' ? null : 'file_path gerekli (geçerli bir dosya yolu ver)') },
package/dist/tui.js CHANGED
@@ -6,10 +6,11 @@
6
6
  import readline from 'node:readline';
7
7
  import stringWidth from 'string-width';
8
8
  import { loadConfig, streamChat, fetchAccount } from './api.js';
9
- import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig, getBashCwd } from './tools.js';
9
+ import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig, getBashCwd, setComputerUse, isComputerUse } from './tools.js';
10
10
  import { setCheckpointStore } from './checkpoint.js';
11
11
  import { extractImages, visionMessages, VISION_MODEL } from './vision.js';
12
12
  import * as path from 'node:path';
13
+ import * as fs from 'node:fs';
13
14
  import { sanitizeOutput } from './errorsan.js';
14
15
  import { itemAnsi, markdownAnsi } from './ansi.js';
15
16
  import { theme, VERSION } from './theme.js';
@@ -56,6 +57,55 @@ function relWs(fp) {
56
57
  return fp;
57
58
  }
58
59
  }
60
+ // Klasör-oku augmentasyonu: kullanıcı bir klasörü "oku/incele/analiz" deyince CLI OTOMATİK harita
61
+ // çıkarıp mesaja ekler → model haritayı hazır görür (model "listeleyemedim" diye takılamaz / Glob'ı
62
+ // atlamaz) + stratejik okumaya yönlendirilir (hepsini okuyup bağlam taşırmasın). DETERMİNİSTİK.
63
+ function augmentFolderRead(text) {
64
+ if (!/\b(oku|incele|analiz|tara|özetle|ozetle|göz at|read|analyz|review|examine|summar|inspect)/i.test(text))
65
+ return null;
66
+ const pathM = text.match(/([a-zA-Z]:[\\/][^\s"'`]*|(?:\.{1,2}|~)?\/[^\s"'`]+)/);
67
+ const folderWord = /(klasör|klasor|dizin|folder|directory|repo|proje|codebase)/i.test(text);
68
+ if (!pathM && !folderWord)
69
+ return null;
70
+ let dir = pathM ? pathM[1].replace(/[\\/]+$/, '') : getBashCwd();
71
+ try {
72
+ if (!fs.statSync(dir).isDirectory())
73
+ return null;
74
+ }
75
+ catch {
76
+ return null;
77
+ }
78
+ const SKIP = new Set(['node_modules', '.git', 'dist', 'build', 'out', '.next', 'venv', '.venv', '__pycache__', 'coverage']);
79
+ const files = [];
80
+ const walk = (d, depth) => {
81
+ if (depth > 6 || files.length > 250)
82
+ return;
83
+ let ents;
84
+ try {
85
+ ents = fs.readdirSync(d, { withFileTypes: true });
86
+ }
87
+ catch {
88
+ return;
89
+ }
90
+ for (const e of ents) {
91
+ if (files.length > 250)
92
+ break;
93
+ const full = path.join(d, e.name);
94
+ if (e.isDirectory()) {
95
+ if (!SKIP.has(e.name) && !e.name.startsWith('.'))
96
+ walk(full, depth + 1);
97
+ }
98
+ else if (e.isFile())
99
+ files.push(path.relative(dir, full).replace(/\\/g, '/'));
100
+ }
101
+ };
102
+ walk(dir, 0);
103
+ if (!files.length)
104
+ return null;
105
+ const list = files.slice(0, 250).join('\n');
106
+ return `[Otomatik klasör haritası — ${dir} (${files.length} dosya)]\n${list}\n\n` +
107
+ `Harita ZATEN çıkarıldı (Glob'a gerek yok). STRATEJİK OKU: SADECE ilgili dosyaları Read et — HEPSİNİ okuma (bağlam taşar, iş yarıda kalır). Büyük dosyada offset/limit kullan; aradığını Grep ile bul. Güvenlik analizi (açık/sır/CVE) ise CodeAudit aracını kullan (tüm klasörü taşmadan tarar, sadece bulguları döner).\n\nKullanıcının isteği: ${text}`;
108
+ }
59
109
  function capToolOut(name, out) {
60
110
  const s = out || '';
61
111
  const isCmd = name === 'Bash' || name === 'PowerShell';
@@ -882,6 +932,12 @@ export async function runTui() {
882
932
  runTurn(`CodeAudit aracıyla şu yolu kaynak kod güvenliği için tara (SAST): ${a}. Bulguları severity-sıralı özetle + öncelikli düzeltmeler.`, v);
883
933
  return;
884
934
  }
935
+ // /computer — ekran kontrolü (See/Click/Type) aç-kapa
936
+ if (tok === '/computer') {
937
+ setComputerUse(!isComputerUse());
938
+ printItem({ kind: 'note', text: isComputerUse() ? '🖥️ Ekran kontrolü AÇIK — artık ekran görüntüsü alıp tıklayıp yazabilirim (her eylem onayınla). Kapatmak: /computer' : 'Ekran kontrolü kapatıldı.' });
939
+ return;
940
+ }
885
941
  // /jwt — JWT token güvenlik analizi (yerel); modele JwtAudit çağırt
886
942
  if (tok === '/jwt') {
887
943
  const a = v.slice(tok.length).trim();
@@ -1020,6 +1076,12 @@ export async function runTui() {
1020
1076
  runTurn(at.augmented, v);
1021
1077
  return;
1022
1078
  }
1079
+ // Klasör-oku → otomatik harita enjekte (model takılmasın + stratejik okusun)
1080
+ const _fr = augmentFolderRead(v);
1081
+ if (_fr) {
1082
+ runTurn(_fr, v);
1083
+ return;
1084
+ }
1023
1085
  runTurn(v, v);
1024
1086
  return;
1025
1087
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.202",
3
+ "version": "1.0.204",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {