feat(plugin): add experimental.session.compacting hook for pre-compaction context injection (#5698)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
Joel Hooks 2025-12-17 11:57:09 -08:00 committed by GitHub
parent 1f52731255
commit 24430287c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 1 deletions

View file

@ -191,6 +191,11 @@ export interface Hooks {
system: string[]
},
) => Promise<void>
/**
* Called before session compaction starts. Allows plugins to append
* additional context to the compaction prompt.
*/
"experimental.session.compacting"?: (input: { sessionID: string }, output: { context: string[] }) => Promise<void>
"experimental.text.complete"?: (
input: { sessionID: string; messageID: string; partID: string },
output: { text: string },