Documentation
¶
Overview ¶
Package gui provides Wayland/X11 adaptive desktop automation script generation and pure-Go screenshot downscaling for the MCP gui tool.
Index ¶
Constants ¶
const ( ActionShot = "shot" ActionClick = "click" ActionDoubleClick = "double_click" ActionRightClick = "right_click" ActionMove = "move" ActionType = "type" ActionKey = "key" ActionScroll = "scroll" ActionDrag = "drag" MaxImageDimension = 1280 JPEGQuality = 75 // CaptureOutputLimit bounds the base64 screenshot captured from the // remote script. It covers an uncompressed-ish 4K PNG (~25 MiB encoded). CaptureOutputLimit = 48 << 20 )
Variables ¶
This section is empty.
Functions ¶
func BuildScript ¶
BuildScript constructs a self-contained POSIX shell script that adapts to Wayland or X11, executes the action, waits 500ms on mutations, and outputs a base64-encoded screenshot between markers.
func ExtractAndProcessImage ¶
ExtractAndProcessImage extracts the base64 screenshot payload from script output and downscales/compresses it via ProcessImage.
func IsReadOnly ¶
IsReadOnly reports whether the GUI action does not mutate application state.