feat(agents): add build agent prompt extension and configuration override support

- Add BUILD_AGENT_PROMPT_EXTENSION for orchestrator-focused main agent behavior
- Introduce OverridableAgentName type to allow build agent customization
- Update config schema to support build agent override in oh-my-opencode.json
- Inject orchestration prompt into build agent's system prompt

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-13 22:13:23 +09:00
parent f3b2fccba7
commit b24b00fad2
6 changed files with 116 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentName, AgentOverrideConfig, AgentOverrides } from "./types"
import type { BuiltinAgentName, AgentOverrideConfig, AgentOverrides } from "./types"
import { oracleAgent } from "./oracle"
import { librarianAgent } from "./librarian"
import { exploreAgent } from "./explore"
@@ -8,7 +8,7 @@ import { documentWriterAgent } from "./document-writer"
import { multimodalLookerAgent } from "./multimodal-looker"
import { deepMerge } from "../shared"
const allBuiltinAgents: Record<AgentName, AgentConfig> = {
const allBuiltinAgents: Record<BuiltinAgentName, AgentConfig> = {
oracle: oracleAgent,
librarian: librarianAgent,
explore: exploreAgent,
@@ -25,13 +25,13 @@ function mergeAgentConfig(
}
export function createBuiltinAgents(
disabledAgents: AgentName[] = [],
disabledAgents: BuiltinAgentName[] = [],
agentOverrides: AgentOverrides = {}
): Record<string, AgentConfig> {
const result: Record<string, AgentConfig> = {}
for (const [name, config] of Object.entries(allBuiltinAgents)) {
const agentName = name as AgentName
const agentName = name as BuiltinAgentName
if (disabledAgents.includes(agentName)) {
continue