Skip to content

Add Slack connector#1

Open
mikeastock wants to merge 4 commits into
mainfrom
devin/1778436577-slack-connector
Open

Add Slack connector#1
mikeastock wants to merge 4 commits into
mainfrom
devin/1778436577-slack-connector

Conversation

@mikeastock

@mikeastock mikeastock commented May 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds Slack as a first-class chat service with config types, discovery, /chat-config guided setup, and JSON app manifest generation.
  • Implements a Socket Mode live adapter using @slack/socket-mode plus Web API send/edit/delete/file upload/catch-up support via @slack/web-api.
  • Adds Slack markdown normalization, routing, docs, command labels, required Slack dependencies, and Slack thread parent tracking for runtime replies.
  • Adds an access-policy allowedBotIds allowlist so trusted Slack bot/app messages can bypass the default bot/self-message filter without disabling bot filtering globally; /chat-config supports both discovered bot entries and manual Slack bot_id entry.

Review & Testing Checklist for Human

  • Run /chat-config → Create account → Slack with a real Slack app and verify the generated JSON manifest imports cleanly.
  • Configure a Slack channel access policy with Allowed bots containing the test app bot_id, then verify an API-authored test bot message can trigger a threaded reply.
  • Connect a configured Slack channel/DM and verify mention-trigger behavior in channels and message-trigger behavior in DMs.
  • Send/receive at least one attachment in Slack to verify files:read/files:write handling.

Notes

  • Local static checks pass: npm run check.
  • Live Slack validation passed with provided repo-scoped secrets: auth.test, team.info, conversation discovery, users.list, Socket Mode connect/disconnect, inbound event receipt in #kitbot-test, and outbound diagnostic replies posted back to Slack threads.
  • Official allowlisted bot retest passed with allowedBotIds: ["B0B3PR8SQN4"]: Slack API-authored message 1778444873.257499 had bot_id: B0B3PR8SQN4, queued one mention job despite ignoreBots: true, and pi-chat replied in the same thread with marker official-allowed-bot-reply-1778444871831.

Link to Devin session: https://app.devin.ai/sessions/eedfb7186c524650a0fe27f319cb292f
Requested by: @mikeastock

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration

Copy link
Copy Markdown
Slack connector runtime test results

Tested locally against Slack workspace stogo using real Slack API/Socket Mode credentials. No screen recording: this was shell/API-only.

Escalations / constraints first:

  • Newly generated real-time user-authored inbound via API is untested: SLACK_PI_CHAT_USER_TOKEN chat.postMessage was stored by Slack with bot_id/app_id, so it is app/bot-originated and filtered by pi-chat's bot/self guard.
  • Incoming webhook was not used for inbound proof because webhook posts are also app/bot-originated.
  • I verified adapter/runtime/threading using an existing real human-authored Slack mention from #kitbot-test history.

Assertions:

  • passed — Slack discovery found workspace T02RMJSAC (stogo), bot kittest, and channel C0AC4U15CN4 (#kitbot-test).
  • passed — Socket Mode connected and caught up a historical human-authored message with no adapter errors.
  • passed — Selected inbound had sourceHadBotId: false, mentionedBot: true, and queued exactly one job.
  • passed — Runtime stored replyToMessageId as 1778439064.934739 for both inbound and outbound records.
  • passed — Slack reply 1778440723.395009 was posted to thread 1778439064.934739 and contained marker reply-ok-history-1778440720091.
  • untested — Newly generated real-time user-authored inbound via API; Slack stored the API post with bot_id/app_id.
  • passed — npm run check completed successfully.
Slack E2E assertions JSONL runtime log
Slack E2E assertions JSONL runtime log
API-generated inbound constraint Static check
API probe constraint npm run check

Devin session: https://app.devin.ai/sessions/eedfb7186c524650a0fe27f319cb292f

@devin-ai-integration

Copy link
Copy Markdown
Allowed Slack bot E2E retest results

Tested locally against Slack workspace stogo using real Slack API/Socket Mode credentials. No screen recording: this was shell/API-only.

Escalations / constraints first:

  • No CI checks are configured for this PR (0 passed, 0 failed, 0 pending).
  • Slack user discovery did not expose the API test app bot ID, so I added and tested the manual bot_id entry path in /chat-config before rerunning this test.

Assertions:

  • passed — Workspace/channel validation matched T02RMJSAC and C0AC4U15CN4.
  • passed — Manual allowlist config represented exactly allowedBotIds: ["B0B3PR8SQN4"] with ignoreBots: true.
  • passed — Source Slack message 1778444873.257499 had bot_id: B0B3PR8SQN4, app_id: A0B2Z5CMK52, and marker official-allowed-bot-1778444871831.
  • passed — Slack adapter accepted the bot-authored message and preserved botId: B0B3PR8SQN4, isBot: true, mentionedBot: true, and replyToMessageId: 1778444873.257499.
  • passed — Runtime queued one mention job despite ignoreBots: true because the bot ID was allowlisted.
  • passed — Slack reply 1778444874.103149 landed in thread 1778444873.257499 with marker official-allowed-bot-reply-1778444871831.
  • passed — JSONL log contains inbound → checkpoint → job_queued → outbound → job_completed with outbound replyToMessageId: 1778444873.257499.
  • passed — npm run check completed successfully.

Slack allowed bot E2E evidence

Devin session: https://app.devin.ai/sessions/eedfb7186c524650a0fe27f319cb292f

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