/** Tools whose binaries hoocode can resolve from PATH or download on demand. */ export type ManagedTool = "fd" | "rg" | "webtools" | "voicetools" | "embsearch"; /** * Path to an already-available tool (system-wide or in our tools dir), or null. * * Exported as the never-downloads counterpart to {@link ensureTool}: a caller * that wants a capability *if it happens to be installed* — and must not spend a * download to get it — asks here and degrades when the answer is null. */ export declare function getToolPath(tool: ManagedTool): string | null; /** * Live download progress: bytes received so far and the total from * Content-Length (null when the server doesn't send one). Callers use it to * drive a progress bar instead of an indefinite spinner. */ export type DownloadProgress = (receivedBytes: number, totalBytes: number | null) => void; export declare function downloadFile(url: string, dest: string, onProgress?: DownloadProgress): Promise; export declare function ensureTool(tool: ManagedTool, silent?: boolean, onProgress?: DownloadProgress): Promise; /** How a resolved managed binary was found. */ export type ManagedToolSource = /** `HOOCODE__BINARY` pointed at it. */ "override" /** hoocode downloaded it into its own bin dir. */ | "managed" /** It was already on PATH. */ | "path"; export interface ManagedToolStatus { tool: ManagedTool; /** Upstream display name (e.g. "ripgrep" for `rg`). */ name: string; /** GitHub repo the release archives come from. */ repo: string; /** Env var that overrides resolution with an explicit path. */ overrideEnv: string; /** Resolved path (absolute, or a bare command name found on PATH). */ path: string | null; source: ManagedToolSource | null; } /** * Resolve a managed binary and say *how* it resolved, without ever downloading. * * `getToolPath` answers "can I use it"; the settings pane needs "is this the * copy I downloaded, one already on PATH, or a local build someone pointed the * env var at", because those three have different implications for the user. */ export declare function getToolStatus(tool: ManagedTool): ManagedToolStatus; /** Whether hoocode is configured to never download a missing binary. */ export declare function isOfflineMode(): boolean; //# sourceMappingURL=tools-manager.d.ts.map