various fixes

these are various fixes and usability extensions to make it to support building a simple patching automation on top of this agent