Skip to content

v0.9.14: App-server credential set/clear with source and writable metadata for GPUI providers #6179

Description

@Hmbown

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

  1. 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.
  2. 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.
  3. Clear/revoke for client-owned credentials; environment- or managed-owned credentials refuse with a named reason.
  4. Optional verify/probe that reports reachability without exposing the credential.

Acceptance criteria

  • Set persists through the existing credential store and flips credentialState on the next GET /v1/providers
  • Env-managed credentials refuse overwrite with a named reason; the metadata lets clients show this before submit
  • No secret value appears in any response, log line, or error
  • cargo test -p codewhale-tui route tests cover set, clear, refused env-managed write, and no-echo

Related: Hmbown/codewhale-apps#574, #6028 (account link / auth model), #5718 (one worker system / Keychain path).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust code

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions