- Add OmO agent: powerful AI orchestrator for complex task delegation - Implements parallel background agent execution and todo-driven workflows - Emphasizes aggressive subagent delegation with 7-section prompt structure Co-authored-by: huynguyen03dev <huynguyen03dev@users.noreply.github.com> 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import type { AgentConfig } from "@opencode-ai/sdk"
|
|
import type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides } from "./types"
|
|
import { omoAgent } from "./omo"
|
|
import { oracleAgent } from "./oracle"
|
|
import { librarianAgent } from "./librarian"
|
|
import { exploreAgent } from "./explore"
|
|
import { frontendUiUxEngineerAgent } from "./frontend-ui-ux-engineer"
|
|
import { documentWriterAgent } from "./document-writer"
|
|
import { multimodalLookerAgent } from "./multimodal-looker"
|
|
import { deepMerge } from "../shared"
|
|
|
|
const allBuiltinAgents: Record<BuiltinAgentName, AgentConfig> = {
|
|
OmO: omoAgent,
|
|
oracle: oracleAgent,
|
|
librarian: librarianAgent,
|
|
explore: exploreAgent,
|
|
"frontend-ui-ux-engineer": frontendUiUxEngineerAgent,
|
|
"document-writer": documentWriterAgent,
|
|
"multimodal-looker": multimodalLookerAgent,
|
|
}
|
|
|
|
function mergeAgentConfig(
|
|
base: AgentConfig,
|
|
override: AgentOverrideConfig
|
|
): AgentConfig {
|
|
return deepMerge(base, override as Partial<AgentConfig>)
|
|
}
|
|
|
|
export function createBuiltinAgents(
|
|
disabledAgents: BuiltinAgentName[] = [],
|
|
agentOverrides: AgentOverrides = {}
|
|
): Record<string, AgentConfig> {
|
|
const result: Record<string, AgentConfig> = {}
|
|
|
|
for (const [name, config] of Object.entries(allBuiltinAgents)) {
|
|
const agentName = name as BuiltinAgentName
|
|
|
|
if (disabledAgents.includes(agentName)) {
|
|
continue
|
|
}
|
|
|
|
const override = agentOverrides[agentName]
|
|
if (override) {
|
|
result[name] = mergeAgentConfig(config, override)
|
|
} else {
|
|
result[name] = config
|
|
}
|
|
}
|
|
|
|
return result
|
|
}
|