Skip to content

feat(channel): add Slack Socket Mode connector - #144

Open
codeaholicguy wants to merge 1 commit into
mainfrom
feature-slack-channel-connector
Open

feat(channel): add Slack Socket Mode connector#144
codeaholicguy wants to merge 1 commit into
mainfrom
feature-slack-channel-connector

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Summary

  • add a local-first, single-workspace, DM-only Slack connector using official @slack/socket-mode and @slack/web-api SDKs
  • add explicit expiring pairing, exact workspace/user/DM allowlists, prompt acknowledgments, replay filtering, Slack-safe Markdown/chunking, threaded rate-limit-aware delivery, and single-select question actions
  • generalize channel config/runtime/status seams while preserving Telegram behavior; document the minimal Slack manifest, security model, lifecycle artifacts, and optional sandbox validation

Security review

Applied the installed AI DevKit security-review checklist to the entire origin/main...HEAD diff. No unresolved high or critical feature-specific findings. Review-driven TDD fixes enforce channels.json mode 0600 on every write, fail closed when pairing persistence fails, isolate listener rejection, expire interactive questions, prevent duplicate acknowledgments, escape question fallback mention syntax, and cap excessive Retry-After delay. Tokens are absent from argv, bridge registry, status/list output, debug logs, and user-facing SDK errors.

npm audit --audit-level=critical --omit=dev exits 0. It reports 22 high, 7 moderate, and 2 low pre-existing transitive advisories outside the added Slack SDK path; broad dependency upgrades are out of scope.

Validation

  • npx ai-devkit@latest lint --json
  • npx ai-devkit@latest lint --feature slack-channel-connector --json
  • npm run lint
  • npm run build
  • npm test
  • npm run test:coverage --workspace @ai-devkit/channel-connector — 109 tests; 87.27% statements / 77.04% branches / 91.40% functions / 88.88% lines
  • npm run test:coverage --workspace ai-devkit — 921 tests; 71.00% statements / 61.09% branches / 69.48% functions / 72.10% lines
  • npm audit --audit-level=critical --omit=dev
  • git diff --check

Residual/manual validation

No real Slack credentials were used. The documented optional disposable-workspace exercise remains: install from the manifest, validate tokens, pair by DM, exercise a question and long threaded output, interrupt/reconnect, stop, disconnect, and revoke tokens. Event idempotency is bounded to the 1,000 most recent IDs for the bridge lifetime and is not persisted across process restarts. Public channels, Slack Connect, OAuth distribution, multi-workspace, files, Marketplace, and generic remote-shell controls remain out of scope.

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