Commit Graph
2388 Commits
Author SHA1 Message Date
Tam Nhu Tran 1f29fa0b6a fix(api): complete anthropic direct profile support 2026-03-07 15:58:36 +07:00
BbChip0103andClaude Opus 4.6 fedb4d4cde feat(api): add Anthropic direct API key support
Support native Anthropic API keys (sk-ant-...) via `ccs api create --preset anthropic`.
Profiles use ANTHROPIC_API_KEY env var without BASE_URL, letting Claude CLI
authenticate natively with x-api-key header instead of proxy Bearer token.

- Add anthropic preset to provider catalog
- Branch profile-writer env structure (native vs proxy)
- Add validateAnthropicKey() preflight with x-api-key header
- Auto-detect api.anthropic.com URL in interactive flow
- Fix hasApiKey/isConfigured to recognize ANTHROPIC_API_KEY
- Update delegation-validator for native mode profiles
- Add Droid target API key fallback (ANTHROPIC_API_KEY)

Closes #688

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:13:10 +09:00
github-actions[bot] 0c4d5244c8 chore(sync): merge main into dev after release [skip ci] 2026-03-04 12:53:07 +00:00
semantic-release-bot 4c4d00d835 chore(release): 7.52.2 [skip ci]
## [7.52.2](https://github.com/kaitranntt/ccs/compare/v7.52.1...v7.52.2) (2026-03-04)

### Bug Fixes

