@duckmind/deepquark-darwin-arm64 0.9.83 → 0.9.90

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/.deepquark/skills/bundled/knowledge-graph/SKILL.md +385 -0
  2. package/.deepquark/skills/bundled/knowledge-graph/STANDARDS.md +461 -0
  3. package/.deepquark/skills/bundled/knowledge-graph/lib/cli.ts +588 -0
  4. package/.deepquark/skills/bundled/knowledge-graph/lib/config.ts +630 -0
  5. package/.deepquark/skills/bundled/knowledge-graph/lib/connection-profile.ts +629 -0
  6. package/.deepquark/skills/bundled/knowledge-graph/lib/container.ts +756 -0
  7. package/.deepquark/skills/bundled/knowledge-graph/lib/mcp-client.ts +1310 -0
  8. package/.deepquark/skills/bundled/knowledge-graph/lib/output-formatter.ts +997 -0
  9. package/.deepquark/skills/bundled/knowledge-graph/lib/token-metrics.ts +335 -0
  10. package/.deepquark/skills/bundled/knowledge-graph/lib/transformation-log.ts +137 -0
  11. package/.deepquark/skills/bundled/knowledge-graph/lib/wrapper-config.ts +113 -0
  12. package/.deepquark/skills/bundled/knowledge-graph/server/.env.example +129 -0
  13. package/.deepquark/skills/bundled/knowledge-graph/server/compare-embeddings.ts +175 -0
  14. package/.deepquark/skills/bundled/knowledge-graph/server/config-falkordb.yaml +108 -0
  15. package/.deepquark/skills/bundled/knowledge-graph/server/config-neo4j.yaml +111 -0
  16. package/.deepquark/skills/bundled/knowledge-graph/server/diagnose.ts +483 -0
  17. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb-dev.yml +146 -0
  18. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb.yml +151 -0
  19. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev-local.yml +161 -0
  20. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev.yml +161 -0
  21. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j.yml +169 -0
  22. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-production.yml +128 -0
  23. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-test.yml +10 -0
  24. package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose.yml +84 -0
  25. package/.deepquark/skills/bundled/knowledge-graph/server/entrypoint.sh +40 -0
  26. package/.deepquark/skills/bundled/knowledge-graph/server/install.ts +2054 -0
  27. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-falkordb.yml +78 -0
  28. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-neo4j.yml +88 -0
  29. package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose.yml +83 -0
  30. package/.deepquark/skills/bundled/knowledge-graph/server/test-all-llms-mcp.ts +387 -0
  31. package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-models.ts +201 -0
  32. package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-providers.ts +641 -0
  33. package/.deepquark/skills/bundled/knowledge-graph/server/test-graphiti-model.ts +217 -0
  34. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-correct.ts +141 -0
  35. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-llms-mcp.ts +386 -0
  36. package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-models.ts +173 -0
  37. package/.deepquark/skills/bundled/knowledge-graph/server/test-llama-extraction.ts +188 -0
  38. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-final.ts +240 -0
  39. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-live.ts +187 -0
  40. package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-session.ts +127 -0
  41. package/.deepquark/skills/bundled/knowledge-graph/server/test-model-combinations.ts +316 -0
  42. package/.deepquark/skills/bundled/knowledge-graph/server/test-ollama-models.ts +228 -0
  43. package/.deepquark/skills/bundled/knowledge-graph/server/test-openrouter-models.ts +460 -0
  44. package/.deepquark/skills/bundled/knowledge-graph/server/test-real-life-mcp.ts +311 -0
  45. package/.deepquark/skills/bundled/knowledge-graph/server/test-search-debug.ts +199 -0
  46. package/.deepquark/skills/bundled/knowledge-graph/tools/Install.md +104 -0
  47. package/.deepquark/skills/bundled/knowledge-graph/tools/README.md +120 -0
  48. package/.deepquark/skills/bundled/knowledge-graph/tools/knowledge-cli.ts +996 -0
  49. package/.deepquark/skills/bundled/knowledge-graph/tools/server-cli.ts +531 -0
  50. package/.deepquark/skills/bundled/knowledge-graph/workflows/BulkImport.md +514 -0
  51. package/.deepquark/skills/bundled/knowledge-graph/workflows/CaptureEpisode.md +242 -0
  52. package/.deepquark/skills/bundled/knowledge-graph/workflows/ClearGraph.md +392 -0
  53. package/.deepquark/skills/bundled/knowledge-graph/workflows/GetRecent.md +352 -0
  54. package/.deepquark/skills/bundled/knowledge-graph/workflows/GetStatus.md +373 -0
  55. package/.deepquark/skills/bundled/knowledge-graph/workflows/HealthReport.md +212 -0
  56. package/.deepquark/skills/bundled/knowledge-graph/workflows/InvestigateEntity.md +142 -0
  57. package/.deepquark/skills/bundled/knowledge-graph/workflows/OntologyManagement.md +201 -0
  58. package/.deepquark/skills/bundled/knowledge-graph/workflows/RunMaintenance.md +302 -0
  59. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchByDate.md +255 -0
  60. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchFacts.md +382 -0
  61. package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchKnowledge.md +374 -0
  62. package/.deepquark/skills/bundled/knowledge-graph/workflows/StixImport.md +212 -0
  63. package/bin/deepquark +0 -0
  64. package/package.json +1 -1
  65. package/.deepquark/skills/bundled/ge-payroll/SKILL.md +0 -153
  66. package/.deepquark/skills/bundled/ge-payroll/evals/evals.json +0 -23
  67. package/.deepquark/skills/bundled/ge-payroll/references/pain-points-improvements.md +0 -106
  68. package/.deepquark/skills/bundled/ge-payroll/references/process-detail.md +0 -217
  69. package/.deepquark/skills/bundled/ge-payroll/references/raci-stakeholders.md +0 -85
  70. package/.deepquark/skills/bundled/ge-payroll/references/timeline-mandays.md +0 -64
