feat(cliproxy): add auto_sync config option

- export sync module from cliproxy barrel
- add auto_sync field to CLIProxyConfig interface
This commit is contained in:
kaitranntt
2026-01-28 11:57:22 -05:00
parent 56500fee98
commit fc23afdfc7
2 changed files with 35 additions and 0 deletions
+31
View File
@@ -166,3 +166,34 @@ export {
THINKING_BUDGET_MAX,
THINKING_BUDGET_DEFAULT_MIN,
} from './thinking-validator';
// Management API client (for remote CLIProxy sync)
export type {
ClaudeKey,
ClaudeModel,
ManagementClientConfig,
ManagementHealthStatus,
ManagementApiErrorCode,
ClaudeKeyPatch,
SyncStatus,
} from './management-api-types';
export { ManagementApiClient, createManagementClient } from './management-api-client';
// Sync module (profile sync to remote CLIProxy)
export type { SyncableProfile, SyncPreviewItem, ModelAlias, ModelAliasConfig } from './sync';
export {
loadSyncableProfiles,
mapProfileToClaudeKey,
generateSyncPayload,
generateSyncPreview,
getSyncableProfileCount,
isProfileSyncable,
getModelAliasesPath,
loadModelAliases,
saveModelAliases,
getProfileAliases,
addProfileAlias,
removeProfileAlias,
listAllAliases,
DEFAULT_MODEL_ALIASES,
} from './sync';
+4
View File
@@ -132,6 +132,8 @@ export interface CLIProxyConfig {
auth?: CLIProxyAuthConfig;
/** Background token refresh worker settings */
token_refresh?: TokenRefreshSettings;
/** Auto-sync API profiles to local CLIProxy config on settings change (default: false) */
auto_sync?: boolean;
}
/**
@@ -259,6 +261,8 @@ export interface ProxyRemoteConfig {
management_key?: string;
/** Connection timeout in milliseconds (default: 2000) */
timeout?: number;
/** Enable auto-sync profiles to remote on settings change (default: false) */
auto_sync?: boolean;
}
/**