natureco-cli 2.11.5 → 2.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.11.5",
3
+ "version": "2.12.0",
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.11.5</div>
214
+ <div class="version-badge" id="version-badge">v2.12.0</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.11.5',
344
+ version: 'v2.12.0',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
@@ -1,5 +1,6 @@
1
1
  const chalk = require('chalk');
2
2
  const { execSync } = require('child_process');
3
+ const inquirer = require('inquirer');
3
4
  const packageJson = require('../../package.json');
4
5
 
5
6
  async function update() {
@@ -8,18 +9,17 @@ async function update() {
8
9
  console.log(chalk.yellow('\n⏳ Güncelleme kontrol ediliyor...\n'));
9
10
 
10
11
  try {
11
- // npm'den en son versiyonu al
12
- const latestVersion = execSync('npm view natureco-cli version', {
13
- encoding: 'utf8',
14
- stdio: ['pipe', 'pipe', 'ignore'],
15
- }).trim();
16
-
17
- console.log(chalk.cyan('Mevcut versiyon:'), chalk.white(currentVersion));
18
- console.log(chalk.cyan('En son versiyon:'), chalk.white(latestVersion));
12
+ // npm registry'den en son versiyonu al
13
+ const response = await fetch('https://registry.npmjs.org/natureco-cli/latest');
14
+ const data = await response.json();
15
+ const latestVersion = data.version;
16
+
17
+ console.log(chalk.cyan('Mevcut versiyon:'), chalk.white(`v${currentVersion}`));
18
+ console.log(chalk.cyan('En son versiyon:'), chalk.white(`v${latestVersion}`));
19
19
  console.log('');
20
20
 
21
21
  if (currentVersion === latestVersion) {
22
- console.log(chalk.green('✅ NatureCo CLI güncel!\n'));
22
+ console.log(chalk.green(`✅ Zaten güncel: v${currentVersion}\n`));
23
23
  return;
24
24
  }
25
25
 
@@ -27,18 +27,63 @@ async function update() {
27
27
  const isNewer = compareVersions(latestVersion, currentVersion) > 0;
28
28
 
29
29
  if (isNewer) {
30
- console.log(chalk.yellow('🔔 Yeni versiyon mevcut!\n'));
30
+ console.log(chalk.green(`✅ Yeni versiyon mevcut: v${currentVersion} → v${latestVersion}\n`));
31
31
  console.log(chalk.gray('Güncellemek için:\n'));
32
- console.log(chalk.cyan(' npm install -g natureco-cli@latest\n'));
33
- console.log(chalk.gray('veya\n'));
34
- console.log(chalk.cyan(' npm update -g natureco-cli\n'));
32
+ console.log(chalk.cyan(' npm install -g natureco-cli@latest --force\n'));
33
+
34
+ // İsteğe bağlı otomatik güncelleme
35
+ const { shouldUpdate } = await inquirer.prompt([
36
+ {
37
+ type: 'confirm',
38
+ name: 'shouldUpdate',
39
+ message: 'Şimdi güncellensin mi?',
40
+ default: true,
41
+ },
42
+ ]);
43
+
44
+ if (shouldUpdate) {
45
+ console.log(chalk.yellow('\n⏳ Güncelleme yapılıyor...\n'));
46
+
47
+ try {
48
+ execSync('npm install -g natureco-cli@latest --force', {
49
+ stdio: 'inherit',
50
+ });
51
+
52
+ console.log(chalk.green(`\n✅ Güncelleme tamamlandı! v${latestVersion}\n`));
53
+ } catch (err) {
54
+ console.log(chalk.red('\n❌ Güncelleme başarısız oldu.\n'));
55
+ console.log(chalk.gray('Manuel olarak güncellemek için:\n'));
56
+ console.log(chalk.cyan(' npm install -g natureco-cli@latest --force\n'));
57
+ }
58
+ } else {
59
+ console.log(chalk.gray('\nGüncelleme iptal edildi.\n'));
60
+ }
35
61
  } else {
36
- console.log(chalk.green('✅ NatureCo CLI güncel!\n'));
62
+ console.log(chalk.green(`✅ Zaten güncel: v${currentVersion}\n`));
37
63
  }
38
64
  } catch (err) {
39
- // npm view başarısız olursa (paket henüz yayınlanmamış)
40
- console.log(chalk.gray('Güncelleme kontrolü yapılamadı.\n'));
41
- console.log(chalk.gray('Paket henüz npm\'de yayınlanmamış olabilir.\n'));
65
+ // Fetch başarısız olursa fallback olarak npm view kullan
66
+ try {
67
+ const latestVersion = execSync('npm view natureco-cli version', {
68
+ encoding: 'utf8',
69
+ stdio: ['pipe', 'pipe', 'ignore'],
70
+ }).trim();
71
+
72
+ console.log(chalk.cyan('Mevcut versiyon:'), chalk.white(`v${currentVersion}`));
73
+ console.log(chalk.cyan('En son versiyon:'), chalk.white(`v${latestVersion}`));
74
+ console.log('');
75
+
76
+ if (currentVersion === latestVersion) {
77
+ console.log(chalk.green(`✅ Zaten güncel: v${currentVersion}\n`));
78
+ } else {
79
+ console.log(chalk.green(`✅ Yeni versiyon mevcut: v${currentVersion} → v${latestVersion}\n`));
80
+ console.log(chalk.gray('Güncellemek için:\n'));
81
+ console.log(chalk.cyan(' npm install -g natureco-cli@latest --force\n'));
82
+ }
83
+ } catch (fallbackErr) {
84
+ console.log(chalk.gray('Güncelleme kontrolü yapılamadı.\n'));
85
+ console.log(chalk.gray('İnternet bağlantınızı kontrol edin.\n'));
86
+ }
42
87
  }
43
88
  }
44
89
 
package/src/utils/api.js CHANGED
@@ -136,6 +136,18 @@ function getMcpTools() {
136
136
  return allTools;
137
137
  }
138
138
 
139
+ // Groq-incompatible MCP tools (strict validation issues)
140
+ const BLOCKED_MCP_TOOLS = ['search_issues', 'search_repositories'];
141
+
142
+ /**
143
+ * Get MCP tools filtered for AI consumption
144
+ * Removes tools that are incompatible with Groq's strict validation
145
+ */
146
+ function getMcpToolsForAI() {
147
+ const tools = getMcpTools();
148
+ return tools.filter(t => !BLOCKED_MCP_TOOLS.includes(t.name));
149
+ }
150
+
139
151
  /**
140
152
  * Normalize MCP tool schema for AI consumption
141
153
  * Adds hints to number/integer parameters to prevent string conversion
@@ -358,7 +370,7 @@ function getProviderConfig() {
358
370
  */
359
371
  function formatToolsForOpenAI() {
360
372
  const localTools = getToolDefinitions();
361
- const mcpTools = getMcpTools();
373
+ const mcpTools = getMcpToolsForAI(); // Use filtered MCP tools
362
374
 
363
375
  // Normalize MCP tools before combining
364
376
  const normalizedMcpTools = mcpTools.map(tool => normalizeMcpToolSchema(tool));
@@ -381,7 +393,7 @@ function formatToolsForOpenAI() {
381
393
  */
382
394
  function formatToolsForAnthropic() {
383
395
  const localTools = getToolDefinitions();
384
- const mcpTools = getMcpTools();
396
+ const mcpTools = getMcpToolsForAI(); // Use filtered MCP tools
385
397
 
386
398
  // Normalize MCP tools before combining
387
399
  const normalizedMcpTools = mcpTools.map(tool => normalizeMcpToolSchema(tool));