> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# PluginContext<TTools>

> Interface exported by @botmesh/core.

Defined in: [core/types.ts:222](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L222)

What `PluginSpec.install()` receives: a scoped bot whose registrations are undone on
unplug, the logger, the injected tools, the plugin config and `onDispose()` for extra cleanup.

## Type Parameters

| Type Parameter | Default type |
| - | - |
|  `TTools` *extends* `object` | [`DefaultTools`](https://botmesh.afaya.com.co/api/core/interfaces/DefaultTools) |

## Properties

### bot

```ts theme={null}
bot: Bot;
```

Defined in: [core/types.ts:224](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L224)

Scoped facade of the Bot; registrations auto-track their unsubscribers.

***

### logger

```ts theme={null}
logger: Logger;
```

Defined in: [core/types.ts:225](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L225)

***

### tools

```ts theme={null}
tools: TTools;
```

Defined in: [core/types.ts:226](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L226)

***

### config

```ts theme={null}
config: Record<string, unknown>;
```

Defined in: [core/types.ts:227](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L227)

## Methods

### onDispose()

```ts theme={null}
onDispose(fn): void;
```

Defined in: [core/types.ts:229](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L229)

Register extra cleanup to run when the plugin is unplugged.

#### Parameters

| Parameter | Type |
| - | - |
| `fn` | () => `void` |

#### Returns

`void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.