core: run command build agent now auto-accepts file edits to reduce workflow interruptions while still requiring confirmation for bash commands
parent
bb3382311d
commit
a531f3f36d
|
|
@ -350,6 +350,11 @@ export const RunCommand = cmd({
|
|||
action: "deny",
|
||||
pattern: "*",
|
||||
},
|
||||
{
|
||||
permission: "edit",
|
||||
action: "allow",
|
||||
pattern: "*",
|
||||
},
|
||||
]
|
||||
|
||||
function title() {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ test("build agent has correct default properties", async () => {
|
|||
expect(build).toBeDefined()
|
||||
expect(build?.mode).toBe("primary")
|
||||
expect(build?.native).toBe(true)
|
||||
expect(evalPerm(build, "edit")).toBe("allow")
|
||||
expect(evalPerm(build, "edit")).toBe("ask")
|
||||
expect(evalPerm(build, "bash")).toBe("allow")
|
||||
},
|
||||
})
|
||||
|
|
@ -203,8 +203,8 @@ test("agent permission config merges with defaults", async () => {
|
|||
expect(build).toBeDefined()
|
||||
// Specific pattern is denied
|
||||
expect(PermissionNext.evaluate("bash", "rm -rf *", build!.permission).action).toBe("deny")
|
||||
// Edit still allowed
|
||||
expect(evalPerm(build, "edit")).toBe("allow")
|
||||
// Edit still asks (default behavior)
|
||||
expect(evalPerm(build, "edit")).toBe("ask")
|
||||
},
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue