I.e. in theory the most secure might be a virtual machine with no network access. But then how do you access the LLM provider? Etc.
Why did you not embed your language into another one, with type system that is superset of what you need?
For example, there's capabilities expressed in Haskell: https://github.com/tweag/capability
Capabilities there are tracked at type level and are subject to type erasure, if possible.
Bluefin is used in production, and as far as I know capability is not.
It's been a real education. I talked to one of the people behind Caja and learned a lot.
You can expose an HTTP proxy over a vsock into the VM.
Now maybe our understanding of logic systems is wrong, and it's just fundamentally impossible to develop programs that lack exploitable vulnerabilities -- that you can always "exploit with more energy". But there's no reason to believe the energy metaphor transfers to logic and intelligence.
Cyberdemolitions expertise is about as relevant to cybersecurity as gun making is to bulletproof vest making. Necessary for validation, but not very related to the fundamental engineering and technology.
Or if you see AI as more tool and less entity, better gunsafes for our guns.
This same assumption is built around the singularity, the TAM of 30Trillion, etc. It's the idea that complexity will some how collapse upon itself in some bizarre borg like collective.
Entropy is still going to win.