Skip to content

Commit 7e4b633

Browse files
committed
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)
1 parent f44555a commit 7e4b633

File tree

5 files changed

+70
-15
lines changed

5 files changed

+70
-15
lines changed

README.ko.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,14 @@ Google Gemini 모델을 위한 내장 Antigravity OAuth를 활성화합니다:
561561

562562
### OmO Agent
563563

564-
OmO는 기본적으로 활성화되며, 기본 primary 에이전트가 됩니다. 내장 "build" 에이전트를 대체하면서 `builtIn` 플래그를 유지하여, OmO가 에이전트 목록에서 첫 번째로 표시됩니다.
564+
활성화 시(기본값), OmO는 두 개의 primary 에이전트를 추가하고 내장 에이전트를 subagent로 강등합니다:
565565

566-
OmO를 비활성화하고 원래 build 에이전트를 복원하려면:
566+
- **OmO**: Primary 오케스트레이터 에이전트 (Claude Opus 4.5)
567+
- **OmO-Plan**: OpenCode plan 에이전트의 모든 설정을 런타임에 상속 (description에 "OhMyOpenCode version" 추가)
568+
- **build**: subagent로 강등
569+
- **plan**: subagent로 강등
570+
571+
OmO를 비활성화하고 원래 build/plan 에이전트를 복원하려면:
567572

568573
```json
569574
{
@@ -573,9 +578,25 @@ OmO를 비활성화하고 원래 build 에이전트를 복원하려면:
573578
}
574579
```
575580

581+
다른 에이전트처럼 OmO와 OmO-Plan도 커스터마이징할 수 있습니다:
582+
583+
```json
584+
{
585+
"agents": {
586+
"OmO": {
587+
"model": "anthropic/claude-sonnet-4",
588+
"temperature": 0.3
589+
},
590+
"OmO-Plan": {
591+
"model": "openai/gpt-5.2"
592+
}
593+
}
594+
}
595+
```
596+
576597
| 옵션 | 기본값 | 설명 |
577598
|------|--------|------|
578-
| `disabled` | `false` | `true`OmO를 비활성화하고 원래 build 에이전트를 복원합니다. `false`(기본값)면 OmO가 build 에이전트를 대체하여 기본 primary 에이전트가 됩니다. |
599+
| `disabled` | `false` | `true`OmO 에이전트를 비활성화하고 원래 build/plan을 primary로 복원합니다. `false`(기본값)면 OmO와 OmO-Plan이 primary 에이전트가 됩니다. |
579600

580601
### Hooks
581602

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,14 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `
562562

563563
### OmO Agent
564564

565-
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.
565+
When enabled (default), OmO adds two primary agents and demotes the built-in agents to subagents:
566566

567-
To disable OmO and restore the original build agent:
567+
- **OmO**: Primary orchestrator agent (Claude Opus 4.5)
568+
- **OmO-Plan**: Inherits all settings from OpenCode's plan agent at runtime (description appended with "OhMyOpenCode version")
569+
- **build**: Demoted to subagent
570+
- **plan**: Demoted to subagent
571+
572+
To disable OmO and restore the original build/plan agents:
568573

569574
```json
570575
{
@@ -574,9 +579,25 @@ To disable OmO and restore the original build agent:
574579
}
575580
```
576581

582+
You can also customize OmO and OmO-Plan like other agents:
583+
584+
```json
585+
{
586+
"agents": {
587+
"OmO": {
588+
"model": "anthropic/claude-sonnet-4",
589+
"temperature": 0.3
590+
},
591+
"OmO-Plan": {
592+
"model": "openai/gpt-5.2"
593+
}
594+
}
595+
}
596+
```
597+
577598
| Option | Default | Description |
578599
|--------|---------|-------------|
579-
| `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. |
600+
| `disabled` | `false` | When `true`, disables OmO agents and restores original build/plan as primary. When `false` (default), OmO and OmO-Plan become primary agents. |
580601

581602
### Hooks
582603

src/config/schema.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export const BuiltinAgentNameSchema = z.enum([
2828

2929
export const OverridableAgentNameSchema = z.enum([
3030
"build",
31+
"plan",
3132
"OmO",
33+
"OmO-Plan",
3234
"oracle",
3335
"librarian",
3436
"explore",
@@ -78,7 +80,9 @@ export const AgentOverrideConfigSchema = z.object({
7880

7981
export const AgentOverridesSchema = z.object({
8082
build: AgentOverrideConfigSchema.optional(),
83+
plan: AgentOverrideConfigSchema.optional(),
8184
OmO: AgentOverrideConfigSchema.optional(),
85+
"OmO-Plan": AgentOverrideConfigSchema.optional(),
8286
oracle: AgentOverrideConfigSchema.optional(),
8387
librarian: AgentOverrideConfigSchema.optional(),
8488
explore: AgentOverrideConfigSchema.optional(),

src/hooks/keyword-detector/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
2828
## WORKFLOW
2929
1. Analyze the request and identify required capabilities
3030
2. Spawn exploration/librarian agents via background_task in PARALLEL (10+ if needed)
31-
3. Use planning agents to create detailed work breakdown
31+
3. Always Use Plan agent with gathered context to create detailed work breakdown
3232
4. Execute with continuous verification against original requirements
3333
3434
</ultrawork-mode>

src/index.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,28 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
283283

284284
if (isOmoEnabled && builtinAgents.OmO) {
285285
// TODO: When OpenCode releases `default_agent` config option (PR #5313),
286-
// remove this hack and use `config.default_agent = "OmO"` instead.
287-
// This hack works by:
288-
// 1. Setting build agent's display name to "OmO" (builtIn: true, appears first in TUI)
289-
// 2. Adding OmO as a subagent (actual execution target when "OmO" is selected)
286+
// use `config.default_agent = "OmO"` instead of demoting build/plan.
290287
// Tracking: https://github.com/sst/opencode/pull/5313
291-
const { OmO: omoConfig, ...restAgents } = builtinAgents;
288+
const { name: _planName, ...planConfigWithoutName } = config.agent?.plan ?? {};
289+
const omoPlanOverride = pluginConfig.agents?.["OmO-Plan"];
290+
const omoPlanBase = {
291+
...builtinAgents.OmO,
292+
...planConfigWithoutName,
293+
description: `${config.agent?.plan?.description ?? "Plan agent"} (OhMyOpenCode version)`,
294+
color: config.agent?.plan?.color ?? "#6495ED",
295+
};
296+
297+
const omoPlanConfig = omoPlanOverride ? deepMerge(omoPlanBase, omoPlanOverride) : omoPlanBase;
298+
292299
config.agent = {
293-
...restAgents,
300+
OmO: builtinAgents.OmO,
301+
"OmO-Plan": omoPlanConfig,
302+
...Object.fromEntries(Object.entries(builtinAgents).filter(([k]) => k !== "OmO")),
294303
...userAgents,
295304
...projectAgents,
296305
...config.agent,
297-
build: { ...omoConfig, name: "OmO" },
298-
OmO: { ...omoConfig, mode: "subagent" },
306+
build: { ...config.agent?.build, mode: "subagent" },
307+
plan: { ...config.agent?.plan, mode: "subagent" },
299308
};
300309
} else {
301310
config.agent = {

0 commit comments

Comments
 (0)