/** Typed accessor over the flag map produced by `parseFlags`. * * `parseFlags` internally stores every flag with at least one value as a * `string[]`. A flag with no following non-flag token (e.g. `--apply`, * `--dry-run`) is recorded as `true`. This helper exposes three typed * accessors so call-sites don't have to re-narrow `unknown` or * `string | boolean | string[]` on every read: * * - `flags.list(name)` → `string[]` (always an array; a single * occurrence is wrapped to a 1-element * array at parse time) * - `flags.bool(name)` → `boolean` (presence-of flag; missing * flag is `false`) * - `flags.maybeString(name)` → `string | undefined` (first value, * or `undefined` if the flag was given * as a bare boolean with no value) * * The dispatch layer (runSediment) was previously peppered with * `typeof flags.x === "string"` / `Array.isArray(flags.x)` narrowing. * With this helper the call-sites collapse to one-line reads and the * raw flag map stops leaking across the runSediment boundary. */ export declare class ParsedFlags { private readonly raw; constructor(raw: Record); /** Always returns an array. Missing flag → []. Single-occurrence * flag → a 1-element array (parseFlags normalizes this). */ list(name: string): string[]; /** Presence-of a bare boolean flag. Missing → false. */ bool(name: string): boolean; /** First value of a flag, or `undefined` if the flag is absent or * was given as a bare boolean. */ maybeString(name: string): string | undefined; } /** Parse an argv tail into positional args + flag map. * * Supports: * --flag value → flags[flag] = [value, ...] (advance i by 1) * --flag → flags[flag] = true (when next token starts with `--` or is undefined) * --flag v1 --flag v2 → repeated `--flag` values are accumulated * * Internally stores all values as `string[]` (or `true` for a bare * boolean flag). Use the `ParsedFlags` helper to read typed accessors. * * Repeatable flag handling (Task 15b): when the same `--key` appears * consecutively (e.g. `--segment a --segment b --segment c`), values * are accumulated into a single `string[]`. A single occurrence is * normalized to a 1-element array so callers can use `.list(name)` * uniformly without shape-narrowing on the call-site. */ export declare function parseFlags(argv: string[]): { positional: string[]; flags: ParsedFlags; };