import { CancellationToken } from "../../../../../base/common/cancellation.js"; import { MarketplaceType } from "./pluginMarketplaceService.js"; /** * Options for ensuring a marketplace repository is available locally. */ export interface IEnsureRepositoryOptions { /** Optional progress notification title shown during clone. */ readonly progressTitle?: string; /** Label used in clone failure messaging. */ readonly failureLabel?: string; /** Marketplace type metadata to persist in the marketplace index. */ readonly marketplaceType?: MarketplaceType; /** * When set, an already-cloned repository whose last refresh is older than * this many milliseconds is silently pulled before being returned. `0` * forces a refresh. Refresh failures are logged and non-fatal — the * existing clone is still returned. */ readonly refreshIfOlderThanMs?: number; /** Cancels an in-flight stale refresh triggered by {@link refreshIfOlderThanMs}. */ readonly token?: CancellationToken; } /** * Options for pulling the latest changes from a cloned marketplace repository. */ export interface IPullRepositoryOptions { /** Optional plugin name used in progress messaging. */ readonly pluginName?: string; /** Label used in pull failure messaging. */ readonly failureLabel?: string; /** Marketplace type metadata for repository index updates. */ readonly marketplaceType?: MarketplaceType; /** When `true`, suppresses progress notifications. */ readonly silent?: boolean; }