import type { Provider, TaskClass } from "@routerlab/core"; /** * The value type `node:util`'s `parseArgs` returns per flag. We accept the * full union (including the array case from `multiple: true`, which the * CLI doesn't currently use) so we can swap a flag to multi-value later * without rewriting validators. The validators below all reject arrays * because none of the current flags are multi-value. */ export type ParsedFlagValue = string | boolean | (string | boolean)[] | undefined; /** * Require a string-typed flag value and return it, else throw. */ export declare function requireString(flag: string, value: ParsedFlagValue): string; /** * Parse a `--task=...` value into a `TaskClass`, else throw. */ export declare function parseTask(value: ParsedFlagValue): TaskClass; /** * Parse a `--provider=...` value into a `Provider`, else throw. * Unlike `parseTask` this one is optional because `models` accepts no filter. */ export declare function parseProviderOptional(value: ParsedFlagValue): Provider | undefined; /** * Parse a `--quality-bar=...` value into a [0, 1] number, else throw. * * The engine itself also validates this, but doing it here lets us return * exit code 2 (invalid input) consistently rather than depending on the * engine's exception bubbling up to the catch-all that returns 3. */ export declare function parseQualityBar(value: ParsedFlagValue): number; /** * Parse an optional numeric flag like `--max-cost-usd=0.005`. Returns * `undefined` if the flag is absent. */ export declare function parseNonNegativeFloatOptional(flag: string, value: ParsedFlagValue): number | undefined; /** * Parse an optional positive integer flag like `--n=20`. */ export declare function parsePositiveIntOptional(flag: string, value: ParsedFlagValue): number | undefined; /** * Parse a `--format=table|json` value with a sensible default. */ export declare function parseFormat(value: ParsedFlagValue, defaultValue?: "table" | "json"): "table" | "json"; //# sourceMappingURL=parse.d.ts.map