Merge pull request #3749 from code-yeongyu/fix/readonly-agent-delegation

fix(agents): allow Momus and Metis delegation
This commit is contained in:
YeonGyu-Kim
2026-05-01 19:32:11 +09:00
committed by GitHub
4 changed files with 27 additions and 4 deletions
-1
View File
@@ -296,7 +296,6 @@ const metisRestrictions = createAgentToolRestrictions([
"write", "write",
"edit", "edit",
"apply_patch", "apply_patch",
"task",
]) ])
export function createMetisAgent(model: string): AgentConfig { export function createMetisAgent(model: string): AgentConfig {
-1
View File
@@ -286,7 +286,6 @@ export function createMomusAgent(model: string): AgentConfig {
"write", "write",
"edit", "edit",
"apply_patch", "apply_patch",
"task",
]); ]);
const base = { const base = {
+27
View File
@@ -9,6 +9,7 @@ import { createMetisAgent } from "./metis"
import { createAtlasAgent } from "./atlas" import { createAtlasAgent } from "./atlas"
import { createSisyphusAgent } from "./sisyphus" import { createSisyphusAgent } from "./sisyphus"
import { createHephaestusAgent } from "./hephaestus" import { createHephaestusAgent } from "./hephaestus"
import { getAgentToolRestrictions } from "../shared/agent-tool-restrictions"
const TEST_MODEL = "anthropic/claude-sonnet-4-5" const TEST_MODEL = "anthropic/claude-sonnet-4-5"
@@ -85,6 +86,19 @@ describe("read-only agent tool restrictions", () => {
expect(permission[tool]).toBe("deny") 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", () => { describe("Metis", () => {
@@ -100,6 +114,19 @@ describe("read-only agent tool restrictions", () => {
expect(permission[tool]).toBe("deny") 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", () => { describe("Atlas", () => {
-2
View File
@@ -28,13 +28,11 @@ const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
metis: { metis: {
write: false, write: false,
edit: false, edit: false,
task: false,
}, },
momus: { momus: {
write: false, write: false,
edit: false, edit: false,
task: false,
}, },
"multimodal-looker": { "multimodal-looker": {