architecture

Installation
SKILL.md

Architecture

Three-Layer Architecture

  1. @cloudflare/sandbox (packages/sandbox/) — Public SDK published to npm

    • Sandbox class: Durable Object that manages the container lifecycle
    • Modular HTTP clients per capability (CommandClient, FileClient, ProcessClient, …)
    • CodeInterpreter: high-level API for Python/JS with structured outputs
    • proxyToSandbox(): request handler for preview URL routing
  2. @repo/shared (packages/shared/) — Internal shared utilities

    • Type definitions used by both SDK and container runtime
    • Centralized error classes (packages/shared/src/errors/) and logging
    • Not published to npm
  3. @repo/sandbox-container (packages/sandbox-container/) — Container runtime

    • Bun-based HTTP server running inside the Docker container
    • Dependency-injection container in core/container.ts
    • Route handlers for command execution, file operations, process management
Related skills
Installs
1
GitHub Stars
1.0K
First Seen
6 days ago