- Extract shared _resolveCcsDir() to prevent getCcsDir/getCcsDirSource divergence
- Replace all hardcoded ~/.ccs/ and ~/.claude/ in recovery-manager.ts with
dynamic paths from instance properties (ccsDir, claudeDir, sharedDir, etc.)
- Add cloud sync detection for CCS_HOME env var (parity with CCS_DIR/--config-dir)
- Cache getSessionSecretPath() in local var in auth-middleware.ts
- Cache getCacheDir() in local var in disk-cache.ts ensureCacheDir()
Allow users to relocate the entire ~/.ccs/ directory via CCS_DIR env var
or --config-dir CLI flag. Precedence: --config-dir > CCS_DIR > CCS_HOME > default.
Includes cloud sync path detection warning and doctor diagnostics.
Closes#507
- Update checkAuthCodePorts() to filter from CLIPROXY_PROFILES
- Update header comment to list all OAuth ports including Claude
- Addresses PR #384 review round 3
- 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)
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
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()
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
* fix(doctor): use dynamic profile discovery for delegation check
Replace hardcoded ['glm', 'kimi'] list with DelegationValidator.getReadyProfiles()
to detect all configured *.settings.json profiles including mm, or1, g7, etc.
* fix(ci): exclude bot comments from triggering AI review
Bot progress comments were triggering new workflow runs,
which cancelled in-progress reviews due to concurrency group.
Added check for github.event.comment.user.type != 'Bot'.
* chore(release): 7.18.0-dev.1 [skip ci]
* fix(delegation): only check profiles defined in config.yaml
Previously getReadyProfiles() scanned all *.settings.json files,
including orphan files (ghcp, kiro) not in config.yaml.
Now reads from config.yaml:
- profiles section (excluding 'default')
- cliproxy.providers section
Fixes doctor showing 11 profiles instead of configured 9.
* chore(release): 7.18.0-dev.2 [skip ci]
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
Fixes#214 - Fresh install fails with 'Config not found' when running
ccs config before RecoveryManager runs.
Changes:
- Move RecoveryManager.recoverAll() before all early-exit commands in ccs.ts
- Fix loadConfigSafe() to return empty config instead of throwing in legacy mode
- Add getActiveConfigPath() for mode-aware config path resolution
- Rename cliproxy getConfigPath() to getCliproxyConfigPath() to avoid confusion
- Update help-command.ts to show correct config path based on mode
This ensures all commands benefit from auto-recovery on fresh installs,
and gracefully handles missing config files in all code paths.
- Check config.yaml first (v2 format), fallback to config.json (legacy)
- Make glm.settings.json and kimi.settings.json optional
- Only validate settings files if they exist
- Fix false positives: postinstall no longer creates these files
Fixes health check reporting errors for missing files that are now
optional and created on-demand when user configures a profile.
- setup-command.ts: Add Ctrl+C handling (UserCancelledError), port
validation (1-65535), protocol stripping from host, try-catch with
user-friendly error messages
- postinstall.js: Add ~/.ccs file check (not directory), wrap js-yaml
require in try-catch with JSON fallback, validate config.json before
migration, warn when both config files exist
- recovery-manager.ts: Verify config is loadable (not just exists),
add nested error handling for fallback write
- ccs.ts: Make first-time install hint independent of recovery status
(shows even when user manually created empty config.yaml)
All edge cases identified by code review addressed.
- Update postinstall.js to create config.yaml instead of config.json
- Update recovery-manager to create config.yaml as primary config
- Fix isFirstTimeInstall() to check for meaningful config content
(profiles, accounts, variants, oauth_accounts, remote proxy)
- Update validation to accept config.yaml OR config.json
- Preserve backward compatibility: legacy config.json is migrated
to config.yaml on first run via autoMigrate()
- Update postinstall tests to verify config.yaml creation
Fixes#142 - remote CLIProxyAPI configuration
- Update cliproxy-command.ts status output and install messages
- Update help-command.ts with Plus branding and new kiro/copilot providers
- Update doctor.ts header to show CLIPROXY PLUS
- Update cliproxy-check.ts binary check output
- Update proxy-status-widget.tsx label to CLIProxy Plus
- Point release URLs to CLIProxyAPIPlus repository
- Add kiro (port 8329) and copilot (port 8330) to auth-types
- Implement OAuth flows in oauth-handler
- Update token-manager to include new providers
- Add new providers to CLIPROXY_PROFILES
- Update diagnostics and API routes for new providers
Bun and pnpm block postinstall scripts by default for security.
This causes ~/.ccs/ directory to not be created on fresh install.
Added lazy initialization in RecoveryManager that mirrors postinstall.js:
- ensureSharedDirectories() - creates ~/.ccs/shared/ subdirs
- ensureGlmSettings() - creates glm.settings.json with defaults
- ensureGlmtSettings() - creates glmt.settings.json with thinking mode
- ensureKimiSettings() - creates kimi.settings.json with k2-thinking-turbo
- ensureShellCompletions() - installs completion files
- Fixed config.json to include glmt profile, removed deprecated default
Now any ccs command will auto-create full ~/.ccs/ structure on first run.
Fixes: bun add -g @kaitranntt/ccs not creating ~/.ccs/
- Add GitHub link button next to connection status for quick issue reporting
- Add 24H button on analytics page with hourly granularity chart
- Add /api/usage/hourly endpoint with date range filtering
- Add hourly data aggregation and caching (disk + memory)
- Fix timezone display: convert UTC hours to local time in chart
- Fix CLIProxy Stats card loading state synchronization
- Bump disk cache version to 3 (includes hourly data)
- Add stats-fetcher.ts for CLIProxy analytics integration
- Add openai-compat-manager.ts for model discovery and listing
- Add CLIProxy stats routes to web-server for real-time metrics
- Create cliproxy-stats-card component for analytics dashboard
- Add use-cliproxy-stats hook for data fetching
- Extend doctor.ts with CLIProxy health checks
- Update analytics page with CLIProxy usage metrics
Add environment and OAuth port diagnostics to help troubleshoot
authentication issues reported by Windows users:
- Add ENVIRONMENT section showing platform, SSH, TTY, browser capability
- Add OAUTH READINESS section with pre-flight port availability checks
- Fix Windows headless false positive (isTTY undefined on npm wrappers)
- Add pre-flight OAuth check before auth attempt to fail fast
New files:
- src/management/environment-diagnostics.ts
- src/management/oauth-port-diagnostics.ts
Case study: Vietnamese Windows users reported "command hangs" because
Windows terminal wrappers don't set isTTY correctly, triggering
headless mode when browser should be available.
- Add port-utils.ts module to detect which process occupies CLIProxy port
- Enhance doctor command to show specific process (PID/name) using port
- Distinguish between CLIProxy process vs other conflicting processes
- Support cross-platform detection (Windows netstat, Unix lsof)
- Provide actionable guidance when port conflict detected
This helps users identify if CLIProxy is already running or if another
application needs to be terminated to free up the port.
claude cli's atomic writes (toggle thinking, etc.) replace symlinks with
regular files, breaking the settings sync chain. this adds:
- `ccs doctor --fix` to detect and repair broken shared symlinks
- `ccs sync` now also repairs shared symlinks automatically
fixes#57