natureco-cli 5.54.0 → 5.55.0

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.
@@ -1,4 +1,6 @@
1
1
  const chalk = require('chalk');
2
+ const { getLang: _gl } = require('../utils/i18n');
3
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
2
4
  const fs = require('fs');
3
5
  const path = require('path');
4
6
  const os = require('os');
@@ -27,8 +29,8 @@ async function memoryCmd(args) {
27
29
  if (action === 'wiki-list') return wikiListCmd();
28
30
  if (action === 'wiki-search') return wikiSearchCmd(params.join(' '));
29
31
 
30
- console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
31
- console.log(chalk.gray(' Kullanım: natureco memory [status|list|search|show|clear|index|export|import|semantic|wiki|wiki-create|wiki-list|wiki-search]\n'));
32
+ console.log(chalk.red(`\n ❌ ${L('Bilinmeyen komut', 'Unknown command')}: ${action}\n`));
33
+ console.log(chalk.gray(L(' Kullanım: natureco memory [status|list|search|show|clear|index|export|import|semantic|wiki|wiki-create|wiki-list|wiki-search]\n', ' Usage: natureco memory [status|list|search|show|clear|index|export|import|semantic|wiki|wiki-create|wiki-list|wiki-search]\n')));
32
34
  process.exit(1);
33
35
  }
34
36
 
@@ -39,11 +41,11 @@ function statusMemory() {
39
41
 
40
42
  console.log('');
41
43
  console.log(line);
42
- console.log(chalk.bold.cyan(' Hafıza Durumu'));
44
+ console.log(chalk.bold.cyan(L(' Hafıza Durumu', ' Memory Status')));
43
45
  console.log(line);
44
46
 
45
47
  if (!fs.existsSync(MEMORY_DIR)) {
46
- console.log(chalk.gray('\n Hafıza dizini bulunamadı.\n'));
48
+ console.log(chalk.gray(L('\n Hafıza dizini bulunamadı.\n', '\n Memory directory not found.\n')));
47
49
  console.log(line);
48
50
  return;
49
51
  }
@@ -51,7 +53,7 @@ function statusMemory() {
51
53
  const files = fs.readdirSync(MEMORY_DIR).filter(f => f.endsWith('.json'));
52
54
 
53
55
  if (files.length === 0) {
54
- console.log(chalk.gray('\n Kayıtlı hafıza yok.\n'));
56
+ console.log(chalk.gray(L('\n Kayıtlı hafıza yok.\n', '\n No memory stored.\n')));
55
57
  console.log(line);
56
58
  return;
57
59
  }
@@ -70,53 +72,53 @@ function statusMemory() {
70
72
  const isActive = activeBotName && (mem.botName === activeBotName);
71
73
  const bar = isActive ? chalk.cyan('▌') : chalk.gray('▌');
72
74
 
73
- console.log(bar + ' ' + chalk.bold.white(mem.botName || botId) + (isActive ? chalk.cyan(' ← aktif') : ''));
74
- console.log(bar + ' ' + chalk.gray('Kullanıcı : ') + chalk.white(mem.name || '—'));
75
+ console.log(bar + ' ' + chalk.bold.white(mem.botName || botId) + (isActive ? chalk.cyan(L(' ← aktif', ' ← active')) : ''));
76
+ console.log(bar + ' ' + chalk.gray(L('Kullanıcı : ', 'User : ')) + chalk.white(mem.name || '—'));
75
77
  if (mem.nickname) {
76
- console.log(bar + ' ' + chalk.gray('Lakap : ') + chalk.white(mem.nickname));
78
+ console.log(bar + ' ' + chalk.gray(L('Lakap : ', 'Nickname : ')) + chalk.white(mem.nickname));
77
79
  }
78
- console.log(bar + ' ' + chalk.gray('Bilgi : ') + chalk.white(`${factCount} kayıt`));
79
- console.log(bar + ' ' + chalk.gray('Tercihler : ') + chalk.white(`${prefCount} kayıt`));
80
+ console.log(bar + ' ' + chalk.gray(L('Bilgi : ', 'Facts : ')) + chalk.white(`${factCount} ${L('kayıt', 'record(s)')}`));
81
+ console.log(bar + ' ' + chalk.gray(L('Tercihler : ', 'Prefs : ')) + chalk.white(`${prefCount} ${L('kayıt', 'record(s)')}`));
80
82
  if (mem.lastSeen) {
81
83
  const d = new Date(mem.lastSeen);
82
- console.log(bar + ' ' + chalk.gray('Son görüş : ') + chalk.white(d.toLocaleDateString('tr-TR')));
84
+ console.log(bar + ' ' + chalk.gray(L('Son görüş : ', 'Last seen : ')) + chalk.white(d.toLocaleDateString('tr-TR')));
83
85
  }
84
86
  console.log('');
85
87
  } catch {}
86
88
  });
