natureco-cli 5.55.0 → 5.56.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/agent.js +14 -12
- package/src/commands/agents.js +26 -24
- package/src/commands/bots.js +10 -8
- package/src/commands/config.js +31 -29
- package/src/commands/tasks.js +78 -76
- package/src/commands/team.js +172 -170
- package/src/commands/workboard.js +15 -13
package/src/commands/team.js
CHANGED
|
@@ -1,171 +1,173 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* natureco team — Multi-agent orkestrasyon (Phase 7)
|
|
3
|
-
*
|
|
4
|
-
* Birden fazla uzman agent'ı aynı görev üzerinde paralel çalıştır.
|
|
5
|
-
* Her biri kendi system prompt'u ve tool setiyle bağımsız çalışır.
|
|
6
|
-
*
|
|
7
|
-
* Kullanım:
|
|
8
|
-
* natureco team list Mevcut agent tipleri
|
|
9
|
-
* natureco team status Son çalışan agent'lar
|
|
10
|
-
* natureco team spawn <type> <task> Tek agent çalıştır
|
|
11
|
-
* natureco team parallel <spec> Paralel çalıştır (JSON)
|
|
12
|
-
*
|
|
13
|
-
* Örnek:
|
|
14
|
-
* natureco team spawn seo "natureco.me için anahtar kelime öner"
|
|
15
|
-
* natureco team parallel '[{"type":"seo","task":"..."}, {"type":"content","task":"..."}]'
|
|
16
|
-
*/
|
|
17
|
-
|
|
1
|
+
/**
|
|
2
|
+
* natureco team — Multi-agent orkestrasyon (Phase 7)
|
|
3
|
+
*
|
|
4
|
+
* Birden fazla uzman agent'ı aynı görev üzerinde paralel çalıştır.
|
|
5
|
+
* Her biri kendi system prompt'u ve tool setiyle bağımsız çalışır.
|
|
6
|
+
*
|
|
7
|
+
* Kullanım:
|
|
8
|
+
* natureco team list Mevcut agent tipleri
|
|
9
|
+
* natureco team status Son çalışan agent'lar
|
|
10
|
+
* natureco team spawn <type> <task> Tek agent çalıştır
|
|
11
|
+
* natureco team parallel <spec> Paralel çalıştır (JSON)
|
|
12
|
+
*
|
|
13
|
+
* Örnek:
|
|
14
|
+
* natureco team spawn seo "natureco.me için anahtar kelime öner"
|
|
15
|
+
* natureco team parallel '[{"type":"seo","task":"..."}, {"type":"content","task":"..."}]'
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
18
|
const chalk = require('chalk');
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
lines
|
|
48
|
-
lines.push(tui.styled('
|
|
49
|
-
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted('
|
|
50
|
-
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted('
|
|
51
|
-
lines.push(tui.styled('
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
? tui.styled('
|
|
61
|
-
:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{ key: '
|
|
69
|
-
{ key: '
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
console.log('');
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
console.log(
|
|
99
|
-
console.log(chalk.gray(' ' + '─'.repeat(50)));
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
console.log(
|
|
143
|
-
|
|
144
|
-
console.log(
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
console.log(
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
console.log(chalk.
|
|
159
|
-
console.log(chalk.gray(' natureco team
|
|
160
|
-
console.log(chalk.gray(' natureco team
|
|
161
|
-
console.log('');
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (action === '
|
|
167
|
-
if (action === '
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
19
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
20
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
21
|
+
const tui = require('../utils/tui');
|
|
22
|
+
const subAgent = require('../utils/sub-agent');
|
|
23
|
+
const audit = require('../utils/audit');
|
|
24
|
+
|
|
25
|
+
async function cmdList() {
|
|
26
|
+
console.log('\n' + tui.styled(L(' 🤖 Mevcut Agent Tipleri', ' 🤖 Available Agent Types'), { color: tui.PALETTE.primary, bold: true }));
|
|
27
|
+
console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
|
|
28
|
+
|
|
29
|
+
const rows = Object.entries(subAgent.SYSTEM_PROMPTS).map(([type, prompt]) => ({
|
|
30
|
+
type,
|
|
31
|
+
prompt: prompt.length > 80 ? prompt.slice(0, 77) + '...' : prompt,
|
|
32
|
+
}));
|
|
33
|
+
console.log('\n' + tui.table(rows, [
|
|
34
|
+
{ key: 'type', label: L('Tip', 'Type'), minWidth: 14, render: r => tui.styled(r.type, { color: tui.PALETTE.primary, bold: true }) },
|
|
35
|
+
{ key: 'prompt', label: L('Sistem Prompt', 'System Prompt'), minWidth: 50, render: r => tui.C.muted(r.prompt) },
|
|
36
|
+
], { borderStyle: 'round', zebra: true }));
|
|
37
|
+
console.log('');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function cmdStatus() {
|
|
41
|
+
const status = subAgent.getStatus();
|
|
42
|
+
console.log('\n' + tui.styled(L(' 📊 Sub-Agent İstatistikleri', ' 📊 Sub-Agent Statistics'), { color: tui.PALETTE.primary, bold: true }));
|
|
43
|
+
console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
|
|
44
|
+
|
|
45
|
+
// Üst metrik kartı
|
|
46
|
+
const w = 50;
|
|
47
|
+
const lines = [];
|
|
48
|
+
lines.push(tui.styled(' ╭' + '─'.repeat(w) + '╮', { color: tui.PALETTE.border }));
|
|
49
|
+
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted(L('Toplam ', 'Total ')) + tui.styled(String(status.total).padStart(8), { color: tui.PALETTE.text, bold: true }) + ' ' + tui.styled('│', { color: tui.PALETTE.border }));
|
|
50
|
+
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted(L('Çalışan ', 'Running ')) + tui.styled(String(status.running).padStart(8), { color: tui.PALETTE.warning, bold: true }) + ' ' + tui.styled('│', { color: tui.PALETTE.border }));
|
|
51
|
+
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted(L('Tamamlanan ', 'Completed ')) + tui.styled(String(status.completed).padStart(8), { color: tui.PALETTE.success, bold: true }) + ' ' + tui.styled('│', { color: tui.PALETTE.border }));
|
|
52
|
+
lines.push(tui.styled(' │', { color: tui.PALETTE.border }) + ' ' + tui.C.muted(L('Başarısız ', 'Failed ')) + tui.styled(String(status.failed).padStart(8), { color: tui.PALETTE.danger, bold: true }) + ' ' + tui.styled('│', { color: tui.PALETTE.border }));
|
|
53
|
+
lines.push(tui.styled(' ╰' + '─'.repeat(w) + '╯', { color: tui.PALETTE.border }));
|
|
54
|
+
console.log('\n' + lines.join('\n'));
|
|
55
|
+
|
|
56
|
+
if (status.agents.length > 0) {
|
|
57
|
+
console.log('\n' + tui.styled(L(' 📜 Son 10 Agent', ' 📜 Last 10 Agents'), { color: tui.PALETTE.secondary, bold: true }));
|
|
58
|
+
const rows = status.agents.slice(0, 10).map(a => {
|
|
59
|
+
const icon = a.status === 'completed'
|
|
60
|
+
? tui.styled(' ✓ ', { bg: tui.PALETTE.success, color: '#000', bold: true })
|
|
61
|
+
: a.status === 'failed'
|
|
62
|
+
? tui.styled(' ✗ ', { bg: tui.PALETTE.danger, color: '#000', bold: true })
|
|
63
|
+
: tui.styled(' ⋯ ', { bg: tui.PALETTE.warning, color: '#000', bold: true });
|
|
64
|
+
const dur = a.completedAt ? Math.round((new Date(a.completedAt) - new Date(a.startedAt)) / 100) / 10 : '-';
|
|
65
|
+
return { icon, type: a.type, task: a.task.slice(0, 60), dur: dur + 's' };
|
|
66
|
+
});
|
|
67
|
+
console.log('\n' + tui.table(rows, [
|
|
68
|
+
{ key: 'icon', label: ' ', minWidth: 5 },
|
|
69
|
+
{ key: 'type', label: L('Tip', 'Type'), minWidth: 12, render: r => tui.styled(r.type, { color: tui.PALETTE.primary }) },
|
|
70
|
+
{ key: 'task', label: L('Görev', 'Task'), minWidth: 30, render: r => tui.C.muted(r.task) },
|
|
71
|
+
{ key: 'dur', label: L('Süre', 'Duration'), minWidth: 8, render: r => tui.C.text(r.dur) },
|
|
72
|
+
], { borderStyle: 'round', zebra: true }));
|
|
73
|
+
}
|
|
74
|
+
console.log('');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function cmdSpawn(args) {
|
|
78
|
+
const [type, ...taskParts] = args;
|
|
79
|
+
const task = taskParts.join(' ');
|
|
80
|
+
|
|
81
|
+
if (!type || !task) {
|
|
82
|
+
console.log(chalk.red(L('\n Kullanım: natureco team spawn <type> <task>\n', '\n Usage: natureco team spawn <type> <task>\n')));
|
|
83
|
+
console.log(chalk.gray(L(' Tipler: ', ' Types: ')) + Object.keys(subAgent.SYSTEM_PROMPTS).join(', '));
|
|
84
|
+
console.log('');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (!subAgent.SYSTEM_PROMPTS[type]) {
|
|
88
|
+
console.log(chalk.red(`\n ${L('Bilinmeyen agent tipi', 'Unknown agent type')}: ${type}`));
|
|
89
|
+
console.log(chalk.gray(L(' Tipler: ', ' Types: ')) + Object.keys(subAgent.SYSTEM_PROMPTS).join(', ') + '\n');
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log(chalk.cyan(`\n 🤖 ${type} agent ${L('başlatılıyor...', 'starting...')}\n`));
|
|
94
|
+
console.log(chalk.gray(` ${L('Görev', 'Task')}: ${task.slice(0, 100)}\n`));
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
const { result, usage, duration } = await subAgent.spawnSubAgent(type, task);
|
|
98
|
+
console.log(chalk.green(` ✓ ${L('Tamamlandı', 'Completed')} (${duration}ms)\n`));
|
|
99
|
+
console.log(chalk.gray(' ' + '─'.repeat(50)));
|
|
100
|
+
console.log(result);
|
|
101
|
+
console.log(chalk.gray(' ' + '─'.repeat(50)));
|
|
102
|
+
if (usage?.total_tokens) {
|
|
103
|
+
console.log(chalk.gray(` Token: ${usage.total_tokens} (${usage.prompt_tokens} in, ${usage.completion_tokens} out)\n`));
|
|
104
|
+
}
|
|
105
|
+
audit.log(audit.ACTIONS.TOOL_CALL, { source: 'team', type, task: task.slice(0, 100) });
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.log(chalk.red(`\n ❌ ${L('Hata', 'Error')}: ${e.message}\n`));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function cmdParallel(args) {
|
|
112
|
+
const spec = args.join(' ');
|
|
113
|
+
if (!spec) {
|
|
114
|
+
console.log(chalk.red(L('\n Kullanım: natureco team parallel \'<json-spec>\'\n', '\n Usage: natureco team parallel \'<json-spec>\'\n')));
|
|
115
|
+
console.log(chalk.gray(L(' Örnek: natureco team parallel \'[{"type":"seo","task":"..."},{"type":"content","task":"..."}]\'\n', ' Example: natureco team parallel \'[{"type":"seo","task":"..."},{"type":"content","task":"..."}]\'\n')));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
let agents;
|
|
120
|
+
try { agents = JSON.parse(spec); }
|
|
121
|
+
catch (e) {
|
|
122
|
+
console.log(chalk.red(`\n ${L('Geçersiz JSON', 'Invalid JSON')}: ${e.message}\n`));
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (!Array.isArray(agents) || agents.length === 0) {
|
|
127
|
+
console.log(chalk.red(L('\n JSON array olmalı.\n', '\n JSON must be an array.\n')));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
console.log(chalk.cyan(`\n 🤝 ${agents.length} agent ${L('paralel başlatılıyor...', 'starting in parallel...')}\n`));
|
|
132
|
+
|
|
133
|
+
try {
|
|
134
|
+
const { results, failed } = await subAgent.spawnParallel(agents);
|
|
135
|
+
console.log(chalk.green(`\n ✓ ${results.length - failed.length}/${results.length} agent ${L('tamamlandı', 'completed')}\n`));
|
|
136
|
+
|
|
137
|
+
for (let i = 0; i < results.length; i++) {
|
|
138
|
+
const r = results[i];
|
|
139
|
+
const a = agents[i];
|
|
140
|
+
console.log(chalk.bold(`\n ── Agent ${i+1}: ${a.type} ──`));
|
|
141
|
+
if (r.status === 'fulfilled') {
|
|
142
|
+
console.log(chalk.gray(` ${L('Görev', 'Task')}: ${a.task.slice(0, 60)}`));
|
|
143
|
+
console.log(chalk.green(L(' ✓ Sonuç:', ' ✓ Result:')));
|
|
144
|
+
console.log(' ' + (r.value?.result || '').slice(0, 500));
|
|
145
|
+
} else {
|
|
146
|
+
console.log(chalk.red(` ✗ ${L('Hata', 'Error')}: ${r.reason}`));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
console.log('');
|
|
150
|
+
} catch (e) {
|
|
151
|
+
console.log(chalk.red(`\n ❌ ${L('Hata', 'Error')}: ${e.message}\n`));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async function team(args) {
|
|
156
|
+
const [action, ...params] = args || [];
|
|
157
|
+
if (!action || action === 'help') {
|
|
158
|
+
console.log(chalk.yellow(L('\n Kullanım:', '\n Usage:')));
|
|
159
|
+
console.log(chalk.gray(L(' natureco team list Agent tipleri', ' natureco team list Agent types')));
|
|
160
|
+
console.log(chalk.gray(L(' natureco team status Son çalışan agent\'lar', ' natureco team status Recently run agents')));
|
|
161
|
+
console.log(chalk.gray(L(' natureco team spawn <type> <task> Tek agent çalıştır', ' natureco team spawn <type> <task> Run a single agent')));
|
|
162
|
+
console.log(chalk.gray(L(' natureco team parallel <json> Paralel çalıştır', ' natureco team parallel <json> Run in parallel')));
|
|
163
|
+
console.log('');
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (action === 'list') return cmdList();
|
|
167
|
+
if (action === 'status') return cmdStatus();
|
|
168
|
+
if (action === 'spawn') return cmdSpawn(params);
|
|
169
|
+
if (action === 'parallel') return cmdParallel(params);
|
|
170
|
+
console.log(chalk.red(`\n ${L('Bilinmeyen', 'Unknown')}: ${action}\n`));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
module.exports = team;
|
|
@@ -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');
|
|
@@ -33,8 +35,8 @@ function workboard(args) {
|
|
|
33
35
|
if (action === 'export') return exportBoard();
|
|
34
36
|
if (action === 'import') return importBoard(params[0]);
|
|
35
37
|
|
|
36
|
-
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
37
|
-
console.log(chalk.gray(' Kullanım: natureco workboard [show|add|move|remove|clear|columns|export|import]\n'));
|
|
38
|
+
console.log(chalk.red(`\n ❌ ${L('Bilinmeyen komut', 'Unknown command')}: ${action}\n`));
|
|
39
|
+
console.log(chalk.gray(L(' Kullanım: natureco workboard [show|add|move|remove|clear|columns|export|import]\n', ' Usage: natureco workboard [show|add|move|remove|clear|columns|export|import]\n')));
|
|
38
40
|
process.exit(1);
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -80,7 +82,7 @@ function showBoard() {
|
|
|
80
82
|
|
|
81
83
|
function addItem(text) {
|
|
82
84
|
if (!text) {
|
|
83
|
-
console.log(chalk.red('\n ❌ Text gerekli\n'));
|
|
85
|
+
console.log(chalk.red(L('\n ❌ Text gerekli\n', '\n ❌ Text required\n')));
|
|
84
86
|
console.log(chalk.cyan(' natureco workboard add "Task description"\n'));
|
|
85
87
|
process.exit(1);
|
|
86
88
|
}
|
|
@@ -100,7 +102,7 @@ function addItem(text) {
|
|
|
100
102
|
|
|
101
103
|
function moveItem(id, column) {
|
|
102
104
|
if (!id || !column) {
|
|
103
|
-
console.log(chalk.red('\n ❌ id ve column gerekli\n'));
|
|
105
|
+
console.log(chalk.red(L('\n ❌ id ve column gerekli\n', '\n ❌ id and column required\n')));
|
|
104
106
|
console.log(chalk.cyan(' natureco workboard move <id> done\n'));
|
|
105
107
|
process.exit(1);
|
|
106
108
|
}
|
|
@@ -108,7 +110,7 @@ function moveItem(id, column) {
|
|
|
108
110
|
const board = loadBoard();
|
|
109
111
|
const item = board.items.find(i => i.id === id);
|
|
110
112
|
if (!item) {
|
|
111
|
-
console.log(chalk.red(`\n ❌ Item
|
|
113
|
+
console.log(chalk.red(`\n ❌ ${L('Item bulunamadı', 'Item not found')}: ${id}\n`));
|
|
112
114
|
process.exit(1);
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -120,14 +122,14 @@ function moveItem(id, column) {
|
|
|
120
122
|
|
|
121
123
|
function removeItem(id) {
|
|
122
124
|
if (!id) {
|
|
123
|
-
console.log(chalk.red('\n ❌ id gerekli\n'));
|
|
125
|
+
console.log(chalk.red(L('\n ❌ id gerekli\n', '\n ❌ id required\n')));
|
|
124
126
|
process.exit(1);
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
const board = loadBoard();
|
|
128
130
|
const idx = board.items.findIndex(i => i.id === id);
|
|
129
131
|
if (idx === -1) {
|
|
130
|
-
console.log(chalk.red(`\n ❌ Item
|
|
132
|
+
console.log(chalk.red(`\n ❌ ${L('Item bulunamadı', 'Item not found')}: ${id}\n`));
|
|
131
133
|
process.exit(1);
|
|
132
134
|
}
|
|
133
135
|
|
|
@@ -140,7 +142,7 @@ function clearBoard() {
|
|
|
140
142
|
const board = loadBoard();
|
|
141
143
|
board.items = [];
|
|
142
144
|
saveBoard(board);
|
|
143
|
-
console.log(chalk.gray('\n 🗑️ Board temizlendi\n'));
|
|
145
|
+
console.log(chalk.gray(L('\n 🗑️ Board temizlendi\n', '\n 🗑️ Board cleared\n')));
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
function manageColumns(params) {
|
|
@@ -150,7 +152,7 @@ function manageColumns(params) {
|
|
|
150
152
|
if (params[0] === 'set') {
|
|
151
153
|
const cols = params.slice(1);
|
|
152
154
|
if (cols.length === 0) {
|
|
153
|
-
console.log(chalk.red('\n ❌ En az bir kolon gerekli\n'));
|
|
155
|
+
console.log(chalk.red(L('\n ❌ En az bir kolon gerekli\n', '\n ❌ At least one column required\n')));
|
|
154
156
|
process.exit(1);
|
|
155
157
|
}
|
|
156
158
|
config.workboard.columns = cols;
|
|
@@ -180,26 +182,26 @@ function exportBoard() {
|
|
|
180
182
|
|
|
181
183
|
function importBoard(filePath) {
|
|
182
184
|
if (!filePath) {
|
|
183
|
-
console.log(chalk.red('\n ❌ Dosya gerekli\n'));
|
|
185
|
+
console.log(chalk.red(L('\n ❌ Dosya gerekli\n', '\n ❌ File required\n')));
|
|
184
186
|
process.exit(1);
|
|
185
187
|
}
|
|
186
188
|
|
|
187
189
|
if (!fs.existsSync(filePath)) {
|
|
188
|
-
console.log(chalk.red(`\n ❌ Dosya
|
|
190
|
+
console.log(chalk.red(`\n ❌ ${L('Dosya bulunamadı', 'File not found')}: ${filePath}\n`));
|
|
189
191
|
process.exit(1);
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
try {
|
|
193
195
|
const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
194
196
|
if (!data.items || !Array.isArray(data.items)) {
|
|
195
|
-
console.log(chalk.red('\n ❌ Geçersiz board JSON (items array gerekli)\n'));
|
|
197
|
+
console.log(chalk.red(L('\n ❌ Geçersiz board JSON (items array gerekli)\n', '\n ❌ Invalid board JSON (items array required)\n')));
|
|
196
198
|
process.exit(1);
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
saveBoard(data);
|
|
200
202
|
console.log(chalk.green(`\n ✅ Board imported: ${data.items.length} items\n`));
|
|
201
203
|
} catch (err) {
|
|
202
|
-
console.log(chalk.red(`\n ❌ Import
|
|
204
|
+
console.log(chalk.red(`\n ❌ ${L('Import hatası', 'Import error')}: ${err.message}\n`));
|
|
203
205
|
process.exit(1);
|
|
204
206
|
}
|
|
205
207
|
}
|