Class: TheLocal::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/the_local/registry.rb

Overview

Accumulates the providers and agents contributed by everything that calls TheLocal.register. The install generator reads this to write .claude/agents/ and the delegation trigger.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRegistry

Returns a new instance of Registry.



12
13
14
15
# File 'lib/the_local/registry.rb', line 12

def initialize
  @agents = []
  @providers = []
end

Instance Attribute Details

#agentsObject (readonly)

Returns the value of attribute agents.



17
18
19
# File 'lib/the_local/registry.rb', line 17

def agents
  @agents
end

#providersObject (readonly)

Returns the value of attribute providers.



17
18
19
# File 'lib/the_local/registry.rb', line 17

def providers
  @providers
end

Instance Method Details

#add(agent) ⇒ Object



19
20
21
# File 'lib/the_local/registry.rb', line 19

def add(agent)
  @agents << agent
end

#add_provider(provider) ⇒ Object



23
24
25
# File 'lib/the_local/registry.rb', line 23

def add_provider(provider)
  @providers << provider
end

#clearObject



27
28
29
30
# File 'lib/the_local/registry.rb', line 27

def clear
  @agents.clear
  @providers.clear
end