feat: Implement Mattermost sync functionality and enhance workspace context management

This commit is contained in:
2026-04-09 14:46:50 -06:00
parent e92c07b8b1
commit 0173e3d376
18 changed files with 740 additions and 7 deletions

View File

@@ -0,0 +1,52 @@
# Mattermost Sync
This directory contains the workspace-local Mattermost extractor used by OpenCode to refresh communication context.
## Files
- `mattermost_context.py`
Extracts recent Mattermost messages as JSONL.
- `sync.sh`
Stable wrapper intended to be called by OpenCode.
- `.env.example`
Example configuration without secrets.
- `requirements.txt`
Reserved for future optional dependencies.
## Recommended Setup
1. Copy `.env.example` to `.env`.
2. Fill in your Mattermost values.
3. Create a local virtual environment if you want an isolated runtime.
Example:
```bash
cd scripts/mattermost
bash bootstrap.sh
```
## Usage
Manual run:
```bash
bash scripts/mattermost/sync.sh
```
OpenCode can use this script directly. If `FIDELITY_MATTERMOST_SYNC_CMD` is not set, the workspace plugins will fall back to this wrapper automatically.
## Bootstrap
You can initialize the local runtime with:
```bash
bash scripts/mattermost/bootstrap.sh
```
This will:
- create `.venv/` if missing
- create `.env` from `.env.example` if needed
The current extractor uses only the Python standard library, so no third-party install is required.