natureco-cli 2.7.0 → 2.7.1
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.7.
|
|
214
|
+
<div class="version-badge" id="version-badge">v2.7.1</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.7.
|
|
344
|
+
version: 'v2.7.1',
|
|
345
345
|
bots: cfg.bots || [],
|
|
346
346
|
telegramToken: cfg.telegramToken || null,
|
|
347
347
|
whatsappConnected: cfg.whatsappConnected || false,
|
|
@@ -128,7 +128,7 @@ async function startGateway() {
|
|
|
128
128
|
|
|
129
129
|
async function runGatewayWorker() {
|
|
130
130
|
// This runs in the background
|
|
131
|
-
log('gateway', 'Starting NatureCo Gateway v2.7.
|
|
131
|
+
log('gateway', 'Starting NatureCo Gateway v2.7.1...', 'green');
|
|
132
132
|
|
|
133
133
|
// Load config
|
|
134
134
|
const { getConfig } = require('../utils/config');
|
package/src/utils/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// NatureCo CLI v2.7.
|
|
1
|
+
// NatureCo CLI v2.7.1 - Universal LLM Provider Support
|
|
2
2
|
// Supports: OpenAI, Groq, Together, Fireworks, Perplexity, Mistral, DeepSeek, OpenRouter, Ollama, LM Studio, Anthropic
|
|
3
3
|
|
|
4
4
|
const fs = require('fs');
|
|
@@ -293,12 +293,20 @@ async function sendMessageToProvider(apiKey, message, conversationId = null, sys
|
|
|
293
293
|
|
|
294
294
|
// Add tool results to messages (base64 encoded for safety)
|
|
295
295
|
for (const result of toolResults) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
// Extract the actual content from tool result
|
|
297
|
+
let contentToEncode;
|
|
298
|
+
|
|
299
|
+
if (result.result.success) {
|
|
300
|
+
// Try different field names: output, data, or entire result
|
|
301
|
+
contentToEncode = {
|
|
302
|
+
result: result.result.output || result.result.data || result.result
|
|
303
|
+
};
|
|
304
|
+
} else {
|
|
305
|
+
contentToEncode = { error: result.result.error };
|
|
306
|
+
}
|
|
299
307
|
|
|
300
308
|
// Base64 encode the entire result to prevent injection attacks
|
|
301
|
-
const encoded = Buffer.from(JSON.stringify(
|
|
309
|
+
const encoded = Buffer.from(JSON.stringify(contentToEncode)).toString('base64');
|
|
302
310
|
|
|
303
311
|
messages.push({
|
|
304
312
|
role: 'tool',
|