Commit Graph
100 Commits
Author SHA1 Message Date
Tam Nhu Tran 2cb5b4ebec fix(shared-manager): normalize marketplace registry paths 2026-03-17 09:56:31 -04:00
Tam Nhu Tran 5fe96b74b9 fix(ui): restore searchable combobox keyboard navigation 2026-03-17 09:42:38 -04:00
Tam Nhu Tran d056878539 feat(ui): add searchable model comboboxes 2026-03-17 09:01:21 -04:00
Tam Nhu Tran 334f3697f9 test: cover invalid novita preset ids 2026-03-17 08:13:50 -04:00
Tam Nhu Tran eeadff3e52 fix: add novita preset icon asset 2026-03-17 07:20:46 -04:00
Tam Nhu Tran a35859aba5 fix(cursor): harden anthropic daemon contract handling 2026-03-17 07:17:35 -04:00
Tam Nhu Tran 94fa96aa81 fix: correct novita preset endpoint and asset handling 2026-03-17 07:02:47 -04:00
Tam Nhu Tran 67290e85c0 test(cursor): reclassify daemon lifecycle smoke coverage 2026-03-16 14:55:53 -04:00
Tam Nhu Tran eaee4a92ca fix(cursor): harden anthropic response fallback paths 2026-03-16 14:42:15 -04:00
Tam Nhu Tran 9ff021e42b fix(cursor): harden anthropic translation edge cases 2026-03-16 14:42:15 -04:00
Tam Nhu Tran b068fb2621 fix(cursor): avoid empty user turns after tool results 2026-03-16 14:42:15 -04:00
Tam Nhu Tran daad5d1f50 feat(cursor): add Anthropic daemon endpoint 2026-03-16 14:42:15 -04:00
Tam Nhu Tran e6b363524b fix(cliproxy): remap codex haiku fallback on free plans 2026-03-16 14:31:55 -04:00
Tam Nhu Tran ce600a7f22 test(cliproxy): cover codex plan fallback edge cases 2026-03-16 14:00:38 -04:00
Tam Nhu Tran 551591ef18 fix(cliproxy): make codex defaults free-plan safe 2026-03-16 13:43:23 -04:00
Tam Nhu Tran dcb46356f3 fix(ci): load review prompt from base branch to prevent prompt injection
External PRs could modify review-prompt.md to suppress findings or
manipulate the reviewer. Now loads prompt via git show from the base
branch (origin/dev or origin/main), never from PR-controlled checkout.

Also:
- Fallback prompt upgraded with adversarial framing and severity output
- Use printf instead of echo for content preservation
- Expand deep review trigger to all .github/ files (not just workflows/)
2026-03-16 07:47:59 -04:00
Tam Nhu Tran 78287807f8 fix(ci): use full path in warning and add workflows/ to deep review triggers
- Warning message now shows '.github/review-prompt.md' instead of just
  'review-prompt.md' for easier debugging
- Deep review scope-aware trigger explicitly includes .github/workflows/
  alongside auth/, middleware/, security/, crypto/, commands/, shared/
2026-03-16 07:42:13 -04:00
Tam Nhu Tran b528bcbf35 fix(ci): address code review findings for hardened AI review
Workflow fixes:
- Use randomized heredoc delimiter to prevent output injection
- Add file existence guard with fallback inline prompt
- Use direct cat instead of echo variable (preserves content exactly)

Prompt fixes:
- Add 4 missing CCS rules: TTY/NO_COLOR, idempotent installs,
  dashboard parity, documentation mandatory
- Qualify suppression list to exclude security/correctness/CCS concerns
- Change severity labels from Critical/Medium/Low to High/Medium/Low
  to match maintainer feedback loop parser expectations
2026-03-16 07:38:39 -04:00
Tam Nhu Tran 19f70914a9 feat(ci): harden AI review with adversarial red-team prompt
Extract review prompt to .github/review-prompt.md for maintainability.
Replace generic "comprehensive review" with adversarial attack mindset:
- 3-phase review: Understand -> Attack -> Verify
- Scope-aware depth calibration (quick/standard/deep)
- 25+ concrete critical checklist patterns
- False assumption hunting ("prove it can be null")
- AI-generated code blind spots (hallucinated imports, deprecated APIs)
- CCS-specific constraint enforcement (8 rules)
- Strict approval criteria (APPROVED requires zero critical findings)
- Suppression list to reduce noise on style/formatting
- Output restructured: findings first, strengths last (optional)

