<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / WebhookPlugin

# Class: WebhookPlugin

Webhook Plugin using Facade Pattern
Provides a clean interface for webhook functionality

## Hierarchy

- [`AbstractPlugin`](AbstractPlugin)\<[`WebhookPluginOptions`](../interfaces/WebhookPluginOptions), `WebhookPluginStats`\>

  ↳ **`WebhookPlugin`**

## Table of contents

### Constructors

- [constructor](WebhookPlugin#constructor)

### Properties

- [enabled](WebhookPlugin#enabled)
- [category](WebhookPlugin#category)
- [priority](WebhookPlugin#priority)
- [name](WebhookPlugin#name)
- [version](WebhookPlugin#version)

### Methods

- [initialize](WebhookPlugin#initialize)
- [subscribeToModuleEvents](WebhookPlugin#subscribetomoduleevents)
- [unsubscribeFromModuleEvents](WebhookPlugin#unsubscribefrommoduleevents)
- [dispose](WebhookPlugin#dispose)
- [enable](WebhookPlugin#enable)
- [disable](WebhookPlugin#disable)
- [isEnabled](WebhookPlugin#isenabled)
- [getConfig](WebhookPlugin#getconfig)
- [updateConfig](WebhookPlugin#updateconfig)
- [getData](WebhookPlugin#getdata)
- [clearData](WebhookPlugin#cleardata)
- [getStatus](WebhookPlugin#getstatus)
- [beforeRun](WebhookPlugin#beforerun)
- [afterRun](WebhookPlugin#afterrun)
- [beforeExecution](WebhookPlugin#beforeexecution)
- [beforeConversation](WebhookPlugin#beforeconversation)
- [beforeToolCall](WebhookPlugin#beforetoolcall)
- [beforeToolExecution](WebhookPlugin#beforetoolexecution)
- [afterToolCall](WebhookPlugin#aftertoolcall)
- [beforeProviderCall](WebhookPlugin#beforeprovidercall)
- [afterProviderCall](WebhookPlugin#afterprovidercall)
- [onStreamingChunk](WebhookPlugin#onstreamingchunk)
- [onMessageAdded](WebhookPlugin#onmessageadded)
- [onModuleEvent](WebhookPlugin#onmoduleevent)
- [afterExecution](WebhookPlugin#afterexecution)
- [afterConversation](WebhookPlugin#afterconversation)
- [afterToolExecution](WebhookPlugin#aftertoolexecution)
- [onError](WebhookPlugin#onerror)
- [sendWebhook](WebhookPlugin#sendwebhook)
- [sendCustomWebhook](WebhookPlugin#sendcustomwebhook)
- [getStats](WebhookPlugin#getstats)
- [clearQueue](WebhookPlugin#clearqueue)
- [destroy](WebhookPlugin#destroy)

## Constructors

### constructor

• **new WebhookPlugin**(`options`): [`WebhookPlugin`](WebhookPlugin)

#### Parameters

| Name      | Type                                                         |
| :-------- | :----------------------------------------------------------- |
| `options` | [`WebhookPluginOptions`](../interfaces/WebhookPluginOptions) |

#### Returns

[`WebhookPlugin`](WebhookPlugin)

#### Overrides

[AbstractPlugin](AbstractPlugin).[constructor](AbstractPlugin#constructor)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:66](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L66)

## Properties

### enabled

• **enabled**: `boolean` = `true`

Plugin enabled state

#### Inherited from

[AbstractPlugin](AbstractPlugin).[enabled](AbstractPlugin#enabled)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:307](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L307)

---

### category

• **category**: [`PluginCategory`](../enums/PluginCategory) = `PluginCategory.CUSTOM`

Plugin category for classification

#### Inherited from

[AbstractPlugin](AbstractPlugin).[category](AbstractPlugin#category)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:310](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L310)

---

### priority

• **priority**: `number` = `PluginPriority.NORMAL`

Plugin priority for execution order

#### Inherited from

[AbstractPlugin](AbstractPlugin).[priority](AbstractPlugin#priority)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:313](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L313)

---

### name

• **name**: `string` = `'WebhookPlugin'`

Plugin name

#### Overrides

[AbstractPlugin](AbstractPlugin).[name](AbstractPlugin#name)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:55](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L55)

---

### version

• **version**: `string` = `'1.0.0'`

Plugin version

#### Overrides

[AbstractPlugin](AbstractPlugin).[version](AbstractPlugin#version)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:56](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L56)

## Methods

### initialize

▸ **initialize**(`options?`): `Promise`\<`void`\>

Initialize the plugin with type-safe options

#### Parameters

| Name       | Type                                                         |
| :--------- | :----------------------------------------------------------- |
| `options?` | [`WebhookPluginOptions`](../interfaces/WebhookPluginOptions) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[initialize](AbstractPlugin#initialize)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:338](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L338)

---

### subscribeToModuleEvents

▸ **subscribeToModuleEvents**(`eventEmitter`): `Promise`\<`void`\>

Subscribe to module events through EventEmitter

#### Parameters

| Name           | Type                                       |
| :------------- | :----------------------------------------- |
| `eventEmitter` | [`EventEmitterPlugin`](EventEmitterPlugin) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[subscribeToModuleEvents](AbstractPlugin#subscribetomoduleevents)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:366](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L366)

---

### unsubscribeFromModuleEvents

▸ **unsubscribeFromModuleEvents**(`eventEmitter`): `Promise`\<`void`\>

Unsubscribe from module events

#### Parameters

| Name           | Type                                       |
| :------------- | :----------------------------------------- |
| `eventEmitter` | [`EventEmitterPlugin`](EventEmitterPlugin) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[unsubscribeFromModuleEvents](AbstractPlugin#unsubscribefrommoduleevents)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:423](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L423)

---

### dispose

▸ **dispose**(): `Promise`\<`void`\>

Cleanup plugin resources

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[dispose](AbstractPlugin#dispose)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:438](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L438)

---

### enable

▸ **enable**(): `void`

Enable the plugin

#### Returns

`void`

#### Inherited from

[AbstractPlugin](AbstractPlugin).[enable](AbstractPlugin#enable)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:450](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L450)

---

### disable

▸ **disable**(): `void`

Disable the plugin

#### Returns

`void`

#### Inherited from

[AbstractPlugin](AbstractPlugin).[disable](AbstractPlugin#disable)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:457](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L457)

---

### isEnabled

▸ **isEnabled**(): `boolean`

Check if plugin is enabled

#### Returns

`boolean`

#### Inherited from

[AbstractPlugin](AbstractPlugin).[isEnabled](AbstractPlugin#isenabled)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:464](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L464)

---

### getConfig

▸ **getConfig**(): [`IPluginConfig`](../interfaces/IPluginConfig)

Get plugin configuration

#### Returns

[`IPluginConfig`](../interfaces/IPluginConfig)

#### Inherited from

[AbstractPlugin](AbstractPlugin).[getConfig](AbstractPlugin#getconfig)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:471](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L471)

---

### updateConfig

▸ **updateConfig**(`_config`): `void`

Update plugin configuration

#### Parameters

| Name      | Type                                           |
| :-------- | :--------------------------------------------- |
| `_config` | [`IPluginConfig`](../interfaces/IPluginConfig) |

#### Returns

`void`

#### Inherited from

[AbstractPlugin](AbstractPlugin).[updateConfig](AbstractPlugin#updateconfig)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:478](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L478)

---

### getData

▸ **getData**(): [`IPluginData`](../interfaces/IPluginData)

Get plugin data - enhanced with classification information

#### Returns

[`IPluginData`](../interfaces/IPluginData)

#### Inherited from

[AbstractPlugin](AbstractPlugin).[getData](AbstractPlugin#getdata)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:485](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L485)

---

### clearData

▸ **clearData**(): `void`

Clear plugin data - common interface for all plugins
This method should be implemented by plugins that store data

#### Returns

`void`

#### Inherited from

[AbstractPlugin](AbstractPlugin).[clearData](AbstractPlugin#cleardata)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:505](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L505)

---

### getStatus

▸ **getStatus**(): `Object`

Get plugin status - enhanced with classification information

#### Returns

`Object`

| Name                    | Type                                        |
| :---------------------- | :------------------------------------------ |
| `name`                  | `string`                                    |
| `version`               | `string`                                    |
| `enabled`               | `boolean`                                   |
| `initialized`           | `boolean`                                   |
| `category`              | [`PluginCategory`](../enums/PluginCategory) |
| `priority`              | `number`                                    |
| `subscribedEventsCount` | `number`                                    |
| `hasEventEmitter`       | `boolean`                                   |

#### Inherited from

[AbstractPlugin](AbstractPlugin).[getStatus](AbstractPlugin#getstatus)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:510](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L510)

---

### beforeRun

▸ **beforeRun**(`input`, `options?`): `Promise`\<`void`\>

Called before agent run

#### Parameters

| Name       | Type                                       |
| :--------- | :----------------------------------------- |
| `input`    | `string`                                   |
| `options?` | [`IRunOptions`](../interfaces/IRunOptions) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeRun](AbstractPlugin#beforerun)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:564](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L564)

---

### afterRun

▸ **afterRun**(`input`, `response`, `options?`): `Promise`\<`void`\>

Called after agent run

#### Parameters

| Name       | Type                                       |
| :--------- | :----------------------------------------- |
| `input`    | `string`                                   |
| `response` | `string`                                   |
| `options?` | [`IRunOptions`](../interfaces/IRunOptions) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[afterRun](AbstractPlugin#afterrun)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:565](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L565)

---

### beforeExecution

▸ **beforeExecution**(`context`): `Promise`\<`void`\>

Called before execution with context

#### Parameters

| Name      | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `context` | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeExecution](AbstractPlugin#beforeexecution)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:566](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L566)

---

### beforeConversation

▸ **beforeConversation**(`context`): `Promise`\<`void`\>

Called before conversation with context

#### Parameters

| Name      | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `context` | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeConversation](AbstractPlugin#beforeconversation)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:568](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L568)

---

### beforeToolCall

▸ **beforeToolCall**(`toolName`, `parameters`): `Promise`\<`void`\>

Called before tool execution

#### Parameters

| Name         | Type                                            |
| :----------- | :---------------------------------------------- |
| `toolName`   | `string`                                        |
| `parameters` | [`TToolParameters`](../modules#ttoolparameters) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeToolCall](AbstractPlugin#beforetoolcall)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:570](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L570)

---

### beforeToolExecution

▸ **beforeToolExecution**(`context`, `toolData`): `Promise`\<`void`\>

Called before tool execution with context

#### Parameters

| Name       | Type                                                               |
| :--------- | :----------------------------------------------------------------- |
| `context`  | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |
| `toolData` | [`IToolExecutionContext`](../interfaces/IToolExecutionContext)     |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeToolExecution](AbstractPlugin#beforetoolexecution)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:571](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L571)

---

### afterToolCall

▸ **afterToolCall**(`toolName`, `parameters`, `result`): `Promise`\<`void`\>

Called after tool execution

#### Parameters

| Name         | Type                                                         |
| :----------- | :----------------------------------------------------------- |
| `toolName`   | `string`                                                     |
| `parameters` | [`TToolParameters`](../modules#ttoolparameters)              |
| `result`     | [`IToolExecutionResult`](../interfaces/IToolExecutionResult) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[afterToolCall](AbstractPlugin#aftertoolcall)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:572](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L572)

---

### beforeProviderCall

▸ **beforeProviderCall**(`messages`): `Promise`\<`void`\>

Called before AI provider call

#### Parameters

| Name       | Type                                                  |
| :--------- | :---------------------------------------------------- |
| `messages` | [`TUniversalMessage`](../modules#tuniversalmessage)[] |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[beforeProviderCall](AbstractPlugin#beforeprovidercall)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:574](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L574)

---

### afterProviderCall

▸ **afterProviderCall**(`messages`, `response`): `Promise`\<`void`\>

Called after AI provider call

#### Parameters

| Name       | Type                                                  |
| :--------- | :---------------------------------------------------- |
| `messages` | [`TUniversalMessage`](../modules#tuniversalmessage)[] |
| `response` | [`TUniversalMessage`](../modules#tuniversalmessage)   |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[afterProviderCall](AbstractPlugin#afterprovidercall)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:575](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L575)

---

### onStreamingChunk

▸ **onStreamingChunk**(`chunk`): `Promise`\<`void`\>

Called on streaming chunk

#### Parameters

| Name    | Type                                                |
| :------ | :-------------------------------------------------- |
| `chunk` | [`TUniversalMessage`](../modules#tuniversalmessage) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[onStreamingChunk](AbstractPlugin#onstreamingchunk)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:576](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L576)

---

### onMessageAdded

▸ **onMessageAdded**(`message`): `Promise`\<`void`\>

Called on message added to history

#### Parameters

| Name      | Type                                                |
| :-------- | :-------------------------------------------------- |
| `message` | [`TUniversalMessage`](../modules#tuniversalmessage) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[onMessageAdded](AbstractPlugin#onmessageadded)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:578](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L578)

---

### onModuleEvent

▸ **onModuleEvent**(`eventType`, `eventData`): `Promise`\<`void`\>

Called when module events are received

#### Parameters

| Name        | Type                                   |
| :---------- | :------------------------------------- |
| `eventType` | [`EventType`](../modules#eventtype)    |
| `eventData` | [`EventData`](../interfaces/EventData) |

#### Returns

`Promise`\<`void`\>

#### Inherited from

[AbstractPlugin](AbstractPlugin).[onModuleEvent](AbstractPlugin#onmoduleevent)

#### Defined in

[packages/agents/src/abstracts/abstract-plugin.ts:579](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/abstracts/abstract-plugin.ts#L579)

---

### afterExecution

▸ **afterExecution**(`context`, `result`): `Promise`\<`void`\>

After execution completes

#### Parameters

| Name      | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `context` | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |
| `result`  | [`IPluginExecutionResult`](../interfaces/IPluginExecutionResult)   |

#### Returns

`Promise`\<`void`\>

#### Overrides

[AbstractPlugin](AbstractPlugin).[afterExecution](AbstractPlugin#afterexecution)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:119](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L119)

---

### afterConversation

▸ **afterConversation**(`context`, `result`): `Promise`\<`void`\>

After conversation completes

#### Parameters

| Name      | Type                                                               |
| :-------- | :----------------------------------------------------------------- |
| `context` | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |
| `result`  | [`IPluginExecutionResult`](../interfaces/IPluginExecutionResult)   |

#### Returns

`Promise`\<`void`\>

#### Overrides

[AbstractPlugin](AbstractPlugin).[afterConversation](AbstractPlugin#afterconversation)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:130](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L130)

---

### afterToolExecution

▸ **afterToolExecution**(`context`, `toolResults`): `Promise`\<`void`\>

After tool execution

REASON: Tool results structure varies by tool type and provider, needs flexible handling for webhook processing
ALTERNATIVES_CONSIDERED:

1. Strict tool result interfaces (breaks tool compatibility)
2. Union types (insufficient for dynamic tool results)
3. Generic constraints (too complex for webhook processing)
4. Interface definitions (too rigid for varied tool results)
5. Type assertions (decreases type safety)
   TODO: Consider standardized tool result interface across tools

#### Parameters

| Name          | Type                                                               |
| :------------ | :----------------------------------------------------------------- |
| `context`     | [`IPluginExecutionContext`](../interfaces/IPluginExecutionContext) |
| `toolResults` | [`IPluginExecutionResult`](../interfaces/IPluginExecutionResult)   |

#### Returns

`Promise`\<`void`\>

#### Overrides

[AbstractPlugin](AbstractPlugin).[afterToolExecution](AbstractPlugin#aftertoolexecution)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:150](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L150)

---

### onError

▸ **onError**(`error`, `context?`): `Promise`\<`void`\>

On error

#### Parameters

| Name       | Type                                                       |
| :--------- | :--------------------------------------------------------- |
| `error`    | `Error`                                                    |
| `context?` | [`IPluginErrorContext`](../interfaces/IPluginErrorContext) |

#### Returns

`Promise`\<`void`\>

#### Overrides

[AbstractPlugin](AbstractPlugin).[onError](AbstractPlugin#onerror)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:171](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L171)

---

### sendWebhook

▸ **sendWebhook**(`event`, `data`, `metadata?`): `Promise`\<`void`\>

Send webhook notification

#### Parameters

| Name        | Type                                              |
| :---------- | :------------------------------------------------ |
| `event`     | [`WebhookEventType`](../modules#webhookeventtype) |
| `data`      | `WebhookEventData`                                |
| `metadata?` | `WebhookMetadata`                                 |

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:191](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L191)

---

### sendCustomWebhook

▸ **sendCustomWebhook**(`data`, `metadata?`): `Promise`\<`void`\>

Send custom webhook

#### Parameters

| Name        | Type               |
| :---------- | :----------------- |
| `data`      | `WebhookEventData` |
| `metadata?` | `WebhookMetadata`  |

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:232](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L232)

---

### getStats

▸ **getStats**(): `WebhookPluginStats`

Get webhook plugin statistics

#### Returns

`WebhookPluginStats`

#### Overrides

[AbstractPlugin](AbstractPlugin).[getStats](AbstractPlugin#getstats)

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:357](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L357)

---

### clearQueue

▸ **clearQueue**(): `void`

Clear webhook queue

#### Returns

`void`

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:375](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L375)

---

### destroy

▸ **destroy**(): `Promise`\<`void`\>

Cleanup on plugin destruction

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/agents/src/plugins/webhook/webhook-plugin.ts:384](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/plugins/webhook/webhook-plugin.ts#L384)
