---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/sandbox/interfaces/EvaluateJavascriptConfig.md
description: Configuration for the JavaScript guest battery.
---

# Interface: EvaluateJavascriptConfig

Defined in: [src/batteries/sandbox/js/ses\_contracts.ts:25](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L25)

Configuration for the JavaScript guest battery.

## Properties

| Property                                               | Modifier   | Type                                                                                                                                                                                                                                   | Description                                                                                                                                                                                                                                                                             | Defined in                                                                                                                                        |
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `gate`                      | `readonly` | (`ctx`: `unknown`, `call`: { `args`: `unknown`; `tool`: `string`; }) => `void` | `Promise`<`void`>                                                                                                                                | Required approval callback for every evaluation. **Remarks** Evaluation is a capability-bearing operation, so construction rejects its omission; invoking the gate is a real suspension and a harness with no decider waits indefinitely.                                               | [src/batteries/sandbox/js/ses\_contracts.ts:33](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L33) |
|  `globals?`               | `readonly` | [`Readonly`](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, [`GuestGlobal`](GuestGlobal.md)>> | Named host capabilities exposed to the guest. **Remarks** These are declarations, never bare functions: functions cannot cross structured clone. Each name becomes an in-guest asynchronous stub that posts a `hostcall`, even when the host implementation itself is synchronous.      | [src/batteries/sandbox/js/ses\_contracts.ts:42](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L42) |
|  `hostcallQuotas?` | `readonly` | [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[`HostcallQuotas`](HostcallQuotas.md)>                                                                                                      | Hostcall quotas, resolved once by the tool factory. **Remarks** Defaults are merged and floors validated; invalid values name the field, value, and bound in `E_INVALID_SANDBOX_CONFIG`. The enforcing layer receives resolved quotas rather than inventing its own defaults.           | [src/batteries/sandbox/js/ses\_contracts.ts:68](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L68) |
|  `hostLockdown?`     | `readonly` | `boolean`                                                                                                                                                                                                                              | Whether to apply lockdown to the host realm. **Remarks** This governs only the host realm and is process-global and irreversible. The guest's own `lockdown()` always runs; that guest lockdown is the security guarantee.                                                              | [src/batteries/sandbox/js/ses\_contracts.ts:76](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L76) |
|  `limits?`                 | `readonly` | [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[`GuestLimits`](GuestLimits.md)>                                                                                                            | Guest resource limits, resolved once by the tool factory. **Remarks** Defaults are merged and floors validated; invalid values name the field, value, and bound in `E_INVALID_SANDBOX_CONFIG`. The enforcing runtime receives the fully resolved limits and never re-derives a default. | [src/batteries/sandbox/js/ses\_contracts.ts:59](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L59) |
|  `modules?`               | `readonly` | [`Readonly`](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `unknown`>>                       | Allow-listed module specifiers and their host-side values. **Remarks** Specifiers are re-checked inside the guest. Injecting a module grants the guest whatever that module can reach, and transitive import graphs are deliberately not policed.                                       | [src/batteries/sandbox/js/ses\_contracts.ts:50](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L50) |
|  `runtime?`               | `readonly` | [`GuestRuntimeLike`](GuestRuntimeLike.md)                                                                                                                                                                                              | Runtime seam used instead of the default SES runtime, typically by an adapter.                                                                                                                                                                                                          | [src/batteries/sandbox/js/ses\_contracts.ts:78](https://github.com/NHTIO/ADK/blob/v1.20260824.1/src/src/batteries/sandbox/js/ses_contracts.ts#L78) |
