From f53c6b96bb9276f852482e76304b65bbf72222ea Mon Sep 17 00:00:00 2001 From: Nabheet Sandhu Date: Fri, 20 Nov 2026 18:00:19 -0700 Subject: [PATCH] docs: plugin add alone is enough; opencode.json only for scripts Verified with a cli.json-only config: the marker opened the panel at 45/48 through the local fallback. The server part is optional and only external RPC callers need it. --- CHANGELOG.md | 9 +++++++++ README.md | 21 +++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c92ab01..12e24f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.1.14 + +- Fix: install docs implied both config files were required. They are not: + `opencode plugin add` (which writes `cli.json`) is enough for `/media` and the + message marker, because an open falls back to the local opener when the RPC is + unavailable. `opencode.json` is only for scripts calling + `POST /api/rpc/media/open`. Verified with a `cli.json`-only config: the marker + opened the panel at 45/48. + ## 0.1.13 - Fix: install instructions said the package belongs only in `cli.json`. Since diff --git a/README.md b/README.md index aec5dfd..4007c04 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,19 @@ protocol: `OPENTUI_IMAGE_PROTOCOL=sixel` or `OPENTUI_IMAGE_PROTOCOL=blocks`. opencode plugin add opencode-media-panel ``` -The package has two parts: the panel (`./tui`) and a server part (the package -root) that makes it reachable over RPC. List it in **both** files: - -- `cli.json` under `plugins` — loads the panel. `plugin add` writes only this - one, as a bare package name. -- `opencode.json` under `plugins` — loads `POST /api/rpc/media/open`, which is - what the message marker and any script use. Without it the panel still works - from `/media`; only the remote and marker opens fail. +That is enough. `plugin add` writes `cli.json`, which loads the panel: `/media` +and the `media-panel:` marker both work with nothing else. + +The package also has a server part. It is optional, and only scripts or +external clients need it — it registers `POST /api/rpc/media/open`. To enable +it, add the package to `opencode.json` as well: + +```json +{ + "$schema": "https://opencode.ai/config.json", + "plugins": ["opencode-media-panel"] +} +``` Add options by editing the `cli.json` entry: