natureco-cli 2.14.5 → 2.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/README.md CHANGED
@@ -32,120 +32,121 @@ natureco chat # terminal agent hazır
32
32
 
33
33
  ## 📋 Commands
34
34
 
35
- ### Temel Komutlar
36
-
37
- | Komut | Açıklama |
38
- |-------|----------|
39
- | `natureco` | Gateway ekranını açarsistem durumu, aktif bot, skill sayısı |
40
- | `natureco setup` | Kurulum sihirbazı — API key, bot seç, AI provider, model seç, entegrasyonlar |
41
- | `natureco login` | API key ile giriş yapar |
42
- | `natureco logout` | Çıkış yapar, config'i temizler |
43
- | `natureco help` | Tüm komutları ve örnekleri listeler |
44
- | `natureco doctor` | Sistem sağlık kontrolü — Node, API, bot, skill, entegrasyon |
45
- | `natureco doctor --fix` | Sorunları otomatik onarır |
46
- | `natureco update` | Yeni versiyon kontrolü |
47
-
48
- ### Sohbet
49
-
50
- | Komut | Açıklama |
51
- |-------|----------|
52
- | `natureco chat` | Varsayılan botla sohbet (yoksa interaktif seçim) |
53
- | `natureco chat Bot Adı` | Belirli botla sohbet (boşluklu isimler desteklenir) |
54
- | `natureco chat Nature Bot V3` | Çok kelimeli bot adları otomatik birleştirilir |
55
- | `natureco chat --resume` | En son oturuma devam eder |
56
- | `natureco ask "soru"` | Tek seferlik soru sorar |
57
- | `natureco run script.md` | Markdown dosyasını prompt olarak gönderir |
58
- | `natureco bots` | Tüm botları listeler |
59
-
60
- **Chat İçi Komutlar:**
61
-
62
- | Komut | Açıklama |
63
- |-------|----------|
64
- | `/clear` | Ekranı temizler |
65
- | `/bot` | Bot listesi gösterir veya bot değiştirir |
66
- | `/bot Bot Adı` | Belirli bota geçer |
67
- | `/skills` | Aktif skill'leri gösterir |
68
- | `/memory` | Hafıza durumunu gösterir |
69
- | `/memory clear` | Hafızayı temizler |
70
- | `/commands` | Özel komutları listeler |
71
- | `/ultrareview` | Son kod bloğunu detaylı inceler |
72
- | `/help` | Chat yardımını gösterir |
73
- | `exit` / `quit` | Sohbetten çıkar |
74
- | `Ctrl+B` | Görevi arka plana al |
75
-
76
- ### Skill Sistemi
77
-
78
- | Komut | Açıklama |
79
- |-------|----------|
80
- | `natureco skills` | Yüklü skill'leri listeler |
81
- | `natureco skills install slug` | NatureHub'dan skill yükler |
82
- | `natureco skills install clawhub:slug` | ClawHub'dan skill yükler |
83
- | `natureco skills browse` | Popüler skill listesi, interaktif seçim |
84
- | `natureco skills search "sorgu"` | Skill arar |
85
- | `natureco skills remove slug` | Skill'i kaldırır |
86
- | `natureco skills create ad` | Yeni skill şablonu oluşturur |
87
-
88
- ### Entegrasyonlar
89
-
90
- | Komut | Açıklama |
91
- |-------|----------|
92
- | `natureco telegram connect` | Telegram botunu bağlar (token + user ID) |
93
- | `natureco discord connect` | Discord botunu bağlar |
94
- | `natureco slack connect` | Slack workspace'ine bağlanır |
95
- | `natureco whatsapp connect` | WhatsApp QR kod ile bağlanır (Baileys) |
96
- | `natureco whatsapp status` | WhatsApp bağlantı durumu ve izin listesi |
97
- | `natureco whatsapp allow <numara>` | İzin listesine numara ekler |
98
- | `natureco whatsapp disconnect` | WhatsApp bağlantısını keser |
99
-
100
- ### MCP Sunucuları
101
-
102
- | Komut | Açıklama |
103
- |-------|----------|
104
- | `natureco mcp list` | Bağlı MCP sunucularını listeler |
105
- | `natureco mcp add` | MCP sunucu ekler (filesystem, github, postgres...) |
106
- | `natureco mcp templates` | Hazır MCP şablonlarını listeler |
107
- | `natureco mcp enable <name>` | MCP sunucusunu aktif eder |
108
- | `natureco mcp disable <name>` | MCP sunucusunu devre dışı bırakır |
109
-
110
- ### Otomasyon
111
-
112
- | Komut | Açıklama |
113
- |-------|----------|
114
- | `natureco ultrareview dosya.js` | Kod incelemegüvenlik, performans, kalite puanlar |
115
- | `natureco git review` | Staged değişiklikleri inceletir |
116
- | `natureco git commit` | AI ile commit mesajı üretir |
117
- | `natureco cron add` | Zamanlanmış görev oluşturur |
118
- | `natureco cron list` | Cron görevlerini listeler |
119
- | `natureco cron start` | Cron daemon'unu başlatır |
120
- | `natureco hooks create tip` | Hook oluşturur (pre-message, post-message...) |
121
- | `natureco commands create ad` | Özel /komut oluşturur |
35
+ ### Core Commands
36
+
37
+ | Command | Description |
38
+ |---------|-------------|
39
+ | `natureco` | Opens gateway screensystem status, active bot, skill count |
40
+ | `natureco setup` | Setup wizard — API key, bot selection, AI provider, model, integrations |
41
+ | `natureco login` | Login with API key |
42
+ | `natureco logout` | Logout and clear config |
43
+ | `natureco help` | List all commands with examples |
44
+ | `natureco doctor` | System health check — Node, API, bot, skills, integrations |
45
+ | `natureco doctor --fix` | Auto-fix detected issues |
46
+ | `natureco update` | Check for new version |
47
+
48
+ ### Chat
49
+
50
+ | Command | Description |
51
+ |---------|-------------|
52
+ | `natureco chat` | Chat with default bot (interactive selection if none) |
53
+ | `natureco chat Bot Name` | Chat with specific bot (spaces supported) |
54
+ | `natureco chat Nature Bot V3` | Multi-word bot names auto-joined |
55
+ | `natureco chat --resume` | Resume latest session |
56
+ | `natureco ask "question"` | One-time question |
57
+ | `natureco run script.md` | Send markdown file as prompt |
58
+ | `natureco bots` | List all bots |
59
+
60
+ **In-Chat Commands:**
61
+
62
+ | Command | Description |
63
+ |---------|-------------|
64
+ | `/clear` | Clear screen |
65
+ | `/bot` | Show bot list or switch bot |
66
+ | `/bot Bot Name` | Switch to specific bot |
67
+ | `/skills` | Show active skills |
68
+ | `/memory` | Show memory status |
69
+ | `/memory clear` | Clear memory |
70
+ | `/commands` | List custom commands |
71
+ | `/ultrareview` | Deep review last code block |
72
+ | `/help` | Show chat help |
73
+ | `exit` / `quit` | Exit chat |
74
+ | `Ctrl+B` | Move task to background |
75
+
76
+ ### Skill System
77
+
78
+ | Command | Description |
79
+ |---------|-------------|
80
+ | `natureco skills` | List installed skills |
81
+ | `natureco skills install slug` | Install skill from NatureHub |
82
+ | `natureco skills install clawhub:slug` | Install skill from ClawHub |
83
+ | `natureco skills browse` | Browse popular skills, interactive selection |
84
+ | `natureco skills search "query"` | Search skills |
85
+ | `natureco skills remove slug` | Remove skill |
86
+ | `natureco skills create name` | Create new skill template |
87
+
88
+ ### Integrations
89
+
90
+ | Command | Description |
91
+ |---------|-------------|
92
+ | `natureco telegram connect` | Connect Telegram bot (token + user ID) |
93
+ | `natureco discord connect` | Connect Discord bot |
94
+ | `natureco slack connect` | Connect to Slack workspace |
95
+ | `natureco whatsapp connect` | Connect WhatsApp with QR code (Baileys) |
96
+ | `natureco whatsapp status` | WhatsApp connection status and allow list |
97
+ | `natureco whatsapp allow <number>` | Add number to allow list |
98
+ | `natureco whatsapp disconnect` | Disconnect WhatsApp |
99
+
100
+ ### MCP Servers
101
+
102
+ | Command | Description |
103
+ |---------|-------------|
104
+ | `natureco mcp list` | List connected MCP servers |
105
+ | `natureco mcp add` | Add MCP server (filesystem, github, postgres...) |
106
+ | `natureco mcp templates` | List ready-made MCP templates |
107
+ | `natureco mcp enable <name>` | Enable MCP server |
108
+ | `natureco mcp disable <name>` | Disable MCP server |
109
+
110
+ ### Automation
111
+
112
+ | Command | Description |
113
+ |---------|-------------|
114
+ | `natureco ultrareview file.js` | Code reviewsecurity, performance, quality scores |
115
+ | `natureco git review` | Review staged changes |
116
+ | `natureco git commit` | Generate commit message with AI |
117
+ | `natureco cron add` | Create scheduled task |
118
+ | `natureco cron list` | List cron jobs |
119
+ | `natureco cron start` | Start cron daemon |
120
+ | `natureco hooks create type` | Create hook (pre-message, post-message...) |
121
+ | `natureco commands create name` | Create custom /command |
122
+ | `natureco migrate --from openclaw` | Migrate from OpenClaw (memory, crons, skills, scripts) |
122
123
 
