There's probably a billion extensions for the #Pi harness dedicated to keeping the agent tool calls from touching anything outside the working directory...
So here's another one.
It has a global whitelist, and lets you Deny/Allow/Allow Session/Always Allow.
It's got a shitload of tests but I haven't bounced on it enough yet to trust it yet. Gonna be dogfooding it. :P
