Commit Graph
1792 Commits
Author SHA1 Message Date
github-actions[bot] c4ec326530 chore(release): 7.28.2-dev.1 [skip ci] 2026-01-28 01:29:08 +00:00
Kai (Tam Nhu) TranandGitHub c3130ea314 Merge pull request #381 from kaitranntt/feat/claude-oauth
feat(cliproxy): add Claude (Anthropic) OAuth provider support
2026-01-27 20:28:07 -05:00
kaitranntt 2091a90b77 fix(cliproxy): address PR review feedback
- Remove claude from PLUS_ONLY_PROVIDERS (Claude works with normal CLIProxy too)
- Fix color inconsistency: use #D97757 to match SVG brand color
- Add iflow to checkAuthCodePorts (pre-existing issue, fixed opportunistically)
2026-01-27 20:24:01 -05:00
kaitranntt b385ab131d refactor(cliproxy): reorder providers - Antigravity first, then Claude 2026-01-27 20:17:10 -05:00
kaitranntt d2129957d7 fix(cliproxy): add Claude to all provider lists for sidebar display
Claude was missing from:
- getAllAuthStatus() providers array in token-manager.ts
- PROVIDER_ASSETS, PROVIDER_COLORS, PROVIDER_NAMES in provider-config.ts
- PROVIDERS array in setup wizard constants.ts
- PLUS_ONLY_PROVIDERS in proxy settings
2026-01-27 20:14:22 -05:00
kaitranntt 28d8bd84a5 feat(cliproxy): add Claude (Anthropic) OAuth provider support
Add Claude as a first-class OAuth provider in CCS CLI and dashboard.
Backend support already exists in CLIProxyAPIPlus (port 54545).

Changes:
- Add 'claude' to CLIProxyProvider type and profile detector
- Add Claude OAuth config (port 54545, --anthropic-login flag)
- Add Claude to oauth-port-diagnostics flow types
- Add Claude token discovery prefixes (claude-, anthropic-)
- Add Claude model catalog (Opus 4.5, Sonnet 4.5/4, Haiku 4.5)
- Add Claude logo and provider display name
- Update variant config types and adapters

Closes #380
2026-01-27 15:43:21 -05:00
github-actions[bot] 687f2e6541 chore(sync): merge main into dev after release [skip ci]
# Conflicts:
#	package.json
2026-01-27 20:13:19 +00:00
semantic-release-bot 441dd0b513 chore(release): 7.28.2 [skip ci]
## [7.28.2](https://github.com/kaitranntt/ccs/compare/v7.28.1...v7.28.2) (2026-01-27)

### Bug Fixes

