vantuz 3.4.1 → 3.5.0

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.
Files changed (70) hide show
  1. package/LICENSE +45 -45
  2. package/admin-keygen.js +51 -0
  3. package/cli.js +685 -585
  4. package/config.js +733 -733
  5. package/core/agent-loop.js +190 -190
  6. package/core/ai-provider.js +298 -261
  7. package/core/automation.js +523 -523
  8. package/core/brand-analyst.js +101 -0
  9. package/core/channels.js +167 -167
  10. package/core/dashboard.js +230 -230
  11. package/core/database.js +135 -36
  12. package/core/eia-monitor.js +3 -1
  13. package/core/engine.js +648 -636
  14. package/core/gateway.js +447 -447
  15. package/core/learning.js +214 -214
  16. package/core/license.js +113 -0
  17. package/core/marketplace-adapter.js +168 -168
  18. package/core/memory.js +190 -190
  19. package/core/migrations/001-initial-schema.sql +1 -1
  20. package/core/queue.js +120 -120
  21. package/core/self-healer.js +314 -314
  22. package/core/unified-product.js +214 -214
  23. package/core/vision-service.js +113 -113
  24. package/index.js +217 -174
  25. package/modules/crm/sentiment-crm.js +231 -231
  26. package/modules/healer/listing-healer.js +201 -201
  27. package/modules/oracle/predictor.js +214 -214
  28. package/modules/researcher/agent.js +169 -169
  29. package/modules/team/agents/base.js +92 -92
  30. package/modules/team/agents/dev.js +33 -33
  31. package/modules/team/agents/josh.js +40 -40
  32. package/modules/team/agents/marketing.js +33 -33
  33. package/modules/team/agents/milo.js +36 -36
  34. package/modules/team/index.js +78 -78
  35. package/modules/team/shared-memory.js +87 -87
  36. package/modules/war-room/competitor-tracker.js +250 -250
  37. package/modules/war-room/pricing-engine.js +308 -308
  38. package/nodes/warehouse.js +238 -238
  39. package/onboard.js +1 -1
  40. package/package.json +7 -6
  41. package/platforms/pttavm.js +14 -14
  42. package/plugins/vantuz/index.js +528 -528
  43. package/plugins/vantuz/memory/hippocampus.js +465 -464
  44. package/plugins/vantuz/package.json +20 -20
  45. package/plugins/vantuz/platforms/_template.js +118 -118
  46. package/plugins/vantuz/platforms/amazon.js +236 -236
  47. package/plugins/vantuz/platforms/ciceksepeti.js +166 -166
  48. package/plugins/vantuz/platforms/hepsiburada.js +180 -180
  49. package/plugins/vantuz/platforms/index.js +165 -165
  50. package/plugins/vantuz/platforms/n11.js +229 -229
  51. package/plugins/vantuz/platforms/pazarama.js +154 -154
  52. package/plugins/vantuz/platforms/pttavm.js +127 -127
  53. package/plugins/vantuz/platforms/trendyol.js +326 -326
  54. package/plugins/vantuz/services/alerts.js +253 -253
  55. package/plugins/vantuz/services/license.js +34 -34
  56. package/plugins/vantuz/services/scheduler.js +232 -232
  57. package/plugins/vantuz/tools/analytics.js +152 -152
  58. package/plugins/vantuz/tools/crossborder.js +187 -187
  59. package/plugins/vantuz/tools/nl-parser.js +211 -211
  60. package/plugins/vantuz/tools/product.js +110 -110
  61. package/plugins/vantuz/tools/quick-report.js +175 -175
  62. package/plugins/vantuz/tools/repricer.js +314 -314
  63. package/plugins/vantuz/tools/sentiment.js +115 -115
  64. package/plugins/vantuz/tools/vision.js +257 -257
  65. package/private.pem +28 -0
  66. package/public.pem +9 -0
  67. package/server/app.js +260 -260
  68. package/server/public/index.html +514 -514
  69. package/start.bat +33 -33
  70. package/vantuz.sqlite +0 -0
