Class: RobotLab::RobotSpec

Inherits:
Data
  • Object
show all
Defined in:
lib/robot_lab/ractor_job.rb

Overview

Carries everything needed to reconstruct a Robot inside a Ractor. All fields must be frozen strings, symbols, or hashes.

Examples:

spec = RobotSpec.new(
  name:          "analyst",
  template:      :analyst,
  system_prompt: nil,
  config_hash:   { model: "claude-sonnet-4" }.freeze
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, template:, system_prompt:, config_hash:, hook_classes: [].freeze) ⇒ RobotSpec

Returns a new instance of RobotSpec.



37
38
39
# File 'lib/robot_lab/ractor_job.rb', line 37

def initialize(name:, template:, system_prompt:, config_hash:, hook_classes: [].freeze)
  super
end

Instance Attribute Details

#config_hashObject (readonly)

Returns the value of attribute config_hash

Returns:

  • (Object)

    the current value of config_hash



36
37
38
# File 'lib/robot_lab/ractor_job.rb', line 36

def config_hash
  @config_hash
end

#hook_classesObject (readonly)

Returns the value of attribute hook_classes

Returns:

  • (Object)

    the current value of hook_classes



36
37
38
# File 'lib/robot_lab/ractor_job.rb', line 36

def hook_classes
  @hook_classes
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



36
37
38
# File 'lib/robot_lab/ractor_job.rb', line 36

def name
  @name
end

#system_promptObject (readonly)

Returns the value of attribute system_prompt

Returns:

  • (Object)

    the current value of system_prompt



36
37
38
# File 'lib/robot_lab/ractor_job.rb', line 36

def system_prompt
  @system_prompt
end

#templateObject (readonly)

Returns the value of attribute template

Returns:

  • (Object)

    the current value of template



36
37
38
# File 'lib/robot_lab/ractor_job.rb', line 36

def template
  @template
end