mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 10:17:05 +00:00
When a user explicitly installs a specific CLIProxy version via `ccs cliproxy --install <version>`, this version should persist and not be auto-updated. Previously, subsequent commands would check for updates and overwrite the user's choice. Changes: - Add .version-pin file to persist user's explicit version choice - Update ensureCLIProxyBinary() to check for version pin and skip auto-update - Update --install command to save version pin with "(pinned)" confirmation - Update --latest command to clear version pin and enable auto-update - Add --update command as alias for --latest (for unpinning workflow) - Update status display to show "(pinned)" indicator when version is pinned - Update help text to document new pin/unpin behavior Closes #88
129 lines
3.0 KiB
TypeScript
129 lines
3.0 KiB
TypeScript
/**
|
|
* CLIProxy Module Exports
|
|
* Central export point for CLIProxyAPI binary management and execution
|
|
*/
|
|
|
|
// Types
|
|
export type {
|
|
PlatformInfo,
|
|
SupportedOS,
|
|
SupportedArch,
|
|
ArchiveExtension,
|
|
BinaryManagerConfig,
|
|
BinaryInfo,
|
|
DownloadProgress,
|
|
ProgressCallback,
|
|
ChecksumResult,
|
|
DownloadResult,
|
|
CLIProxyProvider,
|
|
CLIProxyConfig,
|
|
ExecutorConfig,
|
|
ProviderConfig,
|
|
ProviderModelMapping,
|
|
} from './types';
|
|
|
|
// Platform detection
|
|
export {
|
|
detectPlatform,
|
|
getDownloadUrl,
|
|
getChecksumsUrl,
|
|
getExecutableName,
|
|
getArchiveBinaryName,
|
|
isPlatformSupported,
|
|
getPlatformDescription,
|
|
CLIPROXY_VERSION,
|
|
} from './platform-detector';
|
|
|
|
// Binary management
|
|
export {
|
|
BinaryManager,
|
|
ensureCLIProxyBinary,
|
|
isCLIProxyInstalled,
|
|
getCLIProxyPath,
|
|
getInstalledCliproxyVersion,
|
|
installCliproxyVersion,
|
|
fetchLatestCliproxyVersion,
|
|
getPinnedVersion,
|
|
savePinnedVersion,
|
|
clearPinnedVersion,
|
|
isVersionPinned,
|
|
getVersionPinPath,
|
|
} from './binary-manager';
|
|
|
|
// Config generation
|
|
export {
|
|
generateConfig,
|
|
regenerateConfig,
|
|
configNeedsRegeneration,
|
|
getClaudeEnvVars,
|
|
getEffectiveEnvVars,
|
|
getProviderSettingsPath,
|
|
ensureProviderSettings,
|
|
getProviderConfig,
|
|
getModelMapping,
|
|
getCliproxyDir,
|
|
getProviderAuthDir,
|
|
getAuthDir,
|
|
getConfigPath,
|
|
getBinDir,
|
|
configExists,
|
|
deleteConfig,
|
|
CLIPROXY_DEFAULT_PORT,
|
|
CLIPROXY_CONFIG_VERSION,
|
|
} from './config-generator';
|
|
|
|
// Base config loader (for reading config/base-*.settings.json)
|
|
export {
|
|
loadBaseConfig,
|
|
getModelMappingFromConfig,
|
|
getEnvVarsFromConfig,
|
|
clearConfigCache,
|
|
} from './base-config-loader';
|
|
|
|
// Model catalog and configuration
|
|
export type { ModelEntry, ProviderCatalog } from './model-catalog';
|
|
export { MODEL_CATALOG, supportsModelConfig, getProviderCatalog, findModel } from './model-catalog';
|
|
export {
|
|
hasUserSettings,
|
|
getCurrentModel,
|
|
configureProviderModel,
|
|
showCurrentConfig,
|
|
} from './model-config';
|
|
|
|
// Executor
|
|
export { execClaudeWithCLIProxy, isPortAvailable, findAvailablePort } from './cliproxy-executor';
|
|
|
|
// Authentication
|
|
export type { AuthStatus } from './auth-handler';
|
|
export {
|
|
isAuthenticated,
|
|
getAuthStatus,
|
|
getAllAuthStatus,
|
|
clearAuth,
|
|
triggerOAuth,
|
|
ensureAuth,
|
|
getOAuthConfig,
|
|
getProviderTokenDir,
|
|
displayAuthStatus,
|
|
} from './auth-handler';
|
|
|
|
// Stats fetcher
|
|
export type { CliproxyStats } from './stats-fetcher';
|
|
export { fetchCliproxyStats, isCliproxyRunning } from './stats-fetcher';
|
|
|
|
// OpenAI compatibility layer
|
|
export type { OpenAICompatProvider, OpenAICompatModel } from './openai-compat-manager';
|
|
export {
|
|
listOpenAICompatProviders,
|
|
getOpenAICompatProvider,
|
|
addOpenAICompatProvider,
|
|
updateOpenAICompatProvider,
|
|
removeOpenAICompatProvider,
|
|
OPENROUTER_TEMPLATE,
|
|
TOGETHER_TEMPLATE,
|
|
} from './openai-compat-manager';
|
|
|
|
// Service manager (background CLIProxy for dashboard)
|
|
export type { ServiceStartResult } from './service-manager';
|
|
export { ensureCliproxyService, stopCliproxyService, getServiceStatus } from './service-manager';
|