/**
 * Settings Service
 *
 * Server-side key-value settings persisted to SQLite.
 * Used for workspace-wide configuration that needs to be accessible server-side,
 * such as default executable paths for agent providers.
 *
 * Settings are stored in the `settings` table as JSON-encoded values.
 */
import type { StorageBackend } from '@stoneforge/storage';
/**
 * A setting stored in the database
 */
export interface Setting {
    key: string;
    value: unknown;
    updatedAt: string;
}
/**
 * Agent defaults configuration
 */
export interface ServerAgentDefaults {
    /** Provider name → executable path (e.g. { claude: '/usr/local/bin/claude-dev' }) */
    defaultExecutablePaths: Record<string, string>;
    /** Ordered list of executable names/paths for rate limit fallback. When one hits its limit, the next available is used. */
    fallbackChain?: string[];
}
/**
 * Well-known setting keys
 */
export declare const SETTING_KEYS: {
    readonly AGENT_DEFAULTS: "agentDefaults";
};
export interface SettingsService {
    /**
     * Get a setting by key
     */
    getSetting(key: string): Setting | undefined;
    /**
     * Set a setting (upsert)
     */
    setSetting(key: string, value: unknown): Setting;
    /**
     * Delete a setting by key
     * @returns true if the setting existed and was deleted
     */
    deleteSetting(key: string): boolean;
    /**
     * Get agent defaults (convenience method)
     */
    getAgentDefaults(): ServerAgentDefaults;
    /**
     * Update agent defaults (convenience method)
     */
    setAgentDefaults(defaults: ServerAgentDefaults): ServerAgentDefaults;
}
export declare function createSettingsService(storage: StorageBackend): SettingsService;
//# sourceMappingURL=settings-service.d.ts.map