# ruvnet/ruos architecture

> Architecture diagram of the GitHub repository ruvnet/ruos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ruvnet/ruos
- Repository: https://github.com/ruvnet/ruos

## Overview

ruOS is an agentic Linux desktop whose control-and-extension surface is exposed here: clients can view the desktop, drive it through MCP, or use the bundled ruvnet skills. The principal control workflow is MCP client → stdio-over-SSH server → desktop actions and shell, with named system actions proxied to a desktop-local executor. Viewer access and the skills are separate documented capabilities. The desktop, viewer, and executor implementations are not in this repository; their relationships are shown only where the README documents them.

Main entry points: [`mcp/src/main.rs`](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs) (ruos-mcp server), [`skills/ruflo-swarm/SKILL.md`](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-swarm/SKILL.md) (Ruflo swarm), [`skills/ruflo-memory/SKILL.md`](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-memory/SKILL.md) (Ruflo memory), [`skills/ruflo-hooks/SKILL.md`](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-hooks/SKILL.md) (Ruflo hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_view["Desktop access"]
  node_browser["Browser viewer"]
  node_ipad["iPad PWA"]
  node_macos["macOS Connect"]
  node_viewer["Viewer front"]
end

subgraph group_control["MCP control plane"]
  node_mcp["ruos-mcp server<br/>[main.rs]"]
  node_gui["GUI controls<br/>[main.rs]"]
  node_shell["Shell access<br/>[main.rs]"]
  node_system["System actions<br/>[main.rs]"]
  node_resolution["Resolution control<br/>[main.rs]"]
end

subgraph group_runtime["Desktop runtime"]
  node_desktop["ruOS desktop VM"]
  node_tools["Desktop tools"]
  node_executor["Local executor"]
end

subgraph group_skills["Agent skills"]
  node_swarm["Ruflo swarm<br/>[SKILL.md]"]
  node_memory["Ruflo memory<br/>[SKILL.md]"]
  node_hooks["Ruflo hooks<br/>[SKILL.md]"]
  node_ruvector["RuVector substrate<br/>[SKILL.md]"]
end

node_client(("AI client"))
node_terminal(("Desktop terminal"))

node_browser -->|"opens"| node_viewer
node_ipad -->|"opens"| node_viewer
node_macos -->|"views"| node_desktop
node_viewer -->|"streams"| node_desktop
node_client -->|"launches via SSH"| node_mcp
node_mcp -->|"dispatches tools"| node_gui
node_mcp -->|"dispatches tools"| node_shell
node_mcp -->|"dispatches tools"| node_system
node_mcp -->|"dispatches tools"| node_resolution
node_gui -->|"runs commands"| node_tools
node_shell -->|"runs commands"| node_desktop
node_system -->|"proxies action"| node_executor
node_resolution -->|"proxies request"| node_executor
node_executor -->|"runs actions"| node_desktop
node_terminal -->|"invokes"| node_swarm
node_terminal -->|"invokes"| node_memory
node_terminal -->|"invokes"| node_hooks
node_terminal -->|"invokes"| node_ruvector
node_client -->|"invokes"| node_swarm
node_client -->|"invokes"| node_memory
node_client -->|"invokes"| node_hooks
node_client -->|"invokes"| node_ruvector

click node_mcp "https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs"
click node_gui "https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs"
click node_shell "https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs"
click node_system "https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs"
click node_resolution "https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs"
click node_swarm "https://github.com/ruvnet/ruos/blob/master/skills/ruflo-swarm/SKILL.md"
click node_memory "https://github.com/ruvnet/ruos/blob/master/skills/ruflo-memory/SKILL.md"
click node_hooks "https://github.com/ruvnet/ruos/blob/master/skills/ruflo-hooks/SKILL.md"
click node_ruvector "https://github.com/ruvnet/ruos/blob/master/skills/ruvector/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_ipad,node_macos,node_viewer,node_client toneBlue
class node_mcp,node_gui,node_shell,node_system,node_resolution toneAmber
class node_desktop,node_tools,node_executor toneMint
class node_swarm,node_memory,node_hooks,node_ruvector toneRose
class node_terminal toneIndigo
```

## Components

### Desktop access

- **Browser viewer**
- **iPad PWA**
- **macOS Connect**
- **Viewer front**

### MCP control plane

- [ruos-mcp server](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs): `mcp/src/main.rs`
- [GUI controls](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs): `mcp/src/main.rs`
- [Shell access](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs): `mcp/src/main.rs`
- [System actions](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs): `mcp/src/main.rs`
- [Resolution control](https://github.com/ruvnet/ruos/blob/master/mcp/src/main.rs): `mcp/src/main.rs`

### Desktop runtime

- **ruOS desktop VM**
- **Desktop tools**
- **Local executor**

### Agent skills

- [Ruflo swarm](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-swarm/SKILL.md): `skills/ruflo-swarm/SKILL.md`
- [Ruflo memory](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-memory/SKILL.md): `skills/ruflo-memory/SKILL.md`
- [Ruflo hooks](https://github.com/ruvnet/ruos/blob/master/skills/ruflo-hooks/SKILL.md): `skills/ruflo-hooks/SKILL.md`
- [RuVector substrate](https://github.com/ruvnet/ruos/blob/master/skills/ruvector/SKILL.md): `skills/ruvector/SKILL.md`

### Other components

- **AI client**
- **Desktop terminal**

## Connections

- Browser viewer → Viewer front: opens (evidence: `README.md`)
- iPad PWA → Viewer front: opens (evidence: `README.md`)
- macOS Connect → ruOS desktop VM: views (evidence: `README.md`)
- Viewer front → ruOS desktop VM: streams (evidence: `README.md`)
- AI client → ruos-mcp server: launches via SSH (evidence: `README.md`)
- ruos-mcp server → GUI controls: dispatches tools (evidence: `mcp/src/main.rs`)
- ruos-mcp server → Shell access: dispatches tools (evidence: `mcp/src/main.rs`)
- ruos-mcp server → System actions: dispatches tools (evidence: `mcp/src/main.rs`)
- ruos-mcp server → Resolution control: dispatches tools (evidence: `mcp/src/main.rs`)
- GUI controls → Desktop tools: runs commands (evidence: `mcp/src/main.rs`)
- Shell access → ruOS desktop VM: runs commands (evidence: `mcp/src/main.rs`)
- System actions → Local executor: proxies action (evidence: `mcp/src/main.rs`)
- Resolution control → Local executor: proxies request (evidence: `mcp/src/main.rs`)
- Local executor → ruOS desktop VM: runs actions (evidence: `README.md`)
- Desktop terminal → Ruflo swarm: invokes (evidence: `README.md`)
- Desktop terminal → Ruflo memory: invokes (evidence: `README.md`)
- Desktop terminal → Ruflo hooks: invokes (evidence: `README.md`)
- Desktop terminal → RuVector substrate: invokes (evidence: `README.md`)
- AI client → Ruflo swarm: invokes (evidence: `README.md`)
- AI client → Ruflo memory: invokes (evidence: `README.md`)
- AI client → Ruflo hooks: invokes (evidence: `README.md`)
- AI client → RuVector substrate: invokes (evidence: `README.md`)
