/** * `ruflo proxy install`/`update` orchestration (ADR-307): download -> verify * -> extract -> place -> record. The per-user bearer token * (`~/.ruflo/proxy-token`) is NOT generated here — confirmed empirically * (2026-07-16) that the meta-proxy binary itself creates it on first launch * (`load_or_create_token()`), so this module's job ends at a verified binary * on disk plus an install manifest doctor can check against. * * @module proxy/install */ export declare class ExtractionError extends Error { constructor(message: string); } /** * Extracts the archive via the OS's own tools — `tar` for `.tar.gz` * (present on macOS/Linux/Windows 10+), PowerShell `Expand-Archive` * specifically for `.zip` on Windows. Zero new archive-parsing dependency, * matching this repo's existing taste for shelling out over adding a parser dep. * * `Expand-Archive` stays the PRIMARY `.zip` path — bsdtar's zip support is * still not something to lean on by default. But `Microsoft.PowerShell.Archive` * is a *script* module resolved through PowerShell's module autoloading, so it * can fail for environment reasons entirely unrelated to the archive. Observed * in the wild on a healthy Windows 11 box, from ruflo's own `-NonInteractive` * child process: * * Expand-Archive : The 'Expand-Archive' command was found in the module * 'Microsoft.PowerShell.Archive', but the module could not be loaded. * * The same command succeeded on the same machine minutes later, so this is * intermittent rather than a hard platform break. Previously that aborted the * install outright with nothing to fall back on, stranding an already * downloaded-and-verified archive. Retrying through bsdtar costs one extra * process on a path that was going to fail anyway. * * Exported for tests — extraction is the only platform-divergent step in the * install pipeline and had no direct coverage. */ export declare function extractArchive(archivePath: string, extractDir: string, ext: 'zip' | 'tar.gz'): Promise; export interface InstallOptions { version: string; log?: (line: string) => void; } export interface InstallResult { version: string; binaryPath: string; sha256: string; } /** * Full install pipeline. Refuses (throws) on any verification failure — * never writes a partially-verified binary into the live install path. */ export declare function installProxy(opts: InstallOptions): Promise; export declare function uninstallProxy(): Promise; //# sourceMappingURL=install.d.ts.map