Vibe.Context.Serializer (vibe v0.2.2)

Copy Markdown View Source

Serializes session history for compaction and context injection.

Summary

Functions

estimate_tokens(events)

@spec estimate_tokens([Vibe.Trajectory.t()]) :: non_neg_integer()

event_tokens(event)

@spec event_tokens(Vibe.Trajectory.t()) :: non_neg_integer()

file_operations(events)

@spec file_operations([Vibe.Trajectory.t()]) :: %{
  read: MapSet.t(String.t()),
  modified: MapSet.t(String.t())
}

format_file_operations(map)

@spec format_file_operations(%{
  read: MapSet.t(String.t()),
  modified: MapSet.t(String.t())
}) ::
  String.t()

modified_files(events)

@spec modified_files([Vibe.Trajectory.t()]) :: [String.t()]

read_files(events)

@spec read_files([Vibe.Trajectory.t()]) :: [String.t()]

serialize(events)

@spec serialize([Vibe.Trajectory.t()]) :: String.t()