fix(atlas): allow task and call_omo_agent tools for subagent dispatch
Closes #2044
This commit is contained in:
parent
c505989ad4
commit
0639ce8df7
@ -17,7 +17,6 @@ import type { AvailableAgent, AvailableSkill, AvailableCategory } from "../dynam
|
|||||||
import { buildCategorySkillsDelegationGuide } from "../dynamic-agent-prompt-builder"
|
import { buildCategorySkillsDelegationGuide } from "../dynamic-agent-prompt-builder"
|
||||||
import type { CategoryConfig } from "../../config/schema"
|
import type { CategoryConfig } from "../../config/schema"
|
||||||
import { mergeCategories } from "../../shared/merge-categories"
|
import { mergeCategories } from "../../shared/merge-categories"
|
||||||
import { createAgentToolRestrictions } from "../../shared/permission-compat"
|
|
||||||
|
|
||||||
import { getDefaultAtlasPrompt } from "./default"
|
import { getDefaultAtlasPrompt } from "./default"
|
||||||
import { getGptAtlasPrompt } from "./gpt"
|
import { getGptAtlasPrompt } from "./gpt"
|
||||||
@ -100,11 +99,6 @@ function buildDynamicOrchestratorPrompt(ctx?: OrchestratorContext): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function createAtlasAgent(ctx: OrchestratorContext): AgentConfig {
|
export function createAtlasAgent(ctx: OrchestratorContext): AgentConfig {
|
||||||
const restrictions = createAgentToolRestrictions([
|
|
||||||
"task",
|
|
||||||
"call_omo_agent",
|
|
||||||
])
|
|
||||||
|
|
||||||
const baseConfig = {
|
const baseConfig = {
|
||||||
description:
|
description:
|
||||||
"Orchestrates work via task() to complete ALL tasks in a todo list until fully done. (Atlas - OhMyOpenCode)",
|
"Orchestrates work via task() to complete ALL tasks in a todo list until fully done. (Atlas - OhMyOpenCode)",
|
||||||
@ -113,7 +107,6 @@ export function createAtlasAgent(ctx: OrchestratorContext): AgentConfig {
|
|||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
prompt: buildDynamicOrchestratorPrompt(ctx),
|
prompt: buildDynamicOrchestratorPrompt(ctx),
|
||||||
color: "#10B981",
|
color: "#10B981",
|
||||||
...restrictions,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return baseConfig as AgentConfig
|
return baseConfig as AgentConfig
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { createLibrarianAgent } from "./librarian"
|
|||||||
import { createExploreAgent } from "./explore"
|
import { createExploreAgent } from "./explore"
|
||||||
import { createMomusAgent } from "./momus"
|
import { createMomusAgent } from "./momus"
|
||||||
import { createMetisAgent } from "./metis"
|
import { createMetisAgent } from "./metis"
|
||||||
|
import { createAtlasAgent } from "./atlas"
|
||||||
|
|
||||||
const TEST_MODEL = "anthropic/claude-sonnet-4-5"
|
const TEST_MODEL = "anthropic/claude-sonnet-4-5"
|
||||||
|
|
||||||
@ -96,4 +97,18 @@ describe("read-only agent tool restrictions", () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe("Atlas", () => {
|
||||||
|
test("allows delegation tools for orchestration", () => {
|
||||||
|
// given
|
||||||
|
const agent = createAtlasAgent({ model: TEST_MODEL })
|
||||||
|
|
||||||
|
// when
|
||||||
|
const permission = (agent.permission ?? {}) as Record<string, string>
|
||||||
|
|
||||||
|
// then
|
||||||
|
expect(permission["task"]).toBeUndefined()
|
||||||
|
expect(permission["call_omo_agent"]).toBeUndefined()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user