Skip to content

v0.2.1 — text is the output

Choose a tag to compare

@bfortunato bfortunato released this 05 Sep 09:27
· 31 commits to main since this release

Breaking: stdout is text, not JSON

Measured on this tool, in tokens: screenshot was 243 as JSON and is 4 as text; a click
on an element 4,238 against 21; the envelope alone, contents removed, 177 before
anything is said — spent on profile and backend (constant for a session), screen (five
numbers nobody reads), ok and failed_index (which the exit code already carries), and the
action echoed back to the caller who just sent it.

The CLI's consumer is a model, and a Python API exists underneath for programs. It had been
optimised for a parser that has somewhere better to be.

--format json returns the previous envelope, one flag away, and is never inferred from
isatty(). Exit codes and the Python API are unchanged.

New

  • screenshot --of <node-id> crops to one element: 18,284 pixels instead of 2,073,600 for a
    question about a 653×28 field. The cheap way down to vision when an application paints its own
    text rather than exposing it.
  • windows reports the application, so two windows both titled "ChatGPT" can be told apart.

It refuses rather than guesses

  • --window no longer picks the first title match. It lists the candidates. This is not a rare
    case: a terminal puts the running command in its own title, so the terminal executing
    --window "X" matches X — and the first match was usually the window you were looking at rather
    than the one you named. Pass the window id from windows to be exact.

Fixed

  • One unresponsive application no longer takes down a whole desktop read.
  • A missing required option exits 2, not 1 with a traceback, on the supported typer floor.
  • rich no longer eats [tree] out of the error whose whole job is to name it.
  • The tree extra no longer promises Linux something pip cannot deliver; the error now inspects
    the installed bindings and says whether they are absent, invisible, or built for another Python.
  • Window matching had drifted into the Linux provider. It is policy, it now lives above the
    Protocol, and all three platforms share it.