amiagent is the Amiga half of amimcp. It is a small TCP daemon that lets a
program on another machine work on this Amiga: run AmigaDOS commands, read and
write files, list drawers, report system state, capture the screen, and inject
mouse and keyboard input.
The other half is an MCP server that runs on a Mac or PC, which is how Claude
(Anthropic's LLM) talks to it. Nothing about the agent is specific to that,
though - the wire protocol is documented and simple enough to drive from a
shell script if you would rather.
It is written in plain C against the OS libraries, needs no third-party
dependencies, and runs on AmigaOS 2.0 upwards. Two builds of each program are
included:
amiagent 68000 - runs on any Amiga
amiagent.020 68020+ - slightly smaller and faster
amimon 68000 - the status window, GadTools (runs everywhere)
amimon.020 68020+ - the same, for an 020 and up
amimon-mui 68000 - the status window, MUI (needs MUI 3.8+)
amimon-mui.020 68020+ - the same, for an 020 and up
WHAT IT DOES
* Run a command and get back its exit code, stdout and stderr. Commands run
in a child process, so one that hangs does not wedge the agent, and BREAK
sends it Ctrl-C remotely.
* Read and write files, list drawers with size, protection bits and dates.
* Report Kickstart, CPU, FPU, free Chip/Fast RAM and mounted volumes.
* Capture the screen - native truecolour/RTG via cybergraphics.library, any
screen, and optionally just a rectangle of it. Also a cheap checksum of a
region, for "has anything changed yet" without moving any pixels.
* Inject mouse and keyboard input, including relative motion for programs
that read raw deltas (SDL, so ScummVM and most games), held buttons for
Intuition menus and drags, and text through YOUR keymap so umlauts work.
NEW IN 0.7.0
amimon-mui, a MUI front-end for the status monitor. Same rows as the
GadTools amimon - agent, state, request in flight, last command, counters,
client, driver, uptime - in a resizable MUI window that follows your MUI
settings, for the people whose Amiga already looks like YAM and IBrowse.
Needs MUI 3.8+ (muimaster.library v19); without MUI, amimon keeps covering
every OS 2.04+ machine. The two are maintained in lockstep and show exactly
the same status board.
The icons are now GlowIcons too. Each .info still carries the classic
4-colour planar images, and after them an OS 3.5-style ColorIcon with a
real transparent background and a glow on selection. icon.library v44+
(OS 3.5/3.9/3.2, or PeterK's replacement) picks the colour version
automatically; OS 2.x/3.1 never sees it and shows the classic art as
before. amimon also finally gets its own icon in the archive.
The agent itself is unchanged apart from the version string; the wire
protocol is untouched.
RUNNING IT
Bring your TCP/IP stack up first (Roadshow, AmiTCP, ...), then:
amiagent TOKEN=somesecret
It listens on port 7846 and prints that it is waiting. Ctrl-C stops it. To
start it at boot, add this to S:User-Startup AFTER your TCP/IP stack:
run >NIL: <path-to>/amiagent TOKEN=somesecret QUIET
Then, optionally, run amimon (or amimon-mui) from the drawer to watch it
work.
SECURITY - PLEASE READ
amiagent runs whatever commands it is sent, and the connection is NOT
encrypted. Always set a TOKEN, keep it on a LAN you trust, and never forward
the port through your router. Without a TOKEN, anything on the network can
run any command on this machine - and both monitors will say so in
red-letter terms, showing "OPEN, no token".
Source, the MCP server, the protocol document and the issue tracker:
https://github.com/thomas-luebker/amimcp
Distributed under the licence in the archive.
|