Skip to content

Arjo216/CodeOps-ULTRA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ CodeOps ULTRA
[ Enterprise DevSecOps Platform ]

An autonomous, polyglot AI orchestration platform with native IDE integration, stateless CI/CD webhooks, and hardened Docker execution.

License Python TypeScript Next.js Docker PostgreSQL

"Bridging the gap between Cognitive AI and Secure Systems Engineering."

(πŸ“Έ Insert a GIF or Video link of your VS Code Extension and Dashboard working here!)


πŸ“– The Architecture Overview

CodeOps ULTRA is not just a chatbot; it is a full-stack, distributed DevSecOps ecosystem. Engineered for the modern tech landscape, it provides a seamless bridge between a developer's local environment and a highly secure, autonomous AI agent capable of writing, auditing, and compiling polyglot code in real-time.

By leveraging a LangGraph multi-agent workflow grounded in a custom pgvector Vector Database, CodeOps ULTRA ensures zero-trust execution. It features a Next.js mission control dashboard, a native VS Code Extension, a Python CLI, and an autonomous GitHub Webhook Bot for automated Pull Request auditing.


πŸš€ Key Innovations

🌐 The ULTRA Ecosystem

CodeOps ULTRA is accessible through four distinct enterprise interfaces, all powered by a centralized asynchronous FastAPI gateway:

1. πŸ’» Native IDE Integration (VS Code)

  • Instant Audits: Right-click any Python, Java, C++, JS, Rust, or Go file to trigger a deep static analysis.
  • Live Telemetry: Streams secure Docker execution logs directly into the native VS Code Output Channel.
  • Built with: TypeScript, VS Code Extension API.

2. πŸ™ Autonomous CI/CD (GitHub PR Bot)

  • Stateless Webhooks: Listens to repository events via public tunneling.
  • Auto-Verification: Automatically pulls PR diffs, runs the Multi-Agent security audit, and posts verified approvals directly into the GitHub comment thread.
  • Telemetry: Backed by an asynchronous SQLite database for real-time observability.

3. πŸ–₯️ Mission Control (Web Dashboard)

  • Enterprise UI: A dark-mode, cyberpunk-themed Next.js 14 dashboard using Tailwind CSS.
  • Live Observability: View live execution telemetry, PR audit histories, and memory vault logs in real-time.

4. ⚑ The Hacker's CLI (Terminal Native)

  • Rich Developer Experience: A heavily stylized, rich, interactive command-line interface built with Typer and Rich for developers who prefer the terminal.
  • Direct Sandbox Access: Request polyglot code generation and watch the ephemeral Docker containers compile and stream standard output directly back to your terminal prompt.
  • History Vault Access: Query past successful executions and security audits without ever leaving the command line.

πŸ›‘οΈ The Cognitive & Security Core

CodeOps ULTRA features a Dual-Mode Cognitive Core, powered by Llama 3.3 70B via Groq, ensuring maximum security at both the pipeline and API levels:

1. Dual-Mode Code Review Engine

  • Integrated QA Auditor (LangGraph State-Machine): A LangGraph State-Graph where a Developer Agent and a strict QA Auditor Agent iteratively debate and refine code until it meets corporate security standards. It Acts as the internal firewall. If the Developer Agent generates insecure code, the QA Auditor rejects it, explains the vulnerability, and forces an autonomous rewrite before the code is ever allowed inside the Docker Sandbox.
  • Standalone Fast-Review API (/api/v2/agent/review): A high-speed, stateless endpoint for immediate code auditing. Submit any raw code snippet, and the engine instantly returns a hyper-optimized, heavily commented, and secure version of the code alongside a bulleted vulnerability report.

2. Deterministic Memory & RAG

  • Zero-Trust RAG: Uses PostgreSQL + pgvector for offline, hash-based retrieval of corporate security policies, making the system immune to external API outages.
  • Immutable Telemetry: Every standalone review and automated PR audit is silently logged to PostgreSQL and SQLite databases for full organizational observability.

3. Polyglot Docker Sandbox

  • Code is executed in ephemeral eclipse-temurin (Java) or python:slim containers.
  • Features a strict 10-second hardware kill-switch and memory limits to prevent infinite loops, resource exhaustion, and unauthorized data exfiltration.

πŸ› οΈ Technical Stack

Layer Technology
Brain Llama 3.3 70B via Groq Cloud
Orchestration LangGraph, LangChain
Backend FastAPI, Uvicorn, Python 3.11
Database PostgreSQL + pgvector extension
Execution Docker SDK for Python
Frontend Next.js 14, Tailwind CSS, Lucide Icons

πŸ›‘οΈ Security Architecture

CodeOps ULTRA operates on a strict Defense-in-Depth model:

  • Instructional Layer: Strict system prompting defines the Agent's moral boundaries.
  • Policy Layer (RAG): Mandatory security headers and logic are injected directly from the Vector DB.
  • Audit Layer: The QA Agent performs a pre-flight scan of all logic.
  • Execution Layer: Docker isolates the host OS from the generated code.
  • Temporal Layer: The 10s timeout prevents the sandbox from becoming a permanent threat vector.

πŸ—οΈ System Architecture

