@mcowger/opencode-plexus 1.2.5 → 1.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 +69 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ Exposes models from a self-hosted [Plexus](https://github.com/mcowger/plexus) AI
|
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `plexus-pi` | [pi](https://github.com/earendil-works/pi) | `@mcowger/pi-plexus` |
|
|
10
10
|
| `plexus-opencode` | [OpenCode](https://opencode.ai) | `@mcowger/opencode-plexus` |
|
|
11
|
+
| `plexus-oh-my-pi` | [Oh My Pi](https://github.com/can1357/oh-my-pi) | `@mcowger/oh-my-pi-plexus` |
|
|
11
12
|
|
|
12
13
|
## Prerequisites
|
|
13
14
|
|
|
@@ -84,6 +85,41 @@ Then reference the built artifact in `opencode.json`:
|
|
|
84
85
|
|
|
85
86
|
---
|
|
86
87
|
|
|
88
|
+
### Oh My Pi
|
|
89
|
+
|
|
90
|
+
Oh My Pi is a fork of pi and is **not** wire-compatible with `plexus-pi` in every respect (different runtime packages, extension manifest field, and built-in model registry — see [AGENTS.md](AGENTS.md)), so it has its own adapter package.
|
|
91
|
+
|
|
92
|
+
#### Option 1 — npm (recommended)
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
cd ~/.omp/agent/extensions
|
|
96
|
+
npm install @mcowger/oh-my-pi-plexus
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### Option 2 — git clone into the extensions directory
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
git clone https://github.com/mcowger/plexus-agent-plugins ~/.omp/agent/extensions/plexus-agent-plugins
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Option 3 — git clone anywhere + settings.json
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
git clone https://github.com/mcowger/plexus-agent-plugins ~/code/plexus-agent-plugins
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Then register the path in `~/.omp/agent/settings.json`:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"extensions": [
|
|
116
|
+
"~/code/plexus-agent-plugins/packages/plexus-oh-my-pi"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
87
123
|
## First-time setup
|
|
88
124
|
|
|
89
125
|
### pi
|
|
@@ -105,7 +141,7 @@ To force a model refresh:
|
|
|
105
141
|
/plexus refresh
|
|
106
142
|
```
|
|
107
143
|
|
|
108
|
-
|
|
144
|
+
Select a Plexus model explicitly for the current session. With no model ID, Pi opens a selector; you can also pass the exact Plexus model ID directly. This explicit choice is not applied automatically when starting a new session:
|
|
109
145
|
|
|
110
146
|
```
|
|
111
147
|
/plexus set-default-model
|
|
@@ -114,6 +150,16 @@ Set the model Pi should use by default. With no model ID, Pi opens a selector; y
|
|
|
114
150
|
|
|
115
151
|
Use `/login plexus` for setup and `/logout plexus` to remove stored credentials.
|
|
116
152
|
|
|
153
|
+
### Oh My Pi
|
|
154
|
+
|
|
155
|
+
Run inside Oh My Pi using the native login flow:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
/login plexus
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Same prompts and `/plexus refresh` / `/plexus set-default-model` commands as pi (see above) — `plexus-oh-my-pi` mirrors the pi adapter's behavior, adjusted for Oh My Pi's own runtime packages and built-in model registry.
|
|
162
|
+
|
|
117
163
|
### OpenCode
|
|
118
164
|
|
|
119
165
|
Run inside OpenCode:
|
|
@@ -163,7 +209,7 @@ export PLEXUS_API_KEY=your-api-key
|
|
|
163
209
|
|
|
164
210
|
```
|
|
165
211
|
~/.pi/agent/extensions/plexus/
|
|
166
|
-
config.json # base URL and
|
|
212
|
+
config.json # base URL and model preference metadata
|
|
167
213
|
plexus-models-cache.json # last-fetched model list (startup cache)
|
|
168
214
|
plexus-models-response.json # raw API response (diagnostics)
|
|
169
215
|
plexus.log # extension activity log
|
|
@@ -171,6 +217,18 @@ export PLEXUS_API_KEY=your-api-key
|
|
|
171
217
|
|
|
172
218
|
The API key is stored through pi's own auth storage. `PLEXUS_API_URL` or `PLEXUS_BASE_URL` can be used as an environment override.
|
|
173
219
|
|
|
220
|
+
### Oh My Pi
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
~/.omp/agent/extensions/plexus/
|
|
224
|
+
config.json # base URL and model preference metadata
|
|
225
|
+
plexus-models-cache.json # last-fetched model list (startup cache)
|
|
226
|
+
plexus-models-response.json # raw API response (diagnostics)
|
|
227
|
+
plexus.log # extension activity log
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Same layout as pi, rooted under `~/.omp/agent` instead of `~/.pi/agent` since Oh My Pi resolves its own agent directory.
|
|
231
|
+
|
|
174
232
|
### OpenCode
|
|
175
233
|
|
|
176
234
|
```
|
|
@@ -202,6 +260,14 @@ packages/
|
|
|
202
260
|
cache.ts # model cache I/O
|
|
203
261
|
log.ts # append-only log
|
|
204
262
|
package.json # declares pi.extensions entry point
|
|
263
|
+
plexus-oh-my-pi/ # Oh My Pi host adapter (fork of pi; own runtime packages + catalog)
|
|
264
|
+
src/
|
|
265
|
+
extension.ts # entry point: commands, session refresh, auth flow
|
|
266
|
+
mapper.ts # PlexusModelDescriptor → Oh My Pi ProviderModelConfig
|
|
267
|
+
config.ts # base URL / default model config I/O
|
|
268
|
+
cache.ts # model cache I/O
|
|
269
|
+
log.ts # append-only log
|
|
270
|
+
package.json # declares omp.extensions entry point
|
|
205
271
|
plexus-opencode/ # OpenCode plugin adapter
|
|
206
272
|
src/
|
|
207
273
|
plugin.ts # Plugin export: config hook, provider hook, auth handler
|
|
@@ -237,7 +303,7 @@ Models with a falsy `id` are skipped. Missing metadata falls back to safe defaul
|
|
|
237
303
|
|
|
238
304
|
## Adapter behavior
|
|
239
305
|
|
|
240
|
-
- **pi** refreshes on session start and through `/plexus refresh
|
|
306
|
+
- **pi** refreshes on session start and through `/plexus refresh`, without changing the model selected for the session. It accepts either root URLs or URLs ending in `/v1` and normalizes them before calling Plexus.
|
|
241
307
|
- **OpenCode** seeds the provider from the on-disk cache (or a placeholder model) once, during config loading — OpenCode's `provider.models` hook never fires for custom providers, so there is no live discovery at startup. Run `/plexus-refresh` to force a live fetch and rewrite the cache; because OpenCode has no way to hot-reload a custom provider's model list mid-session, a restart is required afterward to see the refreshed models in the picker.
|
|
242
308
|
- OpenCode models retain their upstream model ID, SDK dialect, release date, and reasoning metadata so OpenCode can generate its native GPT, Claude, Gemini, and OpenAI-compatible variants and apply its current request transforms. DeepSeek models also preserve `reasoning_content` across tool-call turns.
|
|
243
309
|
- OpenCode uses a 250K-token context window when Plexus supplies no context metadata; its output fallback remains 20% of that window.
|