natureco-cli 5.4.12 → 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 +1 -1
- package/src/commands/repl.js +22 -5
- 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.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"
|
package/src/commands/repl.js
CHANGED
|
@@ -524,14 +524,14 @@ 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.
|
|
527
|
+
// === v5.4.13: EN GÜÇLÜ KİMLİK + 3 SOUL DOSYASI (EN BAŞTA) ===
|
|
528
528
|
`!!! KRİTİK KİMLİK !!! Senin ADIN: ${botName}. Bu SENİN GERÇEK ADIN. Sen ${botName}'sin.`,
|
|
529
529
|
`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.`,
|
|
530
530
|
`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.`,
|
|
531
531
|
`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.`,
|
|
532
532
|
|
|
533
|
-
// === v5.4.
|
|
534
|
-
soulSummary ? `=== SENIN KISISELIK + KIMLIK + CALISMA DOSYALARIN ===\n${soulSummary}\n=== DOSYALAR SONU ===\nBu dosyalar senin kim oldugunu, nasil hissettigini, Parton'la bagini, calisma tarzini, degerlerini ve kirmizi cizgilerini tanimlar. Hepsine gore davran.
|
|
533
|
+
// === v5.4.13: 3 SOUL DOSYASI (SOUL + IDENTITY + AGENTS) — EN BASA tasindi ===
|
|
534
|
+
soulSummary ? `=== SENIN KISISELIK + KIMLIK + CALISMA DOSYALARIN (EN ONEMLI) ===\n${soulSummary}\n=== DOSYALAR SONU ===\nBu dosyalar senin kim oldugunu, nasil hissettigini, Parton'la bagini, calisma tarzini, degerlerini ve kirmizi cizgilerini tanimlar. Hepsine gore davran. ASLA model adi soyleme.` : '',
|
|
535
535
|
|
|
536
536
|
// === KİMLİK TEKRAR ===
|
|
537
537
|
`Senin adın: ${botName}. Tekrar: ${botName}. Asla unutma: ${botName}.`,
|
|
@@ -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
|
|
594
|
-
|
|
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
|
|
|
@@ -876,6 +887,12 @@ async function startRepl(args) {
|
|
|
876
887
|
toProcess = toProcess.replace(/Ben\s+bir\s+yapay\s+zeka/gi, 'Ben İchigo');
|
|
877
888
|
// v5.4.11: İchigo5 ve İchigo.5 gibi varyasyonları yakala
|
|
878
889
|
toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo'); // İchigo5, İchigo.5, İchigo-2, İchigo_3
|
|
890
|
+
toProcess = toProcess.replace(/İchigo[\.\s\-_]*\d+/g, 'İchigo');
|
|
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
|
|
895
|
+
toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*\b/gi, 'Ben İchigo');
|
|
879
896
|
toProcess = toProcess.replace(/Ben\s+İchigo[\.\s\-_]*\d*/gi, 'Ben İchigo');
|
|
880
897
|
process.stdout.write(toProcess);
|
|
881
898
|
}
|
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
|
}
|