Class: ClaudeAgentSDK::ToolPermissionContext
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Tool permission context delivered to can_use_tool callbacks.
CLI 2.1.110+ began populating the four pre-formatted display fields
(title, display_name, description, blocked_path,
decision_reason) so the SDK consumer can render the same prompt UI
the CLI would have shown. Older fields (signal, suggestions,
tool_use_id, agent_id) remain unchanged.
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
Returns the value of attribute agent_id.
-
#blocked_path ⇒ Object
Returns the value of attribute blocked_path.
-
#decision_reason ⇒ Object
Returns the value of attribute decision_reason.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#signal ⇒ Object
Returns the value of attribute signal.
-
#suggestions ⇒ Object
Returns the value of attribute suggestions.
-
#title ⇒ Object
Returns the value of attribute title.
-
#tool_use_id ⇒ Object
Returns the value of attribute tool_use_id.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ToolPermissionContext
constructor
A new instance of ToolPermissionContext.
Methods inherited from Type
#[], #[]=, from_hash, #to_h, wrap
Constructor Details
#initialize(attributes = {}) ⇒ ToolPermissionContext
Returns a new instance of ToolPermissionContext.
621 622 623 624 |
# File 'lib/claude_agent_sdk/types.rb', line 621 def initialize(attributes = {}) super @suggestions ||= [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#agent_id ⇒ Object
Returns the value of attribute agent_id.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def agent_id @agent_id end |
#blocked_path ⇒ Object
Returns the value of attribute blocked_path.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def blocked_path @blocked_path end |
#decision_reason ⇒ Object
Returns the value of attribute decision_reason.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def decision_reason @decision_reason end |
#description ⇒ Object
Returns the value of attribute description.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def display_name @display_name end |
#signal ⇒ Object
Returns the value of attribute signal.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def signal @signal end |
#suggestions ⇒ Object
Returns the value of attribute suggestions.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def suggestions @suggestions end |
#title ⇒ Object
Returns the value of attribute title.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def title @title end |
#tool_use_id ⇒ Object
Returns the value of attribute tool_use_id.
617 618 619 |
# File 'lib/claude_agent_sdk/types.rb', line 617 def tool_use_id @tool_use_id end |