import type { CLIInvocation } from '@struktoai/mirage-core/commands/cli/types'; import type { CommandFnResult } from '@struktoai/mirage-core/commands/config'; import type { DispatchFn } from '@struktoai/mirage-core/runtime/types'; import { type TreeEntry } from '../../../../core/hf_hub/tree_entry.ts'; /** * Which repo paths a download line asks for. * * Named files win outright: upstream downloads exactly those and does not then * filter them, so --include only ever narrows a whole-repo download. */ export declare function selected(tree: Map, names: readonly string[], include: readonly string[], exclude: readonly string[]): string[]; /** * Create a directory and every missing directory above it. * * Written out rather than delegated to `mkdir -p` because the parents flag is * a per-backend capability: the ops factory only wires `parents: true` for * backends that declare it, so a plain `mkdir` of `a/b` fails on the rest. */ export declare function ensureDir(dispatch: DispatchFn, path: string): Promise; /** * Refuse a line written in upstream's variadic option form. * * Upstream declares --include and --exclude as `nargs='*'`, so * `--include "*.json" "*.txt"` gives both patterns to the flag. mirage's * grammar has no variadic option value (POSIX presents multiple * option-arguments as one argument, so the spec layer has no shape for it), * and the second word lands as a filename operand instead. Since named files * win outright, that line would silently look for a file literally called * `*.txt` and report no match, so it is refused with the spelling that works. * * `patterns` is what the option itself received, so the message can show the * whole line rewritten rather than the stray word twice. */ export declare function refuseVariadic(names: readonly string[], flag: string, patterns: readonly string[]): void; /** * Download files from a repository into the workspace. * * Upstream defaults to `~/.cache/huggingface`, which a workspace has no * equivalent of, so `--local-dir` is required rather than silently resolving * to a directory outside the agent's world. Downloading is also the one verb * the mount does better -- `cp /m/config.json .` reads the same bytes without * a second copy -- so this exists for the repository a workspace has not * mounted. */ export declare function downloadCmd(inv: CLIInvocation): Promise; //# sourceMappingURL=download.d.ts.map