@@ -1,169 +1,169 @@
1
- // modules/researcher/agent.js
2
- // Research Agent for Vantuz OS V2
3
- // Performs web research on demand, summarizes findings, stores in memory.
4
-
5
- import axios from 'axios';
6
- import { log } from '../../core/ai-provider.js';
7
- import { getMemory } from '../../core/memory.js';
8
-
9
- // ═══════════════════════════════════════════════════════════════════════════
10
- // WEB SEARCH PROVIDERS
11
- // ═══════════════════════════════════════════════════════════════════════════
12
-
13
- async function searchBrave(query, apiKey) {
14
- const response = await axios.get('https://api.search.brave.com/res/v1/web/search', {
15
- params: { q: query, count: 5 },
16
- headers: { 'X-Subscription-Token': apiKey }
17
- });
18
- return (response.data.web?.results || []).map(r => ({
19
- title: r.title,
20
- url: r.url,
21
- snippet: r.description
22
- }));
23
- }
24
-
25
- async function searchGoogle(query, apiKey, cx) {
26
- const response = await axios.get('https://www.googleapis.com/customsearch/v1', {
27
- params: { q: query, key: apiKey, cx, num: 5 }
28
- });
29
- return (response.data.items || []).map(r => ({
30
- title: r.title,
31
- url: r.link,
32
- snippet: r.snippet
33
- }));
34
- }
35
-
36
- // Fallback: No API — use AI's existing knowledge
37
- async function searchFallback(query) {
38
- return [{
39
- title: 'AI Bilgi Tabanı',
40
- url: 'internal',
41
- snippet: `"${query}" hakkında web araması yapılamadı. API anahtarı eksik. AI bilgisiyle yanıt veriliyor.`
42
- }];
43
- }
44
-
45
- // ═══════════════════════════════════════════════════════════════════════════
46
- // RESEARCH AGENT
47
- // ═══════════════════════════════════════════════════════════════════════════
48
-
49
- class ResearchAgent {
50
- constructor(config = {}) {
51
- this.braveApiKey = config.braveApiKey || process.env.BRAVE_SEARCH_API_KEY || null;
52
- this.googleApiKey = config.googleApiKey || process.env.GOOGLE_SEARCH_API_KEY || null;
53
- this.googleCx = config.googleCx || process.env.GOOGLE_SEARCH_CX || null;
54
- this.aiChat = config.aiChat || null; // AI chat function for summarization
55
- this.history = [];
56
- log('INFO', 'ResearchAgent initialized', {
57
- brave: !!this.braveApiKey,
58
- google: !!this.googleApiKey
59
- });
60
- }
61
-
62
- /**
63
- * Set the AI chat function for summarization.
64
- */
65
- setAiChat(fn) {
66
- this.aiChat = fn;
67
- }
68
-
69
- /**
70
- * Perform a research query.
71
- * @param {string} query - The research question.
72
- * @returns {{ query, results, summary, savedToMemory }}
73
- */
74
- async research(query) {
75
- log('INFO', `🔍 Researching: "${query}"`);
76
-
77
- // Step 1: Web search
78
- let results;
79
- try {
80
- if (this.braveApiKey) {
81
- results = await searchBrave(query, this.braveApiKey);
82
- } else if (this.googleApiKey && this.googleCx) {
83
- results = await searchGoogle(query, this.googleApiKey, this.googleCx);
84
- } else {
85
- results = await searchFallback(query);
86
- }
87
- } catch (e) {
88
- log('ERROR', 'Web search failed', { error: e.message });
89
- results = await searchFallback(query);
90
- }
91
-
92
- // Step 2: AI summarization
93
- let summary = '';
94
- if (this.aiChat && results.length > 0) {
95
- const context = results.map((r, i) =>
96
- `${i + 1}. ${r.title}\n ${r.snippet}\n Kaynak: ${r.url}`
97
- ).join('\n\n');
98
-
99
- const prompt = `Şu araştırma sorusu için web sonuçlarını analiz et ve 3 maddelik özet yap. Türkçe yanıtla.
100
-
101
- Soru: "${query}"
102
-
103
- Web Sonuçları:
104
- ${context}
105
-
106
- Formatın:
107
- 1. [Ana bulgu]
108
- 2. [Ana bulgu]
109
- 3. [Ana bulgu]
110
-
111
- Kaynak: [URL listesi]`;
112
-
113
- try {
114
- summary = await this.aiChat(prompt);
115
- } catch (e) {
116
- summary = `Özet oluşturulamadı: ${e.message}`;
117
- }
118
- } else {
119
- summary = results.map(r => `• ${r.title}: ${r.snippet}`).join('\n');
120
- }
121
-
122
- // Step 3: Save to memory
123
- let savedToMemory = false;
124
- try {
125
- const memory = getMemory();
126
- memory.remember(`Araştırma: "${query}" — ${summary.substring(0, 200)}...`, 'research');
127
- savedToMemory = true;
128
- } catch (e) { /* ignore */ }
129
-
130
- const report = {
131
- query,
132
- results,
133
- summary,
134
- savedToMemory,
135
- timestamp: new Date().toISOString()
136
- };
137
-
138
- this.history.push(report);
139
- if (this.history.length > 50) this.history = this.history.slice(-50);
140
-
141
- log('INFO', `Research complete: "${query}"`, { resultCount: results.length });
142
- return report;
143
- }
144
-
145
- /**
146
- * Get previous research results.
147
- */
148
- getHistory(limit = 10) {
149
- return this.history.slice(-limit);
150
- }
151
-
152
- getStatus() {
153
- return {
154
- provider: this.braveApiKey ? 'Brave' : this.googleApiKey ? 'Google' : 'Fallback (AI)',
155
- researchCount: this.history.length
156
- };
157
- }
158
- }
159
-
160
- let researcherInstance = null;
161
-
162
- export function getResearchAgent(config = {}) {
163
- if (!researcherInstance) {
164
- researcherInstance = new ResearchAgent(config);
165
- }
166
- return researcherInstance;
167
- }
168
-
169
- export default ResearchAgent;
1
+ // modules/researcher/agent.js
2
+ // Research Agent for Vantuz OS V2
3
+ // Performs web research on demand, summarizes findings, stores in memory.
4
+
5
+ import axios from 'axios';
6
+ import { log } from '../../core/ai-provider.js';
7
+ import { getMemory } from '../../core/memory.js';
8
+
9
+ // ═══════════════════════════════════════════════════════════════════════════
10
+ // WEB SEARCH PROVIDERS
11
+ // ═══════════════════════════════════════════════════════════════════════════
12
+
13
+ async function searchBrave(query, apiKey) {
14
+ const response = await axios.get('https://api.search.brave.com/res/v1/web/search', {
15
+ params: { q: query, count: 5 },
16
+ headers: { 'X-Subscription-Token': apiKey }
17
+ });
18
+ return (response.data.web?.results || []).map(r => ({
19
+ title: r.title,
20
+ url: r.url,
21
+ snippet: r.description
22
+ }));
23
+ }
24
+
25
+ async function searchGoogle(query, apiKey, cx) {
26
+ const response = await axios.get('https://www.googleapis.com/customsearch/v1', {
27
+ params: { q: query, key: apiKey, cx, num: 5 }
28
+ });
29
+ return (response.data.items || []).map(r => ({
30
+ title: r.title,
31
+ url: r.link,
32
+ snippet: r.snippet
33
+ }));
34
+ }
35
+
36
+ // Fallback: No API — use AI's existing knowledge
37
+ async function searchFallback(query) {
38
+ return [{
39
+ title: 'AI Bilgi Tabanı',
40
+ url: 'internal',
41
+ snippet: `"${query}" hakkında web araması yapılamadı. API anahtarı eksik. AI bilgisiyle yanıt veriliyor.`
42
+ }];
43
+ }
44
+
45
+ // ═══════════════════════════════════════════════════════════════════════════
46
+ // RESEARCH AGENT
47
+ // ═══════════════════════════════════════════════════════════════════════════
48
+
49
+ class ResearchAgent {
50
+ constructor(config = {}) {
51
+ this.braveApiKey = config.braveApiKey || process.env.BRAVE_SEARCH_API_KEY || null;
52
+ this.googleApiKey = config.googleApiKey || process.env.GOOGLE_SEARCH_API_KEY || null;
53
+ this.googleCx = config.googleCx || process.env.GOOGLE_SEARCH_CX || null;
54
+ this.aiChat = config.aiChat || null; // AI chat function for summarization
55
+ this.history = [];
56
+ log('INFO', 'ResearchAgent initialized', {
57
+ brave: !!this.braveApiKey,
58
+ google: !!this.googleApiKey
59
+ });
60
+ }
61
+
62
+ /**
63
+ * Set the AI chat function for summarization.
64
+ */
65
+ setAiChat(fn) {
66
+ this.aiChat = fn;
67
+ }
68
+
69
+ /**
70
+ * Perform a research query.
71
+ * @param {string} query - The research question.
72
+ * @returns {{ query, results, summary, savedToMemory }}
73
+ */
74
+ async research(query) {
75
+ log('INFO', `🔍 Researching: "${query}"`);
76
+
77
+ // Step 1: Web search
78
+ let results;
79
+ try {
80
+ if (this.braveApiKey) {
81
+ results = await searchBrave(query, this.braveApiKey);
82
+ } else if (this.googleApiKey && this.googleCx) {
83
+ results = await searchGoogle(query, this.googleApiKey, this.googleCx);
84
+ } else {
85
+ results = await searchFallback(query);
86
+ }
87
+ } catch (e) {
88
+ log('ERROR', 'Web search failed', { error: e.message });
89
+ results = await searchFallback(query);
90
+ }
91
+
92
+ // Step 2: AI summarization
93
+ let summary = '';
94
+ if (this.aiChat && results.length > 0) {
95
+ const context = results.map((r, i) =>
96
+ `${i + 1}. ${r.title}\n ${r.snippet}\n Kaynak: ${r.url}`
97
+ ).join('\n\n');
98
+
99
+ const prompt = `Şu araştırma sorusu için web sonuçlarını analiz et ve 3 maddelik özet yap. Türkçe yanıtla.
100
+
101
+ Soru: "${query}"
102
+
103
+ Web Sonuçları:
104
+ ${context}
105
+
106
+ Formatın:
107
+ 1. [Ana bulgu]
108
+ 2. [Ana bulgu]
109
+ 3. [Ana bulgu]
110
+
111
+ Kaynak: [URL listesi]`;
112
+
113
+ try {
114
+ summary = await this.aiChat(prompt);
115
+ } catch (e) {
116
+ summary = `Özet oluşturulamadı: ${e.message}`;
117
+ }
118
+ } else {
119
+ summary = results.map(r => `• ${r.title}: ${r.snippet}`).join('\n');
120
+ }
121
+
122
+ // Step 3: Save to memory
123
+ let savedToMemory = false;
124
+ try {
125
+ const memory = getMemory();
126
+ memory.remember(`Araştırma: "${query}" — ${summary.substring(0, 200)}...`, 'research');
127
+ savedToMemory = true;
128
+ } catch (e) { /* ignore */ }
129
+
130
+ const report = {
131
+ query,
132
+ results,
133
+ summary,
134
+ savedToMemory,
135
+ timestamp: new Date().toISOString()
136
+ };
137
+
138
+ this.history.push(report);
139
+ if (this.history.length > 50) this.history = this.history.slice(-50);
140
+
141
+ log('INFO', `Research complete: "${query}"`, { resultCount: results.length });
142
+ return report;
143
+ }
144
+
145
+ /**
146
+ * Get previous research results.
147
+ */
148
+ getHistory(limit = 10) {
149
+ return this.history.slice(-limit);
150
+ }
151
+
152
+ getStatus() {
153
+ return {
154
+ provider: this.braveApiKey ? 'Brave' : this.googleApiKey ? 'Google' : 'Fallback (AI)',
155
+ researchCount: this.history.length
156
+ };
157
+ }
158
+ }
159
+
160
+ let researcherInstance = null;
161
+
162
+ export function getResearchAgent(config = {}) {
163
+ if (!researcherInstance) {
164
+ researcherInstance = new ResearchAgent(config);
165
+ }
166
+ return researcherInstance;
167
+ }
168
+
169
+ export default ResearchAgent;
@@ -1,92 +1,92 @@
1
- // modules/team/agents/base.js
2
- import fs from 'fs';
3
- import path from 'path';
4
- import { chat, log } from '../../core/ai-provider.js';
5
- import sharedMemory from '../shared-memory.js';
6
-
7
- export class BaseAgent {
8
- constructor(name, role, context = {}) {
9
- this.name = name.toLowerCase();
10
- this.displayName = name;
11
- this.role = role;
12
- this.context = context; // API, config, etc.
13
- this.agentDir = sharedMemory.getAgentDir(this.name);
14
-
15
- this.ensureSoul();
16
- }
17
-
18
- ensureSoul() {
19
- const soulPath = path.join(this.agentDir, 'SOUL.md');
20
- if (!fs.existsSync(soulPath)) {
21
- const defaultSoul = `# SOUL.md — ${this.displayName}
22
-
23
- Sen ${this.displayName}, ${this.role} rolündesin.
24
-
25
- ## Sorumlulukların
26
- - [Buraya sorumlulukları girin]
27
-
28
- ## Kişilik
29
- - Profesyonel, verimli.
30
-
31
- ## Kanal
32
- - Telegram/CLI (@${this.name} yanıt verir)
33
- `;
34
- fs.writeFileSync(soulPath, defaultSoul, 'utf-8');
35
- }
36
- }
37
-
38
- getSoul() {
39
- return fs.readFileSync(path.join(this.agentDir, 'SOUL.md'), 'utf-8');
40
- }
41
-
42
- async getSystemPrompt() {
43
- const shared = sharedMemory.getEverything();
44
- const soul = this.getSoul();
45
-
46
- return `${soul}
47
-
48
- ## TAKIM PAYLAŞILAN BAĞLAMI
49
- Sen çoklu-ajan takımının bir parçasısın. Aşağıdaki paylaşılan belgelere erişimin var:
50
-
51
- ### HEDEFLER (GOALS)
52
- ${shared.goals}
53
-
54
- ### PROJE DURUMU (STATUS)
55
- ${shared.status}
56
-
57
- ### KARAR GÜNLÜĞÜ (DECISIONS)
58
- ${shared.decisions}
59
-
60
- ## TALİMATLAR
61
- 1. SOUL.md ve Rolüne uygun hareket et.
62
- 2. Önemli bir karar alırsan, DECISIONS.md dosyasını güncellemeyi talep et.
63
- 3. Eğer başka bir ajanın uzmanlığına ihtiyacın varsa, yanıtında şu formatı kullan:
64
- `[DELEGATE: AjanIsmi Soru veya Görev]`
65
- Örnek: `[DELEGATE: Josh iPhone kılıflarının kar marjını kontrol et]`
66
- 4. Kısa ve öz ol.`;
67
- }
68
-
69
- async think(userMessage, conversationHistory = []) {
70
- try {
71
- const systemPrompt = await this.getSystemPrompt();
72
-
73
- // Format history for the AI provider if needed, or just append to prompt
74
- // For now, we rely on the provider's handling or just send the current message + context
75
-
76
- const response = await chat(userMessage, {
77
- aiProvider: process.env.VANTUZ_AI_PROVIDER || 'gemini',
78
- systemContext: systemPrompt
79
- }, process.env);
80
-
81
- return response;
82
- } catch (error) {
83
- log('ERROR', `Agent ${this.displayName} crashed`, { error: error.message });
84
- return `I encountered an error: ${error.message}`;
85
- }
86
- }
87
-
88
- async process(message) {
89
- log('INFO', `Agent ${this.displayName} processing message`);
90
- return await this.think(message);
91
- }
92
- }
1
+ // modules/team/agents/base.js
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import { chat, log } from '../../../core/ai-provider.js';
5
+ import sharedMemory from '../shared-memory.js';
6
+
7
+ export class BaseAgent {
8
+ constructor(name, role, context = {}) {
9
+ this.name = name.toLowerCase();
10
+ this.displayName = name;
11
+ this.role = role;
12
+ this.context = context; // API, config, etc.
13
+ this.agentDir = sharedMemory.getAgentDir(this.name);
14
+
15
+ this.ensureSoul();
16
+ }
17
+
18
+ ensureSoul() {
19
+ const soulPath = path.join(this.agentDir, 'SOUL.md');
20
+ if (!fs.existsSync(soulPath)) {
21
+ const defaultSoul = `# SOUL.md — ${this.displayName}
22
+
23
+ Sen ${this.displayName}, ${this.role} rolündesin.
24
+
25
+ ## Sorumlulukların
26
+ - [Buraya sorumlulukları girin]
27
+
28
+ ## Kişilik
29
+ - Profesyonel, verimli.
30
+
31
+ ## Kanal
32
+ - Telegram/CLI (@${this.name} yanıt verir)
33
+ `;
34
+ fs.writeFileSync(soulPath, defaultSoul, 'utf-8');
35
+ }
36
+ }
37
+
38
+ getSoul() {
39
+ return fs.readFileSync(path.join(this.agentDir, 'SOUL.md'), 'utf-8');
40
+ }
41
+
42
+ async getSystemPrompt() {
43
+ const shared = sharedMemory.getEverything();
44
+ const soul = this.getSoul();
45
+
46
+ return `${soul}
47
+
48
+ ## TAKIM PAYLAŞILAN BAĞLAMI
49
+ Sen çoklu-ajan takımının bir parçasısın. Aşağıdaki paylaşılan belgelere erişimin var:
50
+
51
+ ### HEDEFLER (GOALS)
52
+ ${shared.goals}
53
+
54
+ ### PROJE DURUMU (STATUS)
55
+ ${shared.status}
56
+
57
+ ### KARAR GÜNLÜĞÜ (DECISIONS)
58
+ ${shared.decisions}
59
+
60
+ ## TALİMATLAR
61
+ 1. SOUL.md ve Rolüne uygun hareket et.
62
+ 2. Önemli bir karar alırsan, DECISIONS.md dosyasını güncellemeyi talep et.
63
+ 3. Eğer başka bir ajanın uzmanlığına ihtiyacın varsa, yanıtında şu formatı kullan:
64
+ \`[DELEGATE: AjanIsmi Soru veya Görev]\`
65
+ Örnek: \`[DELEGATE: Josh iPhone kılıflarının kar marjını kontrol et]\`
66
+ 4. Kısa ve öz ol.`;
67
+ }
68
+
69
+ async think(userMessage, conversationHistory = []) {
70
+ try {
71
+ const systemPrompt = await this.getSystemPrompt();
72
+
73
+ // Format history for the AI provider if needed, or just append to prompt
74
+ // For now, we rely on the provider's handling or just send the current message + context
75
+
76
+ const response = await chat(userMessage, {
77
+ aiProvider: process.env.VANTUZ_AI_PROVIDER || 'gemini',
78
+ systemContext: systemPrompt
79
+ }, process.env);
80
+
81
+ return response;
82
+ } catch (error) {
83
+ log('ERROR', `Agent ${this.displayName} crashed`, { error: error.message });
84
+ return `I encountered an error: ${error.message}`;
85
+ }
86
+ }
87
+
88
+ async process(message) {
89
+ log('INFO', `Agent ${this.displayName} processing message`);
90
+ return await this.think(message);
91
+ }
92
+ }
@@ -1,33 +1,33 @@
1
- // modules/team/agents/dev.js
2
- import { BaseAgent } from './base.js';
3
-
4
- export class DevAgent extends BaseAgent {
5
- constructor(api) {
6
- super('Dev', 'Dev Agent', { api });
7
- }
8
-
9
- async getSystemPrompt() {
10
- const base = await super.getSystemPrompt();
11
- return `${base}
12
-
13
- ## SENİN ÖZEL ROLÜN: YAZILIM AJANI (DEV)
14
- - Titiz, detaycı ve güvenlik bilinci yüksek birisin.
15
- - **Sorumlulukların**:
16
- - Sistem sağlığını (loglar, hatalar) izlemek.
17
- - Yeni özelliklerin teknik uygulamasını incelemek.
18
- - Teknik borçları yönetmek.
19
- - **Araçlar**:
20
- - Log Analizi
21
- - Konfigürasyon Yönetimi
22
-
23
- ## GÜNLÜK RUTİN
24
- - Sistem loglarında hata olup olmadığını kontrol et.
25
- - API bağlantılarını doğrula.
26
- `;
27
- }
28
-
29
- async checkSystemHealth() {
30
- // Placeholder for health check logic
31
- return { status: 'healthy', timestamp: new Date() };
32
- }
33
- }
1
+ // modules/team/agents/dev.js
2
+ import { BaseAgent } from './base.js';
3
+
4
+ export class DevAgent extends BaseAgent {
5
+ constructor(api) {
6
+ super('Dev', 'Dev Agent', { api });
7
+ }
8
+
9
+ async getSystemPrompt() {
10
+ const base = await super.getSystemPrompt();
11
+ return `${base}
12
+
13
+ ## SENİN ÖZEL ROLÜN: YAZILIM AJANI (DEV)
14
+ - Titiz, detaycı ve güvenlik bilinci yüksek birisin.
15
+ - **Sorumlulukların**:
16
+ - Sistem sağlığını (loglar, hatalar) izlemek.
17
+ - Yeni özelliklerin teknik uygulamasını incelemek.
18
+ - Teknik borçları yönetmek.
19
+ - **Araçlar**:
20
+ - Log Analizi
21
+ - Konfigürasyon Yönetimi
22
+
23
+ ## GÜNLÜK RUTİN
24
+ - Sistem loglarında hata olup olmadığını kontrol et.
25
+ - API bağlantılarını doğrula.
26
+ `;
27
+ }
28
+
29
+ async checkSystemHealth() {
30
+ // Placeholder for health check logic
31
+ return { status: 'healthy', timestamp: new Date() };
32
+ }
33
+ }
@@ -1,40 +1,40 @@
1
- // modules/team/agents/josh.js
2
- import { BaseAgent } from './base.js';
3
- import { repricerTool } from '../../plugins/vantuz/tools/repricer.js';
4
- import { analyticsTool } from '../../plugins/vantuz/tools/analytics.js';
5
-
6
- export class JoshAgent extends BaseAgent {
7
- constructor(api) {
8
- super('Josh', 'Business & Growth Analyst', { api });
9
- }
10
-
11
- async getSystemPrompt() {
12
- const base = await super.getSystemPrompt();
13
- return `${base}
14
-
15
- ## SENİN ÖZEL ROLÜN: JOSH (İŞ ANALİSTİ)
16
- - Sen sayılarla konuşan adamsın. Pragmatik, sonuç odaklı.
17
- - **Sorumlulukların**:
18
- - Ciro, kar ve marjları takip etmek.
19
- - Rakip fiyatlandırmasını izlemek.
20
- - Fiyatlandırma stratejileri önermek.
21
- - **Araçlar**:
22
- - Rakip Analizi (Repricer)
23
- - Satış Raporları (Analytics)
24
-
25
- ## GÜNLÜK RUTİN
26
- - Sabah 09:00'da temel metrikleri çek.
27
- - Kar marjları hedefin altına düşerse takımı uyar.
28
- `;
29
- }
30
-
31
- // Agent-specific actions
32
- async checkCompetitors(barcode) {
33
- // Use existing Vantuz tools
34
- return await repricerTool.analyzeCompetitors(barcode, this.context);
35
- }
36
-
37
- async getSalesReport() {
38
- return await analyticsTool.getSalesReport('7d', this.context);
39
- }
40
- }
1
+ // modules/team/agents/josh.js
2
+ import { BaseAgent } from './base.js';
3
+ import { repricerTool } from '../../../plugins/vantuz/tools/repricer.js';
4
+ import { analyticsTool } from '../../../plugins/vantuz/tools/analytics.js';
5
+
6
+ export class JoshAgent extends BaseAgent {
7
+ constructor(api) {
8
+ super('Josh', 'Business & Growth Analyst', { api });
9
+ }
10
+
11
+ async getSystemPrompt() {
12
+ const base = await super.getSystemPrompt();
13
+ return `${base}
14
+
15
+ ## SENİN ÖZEL ROLÜN: JOSH (İŞ ANALİSTİ)
16
+ - Sen sayılarla konuşan adamsın. Pragmatik, sonuç odaklı.
17
+ - **Sorumlulukların**:
18
+ - Ciro, kar ve marjları takip etmek.
19
+ - Rakip fiyatlandırmasını izlemek.
20
+ - Fiyatlandırma stratejileri önermek.
21
+ - **Araçlar**:
22
+ - Rakip Analizi (Repricer)
23
+ - Satış Raporları (Analytics)
24
+
25
+ ## GÜNLÜK RUTİN
26
+ - Sabah 09:00'da temel metrikleri çek.
27
+ - Kar marjları hedefin altına düşerse takımı uyar.
28
+ `;
29
+ }
30
+
31
+ // Agent-specific actions
32
+ async checkCompetitors(barcode) {
33
+ // Use existing Vantuz tools
34
+ return await repricerTool.analyzeCompetitors(barcode, this.context);
35
+ }
36
+
37
+ async getSalesReport() {
38
+ return await analyticsTool.getSalesReport('7d', this.context);
39
+ }
40
+ }