CouncilEx.AutoCouncil.Resolver (CouncilEx v0.1.0)

Copy Markdown View Source

Strategy dispatch for CouncilEx.AutoCouncil.

Responsibilities:

  • Map a strategy atom (:rules, :cascade, ...) to its implementing module, or use a {module, opts} tuple verbatim.
  • Invoke the strategy, normalize its return shape into a decision + meta.
  • Apply :on_no_match fallback when the strategy can't resolve.
  • Emit [:council_ex, :auto_council, :decision] telemetry.

Most callers should use CouncilEx.AutoCouncil.resolve/2 instead of this module directly.

Summary

Functions

Resolve catalog references — accepts inline list or {:registry, :council}. Returns a list of catalog entry maps. Strategies call this; centralized so registry coupling lives in one place.

Resolve a routing decision for prompt.

Functions

catalog_entries(auto)

@spec catalog_entries(CouncilEx.AutoCouncil.t()) :: [map()]

Resolve catalog references — accepts inline list or {:registry, :council}. Returns a list of catalog entry maps. Strategies call this; centralized so registry coupling lives in one place.

When the parent AutoCouncil has provider_check: true, entries whose council requires unconfigured providers are filtered out and a [:council_ex, :auto_council, :catalog_filtered] telemetry event fires with the count.

resolve(auto, prompt)

Resolve a routing decision for prompt.

See CouncilEx.AutoCouncil.resolve/2 for the public entry point.