delegate-task: block prometheus task delegation
This commit is contained in:
@@ -267,6 +267,23 @@ describe("applyToolConfig", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("#given prometheus agent permissions", () => {
|
||||
describe("#when applying tool config", () => {
|
||||
it("#then should deny task delegation tools for prometheus", () => {
|
||||
const params = createParams({ agents: ["prometheus"] })
|
||||
|
||||
applyToolConfig(params)
|
||||
|
||||
const agent = params.agentResult.prometheus as {
|
||||
permission: Record<string, unknown>
|
||||
}
|
||||
expect(agent.permission.task).toBe("deny")
|
||||
expect(agent.permission["task_*"]).toBe("deny")
|
||||
expect(agent.permission.teammate).toBe("deny")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe("#given disabled_tools includes 'question'", () => {
|
||||
let originalConfigContent: string | undefined
|
||||
let originalCliRunMode: string | undefined
|
||||
|
||||
@@ -105,10 +105,10 @@ export function applyToolConfig(params: {
|
||||
prometheus.permission = {
|
||||
...prometheus.permission,
|
||||
call_omo_agent: "deny",
|
||||
task: "allow",
|
||||
task: "deny",
|
||||
question: questionPermission,
|
||||
"task_*": "allow",
|
||||
teammate: "allow",
|
||||
"task_*": "deny",
|
||||
teammate: "deny",
|
||||
...denyTodoTools,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user