feat: add Slack as a first-class channel#16
Merged
chrysb merged 2 commits intochrysb:mainfrom Mar 13, 2026
Merged
Conversation
Adds full Slack channel support across AlphaClaw — onboarding wizard, channel dashboard, pairings, gateway sync, watchdog notifications, and the channel creation modal. Slack uses Socket Mode which requires two tokens (Bot Token + App Token) rather than one. This is handled via a new `extraEnvKeys` property on channel definitions and dual-token logic in the gateway sync and onboarding flows. Changes: - Add Slack to channel definitions, env keys, and known vars - Add Slack Bot Token and App Token fields to onboarding wizard - Wire Slack into openclaw.json generation (fresh + import flows) - Handle dual-token channel sync in gateway (--bot-token / --app-token) - Use Object.keys(kChannelDefs) instead of hardcoded channel arrays - Add Slack to channel dashboard, pairings UI, and pairing routes - Add App Token field to create-channel modal (Slack is single-account) - Add watchdog crash notifications via Slack DM - Add slack-api.js (minimal Web API wrapper matching existing patterns) - Add Slack SVG icon - Update agents-service test for Slack channel account Ref: chrysb#8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
sweet i've been wanting to get to this. thanks for your submission! will review |
Close Slack channel setup gaps by persisting app tokens in edit/manage flows, hiding managed Slack tokens from Envars, and enforcing single-account rules consistently in UI and server logic. Align channel add UX across views by reusing one add-menu codepath and tighten setup guidance copy.
Owner
|
This is awesome — thank you again for putting this together. 🙌 I pulled this in locally and made a few maintainer follow-ups to align with AlphaClaw UX patterns and close some edge cases before merge:
Huge thanks again for the contribution — this will ship in the next release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full Slack channel support across AlphaClaw.
Slack uses Socket Mode, which requires two tokens (Bot Token
xoxb-+ App Tokenxapp-) instead of one. This is handled via a newextraEnvKeysproperty on channel definitions and dual-token logic throughout.What's included
--bot-token/--app-tokenCLI flags, env var replacement in openclaw.jsonmode: "socket"andgroupPolicy: "open"getChannelStatusnow usesObject.keys(kChannelDefs)instead of a hardcoded arraySlack app scopes
The Slack app needs these Bot Token Scopes:
app_mentions:read,channels:history,channels:read,chat:write,groups:history,im:history,im:read,im:write,mpim:history,reactions:read,reactions:write,users:readAnd one App-Level Token scope:
connections:writeFollow-up idea
Right now both Slack token fields show unconditionally in the onboarding wizard alongside Telegram and Discord. The wizard renderer doesn't support conditional field visibility, so a channel picker (tabs or dropdown that only shows fields for the selected channel) would clean this up. Leaving that for a separate PR to keep this one focused.
Test plan