import { Repository } from 'typeorm';
import { ApplicationState, SystemPrompt } from '../core-entities';
import { GlobalConfigService } from '../global-config/global-config.service';
export type SettingSource = 'project' | 'global' | 'default';
export interface SettingWithSource<T> {
    value: T;
    source: SettingSource;
}
export declare class ApplicationStateService {
    private applicationStateRepository;
    private systemPromptsRepository;
    private globalConfigService;
    private readonly instance;
    private effectiveSettingsCache;
    private effectiveSettingsCacheTime;
    private readonly EFFECTIVE_SETTINGS_TTL;
    constructor(applicationStateRepository: Repository<ApplicationState>, systemPromptsRepository: Repository<SystemPrompt>, globalConfigService: GlobalConfigService);
    private setState;
    private getState;
    private deleteState;
    private getEffectiveBoolean;
    private getEffectiveString;
    private getEffectiveNumber;
    private getEffectiveNullableString;
    getEffectiveSettings(): Promise<Record<string, SettingWithSource<unknown>>>;
    getProjectOverrides(): Promise<Record<string, string>>;
    clearOverride(key: string): Promise<void>;
    setActiveSessionId(sessionId: string): Promise<void>;
    getActiveSessionId(): Promise<string | null>;
    setWebsocketEnabled(enabled: boolean): Promise<void>;
    getWebsocketEnabled(): Promise<boolean>;
    getWebsocketEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setAutoContextFetchEnabled(enabled: boolean): Promise<void>;
    getAutoContextFetchEnabled(): Promise<boolean>;
    getAutoContextFetchEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setExecutionStrategy(strategy: string): Promise<void>;
    getExecutionStrategy(): Promise<string>;
    getExecutionStrategyWithSource(): Promise<SettingWithSource<string>>;
    setTheme(theme: string): Promise<void>;
    getTheme(): Promise<string>;
    setContextTokenLimit(limit: number): Promise<void>;
    getContextTokenLimit(): Promise<number>;
    getContextTokenLimitWithSource(): Promise<SettingWithSource<number>>;
    setYoloModeEnabled(enabled: boolean): Promise<void>;
    getYoloModeEnabled(): Promise<boolean>;
    getYoloModeEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setOpenrouterApiKey(apiKey: string): Promise<void>;
    getOpenrouterApiKey(): Promise<string | null>;
    getOpenrouterApiKeyWithSource(): Promise<SettingWithSource<string | null>>;
    setZaiApiKey(apiKey: string): Promise<void>;
    getZaiApiKey(): Promise<string | null>;
    getZaiApiKeyWithSource(): Promise<SettingWithSource<string | null>>;
    setAlibabaApiKey(apiKey: string): Promise<void>;
    getAlibabaApiKey(): Promise<string | null>;
    getAlibabaApiKeyWithSource(): Promise<SettingWithSource<string | null>>;
    setOllamaApiKey(apiKey: string): Promise<void>;
    getOllamaApiKey(): Promise<string | null>;
    getOllamaApiKeyWithSource(): Promise<SettingWithSource<string | null>>;
    trackUsedModel(modelId: string): Promise<void>;
    getRecentModels(): Promise<string[]>;
    setStreamingEnabled(enabled: boolean): Promise<void>;
    getStreamingEnabled(): Promise<boolean>;
    getStreamingEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setToolsEnabled(enabled: boolean): Promise<void>;
    getToolsEnabled(): Promise<boolean>;
    getToolsEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setSyntaxValidationEnabled(enabled: boolean): Promise<void>;
    getSyntaxValidationEnabled(): Promise<boolean>;
    getSyntaxValidationEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setYoloModeMessage(message: string): Promise<void>;
    getYoloModeMessage(): Promise<string>;
    getYoloModeMessageWithSource(): Promise<SettingWithSource<string>>;
    setFollowupTokenLimit(limit: number): Promise<void>;
    getFollowupTokenLimit(): Promise<number>;
    getFollowupTokenLimitWithSource(): Promise<SettingWithSource<number>>;
    getEffectiveFollowupTokenLimit(systemPromptId?: string | null): Promise<number>;
    setHistoryCompressionEnabled(enabled: boolean): Promise<void>;
    getHistoryCompressionEnabled(): Promise<boolean>;
    getHistoryCompressionEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setLlmRetryEnabled(enabled: boolean): Promise<void>;
    getLlmRetryEnabled(): Promise<boolean>;
    getLlmRetryEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    setLlmRetryMaxAttempts(attempts: number): Promise<void>;
    getLlmRetryMaxAttempts(): Promise<number>;
    getLlmRetryMaxAttemptsWithSource(): Promise<SettingWithSource<number>>;
    setOpenaiApiKey(apiKey: string): Promise<void>;
    getOpenaiApiKey(): Promise<string | null>;
    getOpenaiApiKeyWithSource(): Promise<SettingWithSource<string | null>>;
    setOpenaiBaseUrl(baseUrl: string): Promise<void>;
    setNotificationsEnabled(enabled: boolean): Promise<void>;
    getNotificationsEnabled(): Promise<boolean>;
    getNotificationsEnabledWithSource(): Promise<SettingWithSource<boolean>>;
    getOpenaiBaseUrl(): Promise<string | null>;
    getOpenaiBaseUrlWithSource(): Promise<SettingWithSource<string | null>>;
}
