import { IObservable, IReader, ITransaction } from "../../../../../base/common/observable.js"; import { URI } from "../../../../../base/common/uri.js"; import { IStorageService } from "../../../../../platform/storage/common/storage.service.js"; import { IUserDataProfileService } from "../../../../services/userDataProfile/common/userDataProfile.service.js"; import { AgentPluginDiscoveryPriority, IAgentPlugin } from "./agentPluginService.js"; import { IAgentPluginEnablementService } from "./agentPluginService.service.js"; import { CollisionEnablementModel, ContributionEnablementState, EnablementModel, IEnablementModel } from "../enablement.js"; export { IAgentPluginEnablementService }; export declare class AgentPluginEnablementService extends EnablementModel implements IAgentPluginEnablementService { readonly _serviceBrand: undefined; private readonly _identities; private readonly _copiedIdentities; constructor(storageService: IStorageService, userDataProfileService: IUserDataProfileService); readEnabled(key: string, reader?: IReader): ContributionEnablementState; readProfileEnabled(key: string, reader?: IReader): boolean; setEnabled(key: string, state: ContributionEnablementState, tx?: ITransaction): void; setDefaultEnabled(key: string, enabled: boolean, tx?: ITransaction): void; remove(key: string): void; private _getIdentity; copyEnablement(source: URI, target: URI): void; } export interface IDiscoveredAgentPlugins { readonly plugins: readonly IAgentPlugin[]; readonly priority: AgentPluginDiscoveryPriority; readonly order: number; } export declare class AgentPluginCollisionEnablementModel extends CollisionEnablementModel { private readonly collisionGroups; private readonly policyEnablement?; constructor(base: IEnablementModel, collisionGroups: IObservable>, policyEnablement?: IObservable> | undefined); canSetEnabled(key: string, state: ContributionEnablementState): boolean; setEnabled(key: string, state: ContributionEnablementState, tx?: ITransaction): void; } export declare function getSortedAgentPlugins(discoveries: readonly IDiscoveredAgentPlugins[]): readonly IAgentPlugin[]; export declare function getCanonicalAgentPluginCollisionGroups(discoveries: readonly IDiscoveredAgentPlugins[], isBlocked?: (plugin: IAgentPlugin) => boolean, isForceEnabled?: (plugin: IAgentPlugin) => boolean): ReadonlyMap; /** * Whether the `ChatEnabledPlugins` enterprise policy explicitly blocks this plugin. * * The policy is a **deny list**, not an allowlist: enterprise-managed `enabledPlugins` entries * add to (never replace) the plugins a user has installed. A plugin is blocked only when its * policy id is mapped to `false`; entries mapped to `true` enable the plugin, and a plugin the * policy never mentions is left to the user's own enablement. This keeps a customer's existing * plugins working when their enterprise deploys `enabledPlugins` for a different plugin. */ export declare function isAgentPluginBlockedByPolicy(plugin: IAgentPlugin, enabledPluginsPolicy: Record | undefined): boolean; export declare function isAgentPluginForceEnabledByPolicy(plugin: IAgentPlugin, enabledPluginsPolicy: Record | undefined): boolean; export declare function getAgentPluginPolicyEnablement(plugin: IAgentPlugin, enabledPluginsPolicy: Record | undefined): boolean | undefined; export declare function getAgentPluginPolicyId(plugin: IAgentPlugin): string | undefined;