Class: Aircana::Configuration
- Inherits:
-
Object
- Object
- Aircana::Configuration
- Defined in:
- lib/aircana/configuration.rb
Instance Attribute Summary collapse
-
#agents_dir ⇒ Object
Returns the value of attribute agents_dir.
-
#bedrock_model ⇒ Object
Returns the value of attribute bedrock_model.
-
#bedrock_region ⇒ Object
Returns the value of attribute bedrock_region.
-
#claude_code_config_path ⇒ Object
Returns the value of attribute claude_code_config_path.
-
#claude_code_project_config_path ⇒ Object
Returns the value of attribute claude_code_project_config_path.
-
#commands_dir ⇒ Object
Returns the value of attribute commands_dir.
-
#confluence_api_token ⇒ Object
Returns the value of attribute confluence_api_token.
-
#confluence_base_url ⇒ Object
Returns the value of attribute confluence_base_url.
-
#confluence_username ⇒ Object
Returns the value of attribute confluence_username.
-
#global_dir ⇒ Object
Returns the value of attribute global_dir.
-
#hooks_dir ⇒ Object
Returns the value of attribute hooks_dir.
-
#kb_knowledge_dir ⇒ Object
Returns the value of attribute kb_knowledge_dir.
-
#llm_provider ⇒ Object
Returns the value of attribute llm_provider.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#plugin_manifest_dir ⇒ Object
Returns the value of attribute plugin_manifest_dir.
-
#plugin_root ⇒ Object
Returns the value of attribute plugin_root.
-
#project_dir ⇒ Object
Returns the value of attribute project_dir.
-
#scripts_dir ⇒ Object
Returns the value of attribute scripts_dir.
-
#skills_dir ⇒ Object
Returns the value of attribute skills_dir.
-
#stream ⇒ Object
Returns the value of attribute stream.
Instance Method Summary collapse
-
#hooks_manifest_path ⇒ Object
Returns the path to the hooks manifest file.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#kb_knowledge_path(kb_name) ⇒ Object
Returns the knowledge directory for a specific KB (same as kb_path for now) Kept for API compatibility during refactoring.
-
#kb_path(kb_name) ⇒ Object
Returns the knowledge directory path for a KB Format: .claude/skills/
/ All knowledge files stored directly in the skill directory. -
#plugin_manifest_path ⇒ Object
Returns the path to the plugin manifest file.
-
#plugin_mode? ⇒ Boolean
Returns true if the current directory is a plugin (has .claude-plugin/plugin.json).
-
#plugin_name ⇒ Object
Returns the plugin name from plugin.json, or falls back to directory name.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 |
# File 'lib/aircana/configuration.rb', line 13 def initialize setup_directory_paths setup_plugin_paths setup_claude_code_paths setup_stream setup_confluence_config setup_llm_config end |
Instance Attribute Details
#agents_dir ⇒ Object
Returns the value of attribute agents_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def agents_dir @agents_dir end |
#bedrock_model ⇒ Object
Returns the value of attribute bedrock_model.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def bedrock_model @bedrock_model end |
#bedrock_region ⇒ Object
Returns the value of attribute bedrock_region.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def bedrock_region @bedrock_region end |
#claude_code_config_path ⇒ Object
Returns the value of attribute claude_code_config_path.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def claude_code_config_path @claude_code_config_path end |
#claude_code_project_config_path ⇒ Object
Returns the value of attribute claude_code_project_config_path.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def claude_code_project_config_path @claude_code_project_config_path end |
#commands_dir ⇒ Object
Returns the value of attribute commands_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def commands_dir @commands_dir end |
#confluence_api_token ⇒ Object
Returns the value of attribute confluence_api_token.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def confluence_api_token @confluence_api_token end |
#confluence_base_url ⇒ Object
Returns the value of attribute confluence_base_url.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def confluence_base_url @confluence_base_url end |
#confluence_username ⇒ Object
Returns the value of attribute confluence_username.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def confluence_username @confluence_username end |
#global_dir ⇒ Object
Returns the value of attribute global_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def global_dir @global_dir end |
#hooks_dir ⇒ Object
Returns the value of attribute hooks_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def hooks_dir @hooks_dir end |
#kb_knowledge_dir ⇒ Object
Returns the value of attribute kb_knowledge_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def kb_knowledge_dir @kb_knowledge_dir end |
#llm_provider ⇒ Object
Returns the value of attribute llm_provider.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def llm_provider @llm_provider end |
#output_dir ⇒ Object
Returns the value of attribute output_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def output_dir @output_dir end |
#plugin_manifest_dir ⇒ Object
Returns the value of attribute plugin_manifest_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def plugin_manifest_dir @plugin_manifest_dir end |
#plugin_root ⇒ Object
Returns the value of attribute plugin_root.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def plugin_root @plugin_root end |
#project_dir ⇒ Object
Returns the value of attribute project_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def project_dir @project_dir end |
#scripts_dir ⇒ Object
Returns the value of attribute scripts_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def scripts_dir @scripts_dir end |
#skills_dir ⇒ Object
Returns the value of attribute skills_dir.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def skills_dir @skills_dir end |
#stream ⇒ Object
Returns the value of attribute stream.
7 8 9 |
# File 'lib/aircana/configuration.rb', line 7 def stream @stream end |
Instance Method Details
#hooks_manifest_path ⇒ Object
Returns the path to the hooks manifest file
33 34 35 |
# File 'lib/aircana/configuration.rb', line 33 def hooks_manifest_path File.join(@hooks_dir, "hooks.json") end |
#kb_knowledge_path(kb_name) ⇒ Object
Returns the knowledge directory for a specific KB (same as kb_path for now) Kept for API compatibility during refactoring
62 63 64 |
# File 'lib/aircana/configuration.rb', line 62 def kb_knowledge_path(kb_name) kb_path(kb_name) end |
#kb_path(kb_name) ⇒ Object
Returns the knowledge directory path for a KB
Format: .claude/skills/
56 57 58 |
# File 'lib/aircana/configuration.rb', line 56 def kb_path(kb_name) File.join(@skills_dir, kb_name) end |
#plugin_manifest_path ⇒ Object
Returns the path to the plugin manifest file
28 29 30 |
# File 'lib/aircana/configuration.rb', line 28 def plugin_manifest_path File.join(@plugin_manifest_dir, "plugin.json") end |
#plugin_mode? ⇒ Boolean
Returns true if the current directory is a plugin (has .claude-plugin/plugin.json)
23 24 25 |
# File 'lib/aircana/configuration.rb', line 23 def plugin_mode? File.exist?(File.join(@plugin_root, ".claude-plugin", "plugin.json")) end |
#plugin_name ⇒ Object
Returns the plugin name from plugin.json, or falls back to directory name
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/aircana/configuration.rb', line 38 def plugin_name return @plugin_name if defined?(@plugin_name) @plugin_name = if plugin_mode? manifest = JSON.parse(File.read(plugin_manifest_path)) manifest["name"] else # Fallback to directory name if not in plugin mode File.basename(@plugin_root).downcase.gsub(/[^a-z0-9]+/, "-") end rescue StandardError # If anything fails, use directory name as fallback File.basename(@plugin_root).downcase.gsub(/[^a-z0-9]+/, "-") end |