Skip to content

Commit 1305489

Browse files
committed
feat(plugin): Add dispose() method to Hooks interface
Add optional dispose callback to plugin Hooks interface to allow plugins to clean up resources when the Instance is disposed.
1 parent b0e1f63 commit 1305489

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/plugin/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,8 @@ export interface Hooks {
245245
* Modify tool definitions (description and parameters) sent to LLM
246246
*/
247247
"tool.definition"?: (input: { toolID: string }, output: { description: string; parameters: any }) => Promise<void>
248+
/**
249+
* Called when the plugin is being disposed/cleaned up
250+
*/
251+
dispose?: () => Promise<void>
248252
}

0 commit comments

Comments
 (0)