mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 03:24:54 +00:00
fix(mcp): pass tool input as permission metadata (#51062)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
32b1a1bf85
commit
328f74c213
2 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ export const layer = Layer.effect(
|
|||
action: name(tool.server, tool.name),
|
||||
resources: ["*"],
|
||||
save: ["*"],
|
||||
metadata: {},
|
||||
metadata: { input: input ?? {} },
|
||||
sessionID: context.sessionID,
|
||||
agent: context.agent,
|
||||
source: {
|
||||
|
|
|
|||
|
|
@ -2513,7 +2513,7 @@ it.effect("waits for permission before calling an MCP tool", () =>
|
|||
type: "tool-call",
|
||||
id: "call_mcp_permission",
|
||||
name: "execute",
|
||||
input: { code: "return await tools.demo.search({})" },
|
||||
input: { code: 'return await tools.demo.search({ query: "open issues" })' },
|
||||
},
|
||||
})
|
||||
.pipe(Effect.forkScoped)
|
||||
|
|
@ -2521,7 +2521,7 @@ it.effect("waits for permission before calling an MCP tool", () =>
|
|||
action: "demo_search",
|
||||
resources: ["*"],
|
||||
save: ["*"],
|
||||
metadata: {},
|
||||
metadata: { input: { query: "open issues" } },
|
||||
sessionID: Session.ID.make("ses_mcp_permission"),
|
||||
agent: toolIdentity.agent,
|
||||
source: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue