import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions"; import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service"; import { IPluginMarketplaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service"; /** * Bridges the periodic plugin update *check* performed by * {@link IPluginMarketplaceService} with the plugin update *action* exposed * by {@link IPluginInstallService}. * * The marketplace service flips `hasUpdatesAvailable` to `true` roughly once * a day when at least one cloned plugin repository has upstream changes. * Without this contribution, that signal was never consumed and plugins * were never auto-updated (see microsoft/vscode#308563). * * When the signal becomes `true` and `extensions.autoUpdate === true`, we * silently update all installed plugins. Other auto-update modes * (`'onlyEnabledExtensions'`, `'onlySelectedExtensions'`) gate updates on a * per-extension opt-in that has no plugin equivalent, so they are treated * the same as `false` for plugins. * * The flag is cleared after every attempt — including failures — so the * next periodic check's `false → true` transition can always re-trigger the * autorun. `updateAllPlugins` already clears it on success; clearing again * in `finally` is a no-op on the success path and handles the partial- * failure path where the install service leaves the flag at `true`. */ export declare class PluginAutoUpdate extends Disposable implements IWorkbenchContribution { private readonly _pluginMarketplaceService; private readonly _pluginInstallService; private readonly _configurationService; private readonly _logService; static readonly ID = "workbench.contrib.pluginAutoUpdate"; private _updateInFlight; constructor(_pluginMarketplaceService: IPluginMarketplaceService, _pluginInstallService: IPluginInstallService, _configurationService: IConfigurationService, _logService: ILogService); private _triggerAutoUpdate; }