wormclaude 1.0.117 → 1.0.118

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
@@ -35,7 +35,7 @@ function loadSession() {
35
35
  }
36
36
  import { theme, VERSION } from './theme.js';
37
37
  import { loadConfig, streamChat, fetchAccount } from './api.js';
38
- import { stripInlineToolCalls } from './inlinetools.js';
38
+ import { stripInlineToolCalls, stripEchoBlocks } from './inlinetools.js';
39
39
  import { newTrace, flushTelemetry } from './telemetry.js';
40
40
  import { tier } from './program.js';
41
41
  import { allToolSchemas, executeToolCalls, executeTool, toolLabel, setToolConfig, setBashCwd } from './tools.js';
@@ -782,7 +782,7 @@ function App() {
782
782
  // Canlı akışta da gömülü tool-call JSON'unu gizle: model uzun çok-adımlı mesaj yazarken
783
783
  // ham {"name":"Bash",...} görünmesin. (stripInlineToolCalls "name" yoksa hemen döner →
784
784
  // düz metinde maliyet yok.) Tamamlanmamış son blok doğal olarak kalır, sonra temizlenir.
785
- const cleaned = stripInlineToolCalls(cleanModelText(assistantText));
785
+ const cleaned = stripEchoBlocks(stripInlineToolCalls(cleanModelText(assistantText)));
786
786
  const tail = cleaned.length > TAIL_CHARS ? cleaned.slice(-TAIL_CHARS) : cleaned;
787
787
  setStreaming(tail);
788
788
  setTokens(Math.round(assistantText.length / 4));
@@ -815,7 +815,7 @@ function App() {
815
815
  assistantText = cleanModelText(assistantText);
816
816
  // Model araç çağrısını metne gömdüyse (gömülü JSON / AskUserQuestion prose) → gösterim+
817
817
  // geçmişten temizle. HER ZAMAN çalıştır: recovery kaçsa bile ham JSON ekrana sızmasın.
818
- assistantText = stripInlineToolCalls(assistantText);
818
+ assistantText = stripEchoBlocks(stripInlineToolCalls(assistantText));
819
819
  // Reactive compact: bağlam taştıysa bir kez özetle ve turu tekrar dene
820
820
  if (gotCtxError && !reactiveRetried) {
821
821
  reactiveRetried = true;
@@ -128,6 +128,17 @@ export function recoverInlineToolCalls(text) {
128
128
  }
129
129
  return out;
130
130
  }
131
+ /** Modelin komut/çıktıyı TEKRAR yazdığı kod-bloklarını siler (```plaintext/bash/http/console…).
132
+ * Zayıf 32B araç çıktısını (SSL handshake, header'lar, curl gövdesi) cevabında reproduce edip
133
+ * context'i şişiriyor + ekranı kirletiyor. Bunlar narrasyon — tool zaten çalıştı, sonucu kompakt
134
+ * gösteriliyor. NOT: python/js/ts/css gibi GERÇEK kod dilleri korunur (build çıktısı bozulmasın). */
135
+ const _ECHO_LANGS = /^(plaintext|plain|text|txt|http|https|console|bash|sh|shell|zsh|cmd|powershell|ps1|output|log|raw)$/i;
136
+ export function stripEchoBlocks(text) {
137
+ let s = text || '';
138
+ // Yalnız AÇIK echo-dilli blokları sil (dilsiz/python/js/html korunur → build çıktısı bozulmaz).
139
+ s = s.replace(/```([a-zA-Z0-9_+-]+)[ \t]*\r?\n([\s\S]*?)```/g, (blk, lang) => (_ECHO_LANGS.test(lang) ? '' : blk));
140
+ return s.replace(/\n{3,}/g, '\n\n').trim();
141
+ }
131
142
  /** Kurtarılan çağrı bloklarını GÖRÜNTÜ/geçmiş metninden temizler (çirkin JSON kalmasın). */
132
143
  export function stripInlineToolCalls(text) {
133
144
  let s = text || '';
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.117';
19
+ export const VERSION = '1.0.118';
package/dist/tui.js CHANGED
@@ -11,7 +11,7 @@ import { sanitizeOutput } from './errorsan.js';
11
11
  import { itemAnsi, markdownAnsi } from './ansi.js';
12
12
  import { theme, VERSION } from './theme.js';
13
13
  import { cleanModelText } from './textclean.js';
14
- import { stripInlineToolCalls } from './inlinetools.js';
14
+ import { stripInlineToolCalls, stripEchoBlocks } from './inlinetools.js';
15
15
  import { COMMANDS, runSlashCommand } from './commands.js';
16
16
  import { cmdDesc, t, setLang, loadLang, getLang } from './i18n.js';
17
17
  import { getSkill, getSkills, buildSkillPrompt } from './skills.js';
@@ -328,7 +328,7 @@ export async function runTui() {
328
328
  return;
329
329
  // Gömülü araç-çağrısı JSON'unu (```json {"name":...}```) stdout'a YAZMADAN gizle —
330
330
  // stdout append-only, sonradan silinemez. Kesimler fence-güvenli → tam blok burada.
331
- const chunk = stripInlineToolCalls(cleanModelText(answer.slice(committed, cut))).replace(/\n+$/, '');
331
+ const chunk = stripEchoBlocks(stripInlineToolCalls(cleanModelText(answer.slice(committed, cut)))).replace(/\n+$/, '');
332
332
  committed = cut;
333
333
  if (!chunk && !final)
334
334
  return;
@@ -371,7 +371,7 @@ export async function runTui() {
371
371
  catch { }
372
372
  continue; // tur sayılmaz, kaldığı yerden devam
373
373
  }
374
- answer = stripInlineToolCalls(cleanModelText(answer)).trim();
374
+ answer = stripEchoBlocks(stripInlineToolCalls(cleanModelText(answer))).trim();
375
375
  const am = { role: 'assistant', content: answer || '' };
376
376
  if (toolCalls.length)
377
377
  am.tool_calls = toolCalls.map((t) => ({ id: t.id, type: 'function', function: { name: t.name, arguments: t.args || '{}' } }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {