Commit Graph
573 Commits
Author SHA1 Message Date
Kai (Tam Nhu) TranandGitHub f93c776ea0 Merge pull request #119 from kaitranntt/kai/fix/ui-patch
feat(ui): add privacy mode and improve CLIProxy UX
2025-12-17 03:49:16 -05:00
kaitranntt 6f3fb54cc3 feat(privacy): add privacy/demo mode for personal info blurring 2025-12-17 02:24:36 -05:00
github-actions[bot] daa3f91938 chore(release): 6.0.0-dev.1 [skip ci] 2025-12-17 06:46:14 +00:00
Kai (Tam Nhu) TranandGitHub 29bab3903a Merge pull request #120 from kaitranntt/kai/fix/cliproxy-shared-port
fix(cliproxy): prevent shared proxy termination on multi-session exit
2025-12-17 01:45:13 -05:00
kaitranntt 3629e3e2fb fix(cliproxy): prevent shared proxy termination on multi-session exit
Add session tracking with reference counting for CLIProxy instances.
Multiple CCS sessions now safely share a single proxy on port 8317.
When any session exits, proxy only terminates if it was the last session.

Changes:
- Add session-tracker.ts: lock file based reference counting
- Modify cliproxy-executor.ts: reuse existing proxy, conditional cleanup
- Add 21 unit tests for session tracker functionality

Fixes #118
2025-12-17 01:36:34 -05:00
kaitranntt cefb3a59d2 feat(ui): add iflow provider logo support 2025-12-17 01:12:54 -05:00
kaitranntt 99ff14d420 style(ui): improve button variants for better UX 2025-12-17 01:08:39 -05:00
semantic-release-bot 38844540bb chore(release): 6.0.0 [skip ci]
# [6.0.0](https://github.com/kaitranntt/ccs/compare/v5.20.0...v6.0.0) (2025-12-17)

### Bug Fixes

