Skip to content

Slack: add ProjectBot Socket Mode integration with single-message replies and thinking reaction#4

Closed
blink-so[bot] wants to merge 28 commits intomainfrom
blink/slack-integration-v2bot
Closed

Slack: add ProjectBot Socket Mode integration with single-message replies and thinking reaction#4
blink-so[bot] wants to merge 28 commits intomainfrom
blink/slack-integration-v2bot

Conversation

@blink-so
Copy link
Contributor

@blink-so blink-so bot commented Sep 15, 2025

Summary

  • Adds slack.ts using @slack/bolt in Socket Mode
  • Bot display name: ProjectBot
  • Supports DMs and channel @mentions (replies in thread for mentions)
  • One-message responses only, formatted with Slack mrkdwn
  • Uses :face_with_monocle: only as a temporary thinking reaction (added on receipt, removed after reply). Replies do not include the emoji.
  • Uses Bun; adds scripts: format and start:slack; adds Prettier dev dependency

Env variables

  • SLACK_APP_TOKEN (xapp-*)
  • SLACK_BOT_TOKEN (xoxb-*)
  • DATABASE_URL (Neon Postgres)

Notes

  • Keeps existing agent system prompt and tools (db_schema, db_query)
  • Uses Vercel AI SDK generateText for a non-streaming single response

Co-authored by Matt Vollmer

- Single-message replies formatted for Slack mrkdwn
- DMs and channel @mentions supported (reply in thread)
- Uses Bun; add scripts and Prettier format

Co-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
@blink-so blink-so bot force-pushed the blink/slack-integration-v2bot branch from 0079c2d to 0293796 Compare September 15, 2025 22:30
…th_monocle: reaction on receipt and remove after reply for DMs and mentions\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
@blink-so blink-so bot changed the title Slack: add @v2bot Socket Mode integration with single-message Slack-formatted replies Slack: add @v2bot Socket Mode integration with single-message replies and thinking reaction Sep 15, 2025
blink-so bot added 2 commits September 15, 2025 22:34
…n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
@blink-so blink-so bot changed the title Slack: add @v2bot Socket Mode integration with single-message replies and thinking reaction Slack: add ProjectBot Socket Mode integration with single-message replies and thinking reaction Sep 15, 2025
blink-so bot and others added 23 commits September 15, 2025 22:50
…If the user message is empty (e.g., only @mention), return a help prompt instead of calling the LLM\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…replies\n\n- Replies no longer include the 🧐 emoji\n- Still add/remove :face_with_monocle: as a thinking reaction\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
- Strip :face_with_monocle: and U+1F9D0 (with VS16) from all generated text
- Remove emoji prefix in runAgentOnce and sanitize before posting
- Keep monocle only as a temporary reaction

Co-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
- Add :face_with_monocle: on receipt; remove after reply in both DMs and mentions
- Use try/finally to guarantee reaction removal

Co-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…e tools for results\n\n- Append Slack-specific behavior to system prompt\n- Keep thinking reaction add/remove intact\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…, maxToolRoundtrips=5, temp=0)\n\n- Prevent preamble-only replies by allowing tool calls in non-streaming mode\n- Keep single-message reply semantics\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
… streamText\n\n- Introduce slack_send tool that posts to the thread\n- Enforce tool-only reply in system prompt; remove preambles\n- Manage thinking reaction around full execution\n- Fallback to posting final text if tool not called\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…d tsconfig + typecheck script; add @types/pg\n- Refactor Slack agent to streamText with slack_send tool; fix scoping and typings\n- Remove unsupported maxSteps; use result.text\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…f not called\n\n- toolChoice set to specific tool 'slack_send'\n- Add second strict pass to ensure tool is called\n- Remove plain-text fallback posting\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…to tool selection; strict retry uses same gate

Co-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…de from last patch\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…ollmer <95866673+mattvollmer@users.noreply.github.com>
…re-DB clarifications and single post after DB query\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…uous messaging flow\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…s slack_send messaging

Co-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…; remove tool-gating approach\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…rror handling in streaming\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
… and include results in final response\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…mprehensive debugging\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…sages\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…it completion instructions\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
…alysis\n\nCo-authored-by: mattvollmer <95866673+mattvollmer@users.noreply.github.com>
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