fix(core): enforce V2 tool permissions (#31061)

This commit is contained in:
Kit Langton
2026-06-06 08:00:24 -04:00
committed by GitHub
parent 747b8daafc
commit 4814ab3a3d
10 changed files with 180 additions and 10 deletions
+1
View File
@@ -149,6 +149,7 @@ describe("BashTool", () => {
const definitions = yield* registry.definitions()
expect(definitions.map((tool) => tool.name)).toEqual(["bash"])
expect(definitions[0]?.inputSchema).not.toHaveProperty("properties.background")
expect(yield* registry.definitions([{ action: "bash", resource: "*", effect: "deny" }])).toEqual([])
expect(yield* registry.settle(call({ command: "pwd", description: "Print working directory" }))).toEqual({
result: { type: "text", value: "hello\n\n\nCommand exited with code 0." },
output: {