Class: RailsAiBridge::Tools::ListRegistry::RegistryCatalogFormatter Private
- Inherits:
-
Object
- Object
- RailsAiBridge::Tools::ListRegistry::RegistryCatalogFormatter
- Includes:
- Registry::Truncatable
- Defined in:
- lib/rails_ai_bridge/tools/list_registry.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Formats the registry catalog as markdown for a given type.
Single responsibility: converts resolver data into display-ready markdown. Does not know about MCP, tools, or configuration.
Instance Method Summary collapse
-
#format ⇒ String
private
Markdown string.
-
#initialize(resolver, type:, pack_filter: nil) ⇒ RegistryCatalogFormatter
constructor
private
A new instance of RegistryCatalogFormatter.
Methods included from Registry::Truncatable
Constructor Details
#initialize(resolver, type:, pack_filter: nil) ⇒ RegistryCatalogFormatter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RegistryCatalogFormatter.
114 115 116 117 118 |
# File 'lib/rails_ai_bridge/tools/list_registry.rb', line 114 def initialize(resolver, type:, pack_filter: nil) @resolver = resolver @type = type @pack_filter = pack_filter end |
Instance Method Details
#format ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns markdown string.
121 122 123 124 125 126 127 |
# File 'lib/rails_ai_bridge/tools/list_registry.rb', line 121 def format case @type when 'skills' then format_catalog(@resolver.list_skills, noun: 'Skill') when 'agents' then format_catalog(@resolver.list_agents, noun: 'Agent') when 'packs' then format_packs(@resolver.active_packs) end end |