Commit Graph
1685 Commits
Author SHA1 Message Date
semantic-release-bot bfb5eefe49 chore(release): 7.36.0 [skip ci]
## [7.36.0](https://github.com/kaitranntt/ccs/compare/v7.35.1...v7.36.0) (2026-02-04)

### Features

* **detector:** add Windows native installer fallback detection ([3336736](https://github.com/kaitranntt/ccs/commit/333673615465727d2b25fef7a35203424859584d)), closes [#447](https://github.com/kaitranntt/ccs/issues/447)

### Bug Fixes

* **detector:** use expandPath helper and add tests ([7f83a7d](https://github.com/kaitranntt/ccs/commit/7f83a7d43574e12ae3685caa0f6cf682ea9631ca)), closes [#449](https://github.com/kaitranntt/ccs/issues/449) [#447](https://github.com/kaitranntt/ccs/issues/447)
* **hooks:** deduplicate WebSearch hooks when saving via Dashboard ([57d4b04](https://github.com/kaitranntt/ccs/commit/57d4b04c682aac6246d2678a8104ed64e3bbd39a)), closes [#450](https://github.com/kaitranntt/ccs/issues/450)
* **ui:** prevent settings tab truncation with grid layout ([bfb2a06](https://github.com/kaitranntt/ccs/commit/bfb2a062682be3bfb4a03d3a2e0b534829a37899))

### Tests

* add stress test and PostToolUse preservation tests ([2fe6c33](https://github.com/kaitranntt/ccs/commit/2fe6c336d71cd36e7983603491601307a5f674e7)), closes [#452](https://github.com/kaitranntt/ccs/issues/452)
* **glmt:** increase timeout for retry-logic tests on CI ([aa83b4d](https://github.com/kaitranntt/ccs/commit/aa83b4db4e00296bd02ff1699ee7782d291f012a))
* **uploader:** fix flaky timeout test with 5ms tolerance ([36c5605](https://github.com/kaitranntt/ccs/commit/36c560532331a6d12ec0d52e7f559004f241beea))
2026-02-04 18:45:41 +00:00
Kai (Tam Nhu) TranandGitHub 9c44e6b58e Merge pull request #453 from kaitranntt/dev
fix(release): v7.35.1 - hook deduplication and Windows detection
2026-02-04 13:44:31 -05:00
github-actions[bot] babc8f1c19 chore(release): 7.35.1-dev.2 [skip ci] 2026-02-04 17:07:08 +00:00
Kai (Tam Nhu) TranandGitHub ca2070dd35 Merge pull request #452 from kaitranntt/kai/fix/450-hook-duplication
fix(hooks): deduplicate WebSearch hooks when saving via Dashboard
2026-02-04 12:06:05 -05:00
kaitranntt aa83b4db4e test(glmt): increase timeout for retry-logic tests on CI
The GLMT retry logic tests use dynamic imports and GlmtProxy
instantiation which are slower on CI runners than locally.
Increase default timeout from 5s to 30s to prevent flaky failures.
2026-02-04 11:59:34 -05:00
kaitranntt 2fe6c336d7 test: add stress test and PostToolUse preservation tests
- Add stress test for 15 duplicate hooks (verifies O(n) scaling)
- Add test verifying PostToolUse/PreToolCall remain untouched
- Add optional debug logging when duplicates removed (CCS_DEBUG)

Addresses review feedback from PR #452
2026-02-04 11:44:33 -05:00
kaitranntt 57d4b04c68 fix(hooks): deduplicate WebSearch hooks when saving via Dashboard
Add deduplicateCcsHooks() call to PUT /api/settings/:profile endpoint.
This prevents WebSearch hooks from accumulating when users save settings
via the Dashboard UI.

Fixes #450
2026-02-04 11:36:31 -05:00
github-actions[bot] e653be06b1 chore(release): 7.35.1-dev.1 [skip ci] 2026-02-04 16:25:34 +00:00
Kai (Tam Nhu) TranandGitHub e4f1793e4c Merge pull request #451 from kaitranntt/kai/fix/settings-tabs-truncation
fix(ui): prevent settings tab truncation with grid layout
2026-02-04 11:24:27 -05:00
Kai (Tam Nhu) TranandGitHub ecdb227c68 Merge pull request #449 from kaitranntt/kai/feat/447-windows-claude-detection
feat(detector): add Windows native installer fallback detection
2026-02-04 11:23:56 -05:00
kaitranntt bfb2a06268 fix(ui): prevent settings tab truncation with grid layout
- Use CSS grid (grid-cols-6) for even tab distribution
- Shorten tab labels to fit narrow panels
- Add scrollbar-thin utility for overflow scenarios
2026-02-04 11:19:39 -05:00
kaitranntt 36c5605323 test(uploader): fix flaky timeout test with 5ms tolerance 2026-02-04 11:16:47 -05:00
kaitranntt 7f83a7d435 fix(detector): use expandPath helper and add tests
- Refactor: Remove duplicate expandWindowsPath(), use expandPath() from helpers
- Simplify: Update WINDOWS_NATIVE_PATHS to actual install location
  (%USERPROFILE%\.local\bin\claude.exe from Claude's install.ps1)
- Tests: Add comprehensive test suite for Windows detection (9 tests)
- Address code review feedback from PR #449

Refs: #447
2026-02-04 11:14:17 -05:00
kaitranntt 3336736154 feat(detector): add Windows native installer fallback detection
- Check common Windows installation paths when where.exe fails
- Improve error messages with Windows-specific guidance
- Suggest running 'claude install' for native installer users

Closes #447
2026-02-04 11:06:32 -05:00
semantic-release-bot 2b84322249 chore(release): 7.35.1 [skip ci]
## [7.35.1](https://github.com/kaitranntt/ccs/compare/v7.35.0...v7.35.1) (2026-02-04)

### Bug Fixes

* **cliproxy:** use os.homedir() for cross-platform path expansion ([39f77bd](https://github.com/kaitranntt/ccs/commit/39f77bd9efffd97fb76fbb7bb550bfe25c58e6a7)), closes [#445](https://github.com/kaitranntt/ccs/issues/445)
2026-02-04 15:33:32 +00:00
Kai (Tam Nhu) TranandGitHub 5947f06705 Merge pull request #446 from kaitranntt/kai/fix/445-windows-path-syntax
fix(cliproxy): use os.homedir() for cross-platform path expansion
2026-02-04 10:32:21 -05:00
kaitranntt 39f77bd9ef fix(cliproxy): use os.homedir() for cross-platform path expansion
Replace process.env.HOME with os.homedir() when expanding custom
settings paths. On Windows, process.env.HOME is undefined, causing
tilde expansion to produce invalid Unix-style paths like
'/.ccs/variant.settings.json'.

Closes #445
2026-02-04 10:28:38 -05:00
github-actions[bot] b8ff66b765 chore(sync): merge main into dev after release [skip ci]
# Conflicts:
#	package.json
2026-02-04 13:22:59 +00:00
semantic-release-bot b40aa69459 chore(release): 7.35.0 [skip ci]
## [7.35.0](https://github.com/kaitranntt/ccs/compare/v7.34.1...v7.35.0) (2026-02-04)

### ⚠ BREAKING CHANGES

* **hooks:** config.yaml image_analysis section now uses
provider_models instead of providers/model fields.

Provider-to-model mappings:
- agy → gemini-2.5-flash
- gemini → gemini-2.5-flash
- codex → gpt-5.1-codex-mini
- kiro → kiro-claude-haiku-4-5
- ghcp → claude-haiku-4.5
- claude → claude-haiku-4-5-20251001

Hook checks CCS_CURRENT_PROVIDER against provider_models and skips
if no vision model configured for that provider.

### Features

* **hooks:** add ANTHROPIC_MODEL fallback for image analysis ([ae3eb28](https://github.com/kaitranntt/ccs/commit/ae3eb282b4a6a0754f90be27e259af45d0d09d9b))
* **hooks:** add block-image-read hook to prevent context overflow ([38eb740](https://github.com/kaitranntt/ccs/commit/38eb74043c7f9e613e308392b2c159ebfc2a05c1)), closes [#426](https://github.com/kaitranntt/ccs/issues/426)
* **hooks:** add image/PDF analysis via CLIProxy transformer ([d5f2aca](https://github.com/kaitranntt/ccs/commit/d5f2acaa6e9ee5d12a6035c2da1f975551b6a989)), closes [#426](https://github.com/kaitranntt/ccs/issues/426)
* **hooks:** add UX improvements for image analysis hook ([2b0717e](https://github.com/kaitranntt/ccs/commit/2b0717ed53011dcb67cc03ad09a00cfabb682f1e))
* **hooks:** extend image analyzer to all CLIProxy providers ([3252228](https://github.com/kaitranntt/ccs/commit/3252228e5c230d291fc705fb5f1f4b3f58cb2d99))
* **hooks:** inject image analyzer hooks into all profile types ([a8ddf8b](https://github.com/kaitranntt/ccs/commit/a8ddf8bd565ac82131dc4ca02ecadd3b04a61197))
* **hooks:** skip image analyzer for Claude Sub accounts ([26f4021](https://github.com/kaitranntt/ccs/commit/26f40217703800cb412af74195e350090d39e435))
* **ui:** improve settings page UX and responsiveness ([4d87a64](https://github.com/kaitranntt/ccs/commit/4d87a649de3873786926dad0f598d4f481b1b563))

### Bug Fixes

* **backup:** create backups only when settings content changes ([c324e92](https://github.com/kaitranntt/ccs/commit/c324e92eb442669656b53a8f685030f5cb15ce3d)), closes [#433](https://github.com/kaitranntt/ccs/issues/433)
* **checks:** use configurable CLIProxy port in health check ([bfb5350](https://github.com/kaitranntt/ccs/commit/bfb535037ad297b3d838754af74d30b8a88b34f2))
* **cli:** improve network handling and shell escaping ([3c1cf91](https://github.com/kaitranntt/ccs/commit/3c1cf91da4a27e55578a975f02222120a5d3064c))
* **config:** remove unused forceReload parameter in showStatus ([8dfd9e9](https://github.com/kaitranntt/ccs/commit/8dfd9e937599305dcdeab453bb866f16ad582020))
* **delegation:** dynamic model display from settings ([f6b7045](https://github.com/kaitranntt/ccs/commit/f6b7045023e5de52f57fa79445a29de5bfe5a5ff)), closes [#431](https://github.com/kaitranntt/ccs/issues/431)
* **glmt:** gate retry rate limit logs behind verbose flag ([73824bc](https://github.com/kaitranntt/ccs/commit/73824bc99eec2701164837588a231b56b943c536))
* **hooks:** add defensive validation for env var generation ([9662490](https://github.com/kaitranntt/ccs/commit/9662490a74297fe1c992e30beb212222abe77799))
* **hooks:** add edge case validation in image analyzer ([0e7b9c9](https://github.com/kaitranntt/ccs/commit/0e7b9c91900c319a58ec698306be01bb1f665432))
* **hooks:** add network errors to noRetryPatterns, update E2E test ([1201b4b](https://github.com/kaitranntt/ccs/commit/1201b4bb4b0b207d1c170fc3dcf39e79bbc545bd))
* **hooks:** enable image-read blocking by default for third-party profiles ([9f3edc5](https://github.com/kaitranntt/ccs/commit/9f3edc5dafb3aeb72f3d1cf2da80ccbda1690e48))
* **hooks:** improve error handling and edge cases for image analysis ([cb8de2c](https://github.com/kaitranntt/ccs/commit/cb8de2c8e8da2ac5e97b8e1893fc4586d0bf5c8c))
* **hooks:** improve image analysis output format ([70caaa0](https://github.com/kaitranntt/ccs/commit/70caaa00a090fe6a1cfcff3ff47bcb355427ff42))
* **ui:** add missing animate property to connection indicator ([57f7a70](https://github.com/kaitranntt/ccs/commit/57f7a70d67cb7bc854fa3aa4c0a932134dc1278c))
* **update:** pre-remove package on Windows bun before reinstall ([a55e0af](https://github.com/kaitranntt/ccs/commit/a55e0af8ef440d2cbfa7d9a487727fb1ee874bc6)), closes [#435](https://github.com/kaitranntt/ccs/issues/435)

### Documentation

* update documentation for v7.34 release ([c6be09b](https://github.com/kaitranntt/ccs/commit/c6be09b55b9df21be551f4844b4fba3dfd9a6b3f))

### Code Refactoring

* **hooks:** consolidate getCcsHooksDir to config-manager ([b014c4e](https://github.com/kaitranntt/ccs/commit/b014c4e8725c484d37827ea6f2a2e5df59464ce8))
* **hooks:** deprecate block-image-read, add CLIProxy fallback ([51b719e](https://github.com/kaitranntt/ccs/commit/51b719ef3463950983244d708f1b9bca45774976)), closes [#442](https://github.com/kaitranntt/ccs/issues/442) [#426](https://github.com/kaitranntt/ccs/issues/426)
* **hooks:** use provider_models mapping for image analysis ([40caff1](https://github.com/kaitranntt/ccs/commit/40caff13ad5e8eaca71bddb05368d2218ce94453))

### Performance Improvements

* **config:** replace busy-wait with Atomics.wait in lock retry ([ec4e1ae](https://github.com/kaitranntt/ccs/commit/ec4e1ae31c882e8422e8defca6c10a9c79addc5d))
2026-02-04 13:21:52 +00:00
github-actions[bot] 302b02922d chore(release): 7.34.1-dev.8 [skip ci] 2026-02-04 13:21:40 +00:00
Kai (Tam Nhu) TranandGitHub b3dd57e79d Merge pull request #444 from kaitranntt/dev
feat: image analysis hooks and UX improvements
2026-02-04 08:20:47 -05:00
kaitranntt c6be09b55b docs: update documentation for v7.34 release
- add image analysis hook architecture

- update test metrics (638 → 1407 tests)

- add new hook modules to codebase summary

- update all dates to 2026-02-04
2026-02-04 08:20:26 -05:00
github-actions[bot] 0f6ee680b2 chore(release): 7.34.1-dev.7 [skip ci] 2026-02-04 13:11:09 +00:00
kaitranntt 8dfd9e9375 fix(config): remove unused forceReload parameter in showStatus 2026-02-04 08:09:49 -05:00
kaitranntt bfb535037a fix(checks): use configurable CLIProxy port in health check
- replace hardcoded 8317 with CLIPROXY_DEFAULT_PORT

- reuse isCliproxyRunning() instead of custom HTTP check
2026-02-04 08:09:35 -05:00
kaitranntt b014c4e872 refactor(hooks): consolidate getCcsHooksDir to config-manager
- remove duplicate definitions from 3 locations

- centralize in config-manager.ts for DRY compliance

- update all imports across hook modules
2026-02-04 08:09:20 -05:00
github-actions[bot] 039b005b14 chore(release): 7.34.1-dev.6 [skip ci] 2026-02-04 06:09:58 +00:00
Kai (Tam Nhu) TranandGitHub 205f5c3315 Merge pull request #442 from kaitranntt/kai/feat/426-block-image-read
feat(hooks): achieve full WebSearch parity for image analyzer hooks
2026-02-04 01:08:54 -05:00
kaitranntt 1201b4bb4b fix(hooks): add network errors to noRetryPatterns, update E2E test
- Add ENOTFOUND, ENETUNREACH, EAI_AGAIN to noRetryPatterns to prevent
  infinite retries on network errors
- Update E2E test to expect exit code 2 (block) when CLIProxy unavailable
- Fix debug message expectation in test
2026-02-04 00:59:10 -05:00
kaitranntt 51b719ef34 refactor(hooks): deprecate block-image-read, add CLIProxy fallback
- Remove redundant block-image-read.cjs hook (image-analyzer handles all)
- Add fallback blocking when CLIProxy unavailable (prevents context overflow)
- Simplify fallback message to prevent context pollution/hallucination
- Remove image-read-block-hook-env.ts and related exports
- Update comments per PR #442 review suggestions
- Add defensive check for empty models array

Closes #426
2026-02-04 00:49:52 -05:00
kaitranntt 26f4021770 feat(hooks): skip image analyzer for Claude Sub accounts
- Add CCS_IMAGE_ANALYSIS_SKIP=1 for account and default profile types
- Matches WebSearch behavior: native Claude has native vision support
2026-02-04 00:29:33 -05:00
kaitranntt a8ddf8bd56 feat(hooks): inject image analyzer hooks into all profile types
Add image analyzer hook injection alongside WebSearch hooks:
- ccs.ts: CLIProxy, Copilot, and API profile flows
- variant-settings.ts: CLIProxy variant settings

Ensures image analyzer hooks are present in profile settings.json files.
2026-02-04 00:27:13 -05:00
kaitranntt ae3eb282b4 feat(hooks): add ANTHROPIC_MODEL fallback for image analysis
Model resolution priority:
1. provider_models[current_provider]
2. ANTHROPIC_MODEL from profile settings
3. DEFAULT_MODEL (gemini-2.5-flash)

Allows users to override vision model via profile's ANTHROPIC_MODEL.
2026-02-04 00:19:51 -05:00
kaitranntt 3252228e5c feat(hooks): extend image analyzer to all CLIProxy providers
- Derive supported profiles from provider_models config dynamically
- Add qwen and iflow to default provider_models
- Full parity with WebSearch hook injection pattern

Providers now covered: agy, gemini, codex, kiro, ghcp, claude, qwen, iflow
2026-02-04 00:14:42 -05:00
github-actions[bot] 485ed4eb4e chore(release): 7.34.1-dev.5 [skip ci] 2026-02-04 05:02:33 +00:00
Kai (Tam Nhu) TranandGitHub 1ad1372068 Merge pull request #441 from kaitranntt/kai/feat/426-block-image-read
feat(hooks): image analysis via CLIProxy with UX improvements
2026-02-04 00:01:25 -05:00
kaitranntt ec4e1ae31c perf(config): replace busy-wait with Atomics.wait in lock retry
Use Atomics.wait for synchronous sleep instead of CPU-intensive
busy-wait loop. This properly sleeps the thread without wasting cycles.

Addresses code review feedback on PR #441.
2026-02-03 23:57:55 -05:00
kaitranntt 57f7a70d67 fix(ui): add missing animate property to connection indicator
- Add animate: false to connected state config to fix TypeScript error
- Integrate fixImageAnalysisConfig() into auto-repair for Fix 5
2026-02-03 23:54:29 -05:00
kaitranntt 3c1cf91da4 fix(cli): improve network handling and shell escaping
- Add network connectivity check before CLIProxy operations

- Enhance PowerShell argument escaping for special characters
2026-02-03 22:34:15 -05:00
kaitranntt 4d87a649de feat(ui): improve settings page UX and responsiveness
- Add mobile-responsive layout for settings panels

- Add empty state UI for websearch providers

- Improve connection indicator with WebSocket status
2026-02-03 22:33:31 -05:00
kaitranntt cb8de2c8e8 fix(hooks): improve error handling and edge cases for image analysis
- Add empty model string validation in config command

- Add --enable/--disable conflict detection

- Truncate long model names in display (>40 chars)

- Add EACCES/EPERM file permission error handler

- Add filesystem error classification (ENOSPC, EROFS)

- Log config upgrade save failures instead of silent catch
2026-02-03 22:32:49 -05:00
kaitranntt 2b0717ed53 feat(hooks): add UX improvements for image analysis hook
Add comprehensive UX enhancements for the image analysis CLIProxy hook:

- Add `ccs config image-analysis` CLI command for managing settings
  - Enable/disable toggle
  - Timeout configuration (10-600s)
  - Per-provider model configuration
  - Status display with provider models

- Add specialized error handlers with actionable messages
  - File too large (with compression hints)
  - CLIProxy unavailable (with start instructions)
  - Auth failure (with re-auth commands)
  - Timeout (with increase timeout hint)
  - Rate limit (with retry guidance)
  - API error (with response body parsing)

- Add comprehensive debug output (CCS_DEBUG=1)
  - Provider name and model
  - File size and media type
  - Timeout and endpoint
  - Skip reasons with context

- Add help text updates
  - `ccs --help` includes Image Analysis section
  - `ccs config --help` lists image-analysis subcommand

- Add doctor integration
  - Validates image_analysis config
  - Checks enabled status, providers, timeout
  - Warns if CLIProxy not running

- Add unit tests for new config command
2026-02-03 22:14:52 -05:00
github-actions[bot] 272be161fa chore(release): 7.34.1-dev.4 [skip ci] 2026-02-04 02:51:16 +00:00
Kai (Tam Nhu) TranandGitHub bc9951656a Merge pull request #439 from kaitranntt/kai/fix/435-bun-update
fix(update): pre-remove package on Windows bun before reinstall
2026-02-03 21:50:08 -05:00
kaitranntt 0e7b9c9190 fix(hooks): add edge case validation in image analyzer
- Empty model validation: check `model.trim()` before using
- 10MB boundary: use `>=` instead of `>` for consistent messaging
- Timeout clamping: ensure timeout is between 1-600 seconds
- Response stream error: add error handler for network failures
- Empty response validation: check before JSON.parse to prevent crashes
2026-02-03 21:44:44 -05:00
kaitranntt a55e0af8ef fix(update): pre-remove package on Windows bun before reinstall
On Windows, bun's global binary symlink may not update properly when
reinstalling the same package. Pre-remove the existing installation
to ensure a clean update, mirroring the dev-install.sh behavior.

Closes #435
2026-02-03 21:41:56 -05:00
github-actions[bot] e821a3bee6 chore(release): 7.34.1-dev.3 [skip ci] 2026-02-04 02:35:51 +00:00
Kai (Tam Nhu) TranandGitHub b565ef9980 Merge pull request #438 from kaitranntt/kai/fix/glmt-verbose-retry-logs
fix(glmt): gate retry rate limit logs behind verbose flag
2026-02-03 21:34:47 -05:00
kaitranntt 40caff13ad refactor(hooks): use provider_models mapping for image analysis
Changes ImageAnalysisConfig from providers array to provider_models
mapping for granular vision model control per CLIProxy provider.

Breaking change: config.yaml image_analysis section now uses
provider_models instead of providers/model fields.

Provider-to-model mappings:
- agy → gemini-2.5-flash
- gemini → gemini-2.5-flash
- codex → gpt-5.1-codex-mini
- kiro → kiro-claude-haiku-4-5
- ghcp → claude-haiku-4.5
- claude → claude-haiku-4-5-20251001

Hook checks CCS_CURRENT_PROVIDER against provider_models and skips
if no vision model configured for that provider.
2026-02-03 21:32:19 -05:00
kaitranntt 73824bc99e fix(glmt): gate retry rate limit logs behind verbose flag
Rate limit retry messages now only appear when verbose mode is enabled,
keeping test output clean while preserving debug capability.
2026-02-03 21:09:18 -05:00