Class: TheLocal::Registry

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

Overview

Accumulates the providers and agents discovered from disk. Installer and TriggerWriter read 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.



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

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

Instance Attribute Details

#agentsObject (readonly)

Returns the value of attribute agents.



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

def agents
  @agents
end

#providersObject (readonly)

Returns the value of attribute providers.



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

def providers
  @providers
end

Instance Method Details

#add(agent) ⇒ Object



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

def add(agent)
  @agents << agent
end

#add_provider(provider) ⇒ Object



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

def add_provider(provider)
  @providers << provider
end

#clearObject



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

def clear
  @agents.clear
  @providers.clear
end