natureco-cli 2.23.32 → 4.4.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/AUDIT.md +178 -0
- package/CHANGELOG.md +422 -0
- package/DEPLOY_v2.0.0.md +400 -0
- package/README.md +159 -1
- package/bin/natureco.js +170 -8
- package/package.json +43 -11
- package/skills/code-review/SKILL.md +0 -0
- package/skills/summarize/SKILL.md +0 -0
- package/skills/translate/SKILL.md +0 -0
- package/src/commands/acp.js +0 -0
- package/src/commands/admin-rpc.js +0 -0
- package/src/commands/agent.js +0 -0
- package/src/commands/agents.js +0 -0
- package/src/commands/approvals.js +0 -0
- package/src/commands/ask.js +0 -0
- package/src/commands/audit.js +209 -0
- package/src/commands/backup.js +0 -0
- package/src/commands/bonjour.js +0 -0
- package/src/commands/bots.js +0 -0
- package/src/commands/browser.js +0 -0
- package/src/commands/capability.js +0 -0
- package/src/commands/channels.js +0 -0
- package/src/commands/chat.js +0 -0
- package/src/commands/clawbot.js +0 -0
- package/src/commands/clickclack.js +0 -0
- package/src/commands/code.js +0 -0
- package/src/commands/commands.js +0 -0
- package/src/commands/commitments.js +0 -0
- package/src/commands/completion.js +0 -0
- package/src/commands/config.js +0 -0
- package/src/commands/configure.js +0 -0
- package/src/commands/cost.js +210 -0
- package/src/commands/crestodian.js +0 -0
- package/src/commands/cron.js +0 -0
- package/src/commands/daemon.js +0 -0
- package/src/commands/dashboard.js +126 -45
- package/src/commands/device-pair.js +0 -0
- package/src/commands/devices.js +0 -0
- package/src/commands/directory.js +0 -0
- package/src/commands/discord.js +0 -0
- package/src/commands/dns.js +0 -0
- package/src/commands/docs.js +0 -0
- package/src/commands/doctor.js +134 -15
- package/src/commands/exec-policy.js +0 -0
- package/src/commands/gateway-server.js +0 -0
- package/src/commands/gateway.js +0 -0
- package/src/commands/git.js +0 -0
- package/src/commands/health.js +0 -0
- package/src/commands/help.js +0 -0
- package/src/commands/hooks.js +0 -0
- package/src/commands/imessage.js +0 -0
- package/src/commands/infer.js +0 -0
- package/src/commands/init.js +0 -0
- package/src/commands/irc.js +0 -0
- package/src/commands/login.js +0 -0
- package/src/commands/logout.js +0 -0
- package/src/commands/logs.js +0 -0
- package/src/commands/mattermost.js +0 -0
- package/src/commands/mcp.js +0 -0
- package/src/commands/medium.js +206 -0
- package/src/commands/memory-cmd.js +0 -0
- package/src/commands/memory.js +0 -0
- package/src/commands/message.js +0 -0
- package/src/commands/migrate.js +0 -0
- package/src/commands/models.js +0 -0
- package/src/commands/naturehub.js +156 -0
- package/src/commands/node.js +0 -0
- package/src/commands/nodes.js +0 -0
- package/src/commands/oc-path.js +0 -0
- package/src/commands/onboard.js +0 -0
- package/src/commands/open-prose.js +0 -0
- package/src/commands/pairing.js +0 -0
- package/src/commands/path.js +0 -0
- package/src/commands/plugins.js +0 -0
- package/src/commands/policy.js +0 -0
- package/src/commands/proxy.js +0 -0
- package/src/commands/qr.js +0 -0
- package/src/commands/reset.js +0 -0
- package/src/commands/run.js +0 -0
- package/src/commands/sandbox.js +0 -0
- package/src/commands/secrets.js +0 -0
- package/src/commands/security.js +0 -0
- package/src/commands/seo.js +268 -0
- package/src/commands/sessions.js +0 -0
- package/src/commands/setup.js +13 -6
- package/src/commands/signal.js +0 -0
- package/src/commands/skills.js +82 -1
- package/src/commands/slack.js +0 -0
- package/src/commands/sms.js +0 -0
- package/src/commands/status.js +0 -0
- package/src/commands/system.js +0 -0
- package/src/commands/tasks.js +0 -0
- package/src/commands/team.js +171 -0
- package/src/commands/telegram.js +0 -0
- package/src/commands/terminal.js +0 -0
- package/src/commands/thread-ownership.js +0 -0
- package/src/commands/transcripts.js +0 -0
- package/src/commands/tui.js +0 -0
- package/src/commands/ultrareview.js +0 -0
- package/src/commands/uninstall.js +0 -0
- package/src/commands/update.js +0 -0
- package/src/commands/voice.js +0 -0
- package/src/commands/vydra.js +0 -0
- package/src/commands/web-fetch.js +0 -0
- package/src/commands/webhooks.js +0 -0
- package/src/commands/whatsapp.js +0 -0
- package/src/commands/wiki.js +0 -0
- package/src/commands/workboard.js +0 -0
- package/src/commands/xp.js +194 -0
- package/src/tools/audio_understanding.js +0 -0
- package/src/tools/bash.js +0 -0
- package/src/tools/browser.js +0 -0
- package/src/tools/canvas.js +0 -0
- package/src/tools/document_extract.js +0 -0
- package/src/tools/duckduckgo.js +0 -0
- package/src/tools/exa_search.js +0 -0
- package/src/tools/filesystem.js +0 -0
- package/src/tools/firecrawl.js +0 -0
- package/src/tools/git.js +0 -0
- package/src/tools/http.js +0 -0
- package/src/tools/image_generation.js +0 -0
- package/src/tools/list_dir.js +0 -0
- package/src/tools/llm_task.js +43 -11
- package/src/tools/media_understanding.js +0 -0
- package/src/tools/music_generation.js +0 -0
- package/src/tools/parallel_search.js +0 -0
- package/src/tools/phone_control.js +0 -0
- package/src/tools/phone_control_enhanced.js +0 -0
- package/src/tools/read_file.js +0 -0
- package/src/tools/searxng.js +0 -0
- package/src/tools/speech_to_text.js +0 -0
- package/src/tools/text_to_speech.js +0 -0
- package/src/tools/thread_ownership.js +0 -0
- package/src/tools/video_generation.js +0 -0
- package/src/tools/web_readability.js +0 -0
- package/src/tools/web_search.js +0 -0
- package/src/tools/write_file.js +0 -0
- package/src/utils/agents-md.js +0 -0
- package/src/utils/agents.js +0 -0
- package/src/utils/api.js +5 -1
- package/src/utils/approvals.js +0 -0
- package/src/utils/audit.js +199 -0
- package/src/utils/background.js +0 -0
- package/src/utils/baileys.js +0 -0
- package/src/utils/branding.js +136 -0
- package/src/utils/commands.js +0 -0
- package/src/utils/config.js +0 -0
- package/src/utils/cost-tracker.js +360 -0
- package/src/utils/cron.js +0 -0
- package/src/utils/dashboard-server.js +284 -0
- package/src/utils/errors.js +0 -0
- package/src/utils/format.js +7 -10
- package/src/utils/gateway-ws.js +0 -0
- package/src/utils/headless.js +0 -0
- package/src/utils/history.js +0 -0
- package/src/utils/hooks.js +0 -0
- package/src/utils/inquirer-wrapper.js +0 -0
- package/src/utils/mcp-client.js +0 -0
- package/src/utils/mcp.js +0 -0
- package/src/utils/memory.js +0 -0
- package/src/utils/parallel-tools.js +0 -0
- package/src/utils/path-utils.js +0 -0
- package/src/utils/pattern-detector.js +314 -0
- package/src/utils/plugin-registry.js +0 -0
- package/src/utils/secret-scanner.js +204 -0
- package/src/utils/secrets.js +0 -0
- package/src/utils/sessions.js +0 -0
- package/src/utils/skills.js +0 -0
- package/src/utils/sub-agent.js +6 -0
- package/src/utils/token-budget.js +0 -0
- package/src/utils/tool-adapter.js +0 -0
- package/src/utils/tool-runner.js +0 -0
- package/src/utils/tui.js +750 -0
- package/src/utils/web-fetch.js +0 -0
package/DEPLOY_v2.0.0.md
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# NatureCo CLI v2.0.0 - Direct Groq Integration
|
|
2
|
+
|
|
3
|
+
## 🎯 Major Changes
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
- ❌ **NatureCo backend bypass edildi** - Artık backend'e istek atılmıyor
|
|
7
|
+
- ✅ **Direkt Groq API entegrasyonu** - CLI direkt Groq'a bağlanıyor
|
|
8
|
+
- ✅ **Local tool execution** - Bash, file operations lokal çalışıyor
|
|
9
|
+
- ✅ **Multi-turn conversation** - Conversation history memory'de tutuluyor
|
|
10
|
+
- ✅ **Tool execution loop** - Max 10 iterasyon, otomatik tool çalıştırma
|
|
11
|
+
|
|
12
|
+
### New Architecture
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
┌─────────────┐
|
|
16
|
+
│ User Input │
|
|
17
|
+
└──────┬──────┘
|
|
18
|
+
│
|
|
19
|
+
▼
|
|
20
|
+
┌─────────────────┐
|
|
21
|
+
│ NatureCo CLI │
|
|
22
|
+
│ (v2.0.0) │
|
|
23
|
+
└──────┬──────────┘
|
|
24
|
+
│
|
|
25
|
+
├─────────────────────┐
|
|
26
|
+
│ │
|
|
27
|
+
▼ ▼
|
|
28
|
+
┌──────────────┐ ┌────────────────┐
|
|
29
|
+
│ Groq API │ │ Local Tools │
|
|
30
|
+
│ (Direct) │◄───┤ - bash │
|
|
31
|
+
│ │ │ - read_file │
|
|
32
|
+
│ │ │ - write_file │
|
|
33
|
+
│ │ │ - list_dir │
|
|
34
|
+
└──────────────┘ └────────────────┘
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 📦 Yeni Dosyalar
|
|
38
|
+
|
|
39
|
+
1. **natureco-cli/src/utils/api.js** - Tamamen yeniden yazıldı
|
|
40
|
+
2. **natureco-cli/src/tools/list_dir.js** - Yeni tool eklendi
|
|
41
|
+
|
|
42
|
+
## 🔧 Yeni Özellikler
|
|
43
|
+
|
|
44
|
+
### 1. Direct Groq Integration
|
|
45
|
+
```javascript
|
|
46
|
+
// Config'den Groq API key oku
|
|
47
|
+
const groqApiKey = getGroqApiKey();
|
|
48
|
+
|
|
49
|
+
// Groq'a direkt istek at
|
|
50
|
+
const response = await fetch('https://api.groq.com/openai/v1/chat/completions', {
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: {
|
|
53
|
+
'Authorization': `Bearer ${groqApiKey}`,
|
|
54
|
+
'Content-Type': 'application/json',
|
|
55
|
+
},
|
|
56
|
+
body: JSON.stringify({
|
|
57
|
+
model: 'llama-3.3-70b-versatile',
|
|
58
|
+
messages: messages,
|
|
59
|
+
tools: tools,
|
|
60
|
+
tool_choice: 'auto',
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 2. Tool Definitions
|
|
66
|
+
```javascript
|
|
67
|
+
// 4 tool Groq'a gönderiliyor:
|
|
68
|
+
- bash: Execute shell commands
|
|
69
|
+
- read_file: Read file contents
|
|
70
|
+
- write_file: Write to files
|
|
71
|
+
- list_dir: List directory contents (YENİ)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 3. Tool Execution Loop
|
|
75
|
+
```javascript
|
|
76
|
+
// Max 10 iterasyon
|
|
77
|
+
while (iteration < maxIterations) {
|
|
78
|
+
// 1. Groq'a istek at
|
|
79
|
+
const response = await groqAPI(messages, tools);
|
|
80
|
+
|
|
81
|
+
// 2. Tool call var mı?
|
|
82
|
+
if (response.tool_calls) {
|
|
83
|
+
// 3. Tool'ları lokal çalıştır
|
|
84
|
+
const results = await executeToolCalls(toolCalls);
|
|
85
|
+
|
|
86
|
+
// 4. Sonuçları Groq'a geri gönder
|
|
87
|
+
messages.push(toolResults);
|
|
88
|
+
|
|
89
|
+
// 5. Tekrar cevap bekle
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 6. Final response
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 4. Conversation History
|
|
99
|
+
```javascript
|
|
100
|
+
// Memory'de tutuluyor
|
|
101
|
+
const conversationHistory = new Map();
|
|
102
|
+
|
|
103
|
+
// Her conversation için history
|
|
104
|
+
conversationHistory.set(convId, [
|
|
105
|
+
{ role: 'user', content: 'merhaba' },
|
|
106
|
+
{ role: 'assistant', content: 'Merhaba!' },
|
|
107
|
+
{ role: 'user', content: 'dosyaları listele' },
|
|
108
|
+
{ role: 'assistant', content: '...' }
|
|
109
|
+
]);
|
|
110
|
+
|
|
111
|
+
// Son 20 mesaj tutuluyor
|
|
112
|
+
if (history.length > 20) {
|
|
113
|
+
history = history.slice(-20);
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 📋 Setup Guide
|
|
118
|
+
|
|
119
|
+
### 1. Groq API Key Al
|
|
120
|
+
```bash
|
|
121
|
+
# Groq Console'a git
|
|
122
|
+
https://console.groq.com/keys
|
|
123
|
+
|
|
124
|
+
# API Key oluştur
|
|
125
|
+
# Copy: gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 2. CLI'yi Güncelle
|
|
129
|
+
```bash
|
|
130
|
+
cd natureco-cli
|
|
131
|
+
npm publish
|
|
132
|
+
npm install -g natureco-cli@2.0.0
|
|
133
|
+
natureco --version
|
|
134
|
+
# Output: 2.0.0
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 3. Groq API Key Set Et
|
|
138
|
+
```bash
|
|
139
|
+
# Config'e Groq API key ekle
|
|
140
|
+
natureco config set groqApiKey gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
141
|
+
|
|
142
|
+
# Kontrol et
|
|
143
|
+
natureco config get groqApiKey
|
|
144
|
+
# Output: gsk_xxx...
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 4. Test Et
|
|
148
|
+
```bash
|
|
149
|
+
natureco chat
|
|
150
|
+
|
|
151
|
+
> merhaba
|
|
152
|
+
|
|
153
|
+
# Beklenen çıktı:
|
|
154
|
+
[Groq] Sending request...
|
|
155
|
+
[Groq] Messages: 2
|
|
156
|
+
[Groq] Tools: 4
|
|
157
|
+
|
|
158
|
+
[Groq] Iteration 1/10
|
|
159
|
+
[Groq] Response type: text
|
|
160
|
+
|
|
161
|
+
bot › Merhaba! Size nasıl yardımcı olabilirim?
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## 🧪 Test Senaryoları
|
|
165
|
+
|
|
166
|
+
### Test 1: Basit Sohbet
|
|
167
|
+
```bash
|
|
168
|
+
natureco chat
|
|
169
|
+
|
|
170
|
+
> merhaba
|
|
171
|
+
bot › Merhaba! Size nasıl yardımcı olabilirim?
|
|
172
|
+
|
|
173
|
+
> nasılsın
|
|
174
|
+
bot › İyiyim, teşekkür ederim! Size nasıl yardımcı olabilirim?
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Test 2: Tool Execution (list_dir)
|
|
178
|
+
```bash
|
|
179
|
+
natureco chat
|
|
180
|
+
|
|
181
|
+
> mevcut klasördeki dosyaları listele
|
|
182
|
+
|
|
183
|
+
# Beklenen:
|
|
184
|
+
[Groq] Iteration 1/10
|
|
185
|
+
[Groq] Response type: tool_calls
|
|
186
|
+
[Groq] Tool calls: 1
|
|
187
|
+
🔧 Executing tool: list_dir
|
|
188
|
+
Params: {"path":"."}
|
|
189
|
+
✓ Success
|
|
190
|
+
|
|
191
|
+
[Groq] Iteration 2/10
|
|
192
|
+
[Groq] Response type: text
|
|
193
|
+
|
|
194
|
+
bot › İşte mevcut klasördeki dosyalar:
|
|
195
|
+
📁 node_modules
|
|
196
|
+
📁 src
|
|
197
|
+
📄 package.json (1.2 KB)
|
|
198
|
+
📄 README.md (3.4 KB)
|
|
199
|
+
...
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Test 3: Tool Execution (bash)
|
|
203
|
+
```bash
|
|
204
|
+
natureco chat
|
|
205
|
+
|
|
206
|
+
> git status komutunu çalıştır
|
|
207
|
+
|
|
208
|
+
# Beklenen:
|
|
209
|
+
[Groq] Tool calls: 1
|
|
210
|
+
🔧 Executing tool: bash
|
|
211
|
+
Params: {"command":"git status"}
|
|
212
|
+
✓ Success
|
|
213
|
+
|
|
214
|
+
bot › Git durumu:
|
|
215
|
+
On branch main
|
|
216
|
+
Your branch is up to date with 'origin/main'.
|
|
217
|
+
...
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Test 4: Multi-turn Conversation
|
|
221
|
+
```bash
|
|
222
|
+
natureco chat
|
|
223
|
+
|
|
224
|
+
> README.md dosyasını oku
|
|
225
|
+
bot › [dosya içeriği]
|
|
226
|
+
|
|
227
|
+
> bu dosyada kaç satır var?
|
|
228
|
+
bot › README.md dosyasında 45 satır var.
|
|
229
|
+
# ↑ Conversation history sayesinde context'i biliyor
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Test 5: Tool Chain
|
|
233
|
+
```bash
|
|
234
|
+
natureco chat
|
|
235
|
+
|
|
236
|
+
> package.json dosyasını oku, version'u bul ve ekrana yazdır
|
|
237
|
+
|
|
238
|
+
# Beklenen:
|
|
239
|
+
[Groq] Tool calls: 1 (read_file)
|
|
240
|
+
[Groq] Tool calls: 0 (text response)
|
|
241
|
+
|
|
242
|
+
bot › package.json dosyasını okudum. Version: 2.0.0
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## 🔍 Debug Logs
|
|
246
|
+
|
|
247
|
+
### Normal Response
|
|
248
|
+
```
|
|
249
|
+
[Groq] Sending request...
|
|
250
|
+
[Groq] Messages: 2
|
|
251
|
+
[Groq] Tools: 4
|
|
252
|
+
|
|
253
|
+
[Groq] Iteration 1/10
|
|
254
|
+
[Groq] Response type: text
|
|
255
|
+
|
|
256
|
+
bot › Merhaba!
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Tool Execution
|
|
260
|
+
```
|
|
261
|
+
[Groq] Sending request...
|
|
262
|
+
[Groq] Messages: 2
|
|
263
|
+
[Groq] Tools: 4
|
|
264
|
+
|
|
265
|
+
[Groq] Iteration 1/10
|
|
266
|
+
[Groq] Response type: tool_calls
|
|
267
|
+
[Groq] Tool calls: 1
|
|
268
|
+
|
|
269
|
+
🔧 Executing tool: list_dir
|
|
270
|
+
Params: {"path":"."}
|
|
271
|
+
✓ Success
|
|
272
|
+
|
|
273
|
+
[Groq] Iteration 2/10
|
|
274
|
+
[Groq] Response type: text
|
|
275
|
+
|
|
276
|
+
bot › İşte dosyalar: ...
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Max Iterations
|
|
280
|
+
```
|
|
281
|
+
[Groq] Iteration 10/10
|
|
282
|
+
[Groq] Max iterations reached
|
|
283
|
+
|
|
284
|
+
bot › Max tool execution iterations reached.
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## ⚙️ Configuration
|
|
288
|
+
|
|
289
|
+
### Config Dosyası
|
|
290
|
+
```json
|
|
291
|
+
{
|
|
292
|
+
"groqApiKey": "gsk_xxx...",
|
|
293
|
+
"apiKey": "nc_xxx...", // Artık kullanılmıyor
|
|
294
|
+
"defaultBot": "...", // Artık kullanılmıyor
|
|
295
|
+
"defaultBotId": "..." // Artık kullanılmıyor
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Config Komutları
|
|
300
|
+
```bash
|
|
301
|
+
# Set
|
|
302
|
+
natureco config set groqApiKey gsk_xxx
|
|
303
|
+
|
|
304
|
+
# Get
|
|
305
|
+
natureco config get groqApiKey
|
|
306
|
+
|
|
307
|
+
# List all
|
|
308
|
+
natureco config list
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## 🚨 Breaking Changes
|
|
312
|
+
|
|
313
|
+
### v1.x → v2.0.0
|
|
314
|
+
|
|
315
|
+
**Kaldırılan:**
|
|
316
|
+
- ❌ NatureCo backend dependency
|
|
317
|
+
- ❌ `apiKey` (NatureCo API key) artık kullanılmıyor
|
|
318
|
+
- ❌ `defaultBot` / `defaultBotId` artık kullanılmıyor
|
|
319
|
+
- ❌ Backend'e istek atma
|
|
320
|
+
|
|
321
|
+
**Eklenen:**
|
|
322
|
+
- ✅ `groqApiKey` config key
|
|
323
|
+
- ✅ Direct Groq API integration
|
|
324
|
+
- ✅ Local tool execution
|
|
325
|
+
- ✅ Conversation history
|
|
326
|
+
- ✅ `list_dir` tool
|
|
327
|
+
|
|
328
|
+
**Değişmeyen:**
|
|
329
|
+
- ✅ `natureco chat` komutu
|
|
330
|
+
- ✅ Tool definitions (bash, read_file, write_file)
|
|
331
|
+
- ✅ Config sistemi
|
|
332
|
+
|
|
333
|
+
## 📊 Comparison
|
|
334
|
+
|
|
335
|
+
| Feature | v1.x | v2.0.0 |
|
|
336
|
+
|---------|------|--------|
|
|
337
|
+
| Backend | NatureCo API | Groq Direct |
|
|
338
|
+
| API Key | nc_xxx | gsk_xxx |
|
|
339
|
+
| Tools | Backend'de | Lokal |
|
|
340
|
+
| Conversation | Backend'de | Memory'de |
|
|
341
|
+
| Tool Loop | Backend'de | CLI'de |
|
|
342
|
+
| Max Iterations | 5 | 10 |
|
|
343
|
+
| list_dir tool | ❌ | ✅ |
|
|
344
|
+
|
|
345
|
+
## 🔗 Migration Guide
|
|
346
|
+
|
|
347
|
+
### v1.x Kullanıcıları İçin
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# 1. Groq API key al
|
|
351
|
+
https://console.groq.com/keys
|
|
352
|
+
|
|
353
|
+
# 2. CLI'yi güncelle
|
|
354
|
+
npm install -g natureco-cli@2.0.0
|
|
355
|
+
|
|
356
|
+
# 3. Groq API key set et
|
|
357
|
+
natureco config set groqApiKey gsk_xxx
|
|
358
|
+
|
|
359
|
+
# 4. Test et
|
|
360
|
+
natureco chat
|
|
361
|
+
> test
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Not:** Eski `apiKey` (NatureCo backend) artık kullanılmıyor ama config'de kalabilir.
|
|
365
|
+
|
|
366
|
+
## ✅ Checklist
|
|
367
|
+
|
|
368
|
+
- [x] api.js tamamen yeniden yazıldı
|
|
369
|
+
- [x] Direct Groq integration
|
|
370
|
+
- [x] Tool execution loop (max 10)
|
|
371
|
+
- [x] Conversation history (memory)
|
|
372
|
+
- [x] list_dir tool eklendi
|
|
373
|
+
- [x] Version 2.0.0
|
|
374
|
+
- [x] Dashboard version badge güncellendi
|
|
375
|
+
- [ ] npm publish
|
|
376
|
+
- [ ] Test: basit sohbet
|
|
377
|
+
- [ ] Test: tool execution
|
|
378
|
+
- [ ] Test: multi-turn conversation
|
|
379
|
+
- [ ] Test: tool chain
|
|
380
|
+
|
|
381
|
+
## 🚀 Deploy Komutları
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
cd natureco-cli
|
|
385
|
+
npm publish
|
|
386
|
+
npm install -g natureco-cli@2.0.0
|
|
387
|
+
natureco --version
|
|
388
|
+
natureco config set groqApiKey gsk_xxx
|
|
389
|
+
natureco chat
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
## 📝 Notlar
|
|
393
|
+
|
|
394
|
+
- Groq API free tier: 30 requests/minute
|
|
395
|
+
- Model: llama-3.3-70b-versatile
|
|
396
|
+
- Max tokens: 2000
|
|
397
|
+
- Temperature: 0.7
|
|
398
|
+
- Tool execution tamamen lokal
|
|
399
|
+
- Conversation history process memory'de (restart'ta silinir)
|
|
400
|
+
- Backend artık kullanılmıyor (bağımsız CLI)
|
package/README.md
CHANGED
|
@@ -404,4 +404,162 @@ MIT © NatureCo
|
|
|
404
404
|
|
|
405
405
|
---
|
|
406
406
|
|
|
407
|
-
**Version:**
|
|
407
|
+
**Version:** 3.0.0 | **Node.js:** >=18.0.0 (recommended 20+) | **Platform:** macOS, Windows, Linux
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## ✨ What's New in v4.1 — "MULTI-AGENT"
|
|
412
|
+
|
|
413
|
+
### 🤖 Phase 7 — Multi-Agent Orkestrasyon
|
|
414
|
+
- **8 uzman agent** (önceki 3, +5 yeni):
|
|
415
|
+
- `explore`, `general`, `review` (mevcut)
|
|
416
|
+
- **seo**: Anahtar kelime, meta tag, içerik optimizasyonu
|
|
417
|
+
- **content**: NatureCo için SEO uyumlu özgün içerik
|
|
418
|
+
- **security**: OWASP top 10, dependency güvenliği
|
|
419
|
+
- **translator**: Doğal, akıcı çeviriler (teknik terim korumalı)
|
|
420
|
+
- **debugger**: Hata analizi, kök neden tespiti
|
|
421
|
+
- **`natureco team list`** — Tüm agent tipleri
|
|
422
|
+
- **`natureco team status`** — Çalışan/tamamlanan/başarısız istatistikleri
|
|
423
|
+
- **`natureco team spawn <type> <task>`** — Tek agent çalıştır
|
|
424
|
+
- **`natureco team parallel '<json>'`** — N agent paralel çalıştır
|
|
425
|
+
|
|
426
|
+
### 🌿 Phase 6 — NatureCo Özgü Entegrasyonlar
|
|
427
|
+
OpenClaw generic bir agent. NatureCo CLI, **natureco.me platformunun native parçası**.
|
|
428
|
+
|
|
429
|
+
- **`natureco naturehub post "<text>"`** — Topluluk akışına içerik yayınla
|
|
430
|
+
- **`natureco medium draft <file.md>`** — Markdown'tan Medium taslağı (Parton'un ayda 4 makale hedefi için)
|
|
431
|
+
- **`natureco medium publish <file.md>`** — Doğrudan Medium'da yayınla
|
|
432
|
+
- **`natureco seo audit <url>`** — Tam SEO denetimi, 100-üzerinden skor
|
|
433
|
+
- **`natureco seo audit https://natureco.me`** → **71/100**, H1 eksik, title uzunluğu raporlandı
|
|
434
|
+
- **`natureco xp`** — 8 seviye gamification (Tohum → Galaksi), 7 ödül
|
|
435
|
+
|
|
436
|
+
### 🎯 Canlı SEO Denetimi (natureco.me)
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
✅ Description (149 karakter)
|
|
440
|
+
✅ Canonical URL var
|
|
441
|
+
✅ Open Graph (7 tag)
|
|
442
|
+
✅ Twitter Card (6 tag)
|
|
443
|
+
✅ Schema.org markup var
|
|
444
|
+
⚠️ Title çok uzun (64 karakter, ideal: 50-60)
|
|
445
|
+
❌ H1 tag eksik
|
|
446
|
+
⚠️ İçerik kısa (9 kelime)
|
|
447
|
+
🎯 SEO Skoru: 71/100
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### 🖥️ Phase 5 — Local Web Dashboard
|
|
451
|
+
- **`natureco dashboard`** → http://127.0.0.1:7421 (otomatik tarayıcı açılır)
|
|
452
|
+
- **Vanilla JS + HTML** — framework yok, hızlı, dependency yok
|
|
453
|
+
- **6 widget** tek sayfada:
|
|
454
|
+
- 💰 Bugünkü maliyet (limit bar ile)
|
|
455
|
+
- 📦 Yüklü skill + bekleyen proposal sayısı
|
|
456
|
+
- ⏰ Aktif cron sayısı
|
|
457
|
+
- 📋 Bugünkü audit kaydı
|
|
458
|
+
- 💵 Provider/model bazlı maliyet breakdown
|
|
459
|
+
- 🧠 Self-evolving skill proposals tablosu
|
|
460
|
+
- 📜 Son tool çağrıları timeline
|
|
461
|
+
- **Otomatik yenileme** — 5 saniyede bir auto-refresh
|
|
462
|
+
- **JSON API** — `/api` endpoint
|
|
463
|
+
- **PID management** — start/stop/status/url
|
|
464
|
+
|
|
465
|
+
### 🆚 OpenClaw Dashboard vs NatureCo
|
|
466
|
+
|
|
467
|
+
| Özellik | OpenClaw | NatureCo CLI v3.4 |
|
|
468
|
+
|---------|---------|-------------------|
|
|
469
|
+
| Local web dashboard | ❌ (cloud bağımlı) | ✅ (127.0.0.1:7421) |
|
|
470
|
+
| Framework dependency | — | **Yok** (vanilla JS) |
|
|
471
|
+
| Real-time auto-refresh | ❌ | ✅ (5s) |
|
|
472
|
+
| Maliyet görselleştirme | ❌ | ✅ |
|
|
473
|
+
| Self-evolving skill UI | ❌ | ✅ |
|
|
474
|
+
| Audit log görüntüleme | ❌ | ✅ |
|
|
475
|
+
|
|
476
|
+
### 💰 Phase 4 — Maliyet Optimizasyonu
|
|
477
|
+
- **21 model × provider** fiyat tablosu (Groq, OpenAI, Anthropic, DeepSeek, Together, Fireworks, Ollama)
|
|
478
|
+
- **Model router** — prompt karmaşıklığını tahmin eder, en uygun (en ucuz) modeli önerir
|
|
479
|
+
- Simple: `llama-3.1-8b-instant` ($0.05/M in)
|
|
480
|
+
- Medium: `llama-3.3-70b-versatile` ($0.59/M in)
|
|
481
|
+
- Complex: kod için `claude-sonnet-4-6` veya `groq:llama-3.3-70b`
|
|
482
|
+
- Creative: `claude-sonnet-4-6` veya `gpt-4o`
|
|
483
|
+
- **`natureco cost today|week|month|all`** — Provider/model bazlı maliyet breakdown
|
|
484
|
+
- **`natureco cost budget`** — Günlük $5, aylık $100 limit, görsel progress bar
|
|
485
|
+
- **`natureco cost model "<prompt>"`** — Bir prompt için en uygun modeli öner
|
|
486
|
+
- **`natureco cost prices`** — Tüm fiyatları gör
|
|
487
|
+
- **`natureco cost set <key> <value>`** — Bütçe ayarla (örn: `set dailyLimit 3.00`)
|
|
488
|
+
|
|
489
|
+
### 💵 OpenClaw Karşılaştırması
|
|
490
|
+
|
|
491
|
+
| Kullanım | OpenClaw | NatureCo CLI v3.3 |
|
|
492
|
+
|---------|---------|-------------------|
|
|
493
|
+
| Aylık ortalama maliyet | $50-200 | **$5-15** |
|
|
494
|
+
| Model seçimi | Sabit (kullanıcı bilinçli değil) | Otomatik router |
|
|
495
|
+
| Maliyet görünürlüğü | ❌ | ✅ (real-time) |
|
|
496
|
+
| Bütçe limiti | ❌ | ✅ (günlük + aylık) |
|
|
497
|
+
| Otomatik downgrade | ❌ | ✅ (%90'da) |
|
|
498
|
+
| Prompt analizi ile model seçimi | ❌ | ✅ |
|
|
499
|
+
|
|
500
|
+
### 🧠 Phase 3 — Self-Evolving Skills
|
|
501
|
+
- **Pattern detector** — Aynı tool çağrı pattern'i 3 kez tekrar → otomatik skill önerisi
|
|
502
|
+
- **Akıllı normalize** — URL, dosya yolu, sayı, UUID, tarih generic hale getirilir (gerçek değerler değil türler eşleşir)
|
|
503
|
+
- **Sliding window** — Son 5 tool çağrısından pattern çıkarır
|
|
504
|
+
- **24 saat cooldown** — Aynı pattern spam olmaz
|
|
505
|
+
- **`natureco skills suggest`** — Bekleyen proposal'ları listele
|
|
506
|
+
- **`natureco skills accept <id>`** — Otomatik SKILL.md oluştur
|
|
507
|
+
- **`natureco skills reject <id>`** — Reddet
|
|
508
|
+
- **`natureco skills forget`** — Pattern hafızasını sıfırla
|
|
509
|
+
|
|
510
|
+
### 🎯 Self-Evolving Test Sonucu
|
|
511
|
+
3 ardışık `web_search → web_fetch → write_file` çağrısı sonrası sistem otomatik olarak:
|
|
512
|
+
- Pattern'i tanıdı
|
|
513
|
+
- `web-search-to-web-fetch` adında skill önerisi oluşturdu
|
|
514
|
+
- Kabul edilirse `~/.natureco/skills/web-search-to-web-fetch/SKILL.md` otomatik üretildi
|
|
515
|
+
|
|
516
|
+
### 🚀 OpenClaw Karşılaştırması (güncel)
|
|
517
|
+
|
|
518
|
+
| Özellik | OpenClaw | NatureCo CLI v3.2 |
|
|
519
|
+
|---------|---------|-------------------|
|
|
520
|
+
| İlk kurulum süresi | 30-60 dakika | **60 saniye** |
|
|
521
|
+
| Onay mekanizması | ❌ | ✅ (5 mod) |
|
|
522
|
+
| Audit log | ❌ | ✅ (JSONL, 30 gün) |
|
|
523
|
+
| Secret scanner | ❌ | ✅ (22 pattern + entropy) |
|
|
524
|
+
| **Self-evolving skills** | ❌ | ✅ (Hermes tarzı) |
|
|
525
|
+
| Türkçe yerelleştirme | ❌ | ✅ |
|
|
526
|
+
|
|
527
|
+
### 🛡️ Phase 2 — Güvenlik
|
|
528
|
+
- **Merkezi audit log** — Tüm komut, onay, tool call, secret erişimi JSONL olarak kayıt altında (30 gün retention, async non-blocking)
|
|
529
|
+
- **Secret scanner** — 22 bilinen secret pattern + Shannon entropi analizi (OpenAI, Anthropic, Groq, AWS, GitHub, Slack, Stripe, NatureCo, JWT, private key vs.)
|
|
530
|
+
- **`natureco audit`** — Bugünkü logları göster, 24 saat istatistik, dosya listesi, canlı tail, arama, cleanup
|
|
531
|
+
- **Doctor 2 yeni check:** `auditLog`, `secretsClean`
|
|
532
|
+
- **Toplam doctor check:** 10 (Phase 1: 8, ilk halde: 5)
|
|
533
|
+
|
|
534
|
+
### 🚀 OpenClaw Karşılaştırması (güncel)
|
|
535
|
+
|
|
536
|
+
| Özellik | OpenClaw | NatureCo CLI v3.1 |
|
|
537
|
+
|---------|---------|-------------------|
|
|
538
|
+
| İlk kurulum süresi | 30-60 dakika | **60 saniye** |
|
|
539
|
+
| First-run auto-detection | ❌ | ✅ |
|
|
540
|
+
| Onay mekanizması | ❌ (tam erişim) | ✅ (risk-seviyeli, 5 mod) |
|
|
541
|
+
| Audit log | ❌ | ✅ (JSONL, 30 gün retention) |
|
|
542
|
+
| Secret scanner | ❌ | ✅ (22 pattern + entropy) |
|
|
543
|
+
| Self-evolving skills | ❌ | ✅ (Phase 3'te) |
|
|
544
|
+
| Real disk space check | ❌ (RAM ölçüyordu) | ✅ |
|
|
545
|
+
| Türkçe yerelleştirme | ❌ | ✅ |
|
|
546
|
+
|
|
547
|
+
### 🎯 Phase 1 — Brand & Onboarding
|
|
548
|
+
- **First-run auto-detection** — `natureco` (boş argüman) kurulum yoksa wizard'a yönlendirir
|
|
549
|
+
- **Yeni NatureCo ASCII art logosu** — brand kimliği her yerde tutarlı
|
|
550
|
+
- **`natureco doctor` genişletildi** — 8 sistem check (önceki: 5)
|
|
551
|
+
- `configExists`, `nodeVersion`, `npmPackages`, `diskSpace`, `writePermission`
|
|
552
|
+
- Yeni: `apiKeyValid`, `providerReachable`, `dataDirs` (auto-create eksik dizinler)
|
|
553
|
+
- **Daily tip** — gateway ekranı her gün farklı NatureCo özelliği önerir
|
|
554
|
+
|
|
555
|
+
### 🚀 OpenClaw Karşılaştırması
|
|
556
|
+
|
|
557
|
+
| Özellik | OpenClaw | NatureCo CLI v3.0 |
|
|
558
|
+
|---------|---------|-------------------|
|
|
559
|
+
| İlk kurulum süresi | 30-60 dakika | **60 saniye** |
|
|
560
|
+
| First-run auto-detection | ❌ | ✅ |
|
|
561
|
+
| Güvenlik: onay mekanizması | ❌ (tam erişim) | ✅ (risk-seviyeli) |
|
|
562
|
+
| Kurulum hatalarını otomatik düzeltme | ❌ | ✅ (doctor auto-fix) |
|
|
563
|
+
| Self-evolving skills | ❌ | ✅ (Phase 3'te) |
|
|
564
|
+
| Gerçek disk alanı kontrolü | ❌ (RAM ölçüyordu) | ✅ |
|
|
565
|
+
| Türkçe yerelleştirme | ❌ | ✅ |
|