fix(core): enforce V2 tool permissions (#31061)
This commit is contained in:
parent
747b8daafc
commit
4814ab3a3d
10 changed files with 180 additions and 10 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue