natureco-cli 5.61.0 → 5.63.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/CHANGELOG.md +13 -1
- package/package.json +7 -5
- package/src/commands/admin-rpc.js +7 -5
- package/src/commands/approvals.js +20 -18
- package/src/commands/backup.js +7 -5
- package/src/commands/bonjour.js +20 -18
- package/src/commands/capability.js +5 -3
- package/src/commands/channel-helper.js +7 -5
- package/src/commands/chat.js +17 -17
- package/src/commands/commitments.js +18 -16
- package/src/commands/daemon.js +3 -1
- package/src/commands/device-pair.js +14 -12
- package/src/commands/devices.js +13 -11
- package/src/commands/directory.js +15 -13
- package/src/commands/dns.js +4 -2
- package/src/commands/nodes.js +4 -2
- package/src/commands/oc-path.js +13 -11
- package/src/commands/open-prose.js +5 -3
- package/src/commands/path.js +8 -6
- package/src/commands/proxy.js +3 -1
- package/src/commands/qr.js +4 -2
- package/src/commands/repl.js +110 -106
- package/src/commands/sandbox.js +6 -4
- package/src/commands/secrets.js +6 -4
- package/src/commands/system.js +3 -1
- package/src/commands/terminal.js +16 -14
- package/src/commands/thread-ownership.js +12 -10
- package/src/commands/tools.js +11 -9
- package/src/commands/transcripts.js +6 -4
- package/src/commands/vydra.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to NatureCo CLI will be documented in this file.
|
|
3
|
+
All notable changes to NatureCo CLI will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [5.63.0] - 2026-07-12 — Complete English REPL localization
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Completed the interactive REPL's Turkish/English localization across help, session headers, memory, plan review, identity prompts, command descriptions and workflow summaries.
|
|
9
|
+
- Localized default user, assistant and empty-session labels for new English installations without changing existing saved personas.
|
|
10
|
+
- Added English identity-question handling and language-aware internal plan/workflow instructions so responses remain in the selected interface language.
|
|
11
|
+
- Removed the unused legacy `mattermost` client, upgraded `node-telegram-bot-api` to 1.1.2 and Discord to 14.26.5, and pinned its compatible patched `undici` 6.27.0 runtime.
|
|
12
|
+
|
|
13
|
+
### Tests
|
|
14
|
+
- Added a dedicated English REPL regression suite that prevents untranslated Turkish help text from returning.
|
|
15
|
+
- Full validation: 49 test files, 640 passing tests (3 skipped), ESLint, CLI smoke test and npm package dry run.
|
|
4
16
|
|
|
5
17
|
## [5.51.4] - 2026-07-11 — "account: OTP kodu magiclink tipini de dener"
|
|
6
18
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.63.0",
|
|
4
|
+
"description": "Terminal-native AI agent CLI with bilingual TR/EN UI, multi-agent orchestration, persistent memory, secure tools and messaging integrations.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
|
7
7
|
},
|
|
@@ -74,11 +74,10 @@
|
|
|
74
74
|
"@whiskeysockets/baileys": "^7.0.0-rc10",
|
|
75
75
|
"chalk": "^4.1.2",
|
|
76
76
|
"commander": "^11.1.0",
|
|
77
|
-
"discord.js": "^14.26.
|
|
77
|
+
"discord.js": "^14.26.5",
|
|
78
78
|
"irc": "^0.5.2",
|
|
79
|
-
"mattermost": "^3.4.0",
|
|
80
79
|
"node-cron": "^4.2.1",
|
|
81
|
-
"node-telegram-bot-api": "^
|
|
80
|
+
"node-telegram-bot-api": "^1.1.2",
|
|
82
81
|
"openai": "^6.45.0",
|
|
83
82
|
"pino": "^8.21.0",
|
|
84
83
|
"qrcode": "^1.5.4",
|
|
@@ -93,5 +92,8 @@
|
|
|
93
92
|
"eslint": "^10.6.0",
|
|
94
93
|
"globals": "^15.15.0",
|
|
95
94
|
"vitest": "^4.1.9"
|
|
95
|
+
},
|
|
96
|
+
"overrides": {
|
|
97
|
+
"undici": "6.27.0"
|
|
96
98
|
}
|
|
97
99
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const http = require('http');
|
|
3
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
4
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
3
5
|
const { getConfig } = require('../utils/config');
|
|
4
6
|
|
|
5
7
|
const ALLOWED_METHODS = [
|
|
@@ -74,7 +76,7 @@ function adminRpc(args) {
|
|
|
74
76
|
if (action === 'methods') return listMethods();
|
|
75
77
|
|
|
76
78
|
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
77
|
-
console.log(chalk.gray(' Kullanım: natureco admin-rpc [status|start|stop|call|methods]\n'));
|
|
79
|
+
console.log(chalk.gray(L(' Kullanım: natureco admin-rpc [status|start|stop|call|methods]\n', ' Usage: natureco admin-rpc [status|start|stop|call|methods]\n')));
|
|
78
80
|
process.exit(1);
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -103,7 +105,7 @@ function listMethods() {
|
|
|
103
105
|
|
|
104
106
|
async function callMethod(method, jsonParams) {
|
|
105
107
|
if (!method) {
|
|
106
|
-
console.log(chalk.red('\n ❌ Method adı gerekli\n'));
|
|
108
|
+
console.log(chalk.red(L('\n ❌ Method adı gerekli\n', '\n ❌ Method name required\n')));
|
|
107
109
|
console.log(chalk.cyan(' natureco admin-rpc call health\n'));
|
|
108
110
|
process.exit(1);
|
|
109
111
|
}
|
|
@@ -116,7 +118,7 @@ async function callMethod(method, jsonParams) {
|
|
|
116
118
|
let params = {};
|
|
117
119
|
if (jsonParams) {
|
|
118
120
|
try { params = JSON.parse(jsonParams); }
|
|
119
|
-
catch { console.log(chalk.red('\n ❌ Geçersiz JSON\n')); process.exit(1); }
|
|
121
|
+
catch { console.log(chalk.red(L('\n ❌ Geçersiz JSON\n', '\n ❌ Invalid JSON\n'))); process.exit(1); }
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
console.log(chalk.cyan(`\n 📡 Calling: ${method}\n`));
|
|
@@ -172,14 +174,14 @@ async function callMethod(method, jsonParams) {
|
|
|
172
174
|
const output = execSync(`tail -${lines} "${logPath}"`, { encoding: 'utf8', maxBuffer: 1024 * 1024 });
|
|
173
175
|
console.log(output);
|
|
174
176
|
} catch {
|
|
175
|
-
console.log(chalk.yellow(' ⚠️ Log bulunamadı\n'));
|
|
177
|
+
console.log(chalk.yellow(L(' ⚠️ Log bulunamadı\n', ' ⚠️ Log not found\n')));
|
|
176
178
|
}
|
|
177
179
|
return;
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
if (method === 'config.set') {
|
|
181
183
|
const { setConfigValue } = require('../utils/config');
|
|
182
|
-
if (!params.key) { console.log(chalk.red('\n ❌ params.key gerekli\n')); process.exit(1); }
|
|
184
|
+
if (!params.key) { console.log(chalk.red(L('\n ❌ params.key gerekli\n', '\n ❌ params.key required\n'))); process.exit(1); }
|
|
183
185
|
setConfigValue(params.key, params.value);
|
|
184
186
|
console.log(chalk.green(`\n ✅ config.${params.key} = ${JSON.stringify(params.value)}\n`));
|
|
185
187
|
return;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const tui = require('../utils/tui');
|
|
3
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
4
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
3
5
|
const F = require('../utils/format');
|
|
4
6
|
const fs = require('fs');
|
|
5
7
|
const path = require('path');
|
|
@@ -51,7 +53,7 @@ function approvals(args) {
|
|
|
51
53
|
if (action === 'allowlist') return listAllowlist();
|
|
52
54
|
|
|
53
55
|
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
54
|
-
console.log(chalk.gray(' Kullanım: natureco approvals [list|pending|approve|reject|set-policy|set|add|get|allowlist]\n'));
|
|
56
|
+
console.log(chalk.gray(L(' Kullanım: natureco approvals [list|pending|approve|reject|set-policy|set|add|get|allowlist]\n', ' Usage: natureco approvals [list|pending|approve|reject|set-policy|set|add|get|allowlist]\n')));
|
|
55
57
|
process.exit(1);
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -80,12 +82,12 @@ function listApprovals() {
|
|
|
80
82
|
{ key: 'source', label: 'Kaynak', minWidth: 12, render: r => tui.C.text(r.source) },
|
|
81
83
|
{ key: 'text', label: 'Komut', minWidth: 25, render: r => tui.C.muted(r.text) },
|
|
82
84
|
{
|
|
83
|
-
key: 'status', label: 'Durum', minWidth: 12,
|
|
85
|
+
key: 'status', label: L('Durum', 'Status'), minWidth: 12,
|
|
84
86
|
render: r => r.status === 'pending'
|
|
85
87
|
? tui.styled(' ⏳ Bekliyor ', { bg: tui.PALETTE.warning, color: '#000', bold: true })
|
|
86
88
|
: r.status === 'approved'
|
|
87
|
-
? tui.styled(' ✓ Onaylı ', { bg: tui.PALETTE.success, color: '#000', bold: true })
|
|
88
|
-
: tui.styled(' ✗ Reddedildi ', { bg: tui.PALETTE.danger, color: '#000', bold: true })
|
|
89
|
+
? tui.styled(L(' ✓ Onaylı ', ' ✓ Approved '), { bg: tui.PALETTE.success, color: '#000', bold: true })
|
|
90
|
+
: tui.styled(L(' ✗ Reddedildi ', ' ✗ Rejected '), { bg: tui.PALETTE.danger, color: '#000', bold: true })
|
|
89
91
|
},
|
|
90
92
|
], { borderStyle: 'round', zebra: true }));
|
|
91
93
|
console.log('');
|
|
@@ -101,7 +103,7 @@ function listPending() {
|
|
|
101
103
|
const rows = queue.map(r => ({
|
|
102
104
|
id: r.id, source: r.source || 'cli', text: r.text, status: r.status,
|
|
103
105
|
}));
|
|
104
|
-
console.log('\n' + tui.styled(' ⏳ Bekleyen Onaylar (' + rows.length + ')', { color: tui.PALETTE.warning, bold: true }));
|
|
106
|
+
console.log('\n' + tui.styled(L(' ⏳ Bekleyen Onaylar (', ' ⏳ Pending Approvals (') + rows.length + ')', { color: tui.PALETTE.warning, bold: true }));
|
|
105
107
|
console.log('\n' + tui.table(rows, [
|
|
106
108
|
{ key: 'id', label: 'ID', minWidth: 14, render: r => tui.C.muted(r.id) },
|
|
107
109
|
{ key: 'source', label: 'Kaynak', minWidth: 12, render: r => tui.C.text(r.source) },
|
|
@@ -112,16 +114,16 @@ function listPending() {
|
|
|
112
114
|
|
|
113
115
|
function addReq(text) {
|
|
114
116
|
if (!text) {
|
|
115
|
-
console.log(chalk.red('\n ❌ Request text gerekli\n'));
|
|
117
|
+
console.log(chalk.red(L('\n ❌ Request text gerekli\n', '\n ❌ Request text required\n')));
|
|
116
118
|
process.exit(1);
|
|
117
119
|
}
|
|
118
120
|
const queue = loadQueue();
|
|
119
121
|
const r = { id: genId(), text, status: 'pending', source: 'cli', createdAt: new Date().toISOString(), resolvedAt: null };
|
|
120
122
|
queue.push(r);
|
|
121
123
|
saveQueue(queue);
|
|
122
|
-
console.log(chalk.yellow(`\n ⏳ Onay beklemede: ${r.id}\n`));
|
|
124
|
+
console.log(chalk.yellow(`\n ⏳ ${L('Onay beklemede', 'Awaiting approval')}: ${r.id}\n`));
|
|
123
125
|
console.log(` ${chalk.white(text)}`);
|
|
124
|
-
console.log(chalk.gray(` Onaylamak için: natureco approvals approve ${r.id}`));
|
|
126
|
+
console.log(chalk.gray(` ${L('Onaylamak için', 'To approve')}: natureco approvals approve ${r.id}`));
|
|
125
127
|
console.log();
|
|
126
128
|
}
|
|
127
129
|
|
|
@@ -129,8 +131,8 @@ function approveReq(id) {
|
|
|
129
131
|
const queue = loadQueue();
|
|
130
132
|
if (id) {
|
|
131
133
|
const r = queue.find(x => x.id === id);
|
|
132
|
-
if (!r) { console.log(chalk.red(`\n ❌ Request
|
|
133
|
-
if (r.status !== 'pending') { console.log(chalk.yellow(`\n ⚠️ "${id}" zaten ${r.status}\n`)); return; }
|
|
134
|
+
if (!r) { console.log(chalk.red(`\n ❌ ${L('Request bulunamadı', 'Request not found')}: ${id}\n`)); process.exit(1); }
|
|
135
|
+
if (r.status !== 'pending') { console.log(chalk.yellow(`\n ⚠️ "${id}" ${L('zaten', 'already')} ${r.status}\n`)); return; }
|
|
134
136
|
r.status = 'approved';
|
|
135
137
|
r.resolvedAt = new Date().toISOString();
|
|
136
138
|
saveQueue(queue);
|
|
@@ -138,7 +140,7 @@ function approveReq(id) {
|
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
const pending = queue.filter(r => r.status === 'pending');
|
|
141
|
-
if (pending.length === 0) { console.log(chalk.gray('\n Bekleyen onay yok\n')); return; }
|
|
143
|
+
if (pending.length === 0) { console.log(chalk.gray(L('\n Bekleyen onay yok\n', '\n No pending approvals\n'))); return; }
|
|
142
144
|
for (const r of pending) { r.status = 'approved'; r.resolvedAt = new Date().toISOString(); }
|
|
143
145
|
saveQueue(queue);
|
|
144
146
|
F.success(`${pending.length} requests approved`);
|
|
@@ -148,8 +150,8 @@ function rejectReq(id) {
|
|
|
148
150
|
const queue = loadQueue();
|
|
149
151
|
if (id) {
|
|
150
152
|
const r = queue.find(x => x.id === id);
|
|
151
|
-
if (!r) { console.log(chalk.red(`\n ❌ Request
|
|
152
|
-
if (r.status !== 'pending') { console.log(chalk.yellow(`\n ⚠️ "${id}" zaten ${r.status}\n`)); return; }
|
|
153
|
+
if (!r) { console.log(chalk.red(`\n ❌ ${L('Request bulunamadı', 'Request not found')}: ${id}\n`)); process.exit(1); }
|
|
154
|
+
if (r.status !== 'pending') { console.log(chalk.yellow(`\n ⚠️ "${id}" ${L('zaten', 'already')} ${r.status}\n`)); return; }
|
|
153
155
|
r.status = 'rejected';
|
|
154
156
|
r.resolvedAt = new Date().toISOString();
|
|
155
157
|
saveQueue(queue);
|
|
@@ -157,7 +159,7 @@ function rejectReq(id) {
|
|
|
157
159
|
return;
|
|
158
160
|
}
|
|
159
161
|
const pending = queue.filter(r => r.status === 'pending');
|
|
160
|
-
if (pending.length === 0) { console.log(chalk.gray('\n Bekleyen onay yok\n')); return; }
|
|
162
|
+
if (pending.length === 0) { console.log(chalk.gray(L('\n Bekleyen onay yok\n', '\n No pending approvals\n'))); return; }
|
|
161
163
|
for (const r of pending) { r.status = 'rejected'; r.resolvedAt = new Date().toISOString(); }
|
|
162
164
|
saveQueue(queue);
|
|
163
165
|
F.error(`${pending.length} requests rejected`);
|
|
@@ -176,13 +178,13 @@ function setPolicy(policy) {
|
|
|
176
178
|
|
|
177
179
|
function getReq(id) {
|
|
178
180
|
if (!id) {
|
|
179
|
-
console.log(chalk.red('\n ❌ Request ID gerekli\n'));
|
|
181
|
+
console.log(chalk.red(L('\n ❌ Request ID gerekli\n', '\n ❌ Request ID required\n')));
|
|
180
182
|
process.exit(1);
|
|
181
183
|
}
|
|
182
184
|
const queue = loadQueue();
|
|
183
185
|
const r = queue.find(x => x.id === id);
|
|
184
186
|
if (!r) {
|
|
185
|
-
console.log(chalk.red(`\n ❌ Request
|
|
187
|
+
console.log(chalk.red(`\n ❌ ${L('Request bulunamadı', 'Request not found')}: ${id}\n`));
|
|
186
188
|
process.exit(1);
|
|
187
189
|
}
|
|
188
190
|
F.kv('ID', r.id);
|
|
@@ -204,7 +206,7 @@ function listAllowlist() {
|
|
|
204
206
|
|
|
205
207
|
function allowlistAdd(pattern) {
|
|
206
208
|
if (!pattern) {
|
|
207
|
-
console.log(chalk.red('\n ❌ Pattern gerekli\n'));
|
|
209
|
+
console.log(chalk.red(L('\n ❌ Pattern gerekli\n', '\n ❌ Pattern required\n')));
|
|
208
210
|
process.exit(1);
|
|
209
211
|
}
|
|
210
212
|
const patterns = loadAllowlist();
|
|
@@ -219,7 +221,7 @@ function allowlistAdd(pattern) {
|
|
|
219
221
|
|
|
220
222
|
function allowlistRemove(pattern) {
|
|
221
223
|
if (!pattern) {
|
|
222
|
-
console.log(chalk.red('\n ❌ Pattern gerekli\n'));
|
|
224
|
+
console.log(chalk.red(L('\n ❌ Pattern gerekli\n', '\n ❌ Pattern required\n')));
|
|
223
225
|
process.exit(1);
|
|
224
226
|
}
|
|
225
227
|
let patterns = loadAllowlist();
|
package/src/commands/backup.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const fs = require('fs');
|
|
3
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
4
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
3
5
|
const path = require('path');
|
|
4
6
|
const os = require('os');
|
|
5
7
|
const { execSync } = require('child_process');
|
|
@@ -15,7 +17,7 @@ function backup(args) {
|
|
|
15
17
|
if (action === 'verify') return verifyBackup(params.join(' '));
|
|
16
18
|
|
|
17
19
|
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
18
|
-
console.log(chalk.gray(' Kullanım: natureco backup [create|list|restore|verify]\n'));
|
|
20
|
+
console.log(chalk.gray(L(' Kullanım: natureco backup [create|list|restore|verify]\n', ' Usage: natureco backup [create|list|restore|verify]\n')));
|
|
19
21
|
process.exit(1);
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -79,7 +81,7 @@ function listBackups() {
|
|
|
79
81
|
|
|
80
82
|
function restoreBackup(file) {
|
|
81
83
|
if (!file) {
|
|
82
|
-
console.log(chalk.red('\n ❌ Backup file gerekli\n'));
|
|
84
|
+
console.log(chalk.red(L('\n ❌ Backup file gerekli\n', '\n ❌ Backup file required\n')));
|
|
83
85
|
console.log(chalk.cyan(' natureco backup list'));
|
|
84
86
|
console.log(chalk.cyan(' natureco backup restore <filename>\n'));
|
|
85
87
|
process.exit(1);
|
|
@@ -89,7 +91,7 @@ function restoreBackup(file) {
|
|
|
89
91
|
const backupFile = path.join(backupDir, file);
|
|
90
92
|
|
|
91
93
|
if (!fs.existsSync(backupFile)) {
|
|
92
|
-
console.log(chalk.red(`\n ❌ Backup
|
|
94
|
+
console.log(chalk.red(`\n ❌ ${L('Backup bulunamadı', 'Backup not found')}: ${backupFile}\n`));
|
|
93
95
|
process.exit(1);
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -105,7 +107,7 @@ function restoreBackup(file) {
|
|
|
105
107
|
|
|
106
108
|
function verifyBackup(file) {
|
|
107
109
|
if (!file) {
|
|
108
|
-
console.log(chalk.red('\n ❌ Backup file gerekli\n'));
|
|
110
|
+
console.log(chalk.red(L('\n ❌ Backup file gerekli\n', '\n ❌ Backup file required\n')));
|
|
109
111
|
process.exit(1);
|
|
110
112
|
}
|
|
111
113
|
|
|
@@ -113,7 +115,7 @@ function verifyBackup(file) {
|
|
|
113
115
|
const backupFile = path.join(backupDir, file);
|
|
114
116
|
|
|
115
117
|
if (!fs.existsSync(backupFile)) {
|
|
116
|
-
console.log(chalk.red(`\n ❌ Backup
|
|
118
|
+
console.log(chalk.red(`\n ❌ ${L('Backup bulunamadı', 'Backup not found')}: ${backupFile}\n`));
|
|
117
119
|
process.exit(1);
|
|
118
120
|
}
|
|
119
121
|
|
package/src/commands/bonjour.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const { getConfig, saveConfig } = require('../utils/config');
|
|
3
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
4
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
3
5
|
const dns = require('dns');
|
|
4
6
|
const os = require('os');
|
|
5
7
|
|
|
@@ -41,12 +43,12 @@ async function bonjour(args) {
|
|
|
41
43
|
if (action === 'status') return statusBonjour();
|
|
42
44
|
|
|
43
45
|
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
44
|
-
console.log(chalk.gray(' Kullanım: natureco bonjour [scan|discover|status]\n'));
|
|
46
|
+
console.log(chalk.gray(L(' Kullanım: natureco bonjour [scan|discover|status]\n', ' Usage: natureco bonjour [scan|discover|status]\n')));
|
|
45
47
|
process.exit(1);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
async function scanNetwork() {
|
|
49
|
-
console.log(chalk.cyan('\n Ağ taranıyor...\n'));
|
|
51
|
+
console.log(chalk.cyan(L('\n Ağ taranıyor...\n', '\n Scanning network...\n')));
|
|
50
52
|
|
|
51
53
|
const interfaces = os.networkInterfaces();
|
|
52
54
|
const found = [];
|
|
@@ -66,14 +68,14 @@ async function scanNetwork() {
|
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
if (found.length === 0) {
|
|
69
|
-
console.log(chalk.gray(' Ağ arayüzü bulunamadı.\n'));
|
|
71
|
+
console.log(chalk.gray(L(' Ağ arayüzü bulunamadı.\n', ' No network interfaces found.\n')));
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
const gateway = await discoverGateway();
|
|
74
76
|
|
|
75
77
|
console.log(chalk.gray(' ' + '─'.repeat(48)));
|
|
76
|
-
console.log(chalk.cyan.bold('\n Ağ Arayüzleri\n'));
|
|
78
|
+
console.log(chalk.cyan.bold(L('\n Ağ Arayüzleri\n', '\n Network Interfaces\n')));
|
|
77
79
|
|
|
78
80
|
found.forEach(f => {
|
|
79
81
|
console.log(chalk.white(` ${f.interface}`));
|
|
@@ -82,14 +84,14 @@ async function scanNetwork() {
|
|
|
82
84
|
});
|
|
83
85
|
|
|
84
86
|
if (gateway) {
|
|
85
|
-
console.log(chalk.gray('\n Varsayılan ağ geçidi: ') + chalk.cyan(gateway));
|
|
87
|
+
console.log(chalk.gray(L('\n Varsayılan ağ geçidi: ', '\n Default gateway: ')) + chalk.cyan(gateway));
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
console.log(chalk.gray('\n Service discovery için: ') + chalk.cyan('natureco bonjour discover\n'));
|
|
90
|
+
console.log(chalk.gray(L('\n Service discovery için: ', '\n For service discovery: ')) + chalk.cyan('natureco bonjour discover\n'));
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
async function discoverServices() {
|
|
92
|
-
console.log(chalk.cyan('\n Servis keşfi başlatılıyor...\n'));
|
|
94
|
+
console.log(chalk.cyan(L('\n Servis keşfi başlatılıyor...\n', '\n Starting service discovery...\n')));
|
|
93
95
|
|
|
94
96
|
// Try common ports
|
|
95
97
|
const commonServices = [
|
|
@@ -138,30 +140,30 @@ async function discoverServices() {
|
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
if (results.length === 0) {
|
|
141
|
-
console.log(chalk.gray(' Servis bulunamadı.\n'));
|
|
143
|
+
console.log(chalk.gray(L(' Servis bulunamadı.\n', ' No services found.\n')));
|
|
142
144
|
return;
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
console.log(chalk.gray(' ' + '─'.repeat(48)));
|
|
146
|
-
console.log(chalk.cyan.bold('\n Bulunan Servisler\n'));
|
|
148
|
+
console.log(chalk.cyan.bold(L('\n Bulunan Servisler\n', '\n Discovered Services\n')));
|
|
147
149
|
|
|
148
150
|
results.forEach(r => {
|
|
149
151
|
console.log(` ${chalk.green('●')} ${chalk.white(r.service)} ${chalk.gray(`→ ${r.host}:${r.port}`)}`);
|
|
150
152
|
});
|
|
151
153
|
|
|
152
|
-
console.log(chalk.gray('\n Özel port eklemek: ') + chalk.cyan('natureco config set discoveryPorts [3000,4000]\n'));
|
|
154
|
+
console.log(chalk.gray(L('\n Özel port eklemek: ', '\n Add custom port: ')) + chalk.cyan('natureco config set discoveryPorts [3000,4000]\n'));
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
function statusBonjour() {
|
|
156
|
-
console.log(chalk.gray('\n Bonjour/mDNS Servis Keşfi\n'));
|
|
158
|
+
console.log(chalk.gray(L('\n Bonjour/mDNS Servis Keşfi\n', '\n Bonjour/mDNS Service Discovery\n')));
|
|
157
159
|
console.log(chalk.gray(' ' + '─'.repeat(48)));
|
|
158
|
-
console.log(chalk.gray(' Ağ keşif aracı — NatureCo servislerini ve gateway\'i bulur.'));
|
|
159
|
-
console.log(chalk.gray(' Komutlar:'));
|
|
160
|
-
console.log(chalk.cyan(' scan ') + chalk.gray('Ağ arayüzlerini ve IP\'leri listele'));
|
|
161
|
-
console.log(chalk.cyan(' discover ') + chalk.gray('Yerel ağda NatureCo servislerini ara'));
|
|
162
|
-
console.log(chalk.gray('\n Port yapılandırması:'));
|
|
163
|
-
console.log(chalk.gray(' Varsayılan: 3848 (Gateway), 3849 (Dashboard)'));
|
|
164
|
-
console.log(chalk.gray(' Özel: ') + chalk.cyan('natureco config set discoveryPorts [3000,4000]\n'));
|
|
160
|
+
console.log(chalk.gray(L(' Ağ keşif aracı — NatureCo servislerini ve gateway\'i bulur.', ' Network discovery tool — finds NatureCo services and the gateway.')));
|
|
161
|
+
console.log(chalk.gray(L(' Komutlar:', ' Commands:')));
|
|
162
|
+
console.log(chalk.cyan(' scan ') + chalk.gray(L('Ağ arayüzlerini ve IP\'leri listele', 'List network interfaces and IPs')));
|
|
163
|
+
console.log(chalk.cyan(' discover ') + chalk.gray(L('Yerel ağda NatureCo servislerini ara', 'Search for NatureCo services on the local network')));
|
|
164
|
+
console.log(chalk.gray(L('\n Port yapılandırması:', '\n Port configuration:')));
|
|
165
|
+
console.log(chalk.gray(L(' Varsayılan: 3848 (Gateway), 3849 (Dashboard)', ' Default: 3848 (Gateway), 3849 (Dashboard)')));
|
|
166
|
+
console.log(chalk.gray(L(' Özel: ', ' Custom: ')) + chalk.cyan('natureco config set discoveryPorts [3000,4000]\n'));
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
module.exports = bonjour;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const { getConfig } = require('../utils/config');
|
|
3
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
4
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
3
5
|
|
|
4
6
|
const CAPABILITY_MODEL_PATTERNS = {
|
|
5
7
|
chat: { patterns: ['llama', 'gpt', 'claude', 'mixtral', 'gemma', 'deepseek', 'mistral', 'grok', 'command'] },
|
|
@@ -23,7 +25,7 @@ async function capability(args) {
|
|
|
23
25
|
if (action === 'infer' || action === 'check') return inferCapabilities(params[0]);
|
|
24
26
|
|
|
25
27
|
console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
|
|
26
|
-
console.log(chalk.gray(' Kullanım: natureco capability [list|infer]\n'));
|
|
28
|
+
console.log(chalk.gray(L(' Kullanım: natureco capability [list|infer]\n', ' Usage: natureco capability [list|infer]\n')));
|
|
27
29
|
process.exit(1);
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -104,7 +106,7 @@ async function listCapabilities() {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
console.log(chalk.gray('\n Capabilities are inferred from available models.\n'));
|
|
107
|
-
console.log(chalk.gray(' Detaylı sorgu: ') + chalk.cyan('natureco capability infer <provider>\n'));
|
|
109
|
+
console.log(chalk.gray(L(' Detaylı sorgu: ', ' Detailed query: ')) + chalk.cyan('natureco capability infer <provider>\n'));
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
function getKnownProviderModels(providerUrl) {
|
|
@@ -132,7 +134,7 @@ function getKnownProviderModels(providerUrl) {
|
|
|
132
134
|
|
|
133
135
|
async function inferCapabilities(provider) {
|
|
134
136
|
if (!provider) {
|
|
135
|
-
console.log(chalk.red('\n ❌ Provider adı gerekli\n'));
|
|
137
|
+
console.log(chalk.red(L('\n ❌ Provider adı gerekli\n', '\n ❌ Provider name required\n')));
|
|
136
138
|
process.exit(1);
|
|
137
139
|
}
|
|
138
140
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const inquirer = require('../utils/inquirer-wrapper');
|
|
7
|
+
const { getLang: _gl } = require('../utils/i18n');
|
|
8
|
+
const L = (tr, en) => (_gl() === 'en' ? en : tr);
|
|
7
9
|
const chalk = require('chalk');
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -23,26 +25,26 @@ async function checkExistingToken(config, channelKey, channelName) {
|
|
|
23
25
|
? token.slice(0, 15) + '...' + token.slice(-5)
|
|
24
26
|
: token.slice(0, 3) + '***';
|
|
25
27
|
|
|
26
|
-
console.log(chalk.green('\n✓ ' + channelName + ' token zaten kayıtlı: ' + masked));
|
|
28
|
+
console.log(chalk.green('\n✓ ' + channelName + L(' token zaten kayıtlı: ', ' token already saved: ') + masked));
|
|
27
29
|
|
|
28
30
|
if (config[channelKey + 'BotId']) {
|
|
29
31
|
console.log(chalk.gray(' Bot ID: ' + config[channelKey + 'BotId']));
|
|
30
32
|
}
|
|
31
33
|
if (config[channelKey.replace('Token', 'AllowedChats')]) {
|
|
32
|
-
console.log(chalk.gray(' İzinli sohbet: ' + config[channelKey.replace('Token', 'AllowedChats')].join(', ')));
|
|
34
|
+
console.log(chalk.gray(L(' İzinli sohbet: ', ' Allowed chat: ') + config[channelKey.replace('Token', 'AllowedChats')].join(', ')));
|
|
33
35
|
}
|
|
34
36
|
console.log('');
|
|
35
37
|
|
|
36
38
|
const ans = await inquirer.prompt([{
|
|
37
39
|
type: 'confirm',
|
|
38
40
|
name: 'change',
|
|
39
|
-
message: 'Token değiştirmek istiyor musun?',
|
|
41
|
+
message: L('Token değiştirmek istiyor musun?', 'Change token?'),
|
|
40
42
|
default: false,
|
|
41
43
|
}]);
|
|
42
44
|
|
|
43
45
|
if (!ans.change) {
|
|
44
|
-
console.log(chalk.green('\n✅ Mevcut token kullanılacak.\n'));
|
|
45
|
-
console.log(chalk.gray('Gateway başlatmak için: natureco gateway start\n'));
|
|
46
|
+
console.log(chalk.green(L('\n✅ Mevcut token kullanılacak.\n', '\n✅ Existing token will be used.\n')));
|
|
47
|
+
console.log(chalk.gray(L('Gateway başlatmak için: natureco gateway start\n', 'To start the gateway: natureco gateway start\n')));
|
|
46
48
|
return false; // Mevcut kullanilacak
|
|
47
49
|
}
|
|
48
50
|
return true; // Yeni alinacak
|
package/src/commands/chat.js
CHANGED
|
@@ -87,8 +87,8 @@ async function chat(botName, options = {}) {
|
|
|
87
87
|
console.log('');
|
|
88
88
|
console.log(tui.styled(' 🌿 NatureCo Chat v4.6+', { color: tui.PALETTE.primary, bold: true }));
|
|
89
89
|
console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
|
|
90
|
-
console.log(tui.C.muted(' Chat komutu artık ') + tui.C.brand('repl') + tui.C.muted(' komutunu çağırıyor (Phase 9 TUI engine)'));
|
|
91
|
-
console.log(tui.C.muted(' Tüm özellikler korundu: memory, sessions, hooks, custom commands'));
|
|
90
|
+
console.log(tui.C.muted(L(' Chat komutu artık ', ' The chat command now ')) + tui.C.brand('repl') + tui.C.muted(L(' komutunu çağırıyor (Phase 9 TUI engine)', ' command (Phase 9 TUI engine)')));
|
|
91
|
+
console.log(tui.C.muted(L(' Tüm özellikler korundu: memory, sessions, hooks, custom commands', ' All features preserved: memory, sessions, hooks, custom commands')));
|
|
92
92
|
console.log('');
|
|
93
93
|
return repl(replArgs);
|
|
94
94
|
}
|
|
@@ -97,11 +97,11 @@ async function chat(botName, options = {}) {
|
|
|
97
97
|
if (options.list) {
|
|
98
98
|
const sessions = listSessions('chat');
|
|
99
99
|
if (!sessions.length) {
|
|
100
|
-
console.log(chalk.gray('\nKayıtlı oturum yok.\n'));
|
|
100
|
+
console.log(chalk.gray(L('\nKayıtlı oturum yok.\n', '\nNo saved sessions.\n')));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
sessions.forEach(s => {
|
|
104
|
-
console.log(` [${s.id}] ${s.savedAt.slice(0, 10)} — ${s.preview || '(boş)'} (${s.messageCount} mesaj)`);
|
|
104
|
+
console.log(` [${s.id}] ${s.savedAt.slice(0, 10)} — ${s.preview || L('(boş)', '(empty)')} (${s.messageCount} ${L('mesaj', 'messages')})`);
|
|
105
105
|
});
|
|
106
106
|
console.log();
|
|
107
107
|
return;
|
|
@@ -130,7 +130,7 @@ async function chat(botName, options = {}) {
|
|
|
130
130
|
const { selectedBot } = await inquirer.prompt([{
|
|
131
131
|
type: 'list',
|
|
132
132
|
name: 'selectedBot',
|
|
133
|
-
message: 'Bot seçin:',
|
|
133
|
+
message: L('Bot seçin:', 'Select bot:'),
|
|
134
134
|
choices: botList.bots.map(b => ({ name: b.name, value: b.id })),
|
|
135
135
|
}]);
|
|
136
136
|
bot = botList.bots.find(b => b.id === selectedBot);
|
|
@@ -174,7 +174,7 @@ async function chat(botName, options = {}) {
|
|
|
174
174
|
} else if (options.continue) {
|
|
175
175
|
const last = loadLastSession('chat');
|
|
176
176
|
if (last) {
|
|
177
|
-
console.log(chalk.cyan(` ↻ Son oturum yüklendi (${last.messages.length} mesaj)\n`));
|
|
177
|
+
console.log(chalk.cyan(` ↻ ${L('Son oturum yüklendi', 'Last session loaded')} (${last.messages.length} ${L('mesaj', 'messages')})\n`));
|
|
178
178
|
}
|
|
179
179
|
session = createSession(bot.id, bot.name);
|
|
180
180
|
} else {
|
|
@@ -195,7 +195,7 @@ async function chat(botName, options = {}) {
|
|
|
195
195
|
console.clear();
|
|
196
196
|
console.log(centerText(ASCII_LOGO.map((line, i) => i < 5 ? chalk.green(line) : chalk.gray(line)).join('\n')));
|
|
197
197
|
console.log();
|
|
198
|
-
console.log(centerText(chalk.cyan(`(\\_/) Hoş geldin, ${userName} · ${displayBotName} hazır · v${version}`)));
|
|
198
|
+
console.log(centerText(chalk.cyan(`(\\_/) ${L('Hoş geldin', 'Welcome')}, ${userName} · ${displayBotName} ${L('hazır', 'ready')} · v${version}`)));
|
|
199
199
|
console.log(chalk.gray('─'.repeat(process.stdout.columns || 120)));
|
|
200
200
|
console.log();
|
|
201
201
|
|
|
@@ -224,7 +224,7 @@ async function chat(botName, options = {}) {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
console.log(centerText(chalk.gray(`${shortModel} · /help için yardım · Ctrl+C
|
|
227
|
+
console.log(centerText(chalk.gray(`${shortModel} · /help ${L('için yardım', 'for help')} · Ctrl+C ${L('çıkış', 'exit')}`)));
|
|
228
228
|
console.log(chalk.gray('─'.repeat(process.stdout.columns || 120)));
|
|
229
229
|
console.log();
|
|
230
230
|
|
|
@@ -273,7 +273,7 @@ async function chat(botName, options = {}) {
|
|
|
273
273
|
bot = newBot;
|
|
274
274
|
conversationId = null;
|
|
275
275
|
session = createSession(bot.id, bot.name);
|
|
276
|
-
console.log(chalk.green(
|
|
276
|
+
console.log(chalk.green(`${L('Bot değişti', 'Bot changed')}: ${newBot.name}`));
|
|
277
277
|
} else {
|
|
278
278
|
console.log(chalk.red(`${L('Bot bulunamadı', 'Bot not found')}: ${newName}`));
|
|
279
279
|
}
|
|
@@ -282,18 +282,18 @@ async function chat(botName, options = {}) {
|
|
|
282
282
|
return;
|
|
283
283
|
case 'skills':
|
|
284
284
|
const skills = getSkills();
|
|
285
|
-
if (!skills.length) console.log(chalk.gray('Yüklü skill yok.'));
|
|
285
|
+
if (!skills.length) console.log(chalk.gray(L('Yüklü skill yok.', 'No skills installed.')));
|
|
286
286
|
else skills.forEach(s => console.log(chalk.cyan(`· ${s.name}`) + chalk.gray(` ${s.description}`)));
|
|
287
287
|
console.log();
|
|
288
288
|
return;
|
|
289
289
|
case 'memory':
|
|
290
290
|
if (args[0] === 'clear') {
|
|
291
291
|
clearMemory(bot.id);
|
|
292
|
-
console.log(chalk.green('✓ Hafıza temizlendi'));
|
|
292
|
+
console.log(chalk.green(L('✓ Hafıza temizlendi', '✓ Memory cleared')));
|
|
293
293
|
} else {
|
|
294
294
|
const m = loadMemory(bot.id);
|
|
295
295
|
if (m.botName) console.log(chalk.cyan('Bot: ') + m.botName);
|
|
296
|
-
if (m.name) console.log(chalk.cyan('İsim: ') + m.name);
|
|
296
|
+
if (m.name) console.log(chalk.cyan(L('İsim: ', 'Name: ')) + m.name);
|
|
297
297
|
(m.facts || []).slice(0, 8).forEach(f => {
|
|
298
298
|
const v = typeof f === 'string' ? f : f.value;
|
|
299
299
|
console.log(chalk.gray(`· ${v}`));
|
|
@@ -317,7 +317,7 @@ async function chat(botName, options = {}) {
|
|
|
317
317
|
return;
|
|
318
318
|
case 'commands':
|
|
319
319
|
const cmds = getCommands();
|
|
320
|
-
if (!cmds.length) console.log(chalk.gray('Özel komut yok.'));
|
|
320
|
+
if (!cmds.length) console.log(chalk.gray(L('Özel komut yok.', 'No custom commands.')));
|
|
321
321
|
else cmds.forEach(c => console.log(chalk.cyan(`/${c.name}`)));
|
|
322
322
|
console.log();
|
|
323
323
|
return;
|
|
@@ -406,10 +406,10 @@ async function chat(botName, options = {}) {
|
|
|
406
406
|
saveSession('chat', historyMessages, { botId: bot.id, botName: bot.name });
|
|
407
407
|
}
|
|
408
408
|
if (filesChanged > 0 || commandsRun > 0 || messagesCount > 0) {
|
|
409
|
-
console.log(chalk.gray('\n─── Session Özeti ───'));
|
|
410
|
-
if (filesChanged > 0) console.log(chalk.green(` ✓ ${filesChanged} dosya değiştirildi`));
|
|
411
|
-
if (commandsRun > 0) console.log(chalk.green(` ✓ ${commandsRun} komut
|
|
412
|
-
console.log(chalk.cyan(` ✓ ${messagesCount} mesaj gönderildi`));
|
|
409
|
+
console.log(chalk.gray(L('\n─── Session Özeti ───', '\n─── Session Summary ───')));
|
|
410
|
+
if (filesChanged > 0) console.log(chalk.green(` ✓ ${filesChanged} ${L('dosya değiştirildi', 'files changed')}`));
|
|
411
|
+
if (commandsRun > 0) console.log(chalk.green(` ✓ ${commandsRun} ${L('komut çalıştırıldı', 'commands run')}`));
|
|
412
|
+
console.log(chalk.cyan(` ✓ ${messagesCount} ${L('mesaj gönderildi', 'messages sent')}`));
|
|
413
413
|
console.log();
|
|
414
414
|
}
|
|
415
415
|
console.log(chalk.gray('👋 Goodbye!\n'));
|