Agentix.Notifier behaviour (Agentix v0.1.0)

Copy Markdown View Source

The seam for the live event plane — the lossy, never-canonical stream of deltas, state changes, and progress the renderer projects.

Canonical history is the event log (Agentix.Persistence); the notifier carries only the live tail. Two implementations ship:

Configure with config :agentix, :notifier, Agentix.Notifier.None. The pubsub argument is the registered Phoenix.PubSub name (resolved per conversation from config, defaulting to Agentix.PubSub, which the application starts).

Summary

Types

The registered Phoenix.PubSub name, or nil for notifiers that need none.

Callbacks

Broadcasts message to topic over pubsub. Always returns :ok — a dropped live event must never become an error (the canonical log is the source of truth).

Functions

Broadcasts via the configured notifier.

The configured notifier implementation.

Types

pubsub()

@type pubsub() :: atom() | nil

The registered Phoenix.PubSub name, or nil for notifiers that need none.

Callbacks

broadcast(pubsub, topic, message)

@callback broadcast(pubsub(), topic :: String.t(), message :: term()) :: :ok

Broadcasts message to topic over pubsub. Always returns :ok — a dropped live event must never become an error (the canonical log is the source of truth).

Functions

broadcast(pubsub, topic, message)

@spec broadcast(pubsub(), String.t(), term()) :: :ok

Broadcasts via the configured notifier.

impl()

@spec impl() :: module()

The configured notifier implementation.