Member Junction
    Preparing search index...

    How to run one command inside a sandbox.

    Deliberately NOT modelled on Node's ChildProcess. Spawning locally and docker exec both happen to produce a child process, but a Kubernetes exec is streams over a websocket and a remote runner is HTTP — an interface that promised ChildProcess could never be implemented honestly by either. Promising async iterables of lines instead lets every backend satisfy the same contract.

    The second benefit is testing: a fake executor replays canned JSONL, so adapter behaviour can be unit-tested without a harness binary, a container, or a network.

    interface HarnessProcessSpec {
        Args: string[];
        CancellationToken?: AbortSignal;
        Command: string;
        Environment: Record<string, string>;
        WorkingDirectory?: string;
    }
    Index

    Properties

    Args: string[]

    Arguments, already split — never a shell string, so nothing needs quoting or escaping.

    CancellationToken?: AbortSignal

    Aborts the process.

    Command: string

    Binary or command to run inside the sandbox.

    Environment: Record<string, string>

    Environment for the process. Exactly what the agent was granted; never the host's full env.

    WorkingDirectory?: string

    Working directory inside the sandbox. Defaults to the workspace root.