Jidoka.Eval.Case (Jidoka v0.9.0)

Copy Markdown View Source

Deterministic evaluation case for one Jidoka turn.

Eval cases are ordinary data: an agent spec, a turn request, and lightweight assertions that can run against fake or live capabilities supplied by the caller.

Summary

Functions

Normalizes an existing evaluation case, keyword list, or map.

Builds an evaluation case and validates its optional matcher.

Builds an evaluation case and raises if the attributes are invalid.

Returns the Zoi schema for an evaluation case.

Types

t()

@type t() :: %Jidoka.Eval.Case{
  agent: term(),
  assertions: map(),
  id: binary(),
  metadata: map(),
  request: term()
}

Functions

from_input(input, opts \\ [])

@spec from_input(
  t() | keyword() | map(),
  keyword()
) :: {:ok, t()} | {:error, term()}

Normalizes an existing evaluation case, keyword list, or map.

new(attrs, opts \\ [])

@spec new(
  keyword() | map(),
  keyword()
) :: {:ok, t()} | {:error, term()}

Builds an evaluation case and validates its optional matcher.

new!(attrs, opts \\ [])

@spec new!(
  keyword() | map(),
  keyword()
) :: t()

Builds an evaluation case and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for an evaluation case.