docs/adrs/0002-cloud-runtime-topology.md
plans/desktop-mobile-web-unification.mdWeb and mobile clients need privileged execution capabilities that currently exist only in Electron main process:
These capabilities require a secure multi-tenant backend architecture with strong isolation, streaming support, and auditability.
Adopt a control-plane + worker-plane topology.
Services:
api-gateway: external API entry, auth verification, rate limitingworkspace-service: workspace/project metadata and permissionsoperation-orchestrator: validates and queues privileged operationsstream-broker: fan-out for operation events and chat/runtime streamsaudit-service: immutable operation/audit log ingestionServices:
runtime-scheduler: allocates isolated runtime instancesruntime-worker: executes filesystem/command/preview operations per projectgit-worker: executes git operations in isolated workspaces (can be separate or embedded initially)queued, started, chunk, completed, failed.correlationId and replay cursor.Initial:
Follow-up:
Rejected because it mixes orchestration and execution concerns, making scaling and security controls harder.
Rejected because long-lived previews and streaming command output need persistent runtime context.
Rejected for v1 due to reliability, availability, and connectivity constraints.