5 Commits
Author SHA1 Message Date
Lahfir 71850a021c fix(cli): print page error text in errors output (#2427)
* fix(cli): print page error text in errors output

The printer read a message field, but page errors are recorded under text, so every error printed as an empty line.

* fix(cli): wrap errors output in content boundaries

Page exception text is page-controlled. With --content-boundaries it now goes through print_with_boundaries like console output, so a page cannot emit text outside the nonce-marked block.

* fix(cli): skip empty error boundaries
2026-11-05 13:14:16 -08:00
b86ca559c3 fix(batch): reject misplaced global options in command parsing (#2386)
* fix(batch): reject global flags inside command items

Keep batch-wide options out of item positionals and point callers to the outer invocation.

Co-Authored-By: PerryLink <255665900+PerryLink@users.noreply.github.com>

* test(batch): cover global flag errors across CLI and MCP

Document batch-wide flags and verify quoted items, stdin, and MCP preserve parse errors and bail behavior.

* fix(batch): reject item help and version controls

* fix(batch): validate option positions without rejecting payload text

Check misplaced globals in navigation, screenshot, and snapshot parsing while preserving literal input values.

* style(batch): format flag checks and assertions

* fix(mcp): sync batch tool description

* test(batch): use status reads for batch parity checks

* fix(batch): reject global flags in vitals batch items (#2400)

A batch item such as vitals --init-script probe.js navigated to probe.js. Reject global flags there like open does, and add a parser test covering each batch item check plus literal fill and type text.

Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com>

---------

Co-authored-by: PerryLink <255665900+PerryLink@users.noreply.github.com>
Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com>
2026-11-05 13:14:00 -08:00
LahfirandDwin Gharibi 17d83c714e fix(eval): preserve unserializable JavaScript values (#2273)
* fix(eval): preserve CDP special values

Keep internal evaluation on its existing JSON value contract while exposing raw CDP results to direct eval.

Co-Authored-By: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com>

* fix(eval): expose CDP tokens in CLI and MCP

Print and document special results across CLI and MCP, with real Chrome coverage.

* docs(eval): scope special-value output to top-level

Document that eval reports CDP special values only when they are the top-level result.

* chore(mcp): sync eval tool description

---------

Co-authored-by: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com>
2026-10-30 21:01:48 -07:00
Railly Hugo 5801a50d26 test(batch): skip probe connections that close before the read timeout is set (#2237)
macOS returns EINVAL from set_read_timeout on a socket whose peer already
closed, which panicked the fake daemon and failed the test on macOS.
2026-10-27 20:33:32 -03:00
LahfirandChip Li 8cf9c2ae3f feat(batch): omit raw command arrays in CLI and MCP (#2216)
* feat(batch): allow command arrays to be omitted from JSON

Use stable row indexes when --omit-command is set, while preserving the default output.

Co-Authored-By: Chip Li <53254273+hichipli@users.noreply.github.com>

* feat(batch): expose command omission through MCP

Forward omitCommand to the batch CLI and exercise both entry points and transport errors end to end. Document that errors and response data can still contain inputs.

* test(batch): verify command omission after a real fill

Check complete CLI and MCP output and cover trailing option placement. Clarify zero-based input indexes and that errors and results can still contain secrets.

* test(batch): simplify socket and browser fixtures

Keep CLI, MCP, and daemon error coverage while removing polling state and duplicate browser assertions.

---------

Co-authored-by: Chip Li <53254273+hichipli@users.noreply.github.com>
2026-10-26 12:49:35 -07:00