Class: ClaudeAgentSDK::SandboxSettings
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Sandbox settings for isolated command execution
Instance Attribute Summary collapse
-
#allow_unsandboxed_commands ⇒ Object
Returns the value of attribute allow_unsandboxed_commands.
-
#auto_allow_bash_if_sandboxed ⇒ Object
Returns the value of attribute auto_allow_bash_if_sandboxed.
-
#enable_weaker_nested_sandbox ⇒ Object
Returns the value of attribute enable_weaker_nested_sandbox.
-
#enable_weaker_network_isolation ⇒ Object
Returns the value of attribute enable_weaker_network_isolation.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#excluded_commands ⇒ Object
Returns the value of attribute excluded_commands.
-
#fail_if_unavailable ⇒ Object
Returns the value of attribute fail_if_unavailable.
-
#filesystem ⇒ Object
Returns the value of attribute filesystem.
-
#ignore_violations ⇒ Object
Returns the value of attribute ignore_violations.
-
#network ⇒ Object
Returns the value of attribute network.
-
#ripgrep ⇒ Object
Returns the value of attribute ripgrep.
Instance Method Summary collapse
Methods inherited from Type
#[], #[]=, from_hash, #initialize, wrap
Constructor Details
This class inherits a constructor from ClaudeAgentSDK::Type
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#allow_unsandboxed_commands ⇒ Object
Returns the value of attribute allow_unsandboxed_commands.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def allow_unsandboxed_commands @allow_unsandboxed_commands end |
#auto_allow_bash_if_sandboxed ⇒ Object
Returns the value of attribute auto_allow_bash_if_sandboxed.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def auto_allow_bash_if_sandboxed @auto_allow_bash_if_sandboxed end |
#enable_weaker_nested_sandbox ⇒ Object
Returns the value of attribute enable_weaker_nested_sandbox.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def enable_weaker_nested_sandbox @enable_weaker_nested_sandbox end |
#enable_weaker_network_isolation ⇒ Object
Returns the value of attribute enable_weaker_network_isolation.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def enable_weaker_network_isolation @enable_weaker_network_isolation end |
#enabled ⇒ Object
Returns the value of attribute enabled.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def enabled @enabled end |
#excluded_commands ⇒ Object
Returns the value of attribute excluded_commands.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def excluded_commands @excluded_commands end |
#fail_if_unavailable ⇒ Object
Returns the value of attribute fail_if_unavailable.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def fail_if_unavailable @fail_if_unavailable end |
#filesystem ⇒ Object
Returns the value of attribute filesystem.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def filesystem @filesystem end |
#ignore_violations ⇒ Object
Returns the value of attribute ignore_violations.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def ignore_violations @ignore_violations end |
#network ⇒ Object
Returns the value of attribute network.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def network @network end |
#ripgrep ⇒ Object
Returns the value of attribute ripgrep.
1381 1382 1383 |
# File 'lib/claude_agent_sdk/types.rb', line 1381 def ripgrep @ripgrep end |
Instance Method Details
#to_h ⇒ Object
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 |
# File 'lib/claude_agent_sdk/types.rb', line 1386 def to_h result = {} result[:enabled] = @enabled unless @enabled.nil? result[:failIfUnavailable] = @fail_if_unavailable unless @fail_if_unavailable.nil? result[:autoAllowBashIfSandboxed] = @auto_allow_bash_if_sandboxed unless @auto_allow_bash_if_sandboxed.nil? result[:excludedCommands] = @excluded_commands if @excluded_commands result[:allowUnsandboxedCommands] = @allow_unsandboxed_commands unless @allow_unsandboxed_commands.nil? result[:network] = @network.is_a?(SandboxNetworkConfig) ? @network.to_h : @network if @network result[:filesystem] = @filesystem.is_a?(SandboxFilesystemConfig) ? @filesystem.to_h : @filesystem if @filesystem result[:ignoreViolations] = @ignore_violations if @ignore_violations result[:enableWeakerNestedSandbox] = @enable_weaker_nested_sandbox unless @enable_weaker_nested_sandbox.nil? result[:enableWeakerNetworkIsolation] = @enable_weaker_network_isolation unless @enable_weaker_network_isolation.nil? result[:ripgrep] = @ripgrep if @ripgrep result end |