Agentic.Strategy.Registry (agentic v0.2.2)

Copy Markdown

Process registry for strategy modules.

Strategies are registered by their id/0 callback. The Default strategy is always pre-registered.

Summary

Functions

Return all registered strategies as a map of id -> module.

Returns a specification to start this module under a supervisor.

Fetch a strategy module by id, or nil if not registered.

Fetch a strategy module by id, raising if not found.

Register a strategy module.

Functions

all()

@spec all() :: %{required(atom()) => module()}

Return all registered strategies as a map of id -> module.

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

fetch(id)

@spec fetch(atom()) :: module() | nil

Fetch a strategy module by id, or nil if not registered.

fetch!(id)

@spec fetch!(atom()) :: module()

Fetch a strategy module by id, raising if not found.

register(mod)

@spec register(module()) :: :ok

Register a strategy module.

start_link(opts)