diff --git a/src/cliproxy/account-manager.ts b/src/cliproxy/account-manager.ts index 069a93f7..57495035 100644 --- a/src/cliproxy/account-manager.ts +++ b/src/cliproxy/account-manager.ts @@ -12,6 +12,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { CLIProxyProvider } from './types'; +import { CLIPROXY_PROFILES } from '../auth/profile-detector'; import { getCliproxyDir, getAuthDir } from './config-generator'; import { PROVIDER_TYPE_VALUES } from './auth/auth-types'; @@ -946,7 +947,7 @@ export async function soloAccount( * Get summary of all accounts across providers */ export function getAllAccountsSummary(): Record { - const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp']; + const providers: CLIProxyProvider[] = [...CLIPROXY_PROFILES]; const summary: Record = {} as Record< CLIProxyProvider, AccountInfo[] diff --git a/src/cliproxy/auth/token-expiry-checker.ts b/src/cliproxy/auth/token-expiry-checker.ts index d3833173..9a6665ee 100644 --- a/src/cliproxy/auth/token-expiry-checker.ts +++ b/src/cliproxy/auth/token-expiry-checker.ts @@ -8,6 +8,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { CLIProxyProvider } from '../types'; +import { CLIPROXY_PROFILES } from '../../auth/profile-detector'; import { getProviderAccounts, getAccountTokenPath } from '../account-manager'; /** Preemptive refresh time: refresh tokens 45 minutes before expiry */ @@ -113,7 +114,7 @@ export function getTokenExpiryInfo( * @returns Array of token expiry info, excluding invalid tokens */ export function getAllTokenExpiryInfo(): TokenExpiryInfo[] { - const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp']; + const providers: CLIProxyProvider[] = [...CLIPROXY_PROFILES]; const results: TokenExpiryInfo[] = []; for (const provider of providers) { diff --git a/src/cliproxy/auth/token-manager.ts b/src/cliproxy/auth/token-manager.ts index 665e821d..41ef2092 100644 --- a/src/cliproxy/auth/token-manager.ts +++ b/src/cliproxy/auth/token-manager.ts @@ -8,6 +8,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { CLIProxyProvider } from '../types'; +import { CLIPROXY_PROFILES } from '../../auth/profile-detector'; import { getProviderAuthDir } from '../config-generator'; import { getProviderAccounts, getDefaultAccount } from '../account-manager'; import { @@ -145,16 +146,7 @@ export function getAuthStatus(provider: CLIProxyProvider): AuthStatus { * Get auth status for all providers */ export function getAllAuthStatus(): AuthStatus[] { - const providers: CLIProxyProvider[] = [ - 'agy', - 'claude', - 'gemini', - 'codex', - 'qwen', - 'iflow', - 'kiro', - 'ghcp', - ]; + const providers: CLIProxyProvider[] = [...CLIPROXY_PROFILES]; return providers.map(getAuthStatus); } diff --git a/src/management/oauth-port-diagnostics.ts b/src/management/oauth-port-diagnostics.ts index 806a97cc..8c261457 100644 --- a/src/management/oauth-port-diagnostics.ts +++ b/src/management/oauth-port-diagnostics.ts @@ -21,6 +21,7 @@ import { BindingTestResult, } from '../utils/port-utils'; import { CLIProxyProvider } from '../cliproxy/types'; +import { CLIPROXY_PROFILES } from '../auth/profile-detector'; /** * OAuth callback ports for each provider @@ -140,16 +141,7 @@ export async function checkOAuthPort(provider: CLIProxyProvider): Promise { - const providers: CLIProxyProvider[] = [ - 'gemini', - 'codex', - 'agy', - 'qwen', - 'iflow', - 'kiro', - 'ghcp', - 'claude', - ]; + const providers: CLIProxyProvider[] = [...CLIPROXY_PROFILES]; const results: OAuthPortDiagnostic[] = []; for (const provider of providers) {