import type { EdenConfig, InstalledPackageInfo, InstalledPackageManifest, PackageManifest, PackageOperationPreview, RuntimeAppManifest, RuntimeDlcManifest } from "@edenapp/types"; import { ExecutionContext } from "../execution/ExecutionContext"; import { RuntimeContextRegistry } from "../execution/RuntimeContextRegistry"; import { FilesystemManager } from "../filesystem"; import { CommandRegistry, EdenEmitter, IPCBridge, PermissionRegistry } from "../ipc"; import { DlcResourceManager } from "./DlcResourceManager"; import { PackageCatalog } from "./PackageCatalog"; import { PackageOperationCoordinator } from "./PackageOperationCoordinator"; import { PackageRegistry } from "./PackageRegistry"; /** * Events emitted by the PackageManager */ interface PackageNamespaceEvents { installed: { manifest: InstalledPackageManifest; }; uninstalled: { kind: "app"; packageId: string; } | { kind: "dlc"; packageId: string; hostAppId: string; }; } export interface InstalledPackageListOptions { showHidden?: boolean; showRestricted?: boolean; kind?: "app" | "dlc"; hostAppId?: string; } export declare class PackageManager extends EdenEmitter { private readonly appsDirectory; private readonly config; private readonly permissionRegistry; private readonly filesystemManager; private readonly registry; private readonly catalog; private readonly dlcResources; private readonly operations; private readonly runtimeContexts; private readonly executionContext; private prebuiltPackagesDirectory; private packageHandler; private coreApps; private restrictedApps; private readonly changingHostIds; constructor(ipcBridge: IPCBridge, appsDirectory: string, distPath: string, config: EdenConfig, commandRegistry: CommandRegistry, permissionRegistry: PermissionRegistry, filesystemManager: FilesystemManager, registry: PackageRegistry, catalog: PackageCatalog, dlcResources: DlcResourceManager, operations: PackageOperationCoordinator, runtimeContexts: RuntimeContextRegistry, executionContext: ExecutionContext); /** * Convert a raw AppManifest to RuntimeAppManifest with computed fields. */ private toRuntimeManifest; private toRuntimeDlcManifest; private applyHotReloadEntry; /** * Initialize the package manager */ initialize(): Promise; private loadDevelopmentApps; /** * Load built-in packages from dist/apps/prebuilt. Apps are registered * immediately; DLCs are returned for host validation after app precedence * has been resolved. */ private loadPrebuiltPackages; private loadPrebuiltDlcs; private loadInstalledDlcs; /** * Load all installed apps from disk */ private loadInstalledApps; /** * Get info about a package file without installing it */ getPackageInfo(virtualPath: string): Promise<{ success: boolean; manifest?: PackageManifest; preview?: PackageOperationPreview; error?: string; }>; listInstalledPackages(options: InstalledPackageListOptions & { kind: "app"; }): RuntimeAppManifest[]; listInstalledPackages(options: InstalledPackageListOptions & { kind: "dlc"; }): RuntimeDlcManifest[]; listInstalledPackages(options?: InstalledPackageListOptions): InstalledPackageManifest[]; getInstalledPackage(packageId: string): InstalledPackageManifest | undefined; getAppForLaunch(appId: string): RuntimeAppManifest | undefined; getInstalledPackageInfo(packageId: string, webContentsId?: number): InstalledPackageInfo | undefined; getPackageIcon(packageId: string): Promise; getPackageSize(packageId: string): Promise; /** Install an app or DLC from a .edenite file. */ installPackage(virtualPath: string, replacementConfirmed?: boolean): Promise; private installPackageExclusive; private installApp; /** Uninstall an app or DLC by package ID. */ uninstallPackage(packageId: string): Promise; private uninstallPackageExclusive; private uninstallApp; /** * Reload an app (for hot reload support) * This will notify that the app has been updated */ reloadPackage(packageId: string): Promise; private installDlc; private uninstallDlc; private unregisterDlc; private getIncompatibleDlcs; private assertHostStopped; private runWithHostsChanging; private replacementRequiredMessage; private assertPackageIdAvailable; private readPackageInfo; private resolvePackageSource; isHotReloadEnabled(packageId: string): Promise; toggleHotReload(packageId: string): Promise; private requireInstalledApp; } export {}; //# sourceMappingURL=PackageManager.d.ts.map