87
89
 
88
90
  console.log(line);
89
- console.log(chalk.gray(` ${files.length} bot · ${totalFacts} toplam bilgi · natureco memory search <sorgu>`));
91
+ console.log(chalk.gray(` ${files.length} bot · ${totalFacts} ${L('toplam bilgi', 'total facts')} · natureco memory search <sorgu>`));
90
92
  console.log(line);
91
93
  console.log('');
92
94
  }
93
95
 
94
96
  function listMemory() {
95
97
  if (!fs.existsSync(MEMORY_DIR)) {
96
- console.log(chalk.gray('\n Hafıza dizini bulunamadı.\n'));
98
+ console.log(chalk.gray(L('\n Hafıza dizini bulunamadı.\n', '\n Memory directory not found.\n')));
97
99
  return;
98
100
  }
99
101
 
100
102
  const files = fs.readdirSync(MEMORY_DIR).filter(f => f.endsWith('.json'));
101
- console.log(chalk.cyan.bold(`\n Hafıza Dosyaları (${files.length})\n`));
103
+ console.log(chalk.cyan.bold(`\n ${L('Hafıza Dosyaları', 'Memory Files')} (${files.length})\n`));
102
104
  files.forEach(f => {
103
105
  const botId = f.replace('.json', '');
104
106
  const mem = loadMemory(botId);
105
107
  console.log(chalk.white(` ${f}`));
106
- console.log(chalk.gray(` Bot: ${mem.botName || botId} · ${(mem.facts || []).length} bilgi`));
108
+ console.log(chalk.gray(` Bot: ${mem.botName || botId} · ${(mem.facts || []).length} ${L('bilgi', 'facts')}`));
107
109
  });
108
110
  console.log('');
109
111
  }
110
112
 
111
113
  function searchMemory(query) {
112
114
  if (!query) {
113
- console.log(chalk.red('\n ❌ Arama sorgusu gerekli\n'));
114
- console.log(chalk.gray(' Kullanım: natureco memory search <sorgu>\n'));
115
+ console.log(chalk.red(L('\n ❌ Arama sorgusu gerekli\n', '\n ❌ A search query is required\n')));
116
+ console.log(chalk.gray(L(' Kullanım: natureco memory search <sorgu>\n', ' Usage: natureco memory search <query>\n')));
115
117
  process.exit(1);
116
118
  }
117
119
 
118
120
  if (!fs.existsSync(MEMORY_DIR)) {
119
- console.log(chalk.gray('\n Hafıza dizini bulunamadı.\n'));
121
+ console.log(chalk.gray(L('\n Hafıza dizini bulunamadı.\n', '\n Memory directory not found.\n')));
120
122
  return;
121
123
  }
122
124
 
@@ -129,20 +131,20 @@ function searchMemory(query) {
129
131
  const q = query.toLowerCase();
130
132
 
131
133
  if (mem.name?.toLowerCase().includes(q)) {
132
- results.push({ bot: mem.botName || botId, field: 'İsim', value: mem.name });
134
+ results.push({ bot: mem.botName || botId, field: L('İsim', 'Name'), value: mem.name });
133
135
  }
134
136
  if (mem.nickname?.toLowerCase().includes(q)) {
135
- results.push({ bot: mem.botName || botId, field: 'Lakap', value: mem.nickname });
137
+ results.push({ bot: mem.botName || botId, field: L('Lakap', 'Nickname'), value: mem.nickname });
136
138
  }
137
139
  (mem.facts || []).forEach(f => {
138
140
  const val = typeof f === 'string' ? f : f.value;
139
141
  if (val?.toLowerCase().includes(q)) {
140
- results.push({ bot: mem.botName || botId, field: 'Bilgi', value: val });
142
+ results.push({ bot: mem.botName || botId, field: L('Bilgi', 'Fact'), value: val });
141
143
  }
142
144
  });
143
145
  });
