Documentation
¶
Overview ¶
Package automation lets another process drive a running app, as an end-to-end test runner or an agent does: list its windows, read what their native UI shows as elements, act on them, send pointer, wheel, key and text input, choose items of the application menu, evaluate scripts in pages, capture windows as PNG images, and wait for them to settle.
An app opts in by importing the package, as a file built for tests does:
//go:build e2e package main import _ "github.com/HyperparameterSI/golet/backend/plugins/automation"
Then it listens only when the environment variable GOLET_AUTOMATION names the path of a Unix domain socket, which only the user can open, and answers JSON requests on it, one per line:
GOLET_AUTOMATION=/tmp/app.sock ./app
Builds without the inspector of native UI (-tags golet_noinspector, as golet build makes for release) leave the plugin out: it never listens there. See docs/plugins/automation.md for the protocol, and for golet-automation (cmd/golet-automation), its command line client for agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
golet-automation
command
Command golet-automation drives a running Golet app through plugins/automation's socket, made for AI coding agents: compact text snapshots of a window's elements with short refs (@e1), actions on them, and diffs of what the window shows once it settled.
|
Command golet-automation drives a running Golet app through plugins/automation's socket, made for AI coding agents: compact text snapshots of a window's elements with short refs (@e1), actions on them, and diffs of what the window shows once it settled. |