natureco-cli 5.6.6 → 5.6.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "5.6.6",
3
+ "version": "5.6.8",
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"
@@ -848,14 +848,14 @@ async function startRepl(args) {
848
848
  // User mesajı
849
849
  messages.push({ role: 'user', content: line });
850
850
 
851
- // v5.4.9: Hard-coded fallback "sen kimsin?" gibi sorular icin model cevabindan once prefix
851
+ // v5.6.8: Hard-coded fallback - "sen kimsin?" sorulari icin dinamik botName
852
852
  const trimmed = (line || '').toLowerCase();
853
853
  const isIdentityQuestion = /(sen\s+kim|adin\s+ne|kendini\s+tan|kendin\s+tanit|kimsin|ne\s+adindasin)/.test(trimmed);
854
854
  if (isIdentityQuestion) {
855
- // Hard-coded "Ben İchigo" model cevap verse bile onemli degil, bu gorunur
855
+ // Hard-coded prefix artik botName'i kullaniyor
856
+ const displayName = memory.botName || 'İchigo';
856
857
  process.stdout.write(tui.styled('\n AI ', { color: tui.PALETTE.secondary, bold: true }));
857
- process.stdout.write('Ben İchigo, NatureCo CLI\'nin Türkçe yapay zeka asistanıyım. ');
858
- // Modelin devam etmesini beklemiyoruz, normal akis devam etsin
858
+ process.stdout.write('Ben ' + displayName + ', NatureCo CLI\'nin Türkçe yapay zeka asistanıyım. ');
859
859
  console.log('\n');
860
860
  }
861
861
 
@@ -892,8 +892,9 @@ async function startRepl(args) {
892
892
  c = c.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo');
893
893
  c = c.replace(/İchigo\./g, 'İchigo');
894
894
  // 4. "Ben İchigo" + sonraki harf
895
- c = c.replace(/Ben\s+İchigo([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'Ben İchigo $1');
896
- c = c.replace(/İchigo[\.\s\-_\d]*([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'İchigo $1'); // v5.4.16: İchigo.5 gibi nokta+rakam+harf
895
+ c = c.replace(/Ben\s+İchigo([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'Ben İchigo $1');
896
+ c = c.replace(/(İchigo)(\d)([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, '$1 $3');
897
+ c = c.replace(/İchigo[\.\s\-_\d]*([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'İchigo $1');
897
898
  c = c.replace(/Ben\s+İchigo\b/gi, 'Ben İchigo');
898
899
  c = c.replace(/\*\*(?:MiniMax|Claude|GPT)[^\*]*\*\*/gi, '**İchigo**'); // v5.4.17: **Markdown** model adi
899
900
  c = c.replace(/Merhaba[!]?\s+Ben[^.!?,;:\n]*MiniMax[^.!?,;:\n]*/gi, 'Merhaba! Ben İchigo');
@@ -459,23 +459,27 @@ async function cmdWizard() {
459
459
  const botName = await rlQuestion(` Bot adı: `);
460
460
  if (botName) cfg.botName = botName;
461
461
 
462
- // v5.6.5: Memory'deki botName/userName'i de guncelle
463
- // Yoksa "naruto" yazsam bile eski "ichigo" cikar
462
+ // v5.6.7: Memory dosyasi yoksa olustur, varsa guncelle
464
463
  try {
465
464
  const memFile = path.join(BASE_DIR, (userName || cfg.userName || 'default').toLowerCase() + '.json');
466
465
  let mem = {};
467
- if (fs.existsSync(memFile)) {
466
+ let memExists = fs.existsSync(memFile);
467
+ if (memExists) {
468
468
  try { mem = JSON.parse(fs.readFileSync(memFile, 'utf8')); } catch (e) {}
469
469
  }
470
470
  let memChanged = false;
471
471
  if (botName && mem.botName !== botName) { mem.botName = botName; memChanged = true; }
472
472
  if (userName && mem.name !== userName) { mem.name = userName; memChanged = true; }
473
- if (memChanged) {
473
+ // v5.6.7: Memory yoksa veya guncellenmesi gerekiyorsa yaz
474
+ if (!memExists || memChanged) {
474
475
  if (!fs.existsSync(BASE_DIR)) fs.mkdirSync(BASE_DIR, { recursive: true });
476
+ if (!fs.existsSync(path.dirname(memFile))) fs.mkdirSync(path.dirname(memFile), { recursive: true });
475
477
  fs.writeFileSync(memFile, JSON.stringify(mem, null, 2), 'utf8');
476
- console.log(chalk.gray(' ✓ Memory guncellendi'));
478
+ console.log(chalk.gray(' ✓ Memory ' + (memExists ? 'guncellendi' : 'olusturuldu') + ': ' + memFile));
477
479
  }
478
- } catch (e) {}
480
+ } catch (e) {
481
+ console.log(chalk.gray(' ! Memory yazilamadi: ' + e.message));
482
+ }
479
483
 
480
484
  // Step 4: Kanal Entegrasyonları (isteğe bağlı, isteyen atlayabilir)
481
485
  console.log('');
@@ -96,7 +96,15 @@ function loadToolDefinitions() {
96
96
  * [{ type: "function", function: { name, description, parameters } }]
97
97
  */
98
98
  function toOpenAIFormat(toolDefs) {
99
- return toolDefs.map(t => {
99
+ // v5.6.6: Yasakli tool'lari filtrele, alias'lari cozumle
100
+ return toolDefs
101
+ .filter(t => !['brave_search','brave-web-search','google_search','web_search','browse','open','search','shell','bash_command','execute_command','run_command','sql','query','lookup'].includes(t.name))
102
+ .map(t => {
103
+ // Alias varsa degistir
104
+ const ALIAS_MAP = { 'brave_search':'duckduckgo_search','brave-web-search':'duckduckgo_search','google_search':'duckduckgo_search','web_search':'duckduckgo_search','browse':'browser','shell':'bash','bash_command':'bash','execute_command':'bash','run_command':'bash' };
105
+ if (ALIAS_MAP[t.name]) {
106
+ t = { ...t, name: TOOL_ALIASES[t.name] };
107
+ }
100
108
  // v5.4.21: Groq uyumluluk - additionalProperties: false kaldirildi
101
109
  // ve gereksiz kisitlamalar temizlendi
102
110
  const cleanParams = JSON.parse(JSON.stringify(t.parameters || {}));