Class: Lemans::Agents::Base
- Inherits:
-
Object
- Object
- Lemans::Agents::Base
- Defined in:
- lib/lemans/agents/base.rb
Overview
What the harness asks of an agent: install yourself, then work on the instruction. The name-to-class registry lives on the Agents module.
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
Instance Method Summary collapse
- #call(environment, task:, logs_dir:) ⇒ Object
-
#initialize(profile:, model: nil) ⇒ Base
constructor
A new instance of Base.
-
#install(_environment, task:) ⇒ Object
Run before the agent phase's network policy narrows, so an agent that pulls its own runtime can still reach a package index.
- #name ⇒ Object
Constructor Details
#initialize(profile:, model: nil) ⇒ Base
Returns a new instance of Base.
12 13 14 15 |
# File 'lib/lemans/agents/base.rb', line 12 def initialize(profile:, model: nil) @profile = profile @model = model || profile.model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
10 11 12 |
# File 'lib/lemans/agents/base.rb', line 10 def model @model end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
10 11 12 |
# File 'lib/lemans/agents/base.rb', line 10 def profile @profile end |
Instance Method Details
#call(environment, task:, logs_dir:) ⇒ Object
23 |
# File 'lib/lemans/agents/base.rb', line 23 def call(environment, task:, logs_dir:) = raise(NotImplementedError) |
#install(_environment, task:) ⇒ Object
Run before the agent phase's network policy narrows, so an agent that pulls its own runtime can still reach a package index.
21 |
# File 'lib/lemans/agents/base.rb', line 21 def install(_environment, task:) = nil # rubocop:disable Lint/UnusedMethodArgument |
#name ⇒ Object
17 |
# File 'lib/lemans/agents/base.rb', line 17 def name = self.class::NAME |