@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
27 lines • 1.25 kB
TypeScript
/**
* User-level storage for GitHub Copilot credentials.
* The stored token is the GitHub OAuth access token from the device flow
* (used to obtain short-lived Copilot API tokens). Stored under config path
* (e.g. ~/.config/nanocoder/) so they are not in project config.
*/
/** Shared message when no Copilot credential is found (used by provider-factory and client-factory). */
export declare function getCopilotNoCredentialsMessage(providerName: string): string;
export interface CopilotCredential {
/** GitHub OAuth access token from device flow. */
oauthToken: string;
enterpriseUrl?: string;
}
export type CopilotCredentialsStore = Record<string, CopilotCredential>;
/**
* Get stored Copilot credential for a provider name (e.g. "GitHub Copilot").
*/
export declare function loadCopilotCredential(providerName: string): CopilotCredential | null;
/**
* Save GitHub OAuth token (from device flow) for a provider name.
*/
export declare function saveCopilotCredential(providerName: string, oauthToken: string, enterpriseUrl?: string): void;
/**
* Remove stored credential for a provider name.
*/
export declare function removeCopilotCredential(providerName: string): void;
//# sourceMappingURL=copilot-credentials.d.ts.map