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.
559 560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 559 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.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def agent_id @agent_id end |
#blocked_path ⇒ Object
Returns the value of attribute blocked_path.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def blocked_path @blocked_path end |
#decision_reason ⇒ Object
Returns the value of attribute decision_reason.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def decision_reason @decision_reason end |
#description ⇒ Object
Returns the value of attribute description.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def display_name @display_name end |
#signal ⇒ Object
Returns the value of attribute signal.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def signal @signal end |
#suggestions ⇒ Object
Returns the value of attribute suggestions.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def suggestions @suggestions end |
#title ⇒ Object
Returns the value of attribute title.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def title @title end |
#tool_use_id ⇒ Object
Returns the value of attribute tool_use_id.
555 556 557 |
# File 'lib/claude_agent_sdk/types.rb', line 555 def tool_use_id @tool_use_id end |