import { URI } from "../../../../../base/common/uri.js"; import { IEnsureRepositoryOptions, IPullRepositoryOptions } from "./agentPluginRepositoryService.js"; import { IMarketplaceReference, MarketplaceType, IMarketplacePlugin, IPluginSourceDescriptor, PluginSourceKind } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService"; import { IPluginSource } from "./pluginSource.js"; export declare const IAgentPluginRepositoryService: import("../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Manages cloning, cache location resolution, and update operations for * agent plugin marketplace repositories. */ export interface IAgentPluginRepositoryService { readonly _serviceBrand: undefined; /** * Returns the local cache URI for a marketplace repository reference. * Uses a storage-backed marketplace index when available. */ getRepositoryUri(marketplace: IMarketplaceReference, marketplaceType?: MarketplaceType): URI; /** * Returns the local install URI for a plugin source directory inside its * marketplace repository cache. */ getPluginInstallUri(plugin: IMarketplacePlugin): URI; /** * Ensures a marketplace repository is cloned locally and returns its cache URI. */ ensureRepository(marketplace: IMarketplaceReference, options?: IEnsureRepositoryOptions): Promise; /** * Pulls latest changes for a cloned marketplace repository. */ pullRepository(marketplace: IMarketplaceReference, options?: IPullRepositoryOptions): Promise; /** * Returns the local install URI for a plugin based on its * {@link IPluginSourceDescriptor}. For non-relative-path sources * (github, url, npm, pip), this computes a cache location independent * of the marketplace repository. */ getPluginSourceInstallUri(sourceDescriptor: IPluginSourceDescriptor): URI; /** * Ensures the plugin source is available locally. For github/url sources * this clones the repository into the cache. For npm/pip sources this is * a no-op (installation via terminal is handled by the install service). */ ensurePluginSource(plugin: IMarketplacePlugin, options?: IEnsureRepositoryOptions): Promise; /** * Updates a plugin source that is stored outside the marketplace repository. * For github/url sources this pulls latest changes and reapplies pinned * ref/sha checkout. For npm/pip sources this is a no-op. */ updatePluginSource(plugin: IMarketplacePlugin, options?: IPullRepositoryOptions): Promise; /** * Returns the {@link IPluginSource} strategy for the given * source kind, allowing callers to invoke kind-specific operations * (install, update, label, etc.) directly. */ getPluginSource(kind: PluginSourceKind): IPluginSource; /** * Cleans up on-disk cache for a plugin source that owns its own install * directory. For marketplace-relative sources this is a no-op (they share * the marketplace repository cache). For direct sources (github, url, npm, * pip) the cache directory is deleted. * * This is best-effort: failures are logged but do not throw. */ cleanupPluginSource(plugin: IMarketplacePlugin): Promise; }