From e2c4365fa03fbd779bd1d0ce9e08abb6337312f5 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Wed, 8 Apr 2026 16:39:01 -0400 Subject: [PATCH] fix(types): remove plugin context cast --- packages/opencode/src/tool/registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index 8a73163d5e..63e1a97ea9 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -97,11 +97,11 @@ export namespace ToolRegistry { parameters: z.object(def.args), description: def.description, execute: async (args, toolCtx) => { - const pluginCtx = { + const pluginCtx: PluginToolContext = { ...toolCtx, directory: ctx.directory, worktree: ctx.worktree, - } as unknown as PluginToolContext + } const result = await def.execute(args as any, pluginCtx) const out = await Truncate.output(result, {}, await Agent.get(toolCtx.agent)) return {