import { CancellationToken } from "../../../../../../base/common/cancellation.js"; import { URI } from "../../../../../../base/common/uri.js"; import { type AgentCustomization } from "../../../../../../platform/agentHost/common/state/protocol/state.js"; import { type ClientPluginCustomization } from "../../../../../../platform/agentHost/common/state/sessionState.js"; import { AICustomizationSource } from "../../../common/aiCustomizationWorkspaceService.js"; import { PromptsType } from "../../../common/promptSyntax/promptTypes.js"; import { PromptsStorage } from "../../../common/promptSyntax/service/promptsService.js"; import { IPromptsService } from "../../../common/promptSyntax/service/promptsService.service.js"; import { type ICustomizationSyncProvider } from "../../../common/customizationHarnessService.js"; import { IAgentPluginService } from "../../../common/plugins/agentPluginService.service.js"; import { IMcpService } from "../../../../mcp/common/mcpTypes.service.js"; import { IConfigurationResolverService } from "../../../../../services/configurationResolver/common/configurationResolver.service.js"; import { type ISyncableMcpServer, type SyncedCustomizationBundler } from "./syncedCustomizationBundler.js"; import { IFileService } from "../../../../../../platform/files/common/files.service.js"; /** * Prompt types that participate in auto-sync to an agent host harness. * * Hooks are intentionally excluded — bundling hooks requires merging into * `hooks/hooks.json` (see {@link SyncedCustomizationBundler}). */ export declare const SYNCABLE_PROMPT_TYPES: readonly PromptsType[]; /** * Storage sources whose contents are auto-synced by default. Remote agent * registrations can additionally include user storage. * * `builtin` only yields skills bundled with the Agents app (e.g. `/create-pr`, * `/merge`); for every other prompt type the prompts service returns nothing, * and in the regular VS Code workbench window it returns nothing at all. */ export declare const SYNCABLE_STORAGE_SOURCES: readonly PromptsStorage[]; export interface ILocalCustomizationSyncOptions { readonly includeUserStorage?: boolean; } export interface ILocalCustomizationFile { readonly uri: URI; readonly type: PromptsType; readonly source: AICustomizationSource; readonly disabled: boolean; readonly pluginUri?: URI; readonly extensionId?: string; } /** * Enumerates all local customization files eligible for auto-sync to an * agent host harness, annotating each with whether the user has opted out. * * This is the single source of truth used by both the AI Customization view * (to render disable affordances) and the agent host wire (to compute the * `customizations` set published via `activeClientSet`). * * Non-default configured agent, skill, and instruction locations are adapted * into client customizations; default locations remain host-discovered. * * Built-in skills bundled with the Agents app (only present when the * sessions-aware prompts service is in play) are also enumerated so that * `/create-pr`, `/merge`, etc. are available to every agent host without * any per-provider plumbing. In the regular VS Code workbench window the * built-in lookup returns nothing and this is a no-op. */ export declare function enumerateLocalCustomizationsForHarness(promptsService: IPromptsService, syncProvider: ICustomizationSyncProvider, sessionType: string, token: CancellationToken, options: ILocalCustomizationSyncOptions | undefined): Promise; /** * Resolves the selectable custom-agent metadata that the client has already * discovered and will publish to an agent host for `sessionType`. * * Client customization refs intentionally omit parsed children; the host adds * those later in `SessionState.customizations`. New Agents-window drafts need * the picker before that state exists, so this mirrors the same eligibility * rules used by {@link resolveCustomizationRefs} without waiting for the host * to parse the plugin or synthetic bundle. */ export declare function resolveLocalCustomAgents(fileService: IFileService, promptsService: IPromptsService, syncProvider: ICustomizationSyncProvider, agentPluginService: IAgentPluginService, sessionType: string, options: ILocalCustomizationSyncOptions | undefined): Promise; /** * Collects MCP servers with resolved, representable configurations, excluding plugin-sourced servers, duplicate built-ins, and workspace-discovered servers other than `.vscode/mcp.json` entries. * Copilot-home `mcp-config.json` (`COPILOT_HOME`, otherwise `~/.copilot`) is runtime-discovered only by the window's own Copilot host on the same machine and is never forwarded. */ export declare function collectNonPluginMcpServers(mcpService: IMcpService, configurationResolverService: IConfigurationResolverService, sessionType: string, workingDirectories: readonly URI[], windowRemoteAuthority: string | null): Promise; /** * The bundlers that package forwarded files and MCP servers for an agent host. */ export interface ISyncedCustomizationBundlers { /** Bundles the remaining loose files, such as extension and built-in skills and agents, prompt files, and instructions. */ readonly synced: SyncedCustomizationBundler; /** Bundles standalone user and workspace skills and agents, and every forwarded MCP server. */ readonly standalone: SyncedCustomizationBundler; } /** * Resolves the customization refs to include in an `activeClientSet` * message. * * Every eligible local file is synced unless the user opted out. Files * belonging to installed plugins are de-duped to a single plugin ref; * remaining loose files are bundled into a synthetic Open Plugin. Standalone * user and workspace skills and agents, together with the MCP servers that * VS Code forwards (user, workspace, or extension-contributed), go into a * separate standalone bundle so that the host does not deliver them as * plugin-provided content. */ export declare function resolveCustomizationRefs(fileService: IFileService, promptsService: IPromptsService, syncProvider: ICustomizationSyncProvider, agentPluginService: IAgentPluginService, mcpService: IMcpService, configurationResolverService: IConfigurationResolverService, bundlers: ISyncedCustomizationBundlers, sessionType: string, options: ILocalCustomizationSyncOptions | undefined, workingDirectories?: readonly URI[], windowRemoteAuthority?: string | null): Promise;