If I understand you correctly https://nono.sh/ might go into that direction. It can add permission after the sandboxed command is terminated based on which blocks occurred.
Its not life though as you seem to describe
5 karma · joined August 8, 2024
I guess however this is a harness and it needs to connect to the API?