refactor(providers): clarify provider auth and MCP naming

Rename provider auth/MCP contracts to remove the overloaded Runtime suffix so
the shared interfaces read as stable provider capabilities instead of execution
implementation details.

Add a consistent provider-first auth class naming convention by renaming
ClaudeAuthProvider, CodexAuthProvider, CursorAuthProvider, and GeminiAuthProvider
to ClaudeProviderAuth, CodexProviderAuth, CursorProviderAuth, and
GeminiProviderAuth.

This keeps the provider module API easier to scan and aligns auth naming with
the main provider ownership model.
This commit is contained in:
Haileyesus
2026-04-17 15:23:12 +03:00
parent 32dfd27156
commit b74b5fb967
11 changed files with 34 additions and 34 deletions

View File

@@ -13,13 +13,13 @@ import type {
/**
* Main provider contract for CLI and SDK integrations.
*
* Each concrete provider owns its MCP/auth runtimes plus the provider-specific
* Each concrete provider owns its MCP/auth handlers plus the provider-specific
* logic for converting native events/history into the app's normalized shape.
*/
export interface IProvider {
readonly id: LLMProvider;
readonly mcp: IProviderMcpRuntime;
readonly auth: IProviderAuthRuntime;
readonly mcp: IProviderMcp;
readonly auth: IProviderAuth;
normalizeMessage(raw: unknown, sessionId: string | null): NormalizedMessage[];
fetchHistory(sessionId: string, options?: FetchHistoryOptions): Promise<FetchHistoryResult>;
@@ -27,19 +27,19 @@ export interface IProvider {
/**
* Auth runtime contract for one provider.
* Auth contract for one provider.
*/
export interface IProviderAuthRuntime {
export interface IProviderAuth {
/**
* Checks whether the provider runtime is installed and has usable credentials.
* Checks whether the provider is installed and has usable credentials.
*/
getStatus(): Promise<ProviderAuthStatus>;
}
/**
* MCP runtime contract for one provider.
* MCP contract for one provider.
*/
export interface IProviderMcpRuntime {
export interface IProviderMcp {
listServers(options?: { workspacePath?: string }): Promise<Record<McpScope, ProviderMcpServer[]>>;
listServersForScope(scope: McpScope, options?: { workspacePath?: string }): Promise<ProviderMcpServer[]>;
upsertServer(input: UpsertProviderMcpServerInput): Promise<ProviderMcpServer>;