Class: ClaudeAgentSDK::SandboxNetworkConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Sandbox network configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_unix_sockets: nil, allow_all_unix_sockets: nil, allow_local_binding: nil, http_proxy_port: nil, socks_proxy_port: nil) ⇒ SandboxNetworkConfig

Returns a new instance of SandboxNetworkConfig.



661
662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/claude_agent_sdk/types.rb', line 661

def initialize(
  allow_unix_sockets: nil,
  allow_all_unix_sockets: nil,
  allow_local_binding: nil,
  http_proxy_port: nil,
  socks_proxy_port: nil
)
  @allow_unix_sockets = allow_unix_sockets
  @allow_all_unix_sockets = allow_all_unix_sockets
  @allow_local_binding = allow_local_binding
  @http_proxy_port = http_proxy_port
  @socks_proxy_port = socks_proxy_port
end

Instance Attribute Details

#allow_all_unix_socketsObject

Returns the value of attribute allow_all_unix_sockets.



658
659
660
# File 'lib/claude_agent_sdk/types.rb', line 658

def allow_all_unix_sockets
  @allow_all_unix_sockets
end

#allow_local_bindingObject

Returns the value of attribute allow_local_binding.



658
659
660
# File 'lib/claude_agent_sdk/types.rb', line 658

def allow_local_binding
  @allow_local_binding
end

#allow_unix_socketsObject

Returns the value of attribute allow_unix_sockets.



658
659
660
# File 'lib/claude_agent_sdk/types.rb', line 658

def allow_unix_sockets
  @allow_unix_sockets
end

#http_proxy_portObject

Returns the value of attribute http_proxy_port.



658
659
660
# File 'lib/claude_agent_sdk/types.rb', line 658

def http_proxy_port
  @http_proxy_port
end

#socks_proxy_portObject

Returns the value of attribute socks_proxy_port.



658
659
660
# File 'lib/claude_agent_sdk/types.rb', line 658

def socks_proxy_port
  @socks_proxy_port
end

Instance Method Details

#to_hObject



675
676
677
678
679
680
681
682
683
# File 'lib/claude_agent_sdk/types.rb', line 675

def to_h
  result = {}
  result[:allowUnixSockets] = @allow_unix_sockets unless @allow_unix_sockets.nil?
  result[:allowAllUnixSockets] = @allow_all_unix_sockets unless @allow_all_unix_sockets.nil?
  result[:allowLocalBinding] = @allow_local_binding unless @allow_local_binding.nil?
  result[:httpProxyPort] = @http_proxy_port if @http_proxy_port
  result[:socksProxyPort] = @socks_proxy_port if @socks_proxy_port
  result
end