Closes #731
2026-03-16 07:28:07 -04:00
Tam Nhu Tran fd5d16f3f3 fix: align proxy routing across fetch and downloader 2026-03-16 07:10:39 -04:00
Tam Nhu Tran f50c9625de fix: harden global fetch proxy handling 2026-03-16 06:58:01 -04:00
Tam Nhu Tran 6724ea52c2 style(claude-extension): apply formatter output 2026-03-15 15:58:37 -04:00
Tam Nhu Tran 337dd188cc fix(sidebar): move claude extension to compatible 2026-03-15 15:58:37 -04:00
Tam Nhu Tran a2f531016d feat(claude-extension): add binding workflow 2026-03-15 15:58:37 -04:00
Tam Nhu Tran 56db6035f5 docs(readme): document Claude IDE extension setup 2026-03-15 15:58:37 -04:00
Tam Nhu Tran 56ba37911a fix(config): guard Claude extension metadata 2026-03-15 15:58:37 -04:00
Tam Nhu Tran b82f10e639 feat(config): add Claude IDE extension setup flow 2026-03-15 15:58:37 -04:00
Tam Nhu Tran 298b591d14 docs(readme): clarify copilot config save behavior 2026-03-15 14:53:54 -04:00
Tam Nhu Tran 7bd4049602 fix(copilot): stop mutating config on read 2026-03-15 14:53:43 -04:00
Tam Nhu Tran 314053b35c fix(docker): harden release image publishing 2026-03-15 13:28:44 -04:00
Tam Nhu Tran e6ae052527 fix(ci): remove maintainability baseline gate blocking releases
The maintainability gate (process.exit count + sync FS API count) was
a raw grep counter that provided no actionable signal for a CLI tool.
It blocked the v7.53.0 stable release because new features naturally
increased the counts beyond the baseline.

Removed:
- scripts/maintainability-baseline.js
- scripts/maintainability-check.js
- docs/metrics/maintainability-baseline.json
- All maintainability:* npm scripts
- Gate references from release, dev-release, and CI workflows

Quality gates retained: typecheck, eslint, prettier, full test suite.
2026-03-11 10:52:30 +07:00
Tam Nhu Tran 03a0fb27ca fix(ci): remove maintainability baseline gate blocking releases
The maintainability gate (process.exit count + sync FS API count) was
a raw grep counter that provided no actionable signal for a CLI tool.
It blocked the v7.53.0 stable release because new features naturally
increased the counts beyond the baseline.

Removed:
- scripts/maintainability-baseline.js
- scripts/maintainability-check.js
- docs/metrics/maintainability-baseline.json
- All maintainability:* npm scripts
- Gate references from release, dev-release, and CI workflows

