Documentation
¶
Overview ¶
Package wasm is the wazero-backed sandbox for agent-generated Go snippets. Boots an embedded Yaegi runner compiled for GOOS=wasip1; the host instantiates a fresh module per call and feeds the snippet source through stdin. Result envelope arrives on stdout after a sentinel that separates it from any user-emitted output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements sandbox.Sandbox by routing Go snippets through an embedded Yaegi-on-Wasm runner. Holds one wazero.Runtime + compiled module for the life of the backend; per-Exec instantiates a fresh wasm module so snippets cannot share state.
func (*Backend) Capabilities ¶
func (b *Backend) Capabilities() sandbox.CapabilitySet
Capabilities reports the wasm backend's enforcement reach.
func (*Backend) Exec ¶
func (b *Backend) Exec(ctx context.Context, req sandbox.ExecRequest) (sandbox.ExecResult, error)
Exec runs the snippet inside a fresh wasm instance.