// Package automationcli is mygo-automation, the command line client of // plugins/automation's socket made for agents: compact snapshots of a // window's elements with short refs, actions on them, and diffs of what // the window shows once it settled. The command lives in // plugins/automation/cmd/mygo-automation, which embeds its SKILL.md; the // package is here so that internal/e2e can drive a real app with it. package automationcli import ( "bytes" "encoding/json" "errors" "fmt" "io" "maps" "os" "path/filepath" "runtime/debug" "slices" "strconv" "strings" "time" ) // Options are what the command takes besides its arguments. type Options struct { // Skill is the SKILL.md that skills prints. Skill []byte // Dir keeps the sessions' files; empty, it is mygo/automation in the // user's cache directory. Dir string } const usage = `usage: mygo-automation [arguments] [--session name] Run "mygo-automation skills" for the guide: commands, selectors, refs, --settle. open [--socket path] attach a session to an app (default: $MYGO_AUTOMATION) close end the session (the app keeps running) windows | window list windows | pick the one commands target snapshot [-i] [--full] [--json] diff what changed since the last snapshot or diff press | focus fill act [args] click | pointer move|down|up | wheel | type key ... menu