- Import loadOrCreateUnifiedConfig to access cliproxy_server settings
- Pass remote/local config to resolveProxyConfig() function
- Enables CLI to detect remote mode from user's config.yaml
- Add rewriteLocalhostUrls() to detect and rewrite localhost URLs
- Support 127.0.0.1, localhost, 0.0.0.0 patterns
- Update getEffectiveEnvVars() to accept remoteRewriteConfig param
- Auto-rewrite saved settings URLs to remote server at runtime
- Add key prop to ProfileEditor to force remount on profile change
- Reset editorHasChanges on discard confirmation
- Add text-white to destructive dialog button
- Change OpenRouter default model to claude-opus-4.5
- Add runtime API response validation in remote-auth-fetcher
- Add AbortController cleanup to prevent state updates after unmount
- Validate postMessage origin matches iframe src before sending creds
- Mask auth token display (show ***last4) for security
- Reset error/connected state on refresh
- Fix port default to use protocol-based (443 for https, 80 for http)
- Normalize path in buildProxyUrl to ensure leading slash
- Add fallback for undefined email (default to 'Unknown')
- Extract timeout constant (REMOTE_FETCH_TIMEOUT_MS)
- Remove unused RemoteAuthFilesResponse interface
- Refactor stats-fetcher.ts: 5 functions now use getProxyTarget()
- Add remote-auth-fetcher.ts: fetch auth status from remote /v0/management/auth-files
- Update cliproxy-auth-routes.ts: branch on isRemote for GET routes
- Return 501 for account management in remote mode (unsupported)
Per OpenRouter requirements, explicitly blank out the Anthropic API key
to prevent conflicts when using OpenRouter's API. The key is visible in
the "Additional Variables" section of the profile editor.
Two fixes:
1. Move cliproxy_server section adjacent to cliproxy in config.yaml
for better organization and discoverability.
2. Fix URL building bug where port 8317 was being omitted from HTTP
URLs because it was incorrectly treated as "default port".
Before: http://192.168.2.84/v1/models (hits port 80)
After: http://192.168.2.84:8317/v1/models (hits correct port)
Now only standard web ports (80/443) are omitted from URLs.
CLIProxyAPI default port 8317 is always included.
This resolves "Connection refused" errors when testing remote proxy
connections that use the default CLIProxyAPI port.
- add provider-presets.ts with OpenRouter/GLM/GLMT/Kimi configs
- add --preset flag for quick profile creation
- auto-fill name, base URL, model from preset
- show preset info and API key hints
- update help with preset documentation and examples
- dev versions (X.Y.Z-dev.N) now treated as newer than base release (X.Y.Z)
- reflects convention that dev work is AFTER the release, not before
- update GH Actions message to use 'ccs update --dev' instead of npm install
- update tests to match new semantic
The cliproxy_server config was being loaded and merged with defaults
but never serialized to config.yaml. Added the missing section to
generateYamlWithComments() so remote proxy settings persist correctly.
Fixes save not persisting when configuring remote proxy settings in
the Dashboard > Proxy tab.
- Add DNS_FAILED and NETWORK_UNREACHABLE error codes
- Map "fetch failed" errors to NETWORK_UNREACHABLE for better UX
- Extract nested error cause for more accurate error detection
- Improve error messages with actionable hints
Fixes#142
- Change HTTP default port from 80 to 8317 (CLIProxyAPI default)
- Keep HTTPS default at 443 (standard SSL behind reverse proxy)
- Hide Local Proxy section when in Remote mode to reduce confusion
- add openrouter-catalog.ts with fetcher and 24h file cache
- add openrouter-picker.ts with interactive search UI
- detect OpenRouter URL in api-command.ts handleCreate()
- offer interactive browse when no --model flag provided
- support tier mapping configuration (opus/sonnet/haiku)
CLIProxyAPI doesn't expose a /health endpoint, causing 404 errors
when testing remote proxy connections. Changed to use /v1/models
which is always available and returns 200 when operational.
Fixes#142
- split 647-line ui.ts into 10 focused modules (<115 lines each)
- extract: colors, indicators, boxes, tables, text, spinner, tasks
- add init.ts for shared state and types.ts for interfaces
- ui.ts now re-exports from ui/index.ts for backward compat
- create utils/time.ts for centralized time formatting
- remove duplicate from auth/commands/types.ts
- re-export for backward compatibility
- export from utils/index.ts
- replace GeminiCliStatus, GrokCliStatus, OpenCodeCliStatus with type aliases
- use ComponentStatus from types/utils as single source of truth
- fix null vs undefined for optional fields
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 proxy-detector.ts for unified detection with multiple fallbacks:
- HTTP health check (most reliable)
- Session lock file check
- Port process detection with HTTP retry (handles Windows PID-XXXXX)
Add startup-lock.ts for file-based mutex:
- 10s timeout with 20 retries at 250ms intervals
- Stale lock detection via PID check
- Cross-platform support
Update cliproxy-executor.ts and service-manager.ts to use new modules.
Fixes race conditions when running simultaneous ccs commands.
- Import isReservedName from centralized reserved-names module
- Add validation to POST /api/profiles endpoint
- Add validation to POST /api/cliproxy/openai-compat endpoint
- Refactor hardcoded arrays to use centralized isReservedName()
- Fixes DRY violation and ensures consistent validation across all endpoints
Added validation to reject variant names that match reserved CLIProxy
provider names (gemini, codex, agy, qwen, iflow). Also protected reserved
provider settings files from being deleted when deleting variants.
This prevents accidental deletion of default provider configurations when
users create variants with conflicting names.
Presets now always include ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN
when applied to provider settings. This ensures CLIProxy routing works
correctly for Gemini, Codex, and Agy providers.
Also fixes settings save failing for new profiles by changing PUT
/api/settings/:profile to upsert behavior (create if not exists).