Commit Graph
1152 Commits
Author SHA1 Message Date
github-actions[bot] e8716db0a1 chore(release): 7.14.0-dev.2 [skip ci] 2026-01-06 19:20:53 +00:00
Kai (Tam Nhu) TranandGitHub 206644eac0 Merge pull request #284 from kaitranntt/fix/kiro-nickname-accountid
fix(cliproxy): use nickname as accountId for kiro/ghcp providers
2026-01-06 11:19:53 -08:00
kaitranntt 107e2813f9 fix(cliproxy): prevent race in promptNickname close handler 2026-01-06 13:52:14 -05:00
kaitranntt 5970e70e26 fix(cliproxy): harden nickname validation and race condition handling
- Trim nickname in API route for consistency with CLI
- Block URL-unsafe chars (%, /, &, ?, #) in nickname
- Block reserved patterns (kiro-N, ghcp-N) used by auto-discovery
- Add reload-merge pattern in discovery to reduce race condition
2026-01-06 13:00:50 -05:00
github-actions[bot] dde0b9fb6f chore(release): 7.14.0-dev.1 [skip ci] 2026-01-06 17:51:26 +00:00
Kai (Tam Nhu) TranandGitHub 55260809a1 Merge pull request #286 from kaitranntt/fix/cliproxy-touch-account-on-normal-usage
fix(cliproxy): update lastUsedAt on normal execution
2026-01-06 09:50:29 -08:00
kaitranntt b55cd795ab fix(cliproxy): update lastUsedAt on normal execution
Previously touchAccount was only called when switching accounts or auto-
switching due to quota exhaustion. Now lastUsedAt is updated for every
OAuth provider execution, ensuring dashboard shows accurate timestamps.
2026-01-06 12:17:40 -05:00
kaitranntt d96c67ba81 fix(cliproxy): use nickname as accountId for kiro/ghcp providers
Kiro/GHCP OAuth tokens have empty email field, causing all accounts to
use accountId='default' and overwrite each other. This fix:

- Add PROVIDERS_WITHOUT_EMAIL constant for kiro/ghcp identification
- Require nickname for kiro/ghcp during registration (CLI + web UI)
- Use nickname as accountId instead of email for these providers
- Enforce nickname uniqueness to prevent collisions
- Update discoverExistingAccounts() to generate unique IDs (kiro-1, etc.)

Closes #258, #267
2026-01-06 12:16:22 -05:00
semantic-release-bot 497fc2a9c0 chore(release): 7.14.0 [skip ci]
## [7.14.0](https://github.com/kaitranntt/ccs/compare/v7.13.1...v7.14.0) (2026-01-06)

### Features

* **agy:** add preflight quota check with auto-switch ([c85ff74](https://github.com/kaitranntt/ccs/commit/c85ff74f3cdd9b346d1d4d929c29104ab16c658f))
* **agy:** promote gemini-claude-sonnet-4-5 as default Haiku model ([c9cdfd9](https://github.com/kaitranntt/ccs/commit/c9cdfd98792cc6d272aa22e2317a3a3bb32105de)), closes [#270](https://github.com/kaitranntt/ccs/issues/270)
* **cliproxy:** add background token refresh worker ([f98bb24](https://github.com/kaitranntt/ccs/commit/f98bb24a98618df132857b414e30997eb3cf0b90))
* **cliproxy:** add dashboard UI parity for version stability ([c5621da](https://github.com/kaitranntt/ccs/commit/c5621dab515ea290e2740cc1fce79e9d65081579)), closes [#269](https://github.com/kaitranntt/ccs/issues/269)
* **cliproxy:** add doctor subcommand for quota diagnostics ([944f5c0](https://github.com/kaitranntt/ccs/commit/944f5c0fb07bcf293a164b81886595aeb8217703)), closes [#252](https://github.com/kaitranntt/ccs/issues/252)
* **cliproxy:** add version management UI with install/restart controls ([a69b2e9](https://github.com/kaitranntt/ccs/commit/a69b2e9d109130abf8a2a99d76bf4560d64c831c))
* **dev:** add symlink setup for testing dev version ([981cef8](https://github.com/kaitranntt/ccs/commit/981cef82119359384e7385aff1791b0afa4f4fc1))
* **quota:** add fetchAllProviderQuotas and findAvailableAccount ([24847f5](https://github.com/kaitranntt/ccs/commit/24847f5804ca258b597b7f367750315b9abfa9f8)), closes [#252](https://github.com/kaitranntt/ccs/issues/252)
* **ui:** add stability warning to ProxyStatusWidget ([8a56a43](https://github.com/kaitranntt/ccs/commit/8a56a43989eb26b22ba28aa091a2bcef97701a20))

### Bug Fixes

* **agy:** edge case handling for quota failover ([5b58bd3](https://github.com/kaitranntt/ccs/commit/5b58bd35c9e2dfd7163bc8eff7804506b49b4872))
* **cliproxy:** add edge case handling for version capping ([212aef8](https://github.com/kaitranntt/ccs/commit/212aef81bc68a2d0d146d410d18f7778b8c2c100))
* **cliproxy:** add missing OAuth callback ports for codex, agy, iflow ([cfe604a](https://github.com/kaitranntt/ccs/commit/cfe604a97c5ef79fbfb1f020579e0b5541d49b27))
* **cliproxy:** cap auto-update to v80 due to v81+ context bugs ([869ab3e](https://github.com/kaitranntt/ccs/commit/869ab3eecd97de2a84c18c5ad25fe2abf0bdb088)), closes [#269](https://github.com/kaitranntt/ccs/issues/269)
* **oauth:** add stdin keepalive to prevent blocking on manual URL prompt ([0557f93](https://github.com/kaitranntt/ccs/commit/0557f93f2fdb17972324f05c9e216785f893ad16))
* **oauth:** harden cleanup for edge cases in auth process ([472497f](https://github.com/kaitranntt/ccs/commit/472497fb0324a92993b2a7e7fd27c8f071a9e7c6))
* **shared-manager:** normalize plugin registry paths to canonical ~/.claude/ ([1067afb](https://github.com/kaitranntt/ccs/commit/1067afbea713625713e72c1738ef06a21bd04d62)), closes [#276](https://github.com/kaitranntt/ccs/issues/276)
* **ui:** add missing isStable and maxStableVersion to type ([4fd4d6c](https://github.com/kaitranntt/ccs/commit/4fd4d6c264b5dbcb9f3e181b46a82090764f46c6))
* **ui:** clean up ProxyStatusWidget layout spacing ([4f69abb](https://github.com/kaitranntt/ccs/commit/4f69abbe88fb0bd6782373b5eeebd665dfcafd4b))
* **ui:** update/downgrade button now installs correct version ([48d4a96](https://github.com/kaitranntt/ccs/commit/48d4a96a62fecde105f58bd68ca130571ef0daa4))
* **websearch:** use 'where' command on Windows for CLI detection ([e03d9b7](https://github.com/kaitranntt/ccs/commit/e03d9b77437575a39af0dca14c2a6b5967ae4f09)), closes [#273](https://github.com/kaitranntt/ccs/issues/273)

### Documentation

* **agy:** add quota management and failover documentation ([8ea1e33](https://github.com/kaitranntt/ccs/commit/8ea1e333bc2b365b7f058201f714e41e822b815f))

### Code Refactoring

* **ui:** redesign ProxyStatusWidget with two-state UX ([8072b93](https://github.com/kaitranntt/ccs/commit/8072b93b3b2d4bc721fece815c8edf45da67b34b))
2026-01-06 16:40:28 +00:00
Kai (Tam Nhu) TranandGitHub e788df971a Merge pull request #283 from kaitranntt/dev
feat(release): v7.14.0 - OAuth fixes, quota failover, background token refresh
2026-01-06 08:39:29 -08:00
github-actions[bot] b44ccc97ea chore(release): 7.13.1-dev.8 [skip ci] 2026-01-06 16:33:53 +00:00
Kai (Tam Nhu) TranandGitHub 3639f4e7ab Merge pull request #281 from kaitranntt/fix/codex-auth-port-map
fix(cliproxy): add missing OAuth callback ports for codex, agy, iflow
2026-01-06 08:32:56 -08:00
kaitranntt 472497fb03 fix(oauth): harden cleanup for edge cases in auth process
- Clear stdinKeepalive interval on SIGINT/SIGTERM signal handlers
- Add cancelProjectSelection() to timeout/exit/error handlers
- Close server on error path in testLocalhostBinding to prevent fd leak
- Add TTL-based cleanup for stale auth sessions (10 min expiry)
- Use DEVICE_CODE_TIMEOUT_MS constant instead of hardcoded value (DRY)
2026-01-06 11:31:40 -05:00
kaitranntt 0557f93f2f fix(oauth): add stdin keepalive to prevent blocking on manual URL prompt
CLIProxyAPIPlus has a 15-second timer that prompts for manual URL paste.
If user completes browser auth after this timer fires but before the
non-blocking check, the prompt blocks forever on stdin since CCS pipes
stdin but doesn't write to it.

Workaround: Send newline every 16s for authorization code flows to skip
the manual prompt and continue polling for callback.
2026-01-06 10:49:51 -05:00
kaitranntt cfe604a97c fix(cliproxy): add missing OAuth callback ports for codex, agy, iflow
Port cleanup before OAuth was skipped for providers whose ports were
only in comments. This caused hanging when stale processes blocked
the callback port from previous auth attempts.

Changes:
- auth-types.ts: Add codex (1455), agy (51121), iflow (11451) to map
- oauth-port-diagnostics.ts: Update iflow from device_code to auth_code flow
- Add Claude (54545) to doc comments for future reference
2026-01-06 10:32:08 -05:00
github-actions[bot] bc5bce4256 chore(release): 7.13.1-dev.7 [skip ci] 2026-01-06 15:15:47 +00:00
Kai (Tam Nhu) TranandGitHub 90a73b56da Merge pull request #277 from kaitranntt/feat/background-token-refresh-worker
feat(cliproxy): add background token refresh worker
2026-01-06 07:14:49 -08:00
github-actions[bot] cfced9bfac chore(release): 7.13.1-dev.6 [skip ci] 2026-01-06 15:04:19 +00:00
Kai (Tam Nhu) TranandGitHub 9a42b3536e Merge pull request #278 from kaitranntt/feat/shared-plugins-registry-normalization
fix(shared-manager): normalize plugin registry paths to canonical ~/.claude/
2026-01-06 07:03:21 -08:00
kaitranntt 1067afbea7 fix(shared-manager): normalize plugin registry paths to canonical ~/.claude/
Replaces instance-specific paths (/.ccs/instances/<name>/) with
canonical /.claude/ paths in installed_plugins.json after linking.

Fixes #276
2026-01-05 20:48:49 -05:00
kaitranntt f98bb24a98 feat(cliproxy): add background token refresh worker
Proactively refreshes OAuth tokens before expiry to prevent
"context canceled" errors during long requests.

- Add TokenRefreshWorker with configurable interval/retries
- Add token-expiry-checker for multi-provider token inspection
- Add provider-refreshers abstraction (Gemini implemented)
- Integrate with service-manager lifecycle (start/stop)
- Add config schema in unified-config-types
- Include edge case protections:
  - expiry_date/refresh_token validation
  - File size limits (1MB)
  - Process exit handlers
  - Timeout wrapper
  - Config sanitization
  - Unrecoverable error detection
2026-01-05 20:47:54 -05:00
github-actions[bot] f2d9073b0d chore(release): 7.13.1-dev.5 [skip ci] 2026-01-05 21:59:28 +00:00
Kai (Tam Nhu) TranandGitHub 916ed9ed19 Merge pull request #272 from kaitranntt/fix/cliproxyapi-downgrade
fix(cliproxy): cap auto-update to v80 due to v81+ context bugs
2026-01-05 13:58:28 -08:00
kaitranntt 4fd4d6c264 fix(ui): add missing isStable and maxStableVersion to type 2026-01-05 14:54:27 -05:00
kaitranntt 4f69abbe88 fix(ui): clean up ProxyStatusWidget layout spacing
- Separate header row (title + icon buttons) from version row
- Compact update badge: h-4, px-1.5, gap-0.5
- Slightly more margin between rows (mt-1.5)
- Fix badge conditional rendering
2026-01-05 14:31:55 -05:00
github-actions[bot] d743e50489 chore(release): 7.13.1-dev.4 [skip ci] 2026-01-05 19:31:17 +00:00
Kai (Tam Nhu) TranandGitHub 0a1aa414b5 Merge pull request #275 from kaitranntt/kai/feat/antigravity-failover
feat(agy): add preflight quota check with auto-failover
2026-01-05 11:30:21 -08:00
kaitranntt 8072b93b3b refactor(ui): redesign ProxyStatusWidget with two-state UX
- Replace 4-button row with 3 icon buttons (restart, stop, settings)
- Add tooltips to all icon buttons via TooltipProvider
- Move version display to header next to title
- Implement collapsed/expanded two-state design
- Remove manual version input field (use dropdown only)
- Add clickable update/downgrade badge showing target version
- Add "Version Management" section header in expanded view
- Increase control sizes (h-8) for better touch targets
- Settings icon toggles to X when expanded
2026-01-05 13:49:24 -05:00
kaitranntt 8ea1e333bc docs(agy): add quota management and failover documentation
- Add ccs cliproxy doctor command to help text
- Document Antigravity auto-failover in README
2026-01-05 13:31:34 -05:00
kaitranntt 5b58bd35c9 fix(agy): edge case handling for quota failover
- Fix formatQuotaBar crash on percentage > 100 or < 0 (clamp to 0-100)
- Fix shared project accounts excluded from failover (same GCP project = pooled quota)
- Fix division by zero in avgQuota when models array empty
- Fix null account label fallback to 'Unknown Account'
2026-01-05 13:27:54 -05:00
kaitranntt 48d4a96a62 fix(ui): update/downgrade button now installs correct version
The button was incorrectly calling handleRestart (pure restart) instead
of triggering version install. Now correctly installs latestVersion for
updates or maxStableVersion for downgrades.
2026-01-05 13:21:31 -05:00
kaitranntt 6628be58e3 Merge remote-tracking branch 'origin/dev' into kai/feat/antigravity-failover 2026-01-05 13:13:41 -05:00
kaitranntt a69b2e9d10 feat(cliproxy): add version management UI with install/restart controls
Implements comprehensive version management for CLIProxyAPI Plus:

Backend APIs:
- GET /versions: fetch available versions from GitHub releases
- POST /install: install specific version with force flag for unstable
- POST /restart: restart proxy without version change

Frontend:
- 4-button layout: Restart, Update/Downgrade, Stop, Settings gear
- Collapsible version picker with dropdown + manual input
- Confirmation dialog for unstable versions (>6.6.80)
- Progressive disclosure (version picker hidden by default)

Ref: plans/260105-1250-cliproxy-version-management/
2026-01-05 13:12:46 -05:00
kaitranntt 8a56a43989 feat(ui): add stability warning to ProxyStatusWidget
- Show amber warning indicator when installed version is unstable (v81+)
- Version display now shows "(unstable)" suffix with amber styling
- "Downgrade" button replaces "Update" when version is unstable
- Tooltip explains restart will downgrade to stable version
2026-01-05 12:46:35 -05:00
github-actions[bot] 6ff5c79fe1 chore(release): 7.13.1-dev.3 [skip ci] 2026-01-05 17:41:00 +00:00
Kai (Tam Nhu) TranandGitHub 23fea65329 Merge pull request #274 from kaitranntt/fix/websearch-hook-windows-compat
fix(websearch): use 'where' command on Windows for CLI detection
2026-01-05 09:40:05 -08:00
kaitranntt e03d9b7743 fix(websearch): use 'where' command on Windows for CLI detection
Fixes #273

The websearch-transformer hook used hardcoded 'which' command which doesn't
exist on Windows. Now uses process.platform detection to choose 'where' on
Windows and 'which' on Unix systems.
2026-01-05 12:38:01 -05:00
kaitranntt c5621dab51 feat(cliproxy): add dashboard UI parity for version stability
Add version stability warnings to Dashboard API and UI:
- Extend /api/cliproxy/update-check with isStable, maxStableVersion, stabilityMessage
- Health check shows warning status for v81+ installations
- UI header displays version badge with amber warning for unstable

Closes: relates to #269
2026-01-05 12:10:32 -05:00
kaitranntt 212aef81bc fix(cliproxy): add edge case handling for version capping
- Add isAboveMaxStable() helper for version stability checks
- Add null/empty guard in clampToMaxStable() function
- Warn users on unstable v81+ without forcing downgrade
- Add context note showing latest version when it's unstable
- Clamp fallback version on GitHub API failure
2026-01-05 11:50:06 -05:00
github-actions[bot] 96ef62f4ce chore(release): 7.13.1-dev.2 [skip ci] 2026-01-05 16:44:50 +00:00
Kai (Tam Nhu) TranandGitHub 26a7537962 Merge pull request #271 from kaitranntt/feat/promote-haiku-model
feat(agy): promote gemini-claude-sonnet-4-5 as default Haiku model
2026-01-05 08:43:54 -08:00
kaitranntt 869ab3eecd fix(cliproxy): cap auto-update to v80 due to v81+ context bugs
CLIProxyAPIPlus v81+ has context cancellation bugs causing:
- Intermittent 500 errors
- "context canceled" errors during streaming
- Broken token refresh handling

Root cause: v81 commit 7a77b23 changed refreshToken to use
detached context.Background() causing race conditions.

Solution: Add CLIPROXY_MAX_STABLE_VERSION constant (6.6.80-0)
and clamp auto-update to this version until upstream fixes.

Closes #269
2026-01-05 11:41:52 -05:00
kaitranntt c9cdfd9879 feat(agy): promote gemini-claude-sonnet-4-5 as default Haiku model
Closes #270
2026-01-05 11:40:32 -05:00
github-actions[bot] 3a40a0d015 chore(release): 7.13.1-dev.1 [skip ci] 2026-01-05 07:47:13 +00:00
Kai (Tam Nhu) TranandGitHub 6857f8e012 Merge pull request #261 from jellydn/feat/dev-symlink-setup
feat(dev): add symlink setup for testing dev version
2026-01-04 23:46:13 -08:00
semantic-release-botandkaitranntt 981cef8211 feat(dev): add symlink setup for testing dev version
Add dev:symlink and dev:unlink scripts to enable seamless testing of
development changes using the global 'ccs' command without needing to
pack/install globally each time.

- scripts/dev-symlink.sh: New script that safely creates symlinks from
  global ccs to dev dist/ccs.js with backup/restore functionality
- package.json: Added dev:symlink and dev:unlink npm scripts
- CONTRIBUTING.md: Updated development setup documentation with
  symlink workflow option

This improves developer experience by allowing immediate testing of
changes with 'ccs <command>' instead of './dist/ccs.js <command>'.
2026-01-05 02:45:01 -05:00
semantic-release-bot 42e6ed72da chore(release): 7.13.1 [skip ci]
## [7.13.1](https://github.com/kaitranntt/ccs/compare/v7.13.0...v7.13.1) (2026-01-05)

### Bug Fixes

* **cliproxy:** add management_key support for remote proxy auth separation ([0e58d0e](https://github.com/kaitranntt/ccs/commit/0e58d0e8b7fd07004990e99fbdc6a080380c0304))
* **cliproxy:** add missing kiro/ghcp provider mappings in remote-auth-fetcher ([dea0e87](https://github.com/kaitranntt/ccs/commit/dea0e872bd529b2c6f825dc1d9e901d0896b7f41))
* **cliproxy:** extract unique accountId from token filename for Kiro/GHCP ([7bb7ccc](https://github.com/kaitranntt/ccs/commit/7bb7ccc27fe0d9885c4dd7f23de664e2c8b4866f)), closes [#258](https://github.com/kaitranntt/ccs/issues/258)
* **cliproxy:** proactive token refresh to prevent UND_ERR_SOCKET ([a6a653f](https://github.com/kaitranntt/ccs/commit/a6a653f14580888bcdccbf6b83b90d41b6b52136)), closes [#256](https://github.com/kaitranntt/ccs/issues/256)
* **validation:** add Windows reserved name validation and version format edge cases ([ae1847d](https://github.com/kaitranntt/ccs/commit/ae1847d9011c8bff9caff206cf1d7082c61faf40))
2026-01-05 05:09:23 +00:00
Kai (Tam Nhu) TranandGitHub 3c01d04749 Merge pull request #263 from kaitranntt/dev
feat: cliproxy improvements and validation enhancements
2026-01-04 21:08:21 -08:00
github-actions[bot] 001a1890ca chore(release): 7.13.0-dev.4 [skip ci] 2026-01-05 05:02:06 +00:00
kaitranntt ae1847d901 fix(validation): add Windows reserved name validation and version format edge cases
- Fixed version regex to accept -N suffix (e.g., 6.6.80-0)
- Added .trim() to version input for whitespace handling
- Added Windows reserved device names (CON, PRN, AUX, NUL, COM1-9, LPT1-9) validation
- Updated binary-service, variant-service, and validation-service with checks
2026-01-05 00:00:58 -05:00