Skip to main content

Module shared_credentials

Module shared_credentials 

Source
Expand description

Shared OAuth credential store, common to every tool built on rs_ai.

apollo and telekinesis each used to keep their own login: apollo read Claude Code’s ~/.claude/.credentials.json, telekinesis wrote ~/.telekinesis/<provider>_token.json. rs_ai_oauth::credentials is the single canonical store (~/.config/rs_ai/credentials/<provider>.json, mode 0600) both now consult, so one login covers both binaries.

This module is a thin adapter, not a replacement. apollo still falls back to the paths it has always read, so an existing setup keeps working even when the shared store is empty. That fallback is load-bearing rather than belt-and-braces: rs_ai_oauth deserializes every candidate file as a flat OAuthTokens, which the nested claudeAiOauth layout of a real Claude Code credentials file does not match, so its own legacy probe cannot read that file.

Structs§

SharedLogin
One provider’s login status, for apollo doctor.

Functions§

load
Load a provider’s tokens from the shared store.
logins
Every provider with a credential in the shared store.
save
Write refreshed tokens back to the shared store.

Type Aliases§

ApolloTokens
Tokens as the rest of apollo expects them: (access, refresh, expires_at) with expires_at in milliseconds.