import type { AssetCatalogEntry, InstallProgressState, InstallRefreshAssetStatus, InstallRefreshPolicy, InstallRefreshPolicyDecision, InstallRefreshReport, InstallRefreshState, InstallRefreshTier, MirrorIndexEntry, InstalledPackageManifest, MirrorAcquireState } from "../types.js"; import { acquireMirrorArtifacts } from "../mirror/acquire.js"; import { installBundles } from "./bundle.js"; import { INSTALL_HOSTS } from "./utils.js"; /** * Generates or applies install refresh state for the lifecycle pipeline. */ export declare function manageInstallRefresh(projectRoot: string, workingDirectory: string, args: string[]): Promise; declare function isInstallRefreshDue(previousState: InstallRefreshState | null, refreshPolicy: InstallRefreshPolicy, intervalMs: number): boolean; declare function writeInstallRefreshState(projectRoot: string, previousState: InstallRefreshState | null, report: InstallRefreshReport, options: { policy: InstallRefreshPolicy; intervalMs: number; refreshedMirrorState: boolean; applied: boolean; }): Promise; interface RefreshMirrorStateOptions { acquire?: typeof acquireMirrorArtifacts; maxBatches?: number; readAcquireState?: () => Promise; } interface ApplyBundleRefreshesOptions { install?: typeof installBundles; maxBatches?: number; readProgressState?: () => Promise; } type BundleAssetAllowlist = ReadonlyMap>; declare function shouldRefreshMirrorState(args: readonly string[]): boolean; declare function refreshMirrorStateIfRequested(shouldRefresh: boolean, projectRoot: string, workingDirectory: string, refresh?: typeof refreshMirrorState): Promise; declare function refreshMirrorState(projectRoot: string, workingDirectory: string, options?: RefreshMirrorStateOptions): Promise; declare function buildInstallRefreshReport(projectRoot: string, hosts: readonly (typeof INSTALL_HOSTS)[number][], refreshPolicy: InstallRefreshPolicy, refreshedMirrorState: boolean): Promise; interface InstallRefreshPolicyResult { decision: InstallRefreshPolicyDecision; tier: InstallRefreshTier; reason: string; } declare function decideInstallRefreshPolicy(status: InstallRefreshAssetStatus["status"], refreshPolicy: InstallRefreshPolicy, manifest?: InstalledPackageManifest, latestMirrorEntry?: MirrorIndexEntry, latestCatalogEntry?: AssetCatalogEntry | null): InstallRefreshPolicyResult; declare function requiresRefreshReview(manifest: InstalledPackageManifest | undefined, latestMirrorEntry: MirrorIndexEntry | undefined, latestCatalogEntry: AssetCatalogEntry | null | undefined): boolean; declare function isStageOnlyRefresh(manifest: InstalledPackageManifest | undefined, latestCatalogEntry: AssetCatalogEntry | null | undefined): boolean; declare function collectRefreshBundleAssetAllowlist(report: InstallRefreshReport, decisions: readonly InstallRefreshPolicyDecision[]): Map>; declare function collectRefreshBundleIds(report: InstallRefreshReport, decisions: readonly InstallRefreshPolicyDecision[]): string[]; declare function collectAppliedAssetActions(report: InstallRefreshReport): Map; declare function applyRefreshActionAnnotations(report: InstallRefreshReport, actions: Map): InstallRefreshReport; declare function collectNativeRefreshExtensionIds(report: InstallRefreshReport): Map; declare function applyNativeRefreshes(projectRoot: string, extensionIdsByHost: Map): Promise; declare function applyBundleRefreshes(projectRoot: string, bundleAssetAllowlist: BundleAssetAllowlist | readonly string[], options?: ApplyBundleRefreshesOptions): Promise; declare function normalizeBundleAssetAllowlist(bundleAssetAllowlist: BundleAssetAllowlist | readonly string[]): Map>; declare function printInstallRefreshReport(projectRoot: string, report: InstallRefreshReport, applied: boolean): void; /** * Exposes narrow install refresh internals for focused scheduling and apply tests. */ export declare const installRefreshInternals: { isInstallRefreshDue: typeof isInstallRefreshDue; shouldRefreshMirrorState: typeof shouldRefreshMirrorState; refreshMirrorStateIfRequested: typeof refreshMirrorStateIfRequested; refreshMirrorState: typeof refreshMirrorState; decideInstallRefreshPolicy: typeof decideInstallRefreshPolicy; requiresRefreshReview: typeof requiresRefreshReview; isStageOnlyRefresh: typeof isStageOnlyRefresh; collectRefreshBundleAssetAllowlist: typeof collectRefreshBundleAssetAllowlist; collectRefreshBundleIds: typeof collectRefreshBundleIds; collectNativeRefreshExtensionIds: typeof collectNativeRefreshExtensionIds; collectAppliedAssetActions: typeof collectAppliedAssetActions; applyRefreshActionAnnotations: typeof applyRefreshActionAnnotations; applyNativeRefreshes: typeof applyNativeRefreshes; applyBundleRefreshes: typeof applyBundleRefreshes; normalizeBundleAssetAllowlist: typeof normalizeBundleAssetAllowlist; buildInstallRefreshReport: typeof buildInstallRefreshReport; writeInstallRefreshState: typeof writeInstallRefreshState; printInstallRefreshReport: typeof printInstallRefreshReport; }; /** * Exposes the supported install refresh policy values for CLI/config validation. */ export declare const installRefreshPolicies: ("manual" | "report-only" | "apply-safe")[]; export {};