From 86900d71f5aa1c9c320bcb93a3380bbea489541d Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Tue, 13 Jan 2026 20:31:18 -0300 Subject: [PATCH] fix: add missing metadata() and ask() defintions to ToolContext type (#8269) --- packages/plugin/src/tool.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/plugin/src/tool.ts b/packages/plugin/src/tool.ts index 37e802ac4..f759c07d2 100644 --- a/packages/plugin/src/tool.ts +++ b/packages/plugin/src/tool.ts @@ -5,6 +5,15 @@ export type ToolContext = { messageID: string agent: string abort: AbortSignal + metadata(input: { title?: string; metadata?: { [key: string]: any } }): void + ask(input: AskInput): Promise +} + +type AskInput = { + permission: string + patterns: string[] + always: string[] + metadata: { [key: string]: any } } export function tool(input: {