- bind real spawn/spawnSync/execSync before module mocking
- avoid potential rebinding recursion or mock passthrough drift in CI
- keeps non-Claude process execution untouched during test mocks
- register child_process module mock in beforeAll instead of module load
- keep passthrough for non-Claude commands and restore after suite
- avoids cross-suite side effects that stalled cursor daemon CI tests
- mock only Claude command spawns and pass through real child_process for others
- add missing ChildProcess-compatible fields (pid/unref) on mock child
- stabilizes cursor daemon and ccsd alias tests in CI parallel execution
- Sync kimi-k2.5 description between backend and UI catalogs
to 'Latest multimodal model (262K context)' per official naming
- Add kimi-k2 pricing entry to avoid fallback to unknown model rate
- Add supportsModelConfig and getProviderCatalog tests for kimi
Address review feedback from PR #585:
- Add missing kimi-k2 pricing entry ($0.60/$2.50, cache $0.15)
to avoid fallback to unknown model pricing
- Add kimi provider tests to model-catalog.test.js verifying
catalog structure, default model, and model IDs
- make iframe auto-login/reload flow race-safe and lint-compliant
- normalize API base joins and replace conflict sentinels with typed errors
- tighten proxy port validation and defer cursor preset apply until models load
- add ui api-client unit coverage for path and conflict helpers
- export buildProviderMap from provider capabilities and reuse in auth-types
- add provider descriptions to backend capabilities and sync display names
- remove ui CLIPROXY_PORT alias and use CLIPROXY_DEFAULT_PORT directly
- return stable string from getProviderDescription
- extend backend/ui parity tests for display name and description values
- make refresh ownership handling exhaustive in provider refresher
- extend backend/ui sync test to provider IDs and device-code providers
- remove DEFAULT_CURSOR_PORT re-export from use-cursor hook
- import cursor default port directly from shared defaults module
- add ui default port constants for cliproxy and cursor
- wire preset utils to shared ui default port constants
- add backend/ui sync test to prevent port drift
- resolve request model against current available catalog
- choose safe default when configured default id is not present
- add tests and docs for daemon request-model fallback behavior
- detect and de-duplicate unclassified quota window labels
- emit diagnostics in verbose/debug modes for API label drift
- add unit tests for unknown-label extraction behavior
- extend argv[0] target resolution with env-configurable aliases
- normalize alias matching to lowercase with safe-name filtering
- add tests for custom aliases, invalid entries, and case-insensitivity
- wrap adapter early-exit paths with a cleanup-aware exit helper
- invoke cleanup before exiting on child spawn failures
- validate Droid profile names in buildArgs and add unit coverage
- Add kimi to CLIPROXY_PROVIDER_IDS expected array
- Add kimi to device_code providers expected array
- Remove leftover >>>>>>> origin/dev merge conflict marker in cursor-daemon test
- Fix prettier formatting in image-analysis-check.ts
- unify CLIPROXY_SUPPORTED_PROVIDERS to import from CLIPROXY_PROVIDER_IDS
- replace 4 inline union types with CLIProxyProvider import
- replace hardcoded provider arrays in migration-manager and proxy-routes
- remove duplicate PROVIDER_DISPLAY_NAMES, use getProviderDisplayName()
- sync test now imports from ui/src/lib/provider-config instead of hardcoded array
Adding a new CLIProxy provider no longer requires updating 14+ hardcoded lists.
Implement target adapter pattern enabling CCS CLI to support multiple backend targets
(Claude, Droid) via pluggable adapters. Core additions:
- TargetAdapter interface for pluggable target implementations
- ClaudeAdapter and DroidAdapter concrete implementations
- Target registry (singleton Map-based storage)
- Target resolver with precedence: --target flag > per-profile config > busybox detection
- Droid config manager with atomic writes and file locking to ~/.factory/settings.json
- Droid binary detector to validate runtime environment
- Adapter dispatch integrated into ccs.ts main execution flow
- ccsd busybox alias for seamless Droid invocation
- --target flag documentation in help
- Session tracking enriched with target metadata
- Dashboard target badge for visual identification
Testing:
- 43 unit tests covering resolver, registry, config manager, and adapters
- Full coverage of target detection logic and edge cases
Documentation:
- Refactored system-architecture.md into modular docs/system-architecture/ subdirectory
- Updated code-standards.md with target adapter guidelines
- Updated codebase-summary.md with architecture overview
- Updated maintainability baseline (33.8% → 35.2%)
This establishes extensible foundation for multi-target support without breaking
existing Claude workflows. Droid adapter is production-ready but defaults to Claude
for backward compatibility.
- add cursor model fields to unified config defaults and YAML comments
- expand Cursor model catalog/defaults and return configured current model
- keep cursor.settings.json env model fields in sync with config updates
- align unit tests for new model defaults and route merge behavior
Refs #555