Why this matters
GPUI Hmbown/codewhale-apps#574 (Linear APPS-48) requires first-run provider setup entirely in the desktop: "UI sees configured/source/writable metadata, never raw secret values in catalog/logs. Environment-managed credentials must not appear successfully overwritten." Today the desktop can show that a provider is configured but cannot write a credential — setup still requires the TUI or editing files.
Current behavior
GET /v1/providers serves credentialState — a sanitized structural classification (crates/tui/src/runtime_api.rs:6109-6113, "the API never echoes credentials back to callers"). Correct, but read-only.
- No route sets, clears, or verifies a provider credential; there is no
credentials write surface in the route table.
credentials_present on /v1/operate is a readiness flag, not management.
Desired behavior
- A write route that accepts a credential for a provider, stores it in the existing credential owner, and returns a receipt — never echoes the secret.
- Per-provider metadata extended or served alongside:
source (keychain/env/config/managed) and writable so a client can disable the control with a truthful reason ("managed by environment") instead of letting a write fail late.
- Clear/revoke for client-owned credentials; environment- or managed-owned credentials refuse with a named reason.
- Optional verify/probe that reports reachability without exposing the credential.
Acceptance criteria
Related: Hmbown/codewhale-apps#574, #6028 (account link / auth model), #5718 (one worker system / Keychain path).
Why this matters
GPUI Hmbown/codewhale-apps#574 (Linear APPS-48) requires first-run provider setup entirely in the desktop: "UI sees configured/source/writable metadata, never raw secret values in catalog/logs. Environment-managed credentials must not appear successfully overwritten." Today the desktop can show that a provider is configured but cannot write a credential — setup still requires the TUI or editing files.
Current behavior
GET /v1/providersservescredentialState— a sanitized structural classification (crates/tui/src/runtime_api.rs:6109-6113, "the API never echoes credentials back to callers"). Correct, but read-only.credentialswrite surface in the route table.credentials_presenton/v1/operateis a readiness flag, not management.Desired behavior
source(keychain/env/config/managed) andwritableso a client can disable the control with a truthful reason ("managed by environment") instead of letting a write fail late.Acceptance criteria
credentialStateon the nextGET /v1/providerscargo test -p codewhale-tuiroute tests cover set, clear, refused env-managed write, and no-echoRelated: Hmbown/codewhale-apps#574, #6028 (account link / auth model), #5718 (one worker system / Keychain path).