oh-my-opencode-slim 0.2.2 → 0.3.0
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 +169 -47
- package/dist/config/schema.d.ts +31 -0
- package/dist/features/background-manager.d.ts +3 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/tmux-session-manager.d.ts +46 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +12 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +8 -0
- package/dist/hooks/auto-update-checker/index.d.ts +11 -0
- package/dist/hooks/auto-update-checker/types.d.ts +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +925 -92
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/logger.d.ts +1 -0
- package/dist/tools/background.d.ts +2 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/tmux.d.ts +32 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,36 @@
|
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
-
> Slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode)
|
|
13
|
+
> Slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) - focused on core agent orchestration without the extra bells and whistles.
|
|
14
|
+
|
|
15
|
+
> **[Antigravity](https://antigravity.ai) subscription recommended.** The pantheon is tuned for Antigravity's model routing. Other providers work, but you'll get the best experience with Antigravity.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚡ Quick Navigation
|
|
20
|
+
|
|
21
|
+
- [🚀 **Installation**](#installation)
|
|
22
|
+
- [For Humans](#for-humans)
|
|
23
|
+
- [For LLM Agents](#for-llm-agents)
|
|
24
|
+
- [🏗️ **Architecture & Flow**](#architecture--flow)
|
|
25
|
+
- [🏛️ **Meet the Pantheon**](#meet-the-pantheon)
|
|
26
|
+
- [The Orchestrator](#the-orchestrator---architect-of-realms)
|
|
27
|
+
- [The Explorer](#the-explorer---pathfinder)
|
|
28
|
+
- [The Oracle](#the-oracle---seer-beyond-the-stack-trace)
|
|
29
|
+
- [The Librarian](#the-librarian---keeper-of-infinite-scrolls)
|
|
30
|
+
- [The Designer](#the-designer---artisan-of-interfaces)
|
|
31
|
+
- [The Scribe](#the-scribe---chronicle-keeper)
|
|
32
|
+
- [The Visionary](#the-visionary---reader-of-pixels)
|
|
33
|
+
- [The Minimalist](#the-minimalist---destroyer-of-bloat)
|
|
34
|
+
- [🛠️ **Tools & Capabilities**](#tools--capabilities)
|
|
35
|
+
- [Tmux Integration](#tmux-integration)
|
|
36
|
+
- [Quota Tool](#quota-tool)
|
|
37
|
+
- [Background Tasks](#background-tasks)
|
|
38
|
+
- [LSP Tools](#lsp-tools)
|
|
39
|
+
- [Code Search Tools](#code-search-tools)
|
|
40
|
+
- [🔌 **MCP Servers**](#mcp-servers)
|
|
41
|
+
- [⚙️ **Configuration**](#configuration)
|
|
42
|
+
- [🗑️ **Uninstallation**](#uninstallation)
|
|
14
43
|
|
|
15
44
|
---
|
|
16
45
|
|
|
@@ -98,23 +127,16 @@ The installer automatically:
|
|
|
98
127
|
|
|
99
128
|
#### Step 4: Authentication
|
|
100
129
|
|
|
101
|
-
After installation, guide the user:
|
|
130
|
+
After installation, guide the user to log in for each enabled provider:
|
|
102
131
|
|
|
103
|
-
**For Antigravity:**
|
|
104
132
|
```bash
|
|
105
133
|
opencode auth login
|
|
106
|
-
# Select: Google → OAuth with Google (Antigravity)
|
|
107
134
|
```
|
|
108
135
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
**For Cerebras:**
|
|
115
|
-
```bash
|
|
116
|
-
export CEREBRAS_API_KEY="..."
|
|
117
|
-
```
|
|
136
|
+
The user should select:
|
|
137
|
+
- **For Antigravity**: Google → OAuth with Google (Antigravity)
|
|
138
|
+
- **For OpenAI**: OpenAI → Enter API Key
|
|
139
|
+
- **For Cerebras**: Cerebras → Enter API Key
|
|
118
140
|
|
|
119
141
|
---
|
|
120
142
|
|
|
@@ -151,6 +173,8 @@ The plugin follows a "Hub and Spoke" model:
|
|
|
151
173
|
|
|
152
174
|
### The Flow of a Request
|
|
153
175
|
|
|
176
|
+
<img src="img/intro.png" alt="Orchestration Flow" width="800">
|
|
177
|
+
|
|
154
178
|
1. **User Prompt**: "Refactor the auth logic and update the docs."
|
|
155
179
|
2. **Orchestrator**: Creates a TODO list.
|
|
156
180
|
3. **Delegation**:
|
|
@@ -165,27 +189,27 @@ The plugin follows a "Hub and Spoke" model:
|
|
|
165
189
|
|
|
166
190
|
<br clear="both">
|
|
167
191
|
|
|
168
|
-
### The Orchestrator
|
|
192
|
+
### The Orchestrator - *Architect of Realms*
|
|
169
193
|
|
|
170
194
|
<a href="src/agents/orchestrator.ts"><img src="img/orchestrator.png" alt="The Orchestrator" align="right" width="240"></a>
|
|
171
195
|
|
|
172
|
-
> **The Orchestrator** was born when the first codebase collapsed under its own complexity. Neither god nor mortal would claim responsibility
|
|
196
|
+
> **The Orchestrator** was born when the first codebase collapsed under its own complexity. Neither god nor mortal would claim responsibility-so The Orchestrator emerged from the void, forging order from chaos. They don't merely command armies; they fight alongside them. Every line of code passes through their hands before they decide which lesser deity deserves a piece of the puzzle.
|
|
173
197
|
|
|
174
|
-
**Role:** Supreme executor, delegator, and overseer
|
|
198
|
+
**Role:** Supreme executor, delegator, and overseer - **Model:** `google/claude-opus-4-5-thinking`
|
|
175
199
|
|
|
176
|
-
Write and execute code, orchestrate multi-agent workflows, parse the unspoken from the spoken, summon specialists mid-battle. Shape reality directly
|
|
200
|
+
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.
|
|
177
201
|
|
|
178
202
|
<br clear="both">
|
|
179
203
|
|
|
180
204
|
---
|
|
181
205
|
|
|
182
|
-
### The Explorer
|
|
206
|
+
### The Explorer - *Pathfinder*
|
|
183
207
|
|
|
184
208
|
<a href="src/agents/explore.ts"><img src="img/explorer.png" alt="The Explorer" align="right" width="240"></a>
|
|
185
209
|
|
|
186
|
-
> **The Explorer** moves through codebases like wind through trees
|
|
210
|
+
> **The Explorer** moves through codebases like wind through trees-swift, silent, everywhere at once. When The Orchestrator whispers "find me the auth module," The Explorer has already returned with forty file paths and a map. They were born from the first `grep` command, evolved beyond it, and now see patterns mortals miss.
|
|
187
211
|
|
|
188
|
-
**Role:** Codebase reconnaissance
|
|
212
|
+
**Role:** Codebase reconnaissance - **Model:** `cerebras/zai-glm-4.6`
|
|
189
213
|
|
|
190
214
|
Regex search, AST pattern matching, file discovery, parallel exploration. Read-only: they chart the territory; others conquer it.
|
|
191
215
|
|
|
@@ -193,13 +217,13 @@ Regex search, AST pattern matching, file discovery, parallel exploration. Read-o
|
|
|
193
217
|
|
|
194
218
|
---
|
|
195
219
|
|
|
196
|
-
### The Oracle
|
|
220
|
+
### The Oracle - *Seer Beyond the Stack Trace*
|
|
197
221
|
|
|
198
222
|
<a href="src/agents/oracle.ts"><img src="img/oracle.png" alt="The Oracle" align="right" width="240"></a>
|
|
199
223
|
|
|
200
|
-
> **The Oracle** does not code
|
|
224
|
+
> **The Oracle** does not code-they *know*. When bugs defy logic and architectures crumble, The Oracle gazes into the abyss of your codebase and speaks truth. They've seen a thousand systems rise and fall. They'll tell you which path leads to ruin, and which to production.
|
|
201
225
|
|
|
202
|
-
**Role:** Strategic advisor and debugger of last resort
|
|
226
|
+
**Role:** Strategic advisor and debugger of last resort - **Model:** `openai/gpt-5.2-codex`
|
|
203
227
|
|
|
204
228
|
Root cause analysis, architecture review, debugging guidance, tradeoff analysis. Read-only: Oracles advise; they don't intervene.
|
|
205
229
|
|
|
@@ -207,13 +231,13 @@ Root cause analysis, architecture review, debugging guidance, tradeoff analysis.
|
|
|
207
231
|
|
|
208
232
|
---
|
|
209
233
|
|
|
210
|
-
### The Librarian
|
|
234
|
+
### The Librarian - *Keeper of Infinite Scrolls*
|
|
211
235
|
|
|
212
236
|
<a href="src/agents/librarian.ts"><img src="img/librarian.png" alt="The Librarian" align="right" width="240"></a>
|
|
213
237
|
|
|
214
|
-
> **The Librarian** guards a library with no walls
|
|
238
|
+
> **The Librarian** guards a library with no walls-every GitHub repo, every npm package, every StackOverflow answer ever written. Ask them "how does React handle concurrent rendering?" and they'll return with official docs, real-world examples, and a warning about the footgun you're about to step on.
|
|
215
239
|
|
|
216
|
-
**Role:** External knowledge retrieval
|
|
240
|
+
**Role:** External knowledge retrieval - **Model:** `google/gemini-3-flash`
|
|
217
241
|
|
|
218
242
|
Documentation lookup, GitHub code search, library research, best practice retrieval. Read-only: they fetch wisdom; implementation is for others.
|
|
219
243
|
|
|
@@ -221,27 +245,27 @@ Documentation lookup, GitHub code search, library research, best practice retrie
|
|
|
221
245
|
|
|
222
246
|
---
|
|
223
247
|
|
|
224
|
-
### The Designer
|
|
248
|
+
### The Designer - *Artisan of Interfaces*
|
|
225
249
|
|
|
226
250
|
<a href="src/agents/frontend.ts"><img src="img/designer.png" alt="The Designer" align="right" width="240"></a>
|
|
227
251
|
|
|
228
|
-
> **The Designer** believes code should be beautiful
|
|
252
|
+
> **The Designer** believes code should be beautiful-and so should everything it renders. Born from the frustration of a thousand ugly MVPs, they wield CSS like a brush and components like clay. Hand them a feature request; receive a masterpiece. They don't do "good enough."
|
|
229
253
|
|
|
230
|
-
**Role:** UI/UX implementation and visual excellence
|
|
254
|
+
**Role:** UI/UX implementation and visual excellence - **Model:** `google/gemini-3-flash`
|
|
231
255
|
|
|
232
|
-
Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. Visual excellence over code perfection
|
|
256
|
+
Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. Visual excellence over code perfection-beauty is the priority.
|
|
233
257
|
|
|
234
258
|
<br clear="both">
|
|
235
259
|
|
|
236
260
|
---
|
|
237
261
|
|
|
238
|
-
### The Scribe
|
|
262
|
+
### The Scribe - *Chronicle Keeper*
|
|
239
263
|
|
|
240
264
|
<a href="src/agents/document-writer.ts"><img src="img/scribe.png" alt="The Scribe" align="right" width="240"></a>
|
|
241
265
|
|
|
242
|
-
> **The Scribe** was there when the first README was written
|
|
266
|
+
> **The Scribe** was there when the first README was written-and wept, for it was incomplete. They have devoted eternity to the sacred art of documentation: clear, scannable, honest. While others ship features, The Scribe ensures those features are understood. Every code example works. Every explanation enlightens.
|
|
243
267
|
|
|
244
|
-
**Role:** Technical documentation and knowledge capture
|
|
268
|
+
**Role:** Technical documentation and knowledge capture - **Model:** `google/gemini-3-flash`
|
|
245
269
|
|
|
246
270
|
README crafting, API documentation, architecture docs, inline comments that don't insult your intelligence. Match existing style; focus on "why," not just "what."
|
|
247
271
|
|
|
@@ -249,13 +273,13 @@ README crafting, API documentation, architecture docs, inline comments that don'
|
|
|
249
273
|
|
|
250
274
|
---
|
|
251
275
|
|
|
252
|
-
### The Visionary
|
|
276
|
+
### The Visionary - *Reader of Pixels*
|
|
253
277
|
|
|
254
278
|
<a href="src/agents/multimodal.ts"><img src="img/multimodal.png" alt="The Visionary" align="right" width="240"></a>
|
|
255
279
|
|
|
256
|
-
> **The Visionary** sees what others cannot
|
|
280
|
+
> **The Visionary** sees what others cannot-literally. Screenshots, wireframes, diagrams, PDFs: all are text to them. When a designer throws a Figma mockup at the team and vanishes, The Visionary translates vision into specification. They read the unreadable and describe the indescribable.
|
|
257
281
|
|
|
258
|
-
**Role:** Image and visual content analysis
|
|
282
|
+
**Role:** Image and visual content analysis - **Model:** `google/gemini-3-flash`
|
|
259
283
|
|
|
260
284
|
Extract text from images, interpret diagrams, analyze UI screenshots, summarize visual documents. Report what they observe; inference is for others.
|
|
261
285
|
|
|
@@ -263,13 +287,13 @@ Extract text from images, interpret diagrams, analyze UI screenshots, summarize
|
|
|
263
287
|
|
|
264
288
|
---
|
|
265
289
|
|
|
266
|
-
### The Minimalist
|
|
290
|
+
### The Minimalist - *Destroyer of Bloat*
|
|
267
291
|
|
|
268
292
|
<a href="src/agents/simplicity-reviewer.ts"><img src="img/code-simplicity.png" alt="The Minimalist" align="right" width="240"></a>
|
|
269
293
|
|
|
270
|
-
> **The Minimalist** has one sacred truth: every line of code is a liability. They hunt abstractions that serve no purpose, defensive checks that defend nothing, and "clever" solutions that will haunt you in six months. Where others add, The Minimalist subtracts
|
|
294
|
+
> **The Minimalist** has one sacred truth: every line of code is a liability. They hunt abstractions that serve no purpose, defensive checks that defend nothing, and "clever" solutions that will haunt you in six months. Where others add, The Minimalist subtracts-ruthlessly, joyfully, necessarily.
|
|
271
295
|
|
|
272
|
-
**Role:** Code simplification and YAGNI enforcement
|
|
296
|
+
**Role:** Code simplification and YAGNI enforcement - **Model:** `google/claude-opus-4-5-thinking`
|
|
273
297
|
|
|
274
298
|
Identify unnecessary complexity, challenge premature abstractions, estimate LOC reduction, enforce minimalism. Read-only: they judge; The Orchestrator executes the sentence.
|
|
275
299
|
|
|
@@ -279,8 +303,110 @@ Identify unnecessary complexity, challenge premature abstractions, estimate LOC
|
|
|
279
303
|
|
|
280
304
|
## Tools & Capabilities
|
|
281
305
|
|
|
306
|
+
### Tmux Integration
|
|
307
|
+
|
|
308
|
+
<img src="img/tmux.png" alt="Tmux Integration" width="800">
|
|
309
|
+
|
|
310
|
+
**Watch your agents work in real-time.** When the Orchestrator launches sub-agents or initiates background tasks, new tmux panes automatically spawn showing each agent's live progress. No more waiting in the dark.
|
|
311
|
+
|
|
312
|
+
#### Why This Matters
|
|
313
|
+
|
|
314
|
+
| Without Tmux Integration | With Tmux Integration |
|
|
315
|
+
|--------------------------|----------------------|
|
|
316
|
+
| Fire off a background task, wait anxiously | See the agent thinking, searching, coding |
|
|
317
|
+
| "Is it stuck or just slow?" | Watch tool calls happen in real-time |
|
|
318
|
+
| Results appear out of nowhere | Follow the journey from question to answer |
|
|
319
|
+
| Debug by guessing | Debug by observation |
|
|
320
|
+
|
|
321
|
+
#### What You Get
|
|
322
|
+
|
|
323
|
+
- **Live Visibility**: Each sub-agent gets its own pane showing real-time output
|
|
324
|
+
- **Auto-Layout**: Tmux automatically arranges panes using your preferred layout
|
|
325
|
+
- **Auto-Cleanup**: Panes close when agents finish, layout rebalances
|
|
326
|
+
- **Zero Overhead**: Works with OpenCode's built-in `task` tool AND our `background_task` tool
|
|
327
|
+
|
|
328
|
+
#### Quick Setup
|
|
329
|
+
|
|
330
|
+
**1. Enable the OpenCode HTTP server** (one-time setup)
|
|
331
|
+
|
|
332
|
+
Add to your `~/.config/opencode/opencode.json`:
|
|
333
|
+
|
|
334
|
+
```json
|
|
335
|
+
{
|
|
336
|
+
"server": {
|
|
337
|
+
"port": 4096
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**2. Enable tmux integration in the plugin**
|
|
343
|
+
|
|
344
|
+
Add to your `~/.config/opencode/oh-my-opencode-slim.json`:
|
|
345
|
+
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"tmux": {
|
|
349
|
+
"enabled": true,
|
|
350
|
+
"layout": "main-vertical",
|
|
351
|
+
"main_pane_size": 60
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**3. Run OpenCode inside tmux**
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
tmux
|
|
360
|
+
opencode
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
That's it. When agents spawn, they'll appear in new panes.
|
|
364
|
+
|
|
365
|
+
#### Layout Options
|
|
366
|
+
|
|
367
|
+
| Layout | Description |
|
|
368
|
+
|--------|-------------|
|
|
369
|
+
| `main-vertical` | Your session on the left (60%), agents stacked on the right |
|
|
370
|
+
| `main-horizontal` | Your session on top (60%), agents stacked below |
|
|
371
|
+
| `tiled` | All panes in equal-sized grid |
|
|
372
|
+
| `even-horizontal` | All panes side by side |
|
|
373
|
+
| `even-vertical` | All panes stacked vertically |
|
|
374
|
+
|
|
375
|
+
#### Configuration Reference
|
|
376
|
+
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"tmux": {
|
|
380
|
+
"enabled": true,
|
|
381
|
+
"layout": "main-vertical",
|
|
382
|
+
"main_pane_size": 60
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
| Option | Type | Default | Description |
|
|
388
|
+
|--------|------|---------|-------------|
|
|
389
|
+
| `enabled` | boolean | `false` | Enable/disable tmux integration |
|
|
390
|
+
| `layout` | string | `"main-vertical"` | Tmux layout preset |
|
|
391
|
+
| `main_pane_size` | number | `60` | Size of main pane as percentage (20-80) |
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
### Quota Tool
|
|
396
|
+
|
|
397
|
+
For Antigravity users. You can trigger this at any time by asking the agent to **"check my quota"** or **"show status."**
|
|
398
|
+
|
|
399
|
+
<img src="img/quota.png" alt="Antigravity Quota" width="600">
|
|
400
|
+
|
|
401
|
+
| Tool | Description |
|
|
402
|
+
|------|-------------|
|
|
403
|
+
| `antigravity_quota` | Check API quota for all Antigravity accounts (compact view with progress bars) |
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
282
407
|
### Background Tasks
|
|
283
408
|
|
|
409
|
+
|
|
284
410
|
The plugin provides tools to manage asynchronous work:
|
|
285
411
|
|
|
286
412
|
| Tool | Description |
|
|
@@ -289,6 +415,8 @@ The plugin provides tools to manage asynchronous work:
|
|
|
289
415
|
| `background_output` | Fetch the result of a background task by ID |
|
|
290
416
|
| `background_cancel` | Abort running tasks |
|
|
291
417
|
|
|
418
|
+
---
|
|
419
|
+
|
|
292
420
|
### LSP Tools
|
|
293
421
|
|
|
294
422
|
Language Server Protocol integration for code intelligence:
|
|
@@ -300,6 +428,8 @@ Language Server Protocol integration for code intelligence:
|
|
|
300
428
|
| `lsp_diagnostics` | Get errors/warnings from the language server |
|
|
301
429
|
| `lsp_rename` | Rename a symbol across all files |
|
|
302
430
|
|
|
431
|
+
---
|
|
432
|
+
|
|
303
433
|
### Code Search Tools
|
|
304
434
|
|
|
305
435
|
Fast code search and refactoring:
|
|
@@ -310,14 +440,6 @@ Fast code search and refactoring:
|
|
|
310
440
|
| `ast_grep_search` | AST-aware code pattern matching (25 languages) |
|
|
311
441
|
| `ast_grep_replace` | AST-aware code refactoring with dry-run support |
|
|
312
442
|
|
|
313
|
-
### Quota Tool
|
|
314
|
-
|
|
315
|
-
For Antigravity users:
|
|
316
|
-
|
|
317
|
-
| Tool | Description |
|
|
318
|
-
|------|-------------|
|
|
319
|
-
| `antigravity_quota` | Check API quota for all Antigravity accounts (compact view with progress bars) |
|
|
320
|
-
|
|
321
443
|
---
|
|
322
444
|
|
|
323
445
|
## MCP Servers
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -6,6 +6,26 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
6
6
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
7
7
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const TmuxLayoutSchema: z.ZodEnum<{
|
|
10
|
+
"main-horizontal": "main-horizontal";
|
|
11
|
+
"main-vertical": "main-vertical";
|
|
12
|
+
tiled: "tiled";
|
|
13
|
+
"even-horizontal": "even-horizontal";
|
|
14
|
+
"even-vertical": "even-vertical";
|
|
15
|
+
}>;
|
|
16
|
+
export type TmuxLayout = z.infer<typeof TmuxLayoutSchema>;
|
|
17
|
+
export declare const TmuxConfigSchema: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
layout: z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
"main-horizontal": "main-horizontal";
|
|
21
|
+
"main-vertical": "main-vertical";
|
|
22
|
+
tiled: "tiled";
|
|
23
|
+
"even-horizontal": "even-horizontal";
|
|
24
|
+
"even-vertical": "even-vertical";
|
|
25
|
+
}>>;
|
|
26
|
+
main_pane_size: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type TmuxConfig = z.infer<typeof TmuxConfigSchema>;
|
|
9
29
|
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
|
|
10
30
|
export declare const McpNameSchema: z.ZodEnum<{
|
|
11
31
|
websearch: "websearch";
|
|
@@ -23,6 +43,17 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
23
43
|
}, z.core.$strip>>>;
|
|
24
44
|
disabled_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
45
|
disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
tmux: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
48
|
+
layout: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
"main-horizontal": "main-horizontal";
|
|
50
|
+
"main-vertical": "main-vertical";
|
|
51
|
+
tiled: "tiled";
|
|
52
|
+
"even-horizontal": "even-horizontal";
|
|
53
|
+
"even-vertical": "even-vertical";
|
|
54
|
+
}>>;
|
|
55
|
+
main_pane_size: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
26
57
|
}, z.core.$strip>;
|
|
27
58
|
export type PluginConfig = z.infer<typeof PluginConfigSchema>;
|
|
28
59
|
export type AgentName = "orchestrator" | "oracle" | "librarian" | "explore" | "frontend-ui-ux-engineer" | "document-writer" | "multimodal-looker" | "code-simplicity-reviewer";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { TmuxConfig } from "../config/schema";
|
|
2
3
|
export interface BackgroundTask {
|
|
3
4
|
id: string;
|
|
4
5
|
sessionId: string;
|
|
@@ -22,7 +23,8 @@ export declare class BackgroundTaskManager {
|
|
|
22
23
|
private client;
|
|
23
24
|
private directory;
|
|
24
25
|
private pollInterval?;
|
|
25
|
-
|
|
26
|
+
private tmuxEnabled;
|
|
27
|
+
constructor(ctx: PluginInput, tmuxConfig?: TmuxConfig);
|
|
26
28
|
launch(opts: LaunchOptions): Promise<BackgroundTask>;
|
|
27
29
|
getResult(taskId: string, block?: boolean, timeout?: number): Promise<BackgroundTask | null>;
|
|
28
30
|
cancel(taskId?: string): number;
|
package/dist/features/index.d.ts
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { TmuxConfig } from "../config/schema";
|
|
3
|
+
/**
|
|
4
|
+
* TmuxSessionManager tracks child sessions (created by OpenCode's Task tool)
|
|
5
|
+
* and spawns/closes tmux panes for them.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TmuxSessionManager {
|
|
8
|
+
private client;
|
|
9
|
+
private tmuxConfig;
|
|
10
|
+
private serverUrl;
|
|
11
|
+
private sessions;
|
|
12
|
+
private pollInterval?;
|
|
13
|
+
private enabled;
|
|
14
|
+
constructor(ctx: PluginInput, tmuxConfig: TmuxConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Handle session.created events.
|
|
17
|
+
* Spawns a tmux pane for child sessions (those with parentID).
|
|
18
|
+
*/
|
|
19
|
+
onSessionCreated(event: {
|
|
20
|
+
type: string;
|
|
21
|
+
properties?: {
|
|
22
|
+
info?: {
|
|
23
|
+
id?: string;
|
|
24
|
+
parentID?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
private startPolling;
|
|
30
|
+
private stopPolling;
|
|
31
|
+
private pollSessions;
|
|
32
|
+
private closeSession;
|
|
33
|
+
/**
|
|
34
|
+
* Create the event handler for the plugin's event hook.
|
|
35
|
+
*/
|
|
36
|
+
createEventHandler(): (input: {
|
|
37
|
+
event: {
|
|
38
|
+
type: string;
|
|
39
|
+
properties?: unknown;
|
|
40
|
+
};
|
|
41
|
+
}) => Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Clean up all tracked sessions.
|
|
44
|
+
*/
|
|
45
|
+
cleanup(): Promise<void>;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function invalidatePackage(packageName?: string): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function extractChannel(version: string | null): string;
|
|
2
|
+
export declare function getLocalDevVersion(directory: string): string | null;
|
|
3
|
+
export interface PluginEntryInfo {
|
|
4
|
+
entry: string;
|
|
5
|
+
isPinned: boolean;
|
|
6
|
+
pinnedVersion: string | null;
|
|
7
|
+
configPath: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function findPluginEntry(directory: string): PluginEntryInfo | null;
|
|
10
|
+
export declare function getCachedVersion(): string | null;
|
|
11
|
+
export declare function updatePinnedVersion(configPath: string, oldEntry: string, newVersion: string): boolean;
|
|
12
|
+
export declare function getLatestVersion(channel?: string): Promise<string | null>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PACKAGE_NAME = "oh-my-opencode-slim";
|
|
2
|
+
export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode-slim/dist-tags";
|
|
3
|
+
export declare const NPM_FETCH_TIMEOUT = 5000;
|
|
4
|
+
export declare const CACHE_DIR: string;
|
|
5
|
+
export declare const INSTALLED_PACKAGE_JSON: string;
|
|
6
|
+
export declare const USER_CONFIG_DIR: string;
|
|
7
|
+
export declare const USER_OPENCODE_CONFIG: string;
|
|
8
|
+
export declare const USER_OPENCODE_CONFIG_JSONC: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { AutoUpdateCheckerOptions } from "./types";
|
|
3
|
+
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
|
|
4
|
+
event: ({ event }: {
|
|
5
|
+
event: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties?: unknown;
|
|
8
|
+
};
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export type { AutoUpdateCheckerOptions } from "./types";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface NpmDistTags {
|
|
2
|
+
latest: string;
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export interface OpencodeConfig {
|
|
6
|
+
plugin?: string[];
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface PackageJson {
|
|
10
|
+
version: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface AutoUpdateCheckerOptions {
|
|
15
|
+
showStartupToast?: boolean;
|
|
16
|
+
autoUpdate?: boolean;
|
|
17
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Plugin } from "@opencode-ai/plugin";
|
|
2
2
|
declare const OhMyOpenCodeLite: Plugin;
|
|
3
3
|
export default OhMyOpenCodeLite;
|
|
4
|
-
export type { PluginConfig, AgentOverrideConfig, AgentName, McpName } from "./config";
|
|
4
|
+
export type { PluginConfig, AgentOverrideConfig, AgentName, McpName, TmuxConfig, TmuxLayout } from "./config";
|
|
5
5
|
export type { RemoteMcpConfig } from "./mcp";
|