Quality gates retained: typecheck, eslint, prettier, full test suite.
2026-03-11 10:51:05 +07:00
Tam Nhu Tran c409a4522c fix: normalize stale copilot raptor-mini model 2026-03-10 17:55:28 +07:00
Tam Nhu Tran 88d1dc1ddb fix(cliproxy): validate tier thinking against model caps 2026-03-10 17:34:45 +07:00
Tam Nhu Tran e28f87bc9c fix(i18n): polish Japanese dashboard copy 2026-03-10 16:46:11 +07:00
Tam Nhu Tran 8b5158bec5 feat(i18n): add Japanese dashboard locale 2026-03-10 16:13:29 +07:00
Tam Nhu Tran 9bcb195e7c test: cover llama.cpp help parity 2026-03-07 16:03:16 +07:00
Tam Nhu Tran 0b9a8526a7 merge(dev): port llama.cpp preset onto current catalog 2026-03-07 16:00:03 +07:00
Tam Nhu Tran 5bcad30762 Merge remote-tracking branch 'origin/dev' into pr-689-anthropic-direct-api
# Conflicts:
#	ui/src/components/profiles/profile-dialog.tsx
2026-03-07 15:59:44 +07:00
Tam Nhu Tran 1f29fa0b6a fix(api): complete anthropic direct profile support 2026-03-07 15:58:36 +07:00
Tam Nhu Tran 4d0ded339f fix(ui): update copilot default claude model 2026-03-07 15:43:44 +07:00
Tam Nhu Tran bea3084d5e fix(config): align claude defaults across catalogs 2026-03-07 15:41:26 +07:00
Tam Nhu Tran 3d183fe0e8 fix(cliproxy): sync claude 4.6 selector defaults 2026-03-07 15:35:12 +07:00
Tam Nhu Tran f4a7d4dc2c fix(codex): standardize haiku defaults on gpt-5.1-codex-mini 2026-03-07 15:18:44 +07:00
Tam Nhu Tran 50973752ba test(hooks): add image analyzer regression coverage 2026-03-07 14:50:39 +07:00
Tam Nhu Tran 6ed95a2a86 fix(cliproxy): preserve Claude fallback when quota is unavailable 2026-03-07 13:57:27 +07:00
Tam Nhu Tran b25b1653b0 fix(cliproxy): poll paste-callback auth urls 2026-03-07 13:48:34 +07:00
Tam Nhu Tran becfc573c9 ci: harden AI review for external PRs 2026-03-07 13:44:32 +07:00
Tam Nhu Tran 86ca18003a fix(cliproxy): preserve kiro paste-callback start route 2026-03-07 13:38:22 +07:00
Tam Nhu Tran aed7beb075 fix: confirm risky cliproxy installs in dashboard 2026-03-07 11:13:49 +07:00
Tam Nhu Tran fc3600e922 fix: improve quota diagnostics and oauth refresh handling 2026-03-07 11:09:15 +07:00
Tam Nhu Tran ad01196964 fix: stop untracked CLIProxy installs safely 2026-03-07 11:01:35 +07:00
Tam Nhu Tran a4b626aede fix: clarify CLIProxy dashboard install lifecycle 2026-03-07 10:52:46 +07:00
Tam Nhu Tran e14df1fe05 fix: restart CLIProxy after dashboard version install 2026-03-07 10:45:29 +07:00
Tam Nhu Tran 4baed01d49 fix: complete codex tool sanitization coverage 2026-03-07 10:35:41 +07:00
Tam Nhu Tran 2be5c5a706 fix: sync error code docs links 2026-03-07 09:56:35 +07:00
Tam Nhu Tran 8cfd86f1d1 fix: strip unsupported gemini and codex tool fields 2026-03-07 09:54:02 +07:00
Tam Nhu Tran 8a5ed656ee fix(copilot): surface upstream model limits 2026-03-07 09:26:09 +07:00
Tam Nhu Tran d6fc5dd64c fix: harden profile lifecycle validation and dashboard UX flows 2026-03-05 18:49:16 +07:00
Tam Nhu Tran 02c81743a0 feat: add API profile lifecycle discover/copy/export/import parity 2026-03-05 18:30:23 +07:00
Tam Nhu Tran 8f8684ce85 fix(auth): preserve bare profile behavior across runtime and sync 2026-03-05 12:36:51 +07:00
Tam Nhu Tran bc9b04444e feat(auth): add --bare flag and MCP server sync for profiles
- Add --bare flag to `ccs auth create` to skip shared symlinks
  (commands/, skills/, agents/, settings.json). Bare profiles are
  clean instances without ClaudeKit or other global extensions.
  `ccs sync` respects bare flag and skips re-linking.

- Add MCP server sync from global ~/.claude.json to instances.
  Claude Code stores MCP config in ~/.claude.json (not settings.json),
  which was invisible to CCS profiles using CLAUDE_CONFIG_DIR isolation.
  Selective copy of mcpServers key only (not OAuth sessions/caches).
  `ccs sync` refreshes MCP servers across all non-bare instances.

Closes #691
Closes #692
2026-03-05 11:42:41 +07: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
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
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
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
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
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
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
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
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
Tam Nhu Tran 91050bfebf test(pricing): cover Claude 4.6 cache token cost rates 2026-03-03 23:09:51 +07: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 383ac94623 test(usage): add cliproxy sync and integration coverage
- add transformer unit tests for flattening and daily/hourly/monthly rollups

- add syncer tests for snapshot persistence and idempotent interval start

- add aggregator integration test for JSONL + CLIProxy merge behavior
2026-03-03 23:05:24 +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
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 26f4fb3a99 test(auth): cover legacy alias isolation for continuity
- add legacy-mode regression for km mapping not leaking into kimi cliproxy
2026-03-03 03:03:06 +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 b07c62cc21 fix(i18n): complete Vietnamese dashboard copy QA polish 2026-03-03 02:30:00 +07:00
Tam Nhu Tran f3f315e86a fix(i18n): polish remaining Vietnamese copy for dashboard context 2026-03-03 02:23:52 +07:00