# `MingaGhostCursors.Tracker`
[🔗](https://github.com/jsmestad/minga-ghost-cursors/blob/main/lib/minga_ghost_cursors/tracker.ex#L1)

Tracks agent edit positions and manages ghost cursor overlays.

Subscribes to `:buffer_changed` events, filters for agent-sourced
edits, and registers overlays via `Minga.Extension.Overlay`. Monitors
agent session PIDs so overlays are cleaned up when sessions end.

# `last_edit`

```elixir
@type last_edit() :: {overlay_key(), position()} | nil
```

# `overlay_key`

```elixir
@type overlay_key() :: {buffer :: pid(), session :: pid()}
```

# `position`

```elixir
@type position() :: {line :: non_neg_integer(), col :: non_neg_integer()}
```

# `state`

```elixir
@type state() :: %{
  monitored: %{optional(pid()) =&gt; reference()},
  labels: %{optional(pid()) =&gt; String.t()},
  last_updated: last_edit(),
  host: host()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `last_updated`

```elixir
@spec last_updated(GenServer.server()) :: last_edit()
```

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

---

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