wormclaude 1.0.68 → 1.0.70

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/ansi.js CHANGED
@@ -173,7 +173,7 @@ export function itemAnsi(it, cols) {
173
173
  const n = (it.result || '').split('\n').length, chars = (it.result || '').length;
174
174
  const head = paint('✶ ', theme.redBright, true) + paint(it.label || '', theme.white);
175
175
  const sub = paint(' ⎿ ', theme.greyDim) + (it.ok
176
- ? paint(`${n} ${t('common.lines') || 'satır'} (${chars})`, theme.grey)
176
+ ? paint(`${n} ${t('common.lines') || 'satır'}`, theme.grey)
177
177
  : paint('✗ ' + (it.result || '').slice(0, 160), theme.errorRed));
178
178
  return '\n' + head + '\n' + sub;
179
179
  }
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.68';
19
+ export const VERSION = '1.0.70';
package/dist/tools.js CHANGED
@@ -391,7 +391,7 @@ export const toolSchemas = [
391
391
  type: 'function',
392
392
  function: {
393
393
  name: 'WebSearch',
394
- description: 'Search the web and return top results (title, url, snippet). Use for current info, docs, or finding pages to WebFetch.',
394
+ description: 'Search the web; returns top results (title, url, snippet). For an EXACT current value (price, exchange rate, score, today date) the snippet often lacks the live number — WebFetch the most relevant result URL to read the real value before answering. NEVER invent or guess a number; if you cannot verify, say so.',
395
395
  parameters: {
396
396
  type: 'object',
397
397
  properties: {
@@ -791,7 +791,12 @@ export function toolLabel(name, args) {
791
791
  if (name === 'Grep')
792
792
  return `Grep(${args.pattern})`;
793
793
  if (name === 'WebFetch')
794
- return `WebFetch(${args.url})`;
794
+ return `🌐 ${(() => { try {
795
+ return new URL(args.url).hostname;
796
+ }
797
+ catch {
798
+ return String(args.url).slice(0, 50);
799
+ } })()}`;
795
800
  if (name === 'Agent')
796
801
  return `Agent(${args.description || ''}${args.subagent_type ? ':' + args.subagent_type : ''}${args.run_in_background ? ', bg' : ''})`;
797
802
  if (name === 'TaskOutput')
@@ -801,7 +806,7 @@ export function toolLabel(name, args) {
801
806
  if (name === 'Skill')
802
807
  return `Skill(${args.name})`;
803
808
  if (name === 'WebSearch')
804
- return `WebSearch(${args.query})`;
809
+ return `🔍 Web arandı: ${String(args.query).slice(0, 50)}`;
805
810
  if (name === 'TodoWrite')
806
811
  return `TodoWrite(${(args.todos || []).length} öğe)`;
807
812
  if (name === 'PowerShell')
@@ -1200,21 +1205,23 @@ export async function executeTool(name, args) {
1200
1205
  const q = encodeURIComponent(String(args.query || ''));
1201
1206
  const max = Number(args.max_results) || 5;
1202
1207
  const res = await fetch(`https://html.duckduckgo.com/html/?q=${q}`, {
1203
- headers: { 'User-Agent': 'Mozilla/5.0' }, signal: AbortSignal.timeout(20000),
1208
+ headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36' }, signal: AbortSignal.timeout(20000),
1204
1209
  });
1205
1210
  const html = await res.text();
1211
+ const clean = (s) => s.replace(/<[^>]+>/g, '').replace(/&amp;/g, '&').replace(/&#x27;/g, "'").replace(/&#39;/g, "'").replace(/&quot;/g, '"').replace(/\s+/g, ' ').trim();
1212
+ const titles = [...html.matchAll(/<a[^>]*class="result__a"[^>]*href="([^"]+)"[^>]*>([\s\S]*?)<\/a>/g)];
1213
+ const snips = [...html.matchAll(/class="result__snippet"[^>]*>([\s\S]*?)<\/a>/g)];
1206
1214
  const out = [];
1207
- const re = /<a[^>]*class="result__a"[^>]*href="([^"]+)"[^>]*>([\s\S]*?)<\/a>/g;
1208
- let m;
1209
- while ((m = re.exec(html)) && out.length < max) {
1210
- let url = m[1];
1215
+ for (let i = 0; i < titles.length && out.length < max; i++) {
1216
+ let url = titles[i][1];
1211
1217
  const ud = url.match(/uddg=([^&]+)/);
1212
1218
  if (ud)
1213
1219
  url = decodeURIComponent(ud[1]);
1214
- const title = m[2].replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim();
1215
- out.push(`${out.length + 1}. ${title}\n ${url}`);
1220
+ const title = clean(titles[i][2]);
1221
+ const snippet = snips[i] ? clean(snips[i][1]) : '';
1222
+ out.push(`${out.length + 1}. ${title}\n ${url}${snippet ? '\n ' + snippet : ''}`);
1216
1223
  }
1217
- return { ok: true, output: out.length ? out.join('\n') : '(sonuç yok)' };
1224
+ return { ok: true, output: out.length ? out.join('\n\n') : '(sonuç yok)' };
1218
1225
  }
1219
1226
  if (name === 'TodoWrite') {
1220
1227
  todosStore = Array.isArray(args.todos) ? args.todos : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {