Skip to content

Conversation

@kaitranntt
Copy link
Owner

@kaitranntt kaitranntt commented Dec 23, 2025

Summary

  • Add port field to VariantConfig for per-variant port allocation
  • Implement getNextAvailablePort() to allocate unique ports (8318-8417)
  • Add getConfigPathForPort() for per-variant config files (config-{port}.yaml)
  • Update session-tracker with port-specific lock files (sessions-{port}.json)
  • Pass port to unregisterSession() for proper cleanup
  • Show port column in ccs cliproxy list output
  • Clean up port-specific files on variant removal

Each CLIProxy variant now runs on its own port, enabling true concurrent execution without session conflicts.

Test plan

  • Create multiple variants with ccs cliproxy create
  • Verify each variant gets unique port in config
  • Run multiple variants concurrently
  • Verify ccs cliproxy list shows port column
  • Remove variant and verify cleanup of port-specific files
- add port field to VariantConfig in types and unified-config-types - implement getNextAvailablePort() to allocate unique ports (8318-8417) - add getConfigPathForPort() for per-variant config files (config-{port}.yaml) - update session-tracker with port-specific lock files (sessions-{port}.json) - pass port to unregisterSession() for proper cleanup - show port column in `ccs cliproxy list` output - clean up port-specific files on variant removal Each CLIProxy variant now runs on its own port, enabling true concurrent execution without session conflicts.
- Add session lock cleanup on variant deletion (deleteSessionLockForPort) - Handle EPERM in isProcessRunning() to avoid false stale lock detection - Improve port exhaustion error with actionable guidance
Added baseProvider prop to ProviderEditor for model filtering. Variants now use their parent provider (e.g., 'agy') for filtering instead of the variant name (e.g., 'g3'), showing all available models.
Add 85 new tests covering port isolation feature: - Port allocation unit tests (getNextAvailablePort, boundary conditions) - Session tracker port-specific tests (sessions-{port}.json handling) - Config generator port tests (config-{port}.yaml handling) - Edge case tests (port exhaustion, stale cleanup, legacy migration) Update existing session-tracker tests to use port parameter for non-default port operations (testPort=18317), fixing test failures caused by port isolation changes.
- Use service layer for variant updates in PUT /api/cliproxy - Remove dead code from route-helpers.ts - Add port parameter to session tracking for isolation - Use getCcsDir() instead of os.homedir() for path consistency
…shboard - Resolve settings path from variant configuration instead of fixed pattern - Add port and model fields to Variant interface - Display port badge in ProviderEditor header for variants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants