Skip to content

Rewrite Slack adapter to Socket Mode, add community files#15

Merged
initializ-mk merged 1 commit intomainfrom
bug/channel-slack
Mar 2, 2026
Merged

Rewrite Slack adapter to Socket Mode, add community files#15
initializ-mk merged 1 commit intomainfrom
bug/channel-slack

Conversation

@initializ-mk
Copy link
Contributor

Summary

  • Slack adapter rewrite: Replace webhook-based Slack adapter with Socket Mode (outbound WebSocket via apps.connections.open). No public URLs, no signing secrets — just SLACK_APP_TOKEN + SLACK_BOT_TOKEN.
  • Mention-aware filtering: Bot resolves its own user ID via auth.test at startup. Only responds when @mentioned in channels; responds to all thread messages unless directed at another user. Strips bot mention from text before passing to LLM.
  • Processing indicators: Adds 👀 reaction on receipt, removes on response. Sends interim "Researching..." message if handler takes >15 seconds.
  • Large response file uploads: Both Slack (files.getUploadURLExternal) and Telegram (sendDocument) upload full reports as Markdown files with a summary message. Falls back to chunked messages on failure.
  • Runtime file part pass-through: Tool outputs >8000 chars are attached as file parts in the A2A response so channel adapters get untruncated data even when LLM truncates.
  • JSON unwrapping: Tavily Research/Search JSON tool outputs are converted to readable markdown before delivery to channels.
  • Slack capability bundle: Updated egress domains to wss-primary.slack.com, api.slack.com, files.slack.com (replacing hooks.slack.com).
  • CLI updates: Socket Mode config templates, updated setup instructions, skill subdirectory scaffolding, /invite reminder.
  • Community files: CONTRIBUTING.md, CODE_OF_CONDUCT.md, GitHub issue/PR templates, skill starter template.
  • README updates: New sections for mention filtering, processing indicators; updated large response handling docs; added Contributing section.

Test plan

  • cd forge-core && go test ./...
  • cd forge-cli && go test ./...
  • cd forge-plugins && go test ./...
  • cd forge-skills && go test ./...
  • Verify Slack Socket Mode connection with a real Slack app
  • Verify @mention filtering in channels and threads
  • Verify 👀 reaction and interim message on slow queries
  • Verify large response file upload on Slack and Telegram
  • Validate all YAML issue templates parse correctly
  • Verify forge channel add slack generates correct .env and config

…docs

Slack channel adapter:
- Replace webhook-based adapter with Socket Mode (WebSocket via apps.connections.open)
- Add mention-aware filtering: respond only when @mentioned in channels, always in threads/DMs
- Add 👀 reaction indicator and interim "Researching..." message for long-running queries
- Strip bot mention from message text before passing to LLM
- Add file upload for large responses via files.getUploadURLExternal API
- Unwrap JSON tool outputs (Tavily Research/Search) into readable markdown
- Update capability bundle domains: wss-primary.slack.com, files.slack.com

Runtime and Telegram:
- Track large tool outputs (>8000 chars) as file parts in A2A response
- Add Telegram document upload via sendDocument for large responses
- Add SplitSummaryAndReport for summary+file splitting

CLI and templates:
- Update Slack config template: app_token_env replaces signing_secret_env
- Update .env template: SLACK_APP_TOKEN replaces SLACK_SIGNING_SECRET
- Update channel setup instructions for Socket Mode flow
- Scaffold skills to subdirectories (skills/{name}/SKILL.md)
- Add Slack /invite reminder after init

Community files:
- Add CONTRIBUTING.md, CODE_OF_CONDUCT.md
- Add GitHub issue templates (bug-report, feature-request, new-skill, config)
- Add pull request template with skill-specific checklist
- Add skill starter template (_template/SKILL.md) with scripts/.gitkeep
- Update README with contributing section, mention filtering, processing indicators
@initializ-mk initializ-mk merged commit 95dbe94 into main Mar 2, 2026
9 checks 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