Runtime relationships
The key point is that oneDesktopRuntime core has two frontends: apps/desktop gives it a GPUI window, and apps/server gives it a daemon lifecycle. Both expose exactly the same Remote v2 gateway.
Main crates and apps
SSH and WSL remote runtimes are provisioned and managed by
apps/desktop/src/ssh_connection: the desktop installs vibex-server over SSH, opens a loopback tunnel, pairs, and then uses it as a Remote v2 runtime. See SSH Remote Runtime.
Data flow rules
Events carry an authoritative sequence number and version. When a client detects a generation or cursor gap, it must returnresync_required and then re-fetch from the authoritative runtime. File writes additionally follow content revision and compare-and-swap (CAS) checks.
Remote attachments re-authenticate and re-authorize before a stream is established. Terminal input carries workspace scope, generation checks, and auditing; never store raw terminal bytes.
Project and workspace model
VibexWorktree workspace is not “another mode” — it is another workspace under the same project.
Persistence and recovery
SQLite stores projects, workspaces, sessions, timelines, provider profiles, shared Providers, route groups, gateway ledgers, terminal metadata, browser profiles, computer-use audit records, and remote devices. In memory only, lost on restart: Agent processes, terminal session contents, browser tabs and frames, active connections, and an in-progress computer-use session. Arunning row in the database only reflects the last observed state; re-probe after a restart, and mark lost terminals as stale.
Change review checklist
- Does the authoritative runtime still own the single source of truth?
- Does the new capability support both the local and the paired runtime (through
BackendFacade), instead of only the local path? - Does it use shared DTOs, errors, and capabilities instead of copying structures?
- Does it define behavior for reconnect, sequence gaps, revocation, and recovery?
- Are logs, diagnostics, and test evidence redacted?
Further reading
docs/architecture/ui-boundary.mddocs/remote/protocol-v2.mddocs/platform/support-matrix.mddocs/operations/recovery-matrix.md