Pi.Eval.Sandbox (pi_bridge v0.6.22)

Copy Markdown View Source

Restricted Elixir evaluation for untrusted bridge surfaces.

This module uses the optional :dune dependency when available. It is intended for external/user-entered snippets, not for the trusted project introspection path exposed by Pi.Eval.run/2.

Summary

Types

result()

@type result() ::
  {:ok, %{value: term(), inspected: String.t(), stdio: String.t()}}
  | {:error, String.t()}
  | {:error, :unavailable}

Functions

available?()

@spec available?() :: boolean()

eval(code, opts \\ [])

@spec eval(
  String.t(),
  keyword()
) :: result()