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 committed 2025-12-22 00:45:13 -05:00
1 parent fae1ee2b31
commit 49bc0a44cc
2 files changed
+4 -12

No files matched your search

+1 -1
View File
@@ -495,7 +495,7 @@ export function discoverExistingAccounts(): void {
* Get summary of all accounts across providers * Get summary of all accounts across providers
*/ */
export function getAllAccountsSummary(): Record<CLIProxyProvider, AccountInfo[]> { 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< const summary: Record<CLIProxyProvider, AccountInfo[]> = {} as Record<
CLIProxyProvider, CLIProxyProvider,
AccountInfo[] 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 qwen: null, // Device Code Flow - no callback port
iflow: null, // Device Code Flow - no callback port iflow: null, // Device Code Flow - no callback port
kiro: 9876, // Authorization Code Flow 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', qwen: 'device_code',
iflow: 'device_code', iflow: 'device_code',
kiro: 'authorization_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 * Check OAuth ports for all providers
*/ */
export async function checkAllOAuthPorts(): Promise<OAuthPortDiagnostic[]> { export async function checkAllOAuthPorts(): Promise<OAuthPortDiagnostic[]> {
const providers: CLIProxyProvider[] = [ const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp'];
'gemini',
'codex',
'agy',
'qwen',
'iflow',
'kiro',
'copilot',
];
const results: OAuthPortDiagnostic[] = []; const results: OAuthPortDiagnostic[] = [];
for (const provider of providers) { for (const provider of providers) {