natureco-cli 5.4.13 → 5.4.14

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.13",
3
+ "version": "5.4.14",
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"
@@ -590,10 +590,21 @@ async function startRepl(args) {
590
590
  }
591
591
  console.log(tui.C.muted(' Komutlar: ') + tui.C.yellow('/help') + tui.C.muted(' · ') + tui.C.yellow('/memory') + tui.C.muted(' · ') + tui.C.yellow('/sessions') + tui.C.muted(' · ') + tui.C.yellow('/exit'));
592
592
  console.log('');
593
- // v5.4.7: Hard-coded kimlik — model once bunu okusun
594
- console.log(tui.C.brand(' 👋 Ben ' + (memory.botName || 'İchigo') + ', ' + (userName || 'kanka') + '. Sen nasilsin?'));
593
+ // v5.4.7: Hard-coded kimlik
594
+ const displayBotName = memory.botName || 'İchigo';
595
+ const displayUserName = userName || 'kanka';
596
+ console.log(tui.C.brand(' 👋 Ben ' + displayBotName + ', ' + displayUserName + '. Sen nasilsin?'));
595
597
  console.log('');
596
598
 
599
+ // v5.4.14: SOUL'dan onemli bilgileri de goster
600
+ if (soulSummary) {
601
+ const soulPreview = soulSummary.split('\n').slice(0, 3).join(' ').substring(0, 200);
602
+ if (soulPreview) {
603
+ console.log(tui.C.muted(' 📜 ' + soulPreview + '...'));
604
+ console.log('');
605
+ }
606
+ }
607
+
597
608
  let totalInputTokens = 0;
598
609
  let totalOutputTokens = 0;
599
610
 
@@ -878,6 +889,9 @@ async function startRepl(args) {
878
889
  toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo'); // İchigo5, İchigo.5, İchigo-2, İchigo_3
879
890
  toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo');
880
891
  toProcess = toProcess.replace(/İchigo\./g, 'İchigo');
892
+ // v5.4.14: Once "Ben İchigo" + devam eden harf varsa "İchigo" kes
893
+ toProcess = toProcess.replace(/Ben\s+İchigo([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'Ben İchigo $1');
894
+ toProcess = toProcess.replace(/(İchigo)(\d)([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, '$1 $3'); // v5.4.14: İchigo5b -> İchigo b
881
895
  toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*\b/gi, 'Ben İchigo');
882
896
  toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*/gi, 'Ben İchigo');
883
897
  process.stdout.write(toProcess);
package/src/tools/soul.js CHANGED
@@ -79,21 +79,27 @@ function loadAgents() {
79
79
  }
80
80
 
81
81
  /**
82
- * Bir metni ozetlestir - onemli kisimlari tut (baslik, listeler, ozet cumleler)
83
- * ~2000 karakter ideal, system prompt icin yeterli
82
+ * v5.4.14: Daha akilli ozetleme - basliklar, listeler, kalin yazilar, onemli paragraflar
83
+ * ~1500 karakter ideal, modelin fine-tune'una sigmayan kisim
84
84
  */
85
- function summarizeSoul(content, maxLen = 2000) {
85
+ function summarizeSoul(content, maxLen = 1500) {
86
86
  if (!content || content.length <= maxLen) return content;
87
87
  const lines = content.split("\n");
88
88
  const important = [];
89
89
  let charCount = 0;
90
90
  for (const line of lines) {
91
+ // Oncelikli: basliklar, listeler, bold metin
91
92
  if (line.startsWith("# ") || line.startsWith("## ") ||
92
93
  line.startsWith("### ") || line.startsWith("- ") ||
93
94
  line.startsWith("**") || /^\d+\./.test(line)) {
94
95
  if (charCount + line.length > maxLen) break;
95
96
  important.push(line);
96
97
  charCount += line.length + 1;
98
+ } else if (line.length > 0 && line.length < 200 && !line.startsWith("|") && charCount < maxLen * 0.8) {
99
+ // Kisa paragraflari da al (ilk 1500 icin)
100
+ if (charCount + line.length > maxLen) break;
101
+ important.push(line);
102
+ charCount += line.length + 1;
97
103
  }
98
104
  }
99
105
  return important.join("\n");
@@ -105,9 +111,10 @@ function summarizeSoul(content, maxLen = 2000) {
105
111
  function buildSoulContext() {
106
112
  const all = findAll();
107
113
  const parts = [];
114
+ // Her dosyadan onemli kisimlari - toplam 4500 char'i gecmesin (model fine-tune sinir)
108
115
  for (const file of SOUL_FILES) {
109
116
  if (all[file]) {
110
- const summary = summarizeSoul(all[file].content, 2000);
117
+ const summary = summarizeSoul(all[file].content, 1500);
111
118
  parts.push("=== " + (FILE_DESCRIPTIONS[file] || file) + " (" + file + ") ===\n" + summary);
112
119
  }
113
120
  }