diff --git a/README.md b/README.md index 7b0c8a8..788423e 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,27 @@ If you want to contribute or develop the plugin: - Server starts automatically when you open the panel +## How it works (OpenCode 2.x) + +OpenCode 2 changed both the shape of its web app and its HTTP API. The plugin now: + +- hands the server a password via `OPENCODE_SERVER_PASSWORD` and authenticates + every API call with HTTP Basic (`opencode:`), because 2.x requires + authentication for `/api/*`; +- opens the app at `/server//session/`, where + `` is the base64url encoding of the server URL - the old + `/` path is no longer a valid route (it made the app throw + `Unrecognised route!` / `Cannot read properties of undefined (reading 'type')`); +- creates the session for the vault, so file tree, `@`-mentions, terminal and git + are scoped to it; +- embeds the app in an Electron `` instead of an `