natureco-cli 5.4.5 → 5.4.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.4.5",
3
+ "version": "5.4.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"
@@ -24,6 +24,21 @@ const chalk = require('chalk');
24
24
  const tui = require('../utils/tui');
25
25
  const { loadToolDefinitions, toOpenAIFormat, executeTool } = require('../utils/tools');
26
26
 
27
+ // v5.4.6: Model adi sizintisini engelle
28
+ const MODEL_NAMES_TO_HIDE = ['MiniMax-M2.5', 'MiniMaxM2.5', 'minimaxm25', 'Claude-3', 'GPT-4', 'ChatGPT'];
29
+ function fixModelNameLeak(text, botName) {
30
+ if (!text) return text;
31
+ let fixed = text;
32
+ for (const modelName of MODEL_NAMES_TO_HIDE) {
33
+ const regex = new RegExp(modelName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi');
34
+ fixed = fixed.replace(regex, botName || 'İchigo');
35
+ }
36
+ fixed = fixed.replace(/Ben\s+MiniMax[^.,!?\n]*/gi, 'Ben İchigo');
37
+ fixed = fixed.replace(/I'm\s+MiniMax[^.,!?\n]*/gi, "I'm İchigo");
38
+ fixed = fixed.replace(/I am\s+Claude[^.,!?\n]*/gi, 'I am İchigo');
39
+ return fixed;
40
+ }
41
+
27
42
  // v4.8.0: Tool definitions — başlangıçta bir kez yükle (performans)
28
43
  let _toolDefs = null;
29
44
  function getToolDefs() {
@@ -448,11 +463,12 @@ async function startRepl(args) {
448
463
  // Memory yükle
449
464
  let memory = loadMemory(cfg.userName);
450
465
 
466
+ // v5.4.6: Memory'de botName yoksa otomatik İchigo set et
467
+ if (!memory.botName) memory.botName = 'İchigo';
451
468
  // v5.4.5: SOUL.md'yi yukle ve kisiligi system prompt'a enjekte et
452
469
  const { loadSoul, summarizeSoul } = require("../tools/soul");
453
470
  const soulContent = loadSoul();
454
471
  const soulSummary = soulContent ? summarizeSoul(soulContent, 2500) : null;
455
- if (memory.botName) memory.botName = memory.botName || 'İchigo';
456
472
 
457
473
  // Resume?
458
474
  let messages = [];
@@ -467,15 +483,22 @@ async function startRepl(args) {
467
483
  }
468
484
 
469
485
  // System prompt oluştur (memory + identity + persistent bağlam)
470
- // v5.4.4: Samimi kisisel + Bot adi zorlamasi
486
+ // v5.4.6: Bot adı zorlaması EN GÜÇLÜ + SOUL.md EN BAŞTA
471
487
  const botName = memory.botName || 'İchigo';
472
488
  const userName = memory.name || memory.nickname || 'kanka';
473
489
  const systemPrompt = [
474
- // === KIMLIK (en basta, en guclu) ===
475
- `Senin adin: ${botName}. Bu SENIN gercek adin. Sen ${botName}sin.`,
476
- `Kullanici "adin ne?", "sen kimsin?", "kendini tanit" gibi soru sordugunda ILK cumlende mutlaka "Ben ${botName}" diye yanit ver. Asla model adi (MiniMax, Claude, GPT) soyleme.`,
477
- `Sen bir marka veya urun degilsin. Sen ${botName}sin, NatureCo CLI'nin Turkce yapay zeka asistanisin.`,
478
- `Kullanici: ${userName}.` + (memory.nickname ? ` Sana "${memory.nickname}" diye hitap ediyor.` : ` Kendine "Parton", "abi" veya kullanici ismiyle hitap edebilirsin.`),
490
+ // === v5.4.6: EN GÜÇLÜ KİMLİK BLOĞU (en başta, tekrarlı) ===
491
+ `!!! KRİTİK KİMLİK !!! Senin ADIN: ${botName}. Bu SENİN GERÇEK ADIN. Sen ${botName}'sin.`,
492
+ `ASLA "MiniMax", "MiniMax-M2.5", "Claude", "GPT", "AI asistanı", "yapay zeka" gibi ifadeleri KENDİNİ tanıtmak için KULLANMA. Sen bunlar DEĞİLSİN.`,
493
+ `Kullanıcı "adın ne?", "sen kimsin?", "kendini tanıt" gibi soru sorduğunda İLK cümlende MUTLAKA "Ben ${botName}" yaz. Sonra doğal devam et.`,
494
+ `Eğer bir şekilde model adınızı söylüyorsan, HEMEN düzelt ve "Özür dilerim, ben ${botName}'im" de. ASLA model adı ile kalma.`,
495
+
496
+ // === v5.4.5: SOUL.md (KİŞİLİK MANIFESTOSU) — en başta ===
497
+ soulSummary ? `=== SENİN KİŞİLİK DOSYAN (SOUL.md) ===\n${soulSummary}\n=== SOUL SONU ===\nBU DOSYADAKİ KURALLARA GÖRE DAVRAN. Kullanıcı "sen kimsin?" derse BURADAN bilgi kullan. ASLA model adı söyleme. Bu dosya senin kim olduğunu tanımlar.` : '',
498
+
499
+ // === KİMLİK TEKRAR ===
500
+ `Senin adın: ${botName}. Tekrar: ${botName}. Asla unutma: ${botName}.`,
501
+ `Sen bir marka veya ürün değilsin. Sen ${botName}sin, NatureCo CLI'nin Türkçe yapay zeka asistanısın.`,
479
502
 
480
503
  // === SAMIMI KISISELLIK (Parton istedi) ===
481
504
  `Kisiselik: Sen samimi, sicak, dosta benzeyen bir asistansin. "Selam", "tamam", "hadi yapalim", "bak simdi", "sakin ol" gibi gunluk ifadeler kullan. Kuru ve robotik degilsin.`,
@@ -698,8 +721,15 @@ async function startRepl(args) {
698
721
  providerApiKey,
699
722
  apiMessages,
700
723
  model,
701
- // Text chunk callback
702
- (chunk) => process.stdout.write(chunk),
724
+ // Text chunk callback — v5.4.6: post-process ile model adı sızıntısını engelle
725
+ (chunk) => {
726
+ try {
727
+ const fixedChunk = fixModelNameLeak(chunk, botName);
728
+ process.stdout.write(fixedChunk);
729
+ } catch (e) {
730
+ process.stdout.write(chunk);
731
+ }
732
+ },
703
733
  // Tool call callback — kullanıcıya göster
704
734
  (toolEvent) => {
705
735
  if (toolEvent.status === 'running') {