wormclaude 1.0.230 → 1.0.231

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/compact.js CHANGED
@@ -53,5 +53,19 @@ export async function runCompact(history, config, focus) {
53
53
  sys ?? { role: 'system', content: 'You are WormClaude.' },
54
54
  { role: 'user', content: 'Önceki konuşmanın özeti (bağlam):\n\n' + summary },
55
55
  ];
56
+ // DRIFT KORUMASI: özet, modelin GERÇEK mevcut isteğini bulanıklaştırıp yanlış davranışa
57
+ // (ör. "sunucuyu başlat" → saçma "paylaşamam") itebiliyor. Son kullanıcı mesajını AYNEN
58
+ // ekle ki model demirlensin. (Blackbox son tool-call/result çiftini korur; bizim minimal
59
+ // eşdeğerimiz: son kullanıcı isteğini verbatim tut.)
60
+ let lastUser = '';
61
+ for (let i = convo.length - 1; i >= 0; i--) {
62
+ if (convo[i].role === 'user' && typeof convo[i].content === 'string') {
63
+ lastUser = convo[i].content;
64
+ break;
65
+ }
66
+ }
67
+ if (lastUser && !/^\s*(önceki konuşmanın özeti|özellikle şuna odaklan)/i.test(lastUser)) {
68
+ newHist.push({ role: 'user', content: 'CURRENT REQUEST (continue exactly this — the summary above is only background, do not refuse or restart it):\n' + lastUser });
69
+ }
56
70
  return { history: newHist, summary };
57
71
  }
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.230';
19
+ export const VERSION = '1.0.231';
package/dist/tui.js CHANGED
@@ -435,6 +435,7 @@ export async function runTui() {
435
435
  const timer = setInterval(() => { spin++; if (busy && !perm && !ask)
436
436
  refresh(); }, 120);
437
437
  let lastSig = '', sameCount = 0, usedWeb = false, lastAnswer = '';
438
+ const sigWindow = []; // dönüşümlü/döngüsel loop tespiti (A,B,A,B) için son imzalar
438
439
  let consecFail = 0, totalFails = 0; // devre-kesici: olmayan araç/sözdizimi döngüsünü kır
439
440
  let reactiveRetried = false; // bağlam taşmasında bir kez compact+retry
440
441
  let secrecyRetried = false; // inceleme görevinde yanlış gizlilik-reddinde bir kez zorla-okut
@@ -568,6 +569,20 @@ export async function runTui() {
568
569
  printItem({ kind: 'note', text: t('tui.loopStop') });
569
570
  break;
570
571
  }
572
+ // Dönüşümlü/döngüsel loop: son 8 turun içinde aynı imza ≥4 kez → A,B,A,B... yakala
573
+ // (ardışık-aynı kontrolünün kaçırdığı 2+ döngü alternasyonu).
574
+ sigWindow.push(sig);
575
+ if (sigWindow.length > 8)
576
+ sigWindow.shift();
577
+ if (sigWindow.length >= 6) {
578
+ const counts = {};
579
+ for (const s of sigWindow)
580
+ counts[s] = (counts[s] || 0) + 1;
581
+ if (Math.max(...Object.values(counts)) >= 4) {
582
+ printItem({ kind: 'note', text: t('tui.loopStop') });
583
+ break;
584
+ }
585
+ }
571
586
  const results = await executeToolCalls(toolCalls, {
572
587
  confirm: (c, args) => new Promise((resolve) => {
573
588
  if (allowAll.has(c.name))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.230",
3
+ "version": "1.0.231",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {