ai-agent-command-center 0.0.0-stage โ†’ 1.0.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.
Files changed (86) hide show
  1. package/.env.example +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +455 -2
  4. package/bin/ai-center.js +218 -0
  5. package/client/dist/assets/index-BRl_ORtB.css +1 -0
  6. package/client/dist/assets/index-CLhAmxoi.js +4444 -0
  7. package/client/dist/icon-192.png +0 -0
  8. package/client/dist/icon-512.png +0 -0
  9. package/client/dist/icon.svg +43 -0
  10. package/client/dist/index.html +31 -0
  11. package/client/dist/manifest.webmanifest +30 -0
  12. package/client/dist/sw.js +75 -0
  13. package/package.json +66 -4
  14. package/server/.env.example +9 -0
  15. package/server/dist/server/src/adapters/base.js +4 -0
  16. package/server/dist/server/src/adapters/customApi.js +353 -0
  17. package/server/dist/server/src/adapters/hermes.js +82 -0
  18. package/server/dist/server/src/adapters/preset.js +221 -0
  19. package/server/dist/server/src/adapters/router.js +32 -0
  20. package/server/dist/server/src/config/index.js +9 -0
  21. package/server/dist/server/src/db/index.js +180 -0
  22. package/server/dist/server/src/db/schemaSql.js +522 -0
  23. package/server/dist/server/src/index.js +251 -0
  24. package/server/dist/server/src/middleware/rateLimiter.js +76 -0
  25. package/server/dist/server/src/middleware/securityHeaders.js +21 -0
  26. package/server/dist/server/src/routes/actions.js +79 -0
  27. package/server/dist/server/src/routes/activities.js +35 -0
  28. package/server/dist/server/src/routes/agents.js +354 -0
  29. package/server/dist/server/src/routes/alerts.js +174 -0
  30. package/server/dist/server/src/routes/auth.js +138 -0
  31. package/server/dist/server/src/routes/dashboard.js +41 -0
  32. package/server/dist/server/src/routes/dataAnalyst.js +90 -0
  33. package/server/dist/server/src/routes/documents.js +242 -0
  34. package/server/dist/server/src/routes/domain.js +58 -0
  35. package/server/dist/server/src/routes/evals.js +56 -0
  36. package/server/dist/server/src/routes/mcp.js +160 -0
  37. package/server/dist/server/src/routes/memoryGraph.js +91 -0
  38. package/server/dist/server/src/routes/monitoring.js +41 -0
  39. package/server/dist/server/src/routes/notifications.js +88 -0
  40. package/server/dist/server/src/routes/orchestrator.js +54 -0
  41. package/server/dist/server/src/routes/pipeline.js +261 -0
  42. package/server/dist/server/src/routes/playground.js +91 -0
  43. package/server/dist/server/src/routes/projects.js +183 -0
  44. package/server/dist/server/src/routes/providers.js +403 -0
  45. package/server/dist/server/src/routes/rag.js +118 -0
  46. package/server/dist/server/src/routes/reports.js +123 -0
  47. package/server/dist/server/src/routes/schedules.js +165 -0
  48. package/server/dist/server/src/routes/skills.js +102 -0
  49. package/server/dist/server/src/routes/sre.js +84 -0
  50. package/server/dist/server/src/routes/swarm.js +165 -0
  51. package/server/dist/server/src/routes/system.js +199 -0
  52. package/server/dist/server/src/routes/tasks.js +314 -0
  53. package/server/dist/server/src/routes/warRooms.js +113 -0
  54. package/server/dist/server/src/routes/webResearch.js +60 -0
  55. package/server/dist/server/src/routes/webhooks.js +102 -0
  56. package/server/dist/server/src/routes/workflows.js +168 -0
  57. package/server/dist/server/src/services/actionManager.js +246 -0
  58. package/server/dist/server/src/services/alertingService.js +289 -0
  59. package/server/dist/server/src/services/dataAnalystService.js +463 -0
  60. package/server/dist/server/src/services/documentParserService.js +205 -0
  61. package/server/dist/server/src/services/domainManagerService.js +286 -0
  62. package/server/dist/server/src/services/embedding.js +178 -0
  63. package/server/dist/server/src/services/evalService.js +359 -0
  64. package/server/dist/server/src/services/logger.js +61 -0
  65. package/server/dist/server/src/services/mcpClientService.js +518 -0
  66. package/server/dist/server/src/services/memoryGraphService.js +545 -0
  67. package/server/dist/server/src/services/monitoring.js +90 -0
  68. package/server/dist/server/src/services/orchestrator.js +463 -0
  69. package/server/dist/server/src/services/ragService.js +308 -0
  70. package/server/dist/server/src/services/realtime.js +74 -0
  71. package/server/dist/server/src/services/sandbox.js +673 -0
  72. package/server/dist/server/src/services/schedulerService.js +548 -0
  73. package/server/dist/server/src/services/skillStudioService.js +366 -0
  74. package/server/dist/server/src/services/sreAgentService.js +405 -0
  75. package/server/dist/server/src/services/swarmArtifactService.js +258 -0
  76. package/server/dist/server/src/services/swarmService.js +623 -0
  77. package/server/dist/server/src/services/warRoomService.js +461 -0
  78. package/server/dist/server/src/services/webResearchService.js +295 -0
  79. package/server/dist/server/src/services/workflowEngine.js +611 -0
  80. package/server/dist/server/src/utils/auth.js +33 -0
  81. package/server/dist/server/src/utils/crypto.js +55 -0
  82. package/server/dist/server/src/utils/ssrf.js +112 -0
  83. package/server/dist/shared/constants.js +113 -0
  84. package/server/dist/shared/types.js +5 -0
  85. package/shared/constants.ts +129 -0
  86. package/shared/types.ts +1360 -0
