export type ExtensionSource = 'npm' | 'local' | 'git' | 'store'; export interface ExtensionLockEntry { /** Extension ID */ name: string; /** Installed version */ version: string; /** Resolved URL or path */ resolved: string; /** Download artifact integrity, formatted as sha256-. */ integrity?: string; /** Deterministic hash of installed files, formatted as dir-sha256-. */ installedIntegrity?: string; /** Immutable artifact URL used during install, when available. */ artifactUrl?: string; /** Manifest snapshot captured at install time. */ manifest?: Record; /** package.json snapshot captured at install time. */ packageJson?: Record; /** Installation timestamp */ installedAt: string; /** Source type */ source: ExtensionSource; /** Local path (for local extensions) */ localPath?: string; /** Git reference (for git extensions) */ gitRef?: string; /** Dependencies */ dependencies?: Record; } export interface ExtensionsLockfile { version: number; lockfileVersion: number; /** Installed extensions */ extensions: Record; /** Last updated timestamp */ lastUpdated?: string; } export declare class ExtensionLockfileManager { private readonly lockfilePath; constructor(lockfilePath?: string); /** * Load the lockfile */ load(): Promise; /** * Save the lockfile */ save(data: ExtensionsLockfile): Promise; /** * Add or update an extension entry */ upsert(extensionId: string, entry: Omit): Promise; /** * Remove an extension entry */ remove(extensionId: string): Promise; /** * Get a specific extension entry */ get(extensionId: string): Promise; /** * Check if an extension is locked */ has(extensionId: string): Promise; /** * List all locked extensions */ list(): Promise; /** * Verify extension integrity */ verify(extensionId: string): Promise<{ valid: boolean; reason?: string; }>; /** * Verify all locked extensions */ verifyAll(): Promise>; /** * Freeze current state (save with validation) */ freeze(): Promise; /** * Generate integrity hash for a file */ static generateIntegrity(filePath: string): Promise; } export declare function getExtensionLockfileManager(lockfilePath?: string): ExtensionLockfileManager; export declare function resetExtensionLockfileManager(): void; export declare function loadExtensionLockfile(lockfilePath?: string): Promise; export declare function saveExtensionLockfile(data: ExtensionsLockfile, lockfilePath?: string): Promise;