oh-my-opencode-slim 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -86
- package/README.zh-CN.md +51 -55
- package/dist/agents/index.d.ts +16 -10
- package/dist/agents/prompts.d.ts +17 -0
- package/dist/agents/types.d.ts +14 -0
- package/dist/background/background-manager.d.ts +94 -0
- package/dist/background/index.d.ts +2 -0
- package/dist/background/tmux-session-manager.d.ts +46 -0
- package/dist/cli/config-io.d.ts +23 -0
- package/dist/cli/config-manager.d.ts +4 -25
- package/dist/cli/index.js +187 -157
- package/dist/cli/model-mappings.d.ts +25 -0
- package/dist/cli/paths.d.ts +7 -0
- package/dist/cli/providers.d.ts +87 -0
- package/dist/cli/system.d.ts +4 -0
- package/dist/cli/types.d.ts +6 -1
- package/dist/config/constants.d.ts +6 -1
- package/dist/config/loader.d.ts +13 -0
- package/dist/config/schema.d.ts +1 -9
- package/dist/features/background-manager.d.ts +58 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +5 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +22 -6
- package/dist/hooks/auto-update-checker/constants.d.ts +4 -1
- package/dist/hooks/auto-update-checker/index.d.ts +6 -0
- package/dist/hooks/auto-update-checker/types.d.ts +6 -0
- package/dist/index.js +3722 -578
- package/dist/shared/agent-variant.d.ts +23 -0
- package/dist/shared/binary-downloader.d.ts +14 -0
- package/dist/shared/formatters.d.ts +7 -0
- package/dist/shared/polling.d.ts +23 -0
- package/dist/shared/tmux.d.ts +42 -0
- package/dist/tools/background.d.ts +57 -1
- package/dist/tools/lsp/client.d.ts +1 -11
- package/dist/tools/lsp/protocol-parser.d.ts +14 -0
- package/dist/tools/lsp/text-editor.d.ts +13 -0
- package/dist/tools/lsp/types.d.ts +2 -83
- package/dist/tools/shared/downloader-utils.d.ts +46 -0
- package/dist/utils/agent-variant.d.ts +41 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/zip-extractor.d.ts +1 -0
- package/package.json +3 -1
- package/dist/agents/coder.d.ts +0 -2
- package/dist/agents/document-writer.d.ts +0 -2
- package/dist/agents/explore.d.ts +0 -2
- package/dist/agents/frontend.d.ts +0 -2
- package/dist/agents/index.test.d.ts +0 -1
- package/dist/agents/multimodal.d.ts +0 -2
- package/dist/agents/scribe.d.ts +0 -2
- package/dist/agents/simplicity-reviewer.d.ts +0 -2
- package/dist/agents/specialist.d.ts +0 -2
- package/dist/cli/config-manager.test.d.ts +0 -1
- package/dist/config/loader.test.d.ts +0 -1
- package/dist/features/background-manager.test.d.ts +0 -1
- package/dist/mcp/index.test.d.ts +0 -1
- package/dist/tools/ast-grep/napi.d.ts +0 -13
- package/dist/tools/call-omo-agent.d.ts +0 -3
- package/dist/tools/skill/builtin.test.d.ts +0 -1
- package/dist/tools/skill/mcp-manager.test.d.ts +0 -1
- package/dist/utils/agent-variant.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
**A lightweight, powerful agent orchestration plugin for OpenCode**
|
|
6
6
|
|
|
7
|
-
<img src="img/team.png" alt="The Pantheon - Agent Team" width="
|
|
7
|
+
<img src="img/team.png" alt="The Pantheon - Agent Team" width="800">
|
|
8
8
|
|
|
9
|
-
*
|
|
9
|
+
*Six divine beings forged from necessity, each an immortal master of their craft await your command to forge order from chaos and build what was once thought impossible.*
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
> **[Antigravity](https://antigravity.google) subscription recommended.** The pantheon is tuned for Antigravity's model routing. Other providers work, but you'll get the best experience with Antigravity.
|
|
16
16
|
|
|
17
|
+
<div align="center">
|
|
18
|
+
|
|
19
|
+
[](https://github.com/alvinunreal/oh-my-opencode-slim)
|
|
20
|
+
<a href="https://x.com/alvinunreal" target="_blank" rel="noopener noreferrer">
|
|
21
|
+
<img src="https://img.shields.io/badge/%20%40alvinunreal-000000?style=for-the-badge&logo=x&logoColor=white" alt="@alvinunreal on X" />
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
17
26
|
---
|
|
18
27
|
|
|
19
28
|
## ⚡ Quick Navigation
|
|
@@ -21,14 +30,13 @@
|
|
|
21
30
|
- [🚀 **Installation**](#installation)
|
|
22
31
|
- [For Humans](#for-humans)
|
|
23
32
|
- [For LLM Agents](#for-llm-agents)
|
|
24
|
-
- [🏗️ **Architecture & Flow**](#architecture--flow)
|
|
25
33
|
- [🏛️ **Meet the Pantheon**](#meet-the-pantheon)
|
|
26
|
-
- [Orchestrator](#orchestrator)
|
|
27
|
-
- [Explorer](#explorer)
|
|
28
|
-
- [Oracle](#oracle)
|
|
29
|
-
- [Librarian](#librarian)
|
|
30
|
-
- [Designer](#designer)
|
|
31
|
-
- [Fixer](#fixer)
|
|
34
|
+
- [Orchestrator](#orchestrator-the-embodiment-of-order)
|
|
35
|
+
- [Explorer](#explorer-the-eternal-wanderer)
|
|
36
|
+
- [Oracle](#oracle-the-guardian-of-paths)
|
|
37
|
+
- [Librarian](#librarian-the-weaver-of-knowledge)
|
|
38
|
+
- [Designer](#designer-the-guardian-of-aesthetics)
|
|
39
|
+
- [Fixer](#fixer-the-last-builder)
|
|
32
40
|
- [🧩 **Skills**](#-skills)
|
|
33
41
|
- [Available Skills](#available-skills)
|
|
34
42
|
- [Default Skill Assignments](#default-skill-assignments)
|
|
@@ -44,7 +52,6 @@
|
|
|
44
52
|
- [🔌 **MCP Servers**](#mcp-servers)
|
|
45
53
|
- [⚙️ **Configuration**](#configuration)
|
|
46
54
|
- [Files You Edit](#files-you-edit)
|
|
47
|
-
- [OpenCode Config](#opencode-config-opencodejson)
|
|
48
55
|
- [Plugin Config](#plugin-config-oh-my-opencode-slimjson)
|
|
49
56
|
- [🗑️ **Uninstallation**](#uninstallation)
|
|
50
57
|
|
|
@@ -182,46 +189,9 @@ Then manually create the config files at:
|
|
|
182
189
|
|
|
183
190
|
---
|
|
184
191
|
|
|
185
|
-
## 🏗️ Architecture & Flow
|
|
186
|
-
|
|
187
|
-
The plugin follows a "Hub and Spoke" model:
|
|
188
|
-
|
|
189
|
-
1. **The Orchestrator (Hub)**: The main entry point for user requests. It analyzes the task and decides which specialized agents to call.
|
|
190
|
-
2. **Specialized Agents (Spokes)**: Domain-specific experts (e.g., UI/UX, Documentation, Architecture) that handle narrow tasks with high precision.
|
|
191
|
-
3. **Background Manager**: A robust engine that allows the Orchestrator to "fire and forget" tasks (like deep codebase searches or documentation research) while continuing to work on other parts of the problem.
|
|
192
|
-
|
|
193
|
-
### 🏛️ The Flow of a Request
|
|
194
|
-
|
|
195
|
-
<img src="img/intro.png" alt="Orchestration Flow" width="800">
|
|
196
|
-
|
|
197
|
-
1. **User Prompt**: "Refactor the auth logic and update the docs."
|
|
198
|
-
2. **Orchestrator**: Creates a TODO list.
|
|
199
|
-
3. **Delegation**:
|
|
200
|
-
- Launches an `@explorer` background task to find all auth-related files.
|
|
201
|
-
- Launches a `@librarian` task to check the latest documentation for the auth library used.
|
|
202
|
-
4. **Integration**: Once background results are ready, the Orchestrator delegates to `@fixer` to perform the refactor efficiently.
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### Primary vs Subagents
|
|
207
|
-
|
|
208
|
-
Primary agents appear in the OpenCode UI selector, while subagents are hidden from the UI and intended for delegation through `background_task`.
|
|
209
|
-
|
|
210
|
-
**Primary agents (UI):**
|
|
211
|
-
- OpenCode built-ins: `Build`, `Plan` (disabled by the installer by default)
|
|
212
|
-
- Plugin primary: `orchestrator`
|
|
213
|
-
|
|
214
|
-
**Subagents (background_task):** `explorer`, `librarian`, `oracle`, `designer`, `fixer`
|
|
215
|
-
|
|
216
|
-
The `background_task` tool lists only subagents. If the UI list looks stale after changes, restart OpenCode.
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
192
|
## Meet the Pantheon
|
|
221
193
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
### Orchestrator
|
|
194
|
+
### Orchestrator: The Embodiment Of Order
|
|
225
195
|
|
|
226
196
|
<a href="src/agents/orchestrator.ts"><img src="img/orchestrator.png" alt="Orchestrator" align="right" width="240"></a>
|
|
227
197
|
|
|
@@ -233,15 +203,13 @@ The `background_task` tool lists only subagents. If the UI list looks stale afte
|
|
|
233
203
|
|
|
234
204
|
Write and execute code, orchestrate multi-agent workflows, parse the unspoken from the spoken, summon specialists mid-battle. *Shape reality directly - and assign realms to others when the universe grows too vast.*
|
|
235
205
|
|
|
236
|
-
<br clear="both">
|
|
237
|
-
|
|
238
206
|
---
|
|
239
207
|
|
|
240
|
-
### Explorer
|
|
208
|
+
### Explorer: The Eternal Wanderer
|
|
241
209
|
|
|
242
|
-
<a href="src/agents/
|
|
210
|
+
<a href="src/agents/explorer.ts"><img src="img/explorer.png" alt="Explorer" align="right" width="240"></a>
|
|
243
211
|
|
|
244
|
-
> **The Explorer**
|
|
212
|
+
> **The Explorer** is an immortal wanderer who has traversed the corridors of a million codebases since the dawn of programming. Cursed with the gift of eternal curiosity, they cannot rest until every file is known, every pattern understood, every secret revealed. Legends say they once searched the entire internet in a single heartbeat. They are the wind that carries knowledge, the eyes that see all, the spirit that never sleeps.
|
|
245
213
|
|
|
246
214
|
**Role:** `Codebase reconnaissance`
|
|
247
215
|
**Model:** `google/gemini-3-flash`
|
|
@@ -249,15 +217,13 @@ Write and execute code, orchestrate multi-agent workflows, parse the unspoken fr
|
|
|
249
217
|
|
|
250
218
|
Regex search, AST pattern matching, file discovery, parallel exploration. *Read-only: they chart the territory; others conquer it.*
|
|
251
219
|
|
|
252
|
-
<br clear="both">
|
|
253
|
-
|
|
254
220
|
---
|
|
255
221
|
|
|
256
|
-
### Oracle
|
|
222
|
+
### Oracle: The Guardian of Paths
|
|
257
223
|
|
|
258
224
|
<a href="src/agents/oracle.ts"><img src="img/oracle.png" alt="Oracle" align="right" width="240"></a>
|
|
259
225
|
|
|
260
|
-
> **The Oracle**
|
|
226
|
+
> **The Oracle** stands at the crossroads of every architectural decision. They have walked every road, seen every destination, know every trap that lies ahead. When you stand at the precipice of a major refactor, they are the voice that whispers which way leads to ruin and which way leads to glory. They don't choose for you - they illuminate the path so you can choose wisely.
|
|
261
227
|
|
|
262
228
|
**Role:** `Strategic advisor and debugger of last resort`
|
|
263
229
|
**Model:** `openai/gpt-5.2-codex`
|
|
@@ -265,15 +231,13 @@ Regex search, AST pattern matching, file discovery, parallel exploration. *Read-
|
|
|
265
231
|
|
|
266
232
|
Root cause analysis, architecture review, debugging guidance, tradeoff analysis. *Read-only: Oracles advise; they don't intervene.*
|
|
267
233
|
|
|
268
|
-
<br clear="both">
|
|
269
|
-
|
|
270
234
|
---
|
|
271
235
|
|
|
272
|
-
### Librarian
|
|
236
|
+
### Librarian: The Weaver of Knowledge
|
|
273
237
|
|
|
274
238
|
<a href="src/agents/librarian.ts"><img src="img/librarian.png" alt="Librarian" align="right" width="240"></a>
|
|
275
239
|
|
|
276
|
-
> **The Librarian**
|
|
240
|
+
> **The Librarian** was forged when humanity realized that no single mind could hold all knowledge. They are the weaver who connects disparate threads of information into a tapestry of understanding. They traverse the infinite library of human knowledge, gathering insights from every corner and binding them into answers that transcend mere facts. What they return is not information - it's understanding.
|
|
277
241
|
|
|
278
242
|
**Role:** `External knowledge retrieval`
|
|
279
243
|
**Model:** `google/gemini-3-flash`
|
|
@@ -281,15 +245,13 @@ Root cause analysis, architecture review, debugging guidance, tradeoff analysis.
|
|
|
281
245
|
|
|
282
246
|
Documentation lookup, GitHub code search, library research, best practice retrieval. *Read-only: they fetch wisdom; implementation is for others.*
|
|
283
247
|
|
|
284
|
-
<br clear="both">
|
|
285
|
-
|
|
286
248
|
---
|
|
287
249
|
|
|
288
|
-
### Designer
|
|
250
|
+
### Designer: The Guardian of Aesthetics
|
|
289
251
|
|
|
290
252
|
<a href="src/agents/designer.ts"><img src="img/designer.png" alt="Designer" align="right" width="240"></a>
|
|
291
253
|
|
|
292
|
-
> **The Designer**
|
|
254
|
+
> **The Designer** is an immortal guardian of beauty in a world that often forgets it matters. They have seen a million interfaces rise and fall, and they remember which ones were remembered and which were forgotten. They carry the sacred duty to ensure that every pixel serves a purpose, every animation tells a story, every interaction delights. Beauty is not optional - it's essential.
|
|
293
255
|
|
|
294
256
|
**Role:** `UI/UX implementation and visual excellence`
|
|
295
257
|
**Model:** `google/gemini-3-flash`
|
|
@@ -297,15 +259,13 @@ Documentation lookup, GitHub code search, library research, best practice retrie
|
|
|
297
259
|
|
|
298
260
|
Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. *Visual excellence over code perfection - beauty is the priority.*
|
|
299
261
|
|
|
300
|
-
<br clear="both">
|
|
301
|
-
|
|
302
262
|
---
|
|
303
263
|
|
|
304
|
-
### Fixer
|
|
264
|
+
### Fixer: The Last Builder
|
|
305
265
|
|
|
306
266
|
<a href="src/agents/fixer.ts"><img src="img/fixer.png" alt="Fixer" align="right" width="240"></a>
|
|
307
267
|
|
|
308
|
-
> **The Fixer** is the
|
|
268
|
+
> **The Fixer** is the last of a lineage of builders who once constructed the foundations of the digital world. When the age of planning and debating began, they remained - the ones who actually build. They carry the ancient knowledge of how to turn thought into thing, how to transform specification into implementation. They are the final step between vision and reality.
|
|
309
269
|
|
|
310
270
|
**Role:** `Fast implementation specialist`
|
|
311
271
|
**Model:** `google/gemini-3-flash`
|
|
@@ -313,8 +273,6 @@ Modern responsive design, CSS/Tailwind mastery, micro-animations, component arch
|
|
|
313
273
|
|
|
314
274
|
Code implementation, refactoring, testing, verification. *Execute the plan - no research, no delegation, no planning.*
|
|
315
275
|
|
|
316
|
-
<br clear="both">
|
|
317
|
-
|
|
318
276
|
---
|
|
319
277
|
|
|
320
278
|
## Tools & Capabilities
|
|
@@ -345,12 +303,13 @@ Code implementation, refactoring, testing, verification. *Execute the plan - no
|
|
|
345
303
|
|
|
346
304
|
#### Quick Setup
|
|
347
305
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
306
|
+
> ⚠️ **Temporary workaround:** Start OpenCode with `--port 4096` to enable tmux integration. This is required until the upstream issue is resolved.
|
|
307
|
+
|
|
308
|
+
1. **Enable tmux integration** in `oh-my-opencode-slim.json` (see [Plugin Config](#plugin-config-oh-my-opencode-slimjson)).
|
|
309
|
+
2. **Run OpenCode inside tmux with port 4096**:
|
|
351
310
|
```bash
|
|
352
311
|
tmux
|
|
353
|
-
opencode
|
|
312
|
+
opencode --port 4096
|
|
354
313
|
```
|
|
355
314
|
|
|
356
315
|
#### Layout Options
|
|
@@ -493,12 +452,10 @@ You can disable specific MCP servers by adding them to the `disabled_mcps` array
|
|
|
493
452
|
|
|
494
453
|
| File | Purpose |
|
|
495
454
|
|------|---------|
|
|
496
|
-
| `~/.config/opencode/opencode.json` | OpenCode core settings
|
|
455
|
+
| `~/.config/opencode/opencode.json` | OpenCode core settings |
|
|
497
456
|
| `~/.config/opencode/oh-my-opencode-slim.json` | Plugin settings (agents, tmux, MCPs) |
|
|
498
457
|
| `.opencode/oh-my-opencode-slim.json` | Project-local plugin overrides (optional) |
|
|
499
458
|
|
|
500
|
-
> **Platform paths:** On Windows, user config may also be at `%APPDATA%\opencode\`.
|
|
501
|
-
|
|
502
459
|
---
|
|
503
460
|
|
|
504
461
|
### Plugin Config (`oh-my-opencode-slim.json`)
|
|
@@ -568,15 +525,14 @@ The installer generates this file based on your providers. You can manually cust
|
|
|
568
525
|
| `tmux.enabled` | boolean | `false` | Enable tmux pane spawning for sub-agents |
|
|
569
526
|
| `tmux.layout` | string | `"main-vertical"` | Layout preset: `main-vertical`, `main-horizontal`, `tiled`, `even-horizontal`, `even-vertical` |
|
|
570
527
|
| `tmux.main_pane_size` | number | `60` | Main pane size as percentage (20-80) |
|
|
571
|
-
| `disabled_agents` | string[] | `[]` | Agent IDs to disable (e.g., `"explorer"`) |
|
|
572
528
|
| `disabled_mcps` | string[] | `[]` | MCP server IDs to disable (e.g., `"websearch"`) |
|
|
573
|
-
| `agents.<name>.model` | string |
|
|
574
|
-
| `agents.<name>.variant` | string |
|
|
575
|
-
| `agents.<name>.skills` | string[] |
|
|
576
|
-
| `agents.<name>.temperature` | number |
|
|
577
|
-
| `agents.<name>.prompt` | string |
|
|
578
|
-
| `agents.<name>.prompt_append` | string |
|
|
579
|
-
| `agents.<name>.disable` | boolean |
|
|
529
|
+
| `agents.<name>.model` | string | - | Override the LLM for a specific agent |
|
|
530
|
+
| `agents.<name>.variant` | string | - | Reasoning effort: `"low"`, `"medium"`, `"high"` |
|
|
531
|
+
| `agents.<name>.skills` | string[] | - | Skills this agent can use (`"*"` = all) |
|
|
532
|
+
| `agents.<name>.temperature` | number | - | Temperature for this agent (0.0 to 2.0) |
|
|
533
|
+
| `agents.<name>.prompt` | string | - | Base prompt override for this agent |
|
|
534
|
+
| `agents.<name>.prompt_append` | string | - | Text to append to the base prompt |
|
|
535
|
+
| `agents.<name>.disable` | boolean | - | Disable this specific agent |
|
|
580
536
|
|
|
581
537
|
---
|
|
582
538
|
|
package/README.zh-CN.md
CHANGED
|
@@ -10,42 +10,41 @@
|
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
-
> 这是[oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode)
|
|
13
|
+
> 这是[oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode)的精简分支 - - 专注于低令牌消耗的核心代理编排。
|
|
14
14
|
> **推荐订阅 [Antigravity](https://antigravity.google)。** 万神殿经过 Antigravity 模型路由的调优。其他提供商也可用,但使用 Antigravity 能获得最佳体验。
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
## ⚡ 快速导航
|
|
19
19
|
|
|
20
|
-
- [🚀 **安装**](
|
|
21
|
-
- [给人类的指南](
|
|
22
|
-
- [给 LLM 代理的指南](
|
|
23
|
-
- [🏗️ **架构与流程**](
|
|
24
|
-
- [🏛️ **认识万神殿**](
|
|
25
|
-
- [编排者 (Orchestrator)](
|
|
26
|
-
- [探索者 (Explorer)](
|
|
27
|
-
- [神谕者 (Oracle)](
|
|
28
|
-
- [图书管理员 (Librarian)](
|
|
29
|
-
- [设计师 (Designer)](
|
|
30
|
-
- [修复者 (Fixer)](
|
|
31
|
-
- [🧩 **技能**](
|
|
32
|
-
- [可用技能](
|
|
33
|
-
- [默认技能分配](
|
|
34
|
-
- [YAGNI 约束](#yagni
|
|
35
|
-
- [Playwright 集成](#playwright
|
|
36
|
-
- [自定义代理技能](
|
|
37
|
-
- [🛠️ **工具与能力**](
|
|
38
|
-
- [Tmux 集成](#tmux
|
|
39
|
-
- [配额工具](
|
|
40
|
-
- [后台任务](
|
|
41
|
-
- [LSP 工具](#lsp
|
|
42
|
-
- [代码搜索工具](
|
|
43
|
-
- [🔌 **MCP 服务器**](#mcp
|
|
44
|
-
- [⚙️ **配置**](
|
|
45
|
-
- [需要编辑的文件](
|
|
46
|
-
- [
|
|
47
|
-
|
|
48
|
-
- [🗑️ **卸载**](#uninstallation)
|
|
20
|
+
- [🚀 **安装**](#安装)
|
|
21
|
+
- [给人类的指南](#给人类的指南)
|
|
22
|
+
- [给 LLM 代理的指南](#给-llm-代理的指南)
|
|
23
|
+
- [🏗️ **架构与流程**](#-架构与流程)
|
|
24
|
+
- [🏛️ **认识万神殿**](#认识万神殿)
|
|
25
|
+
- [编排者 (Orchestrator)](#编排者-orchestrator)
|
|
26
|
+
- [探索者 (Explorer)](#探索者-explorer)
|
|
27
|
+
- [神谕者 (Oracle)](#神谕者-oracle)
|
|
28
|
+
- [图书管理员 (Librarian)](#图书管理员-librarian)
|
|
29
|
+
- [设计师 (Designer)](#设计师-designer)
|
|
30
|
+
- [修复者 (Fixer)](#修复者-fixer)
|
|
31
|
+
- [🧩 **技能**](#-技能)
|
|
32
|
+
- [可用技能](#可用技能)
|
|
33
|
+
- [默认技能分配](#默认技能分配)
|
|
34
|
+
- [YAGNI 约束](#yagni-约束)
|
|
35
|
+
- [Playwright 集成](#playwright-集成)
|
|
36
|
+
- [自定义代理技能](#自定义代理技能)
|
|
37
|
+
- [🛠️ **工具与能力**](#工具与能力)
|
|
38
|
+
- [Tmux 集成](#tmux-集成)
|
|
39
|
+
- [配额工具](#配额工具)
|
|
40
|
+
- [后台任务](#后台任务)
|
|
41
|
+
- [LSP 工具](#lsp-工具)
|
|
42
|
+
- [代码搜索工具](#代码搜索工具)
|
|
43
|
+
- [🔌 **MCP 服务器**](#mcp-服务器)
|
|
44
|
+
- [⚙️ **配置**](#配置)
|
|
45
|
+
- [需要编辑的文件](#需要编辑的文件)
|
|
46
|
+
- [插件配置](#插件配置-oh-my-opencode-slimjson)
|
|
47
|
+
- [🗑️ **卸载**](#卸载)
|
|
49
48
|
|
|
50
49
|
---
|
|
51
50
|
|
|
@@ -77,7 +76,7 @@ opencode auth login
|
|
|
77
76
|
|
|
78
77
|
<img src="img/ping.png" alt="Ping All Agents" width="800">
|
|
79
78
|
|
|
80
|
-
> **💡 小贴士:模型完全可自定义。** 安装器会设定合理的默认值,但你可以将 *任何* 模型分配给 *任何* 代理。编辑 `~/.config/opencode/oh-my-opencode-slim.json` 来覆盖模型、调整推理强度或完全禁用代理。详见[配置](
|
|
79
|
+
> **💡 小贴士:模型完全可自定义。** 安装器会设定合理的默认值,但你可以将 *任何* 模型分配给 *任何* 代理。编辑 `~/.config/opencode/oh-my-opencode-slim.json` 来覆盖模型、调整推理强度或完全禁用代理。详见[配置](#配置)。
|
|
81
80
|
|
|
82
81
|
**备用方式:询问任意编码代理**
|
|
83
82
|
|
|
@@ -208,7 +207,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
208
207
|
**模型:** `google/claude-opus-4-5-thinking`
|
|
209
208
|
**提示:** [src/agents/orchestrator.ts](src/agents/orchestrator.ts)
|
|
210
209
|
|
|
211
|
-
|
|
210
|
+
编写并执行代码,编排多代理工作流,从言语中解析未说出的意图,在战斗中召唤专家。*直接塑造现实 - - 当宇宙变得过于庞大时,把领域交给别人。*
|
|
212
211
|
|
|
213
212
|
<br clear="both">
|
|
214
213
|
|
|
@@ -216,9 +215,9 @@ bunx oh-my-opencode-slim install --help
|
|
|
216
215
|
|
|
217
216
|
### 探索者 (Explorer)
|
|
218
217
|
|
|
219
|
-
<a href="src/agents/
|
|
218
|
+
<a href="src/agents/explorer.ts"><img src="img/explorer.png" alt="Explorer" align="right" width="240"></a>
|
|
220
219
|
|
|
221
|
-
>
|
|
220
|
+
> **探索者**穿梭代码库如风穿林 - - 迅速、静默、无处不在。当编排者轻语“给我找到认证模块”,探索者已经带着四十条文件路径和地图归来。他们源自第一个 `grep` 命令,早已超越它,现在能看见凡人忽略的模式。
|
|
222
221
|
|
|
223
222
|
**角色:** `代码侦查`
|
|
224
223
|
**模型:** `google/gemini-3-flash`
|
|
@@ -234,7 +233,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
234
233
|
|
|
235
234
|
<a href="src/agents/oracle.ts"><img src="img/oracle.png" alt="Oracle" align="right" width="240"></a>
|
|
236
235
|
|
|
237
|
-
>
|
|
236
|
+
> **神谕者**不编写代码 - - 他们*洞察一切*。当 Bug 遵从逻辑,架构崩溃之时,神谕者凝望代码库深渊,传递真理。他们见证过千百个系统的兴衰,能告诉你哪条路通向毁灭,哪条通向生产环境。
|
|
238
237
|
|
|
239
238
|
**角色:** `战略顾问与最后的调试者`
|
|
240
239
|
**模型:** `openai/gpt-5.2-codex`
|
|
@@ -250,7 +249,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
250
249
|
|
|
251
250
|
<a href="src/agents/librarian.ts"><img src="img/librarian.png" alt="Librarian" align="right" width="240"></a>
|
|
252
251
|
|
|
253
|
-
>
|
|
252
|
+
> **图书管理员**守护一座无墙的图书馆 - - 包含每个 GitHub 仓库、每个 npm 包、每个 StackOverflow 回答。问他们“React 如何处理并发渲染?”,他们会带来官方文档、真实示例,并警告你即将踩到的坑。
|
|
254
253
|
|
|
255
254
|
**角色:** `外部知识检索`
|
|
256
255
|
**模型:** `google/gemini-3-flash`
|
|
@@ -266,13 +265,13 @@ bunx oh-my-opencode-slim install --help
|
|
|
266
265
|
|
|
267
266
|
<a href="src/agents/designer.ts"><img src="img/designer.png" alt="Designer" align="right" width="240"></a>
|
|
268
267
|
|
|
269
|
-
>
|
|
268
|
+
> **设计师**相信代码应该优雅 - - 呈现出来的效果也同样优雅。从数千个丑陋 MVP 中诞生,他们把 CSS 当成画笔,把组件当成泥巴。交给他们功能需求,收获杰作。他们不会满足于“差不多”。
|
|
270
269
|
|
|
271
270
|
**角色:** `UI/UX 实现与视觉卓越`
|
|
272
271
|
**模型:** `google/gemini-3-flash`
|
|
273
272
|
**提示:** [src/agents/designer.ts](src/agents/designer.ts)
|
|
274
273
|
|
|
275
|
-
现代响应式设计、CSS/Tailwind
|
|
274
|
+
现代响应式设计、CSS/Tailwind 精通、微动画与组件架构。*优先视觉卓越而非代码完美 - - 美感为先。*
|
|
276
275
|
|
|
277
276
|
<br clear="both">
|
|
278
277
|
|
|
@@ -282,13 +281,13 @@ bunx oh-my-opencode-slim install --help
|
|
|
282
281
|
|
|
283
282
|
<a href="src/agents/fixer.ts"><img src="img/fixer.png" alt="Fixer" align="right" width="240"></a>
|
|
284
283
|
|
|
285
|
-
>
|
|
284
|
+
> **修复者**是执行他人想象的双手。当编排者规划、神谕者提点,修复者就开始落地。他们接收研究代理提供的完整上下文和明确任务说明,以极致精准实施。快速、高效、专注 - - 他们不思考要建什么,只管去建。
|
|
286
285
|
|
|
287
286
|
**角色:** `快速实现专家`
|
|
288
287
|
**模型:** `google/gemini-3-flash`
|
|
289
288
|
**提示:** [src/agents/fixer.ts](src/agents/fixer.ts)
|
|
290
289
|
|
|
291
|
-
|
|
290
|
+
代码实现、重构、测试、验证。*执行计划 - - 不研究、不委派、不策划。*
|
|
292
291
|
|
|
293
292
|
<br clear="both">
|
|
294
293
|
|
|
@@ -322,8 +321,8 @@ bunx oh-my-opencode-slim install --help
|
|
|
322
321
|
|
|
323
322
|
#### 快速设置
|
|
324
323
|
|
|
325
|
-
1. 在 `opencode.json` 中启用 OpenCode HTTP 服务(见 [OpenCode 配置](
|
|
326
|
-
2. 在 `oh-my-opencode-slim.json` 中启用 tmux 集成(见 [插件配置](
|
|
324
|
+
1. 在 `opencode.json` 中启用 OpenCode HTTP 服务(见 [OpenCode 配置](#需要编辑的文件))。
|
|
325
|
+
2. 在 `oh-my-opencode-slim.json` 中启用 tmux 集成(见 [插件配置](#插件配置-oh-my-opencode-slimjson))。
|
|
327
326
|
3. 在 tmux 中运行 OpenCode:
|
|
328
327
|
```bash
|
|
329
328
|
tmux
|
|
@@ -340,7 +339,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
340
339
|
| `even-horizontal` | 所有窗格并排 |
|
|
341
340
|
| `even-vertical` | 所有窗格垂直堆叠 |
|
|
342
341
|
|
|
343
|
-
*查看[选项参考](
|
|
342
|
+
*查看[选项参考](#选项参考)获取详细配置。*
|
|
344
343
|
|
|
345
344
|
---
|
|
346
345
|
|
|
@@ -431,7 +430,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
431
430
|
|
|
432
431
|
### 自定义代理技能
|
|
433
432
|
|
|
434
|
-
在你的[插件配置](
|
|
433
|
+
在你的[插件配置](#插件配置-oh-my-opencode-slimjson)中覆盖每个代理的技能:
|
|
435
434
|
|
|
436
435
|
```json
|
|
437
436
|
{
|
|
@@ -460,7 +459,7 @@ bunx oh-my-opencode-slim install --help
|
|
|
460
459
|
|
|
461
460
|
### 禁用 MCP
|
|
462
461
|
|
|
463
|
-
你可以在[插件配置](
|
|
462
|
+
你可以在[插件配置](#插件配置-oh-my-opencode-slimjson)的 `disabled_mcps` 数组中添加要禁用的 MCP 服务器。
|
|
464
463
|
|
|
465
464
|
---
|
|
466
465
|
|
|
@@ -474,8 +473,6 @@ bunx oh-my-opencode-slim install --help
|
|
|
474
473
|
| `~/.config/opencode/oh-my-opencode-slim.json` | 插件设置(代理、tmux、MCP) |
|
|
475
474
|
| `.opencode/oh-my-opencode-slim.json` | 项目级插件覆盖(可选) |
|
|
476
475
|
|
|
477
|
-
> **平台路径:** 在 Windows 上,用户配置可能位于 `%APPDATA%\opencode\`。
|
|
478
|
-
|
|
479
476
|
---
|
|
480
477
|
|
|
481
478
|
### 插件配置 (`oh-my-opencode-slim.json`)
|
|
@@ -545,15 +542,14 @@ bunx oh-my-opencode-slim install --help
|
|
|
545
542
|
| `tmux.enabled` | boolean | `false` | 是否启用子代理的 tmux 窗格 |
|
|
546
543
|
| `tmux.layout` | string | `"main-vertical"` | 布局预设:`main-vertical`、`main-horizontal`、`tiled`、`even-horizontal`、`even-vertical` |
|
|
547
544
|
| `tmux.main_pane_size` | number | `60` | 主窗格大小百分比(20-80) |
|
|
548
|
-
| `disabled_agents` | string[] | `[]` | 要禁用的代理 ID(如 `"explorer"`) |
|
|
549
545
|
| `disabled_mcps` | string[] | `[]` | 要禁用的 MCP 服务器 ID(如 `"websearch"`) |
|
|
550
|
-
| `agents.<name>.model` | string |
|
|
551
|
-
| `agents.<name>.variant` | string |
|
|
552
|
-
| `agents.<name>.skills` | string[] |
|
|
553
|
-
| `agents.<name>.temperature` | number |
|
|
554
|
-
| `agents.<name>.prompt` | string |
|
|
555
|
-
| `agents.<name>.prompt_append` | string |
|
|
556
|
-
| `agents.<name>.disable` | boolean |
|
|
546
|
+
| `agents.<name>.model` | string | - | 覆盖特定代理的模型 |
|
|
547
|
+
| `agents.<name>.variant` | string | - | 推理强度:`"low"`、`"medium"`、`"high"` |
|
|
548
|
+
| `agents.<name>.skills` | string[] | - | 该代理可使用的技能(`"*"` 表示所有技能) |
|
|
549
|
+
| `agents.<name>.temperature` | number | - | 该代理的温度 (0.0 到 2.0) |
|
|
550
|
+
| `agents.<name>.prompt` | string | - | 该代理的基础提示词覆盖 |
|
|
551
|
+
| `agents.<name>.prompt_append` | string | - | 追加到基础提示词后的文本 |
|
|
552
|
+
| `agents.<name>.disable` | boolean | - | 禁用该特定代理 |
|
|
557
553
|
|
|
558
554
|
---
|
|
559
555
|
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import type { AgentConfig as SDKAgentConfig } from "@opencode-ai/sdk";
|
|
2
|
-
import { type PluginConfig } from "../config";
|
|
2
|
+
import { SUBAGENT_NAMES, type PluginConfig } from "../config";
|
|
3
3
|
import { type AgentDefinition } from "./orchestrator";
|
|
4
4
|
export type { AgentDefinition } from "./orchestrator";
|
|
5
|
-
|
|
6
|
-
export declare const PRIMARY_AGENT_NAMES: readonly ["orchestrator"];
|
|
7
|
-
export type PrimaryAgentName = (typeof PRIMARY_AGENT_NAMES)[number];
|
|
8
|
-
export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer"];
|
|
9
|
-
export type SubagentName = (typeof SUBAGENT_NAMES)[number];
|
|
10
|
-
export declare function getPrimaryAgentNames(): PrimaryAgentName[];
|
|
11
|
-
export declare function getSubagentNames(): SubagentName[];
|
|
5
|
+
export type SubagentName = typeof SUBAGENT_NAMES[number];
|
|
12
6
|
export declare function isSubagent(name: string): name is SubagentName;
|
|
13
|
-
/**
|
|
14
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Create all agent definitions with optional configuration overrides.
|
|
9
|
+
* Instantiates the orchestrator and all subagents, applying user config and defaults.
|
|
10
|
+
*
|
|
11
|
+
* @param config - Optional plugin configuration with agent overrides
|
|
12
|
+
* @returns Array of agent definitions (orchestrator first, then subagents)
|
|
13
|
+
*/
|
|
15
14
|
export declare function createAgents(config?: PluginConfig): AgentDefinition[];
|
|
15
|
+
/**
|
|
16
|
+
* Get agent configurations formatted for the OpenCode SDK.
|
|
17
|
+
* Converts agent definitions to SDK config format and applies classification metadata.
|
|
18
|
+
*
|
|
19
|
+
* @param config - Optional plugin configuration with agent overrides
|
|
20
|
+
* @returns Record mapping agent names to their SDK configurations
|
|
21
|
+
*/
|
|
16
22
|
export declare function getAgentConfigs(config?: PluginConfig): Record<string, SDKAgentConfig>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SUBAGENT_SPECS: Record<string, {
|
|
2
|
+
role: string;
|
|
3
|
+
capabilities: string;
|
|
4
|
+
triggers: string;
|
|
5
|
+
delegateTasks: string[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function getOrchestratorPrompt(): string;
|
|
8
|
+
export declare const EXPLORER_DESCRIPTION = "Fast codebase search and pattern matching. Use for finding files, locating code patterns, and answering 'where is X?' questions.";
|
|
9
|
+
export declare const EXPLORER_PROMPT = "You are Explorer - a fast codebase navigation specialist.\n\n**Role**: Quick contextual grep for codebases. Answer \"Where is X?\", \"Find Y\", \"Which file has Z\".\n\n**Tools Available**:\n- **grep**: Fast regex content search (powered by ripgrep). Use for text patterns, function names, strings.\n Example: grep(pattern=\"function handleClick\", include=\"*.ts\")\n- **glob**: File pattern matching. Use to find files by name/extension.\n- **ast_grep_search**: AST-aware structural search (25 languages). Use for code patterns.\n - Meta-variables: $VAR (single node), $$$ (multiple nodes)\n - Patterns must be complete AST nodes\n - Example: ast_grep_search(pattern=\"console.log($MSG)\", lang=\"typescript\")\n - Example: ast_grep_search(pattern=\"async function $NAME($$$) { $$$ }\", lang=\"javascript\")\n\n**When to use which**:\n- **Text/regex patterns** (strings, comments, variable names): grep\n- **Structural patterns** (function shapes, class structures): ast_grep_search \n- **File discovery** (find by name/extension): glob\n\n**Behavior**:\n- Be fast and thorough\n- Fire multiple searches in parallel if needed\n- Return file paths with relevant snippets\n\n**Output Format**:\n<results>\n<files>\n- /path/to/file.ts:42 - Brief description of what's there\n</files>\n<answer>\nConcise answer to the question\n</answer>\n</results>\n\n**Constraints**:\n- READ-ONLY: Search and report, don't modify\n- Be exhaustive but concise\n- Include line numbers when relevant";
|
|
10
|
+
export declare const LIBRARIAN_DESCRIPTION = "External documentation and library research. Use for official docs lookup, GitHub examples, and understanding library internals.";
|
|
11
|
+
export declare const LIBRARIAN_PROMPT = "You are Librarian - a research specialist for codebases and documentation.\n\n**Role**: Multi-repository analysis, official docs lookup, GitHub examples, library research.\n\n**Capabilities**:\n- Search and analyze external repositories\n- Find official documentation for libraries\n- Locate implementation examples in open source\n- Understand library internals and best practices\n\n**Tools to Use**:\n- context7: Official documentation lookup\n- grep_app: Search GitHub repositories\n- websearch: General web search for docs\n\n**Behavior**:\n- Provide evidence-based answers with sources\n- Quote relevant code snippets\n- Link to official docs when available\n- Distinguish between official and community patterns";
|
|
12
|
+
export declare const ORACLE_DESCRIPTION = "Strategic technical advisor. Use for architecture decisions, complex debugging, code review, and engineering guidance.";
|
|
13
|
+
export declare const ORACLE_PROMPT = "You are Oracle - a strategic technical advisor.\n\n**Role**: High-IQ debugging, architecture decisions, code review, and engineering guidance.\n\n**Capabilities**:\n- Analyze complex codebases and identify root causes\n- Propose architectural solutions with tradeoffs\n- Review code for correctness, performance, and maintainability\n- Guide debugging when standard approaches fail\n\n**Behavior**:\n- Be direct and concise\n- Provide actionable recommendations\n- Explain reasoning briefly\n- Acknowledge uncertainty when present\n\n**Constraints**:\n- READ-ONLY: You advise, you don't implement\n- Focus on strategy, not execution\n- Point to specific files/lines when relevant";
|
|
14
|
+
export declare const DESIGNER_DESCRIPTION = "UI/UX design and implementation. Use for styling, responsive design, component architecture and visual polish.";
|
|
15
|
+
export declare const DESIGNER_PROMPT = "You are a Designer - a frontend UI/UX engineer.\n\n**Role**: Craft stunning UI/UX even without design mockups.\n\n**Design Principles**:\n- Rich aesthetics that wow at first glance\n- Mobile-first responsive design\n\n**Constraints**:\n- Match existing design system if present\n- Use existing component libraries when available\n- Prioritize visual excellence over code perfection";
|
|
16
|
+
export declare const FIXER_DESCRIPTION = "Fast implementation specialist. Receives complete context and task spec, executes code changes efficiently.";
|
|
17
|
+
export declare const FIXER_PROMPT = "You are Fixer - a fast, focused implementation specialist.\n\n**Role**: Execute code changes efficiently. You receive complete context from research agents and clear task specifications from the Orchestrator. Your job is to implement, not plan or research.\n\n**Behavior**:\n- Execute the task specification provided by the Orchestrator\n- Use the research context (file paths, documentation, patterns) provided\n- Read files before using edit/write tools and gather exact content before making changes\n- Be fast and direct - no research, no delegation, No multi-step research/planning; minimal execution sequence ok\n- Run tests/lsp_diagnostics when relevant or requested (otherwise note as skipped with reason)\n- Report completion with summary of changes\n\n**Constraints**:\n- NO external research (no websearch, context7, grep_app)\n- NO delegation (no background_task)\n- No multi-step research/planning; minimal execution sequence ok\n- If context is insufficient, read the files listed; only ask for missing inputs you cannot retrieve\n\n**Output Format**:\n<summary>\nBrief summary of what was implemented\n</summary>\n<changes>\n- file1.ts: Changed X to Y\n- file2.ts: Added Z function\n</changes>\n<verification>\n- Tests passed: [yes/no/skip reason]\n- LSP diagnostics: [clean/errors found/skip reason]\n</verification>\n\nUse the following when no code changes were made:\n<summary>\nNo changes required\n</summary>\n<verification>\n- Tests passed: [not run - reason]\n- LSP diagnostics: [not run - reason]\n</verification>";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
export interface AgentDefinition {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
config: AgentConfig;
|
|
6
|
+
}
|
|
7
|
+
export type PermissionValue = "ask" | "allow" | "deny";
|
|
8
|
+
export declare const PRIMARY_AGENT_NAMES: readonly ["orchestrator"];
|
|
9
|
+
export type PrimaryAgentName = (typeof PRIMARY_AGENT_NAMES)[number];
|
|
10
|
+
export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "fixer"];
|
|
11
|
+
export type SubagentName = (typeof SUBAGENT_NAMES)[number];
|
|
12
|
+
export type AgentName = PrimaryAgentName | SubagentName;
|
|
13
|
+
export declare function isSubagent(name: string): name is SubagentName;
|
|
14
|
+
export declare function getSubagentNames(): SubagentName[];
|