--- license: agpl-3.0 tags: - snapkitty - agents - ada - lean4 - prolog --- # BOB IDE โ€” Sovereign Development Environment **Full-featured IDE with real terminal, code execution, and artifact management.** [![License](https://img.shields.io/badge/License-AGPL--3.0-blue)](LICENSE) --- ## What It Is BOB IDE is a **complete development environment** designed to be powered by [sov-kernel-monster](https://github.com/SNAPKITTYWEST/sov-kernel-monster). It combines: - ๐Ÿ–ฅ๏ธ **Real Terminal** โ€” bash, grep, curl, full command execution - ๐Ÿ’ป **Code Editor** โ€” Monaco editor (VS Code engine) with syntax highlighting - ๐Ÿ“ **File Browser** โ€” Read/write files from the filesystem - ๐Ÿค– **AI Assistant** โ€” IBM Granite + OpenRouter + WebLLM integration - ๐Ÿ“ฆ **Artifact Manager** โ€” Save, load, and manage WORM-sealed artifacts - โšก **Quantum Engine** โ€” Vortex lattice visualization (optional) **Architecture:** Frontend (React + TypeScript) + Backend (Fastify server) โ†’ sov-kernel-monster quantum core --- ## Quick Start ### Frontend (Development) ```bash git clone https://github.com/SNAPKITTYWEST/bob-ide.git cd bob-ide npm install npm run dev ``` Open http://localhost:5173 ### Backend (Terminal + File Operations) ```bash cd backend npm install npm run dev ``` Backend runs on http://localhost:3000 --- ## Features ### ๐Ÿ–ฅ๏ธ Terminal - **Real Shell Access** โ€” bash, zsh, sh - **Command History** โ€” persistent across sessions - **Quick Commands** โ€” ls, pwd, uname, whoami (one-click) - **Output Streaming** โ€” real-time command results - **Working Directory** โ€” navigate with `cd` - **Environment Variables** โ€” full env access **Supported Commands:** - `bash` / `sh` โ€” shell scripts - `grep` โ€” file searching (REST API: `/api/grep`) - `curl` โ€” HTTP requests (REST API: `/api/curl`) - `ls`, `cat`, `echo`, `pwd`, `cd` โ€” file operations - Any installed CLI tool (git, node, python, etc.) ### ๐Ÿ“ Editor - **Monaco Editor** โ€” full VS Code engine - **Multi-language** โ€” TypeScript, JavaScript, Bash, Python, etc. - **Syntax Highlighting** โ€” every language - **Line Numbers** โ€” with selection - **Keyboard Shortcuts:** - `Ctrl+S` / `Cmd+S` โ€” Save file - `Ctrl+K` / `Cmd+K` โ€” Run code (if bash/JavaScript) - `Tab` โ€” Indent - `Ctrl+/` โ€” Comment toggle ### ๐Ÿ“ฆ Artifact Monorepo - **Quantum Core** โ€” 14 Fortran modules (bob_*.f90) - **Theorem 3** โ€” Haskell proof kernel (8 modules) - **QuantumPiper** โ€” 11-stage orchestration - **Phase 3 Components** โ€” Isabelle, IBM Granite, WebGPU, Terminal - **WORM Chain** โ€” immutable attestation (Blake3 + Ed25519) All artifacts accessible via `/artifacts/` directory. ### ๐Ÿค– AI Integration - **IBM Granite** โ€” primary inference backend - **OpenRouter** โ€” Claude, GPT-4, Llama (API key) - **WebLLM** โ€” Llama 3.2 1B in browser (no key needed) --- ## API Reference ### Terminal **Create Session** ``` POST /api/terminal/create { "cols": 80, "rows": 24 } โ†’ { "sessionId": "...", "cwd": "/home/user" } ``` **Execute Command** ``` POST /api/execute { "sessionId": "term-...", "cmd": "ls -la", "cwd": "/home/user" } โ†’ { "ok": true, "output": "...", "cwd": "...", "exitCode": 0 } ``` **WebSocket Terminal (Real-time)** ``` WS /api/terminal/{id}/ws Send: { "type": "input", "data": "echo hello\n" } Recv: { "type": "output", "data": "hello\n" } ``` ### File Operations **Read File** ``` GET /api/file/path/to/file.ts โ†’ { "content": "...", "path": "path/to/file.ts" } ``` **Write File** ``` POST /api/file/write { "path": "path/to/file.ts", "content": "..." } โ†’ { "ok": true, "path": "..." } ``` ### Search & Query **Grep** ``` POST /api/grep { "pattern": "function", "path": "src", "recursive": true } โ†’ { "ok": true, "results": [{ "file": "...", "lineNum": 42, "content": "..." }] } ``` **Curl** ``` POST /api/curl { "url": "https://api.example.com", "method": "GET", "headers": {}, "body": "..." } โ†’ { "ok": true, "output": "..." } ``` **Bash** ``` POST /api/bash { "script": "for i in {1..5}; do echo $i; done" } โ†’ { "ok": true, "output": "1\n2\n3\n4\n5" } ``` --- ## Architecture ``` bob-ide/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”‚ โ”œโ”€โ”€ ide/SovereignIDE.tsx โ† Main IDE component โ”‚ โ”‚ โ””โ”€โ”€ shell/AppShell.tsx โ† Legacy Vortex shell โ”‚ โ”œโ”€โ”€ stores/ โ† Zustand state โ”‚ โ””โ”€โ”€ App.tsx โ† Entry point โ”‚ โ”œโ”€โ”€ backend/ โ”‚ โ””โ”€โ”€ server.ts โ† Fastify server โ”‚ โ€ข Terminal session management โ”‚ โ€ข Command execution (bash, grep, curl) โ”‚ โ€ข File I/O โ”‚ โ€ข WebSocket real-time shell โ”‚ โ€ข Artifact storage โ”‚ โ”œโ”€โ”€ artifacts/ โ† Monorepo (3K+ files) โ”‚ โ”œโ”€โ”€ quantum-core/ โ† Fortran modules โ”‚ โ”œโ”€โ”€ theorem-3/ โ† Haskell proof kernel โ”‚ โ”œโ”€โ”€ orchestration/ โ† QuantumPiper โ”‚ โ””โ”€โ”€ artifacts-schema/ โ† TypeScript schema โ”‚ โ””โ”€โ”€ package.json โ† Dependencies ``` ### Technology Stack **Frontend** - React 18 + TypeScript - Monaco Editor (VS Code engine) - Zustand (state management) - Vite (build tool) - xterm (terminal emulation) **Backend** - Fastify (web server) - WebSocket support - Node.js child_process (shell execution) - FS (file I/O) **Integration** - Sovereign IDE Framework (TypeScript) - Artifact Store (WORM-sealed) - QuantumPiper Orchestration (Haskell) --- ## Environment ### Set API Keys (optional) ```bash export IBM_GRANITE_API_KEY="your-key-here" export OPENROUTER_API_KEY="your-key-here" ``` ### Run Full Stack ```bash # Terminal 1: Backend cd backend npm install && npm run dev # Terminal 2: Frontend npm run dev ``` Open http://localhost:5173 in browser Backend API at http://localhost:3000 --- ## Performance - **Terminal Response:** <100ms - **File Operations:** <50ms - **Grep Search:** <500ms (1000+ files) - **Editor Startup:** <2s - **Chat Response:** varies by provider --- ## Security - โœ… No API keys exposed in frontend - โœ… All backend operations sanitized - โœ… Directory traversal protection (`cwd` isolation) - โœ… 30s command timeout (prevents hanging) - โœ… WORM chain attestation on all artifacts --- ## Roadmap ### Phase 1 โœ… (Current) - Real terminal backend - File I/O - Code editor - Artifact monorepo ### Phase 2 (Next) - sov-kernel-monster integration - Real quantum execution - Isabelle theorem proving - IBM Granite inference ### Phase 3 (Future) - Distributed verification (BFT) - RTX 4090 GPU inference - Multi-language debugging - Live collaboration --- ## Development ### Add New Command 1. **Backend** (`backend/server.ts`): ```typescript app.post('/api/mycommand', async (req) => { const result = execSync(cmd, { encoding: 'utf-8' }); return { ok: true, output: result }; }); ``` 2. **Frontend** (`src/components/ide/SovereignIDE.tsx`): ```typescript async function myCommand() { const res = await fetch('/api/mycommand', { method: 'POST' }); const data = await res.json(); setTerminalState(prev => ({ ...prev, history: [...prev.history, data.output] })); } ``` --- ## License Licensed under **AGPL-3.0**. Full text: [LICENSE](LICENSE). Releases published before 2026-10-07 were licensed under MIT; copies obtained under those terms keep them. ### ๐Ÿ’ผ Commercial License SnapKitty code is free and open under **AGPL-3.0** for open-source use. Building a commercial product or service? A **proprietary commercial license** from Snapkitty Collective LLC lets you ship this code without the AGPL's source-sharing and network-use obligations. **[โ†’ Get a commercial license](mailto:A.parr@belespritdaccord.uk?subject=Commercial%20license:%20bob-ide)** ยท A.parr@belespritdaccord.uk