fix: resolve DM channel for agent:main:main sessions

The main agent session uses key 'agent:main:main' which doesn't
contain a channel ID. The session monitor now falls back to reading
deliveryContext/lastTo from sessions.json and resolves 'user:XXXX'
format via the Mattermost direct channel API.

Fixes: status watcher not tracking the main agent's active transcript
This commit is contained in:
sol
2026-03-07 22:35:33 +00:00
parent 7aebebf193
commit 0d0e6e9d90
3 changed files with 131 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ function buildConfig() {
token: getEnv('MM_BOT_TOKEN', null, true),
baseUrl: getEnv('MM_BASE_URL', 'https://slack.solio.tech'),
maxSockets: getEnvInt('MM_MAX_SOCKETS', 4),
botUserId: getEnv('MM_BOT_USER_ID', null),
},
// Transcript directory (OpenClaw agents)