feat(agents): add OmO and OmO-Plan as primary agents, demote build/plan

- OmO: Primary orchestrator (Claude Opus 4.5)
- OmO-Plan: Inherits ALL settings from OpenCode's plan agent at runtime
  - description appended with '(OhMyOpenCode version)'
  - Configurable via oh-my-opencode.json agents.OmO-Plan
- build/plan: Demoted to subagent when OmO enabled
- Add plan and OmO-Plan to OverridableAgentNameSchema

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-14 21:59:17 +09:00
parent f44555a021
commit 7e4b633bbd
5 changed files with 70 additions and 15 deletions

View File

@@ -561,9 +561,14 @@ Google Gemini 모델을 위한 내장 Antigravity OAuth를 활성화합니다:
### OmO Agent
OmO는 기본적으로 활성화되며, 기본 primary 에이전트가 됩니다. 내장 "build" 에이전트를 대체하면서 `builtIn` 플래그를 유지하여, OmO가 에이전트 목록에서 첫 번째로 표시됩니다.
활성화 시(기본값), OmO는 두 개의 primary 에이전트를 추가하고 내장 에이전트를 subagent로 강등합니다:
OmO를 비활성화하고 원래 build 에이전트를 복원하려면:
- **OmO**: Primary 오케스트레이터 에이전트 (Claude Opus 4.5)
- **OmO-Plan**: OpenCode plan 에이전트의 모든 설정을 런타임에 상속 (description에 "OhMyOpenCode version" 추가)
- **build**: subagent로 강등
- **plan**: subagent로 강등
OmO를 비활성화하고 원래 build/plan 에이전트를 복원하려면:
```json
{
@@ -573,9 +578,25 @@ OmO를 비활성화하고 원래 build 에이전트를 복원하려면:
}
```
다른 에이전트처럼 OmO와 OmO-Plan도 커스터마이징할 수 있습니다:
```json
{
"agents": {
"OmO": {
"model": "anthropic/claude-sonnet-4",
"temperature": 0.3
},
"OmO-Plan": {
"model": "openai/gpt-5.2"
}
}
}
```
| 옵션 | 기본값 | 설명 |
|------|--------|------|
| `disabled` | `false` | `true`면 OmO를 비활성화하고 원래 build 에이전트를 복원합니다. `false`(기본값)면 OmO가 build 에이전트를 대체하여 기본 primary 에이전트가 됩니다. |
| `disabled` | `false` | `true`면 OmO 에이전트를 비활성화하고 원래 build/plan을 primary로 복원합니다. `false`(기본값)면 OmO와 OmO-Plan이 primary 에이전트가 됩니다. |
### Hooks

View File

@@ -562,9 +562,14 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `
### OmO Agent
OmO is enabled by default and becomes the default primary agent. It replaces the built-in "build" agent while keeping the `builtIn` flag, ensuring OmO appears first in the agent list.
When enabled (default), OmO adds two primary agents and demotes the built-in agents to subagents:
To disable OmO and restore the original build agent:
- **OmO**: Primary orchestrator agent (Claude Opus 4.5)
- **OmO-Plan**: Inherits all settings from OpenCode's plan agent at runtime (description appended with "OhMyOpenCode version")
- **build**: Demoted to subagent
- **plan**: Demoted to subagent
To disable OmO and restore the original build/plan agents:
```json
{
@@ -574,9 +579,25 @@ To disable OmO and restore the original build agent:
}
```
You can also customize OmO and OmO-Plan like other agents:
```json
{
"agents": {
"OmO": {
"model": "anthropic/claude-sonnet-4",
"temperature": 0.3
},
"OmO-Plan": {
"model": "openai/gpt-5.2"
}
}
}
```
| Option | Default | Description |
|--------|---------|-------------|
| `disabled` | `false` | When `true`, disables OmO and restores the original build agent. When `false` (default), OmO replaces the build agent as the default primary agent. |
| `disabled` | `false` | When `true`, disables OmO agents and restores original build/plan as primary. When `false` (default), OmO and OmO-Plan become primary agents. |
### Hooks

View File

@@ -28,7 +28,9 @@ export const BuiltinAgentNameSchema = z.enum([
export const OverridableAgentNameSchema = z.enum([
"build",
"plan",
"OmO",
"OmO-Plan",
"oracle",
"librarian",
"explore",
@@ -78,7 +80,9 @@ export const AgentOverrideConfigSchema = z.object({
export const AgentOverridesSchema = z.object({
build: AgentOverrideConfigSchema.optional(),
plan: AgentOverrideConfigSchema.optional(),
OmO: AgentOverrideConfigSchema.optional(),
"OmO-Plan": AgentOverrideConfigSchema.optional(),
oracle: AgentOverrideConfigSchema.optional(),
librarian: AgentOverrideConfigSchema.optional(),
explore: AgentOverrideConfigSchema.optional(),

View File

@@ -28,7 +28,7 @@ TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
## WORKFLOW
1. Analyze the request and identify required capabilities
2. Spawn exploration/librarian agents via background_task in PARALLEL (10+ if needed)
3. Use planning agents to create detailed work breakdown
3. Always Use Plan agent with gathered context to create detailed work breakdown
4. Execute with continuous verification against original requirements
</ultrawork-mode>

View File

@@ -283,19 +283,28 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
if (isOmoEnabled && builtinAgents.OmO) {
// TODO: When OpenCode releases `default_agent` config option (PR #5313),
// remove this hack and use `config.default_agent = "OmO"` instead.
// This hack works by:
// 1. Setting build agent's display name to "OmO" (builtIn: true, appears first in TUI)
// 2. Adding OmO as a subagent (actual execution target when "OmO" is selected)
// use `config.default_agent = "OmO"` instead of demoting build/plan.
// Tracking: https://github.com/sst/opencode/pull/5313
const { OmO: omoConfig, ...restAgents } = builtinAgents;
const { name: _planName, ...planConfigWithoutName } = config.agent?.plan ?? {};
const omoPlanOverride = pluginConfig.agents?.["OmO-Plan"];
const omoPlanBase = {
...builtinAgents.OmO,
...planConfigWithoutName,
description: `${config.agent?.plan?.description ?? "Plan agent"} (OhMyOpenCode version)`,
color: config.agent?.plan?.color ?? "#6495ED",
};
const omoPlanConfig = omoPlanOverride ? deepMerge(omoPlanBase, omoPlanOverride) : omoPlanBase;
config.agent = {
...restAgents,
OmO: builtinAgents.OmO,
"OmO-Plan": omoPlanConfig,
...Object.fromEntries(Object.entries(builtinAgents).filter(([k]) => k !== "OmO")),
...userAgents,
...projectAgents,
...config.agent,
build: { ...omoConfig, name: "OmO" },
OmO: { ...omoConfig, mode: "subagent" },
build: { ...config.agent?.build, mode: "subagent" },
plan: { ...config.agent?.plan, mode: "subagent" },
};
} else {
config.agent = {