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, lockfile = nil) ⇒ 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, lockfile = nil) ⇒ PackResolver
Creates a new PackResolverService with a reference to a SkillSourceResolver.
26 27 28 29 30 |
# File 'lib/rails_ai_bridge/registry/pack_resolver.rb', line 26 def initialize(source_resolver, pack_detector = PackDetector, lockfile = nil) @source_resolver = source_resolver @pack_detector = pack_detector @lockfile = lockfile || default_lockfile 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, merge local directory overrides, and verify pack commit SHAs against the configured lockfile.
:reek:TooManyStatements -- Necessary complexity for pack loading logic
43 44 45 46 47 48 49 |
# File 'lib/rails_ai_bridge/registry/pack_resolver.rb', line 43 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 |