OCS Mattermost OCS Plugin
Guide

Getting Started

The shortest path from plugin upload to your first OpenCode-backed bot reply in Mattermost.

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

  1. Build the package with make dist or download a release archive.
  2. Upload the tarball in Mattermost System Console.
  3. Enable the plugin.

3. Configure Service Access

Open the plugin settings and fill in the OpenCode connection values.

  • service.base_url
  • service.username
  • service.password
  • service.allow_hosts if 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

  1. Mention the bot in a thread.
  2. Ask a summary or drafting question.
  3. Send a follow-up question in the same thread.
  4. Confirm the same OpenCode session is reused.

6. Verify A Coding Bot

  1. Use the RHS runner or mention the coding bot.
  2. Ask it to inspect a file or review a change.
  3. Check that project-aware context appears in the reply.
  4. If an ocs-task is returned, approve one safe command and verify the task card updates.
가이드

시작하기

플러그인 업로드부터 Mattermost 안에서 첫 OpenCode 응답을 받기까지 가장 짧은 경로입니다.

1. OpenCode 서버 준비

Mattermost 설정에 들어가기 전에 OpenCode 서버 연결과 Basic Auth 계정이 정상인지 먼저 확인합니다.

  • GET /global/health 확인
  • GET /agent 확인
  • GET /provider 확인

2. 플러그인 설치

  1. make dist로 패키지를 만들거나 릴리즈 tarball을 받습니다.
  2. Mattermost System Console에서 tarball을 업로드합니다.
  3. 플러그인을 활성화합니다.

3. 서비스 접근 설정

플러그인 설정 화면에서 OpenCode 연결값을 채웁니다.

  • service.base_url
  • service.username
  • service.password
  • 호스트 제한이 필요하면 service.allow_hosts

4. 봇 추가

대화 봇 1개와 코딩 봇 1개로 시작하면 두 실행 경로를 모두 빨리 검증할 수 있습니다.

5. 대화 봇 확인

  1. 스레드에서 봇을 멘션합니다.
  2. 요약이나 초안 작성 질문을 보냅니다.
  3. 같은 스레드에 후속 질문을 보냅니다.
  4. 같은 OpenCode 세션이 이어지는지 확인합니다.

6. 코딩 봇 확인

  1. RHS 실행기나 멘션으로 코딩 봇을 호출합니다.
  2. 파일 점검이나 변경 리뷰를 요청합니다.
  3. 응답에 프로젝트 기반 컨텍스트가 들어가는지 확인합니다.
  4. ocs-task가 오면 안전한 명령 하나를 승인하고 카드가 갱신되는지 봅니다.