/** * Reading what was typed after a command: the leading `--flags`, the free * text that follows them, and for `/run`, the flags that end the line. */ /** `/interview [--model ] [--questions ] `. */ export declare function parseInterviewArgs(args: string): { model?: string; questions?: number; request: string; refused?: string; }; /** Which of the names a command reads take no value, and which take a count. */ export type FlagKinds = { /** Flags that take no value: `--name`, `--name=true` or `--name=false`. */ switches?: readonly string[]; /** Valued flags whose value is a whole number of at least 1. */ counts?: readonly string[]; }; /** * What was read off a line. `refused` names the first flag written with a * value it does not take, and what it takes: the command says so and runs * nothing, since whatever it did instead is a guess at what was meant. */ export type ReadFlags = { flags: Record; rest: string; refused?: string; }; /** * Reads leading flags off a command line, in any order. * * Only the given names are consumed: an unknown `--flag` stays in the text, * because in free prose it may simply *be* the text. `=` and a space both * separate a value, like everywhere in pi. * * A switch arrives as `"true"` or `"false"`, and absent when it was not * written, which is a third answer and not `false`. Which list a name is in * has to be decided here rather than guessed from what follows it: in * `--agent explore the parser`, `explore` is the name and not the flag's value. * `--agent=no` is refused rather than read: `no`, `off` and `0` are words * somebody writes to mean false, and reading any word but `false` as true * would do the opposite of what was typed. * * A {@link GAP} between two flags may hold a line continuation: a command with * six flags on it gets written across two lines by whoever has to read it back. */ export declare function parseLeadingFlags(args: string, names: readonly string[], kinds?: FlagKinds): ReadFlags; /** * Reads leading flags, then the valued ones among `names` that end the line. * * A known flag written after the text was read as the text, in silence. * Measured: `/run explore where is the wall time measured --model * ilaas/mistral-small-4-119b` ran three scouts on another model, and one of * them spent its turn grepping the repository for the model's name. A line * does not end on `--model ` as prose; a flag in the middle of it * still is prose, and stays in the text. */ export declare function parseFlags(args: string, names: readonly string[]): { flags: Record; rest: string; }; //# sourceMappingURL=flags.d.ts.map