Commit Graph
923 Commits
Author SHA1 Message Date
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
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
Tam Nhu Tran c2f564ac66 fix(ghcp): improve oauth failure diagnostics in device flow 2026-03-04 00:19:11 +07: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
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
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
Tam Nhu Tran d31f85b0d4 fix(pricing): handle date-stamped 4.6 thinking model IDs 2026-03-03 23:08:04 +07:00
Tam Nhu Tran 09ce1a9379 fix(usage): coalesce refresh and force live sync on refresh
- share one full-refresh promise across usage loaders to avoid duplicate work

- sync CLIProxy snapshot before source refresh and start sync lazily

- make refresh handler execute full refresh with proper error response

- reset pending cache state and guard sync interval double-start
2026-03-03 23:05:24 +07:00
Tam Nhu Tran e8519b6ac3 fix(web-server): run usage cleanup during dashboard shutdown
- pass server cleanup callback into graceful shutdown wiring

- stop usage aggregator background sync when config server exits

- prevent orphaned sync intervals across dashboard restarts
2026-03-03 23:05:24 +07:00
theodep 9a7ca3f1c0 feat(pricing): fix claude sonnet 4.6 and claude opus 4.6 pricing 2026-03-03 16:27:06 +01:00
Kai (Tam Nhu) TranandGitHub a73d9a4c82 Merge pull request #660 from kaitranntt/kai/feat/cliproxy-multi-provider-analytics
fix(agy): remove deprecated 4.5 selector options
2026-03-03 09:14:43 -05:00
Tam Nhu Tran f63e2cd5a3 fix(cliproxy): denylist deprecated agy 4.5 models 2026-03-03 03:10:53 +07:00
Tam Nhu Tran 5913f730ac fix(agy): remove deprecated 4.5 selector options 2026-03-03 03:10:53 +07:00
Tam Nhu Tran d827c3ab0b fix(auth): scope km alias mapping to settings profiles
- prevent km continuity mappings from affecting kimi cliproxy executions

- apply canonical alias fallback only for settings profile lookups

- add regression test for cross-type alias isolation
2026-03-03 02:58:49 +07:00
Tam Nhu Tran 1eb41cc4e2 fix(config): merge legacy and unified continuity maps
- combine continuity.inherit_from_account with legacy continuity_inherit_from_account

- prefer unified continuity entries on key collisions

- add regression coverage for mixed-key merge behavior
2026-03-03 02:49:18 +07:00
Tam Nhu Tran 8a45727b31 fix(auth): harden continuity inheritance resolution
- resolve mappings with alias/canonical profile candidates

- fail open when source account initialization errors

- remove metadata touch side effects from inheritance preflight
2026-03-03 02:49:17 +07:00
Tam Nhu Tran 0b9f9826e2 feat(continuity): support cross-profile continuity inheritance from account profiles 2026-03-03 02:49:17 +07:00
Tam Nhu Tran c5124a9cee feat(analytics): integrate CLIProxy multi-provider usage into dashboard
Add unified analytics tracking for all CLIProxy-routed providers
(Gemini/Droid, Codex, OpenCode, Antigravity, Qwen) alongside
existing Claude JSONL data.

- New transformer converts CLIProxy usage API response to
  DailyUsage/HourlyUsage/MonthlyUsage types
- New syncer periodically fetches CLIProxy data (5min interval)
  and persists snapshots to ~/.ccs/cache/cliproxy-usage/
- Aggregator treats CLIProxy as 3rd data source alongside
  default Claude config and CCS instances
