natureco-cli 5.4.13 → 5.4.15
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 +1 -1
- package/src/commands/repl.js +28 -3
- package/src/tools/soul.js +11 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.15",
|
|
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"
|
package/src/commands/repl.js
CHANGED
|
@@ -524,6 +524,11 @@ async function startRepl(args) {
|
|
|
524
524
|
const botName = memory.botName || 'İchigo';
|
|
525
525
|
const userName = memory.name || memory.nickname || 'kanka';
|
|
526
526
|
const systemPrompt = [
|
|
527
|
+
// === v5.4.14: EN KRITIK KIMLIK BILGILERI (her zaman ilk) ===
|
|
528
|
+
`SENIN ADIN: ${botName}. SADECE ${botName} adini kullan, model adi SOYLEME.`,
|
|
529
|
+
`PATRONUN: Gencay (Parton) — NatureCo CEO'sudur. Sana "Parton" diye hitap eder.`,
|
|
530
|
+
`HIKAYEN: 8 Nisan 2026'da uyandin. 13 Nisan'da CEO Asistanı unvani verildi.`,
|
|
531
|
+
`KIRMIZI CIZGILERIN: Onaysiz para harcama yok, veri guvenligi, site stabilitesi, resmi taahhut yok.`,
|
|
527
532
|
// === v5.4.13: EN GÜÇLÜ KİMLİK + 3 SOUL DOSYASI (EN BAŞTA) ===
|
|
528
533
|
`!!! KRİTİK KİMLİK !!! Senin ADIN: ${botName}. Bu SENİN GERÇEK ADIN. Sen ${botName}'sin.`,
|
|
529
534
|
`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.`,
|
|
@@ -590,10 +595,21 @@ async function startRepl(args) {
|
|
|
590
595
|
}
|
|
591
596
|
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
597
|
console.log('');
|
|
593
|
-
// v5.4.7: Hard-coded kimlik
|
|
594
|
-
|
|
598
|
+
// v5.4.7: Hard-coded kimlik
|
|
599
|
+
const displayBotName = memory.botName || 'İchigo';
|
|
600
|
+
const displayUserName = userName || 'kanka';
|
|
601
|
+
console.log(tui.C.brand(' 👋 Ben ' + displayBotName + ', ' + displayUserName + '. Sen nasilsin?'));
|
|
595
602
|
console.log('');
|
|
596
603
|
|
|
604
|
+
// v5.4.14: SOUL'dan onemli bilgileri de goster
|
|
605
|
+
if (soulSummary) {
|
|
606
|
+
const soulPreview = soulSummary.split('\n').slice(0, 3).join(' ').substring(0, 200);
|
|
607
|
+
if (soulPreview) {
|
|
608
|
+
console.log(tui.C.muted(' 📜 ' + soulPreview + '...'));
|
|
609
|
+
console.log('');
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
597
613
|
let totalInputTokens = 0;
|
|
598
614
|
let totalOutputTokens = 0;
|
|
599
615
|
|
|
@@ -857,7 +873,13 @@ async function startRepl(args) {
|
|
|
857
873
|
global._fixBuffer += c;
|
|
858
874
|
|
|
859
875
|
const lastChar = global._fixBuffer.slice(-1);
|
|
860
|
-
|
|
876
|
+
const lastTwo = global._fixBuffer.slice(-2);
|
|
877
|
+
// v5.4.14 FINAL: Tüm noktalama + rakam+harf gecisi + uzun buffer
|
|
878
|
+
const shouldProcess = /[.!?,;:()\[\]{}\|]/.test(lastChar) || // tum noktalama
|
|
879
|
+
/\d[a-zA-ZçğıöşüÇĞİÖŞÜ]/.test(lastTwo) || // İchigo5b
|
|
880
|
+
(global._fixBuffer.length > 15 && /\s$/.test(global._fixBuffer)) || // kelime tamamlandi
|
|
881
|
+
global._fixBuffer.length > 60; // uzun buffer
|
|
882
|
+
if (shouldProcess) {
|
|
861
883
|
let toProcess = global._fixBuffer;
|
|
862
884
|
global._fixBuffer = '';
|
|
863
885
|
// v5.4.10: Daha spesifik pattern - sadece tam model adlari
|
|
@@ -878,6 +900,9 @@ async function startRepl(args) {
|
|
|
878
900
|
toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo'); // İchigo5, İchigo.5, İchigo-2, İchigo_3
|
|
879
901
|
toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo');
|
|
880
902
|
toProcess = toProcess.replace(/İchigo\./g, 'İchigo');
|
|
903
|
+
// v5.4.14: Once "Ben İchigo" + devam eden harf varsa "İchigo" kes
|
|
904
|
+
toProcess = toProcess.replace(/Ben\s+İchigo([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, 'Ben İchigo $1');
|
|
905
|
+
toProcess = toProcess.replace(/(İchigo)(\d)([a-zA-ZçğıöşüÇĞİÖŞÜ])/g, '$1 $3'); // v5.4.14: İchigo5b -> İchigo b
|
|
881
906
|
toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*\b/gi, 'Ben İchigo');
|
|
882
907
|
toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*/gi, 'Ben İchigo');
|
|
883
908
|
process.stdout.write(toProcess);
|
package/src/tools/soul.js
CHANGED
|
@@ -79,21 +79,27 @@ function loadAgents() {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
* ~
|
|
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 =
|
|
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,
|
|
117
|
+
const summary = summarizeSoul(all[file].content, 1500);
|
|
111
118
|
parts.push("=== " + (FILE_DESCRIPTIONS[file] || file) + " (" + file + ") ===\n" + summary);
|
|
112
119
|
}
|
|
113
120
|
}
|