/**
 * @license
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { SettingScope, type LoadableSettingScope, type LoadedSettings } from '../config/settings.js';
export interface ModifiedScope {
    scope: SettingScope;
    path: string;
}
export type FeatureActionStatus = 'success' | 'no-op' | 'error';
export interface FeatureActionResult {
    status: FeatureActionStatus;
    featureName: string;
    action: 'enable' | 'disable';
    /** Scopes where the feature's state was actually changed. */
    modifiedScopes: ModifiedScope[];
    /** Scopes where the feature was already in the desired state. */
    alreadyInStateScopes: ModifiedScope[];
    /** Error message if status is 'error'. */
    error?: string;
}
/**
 * Strategy pattern to handle differences between feature types (e.g. skills vs agents).
 */
export interface FeatureToggleStrategy {
    /**
     * Checks if the feature needs to be enabled in the given scope.
     * For skills (blacklist): returns true if in disabled list.
     * For agents (whitelist): returns true if NOT explicitly enabled (false or undefined).
     */
    needsEnabling(settings: LoadedSettings, scope: LoadableSettingScope, featureName: string): boolean;
    /**
     * Applies the enable change to the settings object.
     */
    enable(settings: LoadedSettings, scope: LoadableSettingScope, featureName: string): void;
    /**
     * Checks if the feature is explicitly disabled in the given scope.
     * For skills (blacklist): returns true if in disabled list.
     * For agents (whitelist): returns true if explicitly set to false.
     */
    isExplicitlyDisabled(settings: LoadedSettings, scope: LoadableSettingScope, featureName: string): boolean;
    /**
     * Applies the disable change to the settings object.
     */
    disable(settings: LoadedSettings, scope: LoadableSettingScope, featureName: string): void;
}
/**
 * Enables a feature by ensuring it is enabled in all writable scopes.
 */
export declare function enableFeature(settings: LoadedSettings, featureName: string, strategy: FeatureToggleStrategy): FeatureActionResult;
/**
 * Disables a feature in the specified scope.
 */
export declare function disableFeature(settings: LoadedSettings, featureName: string, scope: SettingScope, strategy: FeatureToggleStrategy): FeatureActionResult;
