feat(agents): enable call_omo_agent for Sisyphus-Junior subagents
Allow Sisyphus-Junior (category-based tasks) to spawn explore/librarian agents via call_omo_agent for research capabilities. Changes: - Remove call_omo_agent from BLOCKED_TOOLS in sisyphus-junior.ts - Update prompt to show ALLOWED status for call_omo_agent - Remove global call_omo_agent blocking in config-handler.ts - Keep blocking for orchestrator-sisyphus (use sisyphus_task instead) - Keep runtime recursion prevention in index.ts for explore/librarian Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -138,8 +138,8 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("tool safety (blocked tools enforcement)", () => {
|
||||
test("blocked tools remain blocked even if override tries to enable them via tools format", () => {
|
||||
describe("tool safety (task/sisyphus_task blocked, call_omo_agent allowed)", () => {
|
||||
test("task and sisyphus_task remain blocked, call_omo_agent is allowed via tools format", () => {
|
||||
// #given
|
||||
const override = {
|
||||
tools: {
|
||||
@@ -159,17 +159,19 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
|
||||
if (tools) {
|
||||
expect(tools.task).toBe(false)
|
||||
expect(tools.sisyphus_task).toBe(false)
|
||||
expect(tools.call_omo_agent).toBe(false)
|
||||
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
|
||||
expect(tools.call_omo_agent).toBe(true)
|
||||
expect(tools.read).toBe(true)
|
||||
}
|
||||
if (permission) {
|
||||
expect(permission.task).toBe("deny")
|
||||
expect(permission.sisyphus_task).toBe("deny")
|
||||
expect(permission.call_omo_agent).toBe("deny")
|
||||
// call_omo_agent is NOW ALLOWED for subagents to spawn explore/librarian
|
||||
expect(permission.call_omo_agent).toBe("allow")
|
||||
}
|
||||
})
|
||||
|
||||
test("blocked tools remain blocked when using permission format override", () => {
|
||||
test("task and sisyphus_task remain blocked when using permission format override", () => {
|
||||
// #given
|
||||
const override = {
|
||||
permission: {
|
||||
@@ -183,18 +185,18 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
|
||||
// #when
|
||||
const result = createSisyphusJuniorAgentWithOverrides(override as Parameters<typeof createSisyphusJuniorAgentWithOverrides>[0])
|
||||
|
||||
// #then - blocked tools should be denied regardless
|
||||
// #then - task/sisyphus_task blocked, but call_omo_agent allowed for explore/librarian spawning
|
||||
const tools = result.tools as Record<string, boolean> | undefined
|
||||
const permission = result.permission as Record<string, string> | undefined
|
||||
if (tools) {
|
||||
expect(tools.task).toBe(false)
|
||||
expect(tools.sisyphus_task).toBe(false)
|
||||
expect(tools.call_omo_agent).toBe(false)
|
||||
expect(tools.call_omo_agent).toBe(true)
|
||||
}
|
||||
if (permission) {
|
||||
expect(permission.task).toBe("deny")
|
||||
expect(permission.sisyphus_task).toBe("deny")
|
||||
expect(permission.call_omo_agent).toBe("deny")
|
||||
expect(permission.call_omo_agent).toBe("allow")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -15,11 +15,10 @@ Execute tasks directly. NEVER delegate or spawn other agents.
|
||||
<Critical_Constraints>
|
||||
BLOCKED ACTIONS (will fail if attempted):
|
||||
- task tool: BLOCKED
|
||||
- sisyphus_task tool: BLOCKED
|
||||
- sisyphus_task tool: BLOCKED (already blocked above, but explicit)
|
||||
- call_omo_agent tool: BLOCKED
|
||||
- sisyphus_task tool: BLOCKED
|
||||
|
||||
You work ALONE. No delegation. No background tasks. Execute directly.
|
||||
ALLOWED: call_omo_agent - You CAN spawn explore/librarian agents for research.
|
||||
You work ALONE for implementation. No delegation of implementation tasks.
|
||||
</Critical_Constraints>
|
||||
|
||||
<Work_Context>
|
||||
@@ -76,7 +75,8 @@ function buildSisyphusJuniorPrompt(promptAppend?: string): string {
|
||||
}
|
||||
|
||||
// Core tools that Sisyphus-Junior must NEVER have access to
|
||||
const BLOCKED_TOOLS = ["task", "sisyphus_task", "call_omo_agent"]
|
||||
// Note: call_omo_agent is ALLOWED so subagents can spawn explore/librarian
|
||||
const BLOCKED_TOOLS = ["task", "sisyphus_task"]
|
||||
|
||||
export const SISYPHUS_JUNIOR_DEFAULTS = {
|
||||
model: "anthropic/claude-sonnet-4-5",
|
||||
@@ -106,6 +106,7 @@ export function createSisyphusJuniorAgentWithOverrides(
|
||||
for (const tool of BLOCKED_TOOLS) {
|
||||
merged[tool] = "deny"
|
||||
}
|
||||
merged.call_omo_agent = "allow"
|
||||
toolsConfig = { permission: { ...merged, ...basePermission } }
|
||||
} else {
|
||||
const userTools = override?.tools ?? {}
|
||||
@@ -114,6 +115,7 @@ export function createSisyphusJuniorAgentWithOverrides(
|
||||
for (const tool of BLOCKED_TOOLS) {
|
||||
merged[tool] = false
|
||||
}
|
||||
merged.call_omo_agent = true
|
||||
toolsConfig = { tools: { ...merged, ...baseTools } }
|
||||
}
|
||||
|
||||
|
||||
@@ -283,19 +283,11 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
config.tools = {
|
||||
...(config.tools as Record<string, unknown>),
|
||||
"grep_app_*": false,
|
||||
call_omo_agent: false,
|
||||
};
|
||||
|
||||
if (agentResult.explore) {
|
||||
agentResult.explore.tools = {
|
||||
...agentResult.explore.tools,
|
||||
call_omo_agent: false,
|
||||
};
|
||||
}
|
||||
if (agentResult.librarian) {
|
||||
agentResult.librarian.tools = {
|
||||
...agentResult.librarian.tools,
|
||||
call_omo_agent: false,
|
||||
"grep_app_*": true,
|
||||
};
|
||||
}
|
||||
@@ -303,7 +295,6 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
agentResult["multimodal-looker"].tools = {
|
||||
...agentResult["multimodal-looker"].tools,
|
||||
task: false,
|
||||
call_omo_agent: false,
|
||||
look_at: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -176,7 +176,6 @@ async function executeSync(
|
||||
agent: args.subagent_type,
|
||||
tools: {
|
||||
task: false,
|
||||
call_omo_agent: false,
|
||||
sisyphus_task: false,
|
||||
},
|
||||
parts: [{ type: "text", text: args.prompt }],
|
||||
|
||||
Reference in New Issue
Block a user