Class: SkillBench::Agent::Summary

Inherits:
Object
  • Object
show all
Defined in:
lib/skill_bench/agent/summary.rb

Overview

Value object capturing sandbox execution metadata.

Holds files changed, commands run, and agent reasoning extracted from an evaluation run for delivery to the judge.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files_changed:, commands_run:, agent_reasoning:) ⇒ Summary

Returns a new instance of Summary.

Parameters:

  • files_changed (Array<String>)

    Modified file paths.

  • commands_run (Array<String>)

    Executed commands.

  • agent_reasoning (String)

    Agent reasoning excerpt.



25
26
27
28
29
# File 'lib/skill_bench/agent/summary.rb', line 25

def initialize(files_changed:, commands_run:, agent_reasoning:)
  @files_changed = files_changed
  @commands_run = commands_run
  @agent_reasoning = agent_reasoning
end

Instance Attribute Details

#agent_reasoningObject (readonly)

Returns the value of attribute agent_reasoning.



10
11
12
# File 'lib/skill_bench/agent/summary.rb', line 10

def agent_reasoning
  @agent_reasoning
end

#commands_runObject (readonly)

Returns the value of attribute commands_run.



10
11
12
# File 'lib/skill_bench/agent/summary.rb', line 10

def commands_run
  @commands_run
end

#files_changedObject (readonly)

Returns the value of attribute files_changed.



10
11
12
# File 'lib/skill_bench/agent/summary.rb', line 10

def files_changed
  @files_changed
end

Class Method Details

.call(files_changed: [], commands_run: [], agent_reasoning: '') ⇒ Hash

Creates an Agent::Summary from execution data.

Parameters:

  • files_changed (Array<String>) (defaults to: [])

    List of file paths modified.

  • commands_run (Array<String>) (defaults to: [])

    List of shell commands executed.

  • agent_reasoning (String) (defaults to: '')

    Excerpt of agent reasoning.

Returns:

  • (Hash)

    Service response with agent_summary or error.



18
19
20
# File 'lib/skill_bench/agent/summary.rb', line 18

def self.call(files_changed: [], commands_run: [], agent_reasoning: '')
  new(files_changed:, commands_run:, agent_reasoning:).call
end

Instance Method Details

#callHash

Returns the agent summary in the service response format.

Returns:

  • (Hash)

    Service response with agent_summary.



34
35
36
# File 'lib/skill_bench/agent/summary.rb', line 34

def call
  { success: true, response: { agent_summary: self } }
end