natureco-cli 2.10.9 → 2.11.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
|
@@ -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.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.11.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.
|
|
344
|
+
version: 'v2.11.0',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
|
@@ -138,7 +138,7 @@ async function startGateway() {
|
|
|
138
138
|
|
|
139
139
|
async function runGatewayWorker() {
|
|
140
140
|
// This runs in the background
|
|
141
|
-
log('gateway', 'Starting NatureCo Gateway v2.
|
|
141
|
+
log('gateway', 'Starting NatureCo Gateway v2.11.0...', 'green');
|
|
142
142
|
|
|
143
143
|
// Load config
|
|
144
144
|
const { getConfig } = require('../utils/config');
|
package/src/commands/mcp.js
CHANGED
|
@@ -97,6 +97,7 @@ function listTemplates() {
|
|
|
97
97
|
async function addMcpServerInteractive(params) {
|
|
98
98
|
const templates = getMcpTemplates();
|
|
99
99
|
const templateNames = Object.keys(templates);
|
|
100
|
+
const { getConfig, saveConfig } = require('../utils/config');
|
|
100
101
|
|
|
101
102
|
// Sunucu adı
|
|
102
103
|
let serverName;
|
|
@@ -150,19 +151,52 @@ async function addMcpServerInteractive(params) {
|
|
|
150
151
|
|
|
151
152
|
// Environment variables
|
|
152
153
|
const envVars = {};
|
|
154
|
+
const config = getConfig();
|
|
155
|
+
|
|
153
156
|
if (selectedTemplate.env && Object.keys(selectedTemplate.env).length > 0) {
|
|
154
157
|
console.log(chalk.yellow('\nEnvironment variable\'ları ayarlayın:\n'));
|
|
155
158
|
|
|
156
159
|
for (const [key, defaultValue] of Object.entries(selectedTemplate.env)) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
// Special handling for GitHub token
|
|
161
|
+
if (template === 'github' && key === 'GITHUB_TOKEN') {
|
|
162
|
+
const existingToken = config.githubToken;
|
|
163
|
+
|
|
164
|
+
const { value } = await inquirer.prompt([
|
|
165
|
+
{
|
|
166
|
+
type: 'password',
|
|
167
|
+
name: 'value',
|
|
168
|
+
message: `${key} (ghp_xxx):`,
|
|
169
|
+
default: existingToken || '',
|
|
170
|
+
validate: (input) => {
|
|
171
|
+
if (!input || input.trim().length === 0) {
|
|
172
|
+
return 'GitHub token gerekli';
|
|
173
|
+
}
|
|
174
|
+
if (!input.startsWith('ghp_') && !input.startsWith('github_pat_')) {
|
|
175
|
+
return 'Geçersiz GitHub token formatı';
|
|
176
|
+
}
|
|
177
|
+
return true;
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
]);
|
|
181
|
+
|
|
182
|
+
envVars[key] = value;
|
|
183
|
+
|
|
184
|
+
// Save to config for future use
|
|
185
|
+
config.githubToken = value;
|
|
186
|
+
saveConfig(config);
|
|
187
|
+
console.log(chalk.gray(' ✓ GitHub token config\'e kaydedildi\n'));
|
|
188
|
+
|
|
189
|
+
} else {
|
|
190
|
+
const { value } = await inquirer.prompt([
|
|
191
|
+
{
|
|
192
|
+
type: 'input',
|
|
193
|
+
name: 'value',
|
|
194
|
+
message: `${key}:`,
|
|
195
|
+
default: defaultValue,
|
|
196
|
+
},
|
|
197
|
+
]);
|
|
198
|
+
envVars[key] = value;
|
|
199
|
+
}
|
|
166
200
|
}
|
|
167
201
|
}
|
|
168
202
|
|