Skip to content

Add messenger reactions through Wirebot MCP - #15

Merged
sadfun merged 1 commit into
mainfrom
codex/message-reactions
Sep 21, 2026
Merged

sadfun merged 1 commit into
mainfrom
codex/message-reactions

Conversation

@sadfun

@sadfun sadfun commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Codex can now react to the message it is answering in Telegram, Slack, and Discord. A reaction can accompany text or stand on its own: empty answers stay silent and Slack/Discord progress placeholders are deleted.

  • Add a small engine-owned MCP 2026-07-28 server using the official TypeScript SDK, bound to authenticated localhost and configured automatically for Codex.
  • Expose react_to_last_message(reaction) with Unicode emoji, standard shortcodes, and platform custom emoji. Codex thread/turn metadata selects the inbound message without adding message IDs to prompts; queued messages cannot change an active turn's target.
  • Preapprove Wirebot's own MCP tools and route other MCP tool approvals through existing messenger buttons, preserving once/session/deny decisions. General MCP forms and URL requests remain unsupported.
  • Add the conversational reaction guidance and return provider errors without substituting emoji. Document required Slack and Discord permissions.

Validation:

  • Bun 1.4.0: all 31 tests pass; type checking, linting, and compiled build pass.
  • Regression coverage includes concurrent/queued turns, stale targets, endpoint authentication, emoji conversion, approval scope/cancellation, silent answers, and progress cleanup failures.
  • Pinned Codex 0.153.3 smoke tests cover MCP startup/restart, built-in preapproval, and external approvals with a mock provider. Local Telegram runtime restarted and healthy; Slack/Discord provider calls tested with fakes.

@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule issue was identified.

Summary

This PR adds turn-scoped messenger reactions through an authenticated, engine-owned MCP server and extends external MCP approvals to existing messenger controls.

  • Adds Unicode, shortcode, and provider-custom reaction handling for Telegram, Slack, and Discord.
  • Correlates reaction calls with active Codex thread and turn metadata without exposing provider message identifiers in prompts.
  • Routes supported external MCP tool approvals through messenger buttons while declining unsupported forms and URL requests.
  • Makes empty answers silent and removes Slack or Discord progress placeholders when appropriate.
  • Documents the required provider permissions and adds regression coverage for routing, authentication, approvals, emoji conversion, and stream cleanup.
Diagram
sequenceDiagram
  participant U as Messenger user
  participant C as Connector
  participant B as CodexBridge
  participant S as CodexService
  participant X as Codex app-server
  participant M as Wirebot MCP
  participant P as Provider API

  U->>C: Send message
  C->>B: InboundMessage with scoped react callback
  B->>S: Start turn with invocation context
  S->>X: turn/start
  X->>M: react_to_last_message + thread/turn metadata
  M->>S: Resolve active turn
  S->>C: Invoke captured reaction callback
  C->>P: React to original inbound message
  P-->>C: Success or provider error
  C-->>S: Result
  S-->>M: Tool result
  M-->>X: Reaction set or error
Loading

Reviews (1) · Last reviewed commit: "Add messenger reactions through Wirebot ..."

@sadfun
sadfun merged commit 44c319c into main Sep 21, 2026
3 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