Factorio has an extremely broad LUA modding API, so a mod was made that allows it to get data about the game and send input actions to control the game.
It also has ability to make screenshots and it does use it from time to time to inspect whats going on.
Factorio has an extremely advanced modding API, so the codex harness has access to the game data via the client side modding LUA api to read things, it also uses the same api that is exposed as MCP tool to send Input Actions - input actions are internal Factorio representation of mouse and keyboard.
It also does use screenshots sometimes to understand what's goiung on, so it's not just the modding api proxy.
Inputs wise it plays exactly as a human does, there is no difference.
In this case yes, it's a custom harness that is able to read the game state via LUA modding API. But control wise it sends standard InputActions - in Factorio those are internal representation of the keyboard and mouse inputs, so it does not have any ability to programmatically create things in game.