---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/media/contracts/interfaces/BinaryExecutor.md
description: >-
  Runs a binary invocation to completion. How and where it runs — local child
  process, remote runner, sandbox, container, a browser-side WASI shim — is the
  implementation's business.
---

# Interface: BinaryExecutor

Defined in: [src/batteries/media/contracts.ts:94](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/contracts.ts#L94)

Runs a binary invocation to completion. How and where it runs — local child process, remote
runner, sandbox, container, a browser-side WASI shim — is the implementation's business.

## Methods

### exec()

```ts
exec(invocation: BinaryInvocation): Promise<BinaryExecResult>;
```

Defined in: [src/batteries/media/contracts.ts:102](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/contracts.ts#L102)

Run one invocation to completion and report the result. Implementations must not throw on
non-zero exits — report via `failed`/`exitCode` so callers map failures to readable errors.

#### Parameters

| Parameter    | Type                                      | Description                           |
| ------------ | ----------------------------------------- | ------------------------------------- |
| `invocation` | [`BinaryInvocation`](BinaryInvocation.md) | The command, args, and limits to run. |

#### Returns

`Promise`<[`BinaryExecResult`](BinaryExecResult.md)>

The settled result.
