rpc interface fixes#703
Open
aron-cf wants to merge 5 commits into
Open
Conversation
Each HTTP client now declares implements on its corresponding SandboxAPI interface, so signature mismatches between the HTTP and RPC transports are caught at compile time.
The interface expects a single DesktopScreenshotRegionRequest object with region nested inside it. The HTTP client was taking region and options as separate arguments. The HTTP-only 'bytes' format overload is dropped from the public signature since it was never part of SandboxDesktopAPI and could not be used via the RPC transport.
TypeOptions had delayMs but SandboxDesktopAPI specifies
{ delay?: number }. Rename to align the two transports.
The method returns per-process health (DesktopProcessHealth), not the full desktop status. The RPC stub was incorrectly delegating to status(), ignoring the name argument entirely. Fix the shared interface, the HTTP client, and the RPC stub to all return DesktopProcessHealth.
Satisfies SandboxUtilsAPI while making the transport requirement explicit at call time.
|
commit: |
Contributor
🐳 Docker Images Published
Usage: FROM cloudflare/sandbox:0.0.0-pr-703-53fa365Version: 📦 Standalone BinaryFor arbitrary Dockerfiles: COPY --from=cloudflare/sandbox:0.0.0-pr-703-53fa365 /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]Download via GitHub CLI: gh run download 26059355494 -n sandbox-binaryExtract from Docker: docker run --rm cloudflare/sandbox:0.0.0-pr-703-53fa365 cat /container-server/sandbox > sandbox && chmod +x sandbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement SandboxAPI interfaces on HTTP sub-clients
Each HTTP client now declares implements on its corresponding
SandboxAPI interface, so signature mismatches between the HTTP
and RPC transports are caught at compile time.
Fix screenshotRegion signature to match SandboxDesktopAPI
The interface expects a single DesktopScreenshotRegionRequest object
with region nested inside it. The HTTP client was taking region and
options as separate arguments.
The HTTP-only 'bytes' format overload is dropped from the public
signature since it was never part of SandboxDesktopAPI and could
not be used via the RPC transport.
Fix type() options to use delay instead of delayMs
TypeOptions had delayMs but SandboxDesktopAPI specifies
{ delay?: number }. Rename to align the two transports.
Fix getProcessStatus return type across all layers
The method returns per-process health (DesktopProcessHealth), not the
full desktop status. The RPC stub was incorrectly delegating to
status(), ignoring the name argument entirely. Fix the shared
interface, the HTTP client, and the RPC stub to all return
DesktopProcessHealth.
Stub listSessions on HTTP client as RPC-only
Satisfies SandboxUtilsAPI while making the transport
requirement explicit at call time.