various fixes

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