feat(athena): register council members as task-callable subagents
Each council member from config is now registered as a named agent (e.g. 'Council: Claude Opus 4.6') via registerCouncilMemberAgents(). Adds humanizeModelId() to derive friendly display names from model IDs. Athena's prompt gets the member list appended so it can call task(subagent_type=...) for each. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -28,6 +28,8 @@ import { collectPendingBuiltinAgents } from "./builtin-agents/general-agents"
|
||||
import { maybeCreateSisyphusConfig } from "./builtin-agents/sisyphus-agent"
|
||||
import { maybeCreateHephaestusConfig } from "./builtin-agents/hephaestus-agent"
|
||||
import { maybeCreateAtlasConfig } from "./builtin-agents/atlas-agent"
|
||||
import { registerCouncilMemberAgents } from "./builtin-agents/council-member-agents"
|
||||
import type { CouncilConfig } from "./athena/types"
|
||||
|
||||
type AgentSource = AgentFactory | AgentConfig
|
||||
|
||||
@@ -76,7 +78,8 @@ export async function createBuiltinAgents(
|
||||
uiSelectedModel?: string,
|
||||
disabledSkills?: Set<string>,
|
||||
useTaskSystem = false,
|
||||
disableOmoEnv = false
|
||||
disableOmoEnv = false,
|
||||
councilConfig?: CouncilConfig
|
||||
): Promise<Record<string, AgentConfig>> {
|
||||
|
||||
const connectedProviders = readConnectedProvidersCache()
|
||||
@@ -183,5 +186,21 @@ export async function createBuiltinAgents(
|
||||
result["atlas"] = atlasConfig
|
||||
}
|
||||
|
||||
if (councilConfig && councilConfig.members.length >= 2) {
|
||||
const { agents: councilAgents, registeredKeys } = registerCouncilMemberAgents(councilConfig)
|
||||
for (const [key, config] of Object.entries(councilAgents)) {
|
||||
result[key] = config
|
||||
}
|
||||
|
||||
if (result["athena"] && registeredKeys.length > 0) {
|
||||
const memberList = registeredKeys.map((key) => `- "${key}"`).join("\n")
|
||||
const councilTaskInstructions = `\n\n## Registered Council Members (use these as subagent_type in task calls)\n\n${memberList}`
|
||||
result["athena"] = {
|
||||
...result["athena"],
|
||||
prompt: (result["athena"].prompt ?? "") + councilTaskInstructions,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user