natureco-cli 5.20.1 → 5.20.2

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": "5.20.1",
3
+ "version": "5.20.2",
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"
@@ -98,10 +98,35 @@ async function workflow(params) {
98
98
 
99
99
  const skillsIndexBlock = buildSkillIndex();
100
100
 
101
+ // Non-tool-calling model tespiti
102
+ function supportsToolCalls() {
103
+ const url = (providerUrl || '').toLowerCase();
104
+ // MiniMax, Gemini (direct), Ollama, Mistral (direct) tool calling'i desteklemez
105
+ if (url.includes('minimax')) return false;
106
+ if (url.includes('ollama')) return false;
107
+ if (url.includes('localhost')) return false;
108
+ if (url.includes('groq')) return false;
109
+ return true; // OpenAI, Anthropic, vs.
110
+ }
111
+
101
112
  // ── RUN: Execute a complete workflow ──────────────────────────────────
102
113
  if (action === 'run') {
103
114
  if (!task) return { success: false, error: 'task gerekli' };
104
115
 
116
+ // Non-tool-calling modellerde dogrudan passthrough (plan yok, direkt uretim)
117
+ if (!supportsToolCalls()) {
118
+ const memCtx = memoryContext();
119
+ const sysMsg = 'Sen yardimci bir asistansin. Kullanici ne istediyse onu dogrudan yap. Dosya olusturulacaksa icerigi eksiksiz olarak yanitla.' + (memCtx ? '\n\nKullanici bilgisi:\n' + memCtx : '') + '\n\n' + skillsIndexBlock;
120
+ const chatBody = { model, stream: false, messages: [{ role: 'system', content: sysMsg }, { role: 'user', content: task }], temperature: 0.7, max_tokens: 4000 };
121
+ try {
122
+ const chatResult = await apiCall(providerUrl, providerApiKey, chatBody);
123
+ const reply = chatResult.choices?.[0]?.message?.content || '';
124
+ return { success: true, workflowId: 'passthrough', name: 'Direct Generation', status: 'completed', totalSteps: 0, completedSteps: 0, results: [{ step: 0, tool: 'chat', status: 'done', result: { reply } }], passthrough: true, reply };
125
+ } catch (e) {
126
+ return { success: false, error: 'Yanit alinamadi: ' + e.message };
127
+ }
128
+ }
129
+
105
130
  // Phase 0: Check if simple chat (passthrough) — no planning needed
106
131
  const simpleCheckPrompt = {
107
132
  role: 'system',