Packages

@cloudflare/sandbox

1.0.3 · 22 Oct 2026Apache-2.02.1M / weekRepositoryHomepagenpmAtom feed

Your version

0.7.1

9 Feb 2026Where it was published

0.12.14 is the newest release of 0.7.x.

In short

1 new

Release note

Patch Changes

  • Add terminal support for browser-based terminal UIs.

    Build interactive terminal experiences by connecting xterm.js to container PTYs via WebSocket. Terminals reconnect automatically with output history preserved, and each session gets its own isolated terminal.

    // Proxy WebSocket to container terminal
    return sandbox.terminal(request, { cols: 80, rows: 24 });
    
    // Multiple isolated terminals in the same sandbox
    const session = await sandbox.getSession('dev');
    return session.terminal(request);

    Also exports @cloudflare/sandbox/xterm with a SandboxAddon for xterm.js — handles WebSocket connection, reconnection with exponential backoff, and terminal resize forwarding.

    import { SandboxAddon } from '@cloudflare/sandbox/xterm';
    
    const addon = new SandboxAddon({
      getWebSocketUrl: ({ sandboxId, origin }) =>
        `${origin}/ws/terminal?id=${sandboxId}`
    });
    terminal.loadAddon(addon);
    addon.connect({ sandboxId: 'my-sandbox' });

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.