* **websearch:** add shell option for Windows spawnSync compatibility ([3c534f4](https://github.com/kaitranntt/ccs/commit/3c534f48cb60448875c02bc0a8444277ca7c89eb)), closes [#378](https://github.com/kaitranntt/ccs/issues/378)
2026-01-27 20:12:47 +00:00
Kai (Tam Nhu) TranandGitHub 415b8cc8cb Merge pull request #379 from ruan-cat/fix/websearch-windows-spawnSync
fix(websearch): add shell option for Windows spawnSync compatibility
2026-01-27 15:11:42 -05:00
ruan-catandCursor 3c534f48cb fix(websearch): add shell option for Windows spawnSync compatibility
On Windows, globally installed CLI tools via npm/pnpm are .cmd/.bat
batch files, not real .exe executables. Node.js spawnSync() without
the shell option cannot execute these files and returns ENOENT error.

Changes:
- Extract isWindows as a global constant at file top
- Add shell: isWindows to all CLI execution spawnSync calls
- Remove duplicate isWindows declaration in isCliAvailable()

Fixes #378

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-01-28 02:45:22 +08:00
github-actions[bot] 5e398ff2f9 chore(release): 7.28.1-dev.1 [skip ci] 2026-01-26 21:27:29 +00:00
Kai (Tam Nhu) TranandGitHub d6e187a04d Merge pull request #375 from shunkakinoki/feat/skip-oauth-for-remote-proxy
feat: skip local OAuth when using remote proxy with auth token
2026-01-26 16:26:26 -05:00
kaitranntt 838cd1d460 fix(test): use correct provider name 'ghcp' instead of 'copilot' 2026-01-26 16:19:56 -05:00
kaitrannttandShun Kakinoki 21e819b590 fix(cliproxy): improve skip-local-auth edge case handling
- Validate authToken with trim() to reject whitespace-only values
- Show broken model warning for both remote and local modes
- Add context-aware messaging for remote proxy users
- Add comprehensive test coverage for authToken edge cases:
  - Whitespace-only strings
  - Null values
  - Tabs/newlines
  - Tokens with leading/trailing whitespace

Co-authored-by: Shun Kakinoki <shunkakinoki@gmail.com>
2026-01-26 16:16:23 -05:00
semantic-release-bot 7fbe6b2b54 chore(release): 7.28.1 [skip ci]
## [7.28.1](https://github.com/kaitranntt/ccs/compare/v7.28.0...v7.28.1) (2026-01-26)

### Bug Fixes

* **cliproxy:** pin version to 6.7.25, add disable-cooling ([fb77d72](https://github.com/kaitranntt/ccs/commit/fb77d72a3080d0fa096247c71a9cc1336445aa38))
* **websearch:** stop polluting global ~/.claude/settings.json with hooks ([0216341](https://github.com/kaitranntt/ccs/commit/0216341b2c45e0b0387947f30213d277e1893584))
2026-01-26 20:02:10 +00:00
Kai (Tam Nhu) TranandGitHub 3b3614b822 Merge pull request #377 from kaitranntt/dev
fix(websearch): stop polluting global settings with hooks
2026-01-26 15:01:02 -05:00
github-actions[bot] 3ae959122c chore(release): 7.28.0-dev.2 [skip ci] 2026-01-26 19:53:30 +00:00
kaitranntt 0216341b2c fix(websearch): stop polluting global ~/.claude/settings.json with hooks
Remove global hook registration from installWebSearchHook() - now only
copies hook file to ~/.ccs/hooks/. Hook registration handled by
ensureProfileHooks() which writes to per-profile settings.

Changes:
- hook-installer.ts: Remove ensureHookConfig() call
- ccs.ts: Remove redundant installWebSearchHook() call
- hook-config.ts: Add getClaudeSettingsPath() for test isolation
2026-01-26 14:51:51 -05:00
github-actions[bot] 60e7441246 chore(release): 7.28.0-dev.1 [skip ci] 2026-01-26 19:16:24 +00:00
Kai (Tam Nhu) TranandGitHub 6d619bc66f Merge pull request #376 from kaitranntt/kai/fix/cliproxy-pin-6725
fix(cliproxy): pin version to 6.7.25, add disable-cooling
2026-01-26 14:15:23 -05:00
kaitranntt fb77d72a30 fix(cliproxy): pin version to 6.7.25, add disable-cooling
- Update fallbackVersion: 6.7.8 → 6.7.25 (original)
- Update fallbackVersion: 6.7.8-0 → 6.7.25-0 (plus)
- Add disable-cooling: true to generated config
- Bump CLIPROXY_CONFIG_VERSION to 5 for regeneration
2026-01-26 14:12:14 -05:00
Shun Kakinoki 1f5d11930e feat: skip local OAuth when using remote proxy with auth token
When --proxy-host and --proxy-auth-token are provided, the remote proxy
handles authentication via its own OAuth sessions. This change skips:

- Local OAuth check/trigger
- Preflight quota check (managed by remote server)
- Model configuration prompts (configured on remote server)
- Broken model warnings (model selection is remote)

This enables headless CI/CD usage without requiring pre-cached
CCS_SESSIONS when a remote proxy with auth token is available.
2026-01-26 16:25:24 +09:00
semantic-release-bot 808be31024 chore(release): 7.28.0 [skip ci]
## [7.28.0](https://github.com/kaitranntt/ccs/compare/v7.27.0...v7.28.0) (2026-01-26)

### Features

* **cli:** implement --uninstall handler ([c44a5c2](https://github.com/kaitranntt/ccs/commit/c44a5c221f2046b84e6a556f0ffed706964dac6f))
* **cli:** inject hooks into profile settings on launch ([0099ab5](https://github.com/kaitranntt/ccs/commit/0099ab5a1c6d3201850b44bc51b06ceb8847f1d2))
* **npm:** add postuninstall script ([4f28de9](https://github.com/kaitranntt/ccs/commit/4f28de9c90cbd8b6bacbd6cf73b3f664db64eee3))
* **websearch:** add per-profile hook injection module ([242ab76](https://github.com/kaitranntt/ccs/commit/242ab7645384516db0c05c7139ae652733acf271))
* **websearch:** add removeHookConfig function ([9159aa5](https://github.com/kaitranntt/ccs/commit/9159aa52cbe99c0820c30a19843043ea141c1106)), closes [#317](https://github.com/kaitranntt/ccs/issues/317)
* **websearch:** call removeHookConfig on uninstall ([fc4d987](https://github.com/kaitranntt/ccs/commit/fc4d987d205bb2bd86d2cf2698858f052a740cce))
* **websearch:** inject hooks on profile creation ([fca8dbd](https://github.com/kaitranntt/ccs/commit/fca8dbd6cfdcb8a229051b840733b0769e61368a))

### Bug Fixes

* address PR [#373](https://github.com/kaitranntt/ccs/issues/373) review feedback ([e98a92f](https://github.com/kaitranntt/ccs/commit/e98a92fded2eeb32cd74ee25279b59e51237c67a))
* address PR review feedback ([cd7a112](https://github.com/kaitranntt/ccs/commit/cd7a1121d4f0072a4b15dc11b4864ec3aad26758))
* **config:** persist setup_completed flag to YAML file ([a8c46cc](https://github.com/kaitranntt/ccs/commit/a8c46cc8ed6743f3cfb07bbe621b644c9b2d6830))
* **isolation:** add getCcsDir/getCcsHome to more files ([6a2c829](https://github.com/kaitranntt/ccs/commit/6a2c82917dea1fb7c5c7a9e4e134ac3227e0edaa))
* **isolation:** use getCcsDir() for test isolation ([9b61f53](https://github.com/kaitranntt/ccs/commit/9b61f5318eedfd1f1a25ec5f3f3a39619174567b))
* **setup:** persist setup_completed flag to prevent repeated first-time notice ([85e41a5](https://github.com/kaitranntt/ccs/commit/85e41a56e94e17ab7aeb729f50404eb6c0708df9))
* **websearch:** use getCcsDir() for test isolation ([b33674b](https://github.com/kaitranntt/ccs/commit/b33674b3b225dd8d07fa48f916c3400cd0685dec))

### Code Refactoring

* **uninstall:** stop modifying global settings.json ([ba1fb7e](https://github.com/kaitranntt/ccs/commit/ba1fb7eeb3855db50eff5cfb5999d77ffd66f17f))
* **websearch:** address PR review recommendations ([21b18d0](https://github.com/kaitranntt/ccs/commit/21b18d0c4e7dbdf9e7070458ec5c5fb54ac6a410))

### Tests

* **setup:** add unit tests for setup_completed flag detection ([596a9c6](https://github.com/kaitranntt/ccs/commit/596a9c68439a2c668a7c6243594a5fd2e57e8b04))
* **uninstall:** add hook cleanup tests ([6838ac0](https://github.com/kaitranntt/ccs/commit/6838ac0fa1ae0578cf84a451ed628cd8ded31562))
* **uninstall:** update tests for per-profile hook behavior ([ce59eb6](https://github.com/kaitranntt/ccs/commit/ce59eb6269ad65efb27e373b592596355f9dc313))
2026-01-26 03:09:52 +00:00
Kai (Tam Nhu) TranandGitHub 1245cc441a Merge pull request #373 from kaitranntt/dev
feat: per-profile hook injection + uninstall cleanup + setup_completed persistence
2026-01-25 22:08:47 -05:00
github-actions[bot] 3e6d4b0f63 chore(release): 7.27.0-dev.3 [skip ci] 2026-01-26 03:03:38 +00:00
kaitranntt e98a92fded fix: address PR #373 review feedback
- postuninstall.js: add file logging for debugging on error
- profile-hook-injector.ts: use 'wx' flag for atomic marker creation
- profile-hook-injector.ts: include parse error message in debug log
- install-command.ts: use actual counts for consistent semantics
- Windows tests: align Section 7 with per-profile hook architecture
2026-01-25 22:02:25 -05:00
github-actions[bot] e0891fe915 chore(release): 7.27.0-dev.2 [skip ci] 2026-01-26 02:54:03 +00:00
Kai (Tam Nhu) TranandGitHub 2f66f74ff9 Merge pull request #371 from kaitranntt/kai/fix/uninstall-hooks-cleanup
fix: uninstall hooks cleanup + test isolation
2026-01-25 21:53:00 -05:00
kaitranntt cd7a1121d4 fix: address PR review feedback
- ClaudeSymlinkManager.uninstall() now returns count for accurate reporting
- install-command.ts uses return value instead of always incrementing
- claude-dir-installer.ts uses getCcsHome() directly instead of string manipulation
- Add TODO comments to tests explaining --install is a no-op
2026-01-25 21:50:25 -05:00
kaitranntt 6a2c82917d fix(isolation): add getCcsDir/getCcsHome to more files
Fix test isolation in symlink managers and checkers to prevent tests
from touching user's real ~/.ccs/ and ~/.claude/ directories.

Files fixed:
- src/api/services/profile-writer.ts - use getCcsDir()
- src/management/checks/symlink-check.ts - use functions instead of
  module-level constants
- src/utils/claude-dir-installer.ts - use getCcsDir() for CCS paths
- src/utils/claude-symlink-manager.ts - use getCcsHome()/getCcsDir()
2026-01-25 21:42:17 -05:00
github-actions[bot] f51d1a801a chore(release): 7.27.0-dev.1 [skip ci] 2026-01-26 02:39:50 +00:00
Kai (Tam Nhu) TranandGitHub c43df3776c Merge pull request #372 from kaitranntt/kai/fix/first-time-install-detection
fix(setup): persist setup_completed flag to prevent repeated first-time notice
2026-01-25 21:38:50 -05:00
kaitranntt 9b61f5318e fix(isolation): use getCcsDir() for test isolation
Replace os.homedir() with getCcsDir() in 11 source files to ensure
tests don't touch the user's real ~/.ccs/ directory. The getCcsDir()
function from config-manager.ts respects CCS_HOME env var for
test isolation.

Files fixed:
- src/auth/profile-detector.ts
- src/auth/profile-registry.ts
- src/delegation/headless-executor.ts
- src/delegation/session-manager.ts
- src/glmt/glmt-transformer.ts
- src/management/checks/config-check.ts
- src/management/checks/profile-check.ts
- src/management/checks/system-check.ts
- src/management/instance-manager.ts
- src/management/shared-manager.ts
- src/utils/update-checker.ts
2026-01-25 21:38:27 -05:00
kaitranntt a8c46cc8ed fix(config): persist setup_completed flag to YAML file
Critical fix: setup_completed was set in memory but never written to disk.

- Add setup_completed to generateYamlWithComments() for YAML serialization
- Add setup_completed to mergeWithDefaults() to preserve during config merge

Without these changes, the flag was lost on save/reload, causing first-time
notice to reappear.

Addresses critical code review feedback on PR #372.
2026-01-25 21:33:29 -05:00
kaitranntt fca8dbd6cf feat(websearch): inject hooks on profile creation
Add hook injection at profile creation time (not just runtime):
- profile-writer.ts: inject on API profile create/update
- variant-settings.ts: inject on CLIProxy variant create

Hooks now present immediately after profile creation.
2026-01-25 21:31:20 -05:00
kaitranntt 596a9c6843 test(setup): add unit tests for setup_completed flag detection
- Add 3 test cases for setup_completed flag:
  - Detect flag when present and true
  - Treat missing flag as first-time eligible
  - Treat false flag as first-time eligible
- Update JSDoc to document detection priority order

Addresses code review feedback on PR #372.
2026-01-25 21:26:23 -05:00
kaitranntt 85e41a56e9 fix(setup): persist setup_completed flag to prevent repeated first-time notice
After running ccs setup with local proxy mode, the CLI was still showing
the first-time install notice because isFirstTimeInstall() only checked
for user-created content (profiles, accounts, variants, etc.). When user
chose "Local" mode and skipped API profiles, config had empty objects,
causing all checks to return false.

Added setup_completed flag to UnifiedConfig interface and set it to true
when setup wizard completes. isFirstTimeInstall() now checks this flag
first.
2026-01-25 21:21:02 -05:00
kaitranntt 21b18d0c4e refactor(websearch): address PR review recommendations
- Add comment in postuninstall.js explaining intentional os.homedir()
- Fix comment in install-command.ts (doesn't touch global settings.json)
- Consolidate duplicate getCcsHooksDir() - export from hook-config.ts
- Add debug logging to silent catch blocks in profile-hook-injector.ts
2026-01-25 21:13:55 -05:00
kaitranntt b33674b3b2 fix(websearch): use getCcsDir() for test isolation
Ensure all hook-related modules use getCcsDir() from environment.ts
for consistent test isolation. Prevents tests from touching the user's
real ~/.ccs/ directory during test runs.

Changes:
- hook-config.ts: Use getCcsDir() for hookConfigPath
- hook-installer.ts: Use getCcsDir() for HOOK_SOURCE_PATH
- profile-hook-injector.ts: Use getCcsDir() for hook sources
- CLAUDE.md: Add test isolation rules
2026-01-25 21:03:01 -05:00
kaitranntt ce59eb6269 test(uninstall): update tests for per-profile hook behavior
- verify uninstall does NOT touch global settings.json

- verify migration marker is cleaned up

- verify user hooks in global settings preserved
2026-01-25 20:26:40 -05:00
kaitranntt ba1fb7eeb3 refactor(uninstall): stop modifying global settings.json
- remove removeHookConfig() call from uninstallWebSearchHook()

- add removeMigrationMarker() cleanup

- update postuninstall.js to only clean CCS files

- global ~/.claude/settings.json is never touched
2026-01-25 20:26:27 -05:00
kaitranntt 0099ab5a1c feat(cli): inject hooks into profile settings on launch
- call ensureProfileHooks() before CLIProxy execution

- call ensureProfileHooks() before Copilot execution

- call ensureProfileHooks() before Settings-based execution

- account-based profiles skip (use native WebSearch)
2026-01-25 20:25:01 -05:00
kaitranntt 242ab76453 feat(websearch): add per-profile hook injection module
- ensureProfileHooks() injects hooks into profile settings

- migrateGlobalHook() one-time migration from global settings

- removeMigrationMarker() cleanup for uninstall

- export from barrel files for module access
2026-01-25 20:24:47 -05:00
kaitranntt 6838ac0fa1 test(uninstall): add hook cleanup tests
- add Section 7: SETTINGS.JSON HOOK CLEANUP tests

- test CCS hook removal from settings.json

- test user-defined hooks preserved

- test mixed CCS and user hooks handling

- test missing settings.json handling

- update special-commands.test.js expectations
2026-01-25 20:05:58 -05:00
kaitranntt 4f28de9c90 feat(npm): add postuninstall script
- add scripts/postuninstall.js for npm uninstall cleanup

- register in package.json scripts.postuninstall

- runs ccs --uninstall on npm uninstall -g
2026-01-25 20:05:43 -05:00
kaitranntt c44a5c221f feat(cli): implement --uninstall handler
- add handleUninstallCommand() with proper cleanup flow

- remove WebSearch hook (file + settings.json)

- remove symlinks from ~/.claude/

- display summary with removal count

- preserve ~/.ccs/ directory
2026-01-25 20:05:31 -05:00
kaitranntt fc4d987d20 feat(websearch): call removeHookConfig on uninstall
- uninstallWebSearchHook() now calls removeHookConfig()

- ensures settings.json cleanup when hook file is removed
2026-01-25 20:04:04 -05:00
kaitranntt 9159aa52cb feat(websearch): add removeHookConfig function
- add removeHookConfig() to remove CCS hook from settings.json

- only removes hooks matching CCS pattern (.ccs/hooks/websearch-transformer)

- preserves user-defined WebSearch hooks

- cleans up empty hooks object after removal

- export from barrel file

Closes #317
2026-01-25 20:03:52 -05:00
semantic-release-bot 588b757d21 chore(release): 7.27.0 [skip ci]
## [7.27.0](https://github.com/kaitranntt/ccs/compare/v7.26.3...v7.27.0) (2026-01-25)

### Features

* **ui:** add bulk account controls to provider editor ([1427d36](https://github.com/kaitranntt/ccs/commit/1427d36f869f8b0eb64d2c5d6893810515d2d4d4))
* **ui:** add expandable provider cards with account controls ([87226e0](https://github.com/kaitranntt/ccs/commit/87226e05c40be83299187b35ba1ca4ca2113fbe3))
* **ui:** add tiered visual grouping to quota tooltip ([ebfc554](https://github.com/kaitranntt/ccs/commit/ebfc554f5f8733b811c1ba8610a1bf11d0154510))
* **ui:** add visible pause toggle button to account item cards ([56dfb24](https://github.com/kaitranntt/ccs/commit/56dfb2429bc93772e260aa6ecaed50ebf714be06))
* **ui:** persist provider selection in cliproxy and auth-monitor ([7fc9ff0](https://github.com/kaitranntt/ccs/commit/7fc9ff0d77ddf89c13e8ec168b700bee38cabc12))

### Bug Fixes

* **api:** add race condition prevention and input validation for account control ([d1b579a](https://github.com/kaitranntt/ccs/commit/d1b579ad1b8c58da352f1a2c803256a427e3f669))
* **hooks:** add stats invalidation to account control mutations ([7086617](https://github.com/kaitranntt/ccs/commit/708661744fa8463ae919cb597bd9c43cca21c336))
* **quota:** fetch quota for paused accounts + simplify exhausted display ([27e8813](https://github.com/kaitranntt/ccs/commit/27e8813cae5379dbd8f9e700155812e59fe99389))
* **quota:** return exhausted models with resetTime from API ([e3920e0](https://github.com/kaitranntt/ccs/commit/e3920e077610b3d31b7e533a629c6b09e8b6d427))
* **ui:** add pause toggle to flow viz account cards, remove dropdown redundancy ([56dfada](https://github.com/kaitranntt/ccs/commit/56dfada31c36425a11d4eff397c925980a43b94c))
* **ui:** display exhausted Claude/GPT models in quota tooltip ([ce16517](https://github.com/kaitranntt/ccs/commit/ce1651714473b0d7484efbbb45ecb503d7490a3b))
* **ui:** improve bulk actions UX in provider editor ([6021c10](https://github.com/kaitranntt/ccs/commit/6021c10ddce84536f01dd8e9bb8a59f279dfc3cc))
* **ui:** improve model quota tooltip tier sorting ([de71381](https://github.com/kaitranntt/ccs/commit/de7138166ca2dca765c05ab59e9d9b1b154277bb))
* **ui:** improve pause toggle position in flow-viz account cards ([eb05342](https://github.com/kaitranntt/ccs/commit/eb053425c074ab150f67181ba7cf62668e0e7b49))
* **ui:** improve tier header contrast in quota tooltip ([41d17e7](https://github.com/kaitranntt/ccs/commit/41d17e7cae7949dbb169963b3a0e71516afa91b3))
* **ui:** remove dead 'Account is paused' error handling from flow-viz ([a84cc03](https://github.com/kaitranntt/ccs/commit/a84cc036df8179442498531fa0b4383f0b96d904))
* **ui:** show 0% quota when Claude/GPT models exhausted ([1f323f0](https://github.com/kaitranntt/ccs/commit/1f323f082c92bd8e740fa519b196f2ed957a0b68))
* **ui:** show Claude reset time for quota display (not earliest) ([9516e71](https://github.com/kaitranntt/ccs/commit/9516e71f17c112eb71d7e0283e5c9d8c654fa2f9))
* **ui:** simplify quota tooltip - delimiter lines only, full model names ([b2b8a85](https://github.com/kaitranntt/ccs/commit/b2b8a85af6c860c2e76d1f0198c2d8bc25f2ff2e))

### Code Refactoring

* **ui:** update cliproxy page for account control flow ([118ce46](https://github.com/kaitranntt/ccs/commit/118ce46e7287aa929f489e218ef30609fb1348c8))
2026-01-25 22:42:10 +00:00
Kai (Tam Nhu) TranandGitHub 2fb85b9a3a Merge pull request #370 from kaitranntt/dev
feat(ui): account control UX improvements and quota display enhancements
2026-01-25 17:41:05 -05:00