Commit Graph
5 Commits
Author SHA1 Message Date
kaitranntt 0a1cbcc612 fix(cliproxy): use backend-specific GitHub repos for version fetching
Root cause: fetchLatestVersion and fetchAllVersions were hardcoded to
CLIProxyAPIPlus repo, ignoring backend selection.

Changes:
- Add getGitHubApiUrls(backend) helper to types.ts
- Make fetchLatestVersion and fetchAllVersions backend-aware
- Make version list cache backend-specific (bin/{backend}/.version-list-cache.json)
- Update /api/cliproxy/versions route to use configured backend
- Allow version management even when proxy not running (ProxyStatusWidget)
- Show settings button in all states for easier access
2026-01-23 14:55:51 -05:00
kaitranntt a41fd2a093 fix(cliproxy): make version cache backend-specific for proper switching
- Add backend parameter to version cache functions (read/write/path)
- Store cache at bin/{backend}/.version-cache.json instead of shared location
- Pass backend through checkForUpdates() and BinaryManager
- Add refetchType: 'all' to force immediate query refetch on backend change
- Add cliproxy-server-config query invalidation for consistency
2026-01-23 14:40:40 -05:00
kaitranntt 628148c359 fix(cliproxy): make backend switching work with version pins and status
- Add backend param to isCLIProxyInstalled(), getCLIProxyPath(),
  getInstalledCliproxyVersion(), installCliproxyVersion()
- Update getBinaryStatus() to pass backend to all helper functions
- Add getBackendLabel() helper for dynamic CLI messages
- Replace hardcoded "CLIProxy Plus" strings with dynamic labels
- Pass --backend flag through install/update command handlers
- Import CLIProxyBackend type from types.ts instead of redefining

Setting `cliproxy.backend: original` in config.yaml now correctly
uses the original backend for version pins and binary operations.
2026-01-23 10:52:01 -05:00
kaitranntt a69b2e9d10 feat(cliproxy): add version management UI with install/restart controls
Implements comprehensive version management for CLIProxyAPI Plus:

Backend APIs:
- GET /versions: fetch available versions from GitHub releases
- POST /install: install specific version with force flag for unstable
- POST /restart: restart proxy without version change

Frontend:
- 4-button layout: Restart, Update/Downgrade, Stop, Settings gear
- Collapsible version picker with dropdown + manual input
- Confirmation dialog for unstable versions (>6.6.80)
- Progressive disclosure (version picker hidden by default)

Ref: plans/260105-1250-cliproxy-version-management/
2026-01-05 13:12:46 -05:00
kaitranntt d3c94fe6a2 refactor(cliproxy): modularize binary-manager into binary/ directory
- extract types, version-checker, lifecycle, updater, installer

- extract downloader (verifier), extractors (tar, zip), version-cache

- slim binary-manager.ts from 1080 to 137 lines (87% reduction)

- add barrel export at binary/index.ts
2025-12-19 12:34:48 -05:00