feat(channel): add Slack Socket Mode channel plugin - #743
Open
mtxr wants to merge 8 commits into
Open
Conversation
Hermes-style Slack integration for AionCore channels: - credentials: bot token (xoxb) + app_token (xapp) for Socket Mode - DM: always accept (pairing still enforced upstream) - channels/groups: only when listed in config.allowed_channels and @mentioned - empty allowlist means DM-only (safe default) - outbound via chat.postMessage / chat.update for streaming edits - chat_id is the Slack conversation id (same isolation model as Telegram) Includes unit tests for allowlist/mention policy and test-config mapping.
Drop unread serde fields and unused accessors from the Slack adapter.
Surface every inbound Slack event and accept/drop decision at info level so missing Event Subscriptions or allowlist drops are visible in aioncore stdout when pairing does not appear.
Match Lark/DingTalk TLS setup so Socket Mode no longer panics on rustls 0.23 CryptoProvider auto-detection.
Map each Slack thread to its own channel session: - top-level message opens a new session (chat_id = channel:message_ts) - replies in that thread continue the same session - outbound posts always set thread_ts so the bot answers inside the thread
Slack does not render standard Markdown (** / ##). Format assistant output to Slack mrkdwn (*bold*, header lines as bold, links as <url|label>) via format_text_for_platform so stream_relay posts render correctly.
…::Slack Composite chat_ids (channel:thread_root) now include a thread suffix in the sidebar name so threads in the same DM no longer collide. Map Slack to its own conversation source instead of the generic aionui fallback.
Author
|
I can't verify myself on windows or linux, but I used all practices that were in use already. |
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.
Description
Adds a first-party Slack channel plugin using Socket Mode (WebSocket; no public URL).
Behavior
xoxb-…viacredentials.token) + app-level token (xapp-…viacredentials.app_token,connections:write)allowed_channels(comma-separatedC…/G…); empty = DM-only@mentioned/app_mentionchat_id = channel:thread_root)ConversationSource::SlackTypes (
types.rs)Additive optional fields only (
app_token,allowed_channels,skip_serializing_if). Other platforms continue to ignore them; no behavior change for Telegram/Lark/DingTalk/Weixin.Feature flag
aionui-channel/slackandaionui-appdefault features includeslackso desktop builds get the plugin without a separate flag dance.Related Issues
Type of Change
feat— New feature (non-breaking change which adds functionality)Atomic PR Checklist
feat(channel): …Local Checks
aionui-channelmessage_service tests)Runtime Verification
Additional Context