123
124
  ### Gateway & Dashboard
124
125
 
125
- | Komut | Açıklama |
126
- |-------|----------|
127
- | `natureco gateway start` | Gateway'i arka planda başlatır (WhatsApp otomatik) |
128
- | `natureco gateway stop` | Gateway'i durdurur |
129
- | `natureco gateway status` | Gateway durumu (son 10 log) |
130
- | `natureco gateway logs` | Tüm logları gösterir (~/.natureco/gateway.log) |
131
- | `natureco dashboard` | Web arayüzü açar (localhost:3848) |
132
- | `natureco dashboard stop` | Dashboard'u durdurur |
133
- | `natureco dashboard status` | Dashboard durumunu kontrol eder |
134
-
135
- ### Yapılandırma
136
-
137
- | Komut | Açıklama |
138
- |-------|----------|
139
- | `natureco config list` | Tüm ayarları gösterir |
140
- | `natureco config get key` | Belirli ayarı gösterir |
141
- | `natureco config set key val` | Ayar değiştirir |
142
- | `natureco init` | Proje klasörü oluşturur (.natureco/) |
126
+ | Command | Description |
127
+ |---------|-------------|
128
+ | `natureco gateway start` | Start gateway in background (WhatsApp auto-start) |
129
+ | `natureco gateway stop` | Stop gateway |
130
+ | `natureco gateway status` | Gateway status (last 10 logs) |
131
+ | `natureco gateway logs` | Show all logs (~/.natureco/gateway.log) |
132
+ | `natureco dashboard` | Open web UI (localhost:3848) |
133
+ | `natureco dashboard stop` | Stop dashboard |
134
+ | `natureco dashboard status` | Check dashboard status |
135
+
136
+ ### Configuration
137
+
138
+ | Command | Description |
139
+ |---------|-------------|
140
+ | `natureco config list` | Show all settings |
141
+ | `natureco config get key` | Get specific setting |
142
+ | `natureco config set key val` | Change setting |
143
+ | `natureco init` | Create project folder (.natureco/) |
143
144
 
