---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/HostEndpointHooks.md'
description: >-
  Callback surface for observing host-endpoint lifecycle and guest-originated
  events.
---

# Interface: HostEndpointHooks

Defined in: [src/batteries/isolation/protocol.ts:125](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/isolation/protocol.ts#L125)

Callback surface for observing host-endpoint lifecycle and guest-originated events.

## Remarks

Hooks are notifications only; dispatch and correlation remain owned by the endpoint.

## Properties

| Property                                       | Type                                                                                                  | Description                                                                           | Defined in                                                                                                                              |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|  `onEnvelope?` | (`dir`: `"in"` | `"out"`, `envelope`: [`WireEnvelope`](../type-aliases/WireEnvelope.md)) => `void`   | Any envelope was sent (`dir: 'out'`) or received (`dir: 'in'`) — for wire tracing.    | [src/batteries/isolation/protocol.ts:133](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/isolation/protocol.ts#L133) |
|  `onEvent?`       | (`channel`: `string`, `payload`: [`WireValue`](../type-aliases/WireValue.md)) => `void`               | An `event` envelope arrived for `channel`.                                            | [src/batteries/isolation/protocol.ts:129](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/isolation/protocol.ts#L129) |
|  `onHostcall?` | (`id`: `string`, `method`: `string`, `args`: [`WireValue`](../type-aliases/WireValue.md)\[]) => `void` | A guest-to-host capability request arrived. It is deliberately independent of `call`. | [src/batteries/isolation/protocol.ts:131](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/isolation/protocol.ts#L131) |
|  `onReady?`       | (`info`: { `encoderAvailable`: `boolean`; }) => `void`                                              | The guest's `ready` envelope arrived.                                                 | [src/batteries/isolation/protocol.ts:127](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/isolation/protocol.ts#L127) |
