Skip to content

The open source coding agent.

TypeScript

core: expose tool arguments in shell hook for plugin visibility

Dax Raad56ad2db02055
diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts
index 1d3d7450945..99d44cd850f 100644
--- a/packages/opencode/src/session/prompt.ts
+++ b/packages/opencode/src/session/prompt.ts
@@ -454,6 +454,7 @@ export namespace SessionPrompt {
tool: "task",
sessionID,
callID: part.id,
+ args: taskArgs,
},
result,
)
@@ -805,6 +806,7 @@ export namespace SessionPrompt {
tool: item.id,
sessionID: ctx.sessionID,
callID: ctx.callID,
+ args,
},
result,
)
@@ -850,6 +852,7 @@ export namespace SessionPrompt {
tool: key,
sessionID: ctx.sessionID,
callID: opts.toolCallId,
+ args,
},
result,
)
diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts
index 4cc84a5f325..664f2c96731 100644
--- a/packages/plugin/src/index.ts
+++ b/packages/plugin/src/index.ts
@@ -187,7 +187,7 @@ export interface Hooks {
) => Promise<void>
"shell.env"?: (input: { cwd: string }, output: { env: Record<string, string> }) => Promise<void>
"tool.execute.after"?: (
- input: { tool: string; sessionID: string; callID: string },
+ input: { tool: string; sessionID: string; callID: string; args: any },
output: {
title: string
output: string