fix(agents): allow Momus and Metis delegation

Keep Momus and Metis read-only for file edits while allowing task-based invocation for planning review workflows.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-01 19:27:25 +09:00
parent b88e32cbdd
commit bae62ab582
4 changed files with 27 additions and 4 deletions
+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", () => {