[INFRA-008] mosaic-bridge module for Discord #170

Closed
opened 2026-02-01 07:24:58 +00:00 by jason.woltje · 0 comments
Owner

Summary

Create the mosaic-bridge module for Discord integration. Enables controlling Mosaic Stack via chat commands.

Responsibilities

  • Connect to Discord via bot token
  • Listen for commands in designated channels
  • Forward commands to stitcher
  • Receive status updates from herald
  • Post updates to threads

Commands

  • @mosaic fix - Start job for issue
  • @mosaic status - Get job status
  • @mosaic cancel - Cancel running job
  • @mosaic verbose - Stream full logs to thread
  • @mosaic quiet - Reduce notifications
  • @mosaic help - Show commands

Noise Management

  • Main channel: Low verbosity (milestones only)
  • Job threads: Medium verbosity (step completions)
  • DMs: Configurable per user

Tasks

  • Create apps/api/src/bridge/bridge.module.ts
  • Create apps/api/src/bridge/discord/discord.service.ts
  • Implement Discord.js bot connection
  • Implement command parsing
  • Implement thread management for job updates
  • Add configuration for channels and verbosity

Files to Create

  • apps/api/src/bridge/bridge.module.ts
  • apps/api/src/bridge/discord/discord.service.ts
  • apps/api/src/bridge/interfaces/chat-provider.interface.ts

Environment Variables

  • DISCORD_BOT_TOKEN
  • DISCORD_GUILD_ID
  • DISCORD_CONTROL_CHANNEL_ID

Acceptance Criteria

  • Bot connects to Discord
  • Commands are parsed and forwarded to stitcher
  • Job threads are created for each job
  • Updates appear in threads
## Summary Create the mosaic-bridge module for Discord integration. Enables controlling Mosaic Stack via chat commands. ## Responsibilities - Connect to Discord via bot token - Listen for commands in designated channels - Forward commands to stitcher - Receive status updates from herald - Post updates to threads ## Commands - @mosaic fix <issue> - Start job for issue - @mosaic status <job> - Get job status - @mosaic cancel <job> - Cancel running job - @mosaic verbose <job> - Stream full logs to thread - @mosaic quiet - Reduce notifications - @mosaic help - Show commands ## Noise Management - Main channel: Low verbosity (milestones only) - Job threads: Medium verbosity (step completions) - DMs: Configurable per user ## Tasks - [ ] Create apps/api/src/bridge/bridge.module.ts - [ ] Create apps/api/src/bridge/discord/discord.service.ts - [ ] Implement Discord.js bot connection - [ ] Implement command parsing - [ ] Implement thread management for job updates - [ ] Add configuration for channels and verbosity ## Files to Create - apps/api/src/bridge/bridge.module.ts - apps/api/src/bridge/discord/discord.service.ts - apps/api/src/bridge/interfaces/chat-provider.interface.ts ## Environment Variables - DISCORD_BOT_TOKEN - DISCORD_GUILD_ID - DISCORD_CONTROL_CHANNEL_ID ## Acceptance Criteria - Bot connects to Discord - Commands are parsed and forwarded to stitcher - Job threads are created for each job - Updates appear in threads ## Related - Epic: #162 - Depends on: #166 (stitcher), #167 (runner-jobs)
jason.woltje added this to the M4.2-Infrastructure (0.0.4) milestone 2026-02-01 07:24:58 +00:00
jason.woltje added the apiapiphase-3p1 labels 2026-02-01 07:24:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#170