Class: RailsAiBridge::Registry::PackResolver
- Inherits:
-
Object
- Object
- RailsAiBridge::Registry::PackResolver
- Defined in:
- lib/rails_ai_bridge/registry/pack_resolver.rb
Overview
Service object responsible for resolving and loading skill packs and registries.
Orchestrates the loading of packs from the registry manifest, handling framework auto-detection, explicit pack selection, and local registry overrides. Returns a Resolver instance with all packs loaded and prioritized.
Constant Summary collapse
- RAILS_PACK =
Pack name constants
'rails'- HANAMI_PACK =
'hanami'- CORE_PACK =
'core'- PRIORITY_HIGH =
Priority constants (lower is higher priority)
10- PRIORITY_MEDIUM =
20- PRIORITY_LOW =
30
Instance Method Summary collapse
-
#initialize(source_resolver, pack_detector = PackDetector) ⇒ PackResolver
constructor
Creates a new PackResolverService with a reference to a SkillSourceResolver.
-
#resolve(manifest, explicit_packs = nil, local_registries = nil) ⇒ Resolver
Resolves active packs from the manifest and custom configuration.
Constructor Details
#initialize(source_resolver, pack_detector = PackDetector) ⇒ PackResolver
Creates a new PackResolverService with a reference to a SkillSourceResolver.
25 26 27 28 |
# File 'lib/rails_ai_bridge/registry/pack_resolver.rb', line 25 def initialize(source_resolver, pack_detector = PackDetector) @source_resolver = source_resolver @pack_detector = pack_detector end |
Instance Method Details
#resolve(manifest, explicit_packs = nil, local_registries = nil) ⇒ Resolver
Resolves active packs from the manifest and custom configuration.
This will automatically resolve remote repositories if needed, load the tile manifest configurations, and merge local directory overrides.
:reek:TooManyStatements -- Necessary complexity for pack loading logic
40 41 42 43 44 45 46 |
# File 'lib/rails_ai_bridge/registry/pack_resolver.rb', line 40 def resolve(manifest, explicit_packs = nil, local_registries = nil) active_pack_names = gather_active_packs(manifest, explicit_packs) loaded_packs = load_defined_packs(manifest, active_pack_names) load_local_registries(loaded_packs, local_registries) Resolver.new(loaded_packs) end |