144
146
 
145
- console.log(chalk.cyan.bold(`\n "${query}" için ${results.length} sonuç (düz hafıza)\n`));
147
+ console.log(chalk.cyan.bold(`\n "${query}" ${L('için', 'for')} ${results.length} ${L('sonuç (düz hafıza)', 'result(s) (flat memory)')}\n`));
146
148
  results.forEach(r => {
147
149
  console.log(chalk.white(` [${r.bot}] `) + chalk.gray(`${r.field}: `) + chalk.white(r.value));
148
150
  });
@@ -154,12 +156,12 @@ function searchMemory(query) {
154
156
  let u; try { u = require('../utils/config').getConfig().userName; } catch {}
155
157
  const treeHits = searchTree(u || 'default', query);
156
158
  if (treeHits.length) {
157
- console.log(chalk.cyan(`\n Ağaç hafızada ${treeHits.length} sonuç:`));
159
+ console.log(chalk.cyan(`\n ${L('Ağaç hafızada', 'In tree memory')} ${treeHits.length} ${L('sonuç', 'result(s)')}:`));
158
160
  treeHits.slice(0, 15).forEach(h => console.log(chalk.gray(` ${h.file} › ## ${h.branch} › `) + chalk.white(h.text)));
159
161
  } else if (results.length === 0) {
160
- console.log(chalk.gray(' Sonuç bulunamadı (düz + ağaç hafıza).'));
162
+ console.log(chalk.gray(L(' Sonuç bulunamadı (düz + ağaç hafıza).', ' No results (flat + tree memory).')));
161
163
  }
162
- } catch { if (results.length === 0) console.log(chalk.gray(' Sonuç bulunamadı.')); }
164
+ } catch { if (results.length === 0) console.log(chalk.gray(L(' Sonuç bulunamadı.', ' No results.'))); }
163
165
  console.log('');
164
166
  }
165
167
 
