/** * OpenCode caches npm plugins per spec dir and never re-resolves a tag while * the cache exists, so an unpinned plugin keeps running the first-installed * version forever. On load, check the registry; if a newer version exists, * delete our spec cache dir so the next OpenCode start cold-installs it. * The running process is unaffected (its module is already in memory). */ export declare function isNewerVersion(candidate: string, current: string): boolean; /** Locate the spec cache dir (…/packages/) from a module URL inside it. */ export declare function specCacheDir(moduleUrl: string, packageName: string): string | undefined; export interface SelfUpdateOptions { packageName: string; moduleUrl: string; client?: unknown; fetchImpl?: typeof fetch; rmImpl?: (dir: string) => Promise; } /** Fire-and-forget; never rejects, never blocks plugin load. Returned promise aids tests. */ export declare function checkForSelfUpdate(options: SelfUpdateOptions): Promise; //# sourceMappingURL=self-update.d.ts.map