Skip to content

rpc interface fixes#703

Open
aron-cf wants to merge 5 commits into
mainfrom
rpc-interface-fixes
Open

rpc interface fixes#703
aron-cf wants to merge 5 commits into
mainfrom
rpc-interface-fixes

Conversation

@aron-cf
Copy link
Copy Markdown
Contributor

@aron-cf aron-cf commented May 18, 2026

  • 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.

aron-cf added 5 commits May 18, 2026 21:42
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.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

⚠️ No Changeset found

Latest commit: 53fa365

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 18, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/sandbox-sdk/@cloudflare/sandbox@703

commit: 53fa365

@github-actions
Copy link
Copy Markdown
Contributor

🐳 Docker Images Published

Variant Image
Default cloudflare/sandbox:0.0.0-pr-703-53fa365
Python cloudflare/sandbox:0.0.0-pr-703-53fa365-python
OpenCode cloudflare/sandbox:0.0.0-pr-703-53fa365-opencode
Musl cloudflare/sandbox:0.0.0-pr-703-53fa365-musl
Desktop cloudflare/sandbox:0.0.0-pr-703-53fa365-desktop

Usage:

FROM cloudflare/sandbox:0.0.0-pr-703-53fa365

Version: 0.0.0-pr-703-53fa365


📦 Standalone Binary

For 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-binary

Extract from Docker:

docker run --rm cloudflare/sandbox:0.0.0-pr-703-53fa365 cat /container-server/sandbox > sandbox && chmod +x sandbox

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.

1 participant