Vibe.Runtime.Alert (vibe v0.2.0)

Copy Markdown View Source

Renderer-neutral runtime alert surfaced by Vibe system services.

Alerts describe operational state such as BEAM memory pressure or low disk space. They are suitable for semantic UI state and dashboards; prompt/model injection remains a separate policy decision.

Summary

Types

severity()

@type severity() :: :info | :warning | :error

t()

@type t() :: %Vibe.Runtime.Alert{
  at: DateTime.t(),
  detail: String.t() | nil,
  id: String.t(),
  message: String.t(),
  severity: severity(),
  source: atom(),
  title: String.t(),
  type: atom()
}

Functions

from_alarm(action, alarm_id, description, opts \\ [])

@spec from_alarm(:set | :clear, term(), term(), keyword()) :: t()

normalize(alert)

@spec normalize(t() | map()) :: t()

to_map(alert)

@spec to_map(t()) :: map()

to_notification(alert)

@spec to_notification(t()) :: Vibe.UI.Notification.t()