Class: AgentHarness::Providers::Aider

Inherits:
Base
  • Object
show all
Defined in:
lib/agent_harness/providers/aider.rb

Overview

Aider AI coding assistant provider

Provides integration with the Aider CLI tool.

Instance Attribute Summary

Attributes inherited from Base

#config, #executor, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#configure, #initialize, #send_message

Methods included from Adapter

#dangerous_mode_flags, #error_patterns, #fetch_mcp_servers, #health_status, included, #send_message, #supports_dangerous_mode?, #supports_mcp?, #validate_config

Constructor Details

This class inherits a constructor from AgentHarness::Providers::Base

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/agent_harness/providers/aider.rb', line 18

def available?
  executor = AgentHarness.configuration.command_executor
  !!executor.which(binary_name)
end

.binary_nameObject



14
15
16
# File 'lib/agent_harness/providers/aider.rb', line 14

def binary_name
  "aider"
end

.discover_modelsObject



43
44
45
46
47
48
49
50
51
# File 'lib/agent_harness/providers/aider.rb', line 43

def discover_models
  return [] unless available?

  # Aider supports multiple model providers
  [
    {name: "gpt-4o", family: "gpt-4o", tier: "standard", provider: "aider"},
    {name: "claude-3-5-sonnet", family: "claude-3-5-sonnet", tier: "standard", provider: "aider"}
  ]
end

.firewall_requirementsObject



23
24
25
26
27
28
29
30
31
# File 'lib/agent_harness/providers/aider.rb', line 23

def firewall_requirements
  {
    domains: [
      "api.openai.com",
      "api.anthropic.com"
    ],
    ip_ranges: []
  }
end

.instruction_file_pathsObject



33
34
35
36
37
38
39
40
41
# File 'lib/agent_harness/providers/aider.rb', line 33

def instruction_file_paths
  [
    {
      path: ".aider.conf.yml",
      description: "Aider configuration file",
      symlink: false
    }
  ]
end

.provider_nameObject



10
11
12
# File 'lib/agent_harness/providers/aider.rb', line 10

def provider_name
  :aider
end

Instance Method Details

#capabilitiesObject



62
63
64
65
66
67
68
69
70
71
72
# File 'lib/agent_harness/providers/aider.rb', line 62

def capabilities
  {
    streaming: true,
    file_upload: true,
    vision: false,
    tool_use: true,
    json_mode: false,
    mcp: false,
    dangerous_mode: false
  }
end

#display_nameObject



58
59
60
# File 'lib/agent_harness/providers/aider.rb', line 58

def display_name
  "Aider"
end

#nameObject



54
55
56
# File 'lib/agent_harness/providers/aider.rb', line 54

def name
  "aider"
end

#session_flags(session_id) ⇒ Object



78
79
80
81
# File 'lib/agent_harness/providers/aider.rb', line 78

def session_flags(session_id)
  return [] unless session_id && !session_id.empty?
  ["--restore-chat-history", session_id]
end

#supports_sessions?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/agent_harness/providers/aider.rb', line 74

def supports_sessions?
  true
end