diff options
| author | Daniel M Brasil <[email protected]> | 2026-01-13 20:31:18 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-13 17:31:18 -0600 |
| commit | 73d5cacc06594398cfa543089012d5ed3b0e9726 (patch) | |
| tree | 33de39aae9cd70db17380a1b9c72f0517662aef8 /packages/plugin/src | |
| parent | b8828f2609b7cc2146512566def1359af3a67f47 (diff) | |
| download | opencode-73d5cacc06594398cfa543089012d5ed3b0e9726.tar.gz opencode-73d5cacc06594398cfa543089012d5ed3b0e9726.zip | |
fix: add missing metadata() and ask() defintions to ToolContext type (#8269)
Diffstat (limited to 'packages/plugin/src')
| -rw-r--r-- | packages/plugin/src/tool.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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<void> +} + +type AskInput = { + permission: string + patterns: string[] + always: string[] + metadata: { [key: string]: any } } export function tool<Args extends z.ZodRawShape>(input: { |
