Class: AgUiProtocol::Core::Capabilities::ExecutionCapabilities

Inherits:
Types::Model
  • Object
show all
Defined in:
lib/ag_ui_protocol/core/capabilities.rb

Overview

Execution control and limits.

Declare these so clients can set expectations about how long or how many steps an agent run might take.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(code_execution: nil, sandboxed: nil, max_iterations: nil, max_execution_time: nil) ⇒ ExecutionCapabilities

Returns a new instance of ExecutionCapabilities.



542
543
544
545
546
547
548
549
550
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 542

def initialize(
  code_execution: nil, sandboxed: nil,
  max_iterations: nil, max_execution_time: nil
)
  @code_execution = code_execution
  @sandboxed = sandboxed
  @max_iterations = max_iterations
  @max_execution_time = max_execution_time
end

Instance Attribute Details

#code_executionObject (readonly)

Returns the value of attribute code_execution.



519
520
521
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 519

def code_execution
  @code_execution
end

#max_execution_timeObject (readonly)

Returns the value of attribute max_execution_time.



528
529
530
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 528

def max_execution_time
  @max_execution_time
end

#max_iterationsObject (readonly)

Returns the value of attribute max_iterations.



525
526
527
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 525

def max_iterations
  @max_iterations
end

#sandboxedObject (readonly)

Returns the value of attribute sandboxed.



522
523
524
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 522

def sandboxed
  @sandboxed
end

Instance Method Details

#to_hObject



553
554
555
556
557
558
559
560
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 553

def to_h
  {
    code_execution: @code_execution,
    sandboxed: @sandboxed,
    max_iterations: @max_iterations,
    max_execution_time: @max_execution_time
  }
end