Issue #37: When running `ccs` (default profile), users were unknowingly
using GLM API instead of their Claude subscription because:
1. config.json had `default: '~/.claude/settings.json'` entry
2. ProfileDetector treated this as settings-based profile
3. CCS passed `--settings ~/.claude/settings.json` flag to Claude
4. Any stale ANTHROPIC_* env vars in that file got applied
Fix (3-pronged approach):
- Remove `default` entry from new config.json template
- Add migration to remove existing `default: ~/.claude/settings.json`
- Add ProfileDetector safety net: if default points to ~/.claude/settings.json,
treat as pass-through to Claude's native auth (no --settings flag)
Now `ccs` (no profile) correctly uses Claude's native OAuth authentication
without loading potentially polluted env vars from previous sessions.
Closes#37
Problem: Test suite was directly modifying user's personal ~/.ccs/
directory, causing configuration interference during development.
Solution:
- Add test-environment.js fixture with CCS_HOME env var support
- Update postinstall.js to respect CCS_HOME for test isolation
- Update config-manager.ts with getCcsHome() helper
- Update postinstall.test.js and cli.test.js to use isolated env
- Remove auto-install of .claude/ symlinks from postinstall
(users can run "ccs sync" to opt-in)
Benefits:
- Tests run in temp directories, no user config affected
- Users control when .claude/ items are installed via "ccs sync"
- All 39 tests passing with proper isolation
Phase 05: Migrate test imports from bin/ to dist/
- Update 19 test files to import from dist/ instead of bin/
- Update CLI path in cli.test.js and special-commands.test.js
- Update cross-platform.test.js to check dist/ directory
Phase 06: Cleanup & validation
- Remove bin/ directory (32 JS files)
- Fix ClaudeSymlinkManager import in doctor.ts
- Update postinstall.js to use dist/ modules
- Regenerate package-lock.json (now points to dist/ccs.js)
All 39 tests passing. TypeScript migration complete.
* feat(shared): add plugin support to shared directories
Add Claude Code plugins to the .ccs/shared/ symlink architecture,
enabling plugin sharing across all CCS profiles (GLM, GLMT, Kimi, etc).
Changes:
- SharedManager: Add 'plugins' to sharedDirs array
- Help text: Update all three implementations (Node.js, bash, PowerShell)
- Postinstall: Create ~/.ccs/shared/plugins/ directory on install
Architecture:
~/.claude/plugins/ <- ~/.ccs/shared/plugins/ <- instance/plugins/
This follows the existing pattern for commands/skills/agents and
maintains cross-platform compatibility with Windows fallback support.
* chore: bump version to 4.3.6
* docs: update CHANGELOG for v4.3.6
- Remove 5 deprecated model fields from Kimi settings causing auth failures
- Update config/base-kimi.settings.json template with clean configuration
- Add automatic migration in scripts/postinstall.js to remove deprecated fields
- Preserve user API keys and custom settings during migration
- Update CHANGELOG.md with v4.1.1 and v4.1.2 entries
- Bump version to 4.1.2 across all files and installers
Fixes authentication issues with Moonshot AI (Kimi) API due to deprecated
model parameters that are now rejected by the service.
Fixes issue where npm install -g or ccs update would fail to copy
.claude/ directory to ~/.ccs/.claude/, causing symlink installation
errors. ClaudeDirInstaller now ensures source exists before
ClaudeSymlinkManager attempts linking.
- update require path from '../bin/shared-manager' to '../bin/management/shared-manager'
- fixes symlink creation failure in postinstall
- bump version to 3.4.4
- Add GLMT proxy server for GLM model routing
- Add GLMT transformer for output format conversion
- Update CLI with new proxy and transformer commands
- Add comprehensive test suite for new functionality
- Update documentation and architecture guides
- Bump version and update changelog
Fixed:
- Migration now runs during installation across all methods (npm, bash, PowerShell)
- Guarantees ~/.ccs/shared/ populated immediately with ~/.claude/ content
- Users no longer need to run ccs command to trigger migration
Changed:
- Refactored SharedManager with _needsMigration() and _performMigration() methods
- _copyDirectory() returns {copied, skipped} stats and preserves existing files
- Shows detailed migration output: '[OK] Migrated 5 commands, 19 skills'
- Removed lazy migration from bin/ccs.js, lib/ccs, lib/ccs.ps1
Implementation:
- npm: Migration in scripts/postinstall.js
- bash: Migration in installers/install.sh (migrate_shared_data function)
- PowerShell: Migration in installers/install.ps1 (Invoke-SharedDataMigration)
- Fixed arithmetic expansion with set -e (changed ((var++)) to var=$((var + 1)))
Cross-platform parity maintained across all installation methods.
Phase 1: Multi-profile shared data via symlinks
Added:
- SharedManager class for symlink orchestration (bin/shared-manager.js)
- Auto-migration from ~/.claude/ to ~/.ccs/shared/ on first run
- Shared directories: commands/, skills/, agents/
- Windows fallback: copies dirs if symlinks fail
Fixed:
- Migration logic now detects empty directories
- Previously skipped migration when postinstall created empty dirs
- Now properly copies from ~/.claude/ when shared dirs are empty
Changed:
- Instance initialization symlinks to shared dirs instead of copying
- Postinstall creates ~/.ccs/shared/ structure automatically
- All implementations (Node.js, bash, PowerShell) updated for consistency
- Help text includes agents/ in shared data section
Technical:
- Profile-specific data remains isolated (settings, sessions, todolists, logs)
- Migration is idempotent: safe to run multiple times
- Cross-platform symlink support with graceful fallback
Closes#4
- Add auto-recovery mechanisms for missing/corrupted configuration files
- Implement comprehensive health check command (`ccs doctor`)
- Enhance error messages with context-aware diagnostics and recovery commands
- Fix silent postinstall failures - now exits with proper error codes
- Add RecoveryManager class for automatic config restoration
- Add ErrorManager class for structured, helpful error messages
- Update postinstall script to validate created files and auto-create ~/.claude/settings.json
- Add doctor command support to bash and npm implementations
- Implement atomic file operations to prevent corruption
- Add comprehensive testing scenarios and validation
Fixes critical issue where npm install succeeded but CCS failed on first run.
Enhances user experience with automatic recovery and clear error guidance.
BREAKING CHANGE: Postinstall now exits with error code 1 on critical failures
- Add ANTHROPIC_SMALL_FAST_MODEL to all Kimi configuration templates
- Update installation scripts (npm, Unix, Windows) to include SMALL_FAST_MODEL
- Ensure Kimi API configuration matches official documentation format
- Bump version to 2.5.1 with updated changelog
Files updated:
- config/base-kimi.settings.json: Add SMALL_FAST_MODEL
- installers/install.sh: Update Unix template creation
- installers/install.ps1: Update PowerShell template creation
- scripts/postinstall.js: Update npm postinstall script
- All version files: Bump to 2.5.1
- Add kimi profile support alongside existing glm and default profiles
- Create base-kimi.settings.json configuration template
- Update all installation methods (npm, Unix, Windows) to auto-create Kimi settings
- Enhance documentation with Kimi examples and API setup instructions
- Update version to 2.5.0 with comprehensive changelog
- Add Kimi detection logic in install scripts for seamless migration
- Maintain backward compatibility with existing GLM and Claude profiles