Skip to content

Commit 92e4a15

Browse files
authored
Add domain allowlist fields to SandboxNetworkConfig TypedDict (#893)
Brings the Python `SandboxNetworkConfig` TypedDict to parity with the TypeScript schema. Adds `allowedDomains`, `deniedDomains`, `allowManagedDomainsOnly`, and `allowMachLookup` so Python SDK users can configure network allowlists with proper type hints.
1 parent 49eed4f commit 92e4a15

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/claude_agent_sdk/types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,16 +783,24 @@ class SandboxNetworkConfig(TypedDict, total=False):
783783
"""Network configuration for sandbox.
784784
785785
Attributes:
786+
allowedDomains: Domain names that sandboxed processes can access.
787+
deniedDomains: Domains that are always blocked, even if matched by allowedDomains.
788+
allowManagedDomainsOnly: When true in managed settings, only managed-settings allowedDomains are respected.
786789
allowUnixSockets: Unix socket paths accessible in sandbox (e.g., SSH agents).
787790
allowAllUnixSockets: Allow all Unix sockets (less secure).
788791
allowLocalBinding: Allow binding to localhost ports (macOS only).
792+
allowMachLookup: macOS only: XPC/Mach service names to allow (supports trailing wildcard).
789793
httpProxyPort: HTTP proxy port if bringing your own proxy.
790794
socksProxyPort: SOCKS5 proxy port if bringing your own proxy.
791795
"""
792796

797+
allowedDomains: list[str]
798+
deniedDomains: list[str]
799+
allowManagedDomainsOnly: bool
793800
allowUnixSockets: list[str]
794801
allowAllUnixSockets: bool
795802
allowLocalBinding: bool
803+
allowMachLookup: list[str]
796804
httpProxyPort: int
797805
socksProxyPort: int
798806

0 commit comments

Comments
 (0)