Expand description
Authentication storage and API key resolution.
Auth file: ~/.pi/agent/auth.json
Structs§
- Auth
File - Auth
Storage - Auth storage wrapper with file locking.
- CopilotO
Auth Config - OAuth settings for GitHub Copilot.
- Device
Code Response - Response from the device authorization endpoint (RFC 8628 section 3.2).
- GitLabO
Auth Config - OAuth settings for GitLab.
- OAuth
Start Info - SapResolved
Credentials - Resolved SAP AI Core credentials ready for client-credentials token exchange.
Enums§
- Auth
Credential - Credentials stored in auth.json.
- AwsResolved
Credentials - Resolved AWS credentials ready for Sigv4 signing or bearer auth.
- Credential
Status - Canonical credential status for a provider in auth.json.
- Device
Flow Poll Result - Result of polling the device flow token endpoint.
Functions§
- complete_
anthropic_ oauth - Complete Anthropic OAuth by exchanging an authorization code for access/refresh tokens.
- complete_
copilot_ browser_ oauth - Complete the GitHub Copilot browser OAuth flow by exchanging the authorization code.
- complete_
extension_ oauth - Complete OAuth for an extension-registered provider by exchanging an authorization code.
- complete_
gitlab_ oauth - Complete GitLab OAuth by exchanging the authorization code for tokens.
- complete_
google_ antigravity_ oauth - Complete Google Antigravity OAuth by exchanging an authorization code for tokens.
- complete_
google_ gemini_ cli_ oauth - Complete Google Gemini CLI OAuth by exchanging an authorization code for tokens.
- complete_
openai_ codex_ oauth - Complete OpenAI Codex OAuth by exchanging an authorization code for access/refresh tokens.
- exchange_
sap_ access_ token - Exchange SAP AI Core service-key credentials for an access token.
- external_
setup_ source - Return a stable human-readable label when we can auto-detect local credentials from another coding agent installation.
- load_
default_ auth - Convenience to load auth from default path.
- poll_
copilot_ device_ flow - Poll the GitHub device flow token endpoint.
- poll_
kimi_ code_ device_ flow - Poll Kimi Code OAuth device flow.
- resolve_
aws_ credentials - Resolve AWS credentials following the standard precedence chain.
- resolve_
sap_ credentials - Resolve SAP AI Core credentials from env vars or stored service key.
- start_
anthropic_ oauth - Start Anthropic OAuth by generating an authorization URL and PKCE verifier.
- start_
copilot_ browser_ oauth - Start GitHub Copilot OAuth using the browser-based authorization code flow.
- start_
copilot_ device_ flow - Start the GitHub device flow (RFC 8628) for Copilot.
- start_
extension_ oauth - Start OAuth for an extension-registered provider using its
OAuthConfig. - start_
gitlab_ oauth - Start GitLab OAuth using the authorization code flow with PKCE.
- start_
google_ antigravity_ oauth - Start Google Antigravity OAuth by generating an authorization URL and PKCE verifier.
- start_
google_ gemini_ cli_ oauth - Start Google Gemini CLI OAuth by generating an authorization URL and PKCE verifier.
- start_
kimi_ code_ device_ flow - Start Kimi Code OAuth device flow.
- start_
openai_ codex_ oauth - Start OpenAI Codex OAuth by generating an authorization URL and PKCE verifier.