Expand description
Shared login / register / session probe for CLI and gfx clients.
Functionsยง
- has_
api_ token - True when an API token is set (skip interactive onboarding).
- login
POST /v1/auth/loginand saveSessionConfig+SavedLogin.- login_
default - Login using the default API base from client config / env.
- logout
- Revoke the control-plane session (best-effort) and delete local
session.json. KeepsSavedLoginso the next login form can autofill. - needs_
interactive_ login - Interactive login/register is needed when there is no usable session/API token.
- register
POST /v1/auth/register, then login.- register_
default - Register using the default API base from client config / env.
- session_
is_ valid - Probe control plane: env API token, or
GET /v1/mewith the saved session. - try_
restore_ expired_ session - When
session.jsonexists but the server rejected the token (common after Redis/dev restarts), re-login withSavedLogincredentials.