Member Junction
    Preparing search index...

    Runs each harness turn inside a per-run container.

    LocalDirectorySandboxProvider scopes a directory but does not contain the process: the harness runs on the MJAPI host with that host's network reach and cloud credentials. For a feature whose entire purpose is executing an autonomous agent's shell commands, that is the wrong blast radius anywhere but a developer's laptop.

    Here the harness runs in a container with the workspace bind-mounted, so a file write outside the workspace hits the container's filesystem and dies with it, and networkPolicy is enforced by Docker rather than merely documented.

    The container starts once at Provision and every turn is a docker exec into it. The alternative — docker run per turn — would pay container startup on every turn and, worse, lose any in-container state the harness accumulated outside the mounted workspace. A run is the natural lifetime because it is exactly the span over which a harness session is continuous.

    none maps to --network none. mcp-only and allowlist currently map to a bridge network and are NOT yet enforced at the packet level — enforcing them properly needs a per-run network with egress rules, which is the next increment. They are documented here as not-yet-enforced rather than quietly treated as equivalent to open, because an operator who believes mcp-only is enforced has a false sense of containment, which is worse than knowing the boundary is soft.

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Releases the workspace.

      Must be safe to call on every exit path including crash and cancellation, and must not throw — a finalize that throws inside a failure path masks the original error with a cleanup error.

      Parameters

      • handle: SandboxHandle
      • _outcome: "success" | "failure" | "cancelled"

      Returns Promise<void>