diff --git a/docs/codebase-summary.md b/docs/codebase-summary.md index 4ef7fc7b..43fcb828 100644 --- a/docs/codebase-summary.md +++ b/docs/codebase-summary.md @@ -48,6 +48,7 @@ src/ │ ├── config-command.ts # Config management commands │ ├── config-image-analysis-command.ts # Image analysis hook config (NEW v7.34) │ ├── doctor-command.ts # Health diagnostics +│ ├── env-command.ts # Export shell env vars for third-party tools (v7.39) │ ├── help-command.ts # Help text generation │ ├── install-command.ts # Install/uninstall logic │ ├── shell-completion-command.ts @@ -465,10 +466,12 @@ export type { ProviderEditorProps } from './provider-editor'; ``` tests/ -├── unit/ # Unit tests (6 core test files) +├── unit/ # Unit tests (7 core test files) │ ├── data-aggregator.test.ts │ ├── cliproxy/ │ │ └── remote-proxy-client.test.ts +│ ├── commands/ +│ │ └── env-command.test.ts │ ├── jsonl-parser.test.ts │ ├── model-pricing.test.ts │ ├── unified-config.test.ts @@ -487,12 +490,12 @@ tests/ | Metric | Value | |--------|-------| -| Total Tests | 1407 | -| Passing | 1407 | +| Total Tests | 1440 | +| Passing | 1440 | | Skipped | 6 | | Failed | 0 | | Coverage Threshold | 90% | -| Test Files | 40+ | +| Test Files | 41 | --- diff --git a/docs/project-overview-pdr.md b/docs/project-overview-pdr.md index 2fd44000..30614026 100644 --- a/docs/project-overview-pdr.md +++ b/docs/project-overview-pdr.md @@ -115,6 +115,13 @@ CCS provides: - Entrypoint with privilege dropping and usage help - Environment variable configuration support +### FR-011: Third-Party Tool Integration +- Export shell-evaluable env vars via `ccs env` command +- Support OpenAI, Anthropic, raw output formats +- Auto-detect shell (bash/zsh, fish, PowerShell) from $SHELL +- Security: single-quoted output, key sanitization, shell-specific escaping +- Cross-platform compatibility (macOS, Linux, Windows) + --- ## Non-Functional Requirements @@ -192,7 +199,7 @@ CCS provides: | Startup time | < 100ms | Achieved | | Dashboard load | < 2s | Achieved | | Error rate | < 1% | Achieved | -| Test coverage | > 90% | 90% (1407 tests, 6 skipped) | +| Test coverage | > 90% | 90% (1440 tests, 6 skipped) | | File size compliance | 100% < 200 lines | 95% | --- @@ -261,6 +268,16 @@ CCS provides: - [x] Quota 429 rate limit handling improvements - [x] WebSocket maxPayload limit (DoS prevention) +### v7.39 Release (Complete) +- [x] `ccs env` command for third-party tool integration (OpenCode, Cursor, Continue) +- [x] Multi-format output: openai, anthropic, raw +- [x] Multi-shell support: bash/zsh, fish, PowerShell (auto-detected) +- [x] CLIProxy profile support (gemini, codex, agy, qwen) +- [x] Settings profile support (glm, kimi, custom API) +- [x] Security: single-quoted output, key sanitization, shell-specific escaping +- [x] Shell completion updated (bash, zsh, fish, PowerShell) +- [x] 33 unit tests for env command + ### v8.0 Release (Planned - Q1 2026) - [ ] Multiple CLIProxyAPI instances (load balancing, failover) - [ ] Native git worktree support diff --git a/docs/project-roadmap.md b/docs/project-roadmap.md index 2aa857fc..7f257d11 100644 --- a/docs/project-roadmap.md +++ b/docs/project-roadmap.md @@ -26,13 +26,14 @@ All major modularization work is complete. The codebase evolved from monolithic | 12 | Hybrid Quota Management | `quota-manager.ts`, `quota-fetcher.ts` (v7.14) | | 13 | Docker Support | `docker/` directory with Dockerfile, Compose, entrypoint | | 14 | Image Analysis Hook | Vision proxying via CLIProxy transformers (v7.34) | +| 15 | Third-Party Tool Integration | `ccs env` command with multi-format export (v7.39) | **Metrics Achieved**: - Files >500 lines: 12 -> 5 (-58%) - UI files >200 lines: 28 -> 8 (-71%) - Barrel exports: 5 -> 39 (+680%) - Test coverage: 0% -> 90% -- Total tests: 1407 (6 skipped) +- Total tests: 1440 (6 skipped) --- @@ -170,6 +171,7 @@ worktrees: | Hybrid Quota Management | COMPLETE | v7.14 | | Docker Support (PR #345) | COMPLETE | v7.23 | | Image Analysis Hook | COMPLETE | v7.34 | +| Third-Party Tool Integration | COMPLETE | v7.39 | | Critical Bug Fixes (#158, #155, #124) | PLANNED | Q1 2026 | | Multiple CLIProxyAPI Instances | PLANNED | Q1 2026 | | Git Worktree Support | PLANNED | Q2 2026 | diff --git a/docs/system-architecture.md b/docs/system-architecture.md index cca04f5b..10b55a2a 100644 --- a/docs/system-architecture.md +++ b/docs/system-architecture.md @@ -116,9 +116,10 @@ CCS v7.34 adds Image Analysis Hook for vision model proxying through CLIProxy wi | commands/ | | auth/ | | config/ | |------------------| |------------------| |------------------| | doctor-command | | account-switcher | | unified-config- | - | help-command | | profile-detector | | loader | - | install-command | | commands/ | | migration-manager| - | sync-command | +------------------+ +------------------+ + | env-command | | profile-detector | | loader | + | help-command | | commands/ | | migration-manager| + | install-command | +------------------+ +------------------+ + | sync-command | | update-command | +------------------+ | | |