fix: add missing metadata() and ask() defintions to ToolContext type (#8269)

This commit is contained in:
Daniel M Brasil
2026-01-13 20:31:18 -03:00
committed by GitHub
parent b8828f2609
commit 73d5cacc06

View File

@@ -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<void>
}
type AskInput = {
permission: string
patterns: string[]
always: string[]
metadata: { [key: string]: any }
}
export function tool<Args extends z.ZodRawShape>(input: {