feat: enhance Mattermost proxy with improved post ID deduplication and file tracking
This commit is contained in:
@@ -43,11 +43,7 @@ The helper intentionally uses `open -n /Applications/Mattermost.app --args ...`
|
||||
instead of invoking `/Applications/Mattermost.app/Contents/MacOS/Mattermost`
|
||||
directly. Direct binary launch can crash sandboxed Electron apps with Mach
|
||||
rendezvous errors because their expected app/container parent process is
|
||||
missing. If you need the old behavior for debugging, set:
|
||||
|
||||
```bash
|
||||
MATTERMOST_MIRROR_LAUNCH_MODE=binary scripts/mattermost-proxy/launch-mattermost.sh
|
||||
```
|
||||
missing.
|
||||
|
||||
## Output layout
|
||||
|
||||
@@ -64,6 +60,8 @@ ai/inbox/mattermost-mirror/
|
||||
|
||||
Use `latest.md` or `latest.jsonl` for quick AI context. Use date-rotated `messages/...` files for previous-workday or channel/date-specific analysis.
|
||||
|
||||
The mirror writes any post payload it sees, including older messages returned when the desktop app loads channel history or a thread. It dedupes by `post_id`, so scrolling back through useful history is a safe way to backfill missing local evidence without creating repeated entries.
|
||||
|
||||
## Normalized message schema
|
||||
|
||||
Each line in the normalized JSONL contains:
|
||||
@@ -102,6 +100,4 @@ Each line in the normalized JSONL contains:
|
||||
- `MATTERMOST_MIRROR_LATEST_LIMIT`: number of messages in `latest.*`, default `200`.
|
||||
- `MATTERMOST_MIRROR_CHANNEL_IDS`: optional comma-separated channel ID allowlist.
|
||||
- `MATTERMOST_MIRROR_WRITE_RAW`: set to `1` to save compact raw REST/WebSocket evidence.
|
||||
- `MATTERMOST_APP_BIN`: Mattermost Desktop binary path.
|
||||
- `MATTERMOST_APP_PATH`: Mattermost Desktop `.app` bundle path.
|
||||
- `MATTERMOST_MIRROR_LAUNCH_MODE`: `open` by default; `binary` only for debugging.
|
||||
|
||||
Reference in New Issue
Block a user