wormclaude 1.0.232 → 1.0.233

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 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.232';
19
+ export const VERSION = '1.0.233';
package/dist/tui.js CHANGED
@@ -437,6 +437,7 @@ export async function runTui() {
437
437
  let lastSig = '', sameCount = 0, usedWeb = false, lastAnswer = '';
438
438
  const sigWindow = []; // dönüşümlü/döngüsel loop tespiti (A,B,A,B) için son imzalar
439
439
  let consecFail = 0, totalFails = 0; // devre-kesici: olmayan araç/sözdizimi döngüsünü kır
440
+ let fruitless = 0; // boş-arama loop koruması: art arda Glob/Grep "(no matches)" → dur, yol iste
440
441
  let reactiveRetried = false; // bağlam taşmasında bir kez compact+retry
441
442
  let secrecyRetried = false; // inceleme görevinde yanlış gizlilik-reddinde bir kez zorla-okut
442
443
  try {
@@ -629,7 +630,15 @@ export async function runTui() {
629
630
  const _failed = results.filter((r) => !r.ok).length;
630
631
  totalFails += _failed;
631
632
  consecFail = (results.length > 0 && _failed === results.length) ? consecFail + 1 : 0;
632
- const _willStop = consecFail >= 2 || totalFails >= 4;
633
+ // Boş-arama loop: Glob/Grep "(no matches)" ok:true döner fail-breaker'ı tripe etmez.
634
+ // Bu tur SADECE arama yaptıysa ve HEPSİ boşsa fruitless++ ; bir yararlı sonuç gelince sıfırla.
635
+ const _searchCalls = toolCalls.filter((tc) => /^(Glob|Grep)$/.test(tc.name)).length;
636
+ const _emptySearch = results.filter((r, i) => r.ok && /^(Glob|Grep)$/.test(toolCalls[i].name) && /^\(no matches\)|no matches/i.test((r.output || '').trim())).length;
637
+ if (_searchCalls > 0 && _emptySearch === _searchCalls && _emptySearch === toolCalls.length)
638
+ fruitless += _emptySearch;
639
+ else if (results.some((r) => r.ok && !/^\(no matches\)/i.test((r.output || '').trim())))
640
+ fruitless = 0;
641
+ const _willStop = consecFail >= 2 || totalFails >= 4 || fruitless >= 5;
633
642
  // REFLECT-AFTER: bir araç başarısızsa (ve henüz sert-dur eşiğine gelmediysek) modele
634
643
  // teşhis+adapte dayat — körlemesine tekrar/pes etmesin, benim gibi "neden + başka yol" düşünsün.
635
644
  for (let i = 0; i < toolCalls.length; i++) {
@@ -644,10 +653,18 @@ export async function runTui() {
644
653
  if (_willStop) {
645
654
  // Model-yönlü direktif İNGİLİZCE (Türkçe direktif instruction-following'i bozar);
646
655
  // model yine kullanıcının diliyle özetler. (Kullanıcı-yönlü not aşağıda TR kalır.)
647
- history.push({ role: 'user', content: 'Several commands failed required tools/syntax are not available here (e.g. grep/openssl/hydra on Windows). STOP running commands now and give a SHORT summary of what you found so far, in the user\'s language. Do NOT call more tools, do NOT use grep/sed/awk.' });
648
- printItem({ kind: 'note', text: getLang() === 'en' ? 'Commands kept failing — wrapping up.' : 'Komutlar başarısız oldu — özetle bitiriliyor.' });
656
+ const _searchLoop = fruitless >= 5 && consecFail < 2 && totalFails < 4;
657
+ if (_searchLoop) {
658
+ history.push({ role: 'user', content: 'Your repeated Glob/Grep searches keep returning no matches — the files are not where you are looking. STOP searching now. Ask the user for the exact folder path or file name (in their language), or plainly say you could not find them. Do NOT run more searches.' });
659
+ printItem({ kind: 'note', text: getLang() === 'en' ? 'Searches came up empty — asking for the path.' : 'Aramalar boş döndü — yolu soruyorum.' });
660
+ }
661
+ else {
662
+ history.push({ role: 'user', content: 'Several commands failed — required tools/syntax are not available here (e.g. grep/openssl/hydra on Windows). STOP running commands now and give a SHORT summary of what you found so far, in the user\'s language. Do NOT call more tools, do NOT use grep/sed/awk.' });
663
+ printItem({ kind: 'note', text: getLang() === 'en' ? 'Commands kept failing — wrapping up.' : 'Komutlar başarısız oldu — özetle bitiriliyor.' });
664
+ }
649
665
  consecFail = 0;
650
666
  totalFails = 0;
667
+ fruitless = 0;
651
668
  }
652
669
  }
653
670
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.232",
3
+ "version": "1.0.233",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {