diff --git a/CHANGELOG.md b/CHANGELOG.md index d985e2b..c92ab01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.13 + +- Fix: install instructions said the package belongs only in `cli.json`. Since + 0.1.10 it also has a server part, which `opencode.json` must list for the RPC + and marker opens to work. +- Docs: "How it works" describes the single open path through the plugin's own + RPC; troubleshooting covers a dead marker and `rpc.unavailable: media`. + ## 0.1.12 - Add: a message marker. A finished message containing a line diff --git a/README.md b/README.md index 2ce6b0e..aec5dfd 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,16 @@ protocol: `OPENTUI_IMAGE_PROTOCOL=sixel` or `OPENTUI_IMAGE_PROTOCOL=blocks`. opencode plugin add opencode-media-panel ``` -A package with only a TUI part is configured in `cli.json`, not -`opencode.json`. `plugin add` writes a bare package name; add options by -editing the entry: +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. + +Add options by editing the `cli.json` entry: ```json { @@ -167,6 +174,12 @@ Frame height follows the source aspect ratio. 3. A timer advances the frame index, and the panel sets its `` source to the next entry. +Opening is one path. `/media`, autoplay and a message marker all ask the +plugin, the plugin calls its own RPC (`context.client.rpc(Media).open`), the +server part emits, and the TUI's subscription renders. Nothing shells out, and +if the server part is not loaded the call rejects and the local opener runs +instead. + Extraction is cached per source path, size, modification time, and the settings that change the pixels. A restart reuses the previous frames; editing the clip re-extracts. Each source gets its own directory under the system temp