Module: XAeonAgents::Config
- Extended by:
- Logger
- Defined in:
- lib/x_aeon_agents/config.rb
Overview
Singleton module to get all configuration of X-Aeon Agents
Public API collapse
-
.data_dir ⇒ String
X-Aeon Agents data directory.
-
.default_cline_cli_args ⇒ Hash{Symbol => Object}
Default Cline CLI arguments.
Public API collapse
-
.agent_options ⇒ AgentOptions
The available agent options.
-
.configure(**kwargs) ⇒ Object
Configure X-Aeon Agents.
-
.debug ⇒ Boolean
The debug mode.
-
.debug=(value) ⇒ Boolean
The debug mode.
Internal collapse
-
.setup_ai_agents ⇒ Object
Setup ai-agents in a lazy and memoized way.
-
.setup_cline ⇒ Object
Setup Cline in a lazy and memoized way.
-
.setup_composable_agents ⇒ Object
Setup composable_agents in a lazy and memoized way.
Methods included from Logger
Class Attribute Details
.data_dir ⇒ String
Returns X-Aeon Agents data directory.
46 47 48 |
# File 'lib/x_aeon_agents/config.rb', line 46 def data_dir @data_dir ||= '.x_aeon_agents' end |
.default_cline_cli_args ⇒ Hash{Symbol => Object}
Returns Default Cline CLI arguments.
54 55 56 |
# File 'lib/x_aeon_agents/config.rb', line 54 def default_cline_cli_args @default_cline_cli_args ||= { thinking: 'xhigh' } end |
Class Method Details
.agent_options ⇒ AgentOptions
Returns The available agent options.
70 71 72 |
# File 'lib/x_aeon_agents/config.rb', line 70 def @agent_options ||= AgentOptions.new end |
.configure(**kwargs) ⇒ Object
Configure X-Aeon Agents
77 78 79 80 81 82 |
# File 'lib/x_aeon_agents/config.rb', line 77 def configure(**kwargs) kwargs.each do |property, value| send(:"#{property}=", value) end Logger.debug = debug end |
.debug ⇒ Boolean
Returns The debug mode.
65 66 67 |
# File 'lib/x_aeon_agents/config.rb', line 65 def debug @debug ||= ENV['X_AEON_AGENTS_DEBUG'] == '1' end |
.debug=(value) ⇒ Boolean
Returns The debug mode.
59 60 61 62 |
# File 'lib/x_aeon_agents/config.rb', line 59 def debug=(value) @debug = value Logger.debug = debug end |
.setup_ai_agents ⇒ Object
Setup ai-agents in a lazy and memoized way
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/x_aeon_agents/config.rb', line 92 def setup_ai_agents ENV['RUBYLLM_DEBUG'] = '1' if debug ::Agents.configure do |ai_agents_config| ai_agents_config.debug = debug end RubyLLM.configure do |ruby_llm_config| ruby_llm_config.openrouter_api_key = openrouter_api_key end # Discover all the models RubyLLM::Models.refresh! end |
.setup_cline ⇒ Object
Setup Cline in a lazy and memoized way
105 106 107 |
# File 'lib/x_aeon_agents/config.rb', line 105 def setup_cline # Nothing to do end |
.setup_composable_agents ⇒ Object
Setup composable_agents in a lazy and memoized way
87 88 89 |
# File 'lib/x_aeon_agents/config.rb', line 87 def setup_composable_agents ENV['COMPOSABLE_AGENTS_DEBUG'] = '1' if debug end |