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",
"edit",
"apply_patch",
"task",
])
export function createMetisAgent(model: string): AgentConfig {
-1
View File
@@ -286,7 +286,6 @@ export function createMomusAgent(model: string): AgentConfig {
"write",
"edit",
"apply_patch",
"task",
]);
const base = {
+27
View File
@@ -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", () => {
-2
View File
@@ -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": {