144
145
  ## 🔌 Integrations
145
146
 
146
147
  ### Telegram
147
148
 
148
- Telegram botunuzu bağlayın, mesajları alın ve yanıtlayın. Bot token ve kullanıcı ID ile kimlik doğrulama.
149
+ Connect your Telegram bot, receive and respond to messages. Authentication with bot token and user ID.
149
150
 
150
151
  ```bash
151
152
  natureco telegram connect
@@ -153,7 +154,7 @@ natureco telegram connect
153
154
 
154
155
  ### Discord
155
156
 
156
- Discord botlarını entegre edin. Sunucu kanalları, DM'ler ve slash komutları desteklenir.
157
+ Integrate Discord bots. Server channels, DMs, and slash commands supported.
157
158
 
158
159
  ```bash
159
160
  natureco discord connect
@@ -161,7 +162,7 @@ natureco discord connect
161
162
 
162
163
  ### Slack
163
164
 
164
- Slack workspace'lerine bağlanın. Kanal ve DM mesajlarını yönetin.
165
+ Connect to Slack workspaces. Manage channel and DM messages.
165
166
 
166
167
  ```bash
167
168
  natureco slack connect
@@ -169,57 +170,170 @@ natureco slack connect
169
170
 
170
171
  ### WhatsApp
171
172
 
172
- WhatsApp hesaplarını QR kod ile bağlayın. Baileys kütüphanesi ile tam medya desteği.
173
+ Connect WhatsApp accounts with QR code. Full media support with Baileys library.
173
174
 
174
175
  ```bash
