# `Vibe.Context`
[🔗](https://github.com/elixir-vibe/vibe/blob/v0.2.3/lib/vibe/context.ex#L1)

Context compaction for Vibe sessions.

The compactor follows pi's structured checkpoint format: summarize old
conversation/trajectory into a handoff that another model can use to continue,
preserve critical file paths and errors, and append read/modified file lists.

# `compact_result`

```elixir
@type compact_result() :: Vibe.Context.Compactor.compact_result()
```

# `compact`

```elixir
@spec compact(keyword()) :: {:ok, compact_result()} | {:error, term()}
```

Intentional facade for the public Vibe API boundary.

# `compact`

```elixir
@spec compact(
  [Vibe.Trajectory.t()],
  keyword()
) :: {:ok, compact_result()} | {:error, term()}
```

Intentional facade for the public Vibe API boundary.

# `recall`

```elixir
@spec recall(
  String.t(),
  keyword()
) :: String.t()
```

# `serialize`

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

Intentional facade for the public Vibe API boundary.

# `summarize`

```elixir
@spec summarize([Vibe.Trajectory.t()], String.t() | nil, keyword()) ::
  {:ok, String.t()} | {:error, term()}
```

Intentional facade for the public Vibe API boundary.

# `turn_prefix_summary`

```elixir
@spec turn_prefix_summary(
  [Vibe.Trajectory.t()],
  keyword()
) :: {:ok, String.t()} | {:error, term()}
```

Intentional facade for the public Vibe API boundary.

---

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