From 0e352c99147525e17b680554924470836d2bdaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Wed, 22 Jul 2026 16:16:59 -0400 Subject: [PATCH] docs(agents): record per-row OAuth routing, /login picker, and _meta.connected contract --- AGENTS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index cf90ce0..cfa21b5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -168,6 +168,16 @@ edges stay deterministic Rust. The harness appends a terminal are built generically from advertised methods (`AuthMethodKind:: ApiKeyPlatform`), so new registry rows appear in the picker with no TUI changes. +- Every OAuth picker row carries ITS OWN method id (`PendingMenuItem::Login + { method_id }` → `Action::LoginWith`); an unknown id fails closed. The + id-less `Action::Login` (auto-login, 401 re-auth) resolves the first + interactive method. `/login` opens the picker (`Action::OpenLoginPicker`), + never a flow directly; mid-session its last row is Cancel, not Quit. +- `_meta.connected` on an advertised method is DISPLAY state (green badge on + the picker): stamped at `initialize()` from stored credentials + (`connected_method_ids` + `stamp_connected_meta`), kept fresh TUI-side + after in-session logins (`auth_in_flight_method` → `AuthComplete`). It is + never an authorization input. - Refreshable-OAuth providers beyond Kimi Code use a GENERIC path, NOT Kimi's bespoke wire. A `uses_oauth` platform carrying `oauth: Some(&OAuthConfig)` (client id / auth host / start+token paths / `token_host` / `scope` /