175
- # İlk bağlantı (QR kod)
176
+ # Initial connection (QR code)
176
177
  natureco whatsapp connect
177
178
 
178
- # Gateway ile otomatik başlat
179
+ # Auto-start with gateway
179
180
  natureco gateway start
180
181
 
181
- # İzin listesine numara ekle
182
+ # Add number to allow list
182
183
  natureco whatsapp allow 905551234567
183
184
 
184
- # Durum kontrolü
185
+ # Check status
185
186
  natureco whatsapp status
186
187
  ```
187
188
 
188
- **WhatsApp Özellikleri:**
189
- - QR kod ile terminal'de bağlantı
189
+ **WhatsApp Features:**
190
+ - QR code connection in terminal
190
191
  - Session persistence (~/.natureco/whatsapp-sessions/)
191
- - İzin listesi kontrolü (son 10 hane karşılaştırma)
192
- - Gateway ile otomatik başlatma
192
+ - Allow list control (last 10 digits comparison)
193
+ - Gateway auto-start
193
194
  - OpenClaw-style logging
194
- - Auto-reconnect (515, 408 hata kodları)
195
- - Çoklu mesaj formatı desteği (text, caption, buttons, list...)
195
+ - Auto-reconnect (515, 408 error codes)
196
+ - Multiple message format support (text, caption, buttons, list...)
196
197
 
197
198
  ## 🌐 Gateway Server
198
199
 
199
- Arka planda çalışan gateway sunucusu. WhatsApp otomatik başlatma, OpenClaw-style logging, health check.
200
+ Background gateway server. WhatsApp auto-start, OpenClaw-style logging, health check.
200
201
 
201
202
  ```bash
202
- # Gateway'i başlat (arka planda)
203
+ # Start gateway (background)
203
204
  natureco gateway start
204
205
 
205
- # Logları canlı izle
206
+ # Watch logs live
206
207
  tail -f ~/.natureco/gateway.log
207
208
 
208
- # Durum kontrolü
209
+ # Check status
209
210
  natureco gateway status
210
211
 
211
- # Durdur
212
+ # Stop
212
213
  natureco gateway stop
