JSON codec for session event serialization and deserialization.
Summary
Functions
@spec decode_eval_state_binary(binary()) :: {:ok, %{binding: Code.binding(), env: Macro.Env.t()}} | :error
@spec decode_eval_state_line(String.t(), term()) :: %{binding: Code.binding(), env: Macro.Env.t()} | term()
@spec decode_trajectory_line(String.t()) :: [Vibe.Trajectory.t()]
@spec decode_trajectory_map(map()) :: {:ok, Vibe.Trajectory.t()} | :error
@spec decode_ui_event_line(String.t()) :: [{non_neg_integer(), Vibe.UI.Event.t()}]
@spec decode_ui_event_map(map()) :: {:ok, {non_neg_integer(), Vibe.UI.Event.t()}} | :error
@spec encode_trajectory(Vibe.Trajectory.t()) :: map()
@spec encode_ui_event(Vibe.UI.Event.t(), non_neg_integer()) :: map()
@spec eval_state_entry(String.t(), Code.binding(), Macro.Env.t()) :: {:ok, map()} | {:error, term()}
@spec project_trajectory_events([Vibe.Trajectory.t()]) :: [ {pos_integer(), Vibe.UI.Event.t()} ]