Commit Graph
1792 Commits
Author SHA1 Message Date
Kai (Tam Nhu) TranandGitHub 43cd19a52b fix(cliproxy): disable 1M extended context for opus 4.6 (256k limit) (#492)
* fix(cliproxy): disable 1M extended context for gemini-claude-opus-4-6-thinking

Antigravity backend only supports 256k context window for this model,
not 1M as previously declared. Set extendedContext: false with TODO
comment for easy re-enable when backend adds support.

Closes #490

* fix(cliproxy): strip [1m] suffix at runtime for models without extended context

Users with existing [1m] in saved agy.settings.json will now have it
automatically stripped at runtime when the model no longer supports
extended context. Prevents misleading context window claims.
2026-02-07 04:19:44 -05:00
github-actions[bot] 2599136876 chore(release): 7.39.0-dev.2 [skip ci] 2026-02-07 09:10:32 +00:00
Kai (Tam Nhu) TranandGitHub 545c8b9515 fix(cliproxy): guard against empty upstream SSE responses in agy profile (#489)
* fix(cliproxy): guard against empty upstream SSE responses in agy profile

When CLIProxyAPIPlus drops unsigned thinking blocks during sub-agent
execution, the response stream can contain no content_block_start or
message_delta events. This causes Claude Code CLI to crash with
"No assistant message found".

Add empty response detection in the tool sanitization proxy's streaming
handler. Both the pipe-through and SSE-processing paths now track
whether meaningful content was received. If upstream sent data but no
content blocks on a 200 OK, a synthetic minimal valid SSE response is
injected to prevent the client crash and surface a clear error message.

Closes #350

* fix(cliproxy): improve empty response detection and add tests

Address code review findings:
- Remove message_delta from content detection (lifecycle event, not
  content); only content_block_start indicates actual content
- Add try-catch in end handlers to handle client disconnects gracefully
- Add 3 integration tests: empty stream injection, normal stream
  passthrough, 4xx/5xx non-injection

* fix(cliproxy): avoid duplicate message_start in synthetic response

Track whether upstream already sent a message_start event. When
injecting the synthetic error response, omit message_start if upstream
already sent one, preventing duplicate events in the SSE stream.

Addresses PR review feedback from ccs-reviewer[bot].

* test(cliproxy): add SSE processing path and real failure mode tests

Address code review observations:
- Add test exercising SSE processing path (sanitized tool names) for
  empty response detection, ensuring both code paths are covered
- Add test mirroring real failure mode where upstream sends only
  message_start then ends abruptly (no message_delta/message_stop)
- Document duplicate message_start assumption with inline comment
2026-02-07 04:09:30 -05:00
github-actions[bot] 984e007468 chore(release): 7.39.0-dev.1 [skip ci] 2026-02-07 08:35:20 +00:00
Kai (Tam Nhu) TranandGitHub 215c00e983 feat(cliproxy): delegate kiro/ghcp token refresh to CLIProxyAPIPlus (#488)
CLIProxyAPIPlus already handles background token refresh for kiro (every
1 min via background_refresh.go) and other providers. CCS was incorrectly
returning "not implemented" errors for these providers, causing noisy
worker logs and preventing proper token expiry tracking.

Changes:
- Classify providers into CCS-managed (gemini), CLIProxy-delegated
  (codex, agy, kiro, ghcp, qwen, iflow), and not-implemented (claude)
- Delegated providers return success with delegated flag instead of error
- Skip refresh_token requirement for delegated providers in expiry checker
- Filter delegated providers from background worker refresh loop

Closes #487
2026-02-07 03:34:14 -05:00
github-actions[bot] 8172c65d1e chore(sync): merge main into dev after release [skip ci]
# Conflicts:
#	package.json
2026-02-07 05:06:12 +00:00
semantic-release-bot 5ed6fd9fa3 chore(release): 7.39.0 [skip ci]
## [7.39.0](https://github.com/kaitranntt/ccs/compare/v7.38.0...v7.39.0) (2026-02-07)

### Features

* hybrid CLIProxy catalog sync + agent teams env fix ([#486](https://github.com/kaitranntt/ccs/issues/486)) ([0b39493](https://github.com/kaitranntt/ccs/commit/0b394933aec723f77a552b7d951afaf065399a92)), closes [#485](https://github.com/kaitranntt/ccs/issues/485) [#477](https://github.com/kaitranntt/ccs/issues/477)
2026-02-07 05:05:37 +00:00
github-actions[bot] fe263707c7 chore(release): 7.38.0-dev.4 [skip ci] 2026-02-07 04:55:27 +00:00
kaitranntt ae482c58a5 Merge remote-tracking branch 'origin/main' into dev 2026-02-06 23:54:17 -05:00
Kai (Tam Nhu) TranGitHubCarlos Umanzorgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>semantic-release-bot
0b394933ae feat: hybrid CLIProxy catalog sync + agent teams env fix (#486)
* fix(teams): propagate CLAUDE_CONFIG_DIR to tmux session for agent teammates

When CCS launches Claude with CLAUDE_CONFIG_DIR pointing to the isolated
instance path, agent team teammates spawned via tmux split-window don't
inherit it because tmux creates new panes from its own session environment.
This causes teammates to use ~/.claude/ instead of ~/.ccs/instances/{profile}/,
creating a split-brain in shared state (tasks, teams, mailbox).

Sets key CCS env vars in the tmux session environment via `tmux setenv` so
all new panes inherit the correct config directory.

* refactor(teams): use spawnSync array args instead of execSync string

Avoids shell interpretation of env values by passing args as array
to spawnSync instead of interpolating into a shell command string.

* chore(release): 7.38.0-dev.1 [skip ci]

* feat(cliproxy): add hybrid catalog sync with CLIProxyAPI (#485)

* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* feat(cliproxy): add hybrid catalog sync with CLIProxyAPI

Add `ccs cliproxy catalog` command family for syncing model catalogs
from CLIProxyAPI's model-definitions endpoint. Cached locally with
24h TTL, merges remote models with static catalog preserving
broken/deprecated flags. Dashboard API endpoint at /api/cliproxy/catalog.

Closes #477

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>

* chore(reviewer): upgrade review model from opus 4.5 to opus 4.6

- update default model in code-reviewer.ts
- update REVIEW_MODEL, ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL
  in ai-review.yml workflow
- aligns reviewer with AGY model catalog default

* chore(release): 7.38.0-dev.2 [skip ci]

* fix(hooks): add image analysis env vars for settings-based profiles (#484)

* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* fix(hooks): add image analysis env vars for settings-based profiles

Image analysis hook was injected into settings files for API profiles
but the CCS_IMAGE_ANALYSIS_* env vars were never set, causing the hook
to skip. Add getImageAnalysisHookEnv() call to both settings-based and
GLMT proxy execution paths, matching CLIProxy profile behavior.

Closes #440

* fix(hooks): add hook env vars to copilot executor

Copilot profile had same gap as settings-based profiles: hooks installed
but webSearch/imageAnalysis env vars and CCS_PROFILE_TYPE never set.
Add missing env var injection matching other profile flows.

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>

* chore(release): 7.38.0-dev.3 [skip ci]

---------

Co-authored-by: Carlos Umanzor <cumanzor@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2026-02-06 23:54:03 -05:00
github-actions[bot] 6b7b20148d chore(release): 7.38.0-dev.3 [skip ci] 2026-02-07 04:40:28 +00:00
kaitranntt 6296691991 chore: resolve merge conflict in package.json (dev version) 2026-02-06 23:39:16 -05:00
b0dff7a148 fix(hooks): add image analysis env vars for settings-based profiles (#484)
* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* fix(hooks): add image analysis env vars for settings-based profiles

Image analysis hook was injected into settings files for API profiles
but the CCS_IMAGE_ANALYSIS_* env vars were never set, causing the hook
to skip. Add getImageAnalysisHookEnv() call to both settings-based and
GLMT proxy execution paths, matching CLIProxy profile behavior.

Closes #440

* fix(hooks): add hook env vars to copilot executor

Copilot profile had same gap as settings-based profiles: hooks installed
but webSearch/imageAnalysis env vars and CCS_PROFILE_TYPE never set.
Add missing env var injection matching other profile flows.

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2026-02-06 23:33:12 -05:00
github-actions[bot] 02df67c12f chore(release): 7.38.0-dev.2 [skip ci] 2026-02-07 04:21:38 +00:00
kaitranntt 42d68dde11 chore(reviewer): upgrade review model from opus 4.5 to opus 4.6
- update default model in code-reviewer.ts
- update REVIEW_MODEL, ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL
  in ai-review.yml workflow
- aligns reviewer with AGY model catalog default
2026-02-06 23:20:32 -05:00
c8a099509a feat(cliproxy): add hybrid catalog sync with CLIProxyAPI (#485)
* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* feat(cliproxy): add hybrid catalog sync with CLIProxyAPI

Add `ccs cliproxy catalog` command family for syncing model catalogs
from CLIProxyAPI's model-definitions endpoint. Cached locally with
24h TTL, merges remote models with static catalog preserving
broken/deprecated flags. Dashboard API endpoint at /api/cliproxy/catalog.

Closes #477

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2026-02-06 23:16:54 -05:00
github-actions[bot] 9e22018dee chore(release): 7.38.0-dev.1 [skip ci] 2026-02-07 02:15:26 +00:00
Kai (Tam Nhu) TranandGitHub 7be0676824 Merge pull request #483 from kaitranntt/fix/agent-teams-tmux-env
fix(teams): propagate CLAUDE_CONFIG_DIR to tmux session for agent teammates
2026-02-06 21:14:20 -05:00
kaitranntt 0f7d5f9757 refactor(teams): use spawnSync array args instead of execSync string
Avoids shell interpretation of env values by passing args as array
to spawnSync instead of interpolating into a shell command string.
2026-02-06 21:14:04 -05:00
Carlos Umanzorandkaitranntt db88290b91 fix(teams): propagate CLAUDE_CONFIG_DIR to tmux session for agent teammates
When CCS launches Claude with CLAUDE_CONFIG_DIR pointing to the isolated
instance path, agent team teammates spawned via tmux split-window don't
inherit it because tmux creates new panes from its own session environment.
This causes teammates to use ~/.claude/ instead of ~/.ccs/instances/{profile}/,
creating a split-brain in shared state (tasks, teams, mailbox).

Sets key CCS env vars in the tmux session environment via `tmux setenv` so
all new panes inherit the correct config directory.
2026-02-06 21:13:59 -05:00
semantic-release-bot e24d8d89e3 chore(release): 7.38.0 [skip ci]
## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)
2026-02-07 01:31:41 +00:00
Kai (Tam Nhu) TranGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b454834175 feat(release): v7.38.0 - Extended Context, Qwen Models, Bug Fixes (#480)
* fix(version): show active config path instead of deprecated config.json

The version command was using deprecated getConfigPath() which always
returned config.json path. Now uses getActiveConfigPath() which shows
config.yaml in unified mode or config.json in legacy mode.

* chore(release): 7.37.1-dev.1 [skip ci]

* fix(ui): use native dynamic import to fix Node 24 ESM/CJS interop

TypeScript compiles import() to require() when targeting CommonJS,
which breaks ESM packages like ora on Node 24. Use new Function()
to create native dynamic import at runtime, bypassing TS transform.

Closes #472

* chore(release): 7.37.1-dev.2 [skip ci]

* fix(env): strip ANTHROPIC_* from account/default profiles

Account and default profiles inherit process.env which may contain
stale ANTHROPIC_BASE_URL from prior CLIProxy sessions. This causes
ConnectionRefused errors when Claude tries to hit an unavailable proxy.

Settings-based profiles already handle this by explicitly injecting
their own ANTHROPIC_* values. This fix applies the same protection
to account/default profiles by stripping ANTHROPIC_* before spawn.

Closes #474

* test(env): add unit tests for stripAnthropicEnv

Address code review feedback from PR #475. Tests cover:
- Removing all ANTHROPIC_* keys
- Preserving non-ANTHROPIC keys
- Empty object handling
- Undefined value preservation
- Case sensitivity (only uppercase ANTHROPIC_)
- All ANTHROPIC_ prefixed variants stripped

* chore(release): 7.37.1-dev.3 [skip ci]

* feat(cliproxy): add extended context support for 1M token window

Add --1m and --no-1m flags to enable/disable 1M token context window.
Uses Claude Code's [1m] suffix mechanism.

Behavior:
- Gemini models: auto-enabled by default
- Claude models: opt-in with --1m flag
- New extendedContext field in model catalog

Also adds Claude Opus 4.6 to model catalog with extended context support.

Closes #103

* feat(ui): add extended context toggle in dashboard model config

- Add ExtendedContextToggle component for 1M token context window
- Add Claude Opus 4.6 (claude-opus-4-6-20260203) to model catalogs
- Mark Gemini and Claude models with extendedContext: true
- Toggle only appears when selected model supports extended context
- Auto-enabled info for native Gemini, opt-in info for Claude

Part of extended context feature implementation for issue #103.

* fix: address code review findings and CI failure

- Fix CI error: add missing 'provider' prop to ModelConfigSection
- Fix case sensitivity in applyExtendedContextSuffix
- Fix whitespace handling in stripModelSuffixes
- Handle --1m=value and --no-1m=value CLI patterns
- Add warning when --1m used on unsupported model
- Sync agy catalog: add extendedContext to gemini-3-pro-preview
- Extract isNativeGeminiModel to shared utility (DRY)
- Add 21 unit tests for extended-context-config

* fix(catalog): rename claude-opus-4-6-20260203 to claude-opus-4-6

* fix(ui): wire extended context toggle through component tree

- Add extendedContextEnabled and toggleExtendedContext to useProviderEditor hook
- Store setting as CCS_EXTENDED_CONTEXT env var in provider settings
- Pass props through provider-editor → model-config-tab → model-config-section
- Update UseProviderEditorReturn type with new properties

* fix(ui): apply [1m] suffix directly to model strings in settings

- Toggle now applies/strips [1m] suffix to all ANTHROPIC_*MODEL env vars
- Extended context detected by checking if any model has [1m] suffix
- Remove legacy CCS_EXTENDED_CONTEXT flag approach
- Add suffix utilities: applyExtendedContextSuffix, stripExtendedContextSuffix
- Raw Configuration now shows actual model values with [1m] suffix

* fix(qwen): update model catalog with correct context windows and tier mappings

- Update context window specs from official Alibaba docs:
  - Qwen3 Coder Plus: 1M context (was 32K)
  - Qwen3 Max: 256K context (flagship)
  - Qwen3 Coder Flash: fast code generation
- Fix preset mappings for Claude tier equivalence:
  - Opus → qwen3-max (flagship 256K)
  - Sonnet → qwen3-coder-plus (balanced 1M)
  - Haiku → qwen3-coder-flash (fast)
- Update provider descriptions to reflect 256K-1M context range
- Add all 7 Qwen models from CLIProxyAPI: qwen3-coder-plus, qwen3-max,
  qwen3-max-preview, qwen3-235b, qwen3-vl-plus, qwen3-coder-flash, qwen3-32b

Closes #478

* fix(ui): only apply [1m] suffix to ANTHROPIC_MODEL, fix toggle refresh

- Only ANTHROPIC_MODEL gets [1m] suffix, not tier mappings
- Strip [1m] when looking up model in catalog to prevent toggle disappearing
- Fix odd page refresh when toggling extended context

* chore(release): 7.37.1-dev.4 [skip ci]

* fix(ui): remove duplicate import in use-provider-editor

* chore: address PR review feedback - sync comment and unused import

* chore(release): 7.37.1-dev.5 [skip ci]

* feat(cliproxy): add Opus 4.6 to Antigravity model catalog (#482)

* feat(cliproxy): add Opus 4.6 to Antigravity model catalog

- Add gemini-claude-opus-4-6-thinking as new default agy model
- Update preset mappings to route opus tier to Opus 4.6
- Bump CLIProxy fallback versions to v6.8.2
- Keep Opus 4.5 as previous flagship option

* fix(cliproxy): include oauth-model-alias in config generation

Root cause: CLIProxy config.yaml was missing Opus 4.6 alias because:
1. CLIProxyPlus startup migration is disabled (intentional)
2. CCS config generator never wrote oauth-model-alias section
3. Existing users with outdated aliases got 502 on Opus 4.6

Fix:
- Add DEFAULT_ANTIGRAVITY_ALIASES to config generator
- Generate oauth-model-alias section in config.yaml template
- Preserve claude-api-key and custom aliases during regeneration
- Bump config version to v6 to trigger auto-regeneration
- Update model catalog tests for new model count

* fix(cliproxy): preserve YAML indentation in extractYamlSection

- Replace .trim() with regex to strip only leading/trailing newlines,
  preserving 2-space indent on claude-api-key children
- Skip standalone comments at col 0 in section boundary detection
- Update stale test description (4 → 5 models)

* chore(release): 7.37.1-dev.6 [skip ci]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-06 20:28:58 -05:00
semantic-release-bot 3e8957af8b chore(release): 7.37.1 [skip ci]
## [7.37.1](https://github.com/kaitranntt/ccs/compare/v7.37.0...v7.37.1) (2026-02-05)

### Bug Fixes

* **cliproxy:** fix discoverExistingAccounts test failures ([759f289](https://github.com/kaitranntt/ccs/commit/759f28911958689ff2b56f03409545b6fec81dec))
* **ui:** display device code for GitHub Copilot OAuth in Dashboard ([13f6c3f](https://github.com/kaitranntt/ccs/commit/13f6c3f14bd0d1c920e339b2486dcd6e37ce50f4)), closes [#460](https://github.com/kaitranntt/ccs/issues/460)

### Code Refactoring

* **cliproxy:** modularize top 4 giant files ([b149e25](https://github.com/kaitranntt/ccs/commit/b149e252ebe3fc355e3e47772de4820810b8000f))
* **ui:** address PR review feedback for device code auth ([a08d0cf](https://github.com/kaitranntt/ccs/commit/a08d0cfece85ebb8c5960ad66ee48131af6ded05))
2026-02-05 22:54:56 +00:00
Kai (Tam Nhu) TranandGitHub aea33ce50b Merge pull request #470 from kaitranntt/dev
feat(release): promote dev to main
2026-02-05 17:53:43 -05:00
github-actions[bot] d8375e7ab1 chore(release): 7.37.0-dev.2 [skip ci] 2026-02-05 20:52:32 +00:00
Kai (Tam Nhu) TranandGitHub 1b69e2f6ca Merge pull request #469 from kaitranntt/fix/460-ghcp-device-code-display
fix(ui): display device code for GitHub Copilot OAuth in Dashboard
2026-02-05 15:51:29 -05:00
kaitranntt a08d0cfece refactor(ui): address PR review feedback for device code auth
- Extract INITIAL_STATE constant to reduce code repetition (DRY)
- Remove duplicate success toast for device code flow
  (useDeviceCode already shows toast via deviceCodeCompleted WebSocket event)
- Replace 7 inline state reset objects with INITIAL_STATE reference
2026-02-05 15:37:18 -05:00
kaitranntt 13f6c3f14b fix(ui): display device code for GitHub Copilot OAuth in Dashboard
For Device Code OAuth providers (ghcp, qwen), switch from /start-url
to /start endpoint which spawns CLIProxyAPI binary and emits WebSocket
events with userCode. DeviceCodeDialog then displays the code properly.

Closes #460
2026-02-05 15:27:30 -05:00
github-actions[bot] 10b73542da chore(release): 7.37.0-dev.1 [skip ci] 2026-02-05 20:16:10 +00:00
Kai (Tam Nhu) TranandGitHub 95aa1d6ce3 Merge pull request #468 from kaitranntt/kai/refactor/top4-giant-files
refactor(cliproxy): modularize top 4 giant files
2026-02-05 15:15:03 -05:00
kaitranntt 759f289119 fix(cliproxy): fix discoverExistingAccounts test failures
- Skip saving registry when no new accounts discovered (prevents empty
  accounts.json creation for invalid files)
- Skip merging empty provider sections to prevent empty provider entries
- Update test module cache clearing to include new modular submodules
  (accounts/registry, accounts/index) for proper test isolation
2026-02-05 15:09:47 -05:00
kaitranntt b149e252eb refactor(cliproxy): modularize top 4 giant files
Split 4 files exceeding 900 lines into focused modules:

- account-manager.ts (961 → 56 lines): 6 modules in accounts/
  - registry, query, bulk-ops, token-file-ops, types, index
- config-generator.ts (981 → 16 lines): 6 modules in config/
  - generator, port-manager, env-builder, thinking-config, path-resolver, index
- cliproxy-executor.ts (1,180 → 21 lines): 5 modules in executor/
  - index, lifecycle-manager, env-resolver, retry-handler, session-bridge
- cliproxy-command.ts (1,297 → 10 lines): 8 modules in commands/cliproxy/
  - index, auth, quota, variant, install, help, proxy-lifecycle subcommands

Total: 4,419 → 103 lines in original files (97.7% reduction)

Backward compatibility maintained via re-export shims.
Edge case fixes: CLI validation, thinking fallback, provider warning.

BREAKING CHANGES: None - all exports preserved via barrel re-exports.
2026-02-05 15:00:02 -05:00
semantic-release-bot 237f91ff69 chore(release): 7.37.0 [skip ci]
## [7.37.0](https://github.com/kaitranntt/ccs/compare/v7.36.0...v7.37.0) (2026-02-05)

### Features

* **oauth:** add interactive mode prompt for VPS/headless environments ([7a1b4d6](https://github.com/kaitranntt/ccs/commit/7a1b4d6f20176957892e217979062ba542e90343)), closes [#461](https://github.com/kaitranntt/ccs/issues/461)
* **oauth:** add interactive mode prompt for VPS/headless environments ([#462](https://github.com/kaitranntt/ccs/issues/462)) ([2777202](https://github.com/kaitranntt/ccs/commit/2777202caa37db8c48f116ad256a3c183bb7eb1c)), closes [#461](https://github.com/kaitranntt/ccs/issues/461)

### Bug Fixes

* **auth:** show command checks unified config for accounts ([0e140f8](https://github.com/kaitranntt/ccs/commit/0e140f83e40e1f21b3c52504e85639c90435e61e)), closes [#458](https://github.com/kaitranntt/ccs/issues/458)
* **cliproxy:** add NO_PROXY support and error handling for proxy URLs ([bcde5f4](https://github.com/kaitranntt/ccs/commit/bcde5f4878731d45f4867d52300dcca623e0915f))
* **cliproxy:** respect http_proxy env vars for binary downloads ([9c527b7](https://github.com/kaitranntt/ccs/commit/9c527b7d1501deb9aefff6ab95debb18adee87f0)), closes [#266](https://github.com/kaitranntt/ccs/issues/266)
* **cliproxy:** sanitize MCP tool input_schema to remove non-standard properties ([#459](https://github.com/kaitranntt/ccs/issues/459)) ([f8c179f](https://github.com/kaitranntt/ccs/commit/f8c179f6da47f6a0d0cb65fe3be12ea44a05bdef)), closes [#456](https://github.com/kaitranntt/ccs/issues/456)
* **dashboard:** delete accounts from unified config mode ([8d5f7d2](https://github.com/kaitranntt/ccs/commit/8d5f7d2d8365bc8b02d3c0b72c4945673580b090)), closes [#455](https://github.com/kaitranntt/ccs/issues/455)
* **doctor:** use cmd.exe compatible quoting for Windows shell execution ([ff92c66](https://github.com/kaitranntt/ccs/commit/ff92c66b64cb902e6faf9cc54f2973a96d29173a))
* **shell:** escape ! for cmd.exe delayed expansion ([61bc54a](https://github.com/kaitranntt/ccs/commit/61bc54af0504d21bdf1e6a7e29dcf9ef322b89c7))
* **shell:** escape cmd.exe special chars (%, ^, newlines) ([ed91f21](https://github.com/kaitranntt/ccs/commit/ed91f21994a3aa35a9e40539015676466b794144))
* **ui:** allow backend switching in remote mode ([28e776d](https://github.com/kaitranntt/ccs/commit/28e776d58e7b738a7fbedacb5385c0c423196cea)), closes [#463](https://github.com/kaitranntt/ccs/issues/463)

### Tests

* **cliproxy:** add comprehensive proxy support unit tests ([713ee93](https://github.com/kaitranntt/ccs/commit/713ee936065d6b1f7f61a9aa07282c5f82d81774))
* **shell:** add unit tests for escapeShellArg ([48aa3cc](https://github.com/kaitranntt/ccs/commit/48aa3cca30b2c5e7ff0b5faff865918759b048d1))
2026-02-05 16:32:33 +00:00
Kai (Tam Nhu) TranandGitHub 93e9409548 Merge pull request #467 from kaitranntt/dev
feat: release v7.36.0 with shell escaping, backend switching, and quota improvements
2026-02-05 11:31:22 -05:00
github-actions[bot] 69ad62a47a chore(release): 7.36.0-dev.6 [skip ci] 2026-02-05 16:00:56 +00:00
Kai (Tam Nhu) TranandGitHub f866441715 Merge pull request #466 from kaitranntt/kai/fix/doctor-claude-detection
fix(doctor): use cmd.exe compatible quoting for Windows shell execution
2026-02-05 10:59:50 -05:00
kaitranntt 61bc54af05 fix(shell): escape ! for cmd.exe delayed expansion
Adds defensive escaping for exclamation marks in case delayed
expansion is enabled in the user's cmd.exe environment.
2026-02-05 10:45:07 -05:00
kaitranntt 48aa3cca30 test(shell): add unit tests for escapeShellArg
- 11 tests covering Unix and Windows escaping behavior
- Tests for quotes, percent signs, carets, newlines, tabs
- Fixes comment inaccuracy (backslash → doubling)
2026-02-05 10:36:55 -05:00
kaitranntt ed91f21994 fix(shell): escape cmd.exe special chars (%, ^, newlines)
Additional hardening for Windows shell escaping:
- Escape % as %% to prevent variable expansion
- Escape ^ as ^^ to prevent escape sequence interpretation
- Replace newlines/tabs with space to prevent parsing errors
2026-02-05 10:32:31 -05:00
kaitranntt ff92c66b64 fix(doctor): use cmd.exe compatible quoting for Windows shell execution
The escapeShellArg function was using PowerShell-style single quotes,
but spawn({ shell: true }) uses cmd.exe by default on Windows.
cmd.exe does not recognize single quotes as string delimiters,
causing 'claude' '--version' to fail.

Changed to use double quotes which work correctly in cmd.exe.
2026-02-05 10:24:43 -05:00
github-actions[bot] 8f33234602 chore(release): 7.36.0-dev.5 [skip ci] 2026-02-05 02:45:44 +00:00
Kai (Tam Nhu) TranandGitHub f8e411c772 Merge pull request #464 from kaitranntt/kai/fix/463-backend-switch-remote
fix(ui): allow backend switching in remote mode
2026-02-04 21:44:39 -05:00
kaitranntt 28e776d58e fix(ui): allow backend switching in remote mode
When in Remote mode, local proxy running status no longer blocks
backend switching. Introduced `isBackendSwitchBlocked` computed
variable that only evaluates true in Local mode with running proxy.

Closes #463
2026-02-04 21:36:20 -05:00
github-actions[bot] 4c5030dd62 chore(release): 7.36.0-dev.4 [skip ci] 2026-02-05 01:55:18 +00:00
Kai (Tam Nhu) TranandGitHub 2777202caa feat(oauth): add interactive mode prompt for VPS/headless environments (#462)
- Add promptOAuthModeChoice() for headless OAuth mode selection
- Add --port-forward flag to force port-forwarding mode
- Add conflict detection for --paste-callback + --port-forward
- Handle edge cases: Ctrl+C, invalid input, non-TTY stdin
- Update help docs with new flag

Closes #461
2026-02-04 20:54:13 -05:00
kaitranntt 7a1b4d6f20 feat(oauth): add interactive mode prompt for VPS/headless environments
- Add promptOAuthModeChoice() for headless OAuth mode selection
- Add --port-forward flag to force port-forwarding mode
- Add conflict detection for --paste-callback + --port-forward
- Handle edge cases: Ctrl+C, invalid input, non-TTY stdin
- Update help docs with new flag

Closes #461
2026-02-04 20:47:19 -05:00
github-actions[bot] 2486b3f59e chore(release): 7.36.0-dev.3 [skip ci] 2026-02-05 01:21:05 +00:00
Kai (Tam Nhu) TranandGitHub f8c179f6da fix(cliproxy): sanitize MCP tool input_schema to remove non-standard properties (#459)
Squash merge PR #459: MCP tool input_schema sanitization

Fixes #456 - Gemini/Vertex APIs reject non-standard JSON Schema properties from MCP tools

Changes:
- Add allowlist-based schema sanitizer for JSON Schema Draft-07 keywords
- Recursive sanitization with circular ref protection and depth limit
- Handle all schema containers: properties, items, additionalProperties, additionalItems, oneOf/anyOf/allOf, not, if/then/else, $defs, definitions, patternProperties, contains, propertyNames, dependencies
- 22 unit tests covering edge cases
- Integrates into ToolSanitizationProxy pipeline before tool name sanitization
2026-02-04 20:19:58 -05:00
github-actions[bot] dbb6ae8da3 chore(release): 7.36.0-dev.2 [skip ci] 2026-02-04 23:18:41 +00:00
Kai (Tam Nhu) TranandGitHub d39d0dbcca Merge pull request #457 from kaitranntt/kai/fix/455-dashboard-delete-unified
fix(dashboard): delete accounts from unified config mode
2026-02-04 18:17:33 -05:00