Closed AdalynBlack closed 2 months ago
This definitely looks like a great start for a backend wrapper!
Before I merge, I will need to reference the wrapper in the main README and perhaps add a README in the wrapper folder just to explain what it's good for.
The implementation for checking the agent hash seems satisfactory - MBF does store the SHA1 of the agent server side in agent_manifest.ts
but because the typescript is compiled and then minimized, this is very difficult to extract.
It might make sense to serve a JSON file containing this information so it can be easily fetched, but right now the current implementation is OK.
Another thing it might be worth noting, although there isn't much you can do about it.
The Core Mod
property for mods is only set if the request that you're making actually involves the core mod index, so e.g. GetModStatus.
If you're setting mod statuses, this doesn't inherently require information about core mods so the backend won't set the property as it never needs to fetch the index for anything else.
Maybe possible to "fix" by not displaying the Core Mod
property if it's false for all mods, but don't worry too much about it.
For the future, it's a little annoying to PR from your main
branch to the main main
branch - it's always best to create a different branch e.g. agent-wrapper
, but don't worry about it this time around.
Another note: Right now running the python script with no arguments gives an error/backtrace instead of showing the help message, which probably makes more sense.
In interactive mode, keyboard interrupts could be gracefully handled but this is low priority.
A simple python script to easily interface with the MBF Agent directly, as an alternative to the web interface
While it may be a bit overly verbose at times, everything possible in the web interface should be possible with it. All dependencies are internal python packages, so no external packages are required