docs: update documentation for kiro and ghcp providers

- add ccs kiro and ccs ghcp to README commands

- update project-overview-pdr with v7.2 and FR-003 OAuth flows

- update system-architecture with OAuth flow types

- update codebase-summary with 7 CLIProxy providers

- update project-roadmap with Phase 11 completion
This commit is contained in:
kaitranntt
2025-12-22 01:09:25 -05:00
parent 92215457f0
commit b93b91c925
5 changed files with 76 additions and 25 deletions
+5 -2
View File
@@ -89,7 +89,7 @@ The dashboard provides visual management for all account types:
| **Claude** | Subscription | `ccs` | Default, strategic planning | | **Claude** | Subscription | `ccs` | Default, strategic planning |
| **Gemini** | OAuth | `ccs gemini` | Zero-config, fast iteration | | **Gemini** | OAuth | `ccs gemini` | Zero-config, fast iteration |
| **Codex** | OAuth | `ccs codex` | Code generation | | **Codex** | OAuth | `ccs codex` | Code generation |
| **Copilot** | OAuth | `ccs copilot` | GitHub Copilot models | | **Copilot** | OAuth | `ccs copilot` or `ccs ghcp` | GitHub Copilot models |
| **Kiro** | OAuth | `ccs kiro` | AWS CodeWhisperer (Claude-powered) | | **Kiro** | OAuth | `ccs kiro` | AWS CodeWhisperer (Claude-powered) |
| **Antigravity** | OAuth | `ccs agy` | Alternative routing | | **Antigravity** | OAuth | `ccs agy` | Alternative routing |
| **OpenRouter** | API Key | `ccs openrouter` | 300+ models, unified API | | **OpenRouter** | API Key | `ccs openrouter` | 300+ models, unified API |
@@ -118,8 +118,11 @@ The dashboard provides visual management for all account types:
```bash ```bash
ccs # Default Claude session ccs # Default Claude session
ccs agy # Antigravity (OAuth)
ccs gemini # Gemini (OAuth) ccs gemini # Gemini (OAuth)
ccs codex # OpenAI Codex (OAuth)
ccs kiro # Kiro/AWS CodeWhisperer (OAuth)
ccs ghcp # GitHub Copilot (OAuth device flow)
ccs agy # Antigravity (OAuth)
ccs glm # GLM (API key) ccs glm # GLM (API key)
``` ```
+3 -3
View File
@@ -1,8 +1,8 @@
# CCS Codebase Summary # CCS Codebase Summary
Last Updated: 2025-12-21 Last Updated: 2025-12-22
Comprehensive overview of the modularized CCS codebase structure following the Phase 9 modularization effort (Settings, Analytics, Auth Monitor splits + Test Infrastructure) and v7.1 Remote CLIProxy feature. Comprehensive overview of the modularized CCS codebase structure following the Phase 9 modularization effort (Settings, Analytics, Auth Monitor splits + Test Infrastructure), v7.1 Remote CLIProxy feature, and v7.2 Kiro + GitHub Copilot (ghcp) OAuth providers.
## Repository Structure ## Repository Structure
@@ -163,7 +163,7 @@ src/
| Core | `commands/`, `errors/` | CLI commands, error handling | | Core | `commands/`, `errors/` | CLI commands, error handling |
| Auth | `auth/`, `cliproxy/auth/` | Authentication across providers | | Auth | `auth/`, `cliproxy/auth/` | Authentication across providers |
| Config | `config/`, `types/` | Configuration & type definitions | | Config | `config/`, `types/` | Configuration & type definitions |
| Providers | `cliproxy/`, `copilot/`, `glmt/` | Provider integrations | | Providers | `cliproxy/`, `copilot/`, `glmt/` | Provider integrations (7 CLIProxy providers: gemini, codex, agy, qwen, iflow, kiro, ghcp) |
| Remote Proxy | `cliproxy/remote-*.ts`, `proxy-config-resolver.ts` | Remote CLIProxy support (v7.1) | | Remote Proxy | `cliproxy/remote-*.ts`, `proxy-config-resolver.ts` | Remote CLIProxy support (v7.1) |
| Services | `web-server/`, `api/` | HTTP server, API services | | Services | `web-server/`, `api/` | HTTP server, API services |
| Utilities | `utils/`, `management/` | Helpers, diagnostics | | Utilities | `utils/`, `management/` | Helpers, diagnostics |
+13 -6
View File
@@ -1,6 +1,6 @@
# CCS Product Development Requirements (PDR) # CCS Product Development Requirements (PDR)
Last Updated: 2025-12-21 Last Updated: 2025-12-22
## Product Overview ## Product Overview
@@ -10,7 +10,7 @@ Last Updated: 2025-12-21
**Description**: CLI wrapper enabling seamless switching between multiple Claude accounts and alternative AI providers (GLM, Gemini, Codex, OpenRouter) with a React-based dashboard for configuration management. Supports both local and remote CLIProxyAPI instances. **Description**: CLI wrapper enabling seamless switching between multiple Claude accounts and alternative AI providers (GLM, Gemini, Codex, OpenRouter) with a React-based dashboard for configuration management. Supports both local and remote CLIProxyAPI instances.
**Current Version**: v7.1.x (Remote CLIProxy routing, OpenRouter integration) **Current Version**: v7.2.x (Kiro + GitHub Copilot OAuth providers)
--- ---
@@ -31,7 +31,7 @@ Developers using Claude Code face these challenges:
CCS provides: CCS provides:
1. **Multi-Account Claude**: Isolated instances via `CLAUDE_CONFIG_DIR` 1. **Multi-Account Claude**: Isolated instances via `CLAUDE_CONFIG_DIR`
2. **OAuth Providers**: Zero-config Gemini, Codex, Antigravity, Copilot integration 2. **OAuth Providers**: Zero-config Gemini, Codex, Antigravity, Copilot, Kiro (ghcp) integration
3. **API Profiles**: GLM, Kimi, OpenRouter, any Anthropic-compatible API 3. **API Profiles**: GLM, Kimi, OpenRouter, any Anthropic-compatible API
4. **Visual Dashboard**: React SPA for configuration management 4. **Visual Dashboard**: React SPA for configuration management
5. **Automatic WebSearch**: MCP fallback for third-party providers 5. **Automatic WebSearch**: MCP fallback for third-party providers
@@ -64,8 +64,8 @@ CCS provides:
- Share commands, skills, agents across accounts - Share commands, skills, agents across accounts
### FR-003: OAuth Provider Integration ### FR-003: OAuth Provider Integration
- Support Gemini, Codex, Antigravity, Copilot OAuth flows - Support Gemini, Codex, Antigravity, Copilot, Kiro (ghcp) OAuth flows
- Browser-based authentication - Browser-based authentication (Authorization Code flow for most, Device Code for ghcp)
- Token caching and refresh - Token caching and refresh
### FR-004: API Profile Management ### FR-004: API Profile Management
@@ -210,11 +210,16 @@ CCS provides:
- [x] Fallback to local when remote unreachable - [x] Fallback to local when remote unreachable
- [x] Protocol-based default ports (HTTPS:443, HTTP:8317) - [x] Protocol-based default ports (HTTPS:443, HTTP:8317)
### v7.2 Release (Complete)
- [x] Kiro (AWS) OAuth provider support via CLIProxyAPIPlus
- [x] GitHub Copilot (ghcp) OAuth provider via Device Code flow
- [x] Authorization Code flow for Kiro (port 9876)
- [x] Device Code flow for ghcp (no local port needed)
### v8.0 Release (Planned - Q1 2026) ### v8.0 Release (Planned - Q1 2026)
- [ ] Multiple CLIProxyAPI instances (load balancing, failover) - [ ] Multiple CLIProxyAPI instances (load balancing, failover)
- [ ] Native git worktree support - [ ] Native git worktree support
- [ ] Critical bug fixes (#158, #155, #124) - [ ] Critical bug fixes (#158, #155, #124)
- [ ] Kiro auth support (#157)
### v9.0 Release (Future - Q2 2026) ### v9.0 Release (Future - Q2 2026)
- [ ] Team collaboration features - [ ] Team collaboration features
@@ -230,6 +235,8 @@ CCS provides:
- Anthropic Claude API - Anthropic Claude API
- Google Gemini API - Google Gemini API
- GitHub Codex/Copilot API - GitHub Codex/Copilot API
- GitHub Copilot (ghcp - Device Code OAuth)
- AWS Kiro (Authorization Code OAuth)
- Z.AI GLM API - Z.AI GLM API
- OpenRouter API - OpenRouter API
+6 -3
View File
@@ -1,6 +1,6 @@
# CCS Project Roadmap # CCS Project Roadmap
Last Updated: 2025-12-21 Last Updated: 2025-12-22
Forward-looking roadmap documenting current priorities, GitHub issues, and future feature plans. Forward-looking roadmap documenting current priorities, GitHub issues, and future feature plans.
@@ -22,6 +22,7 @@ All major modularization work is complete. The codebase evolved from monolithic
| 8 | Auth Monitor | `monitoring/auth-monitor/` (465->8 files) | | 8 | Auth Monitor | `monitoring/auth-monitor/` (465->8 files) |
| 9 | Test Infrastructure | 99 UI tests + 539 CLI tests, 90% coverage | | 9 | Test Infrastructure | 99 UI tests + 539 CLI tests, 90% coverage |
| 10 | Remote CLIProxy | `proxy-config-resolver.ts`, `remote-proxy-client.ts` | | 10 | Remote CLIProxy | `proxy-config-resolver.ts`, `remote-proxy-client.ts` |
| 11 | Kiro + ghcp Providers | OAuth support via CLIProxyAPIPlus (v7.2) |
**Metrics Achieved**: **Metrics Achieved**:
- Files >500 lines: 12 -> 5 (-58%) - Files >500 lines: 12 -> 5 (-58%)
@@ -62,7 +63,7 @@ All major modularization work is complete. The codebase evolved from monolithic
| Issue | Title | Type | Status | | Issue | Title | Type | Status |
|-------|-------|------|--------| |-------|-------|------|--------|
| #142 | Configure with available CLIProxyAPI | enhancement | **COMPLETE** (v7.1) | | #142 | Configure with available CLIProxyAPI | enhancement | **COMPLETE** (v7.1) |
| #157 | Support for Kiro auth from CLIProxyAPIPlus | enhancement | - | | #157 | Support for Kiro auth from CLIProxyAPIPlus | enhancement | **COMPLETE** (v7.2) |
| #123 | Add More Models | enhancement | Ongoing | | #123 | Add More Models | enhancement | Ongoing |
| #114 | OpenCode Zen Free model + Auto Rotation API Key | enhancement | - | | #114 | OpenCode Zen Free model + Auto Rotation API Key | enhancement | - |
@@ -150,7 +151,8 @@ worktrees:
### Priority 5: Authentication Enhancements ### Priority 5: Authentication Enhancements
- **#158**: Fix AGY OAuth flow - **#158**: Fix AGY OAuth flow
- **#157**: Add Kiro auth support from CLIProxyAPIPlus - **#157**: ~~Add Kiro auth support from CLIProxyAPIPlus~~ **COMPLETE** (v7.2)
- GitHub Copilot (ghcp) Device Code flow **COMPLETE** (v7.2)
--- ---
@@ -160,6 +162,7 @@ worktrees:
|-----------|--------|--------| |-----------|--------|--------|
| Modularization (Phases 1-9) | COMPLETE | - | | Modularization (Phases 1-9) | COMPLETE | - |
| Remote CLIProxy Support (#142) | COMPLETE | v7.1 | | Remote CLIProxy Support (#142) | COMPLETE | v7.1 |
| Kiro + GitHub Copilot OAuth (#157) | COMPLETE | v7.2 |
| Critical Bug Fixes (#158, #155, #124) | PLANNED | Q1 2026 | | Critical Bug Fixes (#158, #155, #124) | PLANNED | Q1 2026 |
| Multiple CLIProxyAPI Instances | PLANNED | Q1 2026 | | Multiple CLIProxyAPI Instances | PLANNED | Q1 2026 |
| Git Worktree Support | PLANNED | Q1 2026 | | Git Worktree Support | PLANNED | Q1 2026 |
+49 -11
View File
@@ -1,6 +1,6 @@
# CCS System Architecture # CCS System Architecture
Last Updated: 2025-12-21 Last Updated: 2025-12-22
High-level architecture documentation for the CCS (Claude Code Switch) system. High-level architecture documentation for the CCS (Claude Code Switch) system.
@@ -8,12 +8,12 @@ High-level architecture documentation for the CCS (Claude Code Switch) system.
## System Overview ## System Overview
CCS is a CLI wrapper that enables seamless switching between multiple Claude accounts and alternative AI providers (GLM, Gemini, Codex). It consists of two main components: CCS is a CLI wrapper that enables seamless switching between multiple Claude accounts and alternative AI providers (GLM, Gemini, Codex, Kiro, GitHub Copilot). It consists of two main components:
1. **CLI Application** (`src/`) - Node.js TypeScript CLI 1. **CLI Application** (`src/`) - Node.js TypeScript CLI
2. **Dashboard UI** (`ui/`) - React web application served by Express 2. **Dashboard UI** (`ui/`) - React web application served by Express
CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances. CCS v7.2 adds Kiro (AWS) and GitHub Copilot (ghcp) OAuth providers via CLIProxyAPIPlus.
``` ```
+===========================================================================+ +===========================================================================+
@@ -84,8 +84,9 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
Profile Resolution Profile Resolution
| |
v v
1. CLIProxy Hardcoded ----+---> gemini, codex, agy 1. CLIProxy Hardcoded ----+---> gemini, codex, agy, kiro, ghcp
(OAuth-based) | Zero-config OAuth providers (OAuth-based) | Zero-config OAuth providers
| (kiro: Auth Code, ghcp: Device Code)
| |
2. CLIProxy Variants -----+---> config.cliproxy section 2. CLIProxy Variants -----+---> config.cliproxy section
(User-defined) | Custom provider configurations (User-defined) | Custom provider configurations
@@ -296,11 +297,21 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
| ANTHROPIC_BASE_URL = localhost:XXXX | ANTHROPIC_BASE_URL = localhost:XXXX
v v
+------------------+ +------------------+
| CLIProxyAPI | Local proxy binary | CLIProxyAPI | Local proxy binary (CLIProxyAPIPlus for kiro/ghcp)
| (binary) | | (binary) |
+------------------+ +------------------+
| |
+---> OAuth Authentication (Gemini, Codex, AGY) +---> OAuth Authentication
| |
| +---> Authorization Code Flow (port-based)
| | - Gemini, Codex, Antigravity, Kiro (port 9876)
| | - Opens browser for user auth
| | - Callback to localhost:PORT
| |
| +---> Device Code Flow (no port needed)
| - GitHub Copilot (ghcp)
| - User enters code at github.com/login/device
| - Polls for token completion
| | | |
| v | v
| +------------------+ | +------------------+
@@ -317,6 +328,8 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
+---> Google (Gemini) +---> Google (Gemini)
+---> GitHub (Codex) +---> GitHub (Codex)
+---> Antigravity +---> Antigravity
+---> AWS Kiro (Claude-powered)
+---> GitHub Copilot (ghcp)
+---> OpenAI-compatible endpoints +---> OpenAI-compatible endpoints
``` ```
@@ -497,10 +510,10 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
| Authentication Flow | | Authentication Flow |
+===========================================================================+ +===========================================================================+
OAuth Providers (Gemini, Codex, AGY) OAuth Providers - Authorization Code Flow (Gemini, Codex, AGY, Kiro)
----------------------------------- --------------------------------------------------------------------
1. User runs: ccs gemini 1. User runs: ccs gemini (or ccs kiro)
| |
v v
2. Check token cache (~/.ccs/cliproxy/auth/) 2. Check token cache (~/.ccs/cliproxy/auth/)
@@ -510,8 +523,8 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
+---> [No/Expired token] +---> [No/Expired token]
| |
v v
3. Open browser for OAuth 3. Open browser for OAuth (localhost:PORT callback)
| | - Kiro uses port 9876
v v
4. Callback with auth code 4. Callback with auth code
| |
@@ -522,6 +535,31 @@ CCS v7.1 adds support for both **local** and **remote** CLIProxyAPI instances.
6. Cache token locally 6. Cache token locally
OAuth Providers - Device Code Flow (GitHub Copilot/ghcp)
--------------------------------------------------------
1. User runs: ccs ghcp
|
v
2. Check token cache (~/.ccs/cliproxy/auth/)
|
+---> [Valid token] ---> Use cached token
|
+---> [No/Expired token]
|
v
3. Request device code from GitHub
|
v
4. Display user code + verification URL
| "Enter code XXXX-XXXX at github.com/login/device"
v
5. Poll for token (user completes auth in browser)
|
v
6. Receive and cache token locally
API Key Profiles (GLM, Kimi) API Key Profiles (GLM, Kimi)
---------------------------- ----------------------------