Current section

Files

Jump to
pi_bridge lib pi protocol tool eval_request.ex
Raw

lib/pi/protocol/tool/eval_request.ex

defmodule Pi.Protocol.Tool.EvalRequest do
@moduledoc "Arguments for project eval tools."
use JSONCodec, fast_path: :json
defstruct [:code, timeout: nil, mode: :trusted]
@type mode :: :trusted | :sandbox
@type t :: %__MODULE__{code: String.t(), timeout: non_neg_integer() | nil, mode: mode()}
codec(:mode, atom: {:enum, [:trusted, :sandbox]})
end