* **ci:** remove LOC count from maintainability gate ([619c47d](https://github.com/kaitranntt/ccs/commit/619c47d89ae405690cddc849dcf15e8cc3240ab5))
* **ci:** strip ANSI codes before detecting published release ([a8d7f7c](https://github.com/kaitranntt/ccs/commit/a8d7f7caafb361e961aa2f17e0084d551b4674f7))
* **cliproxy:** reduce gemini alias model bloat ([276649f](https://github.com/kaitranntt/ccs/commit/276649f05d8da2948b10db5ab1d7a78c60e1e654))
* **copilot:** harden daemon lifecycle and validate config updates ([1fd128e](https://github.com/kaitranntt/ccs/commit/1fd128e50feb3fe779ac30e8706c722024e77543))
* **copilot:** improve daemon liveness and flag aliases ([4b1cda2](https://github.com/kaitranntt/ccs/commit/4b1cda25d945e6482be68804907177a8ad38489e))
* **copilot:** refine ownership checks and command error handling ([930d66f](https://github.com/kaitranntt/ccs/commit/930d66fc0d31468ecc53fc50bd6db81aaed1fb7b))
* **copilot:** sync alias UX and harden daemon stop safety ([f4678d6](https://github.com/kaitranntt/ccs/commit/f4678d639772699d9f3504dcd05bc9e311f67527))

### Code Refactoring

* **daemon:** share process ownership guard for safe shutdown ([5ad2416](https://github.com/kaitranntt/ccs/commit/5ad2416a863e8190351a1ee42e00646093e3e70f))

### Tests

* **cliproxy:** strengthen alias non-enrichment assertions ([e28d9c8](https://github.com/kaitranntt/ccs/commit/e28d9c8abcea772b8fff7e6587582aac692a2726))

### CI

* **release:** use PAT_TOKEN for semantic-release branch protection bypass ([91280e3](https://github.com/kaitranntt/ccs/commit/91280e3043bd981b86b187fbfbead5ca6f31139d))
2026-03-04 12:52:34 +00:00
Tam Nhu Tran c6f6fe940c Merge branch 'main' into dev 2026-03-04 19:51:20 +07:00
Tam Nhu Tran 619c47d89a fix(ci): remove LOC count from maintainability gate
largeFileCountOver350Loc is a vanity metric that blocks releases
for borderline cases (359-372 LOC files). Keep processExit and
synchronousFs gates which track real anti-patterns. LOC still
collected/reported but no longer gated.
2026-03-04 19:50:03 +07:00
Tam Nhu Tran d3ede45c96 fix(ci): remove LOC count from maintainability gate
largeFileCountOver350Loc is a vanity metric that blocks releases
for borderline cases (359-372 LOC files). Keep processExit and
synchronousFs gates which track real anti-patterns. LOC still
collected/reported but no longer gated.
2026-03-04 19:49:44 +07:00
Kai (Tam Nhu) TranandGitHub 16b47e5b3e Merge pull request #685 from kaitranntt/dev
fix: copilot daemon liveness and cliproxy model optimization
2026-03-04 07:23:09 -05:00
github-actions[bot] bebd3dfffb chore(release): 7.52.1-dev.2 [skip ci] 2026-03-04 11:58:25 +00:00
Kai (Tam Nhu) TranandGitHub 760ed15783 Merge pull request #683 from kaitranntt/kai/fix/copilot-daemon-liveness-dx
fix(copilot): improve daemon liveness and flag aliases
2026-03-04 06:57:04 -05:00
Tam Nhu Tran 930d66fc0d fix(copilot): refine ownership checks and command error handling 2026-03-04 17:18:44 +07:00
Tam Nhu Tran 1fd128e50f fix(copilot): harden daemon lifecycle and validate config updates 2026-03-04 17:05:35 +07:00
Tam Nhu Tran 5ad2416a86 refactor(daemon): share process ownership guard for safe shutdown 2026-03-04 16:42:59 +07:00
Tam Nhu Tran f4678d6397 fix(copilot): sync alias UX and harden daemon stop safety 2026-03-04 16:37:23 +07:00
Tam Nhu Tran 4b1cda25d9 fix(copilot): improve daemon liveness and flag aliases 2026-03-04 16:14:12 +07:00
github-actions[bot] 571ba4946c chore(release): 7.52.1-dev.1 [skip ci] 2026-03-03 19:59:23 +00:00
Kai (Tam Nhu) TranandGitHub 187b452b97 Merge pull request #676 from kaitranntt/kai/fix/cliproxy-control-panel-model-bloat
fix(cliproxy): reduce gemini alias model bloat
2026-03-03 14:57:52 -05:00
Tam Nhu Tran e28d9c8abc test(cliproxy): strengthen alias non-enrichment assertions 2026-03-04 02:51:42 +07:00
Tam Nhu Tran 276649f05d fix(cliproxy): reduce gemini alias model bloat 2026-03-04 02:46:52 +07:00
github-actions[bot] 9281ac24fb chore(sync): merge main into dev after release [skip ci]
# Conflicts:
#	package.json
2026-03-03 19:30:01 +00:00
semantic-release-bot 58731eb9ea chore(release): 7.52.1 [skip ci]
## [7.52.1](https://github.com/kaitranntt/ccs/compare/v7.52.0...v7.52.1) (2026-03-03)

### Bug Fixes

* **ci:** strip ANSI codes before detecting published release ([6e16f1c](https://github.com/kaitranntt/ccs/commit/6e16f1cf3e2a3d43fa600a6fbadd35a513bf5db7))
2026-03-03 19:28:12 +00:00
github-actions[bot] f70e1a48c3 chore(release): 7.52.0-dev.1 [skip ci] 2026-03-03 19:24:41 +00:00
Tam Nhu Tran 6e16f1cf3e fix(ci): strip ANSI codes before detecting published release
semantic-release outputs ANSI color codes that break the grep pattern
for detecting "Published GitHub release", causing Discord notifications
to be skipped even on successful releases.
2026-03-04 02:24:15 +07:00
Tam Nhu Tran a8d7f7caaf fix(ci): strip ANSI codes before detecting published release
semantic-release outputs ANSI color codes that break the grep pattern
for detecting "Published GitHub release", causing Discord notifications
to be skipped even on successful releases.
2026-03-04 02:22:10 +07:00
semantic-release-bot aa36abbe5e chore(release): 7.52.0 [skip ci]
## [7.52.0](https://github.com/kaitranntt/ccs/compare/v7.51.0...v7.52.0) (2026-03-03)

### Features

* **analytics:** integrate CLIProxy multi-provider usage into dashboard ([c5124a9](https://github.com/kaitranntt/ccs/commit/c5124a9cee7e37caaef811051852946467ee97e1))
* **api:** add Alibaba Coding Plan preset and providers promotion ([8811e53](https://github.com/kaitranntt/ccs/commit/8811e5320fe6d5340ad2bcdca24fd98599ceb716))
* **continuity:** support cross-profile continuity inheritance from account profiles ([0b9f982](https://github.com/kaitranntt/ccs/commit/0b9f9826e2c838e19c4bf9bc406ab14a5456fbcc))
* **i18n:** add comprehensive Vietnamese dashboard locale ([7893436](https://github.com/kaitranntt/ccs/commit/789343603803cd6fc90b5e162df969b25ad858da))
* **i18n:** Added support for Chinese language pack ([7ffb8a4](https://github.com/kaitranntt/ccs/commit/7ffb8a42340abc7e36282b2d67665c226203c5af))
* **pricing:** fix claude sonnet 4.6 and claude opus 4.6 pricing ([9a7ca3f](https://github.com/kaitranntt/ccs/commit/9a7ca3f1c0f6e5518d8f130d9d061599d3c27ad0))

### Bug Fixes

* **agy:** harden preset canonicalization and migration coverage ([747c706](https://github.com/kaitranntt/ccs/commit/747c70636950e72fcbdf0bf92fe54f7800fa0a8a))
* **agy:** harden self-migration across settings load/update paths ([3a26aba](https://github.com/kaitranntt/ccs/commit/3a26abac71e36d6f1d95333a47feb3c3cd08cce5))
* **agy:** normalize sonnet 4.6 model ids and migrate legacy thinking alias ([8a2b554](https://github.com/kaitranntt/ccs/commit/8a2b55449bd12df5183587fd801aa87581800b0a))
* **agy:** remove deprecated 4.5 selector options ([5913f73](https://github.com/kaitranntt/ccs/commit/5913f730ac370720febd31ad874bcbfa040a2671))
* **api-profiles:** keep AGY denylist when droid provider is set ([2710139](https://github.com/kaitranntt/ccs/commit/27101390fe3e6c2020088e83e004f4b5037b59c5))
* **auth:** harden continuity inheritance resolution ([8a45727](https://github.com/kaitranntt/ccs/commit/8a45727b314194af42533ec0cad95a3314ada162))
* **auth:** scope km alias mapping to settings profiles ([d827c3a](https://github.com/kaitranntt/ccs/commit/d827c3ab0baaacaf116e81c7aabf7f426f5201da))
* **ci:** harden release workflows against PAT checkout failures ([b35c85d](https://github.com/kaitranntt/ccs/commit/b35c85d308ef2ddff8f04e46bd005eae5983bc91))
* **ci:** remove PAT dependency from release workflow checkouts ([a259d95](https://github.com/kaitranntt/ccs/commit/a259d957b15c97381c86570080a4b173d657aefa))
* **cliproxy:** denylist deprecated agy 4.5 models ([f63e2cd](https://github.com/kaitranntt/ccs/commit/f63e2cd5a31a73c980d199b65eb3a320094c46ae))
* **cliproxy:** harden agy model canonicalization and migration paths ([0b57e41](https://github.com/kaitranntt/ccs/commit/0b57e41b3a0c1d277d202dc84f6c9c13be76e222))
* **cliproxy:** normalize iflow aliases for explicit routing ([7e471e6](https://github.com/kaitranntt/ccs/commit/7e471e663c8b0a8f7cdee10a9146e5a9b6035411))
* **cliproxy:** normalize stale iflow model aliases ([546c4ee](https://github.com/kaitranntt/ccs/commit/546c4ee4ee006589f179b544c6b73e362b7ebbe6))
* **cliproxy:** restore agy legacy 4.5 lookup compatibility ([ed05cfc](https://github.com/kaitranntt/ccs/commit/ed05cfc5a7bc6e7335d360acca88b86d521826c8))
* **config:** merge legacy and unified continuity maps ([1eb41cc](https://github.com/kaitranntt/ccs/commit/1eb41cc4e217554021be4d0c20d8ff2f13ebedcd))
* **ghcp:** improve oauth failure diagnostics in device flow ([c2f564a](https://github.com/kaitranntt/ccs/commit/c2f564ac662534e7abb6d090e75820581cf46012))
* **i18n:** complete Vietnamese dashboard copy QA polish ([b07c62c](https://github.com/kaitranntt/ccs/commit/b07c62cc219d02005ca2e308fbe6c30308ca7a59))
* **i18n:** harden unstable dialog and complete cursor locale key ([552eee3](https://github.com/kaitranntt/ccs/commit/552eee31692d9150e429abbc2ec2dff076ed740a))
* **i18n:** polish remaining Vietnamese copy for dashboard context ([f3f315e](https://github.com/kaitranntt/ccs/commit/f3f315e86aad3f65075b503026657f30718e0e06))
* **i18n:** refine Vietnamese dashboard translation quality ([758fcc7](https://github.com/kaitranntt/ccs/commit/758fcc7754b20faf1bf48ca564eb86283c231ac9))
* **pricing:** handle date-stamped 4.6 thinking model IDs ([d31f85b](https://github.com/kaitranntt/ccs/commit/d31f85b0d4ccbf0edddcd2f58a49c1f9777cc6e1))
* respect auto_update preference by disabling Claude auto-updater ([4cdb659](https://github.com/kaitranntt/ccs/commit/4cdb6594f80df8f40118202ae285d3f03adfadab))
* **security:** harden API endpoints and resolve PR [#674](https://github.com/kaitranntt/ccs/issues/674) review findings ([a4c5bb7](https://github.com/kaitranntt/ccs/commit/a4c5bb7421748e744c07eb7ab5c7cfb3a55b8081))
* **ui:** improve providers badge readability and albb preset ([3b38f1a](https://github.com/kaitranntt/ccs/commit/3b38f1ac90ac027011711d00fe7d545be717ddc4))
* **ui:** restore scrolling in API profile create dialog ([6f8514b](https://github.com/kaitranntt/ccs/commit/6f8514b74b4383e94788224e25e78b9ede7c56d0))
* **usage:** coalesce refresh and force live sync on refresh ([09ce1a9](https://github.com/kaitranntt/ccs/commit/09ce1a93797da942629f504821a3303afd5e2e4f))
* **web-server:** run usage cleanup during dashboard shutdown ([e8519b6](https://github.com/kaitranntt/ccs/commit/e8519b6ac3465738cb7a09059d095fbdab94d36c))

### Documentation

* **i18n:** add dashboard localization guide and links ([2dddf02](https://github.com/kaitranntt/ccs/commit/2dddf02a216d14c53af6d5bcb585aa2ce346f36f))

### Code Refactoring

* **routes:** resolve DRY violations, config race, and error leaks ([e255855](https://github.com/kaitranntt/ccs/commit/e255855775c59dab3ad5b39a97d8176c77e0e889))

### Tests

* **auth:** cover legacy alias isolation for continuity ([26f4fb3](https://github.com/kaitranntt/ccs/commit/26f4fb3a99035dff9ef5e012b2e169bee9a9587b))
* **pricing:** cover Claude 4.6 cache token cost rates ([91050bf](https://github.com/kaitranntt/ccs/commit/91050bfebf15fa39eefdc819af3cd0450c79889e))
* **usage:** add cliproxy sync and integration coverage ([383ac94](https://github.com/kaitranntt/ccs/commit/383ac94623f69fc024e12008c6d40f059ae12491))

### CI

* **release:** use PAT_TOKEN for semantic-release branch protection bypass ([343c36f](https://github.com/kaitranntt/ccs/commit/343c36f97d949dfb85ee92a7161c60197413cf11))
2026-03-03 18:56:39 +00:00
github-actions[bot] 784b4efa1c chore(sync): merge main into dev after release [skip ci] 2026-03-03 18:54:05 +00:00
Tam Nhu Tran 91280e3043 ci(release): use PAT_TOKEN for semantic-release branch protection bypass
semantic-release needs to push version bump + CHANGELOG commits directly
to main. GITHUB_TOKEN cannot bypass branch protection rules, causing
@semantic-release/git to fail with "push declined due to repository rule
violations". PAT_TOKEN has admin bypass and resolves the issue.
2026-03-04 01:52:11 +07:00
Kai (Tam Nhu) TranandGitHub dc5eb5fcdf Merge pull request #675 from kaitranntt/kai/hotfix-release-token
ci(release): use PAT_TOKEN for semantic-release branch protection bypass
2026-03-03 13:48:52 -05:00
Tam Nhu Tran 343c36f97d ci(release): use PAT_TOKEN for semantic-release branch protection bypass
semantic-release needs to push version bump + CHANGELOG commits directly
to main. GITHUB_TOKEN cannot bypass branch protection rules, causing
@semantic-release/git to fail with "push declined due to repository rule
violations". PAT_TOKEN has admin bypass and resolves the issue.
2026-03-04 01:42:29 +07:00
Kai (Tam Nhu) TranandGitHub d7d9eb0891 Merge pull request #674 from kaitranntt/dev
chore(release): sync dev to main v7.51.0
2026-03-03 13:36:25 -05:00
github-actions[bot] 1f52998d56 chore(release): 7.51.0-dev.14 [skip ci] 2026-03-03 18:35:38 +00:00
Tam Nhu Tran aeb2553173 chore: update maintainability baseline for v7.51 security hardening 2026-03-04 01:32:59 +07:00
Tam Nhu Tran e255855775 refactor(routes): resolve DRY violations, config race, and error leaks
- Extract generic shouldCacheQuotaResult replacing 4 identical functions
- Move parseTarget to route-helpers.ts (was duplicated in profile/variant routes)
- Add createRouteErrorHelpers factory (was duplicated in auth/settings routes)
- Fix config read-then-write race in proxy-routes.ts and misc-routes.ts
  using mutateUnifiedConfig for atomic read-modify-write
- Replace raw error messages in 500 responses with generic messages +
  server-side logging across all cliproxy-stats-routes handlers
- Convert extractErrorLogMetadata from sync fs to async fs.promises
2026-03-04 01:30:46 +07:00
Tam Nhu Tran a4c5bb7421 fix(security): harden API endpoints and resolve PR #674 review findings
- Fix X-Forwarded-For header spoofing in requireSensitiveLocalAccess (use socket-level address only)
- Add model ID length validation (max 256 chars) in PUT /models/:provider
- Add provider name validation (alphanumeric, max 64 chars) to prevent path traversal
- Add stale entry eviction for unbounded quotaRateLimits Map (>1000 entries)
- Fix concurrent refresh race in usage aggregator (wait for in-flight before forced refresh)
- Sanitize internal URLs/paths from OAuth failure diagnostics
- Add ValidationError class for denylist violations (distinct from system errors)
- Make CLIProxy sync interval configurable via CCS_CLIPROXY_SYNC_INTERVAL env var
- Improve legacy continuity config error logging (unconditional warn)
- Add CACHE_VERSION history comments
2026-03-04 01:30:46 +07:00
github-actions[bot] 2651e17412 chore(release): 7.51.0-dev.13 [skip ci] 2026-03-03 17:46:29 +00:00
Kai (Tam Nhu) TranandGitHub 740bc6d569 Merge pull request #673 from kaitranntt/kai/feat/issue-665-alibaba-coding-plan-integration
feat: add Alibaba Coding Plan integration and providers promotion
2026-03-03 12:44:40 -05:00
Tam Nhu Tran 3b38f1ac90 fix(ui): improve providers badge readability and albb preset 2026-03-04 00:39:02 +07:00
Tam Nhu Tran 8811e5320f feat(api): add Alibaba Coding Plan preset and providers promotion 2026-03-04 00:39:02 +07:00
github-actions[bot] 08eb46a5de chore(release): 7.51.0-dev.12 [skip ci] 2026-03-03 17:25:28 +00:00
Kai (Tam Nhu) TranandGitHub ec9f3d19ce Merge pull request #672 from kaitranntt/kai/fix/issue-669-ghcp-oauth-failure
fix(ghcp): improve OAuth failure diagnostics after device auth
2026-03-03 12:24:09 -05:00
Tam Nhu Tran c2f564ac66 fix(ghcp): improve oauth failure diagnostics in device flow 2026-03-04 00:19:11 +07:00
github-actions[bot] a066654613 chore(release): 7.51.0-dev.11 [skip ci] 2026-03-03 16:51:59 +00:00
Kai (Tam Nhu) TranandGitHub 9ec7f5af96 Merge pull request #671 from kaitranntt/kai/fix/664-agy-legacy-model-lookup-compat
fix(cliproxy): restore AGY legacy model lookup compatibility
2026-03-03 11:49:47 -05:00
Kai (Tam Nhu) TranandGitHub 10b50225d4 Merge pull request #670 from kaitranntt/kai/fix/663-kimi-k25-provider-routing
fix: resolve iflow unknown-provider error for kimi-k2.5
2026-03-03 11:49:18 -05:00
Tam Nhu Tran ed05cfc5a7 fix(cliproxy): restore agy legacy 4.5 lookup compatibility 2026-03-03 23:44:27 +07:00
Tam Nhu Tran 27101390fe fix(api-profiles): keep AGY denylist when droid provider is set 2026-03-03 23:41:11 +07:00
Tam Nhu Tran 7e471e663c fix(cliproxy): normalize iflow aliases for explicit routing 2026-03-03 23:34:38 +07:00
Tam Nhu Tran 546c4ee4ee fix(cliproxy): normalize stale iflow model aliases 2026-03-03 23:26:07 +07:00
github-actions[bot] 34971c8be4 chore(release): 7.51.0-dev.10 [skip ci] 2026-03-03 16:18:07 +00:00
Kai (Tam Nhu) TranandGitHub 947ba3dfb6 Merge pull request #666 from theoDep/fix/claude-4-6-models-pricing
feat(pricing): fix claude sonnet 4.6 and claude opus 4.6 pricing
2026-03-03 11:16:47 -05:00