import { Disposable } from "../../../../../../base/common/lifecycle.js"; import { IObservable, IReader } from "../../../../../../base/common/observable.js"; import { IStorageService } from "../../../../../../platform/storage/common/storage.service.js"; import { IUserDataProfileService } from "../../../../../services/userDataProfile/common/userDataProfile.service.js"; import { IAgentHostToolSetEnablementService } from "./agentHostToolSetEnablementService.service.js"; /** * The Copilot CLI agent-host session type. Tool enablement is scoped per session type; this is the * only target for the Chat Customizations → Tools section today. */ export declare const AGENT_HOST_COPILOT_CLI_SESSION_TYPE = "agent-host-copilotcli"; /** * Whether a session type runs the Copilot CLI harness, locally or on a remote agent host. */ export declare function isCopilotCliSessionType(sessionType: string): boolean; /** * Tool / tool-set enablement state. Both maps are keyed by id and store only deviations from the * default ("enabled"). A tool's effective state resolves child → parent → default: * `tools[toolId] ?? toolSets[setId] ?? true`. Storing the tool-set default (rather than every * member) lets a disabled group also cover member tools that register later. */ export interface IToolEnablementState { readonly toolSets: ReadonlyMap; readonly tools: ReadonlyMap; } export type TriState = boolean | "mixed"; /** Whether `toolId`, as a member of `toolSetId`, is effectively enabled. */ export declare function isToolEnabledInSet(state: IToolEnablementState, toolSetId: string, toolId: string): boolean; /** Aggregate tri-state of a tool set, derived from its member tools' effective states. */ export declare function getToolSetTriState(state: IToolEnablementState, toolSetId: string, toolIds: readonly string[]): TriState; /** The subset of a tool set needed to count its enabled tools. {@link IToolSet} satisfies this shape. */ export interface ICountableToolSet { readonly id: string; readonly deprecated?: boolean; getTools(reader?: IReader): Iterable<{ readonly id: string; }>; } /** Counts the enabled tools across the non-deprecated tool sets surfaced in Chat Customizations → Tools. */ export declare function countEnabledCustomizationTools(toolSets: Iterable, state: IToolEnablementState, reader?: IReader): number; export declare class AgentHostToolSetEnablementService extends Disposable implements IAgentHostToolSetEnablementService { private readonly _storageService; readonly _serviceBrand: undefined; private readonly _state; constructor(_storageService: IStorageService, userDataProfileService: IUserDataProfileService); observe(sessionType: string): IObservable; getState(sessionType: string): IToolEnablementState; setToolSetEnabled(sessionType: string, toolSetId: string, toolIds: readonly string[], enabled: boolean): void; setToolEnabled(sessionType: string, toolSetId: string, toolId: string, enabled: boolean): void; private _setState; private _load; private _save; }