vantuz 3.4.2 → 3.5.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/.env.example +21 -0
- 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 +40 -0
- package/.windsurf/workflows/vantuz-dev.md +31 -0
- package/DOCS_TR.md +80 -0
- package/LICENSE +45 -45
- package/README.md +52 -21
- package/cli.js +685 -585
- package/config.js +733 -733
- package/core/agent-loop.js +190 -190
- package/core/ai-provider.js +298 -261
- package/core/automation.js +523 -523
- package/core/brand-analyst.js +101 -0
- package/core/channels.js +167 -167
- package/core/dashboard.js +230 -230
- package/core/database.js +135 -37
- package/core/eia-monitor.js +3 -1
- package/core/engine.js +648 -636
- package/core/gateway.js +447 -447
- package/core/learning.js +214 -214
- package/core/license.js +113 -0
- package/core/marketplace-adapter.js +168 -168
- package/core/memory.js +190 -190
- package/core/migrations/001-initial-schema.sql +1 -1
- package/core/queue.js +120 -120
- package/core/self-healer.js +314 -314
- package/core/unified-product.js +214 -214
- package/core/vision-service.js +113 -113
- package/index.js +217 -174
- package/modules/crm/sentiment-crm.js +231 -231
- package/modules/healer/listing-healer.js +201 -201
- package/modules/oracle/predictor.js +214 -214
- package/modules/researcher/agent.js +169 -169
- package/modules/team/agents/base.js +92 -92
- package/modules/team/agents/dev.js +33 -33
- package/modules/team/agents/josh.js +40 -40
- package/modules/team/agents/marketing.js +33 -33
- package/modules/team/agents/milo.js +36 -36
- package/modules/team/index.js +78 -78
- package/modules/team/shared-memory.js +87 -87
- package/modules/war-room/competitor-tracker.js +250 -250
- package/modules/war-room/pricing-engine.js +308 -308
- package/n11docs.md +1680 -0
- package/nodes/warehouse.js +238 -238
- package/onboard.js +1 -1
- package/openclawdocs.md +3 -0
- package/package.json +7 -5
- package/platforms/pttavm.js +14 -14
- package/plugins/vantuz/index.js +528 -528
- package/plugins/vantuz/memory/hippocampus.js +465 -465
- package/plugins/vantuz/package.json +20 -20
- package/plugins/vantuz/platforms/_template.js +118 -118
- package/plugins/vantuz/platforms/amazon.js +236 -236
- package/plugins/vantuz/platforms/ciceksepeti.js +166 -166
- package/plugins/vantuz/platforms/hepsiburada.js +180 -180
- package/plugins/vantuz/platforms/index.js +165 -165
- package/plugins/vantuz/platforms/n11.js +229 -229
- package/plugins/vantuz/platforms/pazarama.js +154 -154
- package/plugins/vantuz/platforms/pttavm.js +127 -127
- package/plugins/vantuz/platforms/trendyol.js +326 -326
- package/plugins/vantuz/services/alerts.js +253 -253
- package/plugins/vantuz/services/license.js +34 -34
- package/plugins/vantuz/services/scheduler.js +232 -232
- package/plugins/vantuz/tools/analytics.js +152 -152
- package/plugins/vantuz/tools/crossborder.js +187 -187
- package/plugins/vantuz/tools/nl-parser.js +211 -211
- package/plugins/vantuz/tools/product.js +110 -110
- package/plugins/vantuz/tools/quick-report.js +175 -175
- package/plugins/vantuz/tools/repricer.js +314 -314
- package/plugins/vantuz/tools/sentiment.js +115 -115
- package/plugins/vantuz/tools/vision.js +257 -257
- package/public.pem +9 -0
- package/server/app.js +260 -260
- package/server/public/index.html +514 -514
- package/start.bat +33 -33
- package/vantuz.sqlite +0 -0
- package/workspace/AGENTS.md +73 -0
- package/workspace/BRAND.md +29 -0
- package/workspace/SOUL.md +72 -0
- package/workspace/team/DECISIONS.md +3 -0
- package/workspace/team/GOALS.md +3 -0
- package/workspace/team/PROJECT_STATUS.md +3 -0
- package/workspace/team/agents/dev/SOUL.md +12 -0
- package/workspace/team/agents/josh/SOUL.md +12 -0
- package/workspace/team/agents/marketing/SOUL.md +12 -0
- package/workspace/team/agents/milo/SOUL.md +12 -0
- package/vantuz-3.3.4.tgz +0 -0
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 📊 HIZLI DURUM RAPORU
|
|
3
|
-
* Emoji bazlı özet raporlar
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { platformHub } from '../platforms/index.js';
|
|
7
|
-
|
|
8
|
-
export const quickReportTool = {
|
|
9
|
-
name: 'quick-report',
|
|
10
|
-
|
|
11
|
-
async execute(params, context) {
|
|
12
|
-
const { type = 'overview' } = params;
|
|
13
|
-
|
|
14
|
-
switch (type) {
|
|
15
|
-
case 'overview':
|
|
16
|
-
case 'ozet':
|
|
17
|
-
return await this.generateOverview(context);
|
|
18
|
-
|
|
19
|
-
case 'stock':
|
|
20
|
-
case 'stok':
|
|
21
|
-
return await this.generateStockReport(context);
|
|
22
|
-
|
|
23
|
-
case 'orders':
|
|
24
|
-
case 'siparis':
|
|
25
|
-
return await this.generateOrderReport(context);
|
|
26
|
-
|
|
27
|
-
case 'platforms':
|
|
28
|
-
case 'platformlar':
|
|
29
|
-
return this.generatePlatformStatus();
|
|
30
|
-
|
|
31
|
-
default:
|
|
32
|
-
return { success: false, error: 'Bilinmeyen rapor tipi' };
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
async generateOverview(context) {
|
|
37
|
-
const connected = platformHub.getConnected();
|
|
38
|
-
|
|
39
|
-
let report = '📊 **Günlük Özet**\n\n';
|
|
40
|
-
|
|
41
|
-
// Platform durumu
|
|
42
|
-
report += '🏪 **Platformlar**\n';
|
|
43
|
-
for (const platform of connected) {
|
|
44
|
-
report += ` ${platformHub.getIcon(platform)} ${platform}: ✅ Bağlı\n`;
|
|
45
|
-
}
|
|
46
|
-
report += '\n';
|
|
47
|
-
|
|
48
|
-
// Özet metrikler (placeholder - gerçek veriler API'den çekilmeli)
|
|
49
|
-
report += '📈 **Bugün**\n';
|
|
50
|
-
report += ' • Sipariş: 0 yeni\n';
|
|
51
|
-
report += ' • Ciro: ₺0\n';
|
|
52
|
-
report += ' • Stok Uyarı: 0 ürün\n';
|
|
53
|
-
report += '\n';
|
|
54
|
-
|
|
55
|
-
report += '💡 *Detay için: /rapor 7d*';
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
success: true,
|
|
59
|
-
report,
|
|
60
|
-
raw: { connectedPlatforms: connected }
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
async generateStockReport(context) {
|
|
65
|
-
const connected = platformHub.getConnected();
|
|
66
|
-
|
|
67
|
-
let report = '📦 **Stok Durumu**\n\n';
|
|
68
|
-
|
|
69
|
-
// Her platform için stok özeti
|
|
70
|
-
for (const platform of connected) {
|
|
71
|
-
const api = platformHub.resolve(platform);
|
|
72
|
-
if (!api) continue;
|
|
73
|
-
|
|
74
|
-
try {
|
|
75
|
-
const result = await api.getProducts({ page: 0, size: 100 });
|
|
76
|
-
if (result.success) {
|
|
77
|
-
const products = result.data.content || result.data.products || result.data || [];
|
|
78
|
-
|
|
79
|
-
const outOfStock = products.filter(p => (p.quantity || p.stock || 0) <= 0);
|
|
80
|
-
const lowStock = products.filter(p => {
|
|
81
|
-
const q = p.quantity || p.stock || 0;
|
|
82
|
-
return q > 0 && q <= 10;
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
report += `${platformHub.getIcon(platform)} **${platform}**\n`;
|
|
86
|
-
report += ` 📦 Toplam: ${products.length}\n`;
|
|
87
|
-
report += ` 🔴 Stok dışı: ${outOfStock.length}\n`;
|
|
88
|
-
report += ` 🟡 Düşük (≤10): ${lowStock.length}\n`;
|
|
89
|
-
report += '\n';
|
|
90
|
-
}
|
|
91
|
-
} catch (e) {
|
|
92
|
-
report += `${platformHub.getIcon(platform)} **${platform}**: ⚠️ Hata\n`;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return { success: true, report };
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
async generateOrderReport(context) {
|
|
100
|
-
const connected = platformHub.getConnected();
|
|
101
|
-
const today = new Date();
|
|
102
|
-
today.setHours(0, 0, 0, 0);
|
|
103
|
-
|
|
104
|
-
let report = '🛒 **Sipariş Durumu**\n\n';
|
|
105
|
-
let totalOrders = 0;
|
|
106
|
-
|
|
107
|
-
for (const platform of connected) {
|
|
108
|
-
const api = platformHub.resolve(platform);
|
|
109
|
-
if (!api) continue;
|
|
110
|
-
|
|
111
|
-
try {
|
|
112
|
-
const result = await api.getOrders({
|
|
113
|
-
startDate: today.toISOString(),
|
|
114
|
-
size: 100
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
if (result.success) {
|
|
118
|
-
const orders = result.data.content || result.data.orders || result.data || [];
|
|
119
|
-
totalOrders += orders.length;
|
|
120
|
-
|
|
121
|
-
const pending = orders.filter(o =>
|
|
122
|
-
['created', 'new', 'pending', 'yeni'].some(s =>
|
|
123
|
-
o.status?.toLowerCase()?.includes(s)
|
|
124
|
-
)
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
report += `${platformHub.getIcon(platform)} **${platform}**\n`;
|
|
128
|
-
report += ` 📋 Bugün: ${orders.length}\n`;
|
|
129
|
-
report += ` ⏳ Bekleyen: ${pending.length}\n`;
|
|
130
|
-
report += '\n';
|
|
131
|
-
}
|
|
132
|
-
} catch (e) {
|
|
133
|
-
report += `${platformHub.getIcon(platform)} **${platform}**: ⚠️ Hata\n`;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
report += `📊 **Toplam**: ${totalOrders} sipariş`;
|
|
138
|
-
|
|
139
|
-
return { success: true, report };
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
generatePlatformStatus() {
|
|
143
|
-
const status = platformHub.getStatus();
|
|
144
|
-
|
|
145
|
-
let report = '🔌 **Platform Bağlantıları**\n\n';
|
|
146
|
-
|
|
147
|
-
for (const [name, info] of Object.entries(status)) {
|
|
148
|
-
const statusIcon = info.connected ? '✅' : '⭕';
|
|
149
|
-
const statusText = info.connected ? 'Bağlı' : 'Bağlı değil';
|
|
150
|
-
report += `${info.icon} ${name}: ${statusIcon} ${statusText}\n`;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const connectedCount = Object.values(status).filter(s => s.connected).length;
|
|
154
|
-
report += `\n📊 ${connectedCount}/${Object.keys(status).length} platform aktif`;
|
|
155
|
-
|
|
156
|
-
return { success: true, report };
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Kolay erişim fonksiyonları
|
|
162
|
-
*/
|
|
163
|
-
export async function dailyOverview(context) {
|
|
164
|
-
return await quickReportTool.execute({ type: 'overview' }, context);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export async function stockStatus(context) {
|
|
168
|
-
return await quickReportTool.execute({ type: 'stock' }, context);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export async function orderStatus(context) {
|
|
172
|
-
return await quickReportTool.execute({ type: 'orders' }, context);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export default quickReportTool;
|
|
1
|
+
/**
|
|
2
|
+
* 📊 HIZLI DURUM RAPORU
|
|
3
|
+
* Emoji bazlı özet raporlar
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { platformHub } from '../platforms/index.js';
|
|
7
|
+
|
|
8
|
+
export const quickReportTool = {
|
|
9
|
+
name: 'quick-report',
|
|
10
|
+
|
|
11
|
+
async execute(params, context) {
|
|
12
|
+
const { type = 'overview' } = params;
|
|
13
|
+
|
|
14
|
+
switch (type) {
|
|
15
|
+
case 'overview':
|
|
16
|
+
case 'ozet':
|
|
17
|
+
return await this.generateOverview(context);
|
|
18
|
+
|
|
19
|
+
case 'stock':
|
|
20
|
+
case 'stok':
|
|
21
|
+
return await this.generateStockReport(context);
|
|
22
|
+
|
|
23
|
+
case 'orders':
|
|
24
|
+
case 'siparis':
|
|
25
|
+
return await this.generateOrderReport(context);
|
|
26
|
+
|
|
27
|
+
case 'platforms':
|
|
28
|
+
case 'platformlar':
|
|
29
|
+
return this.generatePlatformStatus();
|
|
30
|
+
|
|
31
|
+
default:
|
|
32
|
+
return { success: false, error: 'Bilinmeyen rapor tipi' };
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
async generateOverview(context) {
|
|
37
|
+
const connected = platformHub.getConnected();
|
|
38
|
+
|
|
39
|
+
let report = '📊 **Günlük Özet**\n\n';
|
|
40
|
+
|
|
41
|
+
// Platform durumu
|
|
42
|
+
report += '🏪 **Platformlar**\n';
|
|
43
|
+
for (const platform of connected) {
|
|
44
|
+
report += ` ${platformHub.getIcon(platform)} ${platform}: ✅ Bağlı\n`;
|
|
45
|
+
}
|
|
46
|
+
report += '\n';
|
|
47
|
+
|
|
48
|
+
// Özet metrikler (placeholder - gerçek veriler API'den çekilmeli)
|
|
49
|
+
report += '📈 **Bugün**\n';
|
|
50
|
+
report += ' • Sipariş: 0 yeni\n';
|
|
51
|
+
report += ' • Ciro: ₺0\n';
|
|
52
|
+
report += ' • Stok Uyarı: 0 ürün\n';
|
|
53
|
+
report += '\n';
|
|
54
|
+
|
|
55
|
+
report += '💡 *Detay için: /rapor 7d*';
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
success: true,
|
|
59
|
+
report,
|
|
60
|
+
raw: { connectedPlatforms: connected }
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
async generateStockReport(context) {
|
|
65
|
+
const connected = platformHub.getConnected();
|
|
66
|
+
|
|
67
|
+
let report = '📦 **Stok Durumu**\n\n';
|
|
68
|
+
|
|
69
|
+
// Her platform için stok özeti
|
|
70
|
+
for (const platform of connected) {
|
|
71
|
+
const api = platformHub.resolve(platform);
|
|
72
|
+
if (!api) continue;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
const result = await api.getProducts({ page: 0, size: 100 });
|
|
76
|
+
if (result.success) {
|
|
77
|
+
const products = result.data.content || result.data.products || result.data || [];
|
|
78
|
+
|
|
79
|
+
const outOfStock = products.filter(p => (p.quantity || p.stock || 0) <= 0);
|
|
80
|
+
const lowStock = products.filter(p => {
|
|
81
|
+
const q = p.quantity || p.stock || 0;
|
|
82
|
+
return q > 0 && q <= 10;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
report += `${platformHub.getIcon(platform)} **${platform}**\n`;
|
|
86
|
+
report += ` 📦 Toplam: ${products.length}\n`;
|
|
87
|
+
report += ` 🔴 Stok dışı: ${outOfStock.length}\n`;
|
|
88
|
+
report += ` 🟡 Düşük (≤10): ${lowStock.length}\n`;
|
|
89
|
+
report += '\n';
|
|
90
|
+
}
|
|
91
|
+
} catch (e) {
|
|
92
|
+
report += `${platformHub.getIcon(platform)} **${platform}**: ⚠️ Hata\n`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return { success: true, report };
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
async generateOrderReport(context) {
|
|
100
|
+
const connected = platformHub.getConnected();
|
|
101
|
+
const today = new Date();
|
|
102
|
+
today.setHours(0, 0, 0, 0);
|
|
103
|
+
|
|
104
|
+
let report = '🛒 **Sipariş Durumu**\n\n';
|
|
105
|
+
let totalOrders = 0;
|
|
106
|
+
|
|
107
|
+
for (const platform of connected) {
|
|
108
|
+
const api = platformHub.resolve(platform);
|
|
109
|
+
if (!api) continue;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const result = await api.getOrders({
|
|
113
|
+
startDate: today.toISOString(),
|
|
114
|
+
size: 100
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
if (result.success) {
|
|
118
|
+
const orders = result.data.content || result.data.orders || result.data || [];
|
|
119
|
+
totalOrders += orders.length;
|
|
120
|
+
|
|
121
|
+
const pending = orders.filter(o =>
|
|
122
|
+
['created', 'new', 'pending', 'yeni'].some(s =>
|
|
123
|
+
o.status?.toLowerCase()?.includes(s)
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
report += `${platformHub.getIcon(platform)} **${platform}**\n`;
|
|
128
|
+
report += ` 📋 Bugün: ${orders.length}\n`;
|
|
129
|
+
report += ` ⏳ Bekleyen: ${pending.length}\n`;
|
|
130
|
+
report += '\n';
|
|
131
|
+
}
|
|
132
|
+
} catch (e) {
|
|
133
|
+
report += `${platformHub.getIcon(platform)} **${platform}**: ⚠️ Hata\n`;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
report += `📊 **Toplam**: ${totalOrders} sipariş`;
|
|
138
|
+
|
|
139
|
+
return { success: true, report };
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
generatePlatformStatus() {
|
|
143
|
+
const status = platformHub.getStatus();
|
|
144
|
+
|
|
145
|
+
let report = '🔌 **Platform Bağlantıları**\n\n';
|
|
146
|
+
|
|
147
|
+
for (const [name, info] of Object.entries(status)) {
|
|
148
|
+
const statusIcon = info.connected ? '✅' : '⭕';
|
|
149
|
+
const statusText = info.connected ? 'Bağlı' : 'Bağlı değil';
|
|
150
|
+
report += `${info.icon} ${name}: ${statusIcon} ${statusText}\n`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const connectedCount = Object.values(status).filter(s => s.connected).length;
|
|
154
|
+
report += `\n📊 ${connectedCount}/${Object.keys(status).length} platform aktif`;
|
|
155
|
+
|
|
156
|
+
return { success: true, report };
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Kolay erişim fonksiyonları
|
|
162
|
+
*/
|
|
163
|
+
export async function dailyOverview(context) {
|
|
164
|
+
return await quickReportTool.execute({ type: 'overview' }, context);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export async function stockStatus(context) {
|
|
168
|
+
return await quickReportTool.execute({ type: 'stock' }, context);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export async function orderStatus(context) {
|
|
172
|
+
return await quickReportTool.execute({ type: 'orders' }, context);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export default quickReportTool;
|