@@ -0,0 +1,483 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Madeinoz Knowledge System Diagnostics Script
4
+ *
5
+ * Checks installation and provides troubleshooting guidance.
6
+ * Performs comprehensive health checks on the system.
7
+ */
8
+
9
+ import { createContainerManager } from '../lib/container';
10
+ import { createConfigLoader } from '../lib/config';
11
+ import { cli } from '../lib/cli';
12
+ import { $ } from 'bun';
13
+
14
+ /**
15
+ * Diagnostic check result
16
+ */
17
+ interface CheckResult {
18
+ name: string;
19
+ passed: boolean;
20
+ message: string;
21
+ details?: string;
22
+ }
23
+
24
+ /**
25
+ * Diagnostics class
26
+ */
27
+ class Diagnostics {
28
+ private issues = 0;
29
+ private results: CheckResult[] = [];
30
+
31
+ /**
32
+ * Add a check result
33
+ */
34
+ addResult(result: CheckResult): void {
35
+ this.results.push(result);
36
+ if (!result.passed) {
37
+ this.issues++;
38
+ }
39
+ }
40
+
41
+ /**
42
+ * Print a header
43
+ */
44
+ printHeader(title: string): void {
45
+ cli.blank();
46
+ cli.header(title, 50);
47
+ cli.blank();
48
+ }
49
+
50
+ /**
51
+ * Check 1: Podman Installation
52
+ */
53
+ async checkPodman(): Promise<void> {
54
+ this.printHeader('Check 1: Container Runtime');
55
+
56
+ try {
57
+ // Check if podman or docker is installed
58
+ const podmanCheck = await $`which podman`.quiet().nothrow();
59
+ const dockerCheck = await $`which docker`.quiet().nothrow();
60
+
61
+ if (podmanCheck.exitCode === 0) {
62
+ const version = await $`podman --version`.quiet();
63
+ this.addResult({
64
+ name: 'Container Runtime',
65
+ passed: true,
66
+ message: `Podman installed: ${version.stdout.toString().trim()}`,
67
+ });
68
+ } else if (dockerCheck.exitCode === 0) {
69
+ const version = await $`docker --version`.quiet();
70
+ this.addResult({
71
+ name: 'Container Runtime',
72
+ passed: true,
73
+ message: `Docker installed: ${version.stdout.toString().trim()}`,
74
+ });
75
+ } else {
76
+ this.addResult({
77
+ name: 'Container Runtime',
78
+ passed: false,
79
+ message: 'No container runtime found',
80
+ details: 'Install from: https://podman.io/getting-started/installation',
81
+ });
82
+ }
83
+ } catch {
84
+ this.addResult({
85
+ name: 'Container Runtime',
86
+ passed: false,
87
+ message: 'Error checking for container runtime',
88
+ });
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Check 2: Configuration File
94
+ */
95
+ async checkConfig(): Promise<void> {
96
+ this.printHeader('Check 2: Configuration File');
97
+
98
+ const configLoader = createConfigLoader();
99
+
100
+ if (await configLoader.envExists()) {
101
+ this.addResult({
102
+ name: '.env File',
103
+ passed: true,
104
+ message: '.env file exists',
105
+ });
106
+
107
+ // Load and check for API keys
108
+ try {
109
+ const config = await configLoader.load();
110
+
111
+ // Check for API keys
112
+ const hasAnyKey =
113
+ !!config.OPENAI_API_KEY ||
114
+ !!config.ANTHROPIC_API_KEY ||
115
+ !!config.GOOGLE_API_KEY ||
116
+ !!config.GROQ_API_KEY;
117
+
118
+ if (hasAnyKey) {
119
+ const keyType = config.OPENAI_API_KEY
120
+ ? 'OpenAI'
121
+ : config.ANTHROPIC_API_KEY
122
+ ? 'Anthropic'
123
+ : config.GOOGLE_API_KEY
124
+ ? 'Google'
125
+ : 'Groq';
126
+ this.addResult({
127
+ name: 'API Key',
128
+ passed: true,
129
+ message: `${keyType} API key configured`,
130
+ });
131
+ } else {
132
+ this.addResult({
133
+ name: 'API Key',
134
+ passed: false,
135
+ message: 'No API keys found in .env',
136
+ details: 'Run: bun run src/skills/tools/install.ts',
137
+ });
138
+ }
139
+
140
+ // Check model configuration
141
+ this.addResult({
142
+ name: 'Model Configuration',
143
+ passed: true,
144
+ message: `Model: ${config.MODEL_NAME}`,
145
+ });
146
+
147
+ // Check semaphore limit
148
+ this.addResult({
149
+ name: 'Concurrency Limit',
150
+ passed: true,
151
+ message: `Semaphore limit: ${config.SEMAPHORE_LIMIT}`,
152
+ });
153
+ } catch (error) {
154
+ this.addResult({
155
+ name: '.env File',
156
+ passed: false,
157
+ message: 'Error loading .env file',
158
+ details: String(error),
159
+ });
160
+ }
161
+ } else {
162
+ this.addResult({
163
+ name: '.env File',
164
+ passed: false,
165
+ message: '.env file not found',
166
+ details: 'Run: bun run src/skills/tools/install.ts',
167
+ });
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Check 3: Container Status
173
+ */
174
+ async checkContainers(): Promise<void> {
175
+ this.printHeader('Check 3: Container Status');
176
+
177
+ const containerManager = createContainerManager();
178
+
179
+ if (!containerManager.isRuntimeAvailable()) {
180
+ this.addResult({
181
+ name: 'Container Runtime',
182
+ passed: false,
183
+ message: 'Container runtime not available',
184
+ });
185
+ return;
186
+ }
187
+
188
+ const containerName = 'madeinoz-knowledge-graph-mcp';
189
+ const isRunning = await containerManager.isContainerRunning(containerName);
190
+
191
+ if (isRunning) {
192
+ this.addResult({
193
+ name: 'Container',
194
+ passed: true,
195
+ message: 'Container is running',
196
+ });
197
+
198
+ // Get container details
199
+ const info = await containerManager.getContainerInfo(containerName);
200
+ if (info.uptime) {
201
+ cli.dim(` Status: ${info.uptime}`);
202
+ }
203
+ if (info.ports) {
204
+ cli.dim(` Ports: ${info.ports}`);
205
+ }
206
+ } else {
207
+ const exists = await containerManager.containerExists(containerName);
208
+ if (exists) {
209
+ this.addResult({
210
+ name: 'Container',
211
+ passed: false,
212
+ message: 'Container exists but not running',
213
+ details: 'Start with: bun run src/server/run.ts',
214
+ });
215
+ } else {
216
+ this.addResult({
217
+ name: 'Container',
218
+ passed: false,
219
+ message: 'Container not found',
220
+ details: 'Run: bun run src/server/run.ts',
221
+ });
222
+ }
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Check 4: Server Health
228
+ */
229
+ async checkServerHealth(): Promise<void> {
230
+ this.printHeader('Check 4: MCP Server Health');
231
+
232
+ try {
233
+ const response = await fetch('http://localhost:8000/health', {
234
+ signal: AbortSignal.timeout(5000),
235
+ });
236
+
237
+ if (response.ok) {
238
+ const data = await response.json();
239
+ if (data.status === 'healthy' || data.status === 'ok') {
240
+ this.addResult({
241
+ name: 'MCP Server',
242
+ passed: true,
243
+ message: 'MCP server is healthy',
244
+ });
245
+ } else {
246
+ this.addResult({
247
+ name: 'MCP Server',
248
+ passed: false,
249
+ message: 'Server responding but health check unclear',
250
+ details: `Response: ${JSON.stringify(data)}`,
251
+ });
252
+ }
253
+ } else {
254
+ this.addResult({
255
+ name: 'MCP Server',
256
+ passed: false,
257
+ message: `Server returned HTTP ${response.status}`,
258
+ });
259
+ }
260
+ } catch {
261
+ this.addResult({
262
+ name: 'MCP Server',
263
+ passed: false,
264
+ message: 'MCP server not responding',
265
+ details: 'Check logs: bun run src/server/logs.ts',
266
+ });
267
+ }
268
+ }
269
+
270
+ /**
271
+ * Check 5: PAI Skill Installation
272
+ */
273
+ async checkPAISkill(): Promise<void> {
274
+ this.printHeader('Check 5: PAI Skill Installation');
275
+
276
+ const possiblePaths = [
277
+ `${process.env.HOME}/.claude/skills/Knowledge`,
278
+ `${process.env.HOME}/.claude/skills/madeinoz-knowledge-system`,
279
+ process.env.PAI_DIR ? `${process.env.PAI_DIR}/skills/Knowledge` : '',
280
+ process.env.PAI_DIR ? `${process.env.PAI_DIR}/skills/madeinoz-knowledge-system` : '',
281
+ ].filter(Boolean);
282
+
283
+ let found = false;
284
+ for (const path of possiblePaths) {
285
+ try {
286
+ const file = Bun.file(path);
287
+ if (await file.exists()) {
288
+ this.addResult({
289
+ name: 'PAI Skill',
290
+ passed: true,
291
+ message: `PAI skill installed: ${path}`,
292
+ });
293
+ found = true;
294
+ break;
295
+ }
296
+ } catch {
297
+ // Continue
298
+ }
299
+ }
300
+
301
+ if (!found) {
302
+ this.addResult({
303
+ name: 'PAI Skill',
304
+ passed: false,
305
+ message: 'PAI skill not found in standard locations',
306
+ details: 'Install with: cp -r madeinoz-knowledge-system ~/.claude/skills/',
307
+ });
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Check 6: Port Availability
313
+ */
314
+ async checkPorts(): Promise<void> {
315
+ this.printHeader('Check 6: Port Availability');
316
+
317
+ const ports = [
318
+ { port: 8000, description: 'MCP Server' },
319
+ { port: 6379, description: 'FalkorDB' },
320
+ { port: 3000, description: 'FalkorDB Web UI' },
321
+ ];
322
+
323
+ for (const { port, description } of ports) {
324
+ try {
325
+ // Try to bind to the port to check if it's available
326
+ const server = Bun.serve({
327
+ port,
328
+ fetch: () => new Response('OK'),
329
+ });
330
+
331
+ // Immediately stop the server
332
+ server.stop();
333
+
334
+ this.addResult({
335
+ name: `Port ${port}`,
336
+ passed: true,
337
+ message: `${description} (port ${port}) is available`,
338
+ });
339
+ } catch {
340
+ this.addResult({
341
+ name: `Port ${port}`,
342
+ passed: false,
343
+ message: `${description} (port ${port}) is in use`,
344
+ });
345
+ }
346
+ }
347
+ }
348
+
349
+ /**
350
+ * Check 7: Resource Usage
351
+ */
352
+ async checkResources(): Promise<void> {
353
+ this.printHeader('Check 7: Resource Usage');
354
+
355
+ const containerManager = createContainerManager();
356
+ const containerName = 'madeinoz-knowledge-graph-mcp';
357
+
358
+ if (await containerManager.isContainerRunning(containerName)) {
359
+ try {
360
+ const stats = await containerManager.getStats(containerName);
361
+ if (stats.success) {
362
+ this.addResult({
363
+ name: 'Resource Usage',
364
+ passed: true,
365
+ message: 'Container resource usage:',
366
+ details: stats.stdout,
367
+ });
368
+ console.log(stats.stdout);
369
+ }
370
+ } catch {
371
+ this.addResult({
372
+ name: 'Resource Usage',
373
+ passed: false,
374
+ message: 'Could not fetch resource stats',
375
+ });
376
+ }
377
+ } else {
378
+ this.addResult({
379
+ name: 'Resource Usage',
380
+ passed: false,
381
+ message: 'Container not running',
382
+ });
383
+ }
384
+ }
385
+
386
+ /**
387
+ * Print summary
388
+ */
389
+ printSummary(): void {
390
+ this.printHeader('Diagnostic Summary');
391
+
392
+ const _passed = this.results.filter((r) => r.passed).length;
393
+ const _total = this.results.length;
394
+
395
+ if (this.issues === 0) {
396
+ cli.success('✓ All checks passed! System is healthy.');
397
+ cli.blank();
398
+ cli.info('Your Madeinoz Knowledge System is ready to use.');
399
+ cli.blank();
400
+ cli.info('Try these commands:');
401
+ cli.dim(" Remember that I've successfully installed the Madeinoz Knowledge System.");
402
+ cli.dim(' What do I know about PAI?');
403
+ cli.dim(' Show the knowledge graph status');
404
+ } else {
405
+ cli.warning(`⚠ Found ${this.issues} issue(s) that need attention`);
406
+ cli.blank();
407
+ cli.info('Recommended actions:');
408
+
409
+ // Group recommendations by check type
410
+ for (const result of this.results) {
411
+ if (!result.passed && result.details) {
412
+ cli.dim(` • ${result.message}: ${result.details}`);
413
+ }
414
+ }
415
+
416
+ // Additional contextual recommendations
417
+ const runtimeResult = this.results.find((r) => r.name === 'Container Runtime');
418
+ if (!runtimeResult?.passed) {
419
+ cli.blank();
420
+ cli.info('1. Install Podman');
421
+ }
422
+
423
+ const configResult = this.results.find((r) => r.name === '.env File');
424
+ if (!configResult?.passed) {
425
+ cli.blank();
426
+ cli.info('2. Run installation: bun run src/skills/tools/install.ts');
427
+ }
428
+
429
+ const containerResult = this.results.find((r) => r.name === 'Container');
430
+ if (!containerResult?.passed) {
431
+ cli.blank();
432
+ cli.info('3. Start the server: bun run src/server/run.ts');
433
+ }
434
+
435
+ const healthResult = this.results.find((r) => r.name === 'MCP Server');
436
+ if (!healthResult?.passed) {
437
+ cli.blank();
438
+ cli.info('4. Check logs: bun run src/server/logs.ts');
439
+ }
440
+ }
441
+
442
+ cli.blank();
443
+ cli.info('For more help, see:');
444
+ cli.dim(' - README.md');
445
+ cli.dim(' - INSTALL.md');
446
+ cli.dim(' - VERIFY.md');
447
+ cli.blank();
448
+ }
449
+
450
+ /**
451
+ * Run all checks
452
+ */
453
+ async run(): Promise<void> {
454
+ cli.clear();
455
+ cli.header('Madeinoz Knowledge System Diagnostics');
456
+ cli.blank();
457
+
458
+ await this.checkPodman();
459
+ await this.checkConfig();
460
+ await this.checkContainers();
461
+ await this.checkServerHealth();
462
+ await this.checkPAISkill();
463
+ await this.checkPorts();
464
+ await this.checkResources();
465
+
466
+ this.printSummary();
467
+ }
468
+ }
469
+
470
+ /**
471
+ * Main function
472
+ */
473
+ async function main() {
474
+ const diagnostics = new Diagnostics();
475
+ await diagnostics.run();
476
+ }
477
+
478
+ // Run main function
479
+ main().catch((error) => {
480
+ cli.error('Unexpected error:');
481
+ console.error(error);
482
+ process.exit(1);
483
+ });
@@ -0,0 +1,146 @@
1
+ # Docker Compose configuration for Madeinoz Knowledge System with FalkorDB backend - DEVELOPMENT
2
+ # Isolated from production with different ports, volumes, and container names
3
+ #
4
+ # Usage:
5
+ # bun run server-cli start --dev # Start dev environment (with DATABASE_TYPE=falkordb)
6
+ # bun run server-cli start # Start production environment
7
+ #
8
+ # Access points:
9
+ # - FalkorDB Web UI: http://localhost:3001
10
+ # - MCP Server: http://localhost:8001
11
+ # - Prometheus Metrics: http://localhost:9091/metrics
12
+ # - Prometheus UI: http://localhost:9092
13
+ # - Grafana: http://localhost:3003 (admin/admin)
14
+ #
15
+ # Port Mapping (Dev vs Prod):
16
+ # Dev -> Prod
17
+ # 3001 -> 3000 (FalkorDB Web UI)
18
+ # 8001 -> 8000 (MCP Server)
19
+ # 9091 -> 9090 (Prometheus Metrics)
20
+ # 9092 -> 9092 (Prometheus UI)
21
+ # 3003 -> 3002 (Grafana - offset to avoid FalkorDB conflict)
22
+ #
23
+ # Volumes are prefixed with 'dev-' to isolate from production data
24
+
25
+ name: madeinoz-knowledge-system-dev
26
+
27
+ networks:
28
+ madeinoz-knowledge-dev-net:
29
+ driver: bridge
30
+
31
+ volumes:
32
+ dev-falkordb-data:
33
+ driver: local
34
+ dev-prometheus-data:
35
+ driver: local
36
+ dev-grafana-data:
37
+ driver: local
38
+
39
+ services:
40
+ # FalkorDB Graph Database (Development)
41
+ # Redis-based graph database
42
+ falkordb:
43
+ image: falkordb/falkordb:latest
44
+ container_name: madeinoz-knowledge-falkordb-dev
45
+ restart: unless-stopped
46
+ networks:
47
+ - madeinoz-knowledge-dev-net
48
+ ports:
49
+ - "3001:3000" # FalkorDB web UI (dev port)
50
+ volumes:
51
+ - dev-falkordb-data:/data
52
+ environment:
53
+ - FALKORDB_PASSWORD=
54
+ healthcheck:
55
+ test: ["CMD", "redis-cli", "ping"]
56
+ interval: 10s
57
+ timeout: 5s
58
+ retries: 5
59
+ start_period: 20s
60
+
61
+ # Graphiti MCP Server (Development - FalkorDB backend)
62
+ # Environment variables provided via env_file generated by server-cli.ts
63
+ graphiti-mcp:
64
+ image: madeinozknowledge-system:local
65
+ container_name: madeinoz-knowledge-graph-mcp-dev
66
+ restart: unless-stopped
67
+ networks:
68
+ - madeinoz-knowledge-dev-net
69
+ ports:
70
+ - "8001:8000" # MCP HTTP endpoint (dev port)
71
+ - "9091:9090" # Prometheus metrics endpoint (dev port)
72
+ env_file:
73
+ # Generated by server-cli.ts from MADEINOZ_KNOWLEDGE_* prefixed variables
74
+ - /tmp/madeinoz-knowledge-mcp-dev.env
75
+ environment:
76
+ # Logging: DEBUG for development (verbose output)
77
+ - LOG_LEVEL=DEBUG
78
+ depends_on:
79
+ falkordb:
80
+ condition: service_healthy
81
+ healthcheck:
82
+ test:
83
+ [
84
+ "CMD",
85
+ "curl",
86
+ "-sf",
87
+ "--max-time",
88
+ "5",
89
+ "http://localhost:8000/health",
90
+ ]
91
+ interval: 30s
92
+ timeout: 10s
93
+ retries: 3
94
+ start_period: 40s
95
+
96
+ # Prometheus Metrics Server (Development)
97
+ # Scrapes metrics from graphiti-mcp service
98
+ prometheus:
99
+ image: prom/prometheus:latest
100
+ container_name: madeinoz-knowledge-prometheus-dev
101
+ restart: unless-stopped
102
+ networks:
103
+ - madeinoz-knowledge-dev-net
104
+ ports:
105
+ - "9092:9090" # Prometheus UI (dev port)
106
+ volumes:
107
+ - dev-prometheus-data:/prometheus
108
+ - ../../../config/monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
109
+ command:
110
+ - "--config.file=/etc/prometheus/prometheus.yml"
111
+ - "--storage.tsdb.path=/prometheus"
112
+ - "--web.enable-lifecycle"
113
+ - "--storage.tsdb.retention.time=15d"
114
+ depends_on:
115
+ graphiti-mcp:
116
+ condition: service_healthy
117
+ healthcheck:
118
+ test: ["CMD", "wget", "-q", "--spider", "http://localhost:9090/-/healthy"]
119
+ interval: 30s
120
+ timeout: 10s
121
+ retries: 3
122
+ start_period: 10s
123
+
124
+ # Grafana Dashboard (Development)
125
+ # Pre-configured with Prometheus datasource and dashboards
126
+ grafana:
127
+ image: grafana/grafana:latest
128
+ container_name: madeinoz-knowledge-grafana-dev
129
+ restart: unless-stopped
130
+ networks:
131
+ - madeinoz-knowledge-dev-net
132
+ ports:
133
+ - "3003:3000" # Grafana UI (dev port, offset to avoid FalkorDB UI conflict)
134
+ volumes:
135
+ - dev-grafana-data:/var/lib/grafana
136
+ - ../../../config/monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
137
+ - ../../../config/monitoring/grafana/knowledge-system/dashboards:/etc/grafana/provisioning/dashboards:ro
138
+ - ../../../config/monitoring/grafana/knowledge-system/dashboards:/var/lib/grafana/dashboards:ro
139
+ environment:
140
+ - GF_SECURITY_ADMIN_USER=admin
141
+ - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
142
+ - GF_USERS_ALLOW_SIGN_UP=false
143
+ - GF_SERVER_ROOT_URL=http://localhost:3003
144
+ depends_on:
145
+ prometheus:
146
+ condition: service_healthy