213
214
  ```
214
215
 
215
- **Gateway Özellikleri:**
216
- - Detached process (terminal kapatılsa bile çalışır)
217
- - WhatsApp otomatik başlatma (config'de kayıtlıysa)
218
- - OpenClaw-style log formatı: `[timestamp] [module] message`
219
- - Health check her 60 saniyede
216
+ **Gateway Features:**
217
+ - Detached process (runs even if terminal closed)
218
+ - WhatsApp auto-start (if saved in config)
219
+ - OpenClaw-style log format: `[timestamp] [module] message`
220
+ - Health check every 60 seconds
220
221
  - Auto-restart on connection loss (10s delay)
221
222
  - Platform-aware stop (SIGTERM → SIGKILL / taskkill)
222
- - Tüm loglar ~/.natureco/gateway.log dosyasında
223
+ - All logs in ~/.natureco/gateway.log
224
+
225
+ ## 🎨 Dashboard
226
+
227
+ Web UI running on localhost:3848. Glassmorphism design, animated gradient background.
228
+
229
+ ```bash
230
+ natureco dashboard
231
+ ```
232
+
233
+ **Dashboard Features:**
234
+ - Modern glassmorphism UI
235
+ - Animated gradient background (same as natureco.me/landing)
236
+ - Left sidebar: Active bot, other bots, channels, skills, memory, sessions, system, cron jobs
237
+ - Right chat area: Bot avatar, model info, version badge
238
+ - Typing indicator (three dots animation)
239
+ - Turkish character support
240
+ - Responsive design
241
+
242
+ ## 💾 Memory System
243
+
244
+ Bot memory — user name, bot name, nickname, preferences, and facts. Separate memory per bot.
245
+
246
+ **Memory Features:**
247
+ - **Bot Name:** Bot's name (from memory or agents/ folder)
248
+ - **User Name:** User's name
249
+ - **Nickname:** User's nickname
250
+ - **Facts:** Information about user (max 15, sorted by score)
251
+ - **Preferences:** User preferences
252
+ - **Auto-Extract:** Automatic information extraction from messages
253
+ - **Score System:** Each fact has a score, old facts decay
254
+
255
+ ```bash
256
+ # Show memory
257
+ natureco chat
258
+ /memory
259
+
260
+ # Clear memory
261
+ /memory clear
262
+ ```
263
+
264
+ **Memory Format:**
265
+ ```json
266
+ {
267
+ "name": "Gencay",
268
+ "botName": "İchigo",
269
+ "nickname": "Parton",
270
+ "facts": [
271
+ { "value": "Timezone: UTC+3", "score": 6, "updatedAt": "2025-01-12" },
272
+ { "value": "Developer", "score": 5, "updatedAt": "2025-01-12" }
273
+ ],
274
+ "preferences": [],
275
+ "lastSeen": "2025-01-12T10:30:00.000Z"
276
+ }
277
+ ```
278
+
279
+ ## 🐰 Terminal UI
280
+
281
+ Minimal and clean terminal interface. Rabbit ASCII art, progress bar animation, colored output.
282
+
283
+ **UI Features:**
284
+ - **Startup Animation:** Rabbit ASCII art + progress bar (Memory, Skills, Gateway)
285
+ - **Header:** Full terminal width separator, bot name, model, timezone
286
+ - **Message Format:** `You message` (gray) → `İchigo response` (cyan)
287
+ - **Loading:** `●○○ ○●○ ○○●` animation (300ms)
288
+ - **Colors:** Error (red), success (green), bot name (cyan), user (gray)
289
+ - **No Emoji:** Clean, minimal design
290
+
291
+ ```
292
+ (\\_/)
293
+ (•ᴥ•)
294
+ />🌿
295
+
296
+ ────────────────────────────────────────
297
+ NatureCo · İchigo · llama-3.1 · UTC+3
298
+ ────────────────────────────────────────
299
+ Session · /clear /bot /skills /memory /help · Ctrl+C to exit
300
+ ────────────────────────────────────────
301
+ Memory: Gencay · 67 facts Skills: 28 Crons: 21 active
302
+ ────────────────────────────────────────
303
+
304
+ You hello
305
+ İchigo Hello! How can I help you?
306
+ ```
307
+
308
+ ## 🔄 Migration from OpenClaw
309
+
310
+ Migrate from OpenClaw to NatureCo. Memory, crons, skills, scripts, and WhatsApp sessions auto-migrated.
311
+
312
+ ```bash
313
+ # Migrate from OpenClaw
314
+ natureco migrate --from openclaw
315
+
316
+ # Custom OpenClaw directory
317
+ natureco migrate --from openclaw --openclaw-dir /path/to/.openclaw
318
+ ```
319
+
320
+ **Migrated Data:**
321
+ - **Memory:** USER.md → universal-provider.json (name, nickname, timezone, notes)
322
+ - **Memory Files:** MEMORY.md and memory/*.md → facts (max 15, deduplicated)
323
+ - **Bot Name:** From agents/ folder name or cron job names
324
+ - **Cron Jobs:** jobs.json → crons.json (path normalization, duplicate check)
325
+ - **Telegram:** allowFrom → config
326
+ - **WhatsApp:** Session → whatsapp-sessions (number normalization)
327
+ - **Scripts:** workspace/scripts → .natureco/workspace/scripts (path fixes, package.json)
328
+ - **Skills:** workspace/skills → .natureco/skills
329
+ - **.env:** Workspace .env file copied
330
+
331
+ **Migration Features:**
332
+ - Path normalization (Windows → Unix)
333
+ - Duplicate detection (crons, facts)
334
+ - WhatsApp number normalization (JID → clean phone)
335
+ - Bot name extraction (agents/, cron jobs, MEMORY.md)
336
+ - Facts filtering (skip tables, commands, emojis)
223
337
 
224
338
  ## 🎨 Dashboard
225
339
 
@@ -329,5 +443,5 @@ MIT © NatureCo
329
443
 
330
444
  ---
331
445
 
332
- **Version:** 2.2.7 | **Node.js:** >=16.0.0 | **Platform:** macOS, Windows, Linux
446
+ **Version:** 2.14.5 | **Node.js:** >=16.0.0 | **Platform:** macOS, Windows, Linux
333
447
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.14.5",
3
+ "version": "2.14.7",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -211,7 +211,7 @@ body::before{
211
211
  <div class="header-bot-name" id="header-bot-name">Nature Bot</div>
212
212
  <div class="header-bot-model" id="header-bot-model">NatureCo</div>
213
213
  </div>
214
- <div class="version-badge" id="version-badge">v2.14.5</div>
214
+ <div class="version-badge" id="version-badge">v2.14.7</div>
215
215
  </div>
216
216
  <div class="messages" id="messages"></div>
217
217
  <div class="input-area">
@@ -341,7 +341,7 @@ function dashboard(action) {
341
341
  apiKey: cfg.apiKey,
342
342
  defaultBot: cfg.defaultBot,
343
343
  defaultBotId: cfg.defaultBotId,
344
- version: 'v2.14.5',
344
+ version: 'v2.14.7',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
package/src/utils/api.js CHANGED
@@ -728,69 +728,19 @@ TOOL SELECTION GUIDE:
728
728
 
729
729
  let systemPrompt = baseSystemPrompt;
730
730
 
731
- // Add MCP tool guidance if MCP servers are loaded
731
+ // Add MCP tool guidance if MCP servers are loaded (only if enabled)
732
+ const config = getConfig();
732
733
  let mcpPrompt = '';
733
734
  const mcpTools = getMcpTools();
734
- if (mcpTools.length > 0) {
735
+ if (config.mcpEnabled !== false && mcpTools.length > 0) {
735
736
  const mcpServerNames = Object.keys(mcpClients);
736
737
 
737
- mcpPrompt = `\n\nMCP SERVERS (${mcpServerNames.length}):`;
738
-
739
- for (const serverName of mcpServerNames) {
740
- const serverTools = mcpClients[serverName].tools;
741
- mcpPrompt += `\n- ${serverName}: ${serverTools.length} tools`;
742
- }
743
-
744
- mcpPrompt += `\n\nWhen filesystem MCP is loaded, use list_directory (not list_dir), read_file from MCP (not local).`;
745
- mcpPrompt += `\nFor GitHub MCP, prefer list_issues over search_issues.`;
738
+ // Only show server names, not tool lists (reduce tokens)
739
+ mcpPrompt = `\n\nMCP SERVERS: ${mcpServerNames.join(', ')}`;
746
740
 
747
741
  systemPrompt += mcpPrompt;
748
742
  }
749
743
 
750
- // Add available skills information
751
- let skillsPrompt = '';
752
- const skillsDir = path.join(homeDir, '.natureco', 'skills');
753
- if (fs.existsSync(skillsDir)) {
754
- try {
755
- const skills = fs.readdirSync(skillsDir).filter(f => {
756
- const skillPath = path.join(skillsDir, f);
757
- return fs.statSync(skillPath).isDirectory();
758
- });
759
-
760
- if (skills.length > 0) {
761
- // Extract skill names and short descriptions (not full SKILL.md content)
762
- const skillsInfo = skills.map(skill => {
763
- const skillMd = path.join(skillsDir, skill, 'SKILL.md');
764
- if (!fs.existsSync(skillMd)) return skill;
765
-
766
- try {
767
- const content = fs.readFileSync(skillMd, 'utf8');
768
- // Extract description from SKILL.md (first 80 chars)
769
- const descMatch = content.match(/description:\s*(.+)/i);
770
- const desc = descMatch ? descMatch[1].slice(0, 80) : '';
771
- return desc ? `${skill}: ${desc}` : skill;
772
- } catch (err) {
773
- return skill;
774
- }
775
- }).slice(0, 10).join('\n'); // Show max 10 skills
776
-
777
- const moreSkills = skills.length > 10 ? ` (${skills.length - 10} more)` : '';
778
- skillsPrompt = `\n\nInstalled skills (${skills.length})${moreSkills}:\n${skillsInfo}\nUse /skills for details.`;
779
-
780
- systemPrompt += skillsPrompt;
781
- }
782
- } catch (err) {
783
- // Silently skip if skills directory can't be read
784
- }
785
- }
786
-
787
- // Add memory prompt
788
- const { getMemoryPrompt } = require('./memory');
789
- const memoryPrompt = getMemoryPrompt(botId);
790
- if (memoryPrompt) {
791
- systemPrompt += '\n\n' + memoryPrompt;
792
- }
793
-
794
744
  return sendMessageToProvider(apiKey, message, conversationId, systemPrompt);
795
745
  }
796
746
 
@@ -254,7 +254,7 @@ function getMemoryPrompt(botId) {
254
254
  }
255
255
 
256
256
  if (facts.length > 0) {
257
- // Normalize all facts to objects with score, then sort and limit
257
+ // Normalize all facts to objects with score, then sort and limit to 8
258
258
  const topFacts = facts
259
259
  .map(f => {
260
260
  if (typeof f === 'string') return { value: f, score: 5 };
@@ -263,15 +263,15 @@ function getMemoryPrompt(botId) {
263
263
  })
264
264
  .filter(f => f && f.value && f.value.length > 0)
265
265
  .sort((a, b) => (b.score || 0) - (a.score || 0))
266
- .slice(0, 15)
266
+ .slice(0, 8)
267
267
  .map(f => f.value);
268
268
 
269
269
  if (topFacts.length > 0) {
270
270
  parts.push(`Bilgiler: ${topFacts.join(', ')}`);
271
271
  };
272
272
 
273
- if (facts.length > 15) {
274
- parts.push(`(${facts.length - 15} daha fazla bilgi mevcut)`);
273
+ if (facts.length > 8) {
274
+ parts.push(`(${facts.length - 8} daha fazla bilgi mevcut)`);
275
275
  }
276
276
  }
277
277
  }