# `Insider.Identity`
[🔗](https://github.com/hiivemarkets/insider/blob/v0.1.0/lib/insider/identity.ex#L1)

Same-node correlation for explicitly declared process identities.

Correlation is layered so absent evidence remains `:unknown`; it is never
converted into a guessed match. The registry intentionally exposes no lookup
by PID.

# `relation`

```elixir
@type relation() :: :same | :different | :unknown
```

# `relations`

```elixir
@type relations() :: %{
  physical: relation(),
  process_generation: relation(),
  logical_actor: relation(),
  logical_operation: relation()
}
```

# `active?`

```elixir
@spec active?(GenServer.server(), term()) :: boolean()
```

# `attach`

```elixir
@spec attach(GenServer.server(), Insider.Event.t(), term()) ::
  {:ok, Insider.Event.t()} | {:error, Insider.Protocol.Error.t()}
```

# `declare`

```elixir
@spec declare(GenServer.server(), Insider.Identity.Subject.t(), keyword()) ::
  {:ok, Insider.Identity.Generation.t()} | {:error, Insider.Protocol.Error.t()}
```

Declares a new process generation for `subject` and returns its
`Insider.Identity.Generation`. Identities are explicit: nothing is inferred
from PIDs.

# `relation`

```elixir
@spec relation(Insider.Identity.Generation.t(), Insider.Identity.Generation.t()) ::
  relations()
```

# `start_link`

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

Starts the identity registry that `declare/3` and `active?/2` operate on.

---

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