* **config:** force shutdown immediately instead of waiting ([6d69379](https://github.com/kaitranntt/ccs/commit/6d69379ead87dbf89d8b4d257e5134f45afc2e27))
* **dev-install:** prevent duplicate entries in bun global package.json ([13824b6](https://github.com/kaitranntt/ccs/commit/13824b61caa2905f267a2b0fdbeaeb1886352b46))
* **websearch:** preserve opencode and grok in mergeWithDefaults ([110925e](https://github.com/kaitranntt/ccs/commit/110925e72e1a4a50dd641992c0b92429913b5309))
* **websearch:** update config.yaml comments to match CLI implementation ([81e46bd](https://github.com/kaitranntt/ccs/commit/81e46bd0e12d1cae3755f556a8f8890f6d9c33ac))
* **websearch:** update existing hook config when filename changes ([4959928](https://github.com/kaitranntt/ccs/commit/4959928a8e2152916f4639bf0824e25518001bf4))
* **websearch:** use correct @vibe-kit/grok-cli package ([b6c1ae4](https://github.com/kaitranntt/ccs/commit/b6c1ae48bab13c4c60084bec2d1f854b80a685b8))

### Features

* **build:** add preinstall script to manage UI dependencies ([78fb459](https://github.com/kaitranntt/ccs/commit/78fb459d956308a5a965c87d0382151eb5f8bd89))
* **cliproxy-stats:** Implement detailed stats fetching and integrate into UI ([3216a0e](https://github.com/kaitranntt/ccs/commit/3216a0e8478ba9224b1c8ea36582a5166c8c01e0))
* **monitor:** Enhance auth monitor and account flow visualization ([994bd77](https://github.com/kaitranntt/ccs/commit/994bd7765acd735635d0c324acac1aea0bb8a165))
* **ui:** add connection timeline and improve account flow layout ([27de6af](https://github.com/kaitranntt/ccs/commit/27de6af8aa5a5de72b2c34137cd1a5343e175bc9))
* **ui:** add documentation button to header ([6e4ee80](https://github.com/kaitranntt/ccs/commit/6e4ee805da23ac8969f4161d27047b5b82a07abc))
* **ui:** enhance light theme contrast and animations ([197848a](https://github.com/kaitranntt/ccs/commit/197848a71bbb26cbbd31ea5457ac917b82688d05))
* **ui:** implement auth monitor components & pages ([b97c3bf](https://github.com/kaitranntt/ccs/commit/b97c3bfda4ad47787fbce53617a7ee5d5267c2bf))
* **websearch:** add advanced configuration and custom MCP support ([cadd2e8](https://github.com/kaitranntt/ccs/commit/cadd2e824105d7beb0ccb04f554efda82470d29c))
* **websearch:** add Grok CLI support and improve install guidance ([c0938e1](https://github.com/kaitranntt/ccs/commit/c0938e1c8286b0f9c262cc36472e3600a2b044bb))
* **websearch:** add MCP fallback and Gemini CLI hook for third-party profiles ([fd99ebc](https://github.com/kaitranntt/ccs/commit/fd99ebca983970b5fa1d5d366b0af5d136f9433e))
* **websearch:** add model config + improve hook UX ([14c53d5](https://github.com/kaitranntt/ccs/commit/14c53d575f5eda6e49861d23c9eb22bfa6bf7058))
* **websearch:** add multi-tier MCP fallback for third-party profiles ([071ec04](https://github.com/kaitranntt/ccs/commit/071ec041ed7e2cfa21cadb7f55bfa93d9fe8cb1b))
* **websearch:** add OpenCode CLI as third WebSearch provider ([482cda0](https://github.com/kaitranntt/ccs/commit/482cda0f8e61fa0bb63672db74b7e5efb1c3f1c8))
* **websearch:** dynamic hook timeout from config + grok-code default ([d33fefd](https://github.com/kaitranntt/ccs/commit/d33fefd1336129572a03d983fae5c32bf5f4998f))
* **websearch:** enhance Gemini CLI integration, package manager detection, and WebSearch status ([f7a1a40](https://github.com/kaitranntt/ccs/commit/f7a1a40b42a17e18a69c241614cf3f5853deace3))
* **websearch:** implement fallback chain for CLI providers ([e6aa8ac](https://github.com/kaitranntt/ccs/commit/e6aa8ac453c70995307ea1fc5c819e0f891f1d61))
* **websearch:** respect config provider settings and consolidate prompts ([e71cb62](https://github.com/kaitranntt/ccs/commit/e71cb6227cfb114ca1864eea5198854604d83c52))
* **web:** update account manager and web routes ([127e0e6](https://github.com/kaitranntt/ccs/commit/127e0e60437f47cd445c1ce9ddf03415d51a06c7))

### BREAKING CHANGES

* **websearch:** Hook no longer falls back to all installed CLIs. It now
strictly respects config.yaml settings.
2025-12-17 05:22:41 +00:00
Kai (Tam Nhu) TranandGitHub 94648ed301 Merge pull request #117 from kaitranntt/dev
feat(release): WebSearch CLI Fallback & Auth Monitor
2025-12-17 00:21:37 -05:00
github-actions[bot] 02a3d54907 chore(release): 5.20.0-dev.3 [skip ci] 2025-12-17 05:18:34 +00:00
Kai (Tam Nhu) TranandGitHub 287375e5f0 Merge pull request #116 from kaitranntt/kai/feat/websearch-mcp-fallback
feat(websearch): CLI provider fallback chain with OpenCode and Grok support
2025-12-17 00:17:29 -05:00
kaitranntt 14c53d575f feat(websearch): add model config + improve hook UX
- Add model field to Gemini/OpenCode WebSearch providers
- Config.yaml now explicitly stores model (gemini-2.5-flash, opencode/grok-code)
- UI: blur-to-save for model inputs (no save on every keystroke)
- UI: collapsible install hints inside provider cards
- UI: left accent border for enabled providers (better light theme contrast)
- Hook: use systemMessage for info-styled confirmation
- Hook: cleaner result format without defensive "NOT an error" language
2025-12-17 00:16:03 -05:00
kaitranntt 6d69379ead fix(config): force shutdown immediately instead of waiting 2025-12-16 23:13:27 -05:00
kaitranntt d33fefd133 feat(websearch): dynamic hook timeout from config + grok-code default
- Hook timeout now computed from max provider timeout + 30s buffer
- Removes hardcoded HOOK_TIMEOUT_SECONDS constant
- ensureHookConfig() now updates timeout when it changes
- Default OpenCode model changed from gpt-5-nano to grok-code
- Default OpenCode timeout changed from 60s to 90s
- Single source of truth: config.yaml controls all timeouts
2025-12-16 23:07:11 -05:00
kaitranntt cbc2022ed1 refactor(websearch): consolidate prompts with shared instructions + provider overrides
- Add SHARED_INSTRUCTIONS constant with 7 quality guidelines applied to ALL providers
- Refactor PROVIDER_CONFIG to use toolInstruction (provider-specific) and quirks (optional)
- Add buildPrompt() function to combine shared + provider-specific instructions
- Gemini: google_web_search tool instruction
- OpenCode: built-in capabilities instruction
- Grok: web search + X/Twitter quirk for real-time events

DRY improvement: shared guidelines now maintained in one place
2025-12-16 22:47:53 -05:00
kaitranntt e71cb6227c feat(websearch): respect config provider settings and consolidate prompts
Major refactor of WebSearch hook to:

1. **Respect config.yaml settings**: Hook now reads CCS_WEBSEARCH_GEMINI,
   CCS_WEBSEARCH_OPENCODE, CCS_WEBSEARCH_GROK env vars to determine which
   providers to use. Only enabled AND installed providers are tried.

2. **Consolidate prompts/models**: Added PROVIDER_CONFIG section at top of
   hook file for easy prompt engineering:
   - gemini: model + prompt template
   - opencode: model (overridable via env) + prompt template
   - grok: model + prompt template

3. **Pass provider states via env**: Updated getWebSearchHookEnv() to pass
   individual provider enabled states as env vars.

Breaking change: Hook no longer falls back to all installed CLIs. It now
strictly respects config.yaml settings.
2025-12-16 22:30:37 -05:00
kaitranntt 110925e72e fix(websearch): preserve opencode and grok in mergeWithDefaults
The mergeWithDefaults() function was only merging gemini provider config,
completely ignoring opencode and grok providers. This caused:
1. OpenCode enabled=true in config.yaml being reset to false
2. Dashboard showing OpenCode toggled off after reload
3. "Disabled in config" message when only OpenCode was enabled

Fixed by adding opencode and grok to the mergeWithDefaults() function
and updating getWebSearchConfig() to check if ANY provider is enabled.
2025-12-16 22:18:05 -05:00
kaitranntt 4959928a8e fix(websearch): update existing hook config when filename changes
Previously, ensureHookConfig() would return early if any WebSearch hook
existed in settings.json, even if it pointed to an old/renamed file.
Now it checks if the command path matches the expected hook and updates
it if needed.

This fixes the "No Providers Configured" error when the hook file was
renamed from websearch-gemini-transformer.cjs to websearch-transformer.cjs.
2025-12-16 22:11:02 -05:00
kaitranntt 13824b61ca fix(dev-install): prevent duplicate entries in bun global package.json
Bun's `add -g` with file: protocol appends instead of replacing existing
entries, causing duplicate key warnings on repeated installs. Fix by
removing the package before re-adding.
2025-12-16 22:04:23 -05:00
kaitranntt e6aa8ac453 feat(websearch): implement fallback chain for CLI providers
Add automatic fallback chain (Gemini -> OpenCode -> Grok) when multiple
WebSearch CLI providers are available. The hook now tries each provider
in order until one succeeds.

Changes:
- Update websearch-transformer.cjs with tryOpenCodeSearch() and tryGrokSearch()
- Implement fallback chain logic in processHook()
- Add outputAllFailedMessage() for when all providers fail
- Update outputNoToolsMessage() with all three install options
- Update config.yaml comments to document OpenCode and fallback behavior
2025-12-16 21:42:49 -05:00
kaitranntt 482cda0f8e feat(websearch): add OpenCode CLI as third WebSearch provider
- Add OpenCodeWebSearchConfig type with enabled, model, timeout options
- Implement getOpenCodeCliStatus() for CLI detection with caching
- Add hasOpenCodeCli() and clearOpenCodeCliCache() helper functions
- Update getWebSearchCliProviders() to include OpenCode provider info
- Update hasAnyWebSearchCli() to check all three providers
- Update getCliInstallHints() with OpenCode install command
- Update WebSearchStatus interface to include opencodeCli
- Update getWebSearchReadiness() to report OpenCode status
- Update routes.ts PUT /api/websearch to handle opencode config
- Update routes.ts GET /api/websearch/status to return opencodeCli
- Add OpenCode provider card in settings.tsx UI
- Add purple-themed installation hints for OpenCode
- Order providers: Gemini (1st) -> OpenCode (2nd) -> Grok (3rd/last)

OpenCode uses `opencode run` with `opencode/gpt-5-nano` model for
web search. FREE tier available via OpenCode Zen, no API key required.
2025-12-16 21:37:31 -05:00
kaitranntt 81e46bd0e1 fix(websearch): update config.yaml comments to match CLI implementation
- Update WebSearch section comments in unified-config-loader.ts
- Remove outdated MCP references (web-search-prime, brave, tavily, customMcp)
- Add accurate CLI provider info (Gemini CLI FREE, Grok CLI paid)
- Add GrokWebSearchConfig type to unified-config-types.ts
- Update PUT /api/websearch route to handle both gemini and grok

Old comments listed MCP-based providers that were never implemented.
New comments accurately reflect the CLI-based WebSearch implementation.
2025-12-16 21:10:12 -05:00
kaitranntt b6c1ae48ba fix(websearch): use correct @vibe-kit/grok-cli package
- Update install command to npm install -g @vibe-kit/grok-cli
- Update docs URL to github.com/superagent-ai/grok-cli
- Fix env var from XAI_API_KEY to GROK_API_KEY
- Update description to reflect AI coding agent capabilities
2025-12-16 21:03:53 -05:00
kaitranntt c0938e1c82 feat(websearch): add Grok CLI support and improve install guidance
- Add Grok CLI detection (grok-4-cli by lalomorales22) alongside Gemini CLI
- Add WebSearch health check group to health-service.ts
- Update settings UI to show both Gemini and Grok CLI providers
- Add detailed install hints when no WebSearch CLI is installed
- Update API routes to return grokCli status
- Both CLI and dashboard users now see clear installation guidance

Providers:
- Gemini CLI: FREE tier (1000 req/day), no API key needed
- Grok CLI: Requires xAI API key (XAI_API_KEY), web + X search
2025-12-16 21:00:35 -05:00
github-actions[bot] 25541c52aa chore(release): 5.20.0-dev.2 [skip ci] 2025-12-16 21:28:21 +00:00
kaitranntt 78fb459d95 feat(build): add preinstall script to manage UI dependencies 2025-12-16 16:27:17 -05:00
github-actions[bot] e6f0e0b3d5 chore(release): 5.20.0-dev.1 [skip ci] 2025-12-16 12:10:18 +00:00
Kai (Tam Nhu) TranandGitHub 5b2cf14c7f Merge pull request #104 from kaitranntt/kai/feat/auth-monitor-design
feat(ui): auth monitor with real-time account flow visualization
2025-12-16 07:09:23 -05:00
kaitranntt 197848a71b feat(ui): enhance light theme contrast and animations 2025-12-16 07:06:06 -05:00
kaitranntt 994bd7765a feat(monitor): Enhance auth monitor and account flow visualization 2025-12-16 06:45:38 -05:00
kaitranntt 66c3edc7e9 style(ui): apply prettier formatting 2025-12-16 05:57:47 -05:00
kaitranntt 3216a0e847 feat(cliproxy-stats): Implement detailed stats fetching and integrate into UI 2025-12-16 05:57:27 -05:00
kaitranntt cadd2e8241 feat(websearch): add advanced configuration and custom MCP support 2025-12-16 05:56:45 -05:00
kaitranntt f7a1a40b42 feat(websearch): enhance Gemini CLI integration, package manager detection, and WebSearch status
- Improve Gemini CLI integration in websearch hook: use gemini-2.5-flash & --yolo.
- Update `dev-install.sh` for better package manager (npm/bun) auto-detection.
- Introduce `displayWebSearchStatus` for improved user experience.
- Refactor `mcp-manager.ts` to track CCS-managed MCP servers.
2025-12-16 04:18:40 -05:00
kaitranntt fd99ebca98 feat(websearch): add MCP fallback and Gemini CLI hook for third-party profiles
- Add Gemini CLI transformer hook (websearch-gemini-transformer.cjs)
- Implement MCP auto-configuration with web-search-prime, brave, tavily fallback
- Add installWebSearchHook() to activate hook on profile launch
- Update settings.tsx to clarify web-search-prime requires z.ai subscription
- Add WebSearch config types and loader support
- Create implementation plan for WebSearch UX enhancement (startup status, dashboard)

Third-party profiles (gemini, agy, codex, qwen, glm, kimi) now have WebSearch
capability via Gemini CLI primary + MCP fallback chain.
2025-12-16 02:49:07 -05:00
kaitranntt 071ec041ed feat(websearch): add multi-tier MCP fallback for third-party profiles
Implements CCS WebSearch Native Infrastructure (Phases 1-3):

Phase 1 - Multi-tier MCP Fallback:
- Add mcp-manager.ts with ensureMcpWebSearch() for auto-configuration
- Support web-search-prime (primary), Brave Search, and Tavily MCPs
- Case-insensitive detection of existing web search MCPs
- Block-websearch hook for optional native WebSearch blocking

Phase 2 - User Configuration:
- Add WebSearchConfig interface to unified-config-types.ts
- Add getWebSearchConfig() to unified-config-loader.ts
- Support configurable webSearchPrimeUrl for security
- Add GET/PUT /api/websearch endpoints in routes.ts
- Add WebSearch settings UI in settings.tsx dashboard

Phase 3 - Documentation & Testing:
- Add WebSearch section to README.md
- Create comprehensive docs/websearch.md guide
- Add 23 unit tests for MCP manager logic

Enables web search for gemini, codex, agy, qwen, glm, kimi profiles
that cannot access Anthropic's native WebSearch API.
2025-12-16 00:42:13 -05:00
kaitranntt 6e4ee805da feat(ui): add documentation button to header 2025-12-15 16:14:59 -05:00
semantic-release-bot 8ec7e99038 chore(release): 5.20.0 [skip ci]
# [5.20.0](https://github.com/kaitranntt/ccs/compare/v5.19.2...v5.20.0) (2025-12-15)

### Bug Fixes

* **auth:** improve default account hint and add reset-default command ([2fb266c](https://github.com/kaitranntt/ccs/commit/2fb266c01f0a6a5bf10a0fe1662e1f315b732a61)), closes [#106](https://github.com/kaitranntt/ccs/issues/106)
* resolve ESM/CJS compatibility for Node.js 18 ([b915127](https://github.com/kaitranntt/ccs/commit/b915127b3a775667c171fd12a9756fc3d5d321d0)), closes [#110](https://github.com/kaitranntt/ccs/issues/110)

### Features

* **oauth:** enhance auth flow with detailed pre-flight checks and real-time progress ([e80c48c](https://github.com/kaitranntt/ccs/commit/e80c48c55f8b74614d0bebb3336163588018ebd6))
2025-12-15 20:37:48 +00:00
Kai (Tam Nhu) TranandGitHub f043ce00d7 Merge pull request #109 from kaitranntt/dev
feat(release): OAuth real-time status display
2025-12-15 15:36:45 -05:00
github-actions[bot] edf924ead0 chore(release): 5.19.2-dev.3 [skip ci] 2025-12-15 20:36:00 +00:00
Kai (Tam Nhu) TranandGitHub b5d751f83f Merge pull request #112 from kaitranntt/kai/fix/config-esm-compat
fix: resolve ESM/CJS compatibility for Node.js 18 (#110)
2025-12-15 15:34:58 -05:00
kaitranntt b915127b3a fix: resolve ESM/CJS compatibility for Node.js 18
Downgrade ESM-only packages to CJS-compatible versions:
- boxen: ^8.0.1 → ^5.1.2
- chalk: ^5.6.2 → ^4.1.2
- chokidar: ^5.0.0 → ^3.6.0
- get-port: ^7.0.0 → ^5.1.1
- gradient-string: ^3.0.0 → ^2.0.2
- listr2: ^9.0.5 → ^3.14.0
- open: ^10.1.0 → ^8.4.2
- ora: ^9.0.0 → ^5.4.1

Update dynamic import handling for CJS module compatibility.
Add type declarations for gradient-string.

Fixes #110
2025-12-15 15:32:34 -05:00
kaitranntt 27de6af8aa feat(ui): add connection timeline and improve account flow layout
- Add ConnectionTimeline component showing recent connection events
- Restructure layout to 2-column design: flow viz (flex) | timeline (fixed)
- Flow chart now expands to fill available space with justify-between
- Timeline has compact fixed width (w-56) on the right
- Detail panel now uses flow-based positioning instead of absolute
- Generate mock connection events based on account success/failure data
2025-12-15 01:23:26 -05:00
github-actions[bot] d74c08148a chore(release): 5.19.2-dev.2 [skip ci] 2025-12-15 04:28:25 +00:00
Kai (Tam Nhu) TranandGitHub 980021bc14 Merge pull request #108 from kaitranntt/kai/feat/oauth-realtime-status
feat(oauth): enhance auth flow with detailed pre-flight checks and real-time progress
2025-12-14 23:27:31 -05:00
kaitranntt e80c48c55f feat(oauth): enhance auth flow with detailed pre-flight checks and real-time progress 2025-12-14 23:07:03 -05:00
github-actions[bot] f0e8408abb chore(release): 5.19.2-dev.1 [skip ci] 2025-12-15 02:42:44 +00:00
Kai (Tam Nhu) TranandGitHub acdd340ec9 Merge pull request #107 from kaitranntt/kai/fix/auth-create-default-warning
fix(auth): improve default account hint and add reset-default command
2025-12-14 21:41:42 -05:00
kaitranntt 2fb266c01f fix(auth): improve default account hint and add reset-default command
- Change post-create hint from casual text to warning box
- Clearly state that running the command will SWITCH default account
- Add `ccs auth reset-default` command to restore original CCS behavior
- Add warnBox() UI helper for yellow-bordered warning boxes
- Update main help to show default/reset-default commands

Closes #106
2025-12-14 21:32:45 -05:00
kaitranntt 349d81a1b0 chore(ui): update ui build config and typings 2025-12-14 04:26:31 -05:00