feat(cliproxy): add kiro and ghcp to OAuth diagnostics and account manager

- add OAUTH_CALLBACK_PORTS: kiro=9876, ghcp=null (device code)

- add OAUTH_FLOW_TYPES for both providers

- update getAllAccountsSummary providers array
This commit is contained in:
kaitranntt
2025-12-22 00:45:13 -05:00
parent fae1ee2b31
commit 49bc0a44cc
2 changed files with 4 additions and 12 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ export function discoverExistingAccounts(): void {
* Get summary of all accounts across providers
*/
export function getAllAccountsSummary(): Record<CLIProxyProvider, AccountInfo[]> {
const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow'];
const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp'];
const summary: Record<CLIProxyProvider, AccountInfo[]> = {} as Record<
CLIProxyProvider,
AccountInfo[]
+3 -11
View File
@@ -33,7 +33,7 @@ export const OAUTH_CALLBACK_PORTS: Record<CLIProxyProvider, number | null> = {
qwen: null, // Device Code Flow - no callback port
iflow: null, // Device Code Flow - no callback port
kiro: 9876, // Authorization Code Flow
copilot: null, // Device Code Flow - no callback port
ghcp: null, // Device Code Flow - no callback port
};
/**
@@ -51,7 +51,7 @@ export const OAUTH_FLOW_TYPES: Record<CLIProxyProvider, OAuthFlowType> = {
qwen: 'device_code',
iflow: 'device_code',
kiro: 'authorization_code',
copilot: 'device_code',
ghcp: 'device_code',
};
/**
@@ -138,15 +138,7 @@ export async function checkOAuthPort(provider: CLIProxyProvider): Promise<OAuthP
* Check OAuth ports for all providers
*/
export async function checkAllOAuthPorts(): Promise<OAuthPortDiagnostic[]> {
const providers: CLIProxyProvider[] = [
'gemini',
'codex',
'agy',
'qwen',
'iflow',
'kiro',
'copilot',
];
const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp'];
const results: OAuthPortDiagnostic[] = [];
for (const provider of providers) {