natureco-cli 1.0.9 → 1.0.11

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/bin/natureco.js CHANGED
@@ -45,8 +45,8 @@ program
45
45
  .action(bots);
46
46
 
47
47
  program
48
- .command('chat <bot-name>')
49
- .description('Start interactive chat with a bot')
48
+ .command('chat [bot-name]')
49
+ .description('Start interactive chat with a bot (uses default bot if not specified)')
50
50
  .option('--resume [session-id]', 'Resume a previous session')
51
51
  .action((botName, options) => {
52
52
  chat(botName, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -35,15 +35,38 @@ async function chat(botName, options = {}) {
35
35
  process.exit(1);
36
36
  }
37
37
 
38
- // Bot adı ile eşleşen botu bul
39
- let bot = botList.bots.find(b => b.name.toLowerCase() === botName.toLowerCase());
40
-
41
- if (!bot) {
42
- console.log(chalk.red(`\n❌ Bot "${botName}" not found.\n`));
43
- console.log(chalk.gray('Available bots:'));
44
- botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
45
- console.log('');
46
- process.exit(1);
38
+ // Bot adı verilmediyse config'den defaultBot'u kullan
39
+ let bot;
40
+ if (!botName) {
41
+ const { getConfig } = require('../utils/config');
42
+ const config = getConfig();
43
+
44
+ if (config.defaultBot) {
45
+ bot = botList.bots.find(b => b.name.toLowerCase() === config.defaultBot.toLowerCase());
46
+ if (!bot && config.defaultBotId) {
47
+ bot = botList.bots.find(b => b.id === config.defaultBotId);
48
+ }
49
+ }
50
+
51
+ if (!bot) {
52
+ console.log(chalk.red('\n❌ No default bot configured.\n'));
53
+ console.log(chalk.gray('Available bots:'));
54
+ botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
55
+ console.log('');
56
+ console.log(chalk.yellow('Usage: natureco chat <bot-name>\n'));
57
+ process.exit(1);
58
+ }
59
+ } else {
60
+ // Bot adı ile eşleşen botu bul
61
+ bot = botList.bots.find(b => b.name.toLowerCase() === botName.toLowerCase());
62
+
63
+ if (!bot) {
64
+ console.log(chalk.red(`\n❌ Bot "${botName}" not found.\n`));
65
+ console.log(chalk.gray('Available bots:'));
66
+ botList.bots.forEach(b => console.log(chalk.cyan(` - ${b.name}`)));
67
+ console.log('');
68
+ process.exit(1);
69
+ }
47
70
  }
48
71
 
49
72
  // Chat başlat
@@ -247,7 +247,7 @@ async function browseSkillsCommand() {
247
247
  message: 'Kurmak istediğiniz skill\'leri seçin:',
248
248
  choices: popularSkills.map(skill => ({
249
249
  name: `${skill.name} - ${skill.description}`,
250
- value: skill.slug,
250
+ value: skill.source === 'clawhub' ? `clawhub:${skill.slug}` : skill.slug,
251
251
  })),
252
252
  },
253
253
  ]);
@@ -277,14 +277,14 @@ Bu skill ${name} işlemlerini yapar.
277
277
 
278
278
  // Popular skills list
279
279
  const POPULAR_SKILLS = [
280
- { slug: 'github', name: 'GitHub', description: 'GitHub repo işlemleri' },
281
- { slug: 'filesystem', name: 'Filesystem', description: 'Dosya sistemi işlemleri' },
282
- { slug: 'web-search', name: 'Web Search', description: 'Web arama' },
283
- { slug: 'summarize', name: 'Summarize', description: 'Metin özetleme' },
284
- { slug: 'code-review', name: 'Code Review', description: 'Kod inceleme' },
285
- { slug: 'translate', name: 'Translate', description: 'Çeviri' },
286
- { slug: 'weather', name: 'Weather', description: 'Hava durumu' },
287
- { slug: 'calendar', name: 'Calendar', description: 'Takvim yönetimi' },
280
+ { slug: 'github', name: 'GitHub', description: 'GitHub repo işlemleri', source: 'clawhub' },
281
+ { slug: 'filesystem', name: 'Filesystem', description: 'Dosya sistemi işlemleri', source: 'clawhub' },
282
+ { slug: 'web-search', name: 'Web Search', description: 'Web arama', source: 'clawhub' },
283
+ { slug: 'summarize', name: 'Summarize', description: 'Metin özetleme', source: 'clawhub' },
284
+ { slug: 'code-review', name: 'Code Review', description: 'Kod inceleme', source: 'clawhub' },
285
+ { slug: 'translate', name: 'Translate', description: 'Çeviri', source: 'clawhub' },
286
+ { slug: 'weather', name: 'Weather', description: 'Hava durumu', source: 'clawhub' },
287
+ { slug: 'calendar', name: 'Calendar', description: 'Takvim yönetimi', source: 'clawhub' },
288
288
  ];
289
289
 
290
290
  // Get popular skills