package/.env.example ADDED
@@ -0,0 +1,20 @@
1
+ # ==============================================================================
2
+ # AI Agent Command Center โ€” Environment Configuration Template
3
+ # Copy this file to .env and configure your local or production secrets.
4
+ # DO NOT commit real secrets or production passwords to version control!
5
+ # ==============================================================================
6
+
7
+ # Application Server Port
8
+ PORT=3000
9
+
10
+ # Runtime Environment (development | production | test)
11
+ NODE_ENV=production
12
+
13
+ # PostgreSQL Connection String (PostgreSQL 16 with pgvector extension)
14
+ DATABASE_URL=postgres://routex:your_db_password_here@127.0.0.1:5432/ai_center?sslmode=disable
15
+
16
+ # AES-256-GCM Encryption Key for Model Provider API Keys (Must be >= 32 characters)
17
+ ENCRYPTION_KEY=replace-with-your-secure-32-character-secret-key-here!
18
+
19
+ # Default HQ Workspace Identifier
20
+ DEFAULT_WORKSPACE_ID=ws-default-command-center
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NexGen-X / Antigravity AI Center
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,456 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ```text
4
+ _ ___ ____ _
5
+ / \ |_ _| / ___|___ _ __ ___ _ __ ___ __ _ _ __ __| |
6
+ / _ \ | | | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` |
7
+ / ___ \ | | | |__| (_) | | | | | | | | | | | (_| | | | | (_| |
8
+ /_/ \_\___| \____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|
9
+
10
+ C E N T E R โ€ข A U T O N O M O U S S W A R M O S
11
+ ```
12
+
13
+ # ๐Ÿช AI Agent Command Center
14
+
15
+ ### *Next-Generation Spatial 3D/2D Orchestration Bridge & Autonomous Multi-Agent Swarm OS*
16
+
17
+ [![NPM Version](https://img.shields.io/npm/v/ai-agent-command-center.svg?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/ai-agent-command-center)
18
+ [![NPM Unpacked Size](https://img.shields.io/badge/unpacked%20size-2.2%20MB-blue?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/ai-agent-command-center)
19
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/NexGen-X/Ai-Center-Workspace/ci.yml?branch=main&label=CI%20Quality%20Gate&logo=github&style=for-the-badge)](https://github.com/NexGen-X/Ai-Center-Workspace/actions)
20
+ [![Tests Passing](https://img.shields.io/badge/TESTS-209%20PASSED%20%2F%20100%25-00FF66?style=for-the-badge&logo=vitest&logoColor=white)](https://github.com/NexGen-X/Ai-Center-Workspace/actions)
21
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.4.5-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
22
+ [![Node.js](https://img.shields.io/badge/Node.js-20+-339933?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/)
23
+ [![PostgreSQL](https://img.shields.io/badge/PostgreSQL%2016-pgvector%20HNSW-4169E1?style=for-the-badge&logo=postgresql&logoColor=white)](https://github.com/pgvector/pgvector)
24
+ [![Three.js](https://img.shields.io/badge/Three.js-WebGL%203D%20Spatial-black?style=for-the-badge&logo=three.js&logoColor=white)](https://threejs.org/)
25
+ [![License: MIT](https://img.shields.io/badge/License-MIT-9945FF?style=for-the-badge)](LICENSE)
26
+
27
+ <br/>
28
+
29
+ **AI Agent Command Center** is an enterprise-grade, cyberpunk-inspired operational bridge designed to coordinate, deliberate with, and observe autonomous multi-agent teams. Built with a fullstack reactive architecture, Three.js 3D spatial simulation, PostgreSQL 16 with native pgvector HNSW indexing, and an auto-provisioning Caddy reverse proxy, it transforms disjointed LLM chats into a cohesive, self-healing, mission-driven AI workforce.
30
+
31
+ [Explore Features](#-capabilities-matrix) โ€ข [Architecture](#-system-architecture) โ€ข [Security & Hardening](#-enterprise-hardening--zero-trust) โ€ข [Quickstart](#-quickstart--local-development) โ€ข [Production Runbook](#-production-deployment)
32
+
33
+ </div>
34
+
35
+ ---
36
+
37
+ ## โšก The Paradigm Shift: Why AI Command Center?
38
+
39
+ Most developer tools approach LLMs through fragmented chat windows or opaque command-line scripts. **AI Agent Command Center** introduces an operational operating system where agents function like a battle-tested engineering division:
40
+
41
+ | Dimension | Standard Chat UIs (ChatGPT, LibreChat) | Scripting Frameworks (CrewAI, AutoGen CLI) | ๐Ÿช AI Agent Command Center |
42
+ | :--- | :---: | :---: | :---: |
43
+ | **Spatial Observation** | Single thread | Terminal output only | **Immersive 3D Bridge (WebGL) + 2D Resilient Canvas** |
44
+ | **Consensus Engine** | โŒ None | Basic linear routing | **War Room Formal Deliberations & Synthesis** |
45
+ | **Memory Subsystem** | Ephemeral context window | Simple key-value store | **Cognitive Vector Graph (pgvector HNSW Cosine Cluster)** |
46
+ | **Execution Safety** | โŒ No native sandbox | Raw host execution | **CWD-Confined Sandbox + Anti-SSRF + Clean Env** |
47
+ | **Infrastructure SRE** | โŒ None | โŒ None | **Autonomous SRE Sentinel & Self-Healing Loop** |
48
+ | **Data Analytics** | Raw code blocks | Textual tables | **Natural SQL Engine with Dynamic Recharts Visualizer** |
49
+ | **Automated Deliverables**| Copy-paste snippets | Local folder writes | **Automated Git Branching, Commits & PR Synthesis** |
50
+ | **Edge Domain & SSL** | Manual Nginx/Certbot | โŒ None | **Hostinger & Cloudflare Auto-Provisioning (Caddy)** |
51
+ | **Zero-Regression CI** | Variable | Partial | **100% Pass Rate (209/209 Tests on PostgreSQL Service)** |
52
+
53
+ ---
54
+
55
+ ## ๐Ÿ›๏ธ System Architecture
56
+
57
+ ```mermaid
58
+ flowchart TD
59
+ subgraph Edge ["๐ŸŒ Edge & Ingress Layer (Caddy Reverse Proxy)"]
60
+ CaddyIn["Ports :80, :443, :8088, :8443 (Zstandard / Brotli)"]
61
+ DNSAuto["Automated Domain Provisioner (/etc/caddy/custom_domains.caddy)"]
62
+ CFProxy["Cloudflare Orange Cloud & Hostinger Direct DNS Resolver"]
63
+ end
64
+
65
+ subgraph ClientLayer ["๐Ÿ–ฅ๏ธ Spatial Frontend Layer (React 18 + Vite + Three.js)"]
66
+ Canvas3D["3D Virtual Command Bridge (WebGL, Particle Telemetry, Orbit Controls)"]
67
+ Canvas2D["2D Resilient Grid Fallback (Touch-Optimized / Low-Spec Hardware)"]
68
+ SSEStream["Real-time Server-Sent Events (SSE) Listener (:25s Heartbeat)"]
69
+ Modals["Feature Studios (War Room, Memory Graph, SRE Sentinel, Data Analyst)"]
70
+ end
71
+
72
+ subgraph CoreBackend ["โšก Backend Core (Node.js 20+ Express ESM)"]
73
+ SecMW["HTTP Hardening (HSTS, nosniff, SAMEORIGIN, no X-Powered-By)"]
74
+ RateLimiter["Adaptive Sliding-Window Rate Limiters (Auth: 15/m, Compute: 30/m, API: 300/m)"]
75
+ ProxyTrust["Reverse Proxy Real-IP Trust (X-Forwarded-For)"]
76
+
77
+ subgraph AutonomousEngines ["๐Ÿง  Autonomous Agent Engines"]
78
+ Orchestrator["Nexus Prime: Swarm DAG Decomposer & Task Runner"]
79
+ WarRoomEngine["Multi-Agent Deliberation & Counter-Argument Engine"]
80
+ SREAgent["Atlas Sentinel: Continuous Telemetry & Incident Remediation"]
81
+ DataAnalyst["Hypatia Engine: NL-to-SQL & Dynamic Analytical Synthesizer"]
82
+ SkillStudio["Skill Studio & Hot-Mounted MCP Tool Registry"]
83
+ end
84
+
85
+ subgraph SecurityJail ["๐Ÿ›ก๏ธ Zero-Trust Security Jail"]
86
+ SandboxCore["CWD Sandbox Isolation (Directory Escape Prevention)"]
87
+ EnvSanitizer["Subshell Environment Stripper (Zero Secret Leaking)"]
88
+ SSRFValidator["Canonical Anti-SSRF (Private Subnet & Cloud Metadata Blocker)"]
89
+ end
90
+ end
91
+
92
+ subgraph StorageLayer ["๐Ÿ—„๏ธ Resilient Storage & Disaster Recovery"]
93
+ PGDB[("PostgreSQL 16 Database (Connection Pool max: 20, statement_timeout: 30s)")]
94
+ PGV["pgvector Extension (768-dim Embeddings, HNSW Cosine Indexing)"]
95
+ BackupDaemon["Automated Disaster Recovery (/var/backups/ai-center daily 02:30 UTC, gzip -9)"]
96
+ end
97
+
98
+ Edge <-->|Encrypted HTTPS / SSE Stream| ClientLayer
99
+ Edge <-->|Internal Proxy 127.0.0.1:3000| CoreBackend
100
+ CoreBackend --> SecurityJail
101
+ SecurityJail -->|Safe Tool Calling: bash_exec, file_read, http_fetch| CoreBackend
102
+ CoreBackend <-->|Optimized Relational Queries & Vector Similarities| StorageLayer
103
+ StorageLayer -.-> BackupDaemon
104
+ ```
105
+
106
+ ---
107
+
108
+ ## ๐Ÿค– The Autonomous AI Division (Core Agent Archetypes)
109
+
110
+ AI Command Center comes pre-configured with a specialized hierarchy of autonomous agents:
111
+
112
+ ```text
113
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
114
+ โ•‘ NEXUS PRIME (Lead Orchestrator) โ•‘
115
+ โ•‘ Decomposes high-level objectives into topological DAG pipelines โ•‘
116
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
117
+ โ”‚ โ”‚
118
+ โ–ผ โ–ผ
119
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
120
+ โ•‘ ATHENA STRATOS (Planner) โ•‘ โ•‘ VULCAN FORGE (Executor) โ•‘
121
+ โ•‘ Formulates dependency maps, โ•‘ โ•‘ Hardened tool execution, sandbox โ•‘
122
+ โ•‘ milestones, and criteria โ•‘ โ•‘ file ops, and automated pipelines โ•‘
123
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
124
+ โ”‚ โ”‚
125
+ โ–ผ โ–ผ
126
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
127
+ โ•‘ AEGIS SENTINEL (QA Review) โ•‘ โ•‘ ATLAS DEVOPS (SRE Sentinel) โ•‘
128
+ โ•‘ "No Evidence = No Acceptanceโ•‘ โ•‘ Continuous host telemetry auditing, โ•‘
129
+ โ•‘ Independent empirical audit โ•‘ โ•‘ self-healing, and memory protection โ•‘
130
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
131
+ ```
132
+
133
+ ---
134
+
135
+ ## ๐Ÿ”ฎ Capabilities Matrix
136
+
137
+ ### 1. ๐Ÿช Spatial 3D Command Bridge & 2D Fallback
138
+ - **Holographic Workspace**: Real-time Three.js WebGL canvas displaying agents stationed at active terminals with glowing activity rings, pulsating particle connections, and status halos.
139
+ - **Fail-Safe Hardware Adaptability**: Automatically measures WebGL capability; seamlessly switches to a lightweight 2D interactive grid on mobile browsers or constrained headless environments.
140
+
141
+ ### 2. ๐Ÿ Autonomous Swarm Orchestrator & DAG Execution
142
+ - **Multi-Stage Decomposition**: Breaks down broad objectives into Directed Acyclic Graphs (DAGs) executed sequentially or in parallel by role-assigned agents.
143
+ - **Automated Deliverables**: Compiles unified git diff patches, generates formatted Markdown reports, and automates Git branch creation and commits (`docs/swarm-reports/mission-{id}.md`).
144
+ - **Mission Crash Recovery**: State persistence guarantees that interrupted missions resume seamlessly upon server reboot without duplicated subtasks.
145
+
146
+ ### 3. โš”๏ธ War Room Multi-Perspective Deliberation Engine
147
+ - **Cross-Agent Socratic Debates**: Pit specialized agents against one another (e.g., Performance vs. Strict Security vs. Usability).
148
+ - **Consensus & Trade-off Synthesis**: Generates formal decision records documenting consensus recommendations, architectural compromises, and actionable checklists.
149
+
150
+ ### 4. ๐Ÿง  Cognitive Memory Graph (pgvector HNSW)
151
+ - **Semantic Vector Association**: Transforms agent thoughts, lessons learned, and execution outputs into 768-dimensional vector embeddings stored in PostgreSQL with pgvector.
152
+ - **Cosine Distance Clustering**: Connects disparate memories across projects and agents with dynamic cosine similarity thresholds (`<->`).
153
+ - **Institutional Memory Sharing**: Agents automatically retrieve relevant prior decisions before embarking on new tasks.
154
+
155
+ ### 5. ๐Ÿ› ๏ธ Skill Studio & Model Context Protocol (MCP)
156
+ - **Hot-Mountable Capabilities**: Create, parameterize, and test specialized agent skills on the fly without server downtime.
157
+ - **Native MCP Ecosystem**: Integrates with Model Context Protocol servers to query file outlines, database schemas, and external tool registries.
158
+
159
+ ### 6. ๐Ÿšจ Autonomous SRE Sentinel & Self-Healing Loop
160
+ - **Proactive Health Auditing**: Continuous host inspection monitoring CPU saturation, RAM thresholds, disk usage, and PostgreSQL query latencies.
161
+ - **Self-Healing Actions**: Automatically flushes lingering zombie processes, terminates orphaned worker sockets, and defragments storage.
162
+ - **Automated Post-Mortem Generation**: Synthesizes root-cause timelines and mitigation strategies following any system anomaly.
163
+
164
+ ### 7. ๐Ÿ“Š Data Analyst Studio & Natural SQL Visualization
165
+ - **Natural Language to Parameterized SQL**: Translates human prompts into safe analytical SQL against internal metrics and databases.
166
+ - **Dynamic Charting Engine**: Automatically selects the best visual representation (Bar, Line, Area, Pie) and renders reactive charts.
167
+ - **Automated Statistical Insights**: Synthesizes anomalies, trends, and business takeaways from query results.
168
+
169
+ ### 8. ๐ŸŒ Automated Custom Domain & SSL Provisioning
170
+ - **Zero-Friction Ingress**: Support for Hostinger domains, Cloudflare Anycast CIDRs (Orange Cloud Proxy), and Direct DNS A-records.
171
+ - **Dynamic Caddy Sync**: In-app pre-flight DNS validation automates configuration of `/etc/caddy/custom_domains.caddy` with instant Let's Encrypt TLS provisioning.
172
+
173
+ ---
174
+
175
+ ## ๐Ÿ”’ Enterprise Hardening & Zero-Trust
176
+
177
+ Security is not an afterthought in AI Command Center โ€” it is baked into every layer of execution:
178
+
179
+ ```text
180
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
181
+ โ”‚ DEFENSE-IN-DEPTH MATRIX โ”‚
182
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
183
+ โ”‚ Perimeter Security โ”‚ HSTS (31536000s), nosniff, SAMEORIGIN, โ”‚
184
+ โ”‚ โ”‚ no X-Powered-By fingerprint, trust proxy=1 โ”‚
185
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
186
+ โ”‚ Abuse & DoS Defense โ”‚ In-memory Token Sliding Window Limiter: โ”‚
187
+ โ”‚ โ”‚ โ€ข Auth: 15 req/min (Brute-force protection) โ”‚
188
+ โ”‚ โ”‚ โ€ข Compute: 30 req/min (LLM drain defense) โ”‚
189
+ โ”‚ โ”‚ โ€ข Global API: 300 req/min (Flood protection) โ”‚
190
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
191
+ โ”‚ Anti-SSRF Guardrails โ”‚ Canonical IP resolver strictly blocks: โ”‚
192
+ โ”‚ โ”‚ โ€ข Cloud metadata (169.254.169.254, hex/int) โ”‚
193
+ โ”‚ โ”‚ โ€ข RFC 1918 Private subnets (10/8, 172.16/12) โ”‚
194
+ โ”‚ โ”‚ โ€ข Loopback probing (127.0.0.1, ::1) โ”‚
195
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
196
+ โ”‚ Sandbox Execution Jail โ”‚ โ€ข file_read strictly confined to CWD sandbox โ”‚
197
+ โ”‚ โ”‚ โ€ข Blocked paths: /etc/, /proc/, .env, id_rsa โ”‚
198
+ โ”‚ โ”‚ โ€ข bash_exec env stripped of all secrets โ”‚
199
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
200
+ โ”‚ Cryptographic Standards โ”‚ โ€ข API Keys encrypted with AES-256-GCM โ”‚
201
+ โ”‚ โ”‚ โ€ข Passwords hashed via PBKDF2 + timingSafeEq โ”‚
202
+ โ”‚ โ”‚ โ€ข Secrets-Free Repository Guarantee (Scanned)โ”‚
203
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
204
+ ```
205
+
206
+ ---
207
+
208
+ ## ๐Ÿš€ Quickstart
209
+
210
+ ### Method 1: Instant Zero-Install Run (Recommended)
211
+ Run the complete Command Bridge in seconds without manually cloning or configuring dependencies:
212
+
213
+ ```bash
214
+ # Instant launch (auto-provisions & opens browser on local machine)
215
+ npx ai-agent-command-center
216
+
217
+ # With custom port and database connection
218
+ npx ai-agent-command-center --port 8080 --db "postgres://user:pass@localhost:5432/ai_center"
219
+ ```
220
+
221
+ ### Method 2: Global CLI Installation
222
+ ```bash
223
+ # Install globally
224
+ npm install -g ai-agent-command-center
225
+
226
+ # Launch the Command Center
227
+ ai-center start
228
+
229
+ # View all CLI options
230
+ ai-center --help
231
+ ```
232
+
233
+ ### ๐Ÿงญ Intelligent Deployment Environment Auto-Detection
234
+ `ai-agent-command-center` features built-in environment perception to seamlessly adapt between local workstations and headless cloud servers:
235
+
236
+ | Target Environment | Detection Criteria | Startup Behavior |
237
+ | :--- | :--- | :--- |
238
+ | **Local Desktop / Laptop** | Windows, macOS, or Linux with active `$DISPLAY` / `$WAYLAND_DISPLAY` | Prints `http://localhost:3000` and **automatically opens default browser** within 1.5s. |
239
+ | **Remote Server / Headless VPS** | Headless Linux (AWS EC2, DigitalOcean, VPS, Docker container) | **Suppresses browser invocation** (prevents X11 errors), binds Express to `0.0.0.0`, and outputs LAN & Public access URLs. |
240
+
241
+ ```text
242
+ โœ” AI Agent Command Center aktif & siap melayani:
243
+ โžœ Local: http://localhost:3000
244
+ โžœ Network: http://192.168.1.50:3000
245
+ โžœ Mode: Remote Server / VPS (Headless โ€” browser lokal dinonaktifkan)
246
+ ```
247
+
248
+ ### CLI Command & Flags Reference
249
+ | Flag | Alias | Description | Default |
250
+ | :--- | :---: | :--- | :--- |
251
+ | `--port <num>` | `-p` | Port for the backend API and frontend static server | `3000` or `$PORT` |
252
+ | `--db <url>` | `-d` | PostgreSQL connection URL with pgvector support | `$DATABASE_URL` |
253
+ | `--no-open` | | Do not launch the browser automatically on local desktop | `false` |
254
+ | `--version` | `-v` | Print the current installed CLI version | `1.0.0` |
255
+ | `--help` | `-h` | Display help guidelines and usage examples | |
256
+
257
+ ---
258
+
259
+ ### Method 3: Monorepo Developer Setup (From Source)
260
+
261
+ #### Prerequisites
262
+ - **Node.js**: `v20.x` or higher
263
+ - **PostgreSQL**: `v16.x` with `pgvector` extension
264
+ - **npm**: `v10.x` or higher
265
+
266
+ ```bash
267
+ # 1. Clone repository
268
+ git clone https://github.com/NexGen-X/Ai-Center-Workspace.git
269
+ cd Ai-Center-Workspace
270
+
271
+ # 2. Install all monorepo dependencies
272
+ npm install
273
+
274
+ # 3. Setup environment configuration
275
+ cp .env.example .env
276
+
277
+ # 4. Start local development (Server & Client concurrently)
278
+ npm run dev:server
279
+ # In a separate terminal:
280
+ npm run dev:client
281
+ ```
282
+ Visit `http://localhost:5173` to access the Vite HMR development server.
283
+
284
+ ---
285
+
286
+ ## ๐Ÿšข Production Deployment
287
+
288
+ ### 1. Build Optimized Production Bundles
289
+ ```bash
290
+ # Builds both TypeScript backend and Vite React frontend
291
+ npm run build
292
+ ```
293
+
294
+ ### 2. Systemd Service Deployment
295
+ Create `/etc/systemd/system/ai-center.service`:
296
+ ```ini
297
+ [Unit]
298
+ Description=AI Agent Command Center Service
299
+ After=network.target postgresql.service
300
+
301
+ [Service]
302
+ Type=simple
303
+ User=root
304
+ WorkingDirectory=/root/Ai-Center-Workspace
305
+ ExecStart=/usr/bin/node /root/Ai-Center-Workspace/server/dist/server/src/index.js
306
+ Restart=always
307
+ RestartSec=3
308
+
309
+ # Graceful termination management
310
+ KillSignal=SIGTERM
311
+ TimeoutStopSec=15
312
+ SendSIGKILL=yes
313
+
314
+ # Logging and identification
315
+ StandardOutput=journal
316
+ StandardError=journal
317
+ SyslogIdentifier=ai-center
318
+
319
+ Environment=PORT=3000
320
+ Environment=NODE_ENV=production
321
+ Environment=DATABASE_URL=postgres://user:password@127.0.0.1:5432/ai_center?sslmode=disable
322
+ Environment=ENCRYPTION_KEY=replace-with-your-secure-32-character-secret-key-here!
323
+ LimitNOFILE=65536
324
+
325
+ [Install]
326
+ WantedBy=multi-user.target
327
+ ```
328
+
329
+ ```bash
330
+ systemctl daemon-reload
331
+ systemctl enable --now ai-center.service
332
+ ```
333
+
334
+ ### 3. Edge Reverse Proxy (Caddy)
335
+ Add the reverse proxy block in `/etc/caddy/Caddyfile`:
336
+ ```caddy
337
+ :80, :443 {
338
+ encode zstd gzip
339
+
340
+ header {
341
+ Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
342
+ X-Frame-Options "SAMEORIGIN"
343
+ X-Content-Type-Options "nosniff"
344
+ Referrer-Policy "strict-origin-when-cross-origin"
345
+ -Server
346
+ }
347
+
348
+ handle {
349
+ reverse_proxy 127.0.0.1:3000 {
350
+ flush_interval -1
351
+ header_up X-Real-Ip {remote_host}
352
+ header_up X-Forwarded-Proto {scheme}
353
+ }
354
+ }
355
+ }
356
+
357
+ import /etc/caddy/custom_domains.caddy
358
+ ```
359
+
360
+ ---
361
+
362
+ ## ๐Ÿ’พ Disaster Recovery & Automated Backups
363
+
364
+ AI Center features an automated disaster recovery engine executing daily at **02:30 UTC**:
365
+ - **Script**: `/usr/local/bin/ai-center-backup.sh`
366
+ - **Archive Path**: `/var/backups/ai-center/ai_center_prod_{timestamp}.sql.gz` (`chmod 700`)
367
+ - **Integrity Validation**: Automated `gzip -t` verification upon every dump
368
+ - **Retention**: 14-day rolling rotation with automatic cleanup of expired archives
369
+ - **Cron Definition**: `/etc/cron.d/ai-center-backup`
370
+
371
+ ### One-Command Manual Backup & Restore:
372
+ ```bash
373
+ # Execute manual backup now:
374
+ /usr/local/bin/ai-center-backup.sh
375
+
376
+ # Instant database restore:
377
+ gunzip -c /var/backups/ai-center/ai_center_prod_YYYYMMDD_HHMMSS.sql.gz | psql -U routex -d ai_center
378
+ ```
379
+
380
+ ---
381
+
382
+ ## ๐Ÿ“ก REST & Telemetry API Reference
383
+
384
+ | Verb | Path | Purpose | Guardrails |
385
+ | :---: | :--- | :--- | :---: |
386
+ | `GET` | `/healthz` | System uptime & PostgreSQL query latency check | Public |
387
+ | `POST` | `/api/auth/login` | Human operator session authentication | Rate-limited (15/m) |
388
+ | `GET` | `/api/realtime` | Server-Sent Events (SSE) telemetry bus | Keep-Alive (:25s) |
389
+ | `GET` | `/api/agents` | List all active agents & status halos | Session Bearer |
390
+ | `POST` | `/api/swarm/missions` | Dispatch autonomous multi-agent swarm DAG | Rate-limited (30/m) |
391
+ | `POST` | `/api/war-rooms/:id/deliberate` | Trigger formal multi-agent deliberation round | Session Bearer |
392
+ | `GET` | `/api/memory-graph/nodes` | Retrieve cognitive semantic memory network | Session Bearer |
393
+ | `POST` | `/api/skills` | Create and hot-mount a new agent skill | Session Bearer |
394
+ | `GET` | `/api/sre/incidents` | Query autonomous SRE health audits | Session Bearer |
395
+ | `POST` | `/api/data-analyst/execute-sql` | Execute parameterized analytics query | Query Timeout (30s) |
396
+ | `POST` | `/api/system/domain/provision` | Provision custom domain with Caddy TLS | DNS Pre-flight |
397
+ | `GET` | `/api/monitoring/summary` | Live CPU, RAM, Disk, and runtime telemetry | Rate-limited (300/m) |
398
+
399
+ ---
400
+
401
+ ## ๐Ÿงช Verification & Quality Gate
402
+
403
+ Every release and commit is validated against a rigorous test suite covering unit contracts, integration pipelines, database resilience, and sandbox boundaries:
404
+
405
+ ```bash
406
+ # Run Vitest test suite across all workspaces
407
+ npm test
408
+ ```
409
+
410
+ ```text
411
+ โœ“ tests/rag-memory.spec.ts (13)
412
+ โœ“ tests/actions-sandbox.spec.ts (14)
413
+ โœ“ tests/schedules.spec.ts (14)
414
+ โœ“ tests/skill-studio.spec.ts (9)
415
+ โœ“ tests/stability.spec.ts (11)
416
+ โœ“ tests/war-room.spec.ts (8)
417
+ โœ“ tests/memory-graph.spec.ts (9)
418
+ โœ“ tests/workflow-dag.spec.ts (8)
419
+ โœ“ tests/data-analyst.spec.ts (9)
420
+ โœ“ tests/sre-agent.spec.ts (8)
421
+ โœ“ tests/modal-interaction-contracts.spec.ts (6)
422
+ โœ“ tests/mcp-client.spec.ts (8)
423
+ โœ“ tests/alerting.spec.ts (6)
424
+ โœ“ tests/document-parser.spec.ts (6)
425
+ โœ“ tests/evals.spec.ts (5)
426
+ โœ“ tests/streaming.spec.ts (4)
427
+ โœ“ tests/web-research.spec.ts (7)
428
+ โœ“ tests/domain-manager.spec.ts (8)
429
+ โœ“ tests/ssrf.spec.ts (8)
430
+ โœ“ tests/orchestrator-system.spec.ts (4)
431
+ โœ“ tests/adapters.spec.ts (3)
432
+ โœ“ tests/pipeline.spec.ts (4)
433
+ โœ“ tests/playground-webhooks.spec.ts (3)
434
+ โœ“ tests/crypto.spec.ts (3)
435
+ โœ“ tests/auth.spec.ts (2)
436
+ โœ“ tests/api.spec.ts (14)
437
+ โœ“ tests/swarm.spec.ts (15)
438
+
439
+ Test Files 27 passed (27)
440
+ Tests 209 passed (209)
441
+ Duration 34.40s
442
+ ```
443
+
444
+ ---
445
+
446
+ ## ๐Ÿค Community & Governance
447
+
448
+ - Review our [CONTRIBUTING.md](CONTRIBUTING.md) for branch strategies, coding standards, and testing expectations.
449
+ - Read our [SECURITY.md](SECURITY.md) for our vulnerability disclosure policy and security audit guarantees.
450
+
451
+ ---
452
+
453
+ ## ๐Ÿ“„ License
454
+
455
+ This software is released under the **[MIT License](LICENSE)**.
456
+ Copyright ยฉ 2026 **NexGen-X / Antigravity AI Center**. All rights reserved.