Exception: Phronomy::Agent::SuspendSignal Private
- Inherits:
-
StandardError
- Object
- StandardError
- Phronomy::Agent::SuspendSignal
- Defined in:
- lib/phronomy/agent/suspend_signal.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Raised internally inside the on_tool_call hook when an approval-required tool is encountered and no synchronous on_approval_required handler has been registered. Caught by Agent::Base#invoke_once to produce a suspended result hash containing a Checkpoint.
This class is intentionally NOT part of the public API. Callers should inspect the +:suspended+ key in the result hash returned by #invoke.
Instance Attribute Summary collapse
-
#args ⇒ Hash
readonly
private
The arguments the LLM passed to the tool.
-
#tool_call_id ⇒ String
readonly
private
The tool_call_id from the LLM response.
-
#tool_name ⇒ String
readonly
private
The name of the tool that triggered the suspension.
Instance Method Summary collapse
-
#initialize(tool_name:, args:, tool_call_id:) ⇒ SuspendSignal
constructor
private
A new instance of SuspendSignal.
Constructor Details
#initialize(tool_name:, args:, tool_call_id:) ⇒ SuspendSignal
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SuspendSignal.
27 28 29 30 31 32 |
# File 'lib/phronomy/agent/suspend_signal.rb', line 27 def initialize(tool_name:, args:, tool_call_id:) super("Agent suspended waiting for approval of tool: #{tool_name}") @tool_name = tool_name @args = args @tool_call_id = tool_call_id end |
Instance Attribute Details
#args ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the arguments the LLM passed to the tool.
19 20 21 |
# File 'lib/phronomy/agent/suspend_signal.rb', line 19 def args @args end |
#tool_call_id ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the tool_call_id from the LLM response.
22 23 24 |
# File 'lib/phronomy/agent/suspend_signal.rb', line 22 def tool_call_id @tool_call_id end |
#tool_name ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the name of the tool that triggered the suspension.
16 17 18 |
# File 'lib/phronomy/agent/suspend_signal.rb', line 16 def tool_name @tool_name end |