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

  • governance
  • controlled-execution

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.ts

  • BYO-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.ts

  • OAuth 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.ts

  • Secrets 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.ts

  • Project 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.ts

  • Hardware 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.

Runtime status panel with chip, unified-memory budget, GPU-acceleration flag, and active provider lane.evidence · src/components/RuntimeStatus.tsx · electron/ipc/hardware.ts
Provider keys encrypted at rest in the OS keychain (Keychain / libsecret / DPAPI); never reach renderer.evidence · electron/ipc/secrets.ts:1-79
Project trust is granted only via native dialog; current state machine ships two states — trusted | untrusted.evidence · electron/ipc/projectTrust.ts:9-46

Evidence

Every claim on this page traces to a file in the desktop app repository.

  • electron/main.ts:195-205
  • electron/main.ts:485-530
  • electron/ipc/secrets.ts
  • electron/ipc/fs/secrets.ts
  • electron/ipc/projectTrust.ts
  • electron/util/projectTrust.ts
  • electron/ipc/qwen.ts
  • electron/ipc/ollamaBoot.ts
  • electron/util/claudeCliAuth.ts
LocalLocal open-source runtimeLocal companion serverCloud (BYO-key)User-supplied keyProvider endpointOAuthOAuth CLI sessionUser's own plan