Skip to content

Contain Slack adapters and compose event sources - #15

Merged
ishaan-berri merged 1 commit into
mainfrom
refactor/compose-slack-transports
Oct 12, 2026
Merged

ishaan-berri merged 1 commit into
mainfrom
refactor/compose-slack-transports

Conversation

@ishaan-berri

@ishaan-berri ishaan-berri commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Slack helpers still appeared beside the Slack package after the first refactor, and Socket Mode was coupled to the adapter. This change removes the sibling compatibility files and composes Slack with a replaceable event source.

  • Keep all Slack implementation and exports in channels/slack/; the shared channel root contains only contracts.
  • Extract SlackEventSource and SocketMode. Applications can inject authenticated events without duplicating parsing, subscriptions, history, replies, files, or status behavior. Existing Slack(bot_token=..., app_token=...) setup continues to use Socket Mode.
  • Preserve bounded acknowledgements and shutdown; cover cancellation during authentication, connection, and accepted event delivery.
  • Enforce containment with a focused architecture test. Add CI that runs Ruff and the full suite on Python 3.11. A stray file in the shared channel root fails the check.
  • Document the structure, composition contract, and import migration.

Import migration: from agentchat.channels import Slack, SlackUser becomes from agentchat.channels.slack import Slack, SlackUser. The old slack_files, slack_media, and slack_mirror modules are removed; canonical replacements are listed in docs/architecture.md.

Validation: 212 tests passed in the checkout and again against an installed wheel using the source archive's tests; Ruff, git diff --check, and uv build passed. Verified that a deliberately misplaced file fails the architecture test and that the wheel/source archive contain no removed shims. Verified against current main with no conflicts. GitHub Actions also passed lint and the full suite on Python 3.11. Live Slack credentials were not used.

@ishaan-berri
ishaan-berri merged commit 88899fe into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant