How minoansecurity/sidekernel works
SideKernel runs coding agents and other commands inside disposable macOS-hosted Linux microVMs. The main workflow is host CLI → provisioned VM → guest command execution, with host-mediated credentials, networking, and optional file/state features. The graph includes the documented guest tools even where their implementation was not sampled; those links cite the README. Internal guest-agent relationships are limited to calls visible in the excerpts or source index.
Main entry points: Sandbox.swift Sandbox orchestration · Session.swift Interactive session · serve.rs Control server · CLI.swift CLI
Components 24
Host runtime
- CLI
Host/CLI.swift - Sandbox orchestration
Host/Sandbox.swift - MicroVM lifecycle
Host/MicroVM.swift - Interactive session
Host/Session.swift - Terminal I/O
Host/Terminal.swift - Wire protocol
Host/Contract.swift
Guest runtime
- Guest agent entry
agent/src/main.rs - Guest boot
agent/src/init.rs - Control server
agent/src/serve.rs - Command execution
agent/src/process.rs - VSOCK transport
agent/src/vsock.rs - Guest networking
agent/src/net.rs
Sandbox features
- Credential proxy
Host/Proxy.swift - Host approvals
Host/HostApproval.swift - Approved file import
Host/DropIn.swift - Clipboard and drag-drop
Host/Clipboard.swift - Port forwarding
Host/PortForwarder.swift - Guest convenience tools
guest - Agent harness
guest/internal/harness.py - Network toggle
guest/sk-net - Save command
guest/save
Provisioning and state
- VM provisioning
Host/Provisioning.swift - Persistent personal state
Host/PersonalStore.swift
Other components
- Host user
Connections 25
- Host user → CLI: launches
README.md - CLI → Sandbox orchestration: starts
Host/CLI.swift - CLI → VM provisioning: ensures artifacts
Host/CLI.swift - Sandbox orchestration → MicroVM lifecycle: configures and starts
Host/Sandbox.swift - Sandbox orchestration → Interactive session: runs command
Host/Sandbox.swift - Interactive session → MicroVM lifecycle: connects control
Host/Session.swift - Interactive session → Terminal I/O: uses terminal I/O
Host/Session.swift - Interactive session → Wire protocol: exchanges frames
Host/Session.swift - MicroVM lifecycle → Wire protocol: uses port constants
Host/MicroVM.swift - Guest agent entry → Guest boot: boots as PID 1
agent/src/main.rs - Guest agent entry → Control server: starts listener
agent/src/main.rs - Control server → Command execution: spawns command
agent/src/serve.rs - Control server → Guest networking: updates posture
agent/src/serve.rs - Control server → VSOCK transport: accepts connections
agent/src/serve.rs - Sandbox orchestration → Credential proxy: routes credentials
Host/Sandbox.swift - Sandbox orchestration → Host approvals: requests approval
Host/Sandbox.swift - Sandbox orchestration → Approved file import: dispatches file import
Host/Sandbox.swift - Sandbox orchestration → Clipboard and drag-drop: sets up clipboard
Host/Sandbox.swift - Sandbox orchestration → Port forwarding: starts forwarding
Host/Sandbox.swift - Sandbox orchestration → Persistent personal state: publishes state
Host/Sandbox.swift - VM provisioning → Persistent personal state: prepares state
Host/Provisioning.swift - Guest convenience tools → Host user: offers sandbox commands
README.md - Agent harness → Guest agent entry: invokes guest control
- Network toggle → Host approvals: requests network approval
README.md - Save command → Persistent personal state: persists packages
README.md