A catalog an agent registers, together with the transformers applied to it.
config =
A2UIAgent.CatalogConfig.new(catalog,
transformers: [A2UIAgent.CatalogTransformer.component_pruning(["Text", "Button"])]
)
config.transformed
#=> the pruned catalog, which prompts and validation useThe transformed catalog is computed once, when the config is built.
Summary
Functions
Loads a catalog file with A2UIAgent.CatalogProvider.load_file/2 and
registers it. Options: :transformers, :catalog_id,
:protocol_version.
Registers catalog. Option: :transformers, applied in order.
Types
@type t() :: %A2UIAgent.CatalogConfig{ catalog: A2UICore.Catalog.t(), transformed: A2UICore.Catalog.t(), transformers: [A2UIAgent.CatalogTransformer.t()] }
Functions
@spec from_path(String.t(), keyword()) :: {:ok, t()} | {:error, A2UICore.Error.t()}
Loads a catalog file with A2UIAgent.CatalogProvider.load_file/2 and
registers it. Options: :transformers, :catalog_id,
:protocol_version.
@spec new(A2UICore.Catalog.t(), keyword()) :: t()
Registers catalog. Option: :transformers, applied in order.