Runtime & Trust
Key facts
- LanesLocal open-source runtime · BYO-key cloud · OAuth CLI session.
- Renderer sandboxChromium sandbox + context isolation + nodeIntegration:false. PTYs run under user UID.
- Trust stateTwo-state today: trusted | untrusted. Four-state is roadmap.
Pipeline stages this surface serves
What it does
Local open-source runtime lane
Detects a user-installed open-source runtime and launches it only if it is not already serving; a local default model on a localhost endpoint. NDJSON stream with TTFT + tokens/sec. DevAware OS does not install third-party runtimes.
evidence ·
electron/ipc/qwen.ts · ollamaBoot.tsBYO-key cloud lane
Cloud provider APIs via user-supplied API keys (streaming). The CSP connect-src allowlists only the configured provider endpoints.
evidence ·
electron/ipc/models.ts · electron/main.tsOAuth CLI lane
Detects a supported AI CLI on your PATH and routes its OAuth session through it. Consumes the user's own provider plan.
evidence ·
electron/util/claudeCliAuth.ts · electron/ipc/models.tsSecrets at rest
Provider keys encrypted via Electron safeStorage (Keychain / DPAPI / libsecret); plaintext fallback explicitly marked in Settings. Keys never reach the renderer.
evidence ·
electron/ipc/secrets.tsProject trust + CSP
Two-state trust today (trusted | untrusted), granted via native dialog. Strict production CSP; default-deny permissions; external navigation routed through shell.openExternal.
evidence ·
electron/ipc/projectTrust.ts · electron/main.tsHardware inspector + memory governor
Probes chip, GPU, unified memory, and GPU-acceleration flags; the memory governor polls pressure to admit or reject context.
evidence ·
electron/ipc/hardware.ts · memoryGovernor.ts
Surfaces
Screenshots captured in a later phase. Frame names + intended dimensions shown today.
src/components/RuntimeStatus.tsx · electron/ipc/hardware.tselectron/ipc/secrets.ts:1-79electron/ipc/projectTrust.ts:9-46Evidence
Every claim on this page traces to a file in the desktop app repository.
electron/main.ts:195-205electron/main.ts:485-530electron/ipc/secrets.tselectron/ipc/fs/secrets.tselectron/ipc/projectTrust.tselectron/util/projectTrust.tselectron/ipc/qwen.tselectron/ipc/ollamaBoot.tselectron/util/claudeCliAuth.ts