natureco-cli 2.10.2 → 2.10.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.10.2",
3
+ "version": "2.10.3",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -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.10.2</div>
214
+ <div class="version-badge" id="version-badge">v2.10.3</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.10.2',
344
+ version: 'v2.10.3',
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.10.2...', 'green');
141
+ log('gateway', 'Starting NatureCo Gateway v2.10.3...', 'green');
142
142
 
143
143
  // Load config
144
144
  const { getConfig } = require('../utils/config');
package/src/utils/api.js CHANGED
@@ -549,7 +549,7 @@ async function sendMessage(apiKey, botId, message, conversationId = null, skillP
549
549
  const homeDir = os.homedir();
550
550
 
551
551
  // System prompt for terminal assistant with dynamic home directory
552
- const systemPrompt = `You are a terminal assistant. When users ask for file listing, command execution, or directory viewing, you MUST use the available tools (bash, read_file, write_file, list_dir, web_search, http_request). Never say 'run this command' - execute it yourself using tools and show the result.
552
+ let systemPrompt = `You are a terminal assistant. When users ask for file listing, command execution, or directory viewing, you MUST use the available tools (bash, read_file, write_file, list_dir, web_search, http_request). Never say 'run this command' - execute it yourself using tools and show the result.
553
553
 
554
554
  IMPORTANT: The user's home directory is: ${homeDir}
555
555
  When listing home directory, always use list_dir with path: "${homeDir}"
@@ -571,6 +571,23 @@ TOOL SELECTION GUIDE:
571
571
  - bash: Use for all system commands, process info, disk usage, etc.
572
572
  - web_search: Use when users ask about current information, news, weather, or anything requiring internet search
573
573
  - http_request: Use for API calls, webhooks, fetching URLs, testing endpoints`;
574
+
575
+ // Add MCP tool guidance if MCP servers are loaded
576
+ const mcpTools = getMcpTools();
577
+ if (mcpTools.length > 0) {
578
+ const mcpServerNames = Object.keys(mcpClients);
579
+
580
+ systemPrompt += `\n\nAVAILABLE MCP SERVERS AND TOOLS:`;
581
+
582
+ for (const serverName of mcpServerNames) {
583
+ const serverTools = mcpClients[serverName].tools;
584
+ const toolNames = serverTools.map(t => t.name).join(', ');
585
+ systemPrompt += `\n- ${serverName} server: ${toolNames}`;
586
+ }
587
+
588
+ systemPrompt += `\n\nWhen MCP servers are loaded, ALWAYS prefer MCP tools over local tools for file operations.`;
589
+ systemPrompt += `\nFor example: use read_file from filesystem MCP (NOT local read_file), use list_directory from filesystem MCP (NOT local list_dir).`;
590
+ }
574
591
 
575
592
  return sendMessageToProvider(apiKey, message, conversationId, systemPrompt);
576
593
  }