Files
22022182f8 fix(cli): honor search --json output (#2042)
`gbrain search <q> --json` silently printed human text: the search/query
ops declare no json param, parseOpArgs dropped the undeclared trailing
flag, and formatResult only emitted human text or --explain output.

Treat --json as a CLI-local boolean formatter flag in parseOpArgs (never
added to the operation contract; MCP validateParams ignores the extra
key on the routed path) and have formatResult's search/query case emit
the raw result array as parseable JSON when set.

Takeover of #2531, rebased onto master (keeps bigintToStringReplacer at
the local-path formatResult call site).

Co-authored-by: javieraldape <javieraldape@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:20:25 -07:00
..