/** * GitHub credentials storage * * Stores OAuth tokens securely in ~/.arial/github-credentials.json */ import type { Result } from "../types.js"; /** * Stored GitHub credentials */ export interface GitHubCredentials { /** OAuth access token */ accessToken: string; /** Token type (usually 'bearer') */ tokenType: string; /** Granted scopes */ scope: string; /** When the token was stored */ createdAt: string; } /** * Credentials file error */ export interface CredentialsError { code: "NOT_FOUND" | "INVALID_FORMAT" | "READ_FAILED" | "WRITE_FAILED"; message: string; } /** * Load GitHub credentials from disk */ export declare function loadGitHubCredentials(): Promise>; /** * Save GitHub credentials to disk */ export declare function saveGitHubCredentials(credentials: Omit): Promise>; /** * Delete stored GitHub credentials */ export declare function deleteGitHubCredentials(): Promise>; /** * Get the GitHub token, preferring environment variable over stored credentials * * Priority: * 1. GITHUB_TOKEN environment variable (legacy support) * 2. Stored OAuth credentials */ export declare function getGitHubToken(): Promise; /** * Get the path to the credentials file (for display purposes) */ export declare function getCredentialsPath(): string; /** * Check if stored credentials have the required scope for PR creation */ export declare function validateGitHubCredentials(): Promise<{ valid: boolean; hasToken: boolean; scope?: string; warning?: string; }>; //# sourceMappingURL=credentials.d.ts.map