xyne-plugin 1.2.29 → 1.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/hooks.ts +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyne-plugin",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "description": "SDK for writing Xyne plugins — define custom tools, hooks, and extensions",
5
5
  "type": "module",
6
6
  "exports": {
package/src/hooks.ts CHANGED
@@ -330,6 +330,15 @@ export interface Hooks {
330
330
  output: { context: string[]; prompt?: string | undefined },
331
331
  ) => Promise<void>
332
332
 
333
+ /**
334
+ * Filter tool outputs before pruning. Remove entries from `output.parts`
335
+ * to prevent those tool outputs from being compacted.
336
+ */
337
+ "tool.prune"?: (
338
+ input: { sessionID: string },
339
+ output: { parts: Array<{ id: string; tool: string; callID: string; tokens: number }> },
340
+ ) => Promise<void>
341
+
333
342
  /** Text completion hook — modify or provide text completions. */
334
343
  "text.complete"?: (
335
344
  input: { text: string; cursorOffset: number },