import { CustomizationEnablementKind, type CustomizationEnablement, type SkillCustomization } from "./state/protocol/state.js"; /** * Effective enablement when no explicit decision exists at any scope. It is * also the value compared before persisting a decision, so decisions matching * their inherited value are never written. */ export declare const DEFAULT_CUSTOMIZATION_ENABLED = true; export type CustomizationDisabledReason = { readonly source: "scope"; readonly scope: CustomizationEnablementKind; } | { readonly source: "plugin"; readonly plugin: { readonly id: string; readonly name: string; readonly uri: string; readonly clientId?: string; readonly enablement?: readonly CustomizationEnablement[]; }; }; /** Returns the decisive explicit enablement decision, if one exists. */ export declare function getCustomizationEnablementDecision(customization: { readonly enablement?: readonly CustomizationEnablement[]; }): CustomizationEnablement | undefined; /** * Effective enablement of a customization, derived from its explicit decisions. * The most specific decision is first, so `enablement[0]` decides; no explicit * decision anywhere means enabled. */ export declare function isCustomizationEnabled(customization: { readonly enablement?: readonly CustomizationEnablement[]; }): boolean; /** Returns whether a skill should be offered for direct user invocation. */ export declare function isSkillEligibleForUserInvocation(skill: SkillCustomization): boolean; export interface ICustomizationScopeEnablement { readonly global: boolean; readonly workspace: boolean; readonly session: boolean; } /** * Resolves the value each scope would inherit if it had no explicit decision. */ export declare function getCustomizationScopeEnablement(customization: { readonly enablement?: readonly CustomizationEnablement[]; }): ICustomizationScopeEnablement; /** * Returns the published reason when a customization or its containing plugin is * disabled. The plugin takes precedence because its child cannot take effect * until the plugin is enabled again. */ export declare function getCustomizationDisabledReason(customization: { readonly enablement?: readonly CustomizationEnablement[]; }, plugin?: { readonly id: string; readonly name: string; readonly uri: string; readonly clientId?: string; readonly enablement?: readonly CustomizationEnablement[]; }): CustomizationDisabledReason | undefined; /** Sorts enablement decisions from most to least specific, stably within each scope. */ export declare function sortCustomizationEnablement(enablement: readonly CustomizationEnablement[]): CustomizationEnablement[]; /** Replaces all decisions for one scope and returns the complete sorted decision set. */ export declare function withCustomizationEnablement(current: readonly CustomizationEnablement[] | undefined, kind: CustomizationEnablementKind, entry: CustomizationEnablement | readonly CustomizationEnablement[] | undefined): CustomizationEnablement[];