feat: Mattermost plugin + daemon integration (Phases 2-5)

Plugin (Go server + React webapp):
- Custom post type 'custom_livestatus' with terminal-style rendering
- WebSocket broadcasts for real-time updates (no PUT, no '(edited)')
- KV store for session persistence across reconnects
- Shared secret auth for daemon-to-plugin communication
- Auto-scroll terminal with user scroll override
- Collapsible sub-agent sections
- Theme-compatible CSS (light/dark)

Daemon integration:
- PluginClient for structured data push to plugin
- Auto-detection: GET /health on startup + periodic re-check
- Graceful fallback: if plugin unavailable, uses REST API (PUT)
- Per-session mode tracking: sessions created via plugin stay on plugin
- Mid-session fallback: if plugin update fails, auto-switch to REST

Plugin deployed and active on Mattermost v11.4.0.
This commit is contained in:
sol
2026-03-07 22:11:06 +00:00
parent 868574d939
commit c724e57276
9 changed files with 282 additions and 1958 deletions

View File

@@ -77,7 +77,7 @@ Sub-agent lifecycle hooks (`subagent_spawned`, `subagent_ended`) are channel plu
## Discovery 4: Mattermost API
- `PostEditTimeLimit = -1` — unlimited edits on this server
- Bot token: `n73636eit7bg3rgmpsj693mwno` (default/main bot account)
- Bot token: `<redacted>` (default/main bot account, set via MM_BOT_TOKEN env var)
- Multiple bot accounts available per agent (see openclaw.json `accounts`)
- API base: `https://slack.solio.tech/api/v4`
- Post update: `PUT /api/v4/posts/{id}` — no time limit, no count limit