Class: ClaudeAgentSDK::ClaudeAgentOptions
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::ClaudeAgentOptions
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Claude Agent Options for configuring queries
Instance Attribute Summary collapse
-
#add_dirs ⇒ Object
Returns the value of attribute add_dirs.
-
#agents ⇒ Object
Returns the value of attribute agents.
-
#allowed_tools ⇒ Object
Returns the value of attribute allowed_tools.
-
#can_use_tool ⇒ Object
Returns the value of attribute can_use_tool.
-
#cli_path ⇒ Object
Returns the value of attribute cli_path.
-
#continue_conversation ⇒ Object
Returns the value of attribute continue_conversation.
-
#cwd ⇒ Object
Returns the value of attribute cwd.
-
#disallowed_tools ⇒ Object
Returns the value of attribute disallowed_tools.
-
#env ⇒ Object
Returns the value of attribute env.
-
#extra_args ⇒ Object
Returns the value of attribute extra_args.
-
#fork_session ⇒ Object
Returns the value of attribute fork_session.
-
#hooks ⇒ Object
Returns the value of attribute hooks.
-
#include_partial_messages ⇒ Object
Returns the value of attribute include_partial_messages.
-
#max_buffer_size ⇒ Object
Returns the value of attribute max_buffer_size.
-
#max_turns ⇒ Object
Returns the value of attribute max_turns.
-
#mcp_servers ⇒ Object
Returns the value of attribute mcp_servers.
-
#model ⇒ Object
Returns the value of attribute model.
-
#permission_mode ⇒ Object
Returns the value of attribute permission_mode.
-
#permission_prompt_tool_name ⇒ Object
Returns the value of attribute permission_prompt_tool_name.
-
#resume ⇒ Object
Returns the value of attribute resume.
-
#setting_sources ⇒ Object
Returns the value of attribute setting_sources.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#system_prompt ⇒ Object
Returns the value of attribute system_prompt.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #dup_with(**changes) ⇒ Object
-
#initialize(allowed_tools: [], system_prompt: nil, mcp_servers: {}, permission_mode: nil, continue_conversation: false, resume: nil, max_turns: nil, disallowed_tools: [], model: nil, permission_prompt_tool_name: nil, cwd: nil, cli_path: nil, settings: nil, add_dirs: [], env: {}, extra_args: {}, max_buffer_size: nil, stderr: nil, can_use_tool: nil, hooks: nil, user: nil, include_partial_messages: false, fork_session: false, agents: nil, setting_sources: nil) ⇒ ClaudeAgentOptions
constructor
A new instance of ClaudeAgentOptions.
Constructor Details
#initialize(allowed_tools: [], system_prompt: nil, mcp_servers: {}, permission_mode: nil, continue_conversation: false, resume: nil, max_turns: nil, disallowed_tools: [], model: nil, permission_prompt_tool_name: nil, cwd: nil, cli_path: nil, settings: nil, add_dirs: [], env: {}, extra_args: {}, max_buffer_size: nil, stderr: nil, can_use_tool: nil, hooks: nil, user: nil, include_partial_messages: false, fork_session: false, agents: nil, setting_sources: nil) ⇒ ClaudeAgentOptions
Returns a new instance of ClaudeAgentOptions.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/claude_agent_sdk/types.rb', line 286 def initialize( allowed_tools: [], system_prompt: nil, mcp_servers: {}, permission_mode: nil, continue_conversation: false, resume: nil, max_turns: nil, disallowed_tools: [], model: nil, permission_prompt_tool_name: nil, cwd: nil, cli_path: nil, settings: nil, add_dirs: [], env: {}, extra_args: {}, max_buffer_size: nil, stderr: nil, can_use_tool: nil, hooks: nil, user: nil, include_partial_messages: false, fork_session: false, agents: nil, setting_sources: nil ) @allowed_tools = allowed_tools @system_prompt = system_prompt @mcp_servers = mcp_servers @permission_mode = @continue_conversation = continue_conversation @resume = resume @max_turns = max_turns @disallowed_tools = disallowed_tools @model = model @permission_prompt_tool_name = @cwd = cwd @cli_path = cli_path @settings = settings @add_dirs = add_dirs @env = env @extra_args = extra_args @max_buffer_size = max_buffer_size @stderr = stderr @can_use_tool = can_use_tool @hooks = hooks @user = user @include_partial_messages = @fork_session = fork_session @agents = agents @setting_sources = setting_sources end |
Instance Attribute Details
#add_dirs ⇒ Object
Returns the value of attribute add_dirs.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def add_dirs @add_dirs end |
#agents ⇒ Object
Returns the value of attribute agents.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def agents @agents end |
#allowed_tools ⇒ Object
Returns the value of attribute allowed_tools.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def allowed_tools @allowed_tools end |
#can_use_tool ⇒ Object
Returns the value of attribute can_use_tool.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def can_use_tool @can_use_tool end |
#cli_path ⇒ Object
Returns the value of attribute cli_path.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def cli_path @cli_path end |
#continue_conversation ⇒ Object
Returns the value of attribute continue_conversation.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def continue_conversation @continue_conversation end |
#cwd ⇒ Object
Returns the value of attribute cwd.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def cwd @cwd end |
#disallowed_tools ⇒ Object
Returns the value of attribute disallowed_tools.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def disallowed_tools @disallowed_tools end |
#env ⇒ Object
Returns the value of attribute env.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def env @env end |
#extra_args ⇒ Object
Returns the value of attribute extra_args.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def extra_args @extra_args end |
#fork_session ⇒ Object
Returns the value of attribute fork_session.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def fork_session @fork_session end |
#hooks ⇒ Object
Returns the value of attribute hooks.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def hooks @hooks end |
#include_partial_messages ⇒ Object
Returns the value of attribute include_partial_messages.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def @include_partial_messages end |
#max_buffer_size ⇒ Object
Returns the value of attribute max_buffer_size.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def max_buffer_size @max_buffer_size end |
#max_turns ⇒ Object
Returns the value of attribute max_turns.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def max_turns @max_turns end |
#mcp_servers ⇒ Object
Returns the value of attribute mcp_servers.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def mcp_servers @mcp_servers end |
#model ⇒ Object
Returns the value of attribute model.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def model @model end |
#permission_mode ⇒ Object
Returns the value of attribute permission_mode.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def @permission_mode end |
#permission_prompt_tool_name ⇒ Object
Returns the value of attribute permission_prompt_tool_name.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def @permission_prompt_tool_name end |
#resume ⇒ Object
Returns the value of attribute resume.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def resume @resume end |
#setting_sources ⇒ Object
Returns the value of attribute setting_sources.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def setting_sources @setting_sources end |
#settings ⇒ Object
Returns the value of attribute settings.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def settings @settings end |
#stderr ⇒ Object
Returns the value of attribute stderr.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def stderr @stderr end |
#system_prompt ⇒ Object
Returns the value of attribute system_prompt.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def system_prompt @system_prompt end |
#user ⇒ Object
Returns the value of attribute user.
279 280 281 |
# File 'lib/claude_agent_sdk/types.rb', line 279 def user @user end |
Instance Method Details
#dup_with(**changes) ⇒ Object
340 341 342 343 344 |
# File 'lib/claude_agent_sdk/types.rb', line 340 def dup_with(**changes) = self.dup changes.each { |key, value| .send("#{key}=", value) } end |