Merge pull request #3749 from code-yeongyu/fix/readonly-agent-delegation
fix(agents): allow Momus and Metis delegation
This commit is contained in:
@@ -296,7 +296,6 @@ const metisRestrictions = createAgentToolRestrictions([
|
||||
"write",
|
||||
"edit",
|
||||
"apply_patch",
|
||||
"task",
|
||||
])
|
||||
|
||||
export function createMetisAgent(model: string): AgentConfig {
|
||||
|
||||
@@ -286,7 +286,6 @@ export function createMomusAgent(model: string): AgentConfig {
|
||||
"write",
|
||||
"edit",
|
||||
"apply_patch",
|
||||
"task",
|
||||
]);
|
||||
|
||||
const base = {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { createMetisAgent } from "./metis"
|
||||
import { createAtlasAgent } from "./atlas"
|
||||
import { createSisyphusAgent } from "./sisyphus"
|
||||
import { createHephaestusAgent } from "./hephaestus"
|
||||
import { getAgentToolRestrictions } from "../shared/agent-tool-restrictions"
|
||||
|
||||
const TEST_MODEL = "anthropic/claude-sonnet-4-5"
|
||||
|
||||
@@ -85,6 +86,19 @@ describe("read-only agent tool restrictions", () => {
|
||||
expect(permission[tool]).toBe("deny")
|
||||
}
|
||||
})
|
||||
|
||||
test("allows task delegation while remaining ineligible for team membership", () => {
|
||||
// given
|
||||
const agent = createMomusAgent(TEST_MODEL)
|
||||
|
||||
// when
|
||||
const permission = agent.permission as Record<string, string>
|
||||
const sessionRestrictions = getAgentToolRestrictions("momus")
|
||||
|
||||
// then
|
||||
expect(permission["task"]).toBeUndefined()
|
||||
expect(sessionRestrictions["task"]).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe("Metis", () => {
|
||||
@@ -100,6 +114,19 @@ describe("read-only agent tool restrictions", () => {
|
||||
expect(permission[tool]).toBe("deny")
|
||||
}
|
||||
})
|
||||
|
||||
test("allows task delegation while remaining ineligible for team membership", () => {
|
||||
// given
|
||||
const agent = createMetisAgent(TEST_MODEL)
|
||||
|
||||
// when
|
||||
const permission = agent.permission as Record<string, string>
|
||||
const sessionRestrictions = getAgentToolRestrictions("metis")
|
||||
|
||||
// then
|
||||
expect(permission["task"]).toBeUndefined()
|
||||
expect(sessionRestrictions["task"]).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
describe("Atlas", () => {
|
||||
|
||||
@@ -28,13 +28,11 @@ const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
|
||||
metis: {
|
||||
write: false,
|
||||
edit: false,
|
||||
task: false,
|
||||
},
|
||||
|
||||
momus: {
|
||||
write: false,
|
||||
edit: false,
|
||||
task: false,
|
||||
},
|
||||
|
||||
"multimodal-looker": {
|
||||
|
||||
Reference in New Issue
Block a user