export interface ResolvedCliAsset { version: string; assetName: string; downloadUrl: string; } export declare function cliAssetName(platform: string, arch: string): string | null; /** * OS-idiomatic install dir, in preference order: * * POSIX — `~/.local/bin` when it is already on `$PATH` (the XDG user-binaries * dir); otherwise `/usr/local/bin` when it is on `$PATH` and writable without * privileges; otherwise `~/.local/bin` anyway (created, with a PATH hint). * Windows — `%LOCALAPPDATA%\Programs\slicc` (the per-user programs idiom). */ export declare function resolveInstallDir(env?: NodeJS.ProcessEnv, platform?: string, isWritableDir?: (dir: string) => boolean): string; /** * Scan releases newest→oldest for the first one carrying `assetName`. * Returns null when no release within MAX_RELEASE_PAGES pages has it. */ export declare function resolveLatestCliAsset(assetName: string, fetchImpl?: typeof fetch): Promise; export interface InstallCliOptions { fetchImpl?: typeof fetch; platform?: string; arch?: string; /** Overrides the resolved OS-idiomatic default (the `--install-dir` flag). */ installDir?: string | null; env?: NodeJS.ProcessEnv; log?: (line: string) => void; logError?: (line: string) => void; } /** * Download the newest released `slicc` CLI binary for this platform into the * install dir. Returns a process exit code. */ export declare function runInstallCli(options?: InstallCliOptions): Promise;