Skip to content

Commit da0a653

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 0b2d0ff commit da0a653

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
@@ -231,4 +231,8 @@ export interface Hooks {
231231
* Modify tool definitions (description and parameters) sent to LLM
232232
*/
233233
"tool.definition"?: (input: { toolID: string }, output: { description: string; parameters: any }) => Promise<void>
234+
/**
235+
* Called when the plugin is being disposed/cleaned up
236+
*/
237+
dispose?: () => Promise<void>
234238
}

0 commit comments

Comments
 (0)