mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
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:
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user