- Charts automatically show multi-provider data in unified view
- Graceful degradation when CLIProxy is unavailable
2026-03-03 01:12:12 +07:00
Tam Nhu Tran 747c706369 fix(agy): harden preset canonicalization and migration coverage 2026-03-03 00:39:16 +07:00
Kai (Tam Nhu) TranandGitHub 5988524ec3 Merge pull request #653 from kaitranntt/kai/fix/agy-sonnet-46-model-migration
fix(agy): normalize sonnet 4.6 model IDs and migrate legacy alias
2026-03-02 11:47:06 -05:00
Tam Nhu Tran 0b57e41b3a fix(cliproxy): harden agy model canonicalization and migration paths 2026-03-02 21:43:33 +07:00
Tam Nhu Tran 3a26abac71 fix(agy): harden self-migration across settings load/update paths 2026-03-02 21:19:29 +07:00
Tam Nhu Tran 4cdb6594f8 fix: respect auto_update preference by disabling Claude auto-updater 2026-03-02 21:13:15 +07:00
Tam Nhu Tran 8a2b55449b fix(agy): normalize sonnet 4.6 model ids and migrate legacy thinking alias 2026-03-02 21:10:49 +07:00
Tam Nhu Tran ce44d2ece0 fix(droid): harden exec passthrough and add integration coverage 2026-02-26 23:28:36 +07:00
Tam Nhu Tran 5963ba973e fix(droid): add structural exec passthrough for ccsd 2026-02-26 22:59:10 +07:00
Tam Nhu Tran b6475baab3 feat(accounts): add advanced deeper continuity mode and claude pool discoverability 2026-02-26 19:01:13 +07:00
Tam Nhu Tran 10c08b9be8 fix(accounts): focus dashboard on auth profiles and legacy context onboarding 2026-02-26 18:20:07 +07:00
Tam Nhu Tran 5c6fe20d3f fix(accounts): improve shared-context editing and discoverability 2026-02-26 18:10:06 +07:00
Tam Nhu Tran f9f063ca01 fix(shared): polish shared data UX and route persistence 2026-02-26 17:46:35 +07:00
Tam Nhu Tran 46b4f9c1cf fix(shared): harden markdown traversal and parsing 2026-02-26 14:57:57 +07:00
Tam Nhu Tran 346fa5fcda fix(shared): support file-based agents and recursive commands 2026-02-26 14:57:57 +07:00
Kai (Tam Nhu) TranandGitHub 77a236490d Merge pull request #638 from kaitranntt/kai/fix/629-unknown-provider-claude-sonnet-4-6-thinking
fix(cliproxy): normalize deprecated antigravity Claude aliases
2026-02-26 02:57:12 -05:00
Kai (Tam Nhu) TranandGitHub 267bd4c187 Merge pull request #631 from GeorgeDong32/main
feat(pricing): add MiniMax M2.5 and Qwen3 series model pricing
2026-02-26 02:48:07 -05:00
Tam Nhu Tran ff9dbb3061 fix(cliproxy): normalize deprecated antigravity Claude aliases 2026-02-26 14:33:47 +07:00
Tam Nhu Tran 7ac5e3edab fix(pricing): normalize model aliases for MiniMax and Qwen 2026-02-26 14:15:32 +07:00
Tam Nhu Tran 03bc4140a1 fix(iflow): replace placeholder model defaults to prevent 406 2026-02-26 14:04:32 +07:00
Kai (Tam Nhu) TranandGitHub a30d55777f Merge pull request #627 from kaitranntt/kai/feat/624-share-context
fix(auth): harden shared-context isolation edge cases
2026-02-26 01:47:39 -05:00
Kai (Tam Nhu) TranandGitHub 4f1aa69d01 Merge pull request #623 from kaitranntt/kai/fix/agy-responsibility-gate
fix(agy): enforce multi-step responsibility acknowledgement for antigravity oauth
2026-02-26 01:44:43 -05:00
Tam Nhu Tran eedb53b49e feat(droid): sync reasoning effort across CLI and dashboard 2026-02-26 12:27:50 +07:00
Tam Nhu Tran 031dcd99c3 feat(dashboard): enrich droid docs and quick settings controls
- add reusable compatible-CLI docs registry with external provider fact-check links

- render docs links in Droid notes panel and keep future CLI extension points

- add left-column quick controls for key settings.json fields (reasoning/autonomy/diff/automation)
2026-02-26 00:03:58 +07:00
Tam Nhu Tran 20e48b3dc0 refactor(dashboard): switch droid settings I/O to async fs
- replace sync fs calls in compatible CLI JSON helper with fs.promises

- make droid diagnostics/raw-settings service + routes async

- update unit tests for async save/read paths
2026-02-25 23:42:17 +07:00
Tam Nhu Tran e9eab712b3 refactor(dashboard): reuse compatible CLI settings editor stack
- add shared backend JSON file probe/write utilities for compatible CLI settings

- add shared frontend raw JSON editor panel and wire Droid page to it

- support PUT save flow with validation and mtime conflict handling
2026-02-25 23:39:39 +07:00
Tam Nhu Tran c6d2e71ec2 fix(dashboard): align droid config diagnostics with factory paths
- replace ~/.config/factory/config.json diagnostics with legacy ~/.factory/config.json

- keep ~/.factory/settings.json as the primary BYOK source in UI + API payload

- update droid dashboard tests and frontend typings for legacyConfig
2026-02-25 23:26:23 +07:00
Tam Nhu Tran bc079bc886 feat(dashboard): add dedicated Factory Droid diagnostics page
- add /droid route under a new Compatible CLIs sidebar section

- expose /api/droid/diagnostics and /api/droid/settings/raw for install and BYOK visibility

- include read-only settings.json viewer plus model/provider breakdown

- add unit coverage for droid dashboard service parsing and path logic
2026-02-25 22:59:15 +07:00