mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
0781716788
* fix(cli): accept --flag=value for global output flags `rea <command> --format=json` failed with "Unknown flag: --format". `--filter-output=...`, `--token-limit=...` and `--token-offset=...` failed the same way. Incur reads these global flags only in spaced form, so the equals form fell through to the command parser. Command options already accept both forms, and `rea mcp doctor` parses `--format=` itself. A valued output flag with no value (`--format` last, or `--format=`) also reported the flag as unknown with code UNKNOWN. normalizeCliOutputArguments, in the module that owns output-argument interpretation, now splits the equals forms of the four valued output flags. The entry point passes the normalized argv to rea's output validation and to Incur, so both read the same effective values. A missing value now fails with MISSING_OUTPUT_VALUE and names the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): detect missing output values while parsing output flags The missing-value check scanned argv again after parsing, so it also checked tokens the parser had already consumed as values. For example, `--filter-output --format` selects the field `--format`, yet the second scan reported `--format` as missing a value. parseCliOutputArguments now records the first valued flag it skips for lack of a value, in the same pass that consumes values. Cover normalizeCliOutputArguments directly: values containing `=`, empty values, and command options that only share a prefix. Export it in the dispatcher test's runtime stub as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>