Skip to content

feat(sandbox): expose per-sandbox proxy_config in py + js clients#2742

Merged
Bagatur (baskaryan) merged 1 commit intomainfrom
feat/sandbox-proxy-config
Apr 20, 2026
Merged

feat(sandbox): expose per-sandbox proxy_config in py + js clients#2742
Bagatur (baskaryan) merged 1 commit intomainfrom
feat/sandbox-proxy-config

Conversation

@baskaryan
Copy link
Copy Markdown
Contributor

The server's CreateClaimPayload already accepts a proxy_config block (rules, no_proxy, access_control.allow_list/deny_list) enforced by the sandbox proxy sidecar, but neither SDK exposed it. Callers that want to restrict a sandbox's outbound traffic to a hostname allowlist had no way to do so short of crafting the raw HTTP request.

Python: add proxy_config: Optional[dict[str, Any]] to create_sandbox and the sandbox() context-manager wrapper on both SandboxClient and AsyncSandboxClient. Forwarded to the server as-is under the proxy_config key; omitted from the payload when None.

JS: add proxyConfig?: SandboxProxyConfig to CreateSandboxOptions, with SandboxProxyConfig / SandboxAccessControl interfaces exported from the sandbox module. Snake-case on the wire to match the server; forwarded as-is when provided.

Unit tests cover both "forwarded verbatim" and "omitted when unset" for all four client surfaces.

The server's CreateClaimPayload already accepts a proxy_config block
(rules, no_proxy, access_control.allow_list/deny_list) enforced by the
sandbox proxy sidecar, but neither SDK exposed it. Callers that want to
restrict a sandbox's outbound traffic to a hostname allowlist had no way
to do so short of crafting the raw HTTP request.

Python: add proxy_config: Optional[dict[str, Any]] to create_sandbox and
the sandbox() context-manager wrapper on both SandboxClient and
AsyncSandboxClient. Forwarded to the server as-is under the proxy_config
key; omitted from the payload when None.

JS: add proxyConfig?: SandboxProxyConfig to CreateSandboxOptions, with
SandboxProxyConfig / SandboxAccessControl interfaces exported from the
sandbox module. Snake-case on the wire to match the server; forwarded
as-is when provided.

Unit tests cover both "forwarded verbatim" and "omitted when unset" for
all four client surfaces.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@baskaryan Bagatur (baskaryan) merged commit b2a3a8e into main Apr 20, 2026
31 of 38 checks passed
@baskaryan Bagatur (baskaryan) deleted the feat/sandbox-proxy-config branch April 20, 2026 15:57
Bagatur (baskaryan) added a commit that referenced this pull request Apr 20, 2026
Bump Python SDK to 0.7.33 and JS SDK to 0.5.21.

Releases the `proxy_config` kwarg on `create_sandbox` (py + js) added in
#2742 so downstream callers (issues-board agent / `smith-issues-agent`)
can pin against it.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants