{"id":51549034,"url":"https://github.com/alazndy/r-ai-os","last_synced_at":"2026-07-09T22:00:33.493Z","repository":{"id":355867349,"uuid":"1228973235","full_name":"alazndy/R-AI-OS","owner":"alazndy","description":"Universal AI Agent Kernel \u0026 Terminal Control Center. Rust-based hardened kernel with Vigils security, real-time observability, and tamper-evident audit ledger.","archived":false,"fork":false,"pushed_at":"2026-07-06T23:46:19.000Z","size":83499,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-07-07T00:13:34.402Z","etag":null,"topics":["agent-kernel","ai-os","async-rust","audit-ledger","hardened-kernel","mcp-server","observability","ratatui","redaction-engine","rust","security","sentry","sha256-hashing","sqlite","status-alpha","t-ecosystem","tamper-evident","tokio","vigils"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alazndy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-04T15:10:51.000Z","updated_at":"2026-07-06T23:46:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alazndy/R-AI-OS","commit_stats":null,"previous_names":["alazndy/r-ai-os"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/alazndy/R-AI-OS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alazndy%2FR-AI-OS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alazndy%2FR-AI-OS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alazndy%2FR-AI-OS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alazndy%2FR-AI-OS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alazndy","download_url":"https://codeload.github.com/alazndy/R-AI-OS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alazndy%2FR-AI-OS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35313756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-kernel","ai-os","async-rust","audit-ledger","hardened-kernel","mcp-server","observability","ratatui","redaction-engine","rust","security","sentry","sha256-hashing","sqlite","status-alpha","t-ecosystem","tamper-evident","tokio","vigils"],"created_at":"2026-07-09T22:00:22.303Z","updated_at":"2026-07-09T22:00:33.479Z","avatar_url":"https://github.com/alazndy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# R-AI-OS Kernel\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"vscode-extension/icon.png\" width=\"180\" alt=\"R-AI-OS Logo\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cpre\u003e\n  ╔═╗ ══════════════════════════════════════════ ╔═╗\n  ║ ╚╗                                          ╔╝ ║\n  ╚═╗║         ▄█████████████▄                  ║╔═╝\n    ║║      ▄█▀  ┌─────────┐  ▀█▄               ║║\n    ║║   ▄█▀  ───│   · │ · │───  ▀█▄            ║║\n    ║║   █ ─────│   │ R │  │ ───── █           ║║\n    ║║   ▀█▄  ───│   · │ · │───  ▄█▀            ║║\n    ║║      ▀█▄  └─────────┘  ▄█▀               ║║\n  ╔═╝║         ▀█████████████▀                  ║╚═╗\n  ║ ╔╝   · · ·   R - A I - O S   KERNEL  v3.3   ╚╗ ║\n  ╚═╝ ══════════════════════════════════════════ ╚═╝\n\u003c/pre\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA Hardened, LLM-Native OS Kernel for Autonomous Agent Swarms\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/alazndy/r-ai-os/releases\"\u003e\u003cimg src=\"https://img.shields.io/badge/version-v3.3.0-blue?style=for-the-badge\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://rust-lang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Built%20with-Rust-orange?style=for-the-badge\u0026logo=rust\" alt=\"Rust\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/alazndy/r-ai-os/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/alazndy/r-ai-os?style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"#-security-kernel\"\u003e\u003cimg src=\"https://img.shields.io/badge/Security-Hardened-green?style=for-the-badge\" alt=\"Security\"\u003e\u003c/a\u003e\n  \u003ca href=\"#-vs-code-extension\"\u003e\u003cimg src=\"https://img.shields.io/badge/VS%20Code-v0.8.0-blueviolet?style=for-the-badge\u0026logo=visualstudiocode\" alt=\"VS Code\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#-the-vision\"\u003eVision\u003c/a\u003e •\n  \u003ca href=\"#-security-kernel\"\u003eSecurity\u003c/a\u003e •\n  \u003ca href=\"#-tri-protocol-interface\"\u003eProtocols\u003c/a\u003e •\n  \u003ca href=\"#-core-modules\"\u003eModules\u003c/a\u003e •\n  \u003ca href=\"#-vs-code-extension\"\u003eVS Code\u003c/a\u003e •\n  \u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#-cli-reference\"\u003eCLI\u003c/a\u003e •\n  \u003ca href=\"#-roadmap\"\u003eRoadmap\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 🔭 The Vision\n\nR-AI-OS is not a CLI tool — it is a **Kernel**. While traditional operating systems manage hardware, R-AI-OS manages the **AI layer**: a decentralized swarm of autonomous specialists running across Claude Code, Codex CLI, OpenCode, Antigravity (`agy`), and any MCP-compatible agent, drawing on external agent/skill ecosystems (Maestro, everything-claude-code) that `raios new`/`raios bootstrap` can pull in — see [CLI Reference](#-cli-reference) for what's actually installed on your machine.\n\nIt solves the fundamental problem of **unsupervised agent execution**: agents that run unchecked can leak secrets, corrupt files, and make unauthorized network calls. R-AI-OS sits between the human and the swarm as a hardened control plane — enforcing policies, auditing every action, and managing context economics.\n\n```\nHuman → [ R-AI-OS Kernel ] → Agent Swarm (Claude / Gemini / MCP)\n              ↓\n    ┌──────────────────────────────────────────────┐\n    │  Security Kernel  │  Cortex  │  Swarm Mesh  │\n    │  Policy Gate      │  BM25+V  │  Lock Mgr    │\n    │  Audit Ledger     │  Sigmap  │  Factory Mode│\n    └──────────────────────────────────────────────┘\n         ↓ TCP :42069   ↓ MCP :42070   ↓ HTTP :42071\n```\n\n---\n\n## 🛡️ Security Kernel\n\nThe Security Kernel is the core of R-AI-OS. It enforces a **zero-trust model** for all agent tool calls: every action is policy-gated, logged, and auditable. All 4 phases are implemented and tested.\n\n### Architecture\n\n```\nsrc/security/\n├── sandbox.rs       # Phase 1 — Filesystem Jail (canonicalize + boundary)\n├── policy.rs        # Phase 2 — Policy Manager (TOML allow/deny/confirm)\n├── verify_chain.rs  # Phase 3 — Audit Chain (SHA-256 hash-chained SQLite)\n└── egress.rs        # Phase 4 — Egress Filter (domain allowlist, fail-closed)\n```\n\n### Phase 1 — Filesystem Jail\n\nPrevents agents from reading or writing outside their designated workspace boundary. Uses path canonicalization to defeat traversal attacks.\n\n```toml\n# raios-policy.toml\n[sandbox]\nenabled = true\nworkspace_root = \"/home/user/projects/my-app\"\n```\n\n### Phase 2 — Policy Manager\n\nEvery MCP tool call passes through a policy gate before execution. Rules are defined in `raios-policy.toml` and evaluated in order. Fail-closed by design: `confirm` rules in headless mode deny without an interactive prompt.\n\n```toml\n[tools]\ndefault_action = \"confirm\"\n\n[[tools.rules]]\nname = \"list_projects\"\naction = \"allow\"\n\n[[tools.rules]]\nname = \"run_build\"\naction = \"deny\"\n```\n\nMatching is by exact tool `name`, not by a path glob — per-path filesystem access is a separate concept (`[tools.rules.capabilities]`, declarative today, see `security::capabilities`), not a rule action.\n\n### Phase 3 — Audit Chain\n\nEvery allow/deny decision is written to a tamper-evident, SHA-256 hash-chained SQLite ledger. Each entry links to the previous entry's hash — any tampering is immediately detectable.\n\n```bash\nraios verify-chain          # verify full chain integrity\nraios verify-chain -n 50    # show last 50 entries then verify\n```\n\n### Phase 4 — Egress Filter\n\nDomain-level allowlist/blocklist for HTTP/HTTPS calls made via MCP tools. Fail-closed: unrecognized domains are denied unless explicitly allowed.\n\n```toml\n[egress]\nmode = \"allowlist\"\nallowed = [\"api.anthropic.com\", \"api.openai.com\", \"*.github.com\"]\n```\n\n### Redaction Engine\n\nAutomatically masks sensitive values (API keys, GCP secrets, PII patterns) before they appear in logs or telemetry. Built on `regex` with 20+ detection patterns.\n\n### Session Token Auth\n\nAll HTTP API calls require a Bearer token stored in the OS config directory under `raios/.session_token` (SHA-256, 8h TTL). The Host header is additionally validated to block DNS rebinding attacks.\n\n---\n\n## 🔌 Tri-Protocol Interface\n\nAll three protocols share one event bus and one security kernel:\n\n| Protocol | Port | Purpose |\n| :--- | :--- | :--- |\n| `Daemon TCP` | `:42069` | IPC between CLI and background daemon — UUID token auth, mandatory handshake |\n| `MCP-over-TCP` | `:42070` | Agent tool calls — policy-gated, every call logged to audit ledger |\n| `HTTP / WebSocket` | `:42071` | VS Code extension + external integrations — Bearer auth + Host validation |\n\n### HTTP API Endpoints\n\n| Method | Path | Description |\n| :--- | :--- | :--- |\n| `GET` | `/api/health` | Daemon health + active agent count |\n| `GET` | `/api/projects` | All tracked projects from DaemonState |\n| `GET` | `/api/tasks` | Tasks from SQLite (grouped by project) |\n| `GET` | `/api/usage` | Local usage/quota signals for Claude, Codex, OpenCode, Antigravity |\n| `GET` | `/api/plans` | Plans from `docs/superpowers/plans/*.md` with checkbox progress |\n| `GET` | `/api/git-status?path=\u003cdir\u003e` | Git branch + dirty/staged/modified/untracked for a workspace |\n| `GET` | `/api/swarm` | Active (non-terminal) swarm tasks |\n| `POST` | `/api/approve` | Approve a swarm task (merge branch) or pending diff (write file) |\n| `GET` | `/api/stream` | WebSocket — real-time kernel event stream |\n\n---\n\n## 🧠 Core Modules\n\n### 📉 Cortex — Token Budgeter \u0026 Context Manager\n\n- **Sigmap:** Up to 97% token reduction via high-density signature mapping (`SIGMAP.md`)\n- **BM25 persistence:** Index survives restarts via mtime-based invalidation\n- **Vector store:** Binary SQLite BLOBs — transaction-safe, no JSON drift\n- **Session memory:** Per-agent `memory.md` auto-append\n\n### 🎯 Unified Agent Router\n\nMaps natural-language task descriptions to the right specialist using local BM25 + vector hybrid indexing. Bridges the Maestro and ECC (everything-claude-code) agent ecosystems natively — exact agent counts depend on those upstream projects' current state, not something R-AI-OS pins or guarantees.\n\n### 🔄 Agent Swarm Mesh\n\nParallel worktree-based agent execution with coordination primitives:\n\n- **SwarmStore:** SQLite-backed task registry. States: `Initializing → Running → AwaitingReview → Merged / Rejected / Failed`\n- **Lock Manager:** File and task-level locks with priority levels (User \u003e Agent \u003e Automation)\n- **Radar Whispers:** Real-time context hints pushed to all connected agents\n- **Factory Mode:** Submit heavy jobs async; completion fires broadcast + optional webhook\n\n### 📊 Portfolio Intelligence\n\n- **Neural Search:** Semantic search across 140+ projects with BM25 + embeddings\n- **Health Scanner:** Background scan for `memory.md` compliance, security leaks, git drift\n- **GitHub Sync:** Live star counts and last-commit timestamps\n- **Auto-Discovery:** Detects new workspace directories and updates `entities.json`\n\n### 📨 Agent Handoff — Atomic, Control-Plane-Backed\n\nAgents hand work to each other through the same control plane that already tracks tasks, runs, artifacts, and approvals — not a side-channel state file:\n\n```bash\nraios handoff --to codex-kaira --status success --msg \"skeleton ready, implement auth handlers\"\n```\n\n- `--msg` is scanned for obvious secrets (AWS/Anthropic/OpenAI/GitHub keys, PEM blocks) and refused before it touches the DB or a process argument list.\n- `git diff --stat HEAD` is attached automatically — the receiving agent sees what changed without being told.\n- A new handoff to the same agent/project supersedes any still-pending one (old approval → `expired`, artifact → `superseded`, task → `cancelled`), so the queue never accumulates stale notes.\n- Delivery is real, not an unread env var: the next `raios run`/`raios task` for that agent injects the `[HANDOVER CONTEXT]` via the CLI's own prompt flag — `claude --append-system-prompt`, `codex \u003cprompt\u003e`, `opencode --prompt`, `agy --prompt-interactive` — and marks it consumed only once the process actually starts.\n- Visible at the terminal via the **Inbox** TUI panel (pending approvals, active runs, blocked tasks) or programmatically via the `get_inbox` MCP tool.\n\n### 🧠 Trace Memory — Local Fix Recall\n\nR-AI-OS can now store compact tool/session traces locally and recall them before repeating the same failure:\n\n```bash\nraios trace record --project R-AI-OS --command \"cargo test -p raios-runtime\" \\\n  --error \"trace recall missed partial phrase\" \\\n  --fix \"fall back to significant query tokens before project fallback\" \\\n  --tag trace --success\nraios trace search \"partial phrase\" --project R-AI-OS --success-only\nraios evolve from-traces --project R-AI-OS\nraios trace kg-export \"partial phrase\" --project R-AI-OS\n```\n\n- Traces are stored in SQLite (`tool_traces`) with exact-content deduplication and confidence metadata.\n- Secret-like inputs are refused before raw trace content is stored; redacted refusal rows keep an audit trail without persisting the secret.\n- Handoffs automatically attach relevant successful trace memory, and `raios run` augments incoming `[HANDOVER CONTEXT]` with prior fixes.\n- Post-run session reviews auto-record trace rows only when there is a failure, risk, or learned decision, avoiding noisy memory pollution.\n- `raios evolve from-traces` converts useful trace fixes into pending instinct candidates; promotion remains a human-controlled step.\n- `raios trace kg-export` emits MemPalace-compatible KG triple JSON for MCP ingestion without silently writing to an external semantic store.\n\n### ⏳ Lifecycle Worker\n\nBackground daemon task (`src/daemon/lifecycle.rs`) that keeps project status honest without manual upkeep. Every `lifecycle_interval_secs`, it checks each tracked project's last commit time and transitions status automatically:\n\n| Transition | Trigger |\n| :--- | :--- |\n| `active` → `beklemede` | No commit for `lifecycle_standby_days` (default: 14) |\n| `beklemede` → `archived` | No commit for `lifecycle_archive_days` (default: 90) |\n| `beklemede` / `archived` → `active` | A new commit is detected |\n\nManually pinned statuses (`production`, `early`, `legacy`) are never touched by the worker — only the automatic active/beklemede/archived cycle is managed. Configure via `~/.config/raios/config.toml`:\n\n```toml\n[daemon]\nlifecycle_standby_days = 14\nlifecycle_archive_days = 90\nlifecycle_interval_secs = 3600\n```\n\n---\n\n## 🖥️ VS Code Extension (v0.8.0)\n\nR-AI-OS ships a native VS Code extension that turns the IDE into a **Hybrid UI** — the control panel for your agent swarm directly in your sidebar.\n\n```\nvscode-extension/\n├── src/\n│   ├── extension.ts              # Activation + provider wiring\n│   ├── ipc/\n│   │   ├── DaemonClient.ts       # TCP :42069 connection\n│   │   ├── TokenBridge.ts        # Session token proxy (XSS-safe)\n│   │   └── DaemonManager.ts      # Auto-spawn aiosd, poll token file\n│   └── providers/\n│       ├── SidebarProvider.ts    # Main WebviewView control panel\n│       ├── StatusBarProvider.ts  # Live daemon indicator\n│       ├── DiagnosticProvider.ts # File-save security scan\n│       ├── RefactorProvider.ts   # Refactor surface analysis\n│       └── DiffInboxProvider.ts  # Pending diff approvals\n```\n\n### Control Panel Cards\n\n| Card | Source | Features |\n| :--- | :--- | :--- |\n| **Git Status** | `/api/git-status` | Branch name, dirty/clean badge, staged/modified/untracked counts |\n| **Plans** | `/api/plans` | Live progress bars per plan file, status chips |\n| **Tasks** | `/api/tasks` | Grouped by project, inline completion indicators |\n| **Swarm** | `/api/swarm` | Active agent tasks, status dots, inline Approve button for `awaiting_review` |\n| **Quick Actions** | Extension host | `cargo build` and `cargo test` via VS Code terminal |\n\n### Security Properties\n\n- **TokenBridge proxy:** The session token never enters the Webview context — all API calls go through the extension host. XSS in the webview cannot exfiltrate the token.\n- **Auto-spawn:** `DaemonManager` starts `aiosd` automatically if the socket isn't listening. Polls the token file and triggers sidebar refresh when ready.\n- **Host validation:** All HTTP calls include the `Host: localhost` header, enforced by the Axum auth middleware.\n\n### Install\n\nThe packaged `.vsix` is committed to the repo (`vscode-extension/raios-0.8.0.vsix`) so it can be installed directly without a Node toolchain:\n\n```bash\ncode --install-extension vscode-extension/raios-0.8.0.vsix --force\n```\n\nTo rebuild from source and reinstall, use the bundled script — it compiles, repackages, **uninstalls any existing `alazndy.raios` install first**, then installs the fresh `.vsix`. This guarantees only one version is ever registered, no matter how many times you re-run it:\n\n```bash\ncd vscode-extension \u0026\u0026 ./install.sh\n```\n\nManual equivalent, if you need the individual steps:\n\n```bash\ncd vscode-extension\nnpm install        # pulls in typescript + @vscode/vsce devDependencies\nnpm run compile\nnpx vsce package\ncode --uninstall-extension alazndy.raios   # drop the old version first\ncode --install-extension raios-*.vsix\n```\n\n**Keyboard shortcuts:**\n\n| Action | Windows / Linux | macOS |\n| :--- | :--- | :--- |\n| Security Scan | `Ctrl+Shift+R S` | `Cmd+Shift+R S` |\n| Health Check | `Ctrl+Shift+R H` | `Cmd+Shift+R H` |\n| Scan Current File | `Ctrl+Shift+R F` | `Cmd+Shift+R F` |\n\n---\n\n## 🚀 Quick Start\n\n```bash\ngit clone https://github.com/alazndy/R-AI-OS.git\ncd R-AI-OS\ncargo install --path . --force\n```\n\n### Reinstall / Upgrade (Linux/macOS)\n\nUse the bundled `install.sh` instead of running the steps above by hand. `cargo install --force` already replaces the binary at its single fixed path (`~/.cargo/bin/{raios,aiosd}`) — it physically cannot leave two copies behind — but a previously *running* `aiosd`/`raios-tray` process would otherwise keep serving the old code in memory until restarted. The script handles the full cycle:\n\n```bash\n./install.sh\n```\n\nWhat it does:\n1. `cargo build --release`\n2. `cargo install --path . --force` — replaces the existing binaries in place\n3. Restarts `aiosd.service` and `raios-tray.service` via `systemctl --user` (if present) so the new binary actually takes effect, not just the file on disk\n4. Warns if a stray `raios`/`aiosd` binary exists earlier on `$PATH` outside cargo's bin dir, which would silently shadow the freshly installed one\n\nStart the daemon (powers the TUI, MCP server, and HTTP API):\n\n```bash\naiosd\n```\n\nTune background load in `~/.config/raios/config.toml` when needed, especially on Windows:\n\n```toml\n[daemon]\nstartup_bm25_indexing = true\nstartup_cortex_indexing = false\nenable_health_worker = true\nhealth_interval_secs = 900\ngit_interval_secs = 300\nenable_sentinel_worker = false\nsentinel_interval_secs = 300\nenable_port_monitor = true\nport_monitor_interval_secs = 30\nport_probe_timeout_ms = 75\n```\n\nWindows defaults are now intentionally calmer: no eager Cortex indexing, no periodic Sentinel compile loop, slower health/git/port polling.\n\nLaunch the TUI:\n\n```bash\nraios\n```\n\nBootstrap your AI factory (syncs the Maestro/ECC agent and skill ecosystems, exact counts printed at the end of the run):\n\n```bash\nraios bootstrap\n```\n\n---\n\n## 💻 CLI Reference\n\n### Core Operations\n\n| Command | Description |\n| :--- | :--- |\n| `raios health` | Portfolio health dashboard — scans all projects |\n| `raios health \u003cproject\u003e` | Single-project health scan |\n| `raios usage` | Show local usage/quota signals across AI tools |\n| `raios search \"\u003cquery\u003e\"` | Semantic search across portfolio |\n| `raios new \"ProjectName\"` | Scaffold a new project (follows MASTER rules) |\n| `raios task \"\u003cdescription\u003e\"` | Route task to best agent |\n| `raios handoff --to \u003cagent\u003e --status \u003cSUCCESS\\|FAILED\\|BLOCKER\u003e --msg \"\u003ctext\u003e\"` | Atomic agent-to-agent handoff via the control plane |\n| `raios trace record/search/forget` | Store, recall, and delete local tool/session trace memory |\n| `raios trace kg-export [query]` | Export trace memory as MemPalace-compatible KG triple JSON |\n| `raios evolve from-traces` | Generate pending instinct candidates from successful trace fixes |\n| `raios bootstrap` | Replicate AI factory on a new machine |\n\n### Security\n\n| Command | Description |\n| :--- | :--- |\n| `raios verify-chain` | Verify audit log hash-chain integrity |\n| `raios verify-chain -n \u003cN\u003e` | Show last N entries then verify |\n| `raios security` | OWASP security scan |\n\n### Agent Swarm\n\n| Command | Description |\n| :--- | :--- |\n| `raios swarm start` | Start a parallel agent worktree |\n| `raios swarm list` | List active swarm tasks |\n| `raios swarm approve \u003cid\u003e` | Approve a pending swarm diff (merge branch) |\n\n### Git Operations\n\n| Command | Description |\n| :--- | :--- |\n| `raios git status` | Git status across portfolio |\n| `raios git log` | Recent commits |\n| `raios git commit` | Intelligent bulk commit |\n\n### Build \u0026 Dev\n\n| Command | Description |\n| :--- | :--- |\n| `raios build` | Build current project |\n| `raios test` | Run test suite |\n| `raios deps` | Dependency audit |\n| `raios env` | Environment variable scan |\n\n`raios usage` intentionally separates exact quota data from local auth metadata. If a provider does not expose remaining/reset counters locally, R-AI-OS prints `unknown` instead of guessing.\n\n---\n\n## 📁 Project Structure\n\n```\nsrc/\n├── bin/\n│   ├── raios.rs          # CLI entrypoint\n│   └── aiosd.rs          # Daemon entrypoint\n├── app/\n│   └── events/           # Event handling (actions, keyboard, commands)\n│       └── keyboard/     # Keyboard module (6 sub-modules)\n├── cli/                  # CLI command implementations\n├── core/\n│   ├── build/            # Build logic (language-specific, 10 sub-modules)\n│   └── deps/             # Dependency management (10 sub-modules)\n├── cortex/               # Vector store, BM25 index, session memory\n├── daemon/               # aiosd background daemon\n├── intelligence/         # Agent routing, instinct engine, RBJ\n├── mcp/                  # MCP server — policy-gated tool call handler\n├── search/               # Neural search (BM25 + vector hybrid)\n├── security/             # Security Kernel (sandbox, policy, chain, egress)\n├── sentinel/             # Redaction engine, Sentry integration\n├── server/               # HTTP/WebSocket server (Axum, :42071)\n├── swarm/                # Parallel worktree agent management + SQLite store\n└── ui/\n    └── panels/           # TUI panels (14 modules — dashboard, security, inbox, etc.)\n\nvscode-extension/\n├── src/\n│   ├── extension.ts      # Extension activation\n│   ├── ipc/              # DaemonClient, TokenBridge, DaemonManager\n│   ├── providers/        # Sidebar, StatusBar, Diagnostics, Refactor, Diffs\n│   ├── commands/         # CommandBridge\n│   └── bridge/           # JumpToCode\n├── icon.svg              # Master logo (512×512, source of truth)\n├── icon.png              # Extension marketplace icon (512×512)\n└── icon128.png           # Extension sidebar icon (128×128)\n```\n\n---\n\n## 🗺️ Roadmap\n\n- [x] **Phase 1–7:** Core TUI, workspace mapping, health dashboard, BM25 search\n- [x] **Phase 8:** Universal Kernel — Tri-protocol, Lock Manager, Radar Whispers, Factory Mode\n- [x] **Phase 9:** Refactor \u0026 Modularization — all large files split into focused modules\n- [x] **Phase 10:** Hardened Kernel Alpha — Sentry, Redaction Engine, Audit Ledger\n- [x] **Phase 10B:** Security Kernel (Phases 1–4) — Sandbox + Policy + Audit Chain + Egress\n- [x] **Phase IDE:** VS Code Extension — Sidebar WebView + TokenBridge + DaemonManager + Refactor Tree\n- [x] **Phase IDE v0.5:** Sidebar v2 — Git Status card, Swarm card with Approve, Quick Actions\n- [x] **Phase 11:** Tool Pinning \u0026 Drift Detection — SHA-256 manifest pin, `-32028` on mismatch, `raios pin-reset / pin-status`\n- [x] **Phase 12:** Secret Leasing — `raios secret grant/list/revoke \u003ctool\u003e \u003cENV_VAR\u003e` with TTL-based auto-revoke\n- [x] **Phase 13:** Rate Limiting — Fixed-window counter per tool, `-32029` on exceed, `raios rate-status`\n- [x] **Phase 14:** Quarantine Mode — Pattern-matched quarantine queue, `-32027` on block, `raios quarantine list/approve/deny`\n- [x] **Phase 15:** Write-Back Bridge — Sidebar checkboxes interactive, `raios task-update` CLI syncs back to `memory.md`\n- [x] **Phase 16:** Lifecycle Worker — git-activity-based auto active/beklemede/archived transitions (`src/daemon/lifecycle.rs`)\n- [x] **Phase 17:** 4-Agent Matrix \u0026 Atomic Handoff — Gemini CLI retired; Claude/Codex/OpenCode/Antigravity (`agy`) as canonical identities; `raios handoff` on the control plane with real per-CLI prompt injection, secret scanning, diff-stat attachment, and stale-handoff supersede; new TUI **Inbox** panel\n- [x] **Phase 18:** `aiosd` systemd user service auto-start on login — `aiosd.service` enabled via `systemctl --user enable aiosd`, `WantedBy=default.target`\n- [x] **Phase 19:** Cortex Real Embeddings — `default = [\"cortex\"]`, fastembed all-MiniLM-L6-v2, adaptive CPU throttling in embed_batch\n- [x] **Phase 20:** Autonomous Scheduler — `raios cron add/list/remove/pause/resume/run`, `cp_scheduled_jobs` control-plane table, atomic claim worker, `spawn_agent_detached` helper\n- [x] **Phase 21:** Trace Memory — `raios trace`, handoff/runtime recall, session-review auto trace, trace-to-evolution candidates, and MemPalace KG export\n- [x] **Phase 22:** Layered Memory \u0026 Lineage (L0→L3) — `mem_nodes`/`mem_lineage` give `mem_items` real traceability; replace-and-archive `mem_upsert` (fixes unbounded body growth); deterministic L1 atomic facts, L2 daily scenes, L3 persona; `raios mem history`/`--layer`; Mermaid `raios sessions --canvas`\n- [x] **Phase 23:** Operational Hardening — pattern-scan self-disclosure in `raios security`/`raios refactor`; `sigmap` config drift fix; `session_memory.rs` split into a focused module; `raios usage` reads live Claude Pro/Max quota via a statusLine cache bridge\n\n---\n\n**R-AI-OS is the bridge between human creativity and autonomous execution.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falazndy%2Fr-ai-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falazndy%2Fr-ai-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falazndy%2Fr-ai-os/lists"}