@@ -170,15 +172,15 @@ function showMemory(botId) {
170
172
 
171
173
  console.log('');
172
174
  console.log(chalk.gray(' ' + '─'.repeat(48)));
173
- console.log(chalk.cyan.bold(`\n Hafıza: ${mem.botName || id}\n`));
175
+ console.log(chalk.cyan.bold(`\n ${L('Hafıza', 'Memory')}: ${mem.botName || id}\n`));
174
176
 
175
- if (mem.name) console.log(chalk.gray(' İsim : ') + chalk.white(mem.name));
176
- if (mem.nickname) console.log(chalk.gray(' Lakap : ') + chalk.white(mem.nickname));
177
- if (mem.botName) console.log(chalk.gray(' Bot adı : ') + chalk.cyan(mem.botName));
177
+ if (mem.name) console.log(chalk.gray(L(' İsim : ', ' Name : ')) + chalk.white(mem.name));
178
+ if (mem.nickname) console.log(chalk.gray(L(' Lakap : ', ' Nickname: ')) + chalk.white(mem.nickname));
179
+ if (mem.botName) console.log(chalk.gray(L(' Bot adı : ', ' Bot name: ')) + chalk.cyan(mem.botName));
178
180
 
179
181
  const facts = mem.facts || [];
180
182
  if (facts.length > 0) {
181
- console.log(chalk.gray('\n Bilgiler:\n'));
183
+ console.log(chalk.gray(L('\n Bilgiler:\n', '\n Facts:\n')));
182
184
  facts.forEach((f, i) => {
183
185
  const val = typeof f === 'string' ? f : f.value;
184
186
  const score = typeof f === 'object' ? f.score : 5;
@@ -191,12 +193,12 @@ function showMemory(botId) {
191
193
  function clearMemoryCmd(botId) {
192
194
  const id = botId || 'universal-provider';
193
195
  clearMemory(id);
194
- console.log(chalk.green(`\n ✓ Hafıza temizlendi: ${id}\n`));
196
+ console.log(chalk.green(`\n ✓ ${L('Hafıza temizlendi', 'Memory cleared')}: ${id}\n`));
195
197
  }
196
198
 
197
199
  function indexMemory() {
198
200
  if (!fs.existsSync(MEMORY_DIR)) {
199
- console.log(chalk.gray('\n Hafıza dizini bulunamadı.\n'));
201
+ console.log(chalk.gray(L('\n Hafıza dizini bulunamadı.\n', '\n Memory directory not found.\n')));
200
202
  return;
201
203
  }
202
204
 
@@ -219,7 +221,7 @@ function indexMemory() {
219
221
  } catch {}
220
222
  });
221
223
 
222
- console.log(chalk.green(`\n ✓ ${indexed} hafıza dosyası yeniden indexlendi\n`));
224
+ console.log(chalk.green(`\n ✓ ${indexed} ${L('hafıza dosyası yeniden indexlendi', 'memory file(s) re-indexed')}\n`));
223
225
  }
224
226
 
225
227
  // ── Export Memory ──────────────────────────────────────────────────────────────
@@ -228,19 +230,19 @@ function exportMemoryCmd(botId, outputFile) {
228
230
  const mem = memoryStore.loadMemory(id);
229
231
  const filePath = outputFile || path.join(process.cwd(), `memory-${id}.json`);
230
232
  fs.writeFileSync(filePath, JSON.stringify(mem, null, 2));
231
- console.log(chalk.green(`\n ✓ Hafıza dışa aktarıldı: ${filePath}\n`));
233
+ console.log(chalk.green(`\n ✓ ${L('Hafıza dışa aktarıldı', 'Memory exported')}: ${filePath}\n`));
232
234
  }
233
235
 
234
236
  // ── Import Memory ──────────────────────────────────────────────────────────────
235
237
  function importMemoryCmd(botId, sourceFile) {
236
238
  if (!sourceFile) {
237
- console.log(chalk.red('\n ❌ Kaynak dosya gerekli\n'));
238
- console.log(chalk.gray(' Kullanım: natureco memory import <botId> <dosya.json>\n'));
239
+ console.log(chalk.red(L('\n ❌ Kaynak dosya gerekli\n', '\n ❌ A source file is required\n')));
240
+ console.log(chalk.gray(L(' Kullanım: natureco memory import <botId> <dosya.json>\n', ' Usage: natureco memory import <botId> <file.json>\n')));
239
241
  return;
240
242
  }
241
243
  const resolvedPath = path.resolve(sourceFile.replace(/^~/, os.homedir()));
242
244
  if (!fs.existsSync(resolvedPath)) {
243
- console.log(chalk.red(`\n ❌ Dosya bulunamadı: ${resolvedPath}\n`));
245
+ console.log(chalk.red(`\n ❌ ${L('Dosya bulunamadı', 'File not found')}: ${resolvedPath}\n`));
244
246
  return;
245
247
  }
246
248
  try {
@@ -248,29 +250,29 @@ function importMemoryCmd(botId, sourceFile) {
248
250
  // v5.6.16: memoryStore.saveMemory kullan
249
251
  const importId = botId || 'universal-provider';
250
252
  memoryStore.saveMemory(importId, data);
251
- console.log(chalk.green(`\n ✓ Hafıza içe aktarıldı: ${importId}\n`));
253
+ console.log(chalk.green(`\n ✓ ${L('Hafıza içe aktarıldı', 'Memory imported')}: ${importId}\n`));
252
254
  } catch (err) {
253
- console.log(chalk.red(`\n ❌ Hata: ${err.message}\n`));
255
+ console.log(chalk.red(`\n ❌ ${L('Hata', 'Error')}: ${err.message}\n`));
254
256
  }
255
257
  }
256
258
 
257
259
  // ── Semantic Search ────────────────────────────────────────────────────────────
258
260
  function semanticSearchCmd(query) {
259
261
  if (!query) {
260
- console.log(chalk.red('\n ❌ Arama sorgusu gerekli\n'));
262
+ console.log(chalk.red(L('\n ❌ Arama sorgusu gerekli\n', '\n ❌ A search query is required\n')));
261
263
  return;
262
264
  }
263
265
  const results = semanticSearchMemory(query, 10);
264
- console.log(chalk.cyan.bold(`\n Semantic: "${query}" → ${results.length} sonuç\n`));
266
+ console.log(chalk.cyan.bold(`\n Semantic: "${query}" → ${results.length} ${L('sonuç', 'result(s)')}\n`));
265
267
  if (results.length === 0) {
266
- console.log(chalk.gray(' Sonuç bulunamadı.\n'));
268
+ console.log(chalk.gray(L(' Sonuç bulunamadı.\n', ' No results.\n')));
267
269
  return;
268
270
  }
269
271
  results.forEach((r, i) => {
270
272
  const pct = Math.round(r.score * 100);
271
273
  const bar = chalk.green('█'.repeat(Math.floor(pct / 10))) + chalk.gray('░'.repeat(10 - Math.floor(pct / 10)));
272
274
  console.log(` ${chalk.white(`${i + 1}.`)} ${bar} ${chalk.white(r.value.slice(0, 70))}`);
273
- console.log(chalk.gray(` [${r.bot}] alaka: %${pct}`));
275
+ console.log(chalk.gray(` [${r.bot}] ${L('alaka', 'relevance')}: %${pct}`));
274
276
  });
275
277
  console.log('');
276
278
  }
@@ -280,55 +282,55 @@ function wikiCmd(action, params) {
280
282
  if (!action || action === 'list') return wikiListCmd();
281
283
  if (action === 'show') {
282
284
  const slug = params?.[0];
283
- if (!slug) { console.log(chalk.red('\n ❌ Sayfa adı gerekli\n')); return; }
285
+ if (!slug) { console.log(chalk.red(L('\n ❌ Sayfa adı gerekli\n', '\n ❌ A page name is required\n'))); return; }
284
286
  const page = getWikiPage(slug);
285
- if (!page) { console.log(chalk.yellow(`\n ⚠ Sayfa bulunamadı: ${slug}\n`)); return; }
287
+ if (!page) { console.log(chalk.yellow(`\n ⚠ ${L('Sayfa bulunamadı', 'Page not found')}: ${slug}\n`)); return; }
286
288
  console.log(chalk.cyan.bold(`\n Wiki: ${page.slug}\n`));
287
289
  console.log(chalk.white(page.content));
288
- console.log(chalk.gray(`\n Son güncelleme: ${page.updatedAt}\n`));
290
+ console.log(chalk.gray(`\n ${L('Son güncelleme', 'Last updated')}: ${page.updatedAt}\n`));
289
291
  return;
290
292
  }
291
293
  if (action === 'create' || action === 'edit') {
292
294
  const slug = params?.[0];
293
295
  const content = params?.slice(1).join(' ');
294
296
  if (!slug || !content) {
295
- console.log(chalk.red('\n ❌ Kullanım: natureco memory wiki create <slug> <içerik>\n'));
297
+ console.log(chalk.red(L('\n ❌ Kullanım: natureco memory wiki create <slug> <içerik>\n', '\n ❌ Usage: natureco memory wiki create <slug> <content>\n')));
296
298
  return;
297
299
  }
298
300
  saveWikiPage(slug, content);
299
- console.log(chalk.green(`\n ✓ Wiki sayfası kaydedildi: ${slug}\n`));
301
+ console.log(chalk.green(`\n ✓ ${L('Wiki sayfası kaydedildi', 'Wiki page saved')}: ${slug}\n`));
300
302
  return;
301
303
  }
302
304
  if (action === 'search') {
303
305
  const query = params?.join(' ');
304
- if (!query) { console.log(chalk.red('\n ❌ Arama sorgusu gerekli\n')); return; }
306
+ if (!query) { console.log(chalk.red(L('\n ❌ Arama sorgusu gerekli\n', '\n ❌ A search query is required\n'))); return; }
305
307
  const results = searchWikiPages(query);
306
- console.log(chalk.cyan.bold(`\n Wiki: "${query}" → ${results.length} sonuç\n`));
307
- if (results.length === 0) { console.log(chalk.gray(' Sonuç bulunamadı.\n')); return; }
308
+ console.log(chalk.cyan.bold(`\n Wiki: "${query}" → ${results.length} ${L('sonuç', 'result(s)')}\n`));
309
+ if (results.length === 0) { console.log(chalk.gray(L(' Sonuç bulunamadı.\n', ' No results.\n'))); return; }
308
310
  results.forEach(p => {
309
311
  console.log(` ${chalk.white(p.slug)} ${chalk.gray('—')} ${chalk.gray((p.content || '').slice(0, 60))}`);
310
312
  });
311
313
  console.log('');
312
314
  return;
313
315
  }
314
- console.log(chalk.red(`\n ❌ Bilinmeyen wiki aksiyonu: ${action}\n`));
316
+ console.log(chalk.red(`\n ❌ ${L('Bilinmeyen wiki aksiyonu', 'Unknown wiki action')}: ${action}\n`));
315
317
  }
316
318
 
317
319
  function wikiCreateCmd(slug, content) {
318
320
  if (!slug || !content) {
319
- console.log(chalk.red('\n ❌ Kullanım: natureco memory wiki-create <slug> <içerik>\n'));
321
+ console.log(chalk.red(L('\n ❌ Kullanım: natureco memory wiki-create <slug> <içerik>\n', '\n ❌ Usage: natureco memory wiki-create <slug> <content>\n')));
320
322
  return;
321
323
  }
322
324
  saveWikiPage(slug, content);
323
- console.log(chalk.green(`\n ✓ Wiki sayfası oluşturuldu: ${slug}\n`));
325
+ console.log(chalk.green(`\n ✓ ${L('Wiki sayfası oluşturuldu', 'Wiki page created')}: ${slug}\n`));
324
326
  }
325
327
 
326
328
  function wikiListCmd() {
327
329
  const pages = listWikiPages();
328
- console.log(chalk.cyan.bold(`\n Wiki Sayfaları (${pages.length})\n`));
330
+ console.log(chalk.cyan.bold(`\n ${L('Wiki Sayfaları', 'Wiki Pages')} (${pages.length})\n`));
329
331
  if (pages.length === 0) {
330
- console.log(chalk.gray(' Henüz sayfa yok.\n'));
331
- console.log(chalk.gray(' Oluşturmak: ') + chalk.cyan('natureco memory wiki create <slug> <içerik>\n'));
332
+ console.log(chalk.gray(L(' Henüz sayfa yok.\n', ' No pages yet.\n')));
333
+ console.log(chalk.gray(L(' Oluşturmak: ', ' Create: ')) + chalk.cyan(L('natureco memory wiki create <slug> <içerik>\n', 'natureco memory wiki create <slug> <content>\n')));
332
334
  return;
333
335
  }
334
336
  pages.forEach(p => {
@@ -339,10 +341,10 @@ function wikiListCmd() {
339
341
  }
340
342
 
341
343
  function wikiSearchCmd(query) {
342
- if (!query) { console.log(chalk.red('\n ❌ Arama sorgusu gerekli\n')); return; }
344
+ if (!query) { console.log(chalk.red(L('\n ❌ Arama sorgusu gerekli\n', '\n ❌ A search query is required\n'))); return; }
343
345
  const results = searchWikiPages(query);
344
- console.log(chalk.cyan.bold(`\n Wiki Ara: "${query}" → ${results.length} sonuç\n`));
345
- if (results.length === 0) { console.log(chalk.gray(' Sonuç bulunamadı.\n')); return; }
346
+ console.log(chalk.cyan.bold(`\n ${L('Wiki Ara', 'Wiki Search')}: "${query}" → ${results.length} ${L('sonuç', 'result(s)')}\n`));
347
+ if (results.length === 0) { console.log(chalk.gray(L(' Sonuç bulunamadı.\n', ' No results.\n'))); return; }
346
348
  results.forEach(p => {
347
349
  console.log(` ${chalk.white(p.slug)}`);
348
350
  console.log(chalk.gray(` ${(p.content || '').slice(0, 80)}\n`));
@@ -353,11 +355,11 @@ function wikiSearchCmd(query) {
353
355
  function listWikiPages() {
354
356
  const WIKI_DIR = path.join(os.homedir(), '.natureco', 'wiki');
355
357
  if (!fs.existsSync(WIKI_DIR)) {
356
- console.log(chalk.gray('\n Wiki bos.\n'));
358
+ console.log(chalk.gray(L('\n Wiki bos.\n', '\n Wiki is empty.\n')));
357
359
  return;
358
360
  }
359
361
  const files = fs.readdirSync(WIKI_DIR).filter(f => f.endsWith('.md'));
360
- console.log(chalk.cyan(`\n Wiki Sayfalari (${files.length}):\n`));
362
+ console.log(chalk.cyan(`\n ${L('Wiki Sayfalari', 'Wiki Pages')} (${files.length}):\n`));
361
363
  files.forEach(f => console.log(` ${chalk.white(f.replace('.md',''))}`));
362
364
  console.log();
363
365
  }
@@ -367,7 +369,7 @@ function getWikiPage(slug) {
367
369
  const WIKI_DIR = path.join(os.homedir(), '.natureco', 'wiki');
368
370
  const filePath = path.join(WIKI_DIR, `${slug}.md`);
369
371
  if (!fs.existsSync(filePath)) {
370
- console.log(chalk.red(`\n ❌ Wiki sayfasi bulunamadi: ${slug}\n`));
372
+ console.log(chalk.red(`\n ❌ ${L('Wiki sayfasi bulunamadi', 'Wiki page not found')}: ${slug}\n`));
371
373
  return;
372
374
  }
373
375
  console.log(chalk.cyan(`\n ${slug}\n`));
@@ -381,7 +383,7 @@ function saveWikiPage(slug, content) {
381
383
  if (!fs.existsSync(WIKI_DIR)) fs.mkdirSync(WIKI_DIR, { recursive: true });
382
384
  const filePath = path.join(WIKI_DIR, `${slug}.md`);
383
385
  fs.writeFileSync(filePath, content);
384
- console.log(chalk.green(`\n ✓ Wiki sayfasi kaydedildi: ${slug}\n`));
386
+ console.log(chalk.green(`\n ✓ ${L('Wiki sayfasi kaydedildi', 'Wiki page saved')}: ${slug}\n`));
385
387
  }
386
388
 
387
389
  function searchWikiPages(query) {
@@ -432,7 +434,7 @@ function lintMemoryCmd(user) {
432
434
  const conflicts = all.filter((f) => f.level === 'conflict');
433
435
 
434
436
  if (all.length === 0) {
435
- console.log(chalk.green('\n ✓ Temiz — yinelenen veya çelişen kayıt yok.\n'));
437
+ console.log(chalk.green(L('\n ✓ Temiz — yinelenen veya çelişen kayıt yok.\n', '\n ✓ Clean — no duplicate or conflicting records.\n')));
436
438
  return;
437
439
  }
438
440
  // Tree bulgularında dal (branch) bağlamını da göster ki kullanıcı "hangisi nerede" bilsin.
@@ -442,14 +444,14 @@ function lintMemoryCmd(user) {
442
444
  console.log(` ${chalk.gray(' ' + sym)} ${f.b}${br(f.bBranch)}${f.file ? chalk.gray(' [' + f.file + ']') : ''}`);
443
445
  };
444
446
  if (dups.length) {
445
- console.log(chalk.yellow(`\n ⚠ ${dups.length} olası YİNELENEN (aynı bilgi iki kez):`));
447
+ console.log(chalk.yellow(`\n ⚠ ${dups.length} ${L('olası YİNELENEN (aynı bilgi iki kez)', 'likely DUPLICATE (same fact twice)')}:`));
446
448
  for (const f of dups.slice(0, 10)) printFinding(f, '≈');
447
449
  }
448
450
  if (conflicts.length) {
449
- console.log(chalk.red(`\n ⚠ ${conflicts.length} olası ÇELİŞKİ (aynı konu, farklı değer):`));
451
+ console.log(chalk.red(`\n ⚠ ${conflicts.length} ${L('olası ÇELİŞKİ (aynı konu, farklı değer)', 'likely CONFLICT (same subject, different value)')}:`));
450
452
  for (const f of conflicts.slice(0, 10)) printFinding(f, '↔');
451
453
  }
452
- console.log(chalk.gray(`\n Öneri: eskiyen/yanlış kaydı düzeltin — "natureco memory clear" veya elle. Tek doğru kalsın.\n`));
454
+ console.log(chalk.gray(`\n ${L('Öneri: eskiyen/yanlış kaydı düzeltin — "natureco memory clear" veya elle. Tek doğru kalsın.', 'Tip: fix the stale/wrong record — "natureco memory clear" or manually. Keep only the correct one.')}\n`));
453
455
  }
454
456
 
455
457
  module.exports = memoryCmd;