/** * Grok Build OAuth orchestration shared by the plugin and standalone CLI. * @module dsh-coding-subscription-oauth/auth */ import type { AuthInteraction } from "@earendil-works/pi-ai"; import type { GrokBuildSession } from "./session.js"; import { GrokBuildCredentialStore, type LoginPersistOptions } from "./store.js"; /** Non-secret login state shown by the launcher. */ export interface GrokBuildAuthStatus { authenticated: boolean; expiresAt?: Date; } /** * Complete the xAI device-code OAuth flow and persist the credential. * The Grok Build backend accepts the same auth.x.ai tokens (scope * `grok-cli:access`); the PKCE authorization-code flow lands in a later * milestone as the primary path. */ export declare function loginGrokBuild(interaction: AuthInteraction, store?: GrokBuildCredentialStore, persist?: LoginPersistOptions): Promise; /** Copy ~/.grok/auth.json into the dsh store. Does not modify the Grok file. */ export declare function importGrokBuildFromGrok(store?: GrokBuildCredentialStore, filename?: string, persist?: LoginPersistOptions): Promise; /** Remove the stored Grok Build credential. */ export declare function logoutGrokBuild(store?: GrokBuildCredentialStore): Promise; /** Read non-secret login state without refreshing the token. */ export declare function grokBuildAuthStatus(store?: GrokBuildCredentialStore): Promise; /** Login then refresh the account model list when a session is available. */ export declare function loginGrokBuildSession(interaction: AuthInteraction, session: GrokBuildSession, persist?: LoginPersistOptions): Promise; export declare function importGrokBuildSession(session: GrokBuildSession, filename?: string, persist?: LoginPersistOptions): Promise; //# sourceMappingURL=auth.d.ts.map