Serializable harness envelope for running an agent across requests.
A session is data. It stores the agent spec, request history, hibernated snapshots, pending review requests, and the latest result/error. It does not own processes or runtime capabilities.
Summary
Types
@type status() :: :new | :running | :hibernated | :waiting | :finished | :error
@type t() :: %Jidoka.Harness.Session{ agent_id: binary(), error: nil | nil | any(), metadata: map(), pending_reviews: [term()], requests: [term()], result: nil | nil | term(), schema_version: integer(), session_id: binary(), snapshots: [term()], spec: term(), status: (:new | :running | :hibernated | :waiting | :finished | :error) | binary() }
Functions
@spec latest_snapshot(t()) :: Jidoka.Runtime.AgentSnapshot.t() | nil
@spec put_request(t(), Jidoka.Turn.Request.t()) :: t()
@spec put_result(t(), Jidoka.Turn.Result.t()) :: t()
@spec put_snapshot(t(), Jidoka.Runtime.AgentSnapshot.t()) :: t()
@spec schema() :: Zoi.schema()
@spec schema_version() :: pos_integer()
@spec start( Jidoka.Agent.Spec.t(), keyword() ) :: {:ok, t()} | {:error, term()}
@spec statuses() :: [status()]