# `Jidoka.Turn.Result`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/turn/result.ex#L1)

Final app-facing result of one Jidoka turn.

# `t`

```elixir
@type t() :: %Jidoka.Turn.Result{
  agent_state: term(),
  content: binary(),
  events: [term()],
  journal: term(),
  metadata: map(),
  parts: [term()],
  usage: map(),
  value: nil | nil | any()
}
```

# `from_turn_state!`

```elixir
@spec from_turn_state!(Jidoka.Turn.State.t()) :: t()
```

Projects finished turn state into the public result contract.

# `new`

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

Builds a turn result from keyword or map attributes.

# `new!`

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

Builds a turn result and raises if the attributes are invalid.

# `schema`

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

Returns the Zoi schema for a completed turn result.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
