Class: SwarmMemory::Integration::CliRegistration
- Inherits:
-
Object
- Object
- SwarmMemory::Integration::CliRegistration
- Defined in:
- lib/swarm_memory/integration/cli_registration.rb
Overview
Auto-registration for SwarmCLI commands
Registers memory management commands with SwarmCLI when available.
Class Method Summary collapse
-
.register! ⇒ void
Register memory CLI commands with SwarmCLI.
Class Method Details
.register! ⇒ void
This method returns an undefined value.
Register memory CLI commands with SwarmCLI
This is called automatically when swarm_memory is required.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/swarm_memory/integration/cli_registration.rb', line 15 def register! # Only register if SwarmCLI::CommandRegistry is available # Check for the specific class, not just the module return unless defined?(SwarmCLI::CommandRegistry) # Load CLI commands explicitly (Zeitwerk might not have loaded it yet) require_relative "../cli/commands" # Register memory command SwarmCLI::CommandRegistry.register(:memory, SwarmMemory::CLI::Commands) rescue StandardError => e warn("Warning: Failed to register SwarmMemory CLI commands: #{e.}") end |