wormclaude 1.0.114 → 1.0.115

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/cli.js CHANGED
@@ -746,6 +746,7 @@ function App() {
746
746
  let lastToolSig = '';
747
747
  let sameToolCount = 0;
748
748
  let consecFailTurns = 0; // üst üste TÜM araçların başarısız olduğu tur sayısı (devre-kesici)
749
+ let totalFails = 0; // görev boyunca toplam başarısız komut (karışık başarı/başarısızlık döngüsü)
749
750
  let taskIn = 0, taskOut = 0, taskCache = 0; // bu görevin GERÇEK token toplamı (tüm turlar; API usage'dan)
750
751
  while (iter < MAX_TURNS) {
751
752
  if (ac.signal.aborted) {
@@ -778,8 +779,12 @@ function App() {
778
779
  const TAIL_CHARS = 4000;
779
780
  let lastUi = 0;
780
781
  const paintStream = () => {
781
- const tail = assistantText.length > TAIL_CHARS ? assistantText.slice(-TAIL_CHARS) : assistantText;
782
- setStreaming(cleanModelText(tail));
782
+ // Canlı akışta da gömülü tool-call JSON'unu gizle: model uzun çok-adımlı mesaj yazarken
783
+ // ham {"name":"Bash",...} görünmesin. (stripInlineToolCalls "name" yoksa hemen döner →
784
+ // düz metinde maliyet yok.) Tamamlanmamış son blok doğal olarak kalır, sonra temizlenir.
785
+ const cleaned = stripInlineToolCalls(cleanModelText(assistantText));
786
+ const tail = cleaned.length > TAIL_CHARS ? cleaned.slice(-TAIL_CHARS) : cleaned;
787
+ setStreaming(tail);
783
788
  setTokens(Math.round(assistantText.length / 4));
784
789
  };
785
790
  for await (const ev of streamChat(historyRef.current, allToolSchemas(), config, ac.signal)) {
@@ -915,17 +920,23 @@ function App() {
915
920
  // Devre-kesici: bu turda TÜM araçlar başarısız olduysa say. Üst üste 2 tur olursa
916
921
  // modele "DUR ve özetle" dedir — yoksa model olmayan araç/Unix sözdizimini (grep, hydra)
917
922
  // deneyip döngüye girip token yakıyor ve hiç bitirmiyor.
918
- const _allFailed = results.length > 0 && results.every((r) => !r.ok);
923
+ // Devre-kesici 2: KÜMÜLATIF başarısızlık curl başarılı + grep başarısız KARIŞSA bile
924
+ // (olmayan aracı/Unix sözdizimini tekrar tekrar deniyorsa "hepsi fail" tetiklenmez ama
925
+ // başarısızlıklar birikir) toplam eşiği aşınca dur+özetle.
926
+ const _failed = results.filter((r) => !r.ok).length;
927
+ totalFails += _failed;
928
+ const _allFailed = results.length > 0 && _failed === results.length;
919
929
  consecFailTurns = _allFailed ? consecFailTurns + 1 : 0;
920
- if (consecFailTurns >= 2) {
930
+ if (consecFailTurns >= 2 || totalFails >= 4) {
921
931
  historyRef.current = [...historyRef.current, {
922
932
  role: 'user',
923
933
  content: getLang() === 'en'
924
- ? 'Multiple commands failed — the required tool/syntax is not available in this environment. STOP running commands and give a SHORT summary of what you found so far, in the user\'s language. Do not call any more tools.'
925
- : 'Komutlar üst üste başarısız oldu — bu ortamda gerekli araç/sözdizimi yok. Komut çalıştırmayı BIRAK ve şu ana kadarki bulguları KISA bir özetle ver. Başka araç çağırma.',
934
+ ? '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 any more tools, and do NOT use grep/sed/awk.'
935
+ : 'Komutlar başarısız oldu — bu ortamda gerekli araç/sözdizim yok (Windows\'ta grep/openssl/hydra gibi). Komut çalıştırmayı ŞİMDİ BIRAK ve şu ana kadarki bulguları KISA bir özetle ver. Başka araç çağırma, grep/sed/awk kullanma.',
926
936
  }];
927
937
  push({ kind: 'note', text: getLang() === 'en' ? 'Commands kept failing — wrapping up with a summary.' : 'Komutlar başarısız oldu — özetle bitiriliyor.' });
928
938
  consecFailTurns = 0;
939
+ totalFails = 0;
929
940
  }
930
941
  }
931
942
  if (!done)
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.114';
19
+ export const VERSION = '1.0.115';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.114",
3
+ "version": "1.0.115",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {