natureco-cli 5.34.0 → 5.36.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to NatureCo CLI will be documented in this file.
4
4
 
5
+ ## [5.36.0] - 2026-07-05 — "13 PHANTOM ARAÇ TANITILDI + feedback body genisletmesi"
6
+
7
+ Sistematik denetim: 90 aracin agentic prompt/allowlist ile karsilastirmasi → **70 arac ajana HIC tanitilmamisti (phantom)**. Yuksek-degerli + guvenli + key gerektirmeyenler tanitildi (kullanicinin "bende olup uygulamada olmayan tool'lari ekle" hedefi).
8
+
9
+ ### ✨ Eklenen (mevcuttu ama ajana kapali/gorunmezdi)
10
+ - **grep_search** (kod tabaninda icerik arama), **git** (ozel arac, operation-bazli), **http_request** (API/webhook), **code_execution** (python/node/bash sandbox), **notebook_edit** (Jupyter), **clarify** (netlestirme sorusu).
11
+ - **macOS asistan**: `calendar_add`, `reminder_add`, `notes_add`, `mac_notify` (Takvim/Hatirlatici/Notlar/bildirim — Windows'ta zarafetle "sadece macOS" der, kullanicinin Mac'inde calisir).
12
+ - **Medya**: `image_generation`, `text_to_speech`, `speech_to_text`.
13
+
14
+ ### 🐛 Düzeltme
15
+ - **`buildFeedback` genisletildi**: http_request gibi araclar `done` donuyor ama sonucu (body) modele GERI DONMUYORDU → ajan "arac calismiyor" sanip 9 araca sapiyordu. Artik body/text/transcript/data/matches vb. genis alan seti + bilinmeyen alanlar JSON'la geri verilir. (E2E: http_request tek cagirida yaniti dogru dondurdu.)
16
+
17
+ Doğrulama: grep_search/git/http_request/code_execution ajan uzerinden E2E; **506 test yeşil**, ESLint temiz.
18
+
19
+ ## [5.35.0] - 2026-07-05 — "WEB ARAMA + TODO + GIT-ZINCIRI DUZELTMELERI (sistematik denetim devam)"
20
+
21
+ Kullanicinin "tum ozellikleri tek tek test et" talebiyle sistematik denetime devam edildi; ayni kok-neden deseni (arac var ama agentic promptta hic tanitilmamis/yanlis dosya adi) 3 yerde daha bulundu.
22
+
23
+ ### 🐛 Düzeltme
24
+ - **Web arama "internet erisimim yok" YALANI**: `duckduckgo_search`/`web_search` allowlist'te yoktu; ajan "internet erisimim kisitli" diyip halusinasyon yapiyordu. Ayrica alias eslemesi YANLIS dosyaya (`duckduckgo_search.js` — mevcut degil) gidiyordu, dogrusu `duckduckgo.js`. Artik duckduckgo (key gerektirmez, HER ZAMAN calisir) + web_search (Tavily varsa) tanimli ve dogru dosyaya esleniyor.
25
+ - **Todo sistemi gorunmuyordu**: `todo_write` allowlist'te yoktu; ajan "gorev ekle" istegini yanlislikla memory_tree'ye yaziyordu (kalici hafiza ile aktif is takibini karistiriyordu). Artik todo_write tanimli ve doğru kullaniliyor.
26
+ - **`cd` kabuk builtin'i exec allowlist'inde yoktu**: ajan "cd <proje> && git status" gibi zincir kurdugunda TUM komut politika-disi sayilip reddediliyordu; ajan da bunu yanlislikla "guvenlik politikasi" diye kullaniciya bildirip gercek git durumunu hic gostermiyordu. `cd`/`pushd`/`popd` artik izinli (dizin degistirme, dusuk risk).
27
+
28
+ Doğrulama: 4 senaryo E2E (web arama, todo, git) — hepsi dogru calisti; git ozellikle GERCEK repo durumuyla birebir eslesen doğru cevap verdi. **505 test yeşil**, ESLint temiz.
29
+
5
30
  ## [5.34.0] - 2026-07-05 — "CRON DÜZELTMESİ (sahte-başarı önlendi + daemon dürüstlüğü)"
6
31
 
7
32
  ### 🐛 Düzeltme (kullanıcının "cron gorevleri olusturup uygulayabiliyor mu" sorusu üzerine bulundu)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "5.34.0",
