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.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def allow_unsandboxed_commands @allow_unsandboxed_commands end |
#auto_allow_bash_if_sandboxed ⇒ Object
Returns the value of attribute auto_allow_bash_if_sandboxed.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 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.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def enable_weaker_nested_sandbox @enable_weaker_nested_sandbox end |
#enable_weaker_network_isolation ⇒ Object
Returns the value of attribute enable_weaker_network_isolation.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def enable_weaker_network_isolation @enable_weaker_network_isolation end |
#enabled ⇒ Object
Returns the value of attribute enabled.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def enabled @enabled end |
#excluded_commands ⇒ Object
Returns the value of attribute excluded_commands.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def excluded_commands @excluded_commands end |
#fail_if_unavailable ⇒ Object
Returns the value of attribute fail_if_unavailable.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def fail_if_unavailable @fail_if_unavailable end |
#filesystem ⇒ Object
Returns the value of attribute filesystem.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def filesystem @filesystem end |
#ignore_violations ⇒ Object
Returns the value of attribute ignore_violations.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def ignore_violations @ignore_violations end |
#network ⇒ Object
Returns the value of attribute network.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def network @network end |
#ripgrep ⇒ Object
Returns the value of attribute ripgrep.
1340 1341 1342 |
# File 'lib/claude_agent_sdk/types.rb', line 1340 def ripgrep @ripgrep end |
Instance Method Details
#to_h ⇒ Object
1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'lib/claude_agent_sdk/types.rb', line 1345 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 |