1. Prepare OpenCode Server
Before touching Mattermost, confirm your OpenCode Server is reachable and has valid Basic Auth credentials.
- Verify
GET /global/health - Verify
GET /agent - Verify
GET /provider
2. Install The Plugin
- Build the package with
make distor download a release archive. - Upload the tarball in Mattermost System Console.
- Enable the plugin.
3. Configure Service Access
Open the plugin settings and fill in the OpenCode connection values.
service.base_urlservice.usernameservice.passwordservice.allow_hostsif you need host restrictions
4. Add Bots
Start with one conversation bot and one coding bot so you can validate both execution paths.
5. Verify A Conversation Bot
- Mention the bot in a thread.
- Ask a summary or drafting question.
- Send a follow-up question in the same thread.
- Confirm the same OpenCode session is reused.
6. Verify A Coding Bot
- Use the RHS runner or mention the coding bot.
- Ask it to inspect a file or review a change.
- Check that project-aware context appears in the reply.
- If an
ocs-taskis returned, approve one safe command and verify the task card updates.