natureco-cli 5.14.5 → 5.14.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 +1 -1
- package/src/commands/repl.js +4 -5
- package/src/tools/workflow.js +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.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"
|
package/src/commands/repl.js
CHANGED
|
@@ -691,7 +691,7 @@ async function startRepl(args) {
|
|
|
691
691
|
// System prompt oluştur (memory + identity + persistent bağlam)
|
|
692
692
|
// v5.6.5: Kucuk model tespiti (Groq, Mistral Small, Ollama) - SOUL injection skip
|
|
693
693
|
const botName = memory.botName || 'Asistan';
|
|
694
|
-
const userName = memory.name || memory.nickname ||
|
|
694
|
+
const userName = memory.name || memory.nickname || cfg.userName;
|
|
695
695
|
const isSmallModel = (cfg.providerUrl || '').includes('groq.com') ||
|
|
696
696
|
(cfg.providerUrl || '').includes('mistral.ai') ||
|
|
697
697
|
(cfg.providerUrl || '').includes('localhost') ||
|
|
@@ -736,13 +736,12 @@ async function startRepl(args) {
|
|
|
736
736
|
for (const f of facts) {
|
|
737
737
|
const v = (f.value || f || '').trim();
|
|
738
738
|
const lv = v.toLowerCase();
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
if (match) return match[1].trim();
|
|
739
|
+
const match = lv.match(/(?:kullanici\s*adi?|kullanıcı\s*adı?|isim|name)\s*:?\s*(.+)/);
|
|
740
|
+
if (match && match[1].trim().length > 2) return match[1].trim();
|
|
742
741
|
}
|
|
743
742
|
return null;
|
|
744
743
|
})();
|
|
745
|
-
const displayUserName = memory.name || nameFromFact || memory.nickname ||
|
|
744
|
+
const displayUserName = memory.name || nameFromFact || memory.nickname || cfg.userName;
|
|
746
745
|
console.log(tui.C.brand(' 👋 Ben ' + displayBotName + ', ' + displayUserName + '. Sen nasilsin?'));
|
|
747
746
|
console.log('');
|
|
748
747
|
|
package/src/tools/workflow.js
CHANGED
|
@@ -26,7 +26,14 @@ function loadUserMemory(username) {
|
|
|
26
26
|
if (fs.existsSync(file)) {
|
|
27
27
|
const mem = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
28
28
|
const facts = (mem.facts || []).map(f => f.value || f).filter(Boolean);
|
|
29
|
-
|
|
29
|
+
let name = mem.name || '';
|
|
30
|
+
// Extract name from facts if not saved as memory.name
|
|
31
|
+
if (!name) {
|
|
32
|
+
for (const f of facts) {
|
|
33
|
+
const match = f.toLowerCase().match(/(?:kullanici\s*adi?|kullanıcı\s*adı?|isim|name)\s*:?\s*(.+)/);
|
|
34
|
+
if (match && match[1].trim().length > 2) { name = match[1].trim(); break; }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
30
37
|
const parts = [];
|
|
31
38
|
if (name) parts.push(`Kullanici adi: ${name}`);
|
|
32
39
|
if (facts.length > 0) parts.push(`Bilinenler: ${facts.slice(0, 10).join('; ')}`);
|
|
@@ -94,7 +101,7 @@ async function workflow(params) {
|
|
|
94
101
|
// Phase 0: Check if simple chat (passthrough) — no planning needed
|
|
95
102
|
const simpleCheckPrompt = {
|
|
96
103
|
role: 'system',
|
|
97
|
-
content: 'Gorevin basit bir selamlasma/sohbet mi yoksa arac gerektiren bir islem mi oldugunu belirle. Sadece "simple" veya "complex" yaz, kesinlikle baska bir sey yazma. Noktalama isareti koyma.\n\nSimple: selamlasma, nasilsin, bugun ne yaptin, havadan sudan, genel bilgi sorusu\nComplex: dosya islemleri, kod yazma, arastirma, karsilastirma, duzenleme, otomasyon, proje yonetimi, debug'
|
|
104
|
+
content: 'Gorevin basit bir selamlasma/sohbet mi yoksa arac gerektiren bir islem mi oldugunu belirle. Sadece "simple" veya "complex" yaz, kesinlikle baska bir sey yazma. Noktalama isareti koyma.\n\nSimple: selamlasma, nasilsin, bugun ne yaptin, havadan sudan, genel bilgi sorusu, ben kimim, adim ne, kullanici bilgisi sorgulama, hatirlatma talebi\nComplex: dosya islemleri, kod yazma, arastirma, karsilastirma, duzenleme, otomasyon, proje yonetimi, debug, internette arama gerektiren isler'
|
|
98
105
|
};
|
|
99
106
|
const simpleBody = { model, stream: false, messages: [simpleCheckPrompt, { role: 'user', content: task }], temperature: 0, max_tokens: 20 };
|
|
100
107
|
let isSimple = false;
|