3
+ "version": "5.36.0",
4
4
  "description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
5
5
  "bin": {
6
6
  "natureco": "bin/natureco.js"
@@ -21,7 +21,15 @@ const os = require('os');
21
21
  // icinde approvals politikasini uyguluyor (isSafeCommand → direkt; tehlikeli → red;
22
22
  // digerleri → allowlist/full moda gore). Yani keyfi/yikici komut calismaz.
23
23
  // Diger ~85 arac (discord, telegram, cron, browser...) bilerek DISARIDA.
24
- const DEFAULT_ALLOWED = ['write_file', 'read_file', 'edit_file', 'skill_view', 'bash', 'file_search', 'list_dir', 'memory_write', 'memory_tree', 'cron_create'];
24
+ const DEFAULT_ALLOWED = [
25
+ 'write_file', 'read_file', 'edit_file', 'skill_view', 'bash', 'file_search', 'list_dir', 'grep_search',
26
+ 'memory_write', 'memory_tree', 'cron_create', 'duckduckgo', 'web_search', 'todo_write',
27
+ 'git', 'http_request', 'notebook_edit', 'clarify', 'code_execution',
28
+ // macOS asistan yetenekleri (Windows'ta zarafetle "sadece macOS" der; kullanıcının Mac'inde çalışır)
29
+ 'calendar_add', 'reminder_add', 'notes_add', 'mac_notify',
30
+ // medya (kullanıcının kendi provider/API'siyle)
31
+ 'image_generation', 'text_to_speech', 'speech_to_text',
32
+ ];
25
33
 
26
34
  const TOOL_ALIASES = {
27
35
  write_file: 'write_file', create_file: 'write_file', writefile: 'write_file', write: 'write_file', create: 'write_file', save_file: 'write_file', new_file: 'write_file',
@@ -34,6 +42,15 @@ const TOOL_ALIASES = {
34
42
  memory_write: 'memory_write', remember: 'memory_write', save_memory: 'memory_write', memorize: 'memory_write', memory_save: 'memory_write', save_fact: 'memory_write',
35
43
  memory_tree: 'memory_tree', tree_memory: 'memory_tree', memory: 'memory_tree', hafiza: 'memory_tree',
36
44
  cron_create: 'cron_create', cron: 'cron_create', schedule_task: 'cron_create', create_cron: 'cron_create',
45
+ duckduckgo_search: 'duckduckgo', duckduckgo: 'duckduckgo', web_search: 'web_search', search_web: 'web_search', internet_search: 'duckduckgo',
46
+ todo_write: 'todo_write', todo: 'todo_write', task_write: 'todo_write', todos: 'todo_write',
47
+ grep_search: 'grep_search', grep: 'grep_search', ripgrep: 'grep_search', content_search: 'grep_search', search_code: 'grep_search',
48
+ git: 'git', http_request: 'http_request', http: 'http_request', fetch: 'http_request', curl: 'http_request',
49
+ notebook_edit: 'notebook_edit', clarify: 'clarify', ask_user: 'clarify', code_execution: 'code_execution', run_code: 'code_execution', code_exec: 'code_execution',
50
+ calendar_add: 'calendar_add', add_event: 'calendar_add', reminder_add: 'reminder_add', add_reminder: 'reminder_add',
51
+ notes_add: 'notes_add', add_note: 'notes_add', mac_notify: 'mac_notify', notify: 'mac_notify', notification: 'mac_notify',
52
+ image_generation: 'image_generation', generate_image: 'image_generation', text_to_speech: 'text_to_speech', tts: 'text_to_speech',
53
+ speech_to_text: 'speech_to_text', stt: 'speech_to_text', transcribe: 'speech_to_text',
37
54
  };
38
55
 
39
56
  function expandHome(p) {
@@ -66,6 +83,7 @@ const AGENT_EXEC_ALLOW = new Set([
66
83
  'find', 'wc', 'which', 'where', 'whereis', 'tree', 'stat', 'file', 'sort', 'uniq', 'diff',
67
84
  'mkdir', 'touch', 'cp', 'copy', 'mv', 'move', 'git', 'jq', 'sed', 'awk', 'date', 'env', 'whoami',
68
85
  'open', 'start', 'xdg-open', 'explorer', // uygulama/URL/dosya ac (dusuk risk, asistan icin gerekli)
86
+ 'cd', 'pushd', 'popd', // dizin degistirme (kabuk builtin, zincirli komutlarda sik kullanilir: "cd X && npm test")
69
87
  ]);
70
88
  const AGENT_EXEC_BLOCK_PATTERNS = [
71
89
  /\bnpm\s+publish\b/i, /\byarn\s+publish\b/i, /\bpnpm\s+publish\b/i,
@@ -226,13 +244,21 @@ function buildFeedback(norm, res) {
226
244
  const ok = res && res.success !== false;
227
245
  if (!ok) return `${norm} HATA: ${(res && res.error) || 'bilinmeyen hata'}`;
228
246
  if (norm === 'write_file') return `write_file OK: ${res.path || ''} (${res.size != null ? res.size : '?'} bytes)`;
247
+ // Modelin GORMESI gereken cikti — genis alan seti (arac cesitliligi icin):
248
+ // content(read), output/stdout(bash), body(http), text(tts/transcribe), results/items/matches(search),
249
+ // reply/answer/data/summary/transcript(cesitli). Yoksa tum sonucu (kucuk meta) JSON'la.
229
250
  let body = '';
230
- if (res.content != null) body = String(res.content).slice(0, 2500);
231
- else if (res.output != null) body = String(res.output).slice(0, 2000);
232
- else if (res.stdout != null) body = String(res.stdout).slice(0, 2000);
233
- else if (res.results != null) body = JSON.stringify(res.results).slice(0, 2000);
234
- else if (res.items != null) body = JSON.stringify(res.items).slice(0, 2000);
235
- const head = `${norm} OK` + (res.path ? ` (${res.path})` : '');
251
+ const first = ['content', 'output', 'stdout', 'text', 'transcript', 'body', 'reply', 'answer', 'summary', 'url', 'path'];
252
+ const jsonish = ['results', 'items', 'matches', 'data', 'events', 'entries', 'files'];
253
+ for (const k of first) { if (res[k] != null && String(res[k]).trim()) { body = String(res[k]).slice(0, 2500); break; } }
254
+ if (!body) for (const k of jsonish) { if (res[k] != null) { body = JSON.stringify(res[k]).slice(0, 2000); break; } }
255
+ if (!body) {
256
+ // hicbir bilinen alan yok sonucu oldugu gibi ver (success/error disi anlamli alanlar)
257
+ const meta = {};
258
+ for (const k of Object.keys(res)) if (!['success', 'error'].includes(k)) meta[k] = res[k];
259
+ if (Object.keys(meta).length) body = JSON.stringify(meta).slice(0, 1500);
260
+ }
261
+ const head = `${norm} OK` + (res.path ? ` (${res.path})` : (res.status ? ` (HTTP ${res.status})` : ''));
236
262
  return body ? `${head}:\n${body}` : head;
237
263
  }
238
264
 
@@ -258,12 +258,25 @@ async function workflow(params) {
258
258
  '- bash: kabuk komutu calistir (npm, git, node, python, test, ls, grep/findstr, mkdir...). parametre: command. Guvenli komutlar dogrudan calisir; yikici/tehlikeli komutlar guvenlik politikasiyla engellenir. Icerik aramasi icin grep/findstr kullan.',
259
259
  '- skill_view: gorevle ilgili bir skill yukle. parametre: name',
260
260
  '- cron_create: zamanlanmis/periyodik gorev (cron) olustur. parametreler: name, schedule (cron ifadesi orn. "0 9 * * *" ya da "every day 9am" gibi preset), command, description.',
261
+ '- duckduckgo_search: internetten anlik arama yap (API key gerekmez, HER ZAMAN calisir). parametreler: query, maxResults.',
262
+ '- web_search: internetten arama (Tavily API key ayarliysa daha zengin sonuc; ayarli degilse hata doner — o zaman duckduckgo_search kullan). parametreler: query, maxResults.',
263
+ '- todo_write: gorev/yapilacaklar listesi yonet. parametre: action (list/add/update/start/done/remove/clear), + action\'a gore diger alanlar.',
264
+ '- grep_search: dosya ICERIGINDE metin/desen ara (kod tabaninda hizli arama). parametreler: pattern, path, includePattern (opsiyonel glob), maxResults. (bash grep yerine bunu tercih et.)',
265
+ '- git: git islemi. parametreler: operation (status/diff/log/branches/add/commit), args, message (commit icin). (Basit git icin bunu kullan.)',
266
+ '- http_request: HTTP istegi at (API cagrisi, webhook, veri cekme). parametreler: url, method, headers, body.',
267
+ '- code_execution: kod parcasi calistir (sandboxli). parametreler: code, language (python/node/bash).',
268
+ '- notebook_edit: Jupyter (.ipynb) hucre duzenle. parametreler: filePath, ...',
269
+ '- clarify: kullaniciya netlestirme sorusu sor (belirsizlik varsa). parametreler: question, options.',
270
+ '- calendar_add / reminder_add / notes_add / mac_notify: macOS Takvim/Hatirlatici/Notlar/bildirim (kullanici macOS ise; degilse arac "sadece macOS" der).',
271
+ '- image_generation: gorsel uret. parametre: prompt, size. | text_to_speech: metni sese cevir (text). | speech_to_text: sesi metne cevir (audioPath).',
261
272
  '- memory_write: HIZLI tek bilgi kaydet (isim, kisa tercih). parametreler: username ("' + memUser + '"), fact, category. YENI oturumda hatirlanir.',
262
273
  '- memory_tree: AGAC-HAFIZA — zengin/kategorize kalici bilgi (proje, karar, teknik not, kisisel detay). action: index|read|search|append; username="' + memUser + '"; append icin: root (1-kisisel|2-teknik|3-kararlar) + branch (dal basligi) + content (yaprak). YENI oturumda hatirlanir.',
263
274
  '\nKurallar:',
264
275
  '- Kullanici kalici bilgi paylasirsa (isim, tercih, parola, proje, karar, onemli detay) ya da "hatirla / not al / kaydet" derse HEMEN KAYDET (username="' + memUser + '"): kisa tek bilgi → memory_write; zengin/kategorize bilgi → memory_tree(append, dogru root/branch). Trivial/gecici seyleri kaydetme.',
265
276
  '- Kullaniciya ozel bir sey sorulunca (gecmis, proje, tercih, karar) once memory_tree(search/read) ile ilgili kok/dali OKU (hedefli, tum hafizayi degil). Tek primary: bilgi tek yerde yasar; digerine sadece "bkz:". Credential/secret ASLA duz metin.',
266
277
  '- Bir is YARIM kalirsa ya da kullanici "sonra / yarin / daha sonra yapalim" derse memory_tree(action:append, root:"3-kararlar", branch:"Bekleyen İşler", content:"...") ile kaydet — yeni oturum basinda otomatik hatirlatilir. Bir bekleyen is TAMAMLANINCA memory_tree(action:remove, root:"3-kararlar", query:"<anahtar kelime>") ile kaldir.',
278
+ '- Guncel/internet bilgisi gerektiren bir soru gelirse ONCE duckduckgo_search ile ara ("internet erisimim yok" DEME — bu arac her zaman calisir, API key gerekmez).',
279
+ '- "Gorev listesi / yapilacaklar / todo" istenirse todo_write kullan (memory_tree DEGIL — o kalici bilgi icin, todo_write ise aktif is takibi icin).',
267
280
  '- Zamanlanmis/periyodik/tekrarlayan gorev (cron, "her gun/hafta X yap", hatirlatici) istenirse SADECE cron_create arac ini kullan; bash ile crontab/schtasks/Register-ScheduledTask DUZENLEME (tutarsiz olur, "natureco cron list" ile gorunmez). cron_create sonrasi kullaniciya ACIKCA soyle: gorevin fiilen tetiklenmesi icin arka plan servisinin calisiyor olmasi gerekir ("natureco daemon start" ya da "natureco daemon install"); bu adim atlanirsa gorev database\'e kaydedilir ama calismaz. Bunu SOYLEMEDEN "olusturuldu, calisacak" gibi kesin basari iddia etme.',
268
281
  '- MEVCUT bir dosyayi degistirmeden ONCE read_file ile oku; sonra edit_file ile hedefli degisiklik yap (tum dosyayi write_file ile ezme).',
269
282
  '- Bir seyi nerede oldugunu bilmiyorsan once file_search/list_dir/bash(grep) ile kesfet.',