natureco-cli 5.14.6 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "5.14.6",
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"
@@ -736,9 +736,8 @@ 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
- // "Kullanici adi: Gencay" veya "Kullanıcı adı Gencay" veya "isim: Gencay"
740
- const match = lv.match(/(?:kullanici\s*adi|kullanıcı\s*adı|isim|name|adı?)\s*:?\s*(.+)/);
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
  })();
@@ -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
- const name = mem.name || '';
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;