graph TD
    %% Custom Enterprise Styling
    classDef interface fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:8px,ry:8px
    classDef gateway fill:#1e1b4b,stroke:#8b5cf6,stroke-width:2px,color:#fff,rx:8px,ry:8px
    classDef agent fill:#022c22,stroke:#10b981,stroke-width:2px,color:#fff,rx:8px,ry:8px
    classDef db fill:#450a0a,stroke:#ef4444,stroke-width:2px,color:#fff,rx:8px,ry:8px
    classDef docker fill:#082f49,stroke:#0ea5e9,stroke-width:2px,color:#fff,rx:8px,ry:8px

    %% Interface Layer
    subgraph Interfaces["🌐 The Interface Ecosystem"]
        direction LR
        UI["πŸ–₯️ Next.js Dashboard"]:::interface
        VSC["πŸ’» VS Code Extension<br>(TypeScript)"]:::interface
        CLI["⚑ Terminal CLI<br>(Rich/Typer)"]:::interface
        GH["πŸ™ GitHub Webhook<br>(PR Bot)"]:::interface
    end

    %% Gateway
    API["⚑ FastAPI Async Gateway<br>(Uvicorn + REST)"]:::gateway

    %% Cognitive Core
    subgraph Cognitive["🧠 LangGraph Cognitive Core"]
        direction LR
        Dev["πŸ‘¨β€πŸ’» Developer Agent<br>(Llama 3.3 70B)"]:::agent
        QA["πŸ•΅οΈβ€β™‚οΈ QA Auditor Agent<br>(Middleware Sanitizer)"]:::agent
        Dev -->|Submits Code| QA
        QA -.->|Rejects & Prompts| Dev
    end

    %% Memory & Telemetry
    subgraph Storage["πŸ—„οΈ State & Memory Storage"]
        direction TB
        VectorDB["πŸ—‚οΈ RAG Memory<br>(PostgreSQL + pgvector)"]:::db
        SQLite["πŸ“Š Observability DB<br>(SQLite Telemetry)"]:::db
    end

    %% Execution Engine
    subgraph Execution["πŸ—οΈ Polyglot Docker Sandbox"]
        direction TB
        Docker["🐳 Docker Daemon"]:::docker
        Sandbox["πŸ“¦ Ephemeral Containers<br>(Python, Java, C++, JS)"]:::docker
        Docker --- Sandbox
    end

    %% Routing
    Interfaces ==>|JSON Payloads| API
    API ==>|Route: /solve| Cognitive
    API ==>|Route: /review| FastReview["⚑ Standalone Code Review<br>(Groq Llama 3.3)"]:::agent
    API ==>|Logs Events| SQLite
    
    VectorDB -.->|Injects Policies| Dev
    QA ==>|Approved Code| Docker
    Sandbox ==>|Streams Stdout/Logs| API
Loading

πŸ“₯ Installation & Setup

1. Prerequisites

  • Docker Desktop installed and running.
  • Python 3.11+ environment.
  • Node.js 20+ (for Frontend).
  • Groq API Key.

2. Backend Engine Setup

# Clone the repository
git clone https://github.com/Arjo216/CodeOps-ULTRA.git
cd CodeOps-ULTRA/backend

# Install dependencies
pip install -r requirements.txt

# Configure Environment Variables
# Create a .env file in the root directory
echo "GROQ_API_KEY=your_groq_key_here" >> ../.env
echo "GITHUB_TOKEN=your_github_pat_here" >> ../.env
echo "DATABASE_URL=postgresql://ultra_admin:ultra_secure_password@127.0.0.1:5432/codeops_memory" >> ../.env

# Initialize the Vector Database
python init_rag.py

# Start the Async API Server (Auto-generates SQLite Telemetry DB)
uvicorn server_api:app --host 127.0.0.1 --port 8000 --reload

3. Frontend Setup

cd ../frontend
npm install
npm run dev

Visit http://localhost:3000 to access the Mission Control Dashboard.

4. VS Code Extension Packaging

# Navigate to the extension folder
cd ../codeops-ultra 

# Install dependencies and the packaging tool
npm install
npm install -g @vscode/vsce

# Package the extension into a .vsix binary file
vsce package

# Install the packaged extension directly into your local VS Code IDE
code --install-extension codeops-ultra-0.0.1.vsix

πŸ“‹ Example Use Cases

  • Secure Web Scraping: Fetch news headlines or stock data without risking local system integrity.

  • Enterprise Data Analysis: Upload CSVs and generate verified visualization code that never leaves the organization.

  • Policy Enforcement: Automatically add "Verified" headers and security comments to every internal script.

πŸŽ“ Academic Credits

Developed as a Senior B-Tech Project focusing on the intersection of AI Agents, Vector Databases, and Containerized Security.

πŸ“œ License

Distributed under the Apache License 2.0. See LICENSE for more information.

Engineered for maximum security and autonomy.

About

An enterprise AI DevSecOps platform featuring a Dual-Mode LangGraph core, deterministic RAG, and secure Docker sandboxing. Accessible via a Next.js dashboard, VS Code extension, Hacker CLI, and an autonomous GitHub PR bot.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors