feat: split plugins and cleanup
CI / verify (pull_request) Failing after 8s

This commit is contained in:
2026-10-04 12:49:41 +02:00
parent 0b6f39b6d9
commit f527778b29
29 changed files with 1793 additions and 2313 deletions
+20 -21
View File
@@ -1,6 +1,12 @@
# stanp-opencode
stanp-opencode is an OpenCode V2 coordinator with specialist workers for fast, good, and deep tasks.
One package with three independently loadable OpenCode V2 plugins:
- **Agents** (`stanp-opencode.agents`): coordinate, specialist workers, routing, inherited permissions, native delegation, and the anti-overengineering skill. Existing user skill definitions are preserved.
- **Multi-work** (`stanp-opencode.multi-work`): Herdr delegation and authenticated child bindings. Requires Agents **loaded first**, including at destination locations.
- **Quota** (`stanp-opencode.quota`): independent ChatGPT quota tracking and its TUI (`stanp-opencode.quota-tui`). The RPC remains `stanp-opencode.quota`.
There is no Personal plugin. Todos use native OpenCode tools. Plugins never register or alter MCP servers; user MCP configuration remains yours.
## Install the latest release
@@ -9,38 +15,37 @@ Requires OpenCode 2.0.15, Bun 1.4.2+, Bash, curl, jq, and `sha256sum` on Linux o
Run the installer without sudo:
```sh
curl -fsSL https://git.krtss.de/StanPonomarev/stanp-opencode/raw/branch/main/install.sh | bash
curl -fsSL https://git.krtss.de/StanPonomarev/stanp-opencode/raw/branch/main/install.sh | bash -s -- --plugins agents,multi-work,quota
```
Pass `--playwright` to let the plugin automatically configure a Playwright MCP server:
```sh
curl -fsSL https://git.krtss.de/StanPonomarev/stanp-opencode/raw/branch/main/install.sh | bash -s -- --playwright
```
Rerun the command to upgrade to the latest published release.
Use any nonempty subset; Multi-work requires Agents. Explicit `--plugins multi-work` fails rather than silently adding Agents. When run from a terminal without the flag, the installer asks for a selection and offers Agents if Multi-work is selected alone. Noninteractive fresh installs require `--plugins`. Upgrades without a flag retain the existing selection; the old monolith upgrades to all three. Use an explicit flag to change that selection.
## Install from a local checkout
This requires Bash, jq, and Bun 1.4.2+:
This requires Bash and Bun 1.4.2+:
```sh
bash /path/to/stanp-opencode/install-local.sh
bash /path/to/stanp-opencode/install-local.sh --plugins agents,multi-work,quota
```
Add `--playwright` to this command to enable automatic Playwright MCP configuration.
The script installs dependencies and builds the checkout before installing it.
After either installation, restart `opencode` or run `opencode service restart` for an existing service. Connect OpenAI and select `coordinate`. The required models must be available for the workers to run.
Both installers use `~/.config/opencode`, respect `XDG_CONFIG_HOME`, and accept `OPENCODE_CONFIG_DIR` as an override.
They update only owned registrations in `opencode.json` and the owned installation directory; unrelated settings, plugins, MCP configuration, and `opencode.jsonc` remain unchanged. Quota's TUI is installed only when Quota is selected.
## Clean-break upgrade
The monolith, root package entrypoint, and `basePlugin` export are deliberately retired. Use the `./agents`, `./multi-work`, and `./quota` package exports, or the installed directory paths below. Replace manually configured legacy registrations too; do not load the old monolith alongside the new plugins.
Distinct plugin identities intentionally start fresh storage: **quota tracking resets and existing Multi-work bindings cannot resume**. Start new delegated sessions. Old host storage is not migrated or edited. Existing Git worktrees and Herdr workspaces are never deleted or modified by this upgrade. New bindings remain resumable across restarts within the new Multi-work identity.
## Configuration
See [GPT configuration](examples/gpt.opencode.jsonc) and [custom model assignments](examples/custom.opencode.jsonc).
For an installed plugin, use `./plugins/stanp-opencode` as the plugin package path. In GPT mode with the `openai` provider, set top-level `lunaPriority` to `false` to avoid requesting priority pricing. Other providers do not accept this option. Custom top-level and per-agent `provider` and `lunaPriority` fields are invalid.
Installed package paths are `./plugins/stanp-opencode/agents`, `./plugins/stanp-opencode/multi-work`, and `./plugins/stanp-opencode/quota`, in that order. Model options belong only to Agents. In GPT mode with the `openai` provider, set `lunaPriority` to `false` to avoid requesting priority pricing. Other providers do not accept this option. Custom top-level and per-agent `provider` and `lunaPriority` fields are invalid.
Custom configurations require the four `fast-*` and `good-*` assignments; `deep-lo` and `deep-hi` are optional. Assignments use `provider/model` model names and require both `model` and `effort` when supplied. If either deep assignment is omitted, both deep workers are disabled and orchestration uses `good-lo`.
The legacy optional `coordinate` assignment is accepted for compatibility but ignored. Orchestration
inherits `deep-lo`, or `good-lo` when the configured `deep-lo` model is unavailable.
@@ -65,12 +70,6 @@ For new coordinate tasks, omit `worktree` to share the current root checkout, or
session/job handling. See [usage, permissions,
failure handling, and verification limits](docs/multi-work.md).
## Playwright
When installed with `--playwright`, the plugin prefers a local Playwright MCP installation. If ordinary Playwright is installed, it can download and run the MCP package with `npx`; otherwise Docker is required for the automatic fallback. Automatically configured servers allow five minutes for startup because the first launch may need to download a package or container image. Docker reuses its cached image on later launches. Existing `playwright` configuration, including its timeout, is preserved.
If `opencode mcp list` reports `MCP error -32001: Request timed out`, prefetch the Docker fallback with `docker pull mcr.microsoft.com/playwright/mcp`, or install `@playwright/mcp` in the project so the plugin can launch it directly. Then reconnect the server from `/mcps` or restart OpenCode. A custom `playwright` entry under `mcp.servers` can also set its own `timeout.startup` in milliseconds.
## Uninstall
Remove `plugins/stanp-opencode` from the selected configuration directory and remove its configuration entry, then restart OpenCode.
Remove `plugins/stanp-opencode` from the selected configuration directory and its three owned configuration entries, then restart OpenCode. This does not remove worktrees or host storage.