vantuz 3.5.18 → 4.0.3
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/cli.js +9 -9
- package/config.js +6 -6
- package/core/agent-loop.js +6 -6
- package/core/agent.js +6 -6
- package/core/ai-copilot.js +461 -0
- package/core/ai-provider.js +60 -10
- package/core/automation.js +8 -8
- package/core/cache-manager.js +232 -0
- package/core/channels.js +8 -8
- package/core/dashboard.js +5 -5
- package/core/database-manager.js +331 -0
- package/core/database.js +124 -83
- package/core/eia-brain.js +2 -2
- package/core/eia-monitor.js +7 -7
- package/core/engine.js +24 -24
- package/core/error-handler.js +203 -0
- package/core/gateway.js +9 -9
- package/core/learning.js +7 -7
- package/core/license-manager.js +1 -1
- package/core/license.js +6 -6
- package/core/logger.js +228 -0
- package/core/marketplace-adapter.js +5 -5
- package/core/memory.js +6 -6
- package/core/multi-agent.js +180 -0
- package/core/openclaw-bridge.js +6 -6
- package/core/queue.js +3 -3
- package/core/scheduler.js +6 -6
- package/core/scrapers/Scraper.js +1 -1
- package/core/scrapers/TrendyolScraper.js +1 -1
- package/core/self-healer.js +8 -6
- package/core/unified-product.js +8 -8
- package/core/vector-db.js +5 -5
- package/core/vision-service.js +5 -5
- package/desktop/index.html +2804 -0
- package/desktop/main.js +97 -0
- package/desktop/preload.js +30 -0
- package/dev.sh +5 -0
- package/index.js +484 -116
- package/modules/crm/sentiment-crm.js +4 -4
- package/modules/healer/listing-healer.js +2 -2
- package/modules/oracle/predictor.js +5 -5
- package/modules/researcher/agent.js +4 -4
- package/modules/war-room/competitor-tracker.js +5 -5
- package/modules/war-room/pricing-engine.js +5 -5
- package/nodes/warehouse.js +5 -5
- package/onboard.js +1 -1
- package/package.json +11 -3
- package/pkg.json +26 -0
- package/plugins/vantuz/index.js +16 -17
- package/plugins/vantuz/memory/hippocampus.js +3 -3
- package/plugins/vantuz/platforms/_request.js +1 -1
- package/plugins/vantuz/platforms/_template.js +2 -2
- package/plugins/vantuz/platforms/amazon.js +3 -3
- package/plugins/vantuz/platforms/ciceksepeti.js +2 -2
- package/plugins/vantuz/platforms/hepsiburada.js +2 -2
- package/plugins/vantuz/platforms/index.js +9 -24
- package/plugins/vantuz/platforms/n11.js +3 -3
- package/plugins/vantuz/platforms/pazarama.js +2 -2
- package/plugins/vantuz/platforms/pttavm.js +2 -2
- package/plugins/vantuz/platforms/trendyol.js +3 -3
- package/plugins/vantuz/services/alerts.js +1 -1
- package/plugins/vantuz/services/scheduler.js +1 -1
- package/plugins/vantuz/tools/nl-parser.js +1 -1
- package/plugins/vantuz/tools/quick-report.js +2 -2
- package/plugins/vantuz/tools/repricer.js +1 -1
- package/plugins/vantuz/tools/vision.js +3 -3
- package/server/app.js +8 -8
- package/DOCS_TR.md +0 -80
- package/modules/team/agents/base.js +0 -92
- package/modules/team/agents/dev.js +0 -33
- package/modules/team/agents/josh.js +0 -40
- package/modules/team/agents/marketing.js +0 -33
- package/modules/team/agents/milo.js +0 -36
- package/modules/team/index.js +0 -78
- package/modules/team/shared-memory.js +0 -87
- package/n11docs.md +0 -1680
- package/openclawdocs.md +0 -3
- package/vantuz.sqlite +0 -0
- package/workspace/AGENTS.md +0 -73
- package/workspace/BRAND.md +0 -29
- package/workspace/SOUL.md +0 -72
- package/workspace/team/DECISIONS.md +0 -3
- package/workspace/team/GOALS.md +0 -3
- package/workspace/team/PROJECT_STATUS.md +0 -3
- package/workspace/team/agents/dev/SOUL.md +0 -12
- package/workspace/team/agents/josh/SOUL.md +0 -12
- package/workspace/team/agents/marketing/SOUL.md +0 -12
- package/workspace/team/agents/milo/SOUL.md +0 -12
package/desktop/main.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const { app, BrowserWindow, ipcMain, shell } = require('electron');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { startApiServer } = require('../index.js');
|
|
4
|
+
const isDev = process.env.NODE_ENV === 'development';
|
|
5
|
+
|
|
6
|
+
const API_PORT = process.env.VANTUZ_API_PORT || 3131;
|
|
7
|
+
const API_BASE = `http://localhost:${API_PORT}`;
|
|
8
|
+
let apiServer;
|
|
9
|
+
let mainWindow;
|
|
10
|
+
|
|
11
|
+
function createWindow() {
|
|
12
|
+
mainWindow = new BrowserWindow({
|
|
13
|
+
width: 1200,
|
|
14
|
+
height: 800,
|
|
15
|
+
minWidth: 900,
|
|
16
|
+
minHeight: 600,
|
|
17
|
+
frame: false,
|
|
18
|
+
transparent: false,
|
|
19
|
+
backgroundColor: '#0a0a0f',
|
|
20
|
+
webPreferences: {
|
|
21
|
+
nodeIntegration: false,
|
|
22
|
+
contextIsolation: true,
|
|
23
|
+
preload: path.join(__dirname, 'preload.js')
|
|
24
|
+
},
|
|
25
|
+
icon: path.join(__dirname, 'assets/icon.png')
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Desktop HTML'i yükle (TUI değil, ayrı arayüz)
|
|
29
|
+
const htmlPath = path.join(__dirname, 'index.html');
|
|
30
|
+
mainWindow.loadFile(htmlPath);
|
|
31
|
+
|
|
32
|
+
if (isDev) {
|
|
33
|
+
mainWindow.webContents.openDevTools();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Window kontrolleri
|
|
37
|
+
mainWindow.on('closed', () => {
|
|
38
|
+
mainWindow = null;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// IPC kontrolleri
|
|
42
|
+
ipcMain.handle('minimize', () => mainWindow.minimize());
|
|
43
|
+
ipcMain.handle('maximize', () => {
|
|
44
|
+
if (mainWindow.isMaximized()) {
|
|
45
|
+
mainWindow.unmaximize();
|
|
46
|
+
} else {
|
|
47
|
+
mainWindow.maximize();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
ipcMain.handle('close', () => mainWindow.close());
|
|
51
|
+
ipcMain.handle('getVersion', () => app.getVersion());
|
|
52
|
+
|
|
53
|
+
ipcMain.handle('api-get', async (event, endpoint) => {
|
|
54
|
+
const response = await fetch(`${API_BASE}${endpoint}`);
|
|
55
|
+
const data = await response.json().catch(() => ({}));
|
|
56
|
+
if (!response.ok) {
|
|
57
|
+
throw new Error(data.error || 'API hatası');
|
|
58
|
+
}
|
|
59
|
+
return data;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
ipcMain.handle('api-post', async (event, endpoint, payload = {}) => {
|
|
63
|
+
const response = await fetch(`${API_BASE}${endpoint}`, {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: { 'Content-Type': 'application/json' },
|
|
66
|
+
body: JSON.stringify(payload)
|
|
67
|
+
});
|
|
68
|
+
const data = await response.json().catch(() => ({}));
|
|
69
|
+
if (!response.ok) {
|
|
70
|
+
throw new Error(data.error || 'API hatası');
|
|
71
|
+
}
|
|
72
|
+
return data;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
ipcMain.handle('api-base', () => API_BASE);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
app.whenReady().then(async () => {
|
|
79
|
+
try {
|
|
80
|
+
apiServer = await startApiServer({ port: API_PORT });
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error('API sunucusu başlatılamadı:', e.message);
|
|
83
|
+
}
|
|
84
|
+
createWindow();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
app.on('window-all-closed', () => {
|
|
88
|
+
if (process.platform !== 'darwin') {
|
|
89
|
+
app.quit();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
app.on('activate', () => {
|
|
94
|
+
if (BrowserWindow.getAllWindows().length === 0) {
|
|
95
|
+
createWindow();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const { contextBridge, ipcRenderer } = require('electron');
|
|
2
|
+
|
|
3
|
+
// Güvenli köprü - renderer process'ten main process'e
|
|
4
|
+
contextBridge.exposeInMainWorld('vantuz', {
|
|
5
|
+
// Window kontrolleri
|
|
6
|
+
minimize: () => ipcRenderer.invoke('minimize'),
|
|
7
|
+
maximize: () => ipcRenderer.invoke('maximize'),
|
|
8
|
+
close: () => ipcRenderer.invoke('close'),
|
|
9
|
+
|
|
10
|
+
// Versiyon
|
|
11
|
+
getVersion: () => ipcRenderer.invoke('getVersion'),
|
|
12
|
+
|
|
13
|
+
// API çağrıları
|
|
14
|
+
api: {
|
|
15
|
+
get: (endpoint) => ipcRenderer.invoke('api-get', endpoint),
|
|
16
|
+
post: (endpoint, data) => ipcRenderer.invoke('api-post', endpoint, data),
|
|
17
|
+
getStats: () => ipcRenderer.invoke('api-get', '/api/stats'),
|
|
18
|
+
getOrders: () => ipcRenderer.invoke('api-get', '/api/orders'),
|
|
19
|
+
getProducts: () => ipcRenderer.invoke('api-get', '/api/products'),
|
|
20
|
+
getStores: () => ipcRenderer.invoke('api-get', '/api/stores'),
|
|
21
|
+
sendChatMessage: (message) => ipcRenderer.invoke('api-post', '/api/chat', { message })
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
apiBase: () => ipcRenderer.invoke('api-base'),
|
|
25
|
+
|
|
26
|
+
// Terminal çıktısı
|
|
27
|
+
onTerminalOutput: (callback) => {
|
|
28
|
+
ipcRenderer.on('terminal-output', (event, data) => callback(data));
|
|
29
|
+
}
|
|
30
|
+
});
|