mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Salvaged from PR #2033 by yoannes. Adds multi-workspace Slack support so a single Hermes instance can serve multiple Slack workspaces after OAuth installs. Changes: - Support comma-separated bot tokens in SLACK_BOT_TOKEN env var - Load additional OAuth-persisted tokens from HERMES_HOME/slack_tokens.json - Route all Slack API calls through workspace-aware _get_client(chat_id) instead of always using the primary app client - Track channel → workspace mapping from incoming events - Per-workspace bot_user_id for correct mention detection - Workspace-aware file downloads (correct auth token per workspace) Backward compatible: single-token setups work identically. Token file format (slack_tokens.json): {"T12345": {"token": "xoxb-...", "team_name": "My Workspace"}} Fixed from original PR: - Uses get_hermes_home() instead of hardcoded ~/.hermes/ path Co-authored-by: yoannes <yoannes@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| ADDING_A_PLATFORM.md | ||
| api_server.py | ||
| base.py | ||
| dingtalk.py | ||
| discord.py | ||
| email.py | ||
| feishu.py | ||
| homeassistant.py | ||
| matrix.py | ||
| mattermost.py | ||
| signal.py | ||
| slack.py | ||
| sms.py | ||
| telegram.py | ||
| telegram_network.py | ||
| webhook.py | ||
| wecom.py | ||
| whatsapp.py | ||