Jidoka.Agent.Spec.Result (Jidoka v0.8.0-beta.1)

Copy Markdown View Source

Structured app-facing result contract for an agent.

The result contract is intentionally provider-neutral. It stores a Zoi schema used by the runtime after a model returns a final decision, plus a bounded repair count for deterministic retry behavior.

Summary

Types

t()

@type t() :: %Jidoka.Agent.Spec.Result{
  max_repairs: integer(),
  metadata: map(),
  schema: any()
}

Functions

from_input(result)

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

new(attrs)

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

new!(attrs)

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

schema()

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

validate(result, value)

@spec validate(t(), term()) :: {:ok, term()} | {:error, term()}