natureco-cli 5.6.5 → 5.6.7

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.5",
3
+ "version": "5.6.7",
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"
@@ -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'deki botName/userName 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 || {}));