vantuz 3.2.6 β 3.2.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/.openclaw/completions/openclaw.bash +227 -0
- package/.openclaw/completions/openclaw.fish +1552 -0
- package/.openclaw/completions/openclaw.ps1 +1966 -0
- package/.openclaw/completions/openclaw.zsh +3571 -0
- package/.openclaw/gateway.cmd +10 -0
- package/.openclaw/identity/device.json +7 -0
- package/.openclaw/openclaw.json +32 -0
- package/DOCS_TR.md +298 -0
- package/onboard.js +2 -2
- package/package.json +14 -6
- package/platforms/amazon.js +11 -0
- package/platforms/ciceksepeti.js +10 -0
- package/platforms/hepsiburada.js +15 -0
- package/platforms/n11.js +11 -0
- package/platforms/pazarama.js +10 -0
- package/platforms/trendyol.js +61 -0
- package/server/app.js +130 -0
- package/server/public/index.html +516 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
rem OpenClaw Gateway (v2026.2.9)
|
|
3
|
+
set PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27\python.exe;C:\Python27\Scripts;C:\Program Files (x86)\Nmap\;c:\Users\OSMBILISIM\AppData\Local\Programs\cursor\resources\app\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\PostgreSQL\15\bin;C:\Users\Osmbilisimsatis\AppData\Roaming\npm;C:\Users\OSMBILISIM\scoop\shims;C:\Users\OSMBILISIM\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\OSMBILISIM\AppData\Local\Programs\Python\Python310\;C:\Users\OSMBILISIM\AppData\Local\Microsoft\WindowsApps;C:\Users\OSMBILISIM\AppData\Local\Programs\Git\cmd;C:\Users\OSMBILISIM\AppData\Roaming\npm;C:\Users\OSMBILISIM\AppData\Local\Programs\Windsurf\bin;C:\Users\OSMBILISIM\AppData\Local\Programs\cursor\resources\app\bin;c:\Users\OSMBILISIM\AppData\Local\Programs\cursor\resources\app\bin;C:\Program Files\GitHub CLI\;C:\Program Files\Void\bin;C:\Users\OSMBILISIM\Downloads\flutter\bin;C:\Users\OSMBILISIM\Downloads\php-8.4.11-nts-Win32-vs17-x64;C:\Users\OSMBILISIM\Downloads\flutter\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Ruby34-x64\msys64\ucrt64\bin;C:\Ruby34-x64\bin;C:\Users\OSMBILISIM\AppData\Local\Programs\Python\Python310\python.exe;C:\Users\OSMBILISIM\go\bin;C:\Program Files\Go\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Program Files\cursor\resources\app\bin;C:\Program Files\Tailscale\;C:\Python27\python.exe;C:\Python27\Scripts;C:\Program Files (x86)\Nmap\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\CMake\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\PostgreSQL\15\bin;C:\Users\Osmbilisimsatis\AppData\Roaming\npm;C:\Users\OSMBILISIM\scoop\shims;C:\Users\OSMBILISIM\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\OSMBILISIM\AppData\Local\Programs\Python\Python310\;C:\Users\OSMBILISIM\AppData\Local\Microsoft\WindowsApps;C:\Users\OSMBILISIM\AppData\Local\Programs\Git\cmd;C:\Users\OSMBILISIM\AppData\Local\Programs\Windsurf\bin;C:\Program Files\GitHub CLI\;C:\Program Files;C:\Users\OSMBILISIM\go\bin;C:\Users\OSMBILISIM\AppData\Local\Programs\Qoder\bin;C:\Users\OSMBILISIM\AppData\Roaming\npm;C:\Users\OSMBILISIM\AppData\Local\Programs\Antigravity\bin;C:\Users\OSMBILISIM\AppData\Local\Programs\Ollama
|
|
4
|
+
set OPENCLAW_GATEWAY_PORT=18789
|
|
5
|
+
set OPENCLAW_GATEWAY_TOKEN=e432e1210dcfb65a16122ce44ccaabeb6fefac299759b841
|
|
6
|
+
set OPENCLAW_SYSTEMD_UNIT=openclaw-gateway.service
|
|
7
|
+
set OPENCLAW_SERVICE_MARKER=openclaw
|
|
8
|
+
set OPENCLAW_SERVICE_KIND=gateway
|
|
9
|
+
set OPENCLAW_SERVICE_VERSION=2026.2.9
|
|
10
|
+
call npx openclaw gateway --port 18789 --allow-unconfigured
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"deviceId": "b37c08a4ffb5fb274c735d5c4a9dafa001447d8ac18b05102129e2cafed4307c",
|
|
4
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/WoKlAj3d+1nj3EEJaiCy+N4drHLu3/+q00EJeNDXtk=\n-----END PUBLIC KEY-----\n",
|
|
5
|
+
"privateKeyPem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEIGk9gpUGGch4gQg/ozBZf0R63/MXlTqQju9U6IuZQpaB\n-----END PRIVATE KEY-----\n",
|
|
6
|
+
"createdAtMs": 1770715930222
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"messages": {
|
|
3
|
+
"ackReactionScope": "group-mentions"
|
|
4
|
+
},
|
|
5
|
+
"agents": {
|
|
6
|
+
"defaults": {
|
|
7
|
+
"maxConcurrent": 4,
|
|
8
|
+
"subagents": {
|
|
9
|
+
"maxConcurrent": 8
|
|
10
|
+
},
|
|
11
|
+
"compaction": {
|
|
12
|
+
"mode": "safeguard"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"gateway": {
|
|
17
|
+
"auth": {
|
|
18
|
+
"mode": "token",
|
|
19
|
+
"token": "e432e1210dcfb65a16122ce44ccaabeb6fefac299759b841"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"wizard": {
|
|
23
|
+
"lastRunAt": "2026-02-10T09:32:30.166Z",
|
|
24
|
+
"lastRunVersion": "2026.2.9",
|
|
25
|
+
"lastRunCommand": "doctor",
|
|
26
|
+
"lastRunMode": "local"
|
|
27
|
+
},
|
|
28
|
+
"meta": {
|
|
29
|
+
"lastTouchedVersion": "2026.2.9",
|
|
30
|
+
"lastTouchedAt": "2026-02-10T09:32:30.181Z"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/DOCS_TR.md
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# π Vantuz AI - TΓΌrkΓ§e Teknik DokΓΌmantasyon
|
|
2
|
+
|
|
3
|
+
## Δ°Γ§indekiler
|
|
4
|
+
|
|
5
|
+
1. [Mimari Genel BakΔ±Ε](#mimari)
|
|
6
|
+
2. [Plugin YapΔ±sΔ±](#plugin-yapΔ±sΔ±)
|
|
7
|
+
3. [Tools (AraΓ§lar)](#tools)
|
|
8
|
+
4. [Commands (Komutlar)](#commands)
|
|
9
|
+
5. [Services (Servisler)](#services)
|
|
10
|
+
6. [Hippocampus HafΔ±za](#hippocampus)
|
|
11
|
+
7. [YapΔ±landΔ±rma](#yapΔ±landΔ±rma)
|
|
12
|
+
8. [API ReferansΔ±](#api-referansΔ±)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Mimari
|
|
17
|
+
|
|
18
|
+
Vantuz, **OpenClaw Gateway** ΓΌzerine inΕa edilmiΕ bir plugin sistemidir.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
22
|
+
β OpenClaw Gateway β
|
|
23
|
+
β ββββββββββββ ββββββββββββ ββββββββββββ β
|
|
24
|
+
β β WhatsApp β β Telegram β β Discord β β
|
|
25
|
+
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ β
|
|
26
|
+
β β β β β
|
|
27
|
+
β βββββββββββββββΌββββββββββββββ β
|
|
28
|
+
β βΌ β
|
|
29
|
+
β βββββββββββββββ β
|
|
30
|
+
β β Vantuz Core β β
|
|
31
|
+
β β Plugin β β
|
|
32
|
+
β βββββββ¬ββββββββ β
|
|
33
|
+
β β β
|
|
34
|
+
β βββββββββ¬ββββββββΌββββββββ¬ββββββββ β
|
|
35
|
+
β βΌ βΌ βΌ βΌ βΌ β
|
|
36
|
+
β ββββββββββββββββββββββββββββββββββββββββ β
|
|
37
|
+
β βRepri-ββVisionββSenti-ββCross-ββAnaly-β β
|
|
38
|
+
β βcer ββ AI ββment ββBorderββtics β β
|
|
39
|
+
β ββββββββββββββββββββββββββββββββββββββββ β
|
|
40
|
+
β β β
|
|
41
|
+
β βββββββΌββββββββ β
|
|
42
|
+
β β Hippocampus β β
|
|
43
|
+
β β Memory β β
|
|
44
|
+
β βββββββββββββββ β
|
|
45
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Plugin YapΔ±sΔ±
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
plugins/vantuz/
|
|
54
|
+
βββ index.js # Ana plugin entry point
|
|
55
|
+
βββ package.json # Plugin manifest
|
|
56
|
+
βββ tools/
|
|
57
|
+
β βββ repricer.js # Kan Emici fiyat robotu
|
|
58
|
+
β βββ vision.js # FotoΔraf β ΓΌrΓΌn
|
|
59
|
+
β βββ sentiment.js # Yorum analizi
|
|
60
|
+
β βββ crossborder.js # SΔ±nΔ±r ΓΆtesi satΔ±Ε
|
|
61
|
+
β βββ product.js # ΓrΓΌn CRUD
|
|
62
|
+
β βββ analytics.js # Raporlama
|
|
63
|
+
βββ services/
|
|
64
|
+
β βββ license.js # Lisans doΔrulama
|
|
65
|
+
βββ memory/
|
|
66
|
+
β βββ hippocampus.js # HafΔ±za sistemi
|
|
67
|
+
βββ platforms/
|
|
68
|
+
βββ index.js # Pazaryeri API stubs
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Tools
|
|
74
|
+
|
|
75
|
+
### vantuz.repricer
|
|
76
|
+
|
|
77
|
+
Rakip fiyatlarΔ±nΔ± analiz eder ve karar verir.
|
|
78
|
+
|
|
79
|
+
**Parametreler:**
|
|
80
|
+
| Param | Tip | Zorunlu | AΓ§Δ±klama |
|
|
81
|
+
|-------|-----|---------|----------|
|
|
82
|
+
| barcode | string | β
| ΓrΓΌn barkodu/SKU |
|
|
83
|
+
| platform | string | - | trendyol, hepsiburada, amazon, n11, all |
|
|
84
|
+
| targetMargin | number | - | Hedef kar marjΔ± % |
|
|
85
|
+
| action | string | - | analyze, apply, schedule |
|
|
86
|
+
|
|
87
|
+
**Γrnek:**
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"name": "vantuz.repricer",
|
|
91
|
+
"parameters": {
|
|
92
|
+
"barcode": "SKU-12345",
|
|
93
|
+
"platform": "trendyol",
|
|
94
|
+
"targetMargin": 25,
|
|
95
|
+
"action": "analyze"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### vantuz.vision
|
|
103
|
+
|
|
104
|
+
FotoΔraftan ΓΌrΓΌn bilgisi Γ§Δ±karΔ±r.
|
|
105
|
+
|
|
106
|
+
**Parametreler:**
|
|
107
|
+
| Param | Tip | Zorunlu | AΓ§Δ±klama |
|
|
108
|
+
|-------|-----|---------|----------|
|
|
109
|
+
| imageUrl | string | β
| GΓΆrsel URL veya base64 |
|
|
110
|
+
| targetPlatforms | array | - | Hedef pazaryerleri |
|
|
111
|
+
| autoPublish | boolean | - | Otomatik yayΔ±nla |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### vantuz.sentiment
|
|
116
|
+
|
|
117
|
+
MΓΌΕteri yorumlarΔ±nΔ± analiz eder.
|
|
118
|
+
|
|
119
|
+
**Parametreler:**
|
|
120
|
+
| Param | Tip | Zorunlu | AΓ§Δ±klama |
|
|
121
|
+
|-------|-----|---------|----------|
|
|
122
|
+
| productId | string | β
| ΓrΓΌn ID/barkod |
|
|
123
|
+
| platform | string | - | Pazaryeri |
|
|
124
|
+
| period | string | - | 7d, 30d, 90d, all |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### vantuz.crossborder
|
|
129
|
+
|
|
130
|
+
UluslararasΔ± satΔ±Ε hazΔ±rlΔ±ΔΔ± yapar.
|
|
131
|
+
|
|
132
|
+
**Parametreler:**
|
|
133
|
+
| Param | Tip | Zorunlu | AΓ§Δ±klama |
|
|
134
|
+
|-------|-----|---------|----------|
|
|
135
|
+
| productId | string | β
| Kaynak ΓΌrΓΌn ID |
|
|
136
|
+
| targetMarket | string | β
| de, us, uk, fr |
|
|
137
|
+
| fulfillment | string | - | fba, fbm, self |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Commands
|
|
142
|
+
|
|
143
|
+
KullanΔ±cΔ±lar WhatsApp/Telegram'dan doΔrudan kullanabilir:
|
|
144
|
+
|
|
145
|
+
| Komut | AΓ§Δ±klama | Γrnek |
|
|
146
|
+
|-------|----------|-------|
|
|
147
|
+
| `/stok` | Stok ΓΆzeti | `/stok trendyol` |
|
|
148
|
+
| `/fiyat` | Fiyat gΓΌncelle | `/fiyat SKU123 199` |
|
|
149
|
+
| `/rapor` | SatΔ±Ε raporu | `/rapor 7d` |
|
|
150
|
+
| `/rakip` | Rakip analizi | `/rakip SKU123` |
|
|
151
|
+
| `/lisans` | Lisans durumu | `/lisans` |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Services
|
|
156
|
+
|
|
157
|
+
### vantuz-license
|
|
158
|
+
BaΕlatmada lisans doΔrulamasΔ± yapar. Her 24 saatte bir kontrol tekrarlanΔ±r.
|
|
159
|
+
|
|
160
|
+
### vantuz-memory
|
|
161
|
+
Hippocampus hafΔ±za sistemini baΕlatΔ±r ve yΓΆnetir.
|
|
162
|
+
|
|
163
|
+
### vantuz-repricer-daemon
|
|
164
|
+
Her 15 dakikada bir otomatik fiyat kontrolΓΌ yapar.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Hippocampus
|
|
169
|
+
|
|
170
|
+
SQLite tabanlΔ± geliΕmiΕ hafΔ±za sistemi.
|
|
171
|
+
|
|
172
|
+
### Tablolar
|
|
173
|
+
|
|
174
|
+
**Memory** - Genel hafΔ±za
|
|
175
|
+
- type: decision, price_change, product, conversation, insight
|
|
176
|
+
- content: HafΔ±za iΓ§eriΔi
|
|
177
|
+
- importance: 0-1 ΓΆnem skoru
|
|
178
|
+
- accessCount: EriΕim sayΔ±sΔ±
|
|
179
|
+
|
|
180
|
+
**PricingDecision** - Fiyat kararlarΔ±
|
|
181
|
+
- barcode, previousPrice, newPrice, reason, outcome
|
|
182
|
+
|
|
183
|
+
**ProductContext** - ΓrΓΌn baΔlamΔ±
|
|
184
|
+
- avgSalePrice, competitorHistory, customerSentiment
|
|
185
|
+
|
|
186
|
+
**LearnedRule** - ΓΔrenilen kurallar
|
|
187
|
+
- trigger, condition, action, confidence
|
|
188
|
+
|
|
189
|
+
### Γzellikler
|
|
190
|
+
|
|
191
|
+
- **Konsolidasyon**: Her gece 03:00'te eski/ΓΆnemsiz hafΔ±zalar temizlenir
|
|
192
|
+
- **ΓΔrenme**: BaΕarΔ±lΔ± kararlar otomatik kural olur
|
|
193
|
+
- **BaΔlamsal HatΔ±rlama**: Δ°lgili hafΔ±zalar sorgulanabilir
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## YapΔ±landΔ±rma
|
|
198
|
+
|
|
199
|
+
### .openclaw/openclaw.json
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"agents": {
|
|
204
|
+
"defaults": {
|
|
205
|
+
"workspace": "./workspace"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"channels": {
|
|
209
|
+
"whatsapp": { "enabled": true },
|
|
210
|
+
"telegram": {
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"botToken": "${TELEGRAM_BOT_TOKEN}"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"models": {
|
|
216
|
+
"openai": {
|
|
217
|
+
"apiKey": "${OPENAI_API_KEY}"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"plugins": {
|
|
221
|
+
"load": {
|
|
222
|
+
"paths": ["./plugins/vantuz"]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### .env
|
|
229
|
+
|
|
230
|
+
```env
|
|
231
|
+
OPENAI_API_KEY=sk-...
|
|
232
|
+
TELEGRAM_BOT_TOKEN=123456:ABC...
|
|
233
|
+
VANTUZ_LICENSE_KEY=...
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## API ReferansΔ±
|
|
239
|
+
|
|
240
|
+
### Gateway RPC
|
|
241
|
+
|
|
242
|
+
**vantuz.status**
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"version": "2.0.0",
|
|
246
|
+
"license": { "valid": true, "customer": "..." },
|
|
247
|
+
"memory": { "memories": 150, "decisions": 45 },
|
|
248
|
+
"platforms": { "trendyol": true, "hepsiburada": true }
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**vantuz.config**
|
|
253
|
+
```json
|
|
254
|
+
// GET
|
|
255
|
+
{ "action": "get" }
|
|
256
|
+
|
|
257
|
+
// SET
|
|
258
|
+
{ "action": "set", "data": { "repricerInterval": 30 } }
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## GeliΕtirme
|
|
264
|
+
|
|
265
|
+
### Yeni Tool Ekleme
|
|
266
|
+
|
|
267
|
+
```javascript
|
|
268
|
+
// plugins/vantuz/tools/myTool.js
|
|
269
|
+
export const myTool = {
|
|
270
|
+
name: 'my-tool',
|
|
271
|
+
async execute(params, context) {
|
|
272
|
+
const { api, memory, license } = context;
|
|
273
|
+
// ...
|
|
274
|
+
return { success: true, data: {} };
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// index.js'de register et
|
|
279
|
+
api.registerTool({
|
|
280
|
+
name: 'vantuz.mytool',
|
|
281
|
+
description: '...',
|
|
282
|
+
parameters: { ... },
|
|
283
|
+
handler: (params) => myTool.execute(params, context)
|
|
284
|
+
});
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Yeni Command Ekleme
|
|
288
|
+
|
|
289
|
+
```javascript
|
|
290
|
+
api.registerCommand({
|
|
291
|
+
name: 'mycommand',
|
|
292
|
+
description: 'AΓ§Δ±klama',
|
|
293
|
+
acceptsArgs: true,
|
|
294
|
+
handler: async (ctx) => {
|
|
295
|
+
return { text: 'YanΔ±t' };
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
```
|
package/onboard.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vantuz",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "Yapay Zeka Destekli E-Ticaret YΓΆnetim Platformu - 7 Pazaryeri + WhatsApp/Telegram",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
"fiyatlama",
|
|
37
37
|
"whatsapp",
|
|
38
38
|
"telegram",
|
|
39
|
-
"enterprise"
|
|
39
|
+
"enterprise",
|
|
40
|
+
"gateway",
|
|
41
|
+
"management",
|
|
42
|
+
"cli"
|
|
40
43
|
],
|
|
41
44
|
"author": {
|
|
42
45
|
"name": "Nuri Can AvΕar",
|
|
@@ -45,7 +48,7 @@
|
|
|
45
48
|
"license": "SEE LICENSE IN LICENSE",
|
|
46
49
|
"repository": {
|
|
47
50
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/nuricanavsar/vantuz.git"
|
|
51
|
+
"url": "git+https://github.com/nuricanavsar/vantuz.git"
|
|
49
52
|
},
|
|
50
53
|
"homepage": "https://vantuz.ai",
|
|
51
54
|
"bugs": {
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
"cors": "^2.8.6",
|
|
58
61
|
"dotenv": "^16.0.0",
|
|
59
62
|
"express": "^5.2.1",
|
|
63
|
+
"openclaw": "^2026.2.9",
|
|
60
64
|
"xml2js": "^0.6.2"
|
|
61
65
|
},
|
|
62
66
|
"devDependencies": {
|
|
@@ -73,9 +77,13 @@
|
|
|
73
77
|
"files": [
|
|
74
78
|
"cli.js",
|
|
75
79
|
"onboard.js",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
80
|
+
"core",
|
|
81
|
+
"server",
|
|
82
|
+
"platforms",
|
|
83
|
+
"plugins",
|
|
84
|
+
".openclaw",
|
|
85
|
+
"LICENSE",
|
|
78
86
|
"README.md",
|
|
79
|
-
"
|
|
87
|
+
"DOCS_TR.md"
|
|
80
88
|
]
|
|
81
89
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: 'Hepsiburada',
|
|
3
|
+
requiredFields: [
|
|
4
|
+
{ key: 'merchantId', label: 'Merchant ID' },
|
|
5
|
+
{ key: 'username', label: 'Username' },
|
|
6
|
+
{ key: 'password', label: 'Password' }
|
|
7
|
+
],
|
|
8
|
+
async getOrders(creds) {
|
|
9
|
+
// Stub
|
|
10
|
+
if (!creds.merchantId) return [];
|
|
11
|
+
return [
|
|
12
|
+
{ number: 'HB-998877', customer: 'Ahmet YΔ±lmaz', amount: '1250.00 TRY', status: 'Ready' }
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
};
|
package/platforms/n11.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const axios = require('axios');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
name: 'Trendyol',
|
|
5
|
+
requiredFields: [
|
|
6
|
+
{ key: 'supplierId', label: 'Supplier ID', env: 'TRENDYOL_SUPPLIER_ID' },
|
|
7
|
+
{ key: 'apiKey', label: 'API Key', env: 'TRENDYOL_API_KEY' },
|
|
8
|
+
{ key: 'apiSecret', label: 'API Secret', env: 'TRENDYOL_API_SECRET' }
|
|
9
|
+
],
|
|
10
|
+
|
|
11
|
+
// Kimlik doΔrulama testi
|
|
12
|
+
async testConnection(creds) {
|
|
13
|
+
if (!creds.supplierId || !creds.apiKey || !creds.apiSecret) {
|
|
14
|
+
throw new Error('Eksik kimlik bilgileri.');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Trendyol API'sinde basit bir ping endpoint'i olmadΔ±ΔΔ± iΓ§in orders'Δ± limit 1 ile Γ§ekerek test ediyoruz
|
|
18
|
+
// veya bilinen bir ΓΌrΓΌn sorgusu yapΔ±labilir.
|
|
19
|
+
try {
|
|
20
|
+
await this.getOrders(creds, { limit: 1 });
|
|
21
|
+
return true;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
throw new Error('BaΔlantΔ± baΕarΔ±sΔ±z: ' + (error.message || 'Bilinmeyen hata'));
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async getOrders(creds, options = {}) {
|
|
28
|
+
const auth = Buffer.from(`${creds.apiKey}:${creds.apiSecret}`).toString('base64');
|
|
29
|
+
const startDate = new Date();
|
|
30
|
+
startDate.setDate(startDate.getDate() - (options.days || 3));
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const url = `https://api.trendyol.com/sapigw/suppliers/${creds.supplierId}/orders`;
|
|
34
|
+
const response = await axios.get(url, {
|
|
35
|
+
headers: {
|
|
36
|
+
'Authorization': `Basic ${auth}`,
|
|
37
|
+
'User-Agent': `${creds.supplierId} - OmniMarketAI`
|
|
38
|
+
},
|
|
39
|
+
params: {
|
|
40
|
+
startDate: startDate.getTime(),
|
|
41
|
+
endDate: Date.now(),
|
|
42
|
+
orderBy: 'CreatedDate',
|
|
43
|
+
orderDir: 'DESC',
|
|
44
|
+
size: options.limit || 10
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return response.data.content.map(o => ({
|
|
49
|
+
id: o.orderNumber,
|
|
50
|
+
customer: `${o.customerFirstName} ${o.customerLastName}`,
|
|
51
|
+
total: `${o.totalPrice} ${o.currencyCode}`,
|
|
52
|
+
status: o.status,
|
|
53
|
+
date: new Date(o.createdDate).toLocaleDateString('tr-TR'),
|
|
54
|
+
platform: 'Trendyol'
|
|
55
|
+
}));
|
|
56
|
+
} catch (error) {
|
|
57
|
+
const msg = error.response ? JSON.stringify(error.response.data) : error.message;
|
|
58
|
+
throw new Error(`Trendyol API HatasΔ±: ${msg}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
package/server/app.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
|
|
2
|
+
import express from 'express';
|
|
3
|
+
import cors from 'cors';
|
|
4
|
+
import bodyParser from 'body-parser';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { getEngine } from '../core/engine.js';
|
|
8
|
+
import { getGateway } from '../core/gateway.js';
|
|
9
|
+
import { log } from '../core/ai-provider.js';
|
|
10
|
+
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = path.dirname(__filename);
|
|
13
|
+
|
|
14
|
+
const app = express();
|
|
15
|
+
const PORT = process.env.PORT || 3001;
|
|
16
|
+
|
|
17
|
+
// Middleware
|
|
18
|
+
app.use(cors());
|
|
19
|
+
app.use(bodyParser.json());
|
|
20
|
+
app.use(express.static(path.join(__dirname, 'public')));
|
|
21
|
+
|
|
22
|
+
// Engine Singleton
|
|
23
|
+
let engine = null;
|
|
24
|
+
const initEngine = async () => {
|
|
25
|
+
if (!engine) {
|
|
26
|
+
engine = await getEngine();
|
|
27
|
+
}
|
|
28
|
+
return engine;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
32
|
+
// API ROUTES
|
|
33
|
+
// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
34
|
+
|
|
35
|
+
// 1. Status & Health
|
|
36
|
+
app.get('/api/status', async (req, res) => {
|
|
37
|
+
const instance = await initEngine();
|
|
38
|
+
res.json(instance.getStatus());
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// 2. Products & Stock
|
|
42
|
+
app.get('/api/products', async (req, res) => {
|
|
43
|
+
try {
|
|
44
|
+
const instance = await initEngine();
|
|
45
|
+
const stocks = await instance.getStock();
|
|
46
|
+
res.json(stocks);
|
|
47
|
+
} catch (e) {
|
|
48
|
+
res.status(500).json({ error: e.message });
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// 3. Orders
|
|
53
|
+
app.get('/api/orders', async (req, res) => {
|
|
54
|
+
try {
|
|
55
|
+
const instance = await initEngine();
|
|
56
|
+
const orders = await instance.getOrders({ size: 50 });
|
|
57
|
+
res.json(orders);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
res.status(500).json({ error: e.message });
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// 4. AI Chat
|
|
64
|
+
app.post('/api/chat', async (req, res) => {
|
|
65
|
+
const { message } = req.body;
|
|
66
|
+
if (!message) return res.status(400).json({ error: 'Mesaj gerekli' });
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
const instance = await initEngine();
|
|
70
|
+
const response = await instance.chat(message);
|
|
71
|
+
res.json({ response });
|
|
72
|
+
} catch (e) {
|
|
73
|
+
res.status(500).json({ error: e.message });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// 5. Logs
|
|
78
|
+
app.get('/api/logs', async (req, res) => {
|
|
79
|
+
const { getLogs } = await import('../core/ai-provider.js');
|
|
80
|
+
res.json({ logs: getLogs(100) });
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 6. Gateway Status
|
|
84
|
+
app.get('/api/gateway', async (req, res) => {
|
|
85
|
+
try {
|
|
86
|
+
const gw = await getGateway();
|
|
87
|
+
const health = await gw.health();
|
|
88
|
+
res.json({
|
|
89
|
+
...gw.getInfo(),
|
|
90
|
+
health: health.success ? 'healthy' : 'unreachable',
|
|
91
|
+
healthData: health.data || null
|
|
92
|
+
});
|
|
93
|
+
} catch (e) {
|
|
94
|
+
res.status(500).json({ error: e.message });
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// 7. Channels Status
|
|
99
|
+
app.get('/api/channels', async (req, res) => {
|
|
100
|
+
try {
|
|
101
|
+
const instance = await initEngine();
|
|
102
|
+
const status = instance.getStatus();
|
|
103
|
+
res.json(status.channels || {});
|
|
104
|
+
} catch (e) {
|
|
105
|
+
res.status(500).json({ error: e.message });
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// 8. Doctor
|
|
110
|
+
app.get('/api/doctor', async (req, res) => {
|
|
111
|
+
try {
|
|
112
|
+
const instance = await initEngine();
|
|
113
|
+
const report = await instance.doctor();
|
|
114
|
+
res.json(report);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
res.status(500).json({ error: e.message });
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// Frontend Serve
|
|
121
|
+
app.get('*', (req, res) => {
|
|
122
|
+
if (req.path.startsWith('/api')) return res.status(404).json({ error: 'Not Found' });
|
|
123
|
+
res.sendFile(path.join(__dirname, 'public', 'index.html'));
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// Start Server
|
|
127
|
+
app.listen(PORT, () => {
|
|
128
|
+
console.log(`\nπ Vantuz API Sunucusu: http://localhost:${PORT}`);
|
|
129
|
+
log('INFO', `Sunucu ${PORT} portunda baΕlatΔ±ldΔ±`);
|
|
130
|
+
});
|