Ephemeral data value passed through the Jidoka turn workflow.
Summary
Functions
Applies one interpreted effect result to turn state.
Removes the pending review interrupt from turn state.
Returns the next pending effect, if one exists.
Restores turn state from a compatible agent snapshot.
Builds turn state from keyword or map attributes.
Builds turn state and raises if the attributes are invalid.
Returns true when the turn has a pending effect.
Removes the current effect from the pending queue.
Stores the review interrupt that paused the turn.
Returns the Zoi schema for turn state.
Replaces the pending effect queue.
Types
@type t() :: %Jidoka.Turn.State{ agent_state: term(), diagnostics: [any()], events: [term()], journal: term(), llm_result: nil | nil | term(), loop_index: integer(), memory: nil | nil | term(), operation_plan: nil | nil | term(), pending_effects: [term()], pending_interrupt: nil | nil | term(), plan: term(), prompt: nil | nil | any(), request: term(), result: nil | nil | binary(), result_parts: [term()], result_repair_count: integer(), result_value: nil | nil | any(), spec: term(), started_at_ms: nil | nil | integer(), status: (:running | :waiting) | :finished }
Functions
@spec apply_effect_result(t(), Jidoka.Effect.Result.t()) :: {:ok, t()} | {:error, term()}
Applies one interpreted effect result to turn state.
Removes the pending review interrupt from turn state.
@spec current_pending_effect(t()) :: Jidoka.Effect.Intent.t() | nil
Returns the next pending effect, if one exists.
@spec from_snapshot(Jidoka.Snapshot.t()) :: {:ok, t()} | {:error, term()}
Restores turn state from a compatible agent snapshot.
Builds turn state from keyword or map attributes.
Builds turn state and raises if the attributes are invalid.
Returns true when the turn has a pending effect.
Removes the current effect from the pending queue.
@spec put_pending_interrupt(t(), Jidoka.Review.Interrupt.t()) :: t()
Stores the review interrupt that paused the turn.
@spec schema() :: Zoi.schema()
Returns the Zoi schema for turn state.
@spec set_pending_effects(t(), [Jidoka.Effect.Intent.t()]) :: t()
Replaces the pending effect queue.