Files
ccs/.github/workflows
Tam Nhu (Kai) TranandGitHub f034c25a61 feat: implement native multi-account switching with isolated instances (#3)
* feat: implement native multi-account switching with isolated instances

Add account-based profile management system that enables users to run
multiple Claude accounts concurrently with complete isolation.

Key features:
- Profile registry (~/.ccs/profiles.json) tracks account profiles
- Instance isolation (~/.ccs/instances/<profile>/) for each account
- Auth commands: create, list, show, remove, default
- Backward compatible with settings-based profiles (GLM, Kimi)
- Auto-copies global .claude configs to new instances

Implementation:
- Phase 1: Profile detection logic (account vs settings-based)
- Phase 2: Instance management (initialization, validation)
- Phase 3: Auth CLI commands
- Phase 4: Profile registry CRUD operations
- Phase 5: Execution routing based on profile type

Both lib/ccs (bash) and lib/ccs.ps1 (PowerShell) updated for
cross-platform support.

* fix(ci): add pull_request trigger to satisfy branch protection

The branch protection rule requires "Deploy ccs-installer to CloudFlare"
status check to pass, but the workflow only ran on push to main branch.
This caused PRs to wait indefinitely for a status that never reported.

Changes:
- Add pull_request trigger with same path filters
- Split deployment into conditional steps:
  - PR mode: dry-run validation only (--dry-run flag)
  - Production: actual deployment (push to main only)
- Keeps same job name to satisfy branch protection requirement

Security:
- No deployment from PR branches (dry-run only)
- Production deploy only when push to main AND ref check
- Secrets used safely in both contexts

This fixes PR #3 which was stuck waiting for status.

* fix(ci): remove path filter from pull_request trigger

The path filter prevented workflow from running on PRs that don't
modify worker/installer files, causing required status check to
never report. This blocked PR #3 indefinitely.

Changes:
- Remove paths filter from pull_request trigger
- Keep paths filter on push to main (optimize deployments)
- Workflow now runs on ALL PRs to satisfy branch protection

Trade-off:
- PRs changing non-worker files will trigger unnecessary dry-run
- But this ensures required status check always reports
- Small cost for reliability and simpler configuration

Alternatives considered:
- Path-aware required checks: Not supported by GitHub
- Remove required check: Loses CI validation
- Add all paths to filter: Makes config brittle
2025-11-09 18:26:49 -05:00
..