natureco-cli 5.57.0 → 5.59.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 +1 -1
- package/src/commands/channels.js +11 -9
- package/src/commands/cron.js +75 -73
- package/src/commands/doctor.js +24 -22
- package/src/commands/gateway.js +25 -23
- package/src/commands/init.js +30 -28
- package/src/commands/plugins.js +69 -67
- package/src/commands/setup.js +42 -40
- package/src/commands/skills.js +76 -74
- package/src/commands/status.js +10 -8
package/src/commands/skills.js
CHANGED
|
@@ -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 tui = require('../utils/tui');
|
|
3
5
|
const path = require('path');
|
|
4
6
|
const fs = require('fs');
|
|
@@ -20,7 +22,7 @@ async function skills(args) {
|
|
|
20
22
|
if (action === 'install') {
|
|
21
23
|
const slug = params[0];
|
|
22
24
|
if (!slug) {
|
|
23
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills install <slug>\n'));
|
|
25
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills install <slug>\n', '\n❌ Usage: natureco skills install <slug>\n')));
|
|
24
26
|
process.exit(1);
|
|
25
27
|
}
|
|
26
28
|
await installSkillCommand(slug);
|
|
@@ -30,7 +32,7 @@ async function skills(args) {
|
|
|
30
32
|
if (action === 'remove') {
|
|
31
33
|
const slug = params[0];
|
|
32
34
|
if (!slug) {
|
|
33
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills remove <slug>\n'));
|
|
35
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills remove <slug>\n', '\n❌ Usage: natureco skills remove <slug>\n')));
|
|
34
36
|
process.exit(1);
|
|
35
37
|
}
|
|
36
38
|
await removeSkillCommand(slug);
|
|
@@ -42,7 +44,7 @@ async function skills(args) {
|
|
|
42
44
|
if (flag === '--all') {
|
|
43
45
|
await updateAllSkillsCommand();
|
|
44
46
|
} else {
|
|
45
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills update --all\n'));
|
|
47
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills update --all\n', '\n❌ Usage: natureco skills update --all\n')));
|
|
46
48
|
process.exit(1);
|
|
47
49
|
}
|
|
48
50
|
return;
|
|
@@ -51,7 +53,7 @@ async function skills(args) {
|
|
|
51
53
|
if (action === 'create') {
|
|
52
54
|
const name = params[0];
|
|
53
55
|
if (!name) {
|
|
54
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills create <ad>\n'));
|
|
56
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills create <ad>\n', '\n❌ Usage: natureco skills create <name>\n')));
|
|
55
57
|
process.exit(1);
|
|
56
58
|
}
|
|
57
59
|
await createSkillCommand(name);
|
|
@@ -88,7 +90,7 @@ async function skills(args) {
|
|
|
88
90
|
if (action === 'accept') {
|
|
89
91
|
const proposalId = params[0];
|
|
90
92
|
if (!proposalId) {
|
|
91
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills accept <proposal-id>\n'));
|
|
93
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills accept <proposal-id>\n', '\n❌ Usage: natureco skills accept <proposal-id>\n')));
|
|
92
94
|
process.exit(1);
|
|
93
95
|
}
|
|
94
96
|
await acceptProposalCommand(proposalId);
|
|
@@ -98,7 +100,7 @@ async function skills(args) {
|
|
|
98
100
|
if (action === 'reject') {
|
|
99
101
|
const proposalId = params[0];
|
|
100
102
|
if (!proposalId) {
|
|
101
|
-
console.log(chalk.red('\n❌ Kullanım: natureco skills reject <proposal-id>\n'));
|
|
103
|
+
console.log(chalk.red(L('\n❌ Kullanım: natureco skills reject <proposal-id>\n', '\n❌ Usage: natureco skills reject <proposal-id>\n')));
|
|
102
104
|
process.exit(1);
|
|
103
105
|
}
|
|
104
106
|
detector.rejectProposal(proposalId);
|
|
@@ -108,7 +110,7 @@ async function skills(args) {
|
|
|
108
110
|
|
|
109
111
|
if (action === 'forget') {
|
|
110
112
|
detector.reset();
|
|
111
|
-
console.log(chalk.yellow('\n🧹 Tüm pattern hafızası ve proposal\'lar silindi.\n'));
|
|
113
|
+
console.log(chalk.yellow(L('\n🧹 Tüm pattern hafızası ve proposal\'lar silindi.\n', '\n🧹 All pattern memory and proposals cleared.\n')));
|
|
112
114
|
return;
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -120,27 +122,27 @@ async function skills(args) {
|
|
|
120
122
|
|
|
121
123
|
if (action === 'install-mp') {
|
|
122
124
|
const skillName = params[0];
|
|
123
|
-
if (!skillName) { console.log(chalk.red('\n❌ Kullanım: natureco skills install-mp <name>\n')); process.exit(1); }
|
|
125
|
+
if (!skillName) { console.log(chalk.red(L('\n❌ Kullanım: natureco skills install-mp <name>\n', '\n❌ Usage: natureco skills install-mp <name>\n'))); process.exit(1); }
|
|
124
126
|
await installFromMarketplace(skillName);
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
if (action === 'search-mp') {
|
|
129
131
|
const query = params[0];
|
|
130
|
-
if (!query) { console.log(chalk.red('\n❌ Kullanım: natureco skills search-mp <query>\n')); process.exit(1); }
|
|
132
|
+
if (!query) { console.log(chalk.red(L('\n❌ Kullanım: natureco skills search-mp <query>\n', '\n❌ Usage: natureco skills search-mp <query>\n'))); process.exit(1); }
|
|
131
133
|
await searchMarketplace(query);
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
if (action === 'remove-mp' || action === 'uninstall-mp') {
|
|
136
138
|
const skillName = params[0];
|
|
137
|
-
if (!skillName) { console.log(chalk.red('\n❌ Kullanım: natureco skills remove-mp <name>\n')); process.exit(1); }
|
|
139
|
+
if (!skillName) { console.log(chalk.red(L('\n❌ Kullanım: natureco skills remove-mp <name>\n', '\n❌ Usage: natureco skills remove-mp <name>\n'))); process.exit(1); }
|
|
138
140
|
uninstallMarketplace(skillName);
|
|
139
141
|
return;
|
|
140
142
|
}
|
|
141
143
|
|
|
142
|
-
console.log(chalk.red(`\n❌ Geçersiz action: ${action}\n`));
|
|
143
|
-
console.log(chalk.gray('Kullanım: natureco skills [list|install|remove|update|create|search|browse|info|check|suggest|accept|reject|forget|marketplace|install-mp|search-mp|remove-mp]\n'));
|
|
144
|
+
console.log(chalk.red(`\n❌ ${L('Geçersiz action', 'Invalid action')}: ${action}\n`));
|
|
145
|
+
console.log(chalk.gray(L('Kullanım: natureco skills [list|install|remove|update|create|search|browse|info|check|suggest|accept|reject|forget|marketplace|install-mp|search-mp|remove-mp]\n', 'Usage: natureco skills [list|install|remove|update|create|search|browse|info|check|suggest|accept|reject|forget|marketplace|install-mp|search-mp|remove-mp]\n')));
|
|
144
146
|
process.exit(1);
|
|
145
147
|
}
|
|
146
148
|
|
|
@@ -157,7 +159,7 @@ async function listMarketplace() {
|
|
|
157
159
|
for (const s of result.skills) {
|
|
158
160
|
console.log(' ' + chalk.cyan(s.name.padEnd(22)) + chalk.gray((s.description || '').slice(0, 50)));
|
|
159
161
|
}
|
|
160
|
-
console.log('\n ' + chalk.gray('Kur: ') + chalk.cyan('natureco skills install-mp <name>'));
|
|
162
|
+
console.log('\n ' + chalk.gray(L('Kur: ', 'Install: ')) + chalk.cyan('natureco skills install-mp <name>'));
|
|
161
163
|
console.log('');
|
|
162
164
|
}
|
|
163
165
|
}
|
|
@@ -169,7 +171,7 @@ async function installFromMarketplace(skillName) {
|
|
|
169
171
|
if (!mp) return;
|
|
170
172
|
const result = await mp.execute({ action: 'install', skillName });
|
|
171
173
|
if (result.success) {
|
|
172
|
-
console.log(chalk.green('\n ✓ ' + skillName + ' kuruldu: ' + result.path + '\n'));
|
|
174
|
+
console.log(chalk.green('\n ✓ ' + skillName + L(' kuruldu: ', ' installed: ') + result.path + '\n'));
|
|
173
175
|
} else {
|
|
174
176
|
console.log(chalk.red('\n ✗ ' + result.error + '\n'));
|
|
175
177
|
}
|
|
@@ -182,7 +184,7 @@ async function searchMarketplace(query) {
|
|
|
182
184
|
if (!mp) return;
|
|
183
185
|
const result = await mp.execute({ action: 'search', query });
|
|
184
186
|
if (result.success) {
|
|
185
|
-
console.log(chalk.cyan.bold('\n 🔍 "' + query + '" icin sonuclar\n'));
|
|
187
|
+
console.log(chalk.cyan.bold('\n 🔍 "' + query + L('" icin sonuclar\n', '" results\n')));
|
|
186
188
|
for (const s of result.results) {
|
|
187
189
|
console.log(' ' + chalk.cyan(s.name.padEnd(22)) + chalk.gray((s.description || '').slice(0, 50)));
|
|
188
190
|
}
|
|
@@ -194,9 +196,9 @@ function uninstallMarketplace(skillName) {
|
|
|
194
196
|
const skillDir = path.join(os.homedir(), '.natureco', 'skills', skillName);
|
|
195
197
|
if (fs.existsSync(skillDir)) {
|
|
196
198
|
fs.rmSync(skillDir, { recursive: true });
|
|
197
|
-
console.log(chalk.green('\n ✓ ' + skillName + ' kaldirildi\n'));
|
|
199
|
+
console.log(chalk.green('\n ✓ ' + skillName + L(' kaldirildi\n', ' removed\n')));
|
|
198
200
|
} else {
|
|
199
|
-
console.log(chalk.yellow('\n ' + skillName + ' zaten yok\n'));
|
|
201
|
+
console.log(chalk.yellow('\n ' + skillName + L(' zaten yok\n', ' already gone\n')));
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
|
|
@@ -206,41 +208,41 @@ async function listSkills() {
|
|
|
206
208
|
const userCount = allSkills.filter(s => s.source === 'user').length;
|
|
207
209
|
|
|
208
210
|
console.log(chalk.gray('\n ' + '─'.repeat(48)));
|
|
209
|
-
console.log(chalk.cyan.bold('\n Yüklü Skill\'ler') + chalk.gray(` — toplam ${allSkills.length} (${builtinCount} yerleşik${userCount ? `, ${userCount} kişisel` : ''})`));
|
|
210
|
-
console.log(chalk.gray(' Yerleşikler: ~/.natureco/skills-builtin · Kişiseller: ~/.natureco/skills · Araçlar: ~/.natureco/tools\n'));
|
|
211
|
+
console.log(chalk.cyan.bold(L('\n Yüklü Skill\'ler', '\n Installed Skills')) + chalk.gray(` — ${L('toplam', 'total')} ${allSkills.length} (${builtinCount} ${L('yerleşik', 'built-in')}${userCount ? `, ${userCount} ${L('kişisel', 'personal')}` : ''})`));
|
|
212
|
+
console.log(chalk.gray(L(' Yerleşikler: ~/.natureco/skills-builtin · Kişiseller: ~/.natureco/skills · Araçlar: ~/.natureco/tools\n', ' Built-in: ~/.natureco/skills-builtin · Personal: ~/.natureco/skills · Tools: ~/.natureco/tools\n')));
|
|
211
213
|
|
|
212
214
|
if (allSkills.length === 0) {
|
|
213
215
|
// Yerleşikler pakette gelir; bu duruma normalde ancak paket bozulursa düşülür
|
|
214
|
-
console.log(chalk.red(' ⚠ Hiç skill bulunamadı — kurulum bozuk olabilir.'));
|
|
215
|
-
console.log(chalk.gray(' Onarmak için: ') + chalk.cyan('npm install -g natureco-cli') + chalk.gray(' (yeniden kurar)\n'));
|
|
216
|
+
console.log(chalk.red(L(' ⚠ Hiç skill bulunamadı — kurulum bozuk olabilir.', ' ⚠ No skills found — installation may be broken.')));
|
|
217
|
+
console.log(chalk.gray(L(' Onarmak için: ', ' To repair: ')) + chalk.cyan('npm install -g natureco-cli') + chalk.gray(L(' (yeniden kurar)\n', ' (reinstalls)\n')));
|
|
216
218
|
return;
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
allSkills.forEach((skill, index) => {
|
|
220
|
-
const sourceLabel = skill.source === 'builtin' ? chalk.blue('[yerleşik]') :
|
|
221
|
-
skill.source === 'user' ? chalk.cyan('[kişisel]') :
|
|
222
|
-
chalk.magenta('[proje]');
|
|
222
|
+
const sourceLabel = skill.source === 'builtin' ? chalk.blue(L('[yerleşik]', '[built-in]')) :
|
|
223
|
+
skill.source === 'user' ? chalk.cyan(L('[kişisel]', '[personal]')) :
|
|
224
|
+
chalk.magenta(L('[proje]', '[project]'));
|
|
223
225
|
console.log(chalk.white(` ${index + 1}. ${skill.name} `) + sourceLabel);
|
|
224
226
|
console.log(chalk.gray(` ${skill.description}`));
|
|
225
227
|
if (skill.metadata?.requires?.bins) {
|
|
226
|
-
console.log(chalk.gray(` Gerekli: ${skill.metadata.requires.bins.join(', ')}`));
|
|
228
|
+
console.log(chalk.gray(` ${L('Gerekli', 'Required')}: ${skill.metadata.requires.bins.join(', ')}`));
|
|
227
229
|
}
|
|
228
230
|
console.log('');
|
|
229
231
|
});
|
|
230
232
|
|
|
231
233
|
console.log(chalk.gray(' ' + '─'.repeat(48)));
|
|
232
|
-
console.log(chalk.gray(` Toplam: ${allSkills.length} skill`));
|
|
233
|
-
console.log(chalk.gray(' Kaldırmak için: ') + chalk.cyan('natureco skills remove <slug>\n'));
|
|
234
|
+
console.log(chalk.gray(` ${L('Toplam', 'Total')}: ${allSkills.length} skill`));
|
|
235
|
+
console.log(chalk.gray(L(' Kaldırmak için: ', ' To remove: ')) + chalk.cyan('natureco skills remove <slug>\n'));
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
async function installSkillCommand(slug) {
|
|
237
|
-
console.log(chalk.yellow(`\n⏳ "${slug}" skill'i yükleniyor
|
|
239
|
+
console.log(chalk.yellow(`\n⏳ "${slug}" ${L("skill'i yükleniyor...", 'installing...')}\n`));
|
|
238
240
|
|
|
239
241
|
try {
|
|
240
242
|
await installSkill(slug);
|
|
241
|
-
console.log(chalk.green(`✅ "${slug}" başarıyla yüklendi!\n`));
|
|
243
|
+
console.log(chalk.green(`✅ "${slug}" ${L('başarıyla yüklendi', 'installed successfully')}!\n`));
|
|
242
244
|
} catch (err) {
|
|
243
|
-
console.log(chalk.red(`\n❌ Hata: ${err.message}\n`));
|
|
245
|
+
console.log(chalk.red(`\n❌ ${L('Hata', 'Error')}: ${err.message}\n`));
|
|
244
246
|
process.exit(1);
|
|
245
247
|
}
|
|
246
248
|
}
|
|
@@ -250,53 +252,53 @@ async function removeSkillCommand(slug) {
|
|
|
250
252
|
{
|
|
251
253
|
type: 'confirm',
|
|
252
254
|
name: 'confirm',
|
|
253
|
-
message: `"${slug}" skill'ini silmek istediğinizden emin misiniz
|
|
255
|
+
message: `"${slug}" ${L("skill'ini silmek istediğinizden emin misiniz?", '— delete this skill?')}`,
|
|
254
256
|
default: false,
|
|
255
257
|
},
|
|
256
258
|
]);
|
|
257
259
|
|
|
258
260
|
if (!confirm) {
|
|
259
|
-
console.log(chalk.gray('\nİptal edildi.\n'));
|
|
261
|
+
console.log(chalk.gray(L('\nİptal edildi.\n', '\nCancelled.\n')));
|
|
260
262
|
return;
|
|
261
263
|
}
|
|
262
264
|
|
|
263
265
|
try {
|
|
264
266
|
removeSkill(slug);
|
|
265
|
-
console.log(chalk.green(`\n✅ "${slug}" silindi
|
|
267
|
+
console.log(chalk.green(`\n✅ "${slug}" ${L('silindi.', 'deleted.')}\n`));
|
|
266
268
|
} catch (err) {
|
|
267
|
-
console.log(chalk.red(`\n❌ Hata: ${err.message}\n`));
|
|
269
|
+
console.log(chalk.red(`\n❌ ${L('Hata', 'Error')}: ${err.message}\n`));
|
|
268
270
|
process.exit(1);
|
|
269
271
|
}
|
|
270
272
|
}
|
|
271
273
|
|
|
272
274
|
async function updateAllSkillsCommand() {
|
|
273
|
-
console.log(chalk.yellow('\n⏳ Tüm skill\'ler güncelleniyor...\n'));
|
|
275
|
+
console.log(chalk.yellow(L('\n⏳ Tüm skill\'ler güncelleniyor...\n', '\n⏳ Updating all skills...\n')));
|
|
274
276
|
|
|
275
277
|
try {
|
|
276
278
|
const updated = await updateAllSkills();
|
|
277
279
|
if (updated.length === 0) {
|
|
278
|
-
console.log(chalk.gray('Güncellenecek skill bulunamadı.\n'));
|
|
280
|
+
console.log(chalk.gray(L('Güncellenecek skill bulunamadı.\n', 'No skills to update.\n')));
|
|
279
281
|
} else {
|
|
280
|
-
console.log(chalk.green(`✅ ${updated.length} skill güncellendi:\n`));
|
|
282
|
+
console.log(chalk.green(`✅ ${updated.length} skill ${L('güncellendi', 'updated')}:\n`));
|
|
281
283
|
updated.forEach(s => console.log(chalk.cyan(` - ${s}`)));
|
|
282
284
|
console.log('');
|
|
283
285
|
}
|
|
284
286
|
} catch (err) {
|
|
285
|
-
console.log(chalk.red(`\n❌ Hata: ${err.message}\n`));
|
|
287
|
+
console.log(chalk.red(`\n❌ ${L('Hata', 'Error')}: ${err.message}\n`));
|
|
286
288
|
process.exit(1);
|
|
287
289
|
}
|
|
288
290
|
}
|
|
289
291
|
|
|
290
292
|
async function createSkillCommand(name) {
|
|
291
|
-
console.log(chalk.yellow(`\n⏳ "${name}" skill şablonu oluşturuluyor
|
|
293
|
+
console.log(chalk.yellow(`\n⏳ "${name}" skill ${L('şablonu oluşturuluyor...', 'template being created...')}\n`));
|
|
292
294
|
|
|
293
295
|
try {
|
|
294
296
|
const skillPath = createSkillTemplate(name);
|
|
295
|
-
console.log(chalk.green(`✅ Skill şablonu oluşturuldu:\n`));
|
|
297
|
+
console.log(chalk.green(`✅ ${L('Skill şablonu oluşturuldu', 'Skill template created')}:\n`));
|
|
296
298
|
console.log(chalk.cyan(` ${skillPath}\n`));
|
|
297
|
-
console.log(chalk.gray('SKILL.md dosyasını düzenleyerek skill\'i özelleştirin.\n'));
|
|
299
|
+
console.log(chalk.gray(L('SKILL.md dosyasını düzenleyerek skill\'i özelleştirin.\n', 'Customize the skill by editing SKILL.md.\n')));
|
|
298
300
|
} catch (err) {
|
|
299
|
-
console.log(chalk.red(`\n❌ Hata: ${err.message}\n`));
|
|
301
|
+
console.log(chalk.red(`\n❌ ${L('Hata', 'Error')}: ${err.message}\n`));
|
|
300
302
|
process.exit(1);
|
|
301
303
|
}
|
|
302
304
|
}
|
|
@@ -305,22 +307,22 @@ async function searchSkillsCommand(query) {
|
|
|
305
307
|
if (!query || query.trim().length === 0) {
|
|
306
308
|
try {
|
|
307
309
|
const popularSkills = await getPopularSkills();
|
|
308
|
-
console.log(chalk.yellow('\nPopüler Skill\'ler:\n'));
|
|
310
|
+
console.log(chalk.yellow(L('\nPopüler Skill\'ler:\n', '\nPopular Skills:\n')));
|
|
309
311
|
popularSkills.forEach(skill => {
|
|
310
312
|
console.log(chalk.cyan(` ${skill.name.padEnd(15)}`), chalk.gray(skill.description));
|
|
311
313
|
});
|
|
312
314
|
} catch (err) {
|
|
313
|
-
console.log(chalk.red(`\n ❌ Popüler skill'ler
|
|
315
|
+
console.log(chalk.red(`\n ❌ ${L("Popüler skill'ler alınamadı", 'Could not fetch popular skills')}: ${err.message}\n`));
|
|
314
316
|
}
|
|
315
317
|
console.log('');
|
|
316
|
-
console.log(chalk.gray('Kurmak için: '), chalk.cyan('natureco skills install <slug>'));
|
|
317
|
-
console.log(chalk.gray('Örnek: '), chalk.cyan('natureco skills install github'));
|
|
318
|
+
console.log(chalk.gray(L('Kurmak için: ', 'To install: ')), chalk.cyan('natureco skills install <slug>'));
|
|
319
|
+
console.log(chalk.gray(L('Örnek: ', 'Example: ')), chalk.cyan('natureco skills install github'));
|
|
318
320
|
console.log(chalk.gray('ClawHub: '), chalk.cyan('natureco skills install clawhub:github'));
|
|
319
321
|
console.log('');
|
|
320
322
|
return;
|
|
321
323
|
}
|
|
322
324
|
|
|
323
|
-
console.log(chalk.yellow(`\n⏳ "${query}" aranıyor
|
|
325
|
+
console.log(chalk.yellow(`\n⏳ "${query}" ${L('aranıyor...', 'searching...')}\n`));
|
|
324
326
|
|
|
325
327
|
try {
|
|
326
328
|
// ClawHub search API
|
|
@@ -328,30 +330,30 @@ async function searchSkillsCommand(query) {
|
|
|
328
330
|
const response = await fetch(searchUrl);
|
|
329
331
|
|
|
330
332
|
if (!response.ok) {
|
|
331
|
-
throw new SkillError('ClawHub API\'ye erişilemedi', 'fetch', `https://clawhub.ai/api/skills?q=${encodeURIComponent(query)}`);
|
|
333
|
+
throw new SkillError(L('ClawHub API\'ye erişilemedi', 'Could not reach the ClawHub API'), 'fetch', `https://clawhub.ai/api/skills?q=${encodeURIComponent(query)}`);
|
|
332
334
|
}
|
|
333
335
|
|
|
334
336
|
let data;
|
|
335
337
|
try {
|
|
336
338
|
data = await response.json();
|
|
337
339
|
} catch {
|
|
338
|
-
throw new SkillError('ClawHub geçersiz yanıt döndü (JSON bekleniyordu)', 'parse', searchUrl);
|
|
340
|
+
throw new SkillError(L('ClawHub geçersiz yanıt döndü (JSON bekleniyordu)', 'ClawHub returned an invalid response (JSON expected)'), 'parse', searchUrl);
|
|
339
341
|
}
|
|
340
342
|
const results = data.skills || [];
|
|
341
343
|
|
|
342
344
|
if (results.length === 0) {
|
|
343
|
-
console.log(chalk.yellow(`"${query}" için sonuç bulunamad
|
|
345
|
+
console.log(chalk.yellow(`"${query}" ${L('için sonuç bulunamadı.', '— no results found.')}\n`));
|
|
344
346
|
return;
|
|
345
347
|
}
|
|
346
348
|
|
|
347
|
-
console.log(chalk.yellow(`"${query}" için ${results.length}
|
|
349
|
+
console.log(chalk.yellow(`"${query}" ${L('için', 'for')} ${results.length} ${L('sonuç', 'results')}:\n`));
|
|
348
350
|
results.forEach(skill => {
|
|
349
|
-
console.log(chalk.cyan(` ${skill.name.padEnd(15)}`), chalk.gray(skill.description || 'Açıklama yok'));
|
|
350
|
-
console.log(chalk.gray(` Kurmak için: natureco skills install clawhub:${skill.slug}`));
|
|
351
|
+
console.log(chalk.cyan(` ${skill.name.padEnd(15)}`), chalk.gray(skill.description || L('Açıklama yok', 'No description')));
|
|
352
|
+
console.log(chalk.gray(` ${L('Kurmak için', 'To install')}: natureco skills install clawhub:${skill.slug}`));
|
|
351
353
|
});
|
|
352
354
|
console.log('');
|
|
353
355
|
} catch (err) {
|
|
354
|
-
console.log(chalk.red(`\n ❌ Arama başarısız: ${err.message}\n`));
|
|
356
|
+
console.log(chalk.red(`\n ❌ ${L('Arama başarısız', 'Search failed')}: ${err.message}\n`));
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
359
|
|
|
@@ -360,18 +362,18 @@ async function browseSkillsCommand() {
|
|
|
360
362
|
try {
|
|
361
363
|
popularSkills = await getPopularSkills();
|
|
362
364
|
} catch (err) {
|
|
363
|
-
console.log(chalk.red(`\n ❌ Popüler skill'ler
|
|
365
|
+
console.log(chalk.red(`\n ❌ ${L("Popüler skill'ler alınamadı", 'Could not fetch popular skills')}: ${err.message}\n`));
|
|
364
366
|
return;
|
|
365
367
|
}
|
|
366
368
|
|
|
367
|
-
console.log(chalk.green.bold('\n╭─ Popüler Skill\'ler ─╮\n'));
|
|
369
|
+
console.log(chalk.green.bold(L('\n╭─ Popüler Skill\'ler ─╮\n', '\n╭─ Popular Skills ─╮\n')));
|
|
368
370
|
|
|
369
371
|
process.stdin.resume();
|
|
370
372
|
const { selectedSkills } = await inquirer.prompt([
|
|
371
373
|
{
|
|
372
374
|
type: 'checkbox',
|
|
373
375
|
name: 'selectedSkills',
|
|
374
|
-
message: 'Kurmak istediğiniz skill\'leri seçin:',
|
|
376
|
+
message: L('Kurmak istediğiniz skill\'leri seçin:', 'Select the skills you want to install:'),
|
|
375
377
|
choices: popularSkills.map(skill => ({
|
|
376
378
|
name: `${skill.name} - ${skill.description}`,
|
|
377
379
|
value: skill.source === 'clawhub' ? `clawhub:${skill.slug}` : skill.slug,
|
|
@@ -381,22 +383,22 @@ async function browseSkillsCommand() {
|
|
|
381
383
|
process.stdin.pause();
|
|
382
384
|
|
|
383
385
|
if (selectedSkills.length === 0) {
|
|
384
|
-
console.log(chalk.gray('\nHiçbir skill seçilmedi.\n'));
|
|
386
|
+
console.log(chalk.gray(L('\nHiçbir skill seçilmedi.\n', '\nNo skills selected.\n')));
|
|
385
387
|
return;
|
|
386
388
|
}
|
|
387
389
|
|
|
388
|
-
console.log(chalk.yellow(`\n⏳ ${selectedSkills.length} skill kuruluyor
|
|
390
|
+
console.log(chalk.yellow(`\n⏳ ${selectedSkills.length} skill ${L('kuruluyor...', 'installing...')}\n`));
|
|
389
391
|
|
|
390
392
|
for (const slug of selectedSkills) {
|
|
391
393
|
try {
|
|
392
394
|
await installSkill(slug);
|
|
393
|
-
console.log(chalk.green(`✅ ${slug} kuruldu`));
|
|
395
|
+
console.log(chalk.green(`✅ ${slug} ${L('kuruldu', 'installed')}`));
|
|
394
396
|
} catch (err) {
|
|
395
|
-
console.log(chalk.red(`❌ ${slug}
|
|
397
|
+
console.log(chalk.red(`❌ ${slug} ${L('kurulamadı', 'could not be installed')}: ${err.message}`));
|
|
396
398
|
}
|
|
397
399
|
}
|
|
398
400
|
|
|
399
|
-
console.log(chalk.green('\n✅ Kurulum tamamlandı!\n'));
|
|
401
|
+
console.log(chalk.green(L('\n✅ Kurulum tamamlandı!\n', '\n✅ Installation complete!\n')));
|
|
400
402
|
}
|
|
401
403
|
|
|
402
404
|
async function infoSkill(slug) {
|
|
@@ -457,11 +459,11 @@ async function listProposals() {
|
|
|
457
459
|
|
|
458
460
|
console.log('\n' + tui.styled(' 🧠 Self-Evolving Skill Proposals', { color: tui.PALETTE.primary, bold: true }));
|
|
459
461
|
console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
|
|
460
|
-
console.log(' ' + tui.C.muted('Kullanımın tekrar eden pattern\'lerinden otomatik skill önerileri.\n'));
|
|
462
|
+
console.log(' ' + tui.C.muted(L('Kullanımın tekrar eden pattern\'lerinden otomatik skill önerileri.\n', 'Automatic skill suggestions from your recurring usage patterns.\n')));
|
|
461
463
|
|
|
462
464
|
if (pending.length === 0) {
|
|
463
|
-
console.log(' ' + tui.C.muted('Şu an öneri yok. Daha fazla tool çağrısı yap, sistem öğrensin.'));
|
|
464
|
-
console.log(' ' + tui.C.muted('Pattern\'leri sıfırla: ') + tui.C.brand('natureco skills forget\n'));
|
|
465
|
+
console.log(' ' + tui.C.muted(L('Şu an öneri yok. Daha fazla tool çağrısı yap, sistem öğrensin.', 'No suggestions right now. Make more tool calls so the system can learn.')));
|
|
466
|
+
console.log(' ' + tui.C.muted(L('Pattern\'leri sıfırla: ', 'Reset patterns: ')) + tui.C.brand('natureco skills forget\n'));
|
|
465
467
|
return;
|
|
466
468
|
}
|
|
467
469
|
|
|
@@ -474,26 +476,26 @@ async function listProposals() {
|
|
|
474
476
|
}));
|
|
475
477
|
|
|
476
478
|
console.log(tui.table(rows, [
|
|
477
|
-
{ key: 'name', label: 'Öneri', minWidth: 25, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
|
|
478
|
-
{ key: 'count', label: 'Tekrar', minWidth: 7, render: r => tui.styled(r.count, { color: tui.PALETTE.accent, bold: true }) },
|
|
479
|
+
{ key: 'name', label: L('Öneri', 'Suggestion'), minWidth: 25, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
|
|
480
|
+
{ key: 'count', label: L('Tekrar', 'Repeats'), minWidth: 7, render: r => tui.styled(r.count, { color: tui.PALETTE.accent, bold: true }) },
|
|
479
481
|
{ key: 'pattern', label: 'Pattern', minWidth: 30, render: r => tui.C.muted(r.pattern) },
|
|
480
|
-
{ key: 'first', label: 'İlk', minWidth: 18, render: r => tui.C.muted(r.first) },
|
|
482
|
+
{ key: 'first', label: L('İlk', 'First'), minWidth: 18, render: r => tui.C.muted(r.first) },
|
|
481
483
|
], { borderStyle: 'round', zebra: true }));
|
|
482
484
|
|
|
483
|
-
console.log('\n ' + tui.C.muted('Kabul et: ') + tui.C.brand('natureco skills accept <id>'));
|
|
484
|
-
console.log(' ' + tui.C.muted('Reddet: ') + tui.C.brand('natureco skills reject <id>\n'));
|
|
485
|
+
console.log('\n ' + tui.C.muted(L('Kabul et: ', 'Accept: ')) + tui.C.brand('natureco skills accept <id>'));
|
|
486
|
+
console.log(' ' + tui.C.muted(L('Reddet: ', 'Reject: ')) + tui.C.brand('natureco skills reject <id>\n'));
|
|
485
487
|
}
|
|
486
488
|
|
|
487
489
|
async function acceptProposalCommand(proposalId) {
|
|
488
|
-
console.log(chalk.yellow('\n⏳ Skill oluşturuluyor...\n'));
|
|
490
|
+
console.log(chalk.yellow(L('\n⏳ Skill oluşturuluyor...\n', '\n⏳ Creating skill...\n')));
|
|
489
491
|
const result = detector.acceptProposal(proposalId);
|
|
490
492
|
if (!result.success) {
|
|
491
493
|
console.log(chalk.red(`\n❌ ${result.reason}\n`));
|
|
492
494
|
process.exit(1);
|
|
493
495
|
}
|
|
494
|
-
console.log(chalk.green(`✅ Yeni skill oluşturuldu: ${result.skillName}\n`));
|
|
495
|
-
console.log(chalk.gray(` Yol: ${result.path}\n`));
|
|
496
|
-
console.log(chalk.gray(' SKILL.md dosyasını düzenleyerek özelleştirebilirsin.\n'));
|
|
496
|
+
console.log(chalk.green(`✅ ${L('Yeni skill oluşturuldu', 'New skill created')}: ${result.skillName}\n`));
|
|
497
|
+
console.log(chalk.gray(` ${L('Yol', 'Path')}: ${result.path}\n`));
|
|
498
|
+
console.log(chalk.gray(L(' SKILL.md dosyasını düzenleyerek özelleştirebilirsin.\n', ' You can customize it by editing SKILL.md.\n')));
|
|
497
499
|
audit.log(audit.ACTIONS.SKILL_AUTO, { proposalId, skillName: result.skillName });
|
|
498
500
|
}
|
|
499
501
|
|
package/src/commands/status.js
CHANGED
|
@@ -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 F = require('../utils/format');
|
|
3
5
|
const tui = require('../utils/tui');
|
|
4
6
|
const fs = require('fs');
|
|
@@ -40,8 +42,8 @@ function cmdRun() {
|
|
|
40
42
|
const pidFile = path.join(os.homedir(), '.natureco', 'gateway.pid');
|
|
41
43
|
const gatewayRunning = fs.existsSync(pidFile);
|
|
42
44
|
const gatewayStatus = gatewayRunning
|
|
43
|
-
? tui.styled(' ✓ Çalışıyor ', { bg: tui.PALETTE.success, color: '#000', bold: true })
|
|
44
|
-
: tui.styled(' ✗ Durmuş ', { bg: tui.PALETTE.muted, color: '#000', bold: true });
|
|
45
|
+
? tui.styled(L(' ✓ Çalışıyor ', ' ✓ Running '), { bg: tui.PALETTE.success, color: '#000', bold: true })
|
|
46
|
+
: tui.styled(L(' ✗ Durmuş ', ' ✗ Stopped '), { bg: tui.PALETTE.muted, color: '#000', bold: true });
|
|
45
47
|
lines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Gateway ') + gatewayStatus + ' '.repeat(23) + tui.styled(' │', { color: tui.PALETTE.border }));
|
|
46
48
|
|
|
47
49
|
if (cfg.providerUrl) {
|
|
@@ -70,7 +72,7 @@ function cmdRun() {
|
|
|
70
72
|
const all = getSkills();
|
|
71
73
|
const builtin = all.filter(s => s.source === 'builtin').length;
|
|
72
74
|
const user = all.length - builtin;
|
|
73
|
-
skillInfo = `${all.length} (${builtin} yerleşik` + (user > 0 ? ` + ${user}
|
|
75
|
+
skillInfo = `${all.length} (${builtin} ${L('yerleşik', 'built-in')}` + (user > 0 ? ` + ${user} ${L('kullanıcı', 'user')}` : '') + ')';
|
|
74
76
|
}
|
|
75
77
|
} catch {}
|
|
76
78
|
lines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Skills ') + tui.styled(skillInfo.padEnd(36), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
|
|
@@ -83,7 +85,7 @@ function cmdRun() {
|
|
|
83
85
|
lines.push(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.C.muted('Tools ') + tui.styled(String(toolCount).padEnd(36), { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
|
|
84
86
|
|
|
85
87
|
lines.push(tui.styled(' ╰' + '─'.repeat(cardW) + '╯', { color: tui.PALETTE.border }));
|
|
86
|
-
console.log('\n' + tui.styled(' 🩺 Sistem Durumu', { color: tui.PALETTE.primary, bold: true }));
|
|
88
|
+
console.log('\n' + tui.styled(L(' 🩺 Sistem Durumu', ' 🩺 System Status'), { color: tui.PALETTE.primary, bold: true }));
|
|
87
89
|
console.log(lines.join('\n'));
|
|
88
90
|
console.log('');
|
|
89
91
|
}
|
|
@@ -113,7 +115,7 @@ function cmdUsage() {
|
|
|
113
115
|
const cfg = config ? config.getConfig() : {};
|
|
114
116
|
|
|
115
117
|
if (!cfg.providerUrl) {
|
|
116
|
-
console.log('\n' + tui.C.muted(' Provider tanımlı değil.'));
|
|
118
|
+
console.log('\n' + tui.C.muted(L(' Provider tanımlı değil.', ' Provider not set.')));
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -126,10 +128,10 @@ function cmdUsage() {
|
|
|
126
128
|
{ key: 'session', label: 'Session', value: String(usage.sessionTokens || '—') },
|
|
127
129
|
];
|
|
128
130
|
|
|
129
|
-
console.log('\n' + tui.styled(' 📊 Provider Kullanımı', { color: tui.PALETTE.primary, bold: true }));
|
|
131
|
+
console.log('\n' + tui.styled(L(' 📊 Provider Kullanımı', ' 📊 Provider Usage'), { color: tui.PALETTE.primary, bold: true }));
|
|
130
132
|
console.log('\n' + tui.table(rows, [
|
|
131
|
-
{ key: 'key', label: 'Anahtar', minWidth: 12, render: r => tui.C.muted(r.key) },
|
|
132
|
-
{ key: 'value', label: 'Değer', minWidth: 30, render: r => tui.C.text(r.value) },
|
|
133
|
+
{ key: 'key', label: L('Anahtar', 'Key'), minWidth: 12, render: r => tui.C.muted(r.key) },
|
|
134
|
+
{ key: 'value', label: L('Değer', 'Value'), minWidth: 30, render: r => tui.C.text(r.value) },
|
|
133
135
|
], { borderStyle: 'round', zebra: true }));
|
|
134
136
|
console.log('');
|
|
135
137
|
}
|