Skip to content

ADR 0015: Use an on-demand shared runtime for cloud capture ​

Date: 2026-11-04. Status: architecture accepted by the maintainer; P0/P1 has a fixture-only implementation. Production client switching, shared login and real Xiaomi Cloud writes remain pending. The target product split uses Electron as the primary desktop interface and Augma as an optional native companion. Cloud capture must work while Electron is fully quit; a cached summary is an offline view rather than the execution backend.

One Shared Runtime owns the writable local data scope, plugin implementations, Provider Connections, confirmations and durable Capture Attempts. Both clients connect to it; neither starts another in-process runtime against that scope. On macOS, a user-level, launch-on-demand Runtime Broker starts one packaged Node worker, authenticates clients and mediates native credential access. A separate, short-lived native account UI reuses the existing isolated login implementation. Augma owns its editable draft and presentation, not another Xiaomi login or transport implementation. Existing profile, credential and backup isolation remains in force.

Client and operation leases keep useful work alive. With no workbench session, operation or interactive authorization, the broker and worker drain and exit; cached summaries and local typing never keep them alive. Cloud credentials remain in the system vault and raw sessions never enter a renderer, companion or portable configuration. A durable journal binds each attempted write to its reviewed account, destination and payload; uncertain delivery survives process exit and is never automatically replayed. See the module, lifecycle and account design for proposed interfaces, initial timing values, implementation gates and acceptance.

Released under the MIT License.