Skip to content

Commit 73d5cac

Browse files
fix: add missing metadata() and ask() defintions to ToolContext type (anomalyco#8269)
1 parent b8828f2 commit 73d5cac

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/plugin/src/tool.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ export type ToolContext = {
55
messageID: string
66
agent: string
77
abort: AbortSignal
8+
metadata(input: { title?: string; metadata?: { [key: string]: any } }): void
9+
ask(input: AskInput): Promise<void>
10+
}
11+
12+
type AskInput = {
13+
permission: string
14+
patterns: string[]
15+
always: string[]
16+
metadata: { [key: string]: any }
817
}
918

1019
export function tool<Args extends z.ZodRawShape>(input: {

0 commit comments

Comments
 (0)