cortexweaver
Version:
CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate
133 lines • 3.48 kB
TypeScript
import { AuthStrategies } from './auth-strategies';
/**
* Authentication methods supported by CortexWeaver
*/
export declare enum AuthMethod {
NONE = "none",
CLAUDE_CODE_SESSION = "claude_code_session",
CLAUDE_CODE_CONFIG = "claude_code_config",
GEMINI_CLI = "gemini_cli",
API_KEY = "api_key"
}
/**
* Authentication provider interface
*/
export interface AuthProvider {
method: AuthMethod;
details?: {
api_key?: string;
session_token?: string;
expires_at?: string;
user_id?: string;
project?: string;
refresh_token?: string;
client_id?: string;
client_secret?: string;
environment?: string;
};
error?: string;
}
/**
* Authentication status for a specific service
*/
export interface AuthStatus {
claudeAuth: AuthProvider & {
isAuthenticated: boolean;
};
geminiAuth: AuthProvider & {
isAuthenticated: boolean;
};
recommendations: string[];
lastChecked: Date;
}
/**
* AuthManager handles authentication discovery, validation, and management
* for CortexWeaver, supporting Claude Code CLI, Gemini CLI, and direct API keys
*/
export declare class AuthManager {
private projectRoot;
private claudeAuth;
private geminiAuth;
private authStrategies;
constructor(projectRoot?: string);
/**
* Get the project root directory
*/
getProjectRoot(): string;
/**
* Discover and initialize all available authentication methods
*/
discoverAuthentication(): Promise<void>;
/**
* Get comprehensive authentication status
*/
getAuthStatus(): Promise<AuthStatus>;
/**
* Check if authentication is expired
*/
isAuthExpired(auth: AuthProvider): Promise<boolean>;
/**
* Validate Claude authentication
*/
validateClaudeAuth(auth: AuthProvider): Promise<boolean>;
/**
* Validate Gemini authentication
*/
validateGeminiAuth(auth: AuthProvider): Promise<boolean>;
/**
* Manually set Claude authentication
*/
setClaudeAuth(auth: AuthProvider): Promise<void>;
/**
* Manually set Gemini authentication
*/
setGeminiAuth(auth: AuthProvider): Promise<void>;
/**
* Clear Claude authentication
*/
clearClaudeAuth(): Promise<void>;
/**
* Clear Gemini authentication
*/
clearGeminiAuth(): Promise<void>;
/**
* Attempt to refresh Claude authentication
*/
refreshClaudeAuth(): Promise<boolean>;
/**
* Attempt to refresh Gemini authentication
*/
refreshGeminiAuth(): Promise<boolean>;
/**
* Get authentication credentials for Claude
*/
getClaudeCredentials(): Promise<{
apiKey?: string;
sessionToken?: string;
} | null>;
/**
* Get authentication credentials for Gemini
*/
getGeminiCredentials(): Promise<{
apiKey?: string;
refreshToken?: string;
} | null>;
/**
* Get preferred authentication method for Claude
*/
getClaudeAuthMethod(): AuthMethod;
/**
* Get preferred authentication method for Gemini
*/
getGeminiAuthMethod(): AuthMethod;
/**
* Check if authentication is available for both services
*/
isFullyAuthenticated(): Promise<boolean>;
/**
* Get detailed authentication report
*/
getAuthReport(): Promise<string>;
}
export { AuthStrategies };
//# sourceMappingURL=index.d.ts.map