Operate OAuth Connections ​
Connection state is a security authority separate from Pipeline persistence, replay, Query capture, Command effects, and Await state. Lifecycle transitions use immutable conditional revisions.
READYmeans locally usable, subject to provider acceptance.CONNECTINGmeans a one-use authorised attempt is awaiting completion.REFRESHINGmeans another worker owns renewal.RENEWAL_UNCERTAINfails closed because remote or durable outcome is unknown.REQUIRES_REAUTHORIZATIONneeds interaction or renewed consent.DISCONNECTEDmeans local authority has been removed.
One provider account has one managed logical owner in the shared store. Do not run another token broker or process that independently refreshes the same grant. A refresh must win durable authority before calling the provider; a lost outcome is not described as exactly once. Disconnect and reconnect supersede older writers and cached client generations.
Monitor renewal failures, uncertain outcomes, reauthorisation demand, connection age, and callback failures without logging tokens or credential payloads. Disconnect is local; provider-side consent revocation is a separate, explicitly authorised host operation. Drain in-flight invocations before closing managers, SDK transports, and the host executor.
See ADR-0030 for the security and ownership rationale.