Capy Desktop: Effect HttpApi groups, Captain/Crew drives and the kappu-macos sidecar
Zero-execution teardown of Capy 0.7.2: 62 internal Effect HttpApiGroups (816 endpoints) versus 108 public OpenAPI ops, 6-scope Drives, and the Rust kappu-macos sidecar.
- Electron preload + Effect HttpApi
- Captains, Crew and 6-scope Drives
- kappu-macos sidecar + cloud VMs
Investigation question
How does Capy Desktop structure its multi-agent Captain/Crew workspace, 6-scope Drive instruction hierarchy, background macOS computer-use sidecar (kappu-macos), and public versus internal API contracts?
Observed
Zero-execution static inspection across official 0.7.2 Linux-x64 and macOS-arm64 archives (ai.capy.desktop, shared 3.33 MB app.asar, 1,019 renderer assets, 212 TanStack Router routes) paired with cookie-free docs.capy.ai/openapi.json and llms-full.txt (153 pages) maps two distinct API tiers. Externally, docs.capy.ai/openapi.json (OpenAPI 3.1.0) publishes 108 /api/v1/* operations (188 schemas, 11 SSE StreamEvent frames). Internally, out/main/main.js and mint-BD6JbBCV.js define 62 @effect/platform HttpApiGroups totaling 816 typed endpoints and 729 Effect Schema classes, bridged to the renderer through a 100-member window.capyDesktop preload (84 capy-desktop:* IPC channels) plus out/preload/preview.cjs (closed-Shadow-DOM Live Preview element picker) and import-worker.js (Claude Code / Codex JSONL session importer). On macOS, Capy.app bundles a universal Mach-O Rust sidecar, kappu-macos (5.62 MB, 12 crates/kappu-macos/src/*.rs modules), alongside tray-overlay.node (CapyTrayOverlay active-automation indicator) and notification-access.node to drive background computer use alongside Firecracker cloud VMs and Revyl cloud phones.
Inferred
Sharing @effect/platform HttpApi + Effect Schema codecs between out/main (MachineServer, Tunnel, DriveEngine, owner.sqlite) and cloud endpoints lets Capy enforce one typed contract across local PTY sessions (@lydell/node-pty), tunnel-connected remote machines, and cloud VMs while exposing only a curated 108-operation /api/v1/* subset publicly. Similarly, isolating Captain state into a 4-file Captain Drive and scoping shared instructions across 6 explicit Drive tiers keeps coordinator memory durable without bloating worker prompts.
Unknown & limitations
Capy was never executed or signed into (user_data_allowed: false, target_execution_allowed: false). Cloud control-plane backend source, Firecracker VM host images, Revyl Android streaming servers, and live OIDC/BYO-subscription token broker behavior were not observed beyond shipped client schemas and public documentation.
Architecture
Capy’s desktop runtime combines four components: (1) Electron main host (out/main/main.js + mint-BD6JbBCV.js) running MachineServer, Tunnel, DriveEngine, owner.sqlite, and PTY session sampling (sessions-BHwmEZgT.js); (2) out/preload/index.cjs (100-member window.capyDesktop) + preview.cjs closed-Shadow-DOM design picker; (3) 212-route TanStack Router React renderer (13/13 core chunks parsed cleanly; historical Slice 1 6-file full-renderer timeout preserved explicitly); and (4) native macOS helpers (kappu-macos 12-module Rust CUA binary, tray-overlay.node, notification-access.node).
Domain & data models
Coordination centers on Captains (persistent orchestrators backed by a 4-file Captain Drive and digest compaction), Crew (delegated task sessions), and 6-scope Drives (volumes organizing instructions, skills, plugins, and workspace artifacts across user/workspace/project/agent boundaries), plus BYO harness subscription bindings, Issues, Reviews, and scheduled Automations.
Workflows & state machines
Interactive design and automation workflows connect three loops: (1) Captain digest & wake scheduling dispatches Crew members and reconciles issue/review states over 11 typed SSE StreamEvent frames; (2) Live Preview injects a closed Shadow DOM overlay (preview.cjs) so users select rendered DOM elements directly into agent turns; and (3) kappu-macos executes native macOS background desktop actions while surfacing a visible CapyTrayOverlay indicator.
API & protocol surfaces
docs.capy.ai/openapi.json (108 public /api/v1/* REST + SSE operations and 188 schemas) versus 62 internal @effect/platform HttpApiGroups (816 endpoints, 729 Effect Schema classes), 100 window.capyDesktop bridge methods across 84 capy-desktop:* IPC channels, and import-worker.js local JSONL transcript ingestion.