Interface: BinarySandbox
Defined in: src/batteries/sandbox/executor.ts:16
A command wrapper that REWRITES an invocation into the one the inner executor should run.
Remarks
The wrapper's job is to own quoting: it returns the argv that actually gets spawned, which for a sandbox is the wrapper binary (bwrap, sandbox-exec, …) followed by everything that binary needs. That is why sandboxedExecutor does NOT quote for it — quoting is a property of the wrapper being used (a shell -c string, an argv vector, a container exec line), so an adapter that quoted first would hand every implementor the wrong representation.
A wrap implementation must NOT execute anything: it only computes and returns the invocation.
Methods
wrap()
wrap(invocation: BinaryInvocation): Promise<BinaryInvocation>;Defined in: src/batteries/sandbox/executor.ts:25
Return the invocation the inner executor should run instead. Its cmd and args ARE the wrapped argv, so the caller's original args are never appended.
Parameters
| Parameter | Type | Description |
|---|---|---|
invocation | BinaryInvocation | The command, args, working directory, environment, and limits to wrap. |
Returns
Promise<BinaryInvocation>
The replacement invocation, carrying through whatever the caller asked for that the wrapper does not itself decide (cwd, timeoutMs, signal, the kill controls).