amiagent 0.5.0 — cheap observation and atomic input
Five additions, each paying off a cost that made driving a running program on the Amiga slow or unreliable.
Region capture. A screenshot can ask for just a rectangle, and for a screen other than the frontmost. Reading a small status line out of a 1080p truecolour frame moved about a thousand times more data than the question needed. Measured on an A4000/060: full screen 7.4 s, the same read as a region 0.0 s.
Region checksums. CMD_HASH answers "has anything changed yet?" without transferring any pixels — the right way to wait for a program to finish drawing.
Screen listing and pointer read-back. A client can derive its coordinate mapping from real geometry instead of calibrating by trial, capture a screen behind the front one when a crashed program leaves a blank one on top, and ask where the pointer is without moving a frame.
Atomic input scripts. A whole sequence of events runs in one request with tick-accurate gaps. A press and a release sent as two requests land hundreds of milliseconds apart, which programs read as a held button rather than a click; drags and double-clicks need real timing.
MCP tools gained all of it — the Python client having a feature the tools do not is the feature not existing.
Also in this release (0.4.0, never released separately)
- Relative mouse motion. Absolute warps move the Intuition pointer, which Intuition programs follow — but anything reading raw mouse deltas (SDL, so ScummVM and games) never sees the warp and keeps its own cursor, so a warp-then-click silently clicks the wrong thing.
- Full keystrokes. Key injection previously sent press without release, which fails quietly: the Amiga behaves as though a finger rests on the key. One unreleased Escape can lock a program out of accepting mouse input entirely.
Note on testing
tests/smoke_hw.py exercises every op against real hardware. It earned itself immediately: the first 0.5.0 build hung the agent outright — do_screens() put a 3.2 KB reply buffer on the stack, an AmigaOS process has a few KB, and the overflowed handler never returned to its accept loop. All 85 fake-agent tests passed throughout, because the fake agent is Python and has no 68k stack.