Commit 2bcc98d
feat(slack): implement full Slack integration for CLI (#420)
Add cortex-slack crate with comprehensive Slack integration:
- Slack bot with Socket Mode (WebSocket) for real-time events
- Event handlers for @mentions and direct messages
- Slash commands (/cortex, /cortex-review)
- OAuth flow for workspace installation
- Message formatting (Markdown to Slack mrkdwn)
- Secure credential storage via OS keyring
- Comprehensive error handling for network/API errors
- 49 unit tests covering all modules
The integration supports:
- Bot OAuth tokens (xoxb-...)
- App-level tokens for Socket Mode (xapp-...)
- Signing secret for request verification
- Rate limiting handling with retry-after
- Token expiration and malformed API response handling
Modules:
- bot.rs: Main bot implementation with Socket Mode
- events.rs: Event parsing and handlers
- commands.rs: Slash command handling
- messages.rs: Block Kit message formatting
- oauth.rs: OAuth flow and routes
- config.rs: Configuration and keyring storage
- error.rs: Comprehensive error types
Co-authored-by: Droid Agent <droid@factory.ai>1 parent ecd0a4f commit 2bcc98d
File tree
10 files changed
+3341
-0
lines changed- cortex-slack
- src
10 files changed
+3341
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
229 | 235 | | |
230 | 236 | | |
231 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments