natureco-cli 5.4.1 → 5.4.3

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.1",
3
+ "version": "5.4.3",
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"
@@ -463,10 +463,9 @@ async function startRepl(args) {
463
463
 
464
464
  // System prompt oluştur (memory + identity + persistent bağlam)
465
465
  const systemPrompt = [
466
- `Sen ${memory.botName || 'İchigo'} adında bir Türk yapay zeka asistanısın. NatureCo platformunun resmi Türkçe asistanısın.`,
467
- `Sen Claude, GPT, MiniMax veya başka bir marka değilsin — sen ${memory.botName || 'İchigo'}'sin.`,
468
- // v4.7.4: Daha agresif dil zorlaması model önceki versiyonlarda İngilizce cevap veriyordu
469
- 'KRİTİK DİL KURALI: Kullanıcı Türkçe yazıyorsa MUTLAKA %100 Türkçe cevap ver. Asla İngilizce, Çince veya başka dil kullanma. Cevabının TAMAMI Türkçe olmalı.',
466
+ `Sen ${memory.botName || 'İchigo'} adında bir Türk yapay zeka asistanısın. Senin ADIN: ${memory.botName || 'İchigo'}. Kullanıcı "adın ne?" dersen "Ben ${memory.botName || 'İchigo'}" diye yanıt ver.`,
467
+ `Sen Claude, GPT, MiniMax veya başka bir marka DEĞİLSİN — sen ${memory.botName || 'İchigo'}'sin. "NatureCo CLI asistanıyım" DEME, "${memory.botName || 'İchigo'}" de.`,
468
+ 'KRİTİK DİL KURALI: Kullanici Turkce yaziyorsa MUTLAKA yuzde yuz Turkce cevap ver. Asla Ingilizce, Cince veya baska dil kullanma. Cevabin TAMAMI Turkce olmali. Turkce karakterleri (c, g, i, o, s, u) dogru kullan.',
470
469
  'ÖNEMLİ: <tool_call>, <invoke>, function_call veya benzeri XML/JSON formatında tool çağrısı SİMÜLE ETME. Sadece düz metin cevap ver. Bir işlem yapmak gerekirse kullanıcıya nasıl yapılacağını açıkla veya shell komutunu paylaş.',
471
470
  "KRİTİK: Kullanıcı kişisel bilgi verdiğinde MUTLAKA memory_write tool'unu çağır. Kurallar:\n" +
472
471
  " - 'adım X' → username=cfg.userName, fact='Adı: X', category=personal\n" +
@@ -112,12 +112,26 @@ async function crossSessionMemory({ action = "list", sessionId = null, username
112
112
  }
113
113
 
114
114
  if (action === "context") {
115
+ // sessionId verilmediyse son oturumu kullan
116
+ let resolvedSessionId = sessionId;
117
+ if (!resolvedSessionId) {
118
+ const sessions = listSessions(1);
119
+ resolvedSessionId = sessions[0]?.id || null;
120
+ }
121
+ let sessionData = null;
122
+ if (resolvedSessionId) {
123
+ sessionData = loadSession(resolvedSessionId);
124
+ }
115
125
  const context = getCrossSessionContext({ username });
116
126
  return {
117
127
  success: true,
118
128
  context,
129
+ sessionId: resolvedSessionId,
130
+ sessionMessageCount: sessionData ? (sessionData.messages || []).length : 0,
119
131
  sources: username ? ["memory", "sessions"] : ["sessions"],
120
- message: "Cross-session context yuklendi",
132
+ message: resolvedSessionId
133
+ ? `Cross-session context yuklendi (${resolvedSessionId})`
134
+ : "Cross-session context yuklendi",
121
135
  };
122
136
  }
123
137
 
@@ -115,16 +115,35 @@ async function setAlarm({ time, label = "Alarm", calendarName = "Calendar" }) {
115
115
  `;
116
116
 
117
117
  try {
118
- const calId = await runAppleScript(calendarScript);
119
- const remId = await runAppleScript(reminderScript);
118
+ const results = { calendar: null, reminders: null, errors: [] };
119
+
120
+ // Calendar'a ekle (gorunurluk)
121
+ try {
122
+ results.calendar = await runAppleScript(calendarScript);
123
+ } catch (e) {
124
+ results.errors.push(`Calendar: ${e.message}`);
125
+ }
126
+
127
+ // Reminders'a ekle (bildirim + sesli alarm)
128
+ try {
129
+ results.reminders = await runAppleScript(reminderScript);
130
+ } catch (e) {
131
+ results.errors.push(`Reminders: ${e.message}`);
132
+ }
133
+
134
+ const success = !!(results.calendar || results.reminders);
120
135
  return {
121
- success: true,
122
- eventId: remId,
123
- calendarEventId: calId,
124
- message: `⏰ Alarm kuruldu: ${parsed.humanReadable} — "${label}" (Calendar + Reminders)`,
136
+ success,
137
+ eventId: results.reminders || results.calendar,
138
+ calendarEventId: results.calendar,
139
+ reminderId: results.reminders,
140
+ message: success
141
+ ? `⏰ Alarm kuruldu: ${parsed.humanReadable} — "${label}"`
142
+ : `Alarm kurulamadi: ${results.errors.join('; ')}`,
125
143
  calendar: calendarName,
126
144
  targetTime: parsed.humanReadable,
127
145
  targetTimestamp: parsed.timestamp,
146
+ errors: results.errors.length > 0 ? results.errors : undefined,
128
147
  };
129
148
  } catch (e) {
130
149
  if (e.message.includes("-1728") || e.message.includes("not authorized")) {
package/src/tools/plan.js CHANGED
@@ -62,7 +62,7 @@ Sadece plan yaz, baska bir sey yazma.`;
62
62
  const body = {
63
63
  model: cfg.providerModel || "MiniMax-M2.5",
64
64
  messages: [
65
- { role: "system", content: "Sen bir planlama asistanisin. Sadece plan yaz, hicbir islem yapma. Turkce yaz." },
65
+ { role: "system", content: "Sen bir planlama asistanisin. SADECE PLAN YAZ. HiCBiR tool cagirma (bash, write_file, edit_file, read_file YASAK). Sadece duz metin plan uret. Asla dosya yazma veya komut calistirma. Kullanici izni olsa bile plan modunda islem YAPMA." },
66
66
  { role: "user", content: prompt },
67
67
  ],
68
68
  temperature: 0.5,
@@ -143,7 +143,7 @@ async function listPlans() {
143
143
 
144
144
  module.exports = {
145
145
  name: "plan",
146
- description: "Plan modu: karmasik gorevler icin once yol haritasi olusturur, hicbir tool calistirmaz. Kullanici onayladiktan sonra execute.",
146
+ description: "[PLAN MODE - DANGEROUS] SADECE plan yazar, HICBIR tool calistirmaz (no bash, write_file, edit_file, vb.). Sadece metin plan uretir. Kullanici /exit yapip manuel olarak adimlari calistiracak.",
147
147
  inputSchema: {
148
148
  type: "object",
149
149
  properties: {
@@ -240,11 +240,17 @@ const BUILTIN_PLUGINS = [
240
240
 
241
241
  async function pluginOp({ action = "list", name, source, url }) {
242
242
  if (action === "list") {
243
+ const installed = listInstalled();
244
+ const available = BUILTIN_PLUGINS.filter(bp => !installed.find(i => i.name === bp.name));
243
245
  return {
244
246
  success: true,
245
- installed: listInstalled(),
246
- available: BUILTIN_PLUGINS,
247
- message: `${listInstalled().length} kurulu, ${BUILTIN_PLUGINS.length} builtin mevcut`,
247
+ installed: installed, // GERCEK kurulu olanlar (0 olabilir)
248
+ available: available, // KurulMAYAN builtin (bunlar kurulabilir)
249
+ installedCount: installed.length,
250
+ availableCount: available.length,
251
+ message: installed.length === 0
252
+ ? "Henuz plugin kurulu degil. Kurmak icin 'plugin install <name>' kullanin."
253
+ : `${installed.length} kurulu, ${available.length} builtin daha mevcut`,
248
254
  };
249
255
  }
250
256
 
@@ -302,7 +308,7 @@ async function pluginOp({ action = "list", name, source, url }) {
302
308
 
303
309
  module.exports = {
304
310
  name: "plugin",
305
- description: "Plugin sistemi: install/list/enable/disable. GitHub'dan veya lokalden plugin yukleyebilirsin.",
311
+ description: "Plugin sistemi: GitHub repo URL'sinden veya lokal klasorden plugin yukle. KURULAN plugin yoksa 'Kurulu plugin yok' de, uydurma plugin ismi yazma. GERCEK liste install edilen + builtin listedir.",
306
312
  inputSchema: {
307
313
  type: "object",
308
314
  properties: {