@codeam/shared 2.61.42 → 2.61.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -753,12 +753,40 @@ var INTEGRATION_REGISTRY = {
753
753
  name: "Discord",
754
754
  icon: "discord",
755
755
  category: "comms",
756
- // COMING SOON placeholder catalog entry (no OAuth provider / MCP yet). The
757
- // agent will post review pings + read channels over the Discord API once the
758
- // provider lands. `enabled:false` dimmed "coming soon" tile.
759
- enabled: false,
760
- auth: { kind: "oauth_redirect" },
761
- delivery: {}
756
+ // LIVEthe DiscordOAuthProvider + DISCORD_* secrets (client id/secret,
757
+ // bot token, per-env redirect) are registered; the backend provider is
758
+ // config-gated (503 if env unset). Follows the SLACK pattern (OAuth redirect, zero friction),
759
+ // EXCEPT Discord OAuth gives no per-install token: the user's `bot`-scope
760
+ // authorize INVITES the app's single bot into their guild, and we store the
761
+ // returned guild id as the per-user credential. The broker injects the app's
762
+ // BOT token as `accessToken` (from config), so `DISCORD_TOKEN` = that bot
763
+ // token and `DISCORD_GUILD_ID` = the user's guild.
764
+ enabled: true,
765
+ auth: {
766
+ kind: "oauth_redirect",
767
+ // `bot` invites the app's bot into the user's guild (Guild Install);
768
+ // `guilds` lets the exchange read the guild name for display. The bot's
769
+ // channel permissions (View Channels + Read Message History + Send
770
+ // Messages + Send Messages in Threads) are set on the app's bot, NOT here.
771
+ // ⚠️ The app's bot MUST have the Message Content privileged intent enabled
772
+ // or read_messages returns empty content.
773
+ scopes: ["bot", "guilds"]
774
+ },
775
+ delivery: {
776
+ mcp: {
777
+ // mcp-discord (barryyip0625) — Node stdio, BYO bot token headless via the
778
+ // DISCORD_TOKEN env (never argv). Version PINNED; bump only after
779
+ // re-verifying headless. Tools: list/read channels + messages, send
780
+ // message, reply in thread, add reaction. `DISCORD_GUILD_ID` scopes it to
781
+ // the user's invited guild.
782
+ command: "npx",
783
+ args: ["-y", "mcp-discord@1.3.4"],
784
+ envMapping: {
785
+ DISCORD_TOKEN: "accessToken",
786
+ DISCORD_GUILD_ID: "guildId"
787
+ }
788
+ }
789
+ }
762
790
  },
763
791
  notion: {
764
792
  id: "notion",