Spectre.Subject (Spectre v0.3.0)

Copy Markdown View Source

Canonical person or entity identity owned by an Agent Instance.

A Subject is deliberately distinct from a channel sender, chat, phone number, or conversation id. External identities reach a Subject only through explicit Spectre.SubjectLink records.

Summary

Functions

Returns an opaque key for Instance and Subject Registry indexes.

Normalizes a portable application identity into a canonical Subject.

Types

t()

@type t() :: %Spectre.Subject{id: String.t(), metadata: map()}

Functions

key(subject)

@spec key(t()) :: String.t()

Returns an opaque key for Instance and Subject Registry indexes.

new(subject, opts \\ [])

@spec new(
  t() | term(),
  keyword()
) :: t()

Normalizes a portable application identity into a canonical Subject.