/** * @file * * Integration-time helpers for resolving the Obsidian **shell** (the Electron * runtime / installer build) to launch. * * By default the harness uses the installed shell. When a specific installer * version is requested, it downloads that version's GitHub release asset and * extracts a portable shell into a cache, returning the executable to launch. * * GitHub release assets exist for **public** releases only; catalyst (beta) * builds publish only the asar, so installer-pinning supports public versions. * The extracted shell's bundled `resources/obsidian.asar` is that version, so * pinning the installer is how you run a version **older** than the installed * shell (asar-swap is upgrade-only — see `obsidian-version-switch.ts`). */ /** * A resolved Obsidian shell executable. */ export interface ResolvedShell { /** Absolute path to the Obsidian executable to launch. */ readonly exePath: string; /** The shell's version, or `undefined` if it could not be detected. */ readonly version: string | undefined; } /** * Detects the version of an installed Obsidian shell from its executable. * * - Windows: the executable's PE `FileVersion`. * - macOS: `CFBundleShortVersionString` from the app bundle's `Info.plist`. * - Linux: best-effort parse from the executable path (often `undefined`). * * @param exePath - Absolute path to the Obsidian executable. * @returns The `x.y.z` version, or `undefined` if it cannot be determined. */ export declare function detectInstalledShellVersion(exePath: string): string | undefined; /** * Ensures a portable Obsidian shell for the given version is extracted into the * cache, downloading and extracting its GitHub release asset if necessary. * * @param version - A concrete public `x.y.z` version. * @returns The absolute path to the cached shell executable. * @throws Error if the asset cannot be downloaded or extracted. */ export declare function ensureShellCached(version: string): Promise; /** * Returns the cache directory a version's extracted shell lives in (the * directory may not yet exist). * * @param version - A concrete public `x.y.z` version. * @returns The absolute shell cache directory for the version. */ export declare function getCachedShellDirectory(version: string): string;