I hacked something vaguely similar up for Opencode using Bubblewrap . Maybe it’ll be applicable to you.