natureco-cli 5.9.6 → 5.9.7
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/repl.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.7",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
package/src/commands/repl.js
CHANGED
|
@@ -527,10 +527,21 @@ async function processToolCalls(toolCalls, onToolCall) {
|
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
// Notify UI done + build messages
|
|
530
|
+
// v5.9.7: Skip internal meta-tools (_loop_warning, _no_progress) from tool messages
|
|
531
|
+
// Inject loop warning as user message instead (Gemini requires real tool names)
|
|
532
|
+
// Gemini also requires 'name' field in tool response messages
|
|
530
533
|
const messages = [];
|
|
531
534
|
for (const { name, id, result } of results) {
|
|
532
535
|
if (onToolCall) onToolCall({ name, args: null, status: 'done', result });
|
|
533
536
|
|
|
537
|
+
if (name === '_loop_warning' || name === '_no_progress') {
|
|
538
|
+
if (name === '_loop_warning') {
|
|
539
|
+
const warnContent = typeof result?.result === 'string' ? result.result : '';
|
|
540
|
+
if (warnContent) messages.push({ role: 'user', content: '[System: ' + warnContent + ']' });
|
|
541
|
+
}
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
|
|
534
545
|
let content;
|
|
535
546
|
if (result.error) {
|
|
536
547
|
content = JSON.stringify({ error: result.error });
|
|
@@ -544,7 +555,7 @@ async function processToolCalls(toolCalls, onToolCall) {
|
|
|
544
555
|
}
|
|
545
556
|
}
|
|
546
557
|
|
|
547
|
-
messages.push({ role: 'tool', tool_call_id: id, content });
|
|
558
|
+
messages.push({ role: 'tool', tool_call_id: id, name, content });
|
|
548
559
|
}
|
|
549
560
|
|
|
550
561
|
return messages;
|