mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-07 13:55:38 +08:00
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:
@@ -4,7 +4,7 @@ import path from 'node:path';
|
||||
|
||||
import spawn from 'cross-spawn';
|
||||
|
||||
import type { IProviderAuthRuntime } from '@/shared/interfaces.js';
|
||||
import type { IProviderAuth } from '@/shared/interfaces.js';
|
||||
import type { ProviderAuthStatus } from '@/shared/types.js';
|
||||
import { readObjectRecord, readOptionalString } from '@/shared/utils.js';
|
||||
|
||||
@@ -15,7 +15,7 @@ type ClaudeCredentialsStatus = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export class ClaudeAuthProvider implements IProviderAuthRuntime {
|
||||
export class ClaudeProviderAuth implements IProviderAuth {
|
||||
/**
|
||||
* Checks whether the Claude Code CLI is available on this host.
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { getSessionMessages } from '@/projects.js';
|
||||
import { AbstractProvider } from '@/modules/providers/shared/base/abstract.provider.js';
|
||||
import { ClaudeAuthProvider } from '@/modules/providers/list/claude/claude-auth.provider.js';
|
||||
import { ClaudeProviderAuth } from '@/modules/providers/list/claude/claude-auth.provider.js';
|
||||
import { ClaudeMcpProvider } from '@/modules/providers/list/claude/claude-mcp.provider.js';
|
||||
import type { IProviderAuthRuntime } from '@/shared/interfaces.js';
|
||||
import type { IProviderAuth } from '@/shared/interfaces.js';
|
||||
import type { FetchHistoryOptions, FetchHistoryResult, NormalizedMessage } from '@/shared/types.js';
|
||||
import { createNormalizedMessage, generateMessageId, readObjectRecord } from '@/shared/utils.js';
|
||||
|
||||
@@ -57,7 +57,7 @@ function readRawProviderMessage(raw: unknown): RawProviderMessage | null {
|
||||
|
||||
export class ClaudeProvider extends AbstractProvider {
|
||||
readonly mcp = new ClaudeMcpProvider();
|
||||
readonly auth: IProviderAuthRuntime = new ClaudeAuthProvider();
|
||||
readonly auth: IProviderAuth = new ClaudeProviderAuth();
|
||||
|
||||
constructor() {
|
||||
super('claude');
|
||||
|
||||
Reference in New Issue
Block a user