mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-30 08:15:31 +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:
@@ -1,6 +1,6 @@
|
||||
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';
|
||||
|
||||
type CursorLoginStatus = {
|
||||
@@ -10,7 +10,7 @@ type CursorLoginStatus = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export class CursorAuthProvider implements IProviderAuthRuntime {
|
||||
export class CursorProviderAuth implements IProviderAuth {
|
||||
/**
|
||||
* Checks whether the cursor-agent CLI is available on this host.
|
||||
*/
|
||||
|
||||
@@ -3,9 +3,9 @@ import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
import { AbstractProvider } from '@/modules/providers/shared/base/abstract.provider.js';
|
||||
import { CursorAuthProvider } from '@/modules/providers/list/cursor/cursor-auth.provider.js';
|
||||
import { CursorProviderAuth } from '@/modules/providers/list/cursor/cursor-auth.provider.js';
|
||||
import { CursorMcpProvider } from '@/modules/providers/list/cursor/cursor-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';
|
||||
|
||||
@@ -36,7 +36,7 @@ function readRawProviderMessage(raw: unknown): RawProviderMessage | null {
|
||||
|
||||
export class CursorProvider extends AbstractProvider {
|
||||
readonly mcp = new CursorMcpProvider();
|
||||
readonly auth: IProviderAuthRuntime = new CursorAuthProvider();
|
||||
readonly auth: IProviderAuth = new CursorProviderAuth();
|
||||
|
||||
constructor() {
|
||||
super('cursor');
|
||||
|
||||
Reference in New Issue
Block a user