@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.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +34 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -472,6 +472,12 @@ interface BrokeredIntegrationToken {
|
|
|
472
472
|
* MCP server needs it alongside the PAT (`AZURE_DEVOPS_ORG_URL`). Absent for
|
|
473
473
|
* non-ADO integrations. */
|
|
474
474
|
orgUrl?: string;
|
|
475
|
+
/** Discord guild (server) id the app's bot was invited into for this user —
|
|
476
|
+
* the `mcp-discord` server scopes to it (`DISCORD_GUILD_ID`). ⚠️ Discord OAuth
|
|
477
|
+
* gives NO per-install token (unlike Slack): `accessToken` here is the app's
|
|
478
|
+
* single BOT token, injected by the broker from config — the per-user
|
|
479
|
+
* credential IS the guildId. Absent for non-Discord integrations. */
|
|
480
|
+
guildId?: string;
|
|
475
481
|
}
|
|
476
482
|
|
|
477
483
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -472,6 +472,12 @@ interface BrokeredIntegrationToken {
|
|
|
472
472
|
* MCP server needs it alongside the PAT (`AZURE_DEVOPS_ORG_URL`). Absent for
|
|
473
473
|
* non-ADO integrations. */
|
|
474
474
|
orgUrl?: string;
|
|
475
|
+
/** Discord guild (server) id the app's bot was invited into for this user —
|
|
476
|
+
* the `mcp-discord` server scopes to it (`DISCORD_GUILD_ID`). ⚠️ Discord OAuth
|
|
477
|
+
* gives NO per-install token (unlike Slack): `accessToken` here is the app's
|
|
478
|
+
* single BOT token, injected by the broker from config — the per-user
|
|
479
|
+
* credential IS the guildId. Absent for non-Discord integrations. */
|
|
480
|
+
guildId?: string;
|
|
475
481
|
}
|
|
476
482
|
|
|
477
483
|
/**
|
package/dist/index.js
CHANGED
|
@@ -835,12 +835,40 @@ var INTEGRATION_REGISTRY = {
|
|
|
835
835
|
name: "Discord",
|
|
836
836
|
icon: "discord",
|
|
837
837
|
category: "comms",
|
|
838
|
-
//
|
|
839
|
-
//
|
|
840
|
-
//
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
838
|
+
// LIVE — the DiscordOAuthProvider + DISCORD_* secrets (client id/secret,
|
|
839
|
+
// bot token, per-env redirect) are registered; the backend provider is
|
|
840
|
+
// config-gated (503 if env unset). Follows the SLACK pattern (OAuth redirect, zero friction),
|
|
841
|
+
// EXCEPT Discord OAuth gives no per-install token: the user's `bot`-scope
|
|
842
|
+
// authorize INVITES the app's single bot into their guild, and we store the
|
|
843
|
+
// returned guild id as the per-user credential. The broker injects the app's
|
|
844
|
+
// BOT token as `accessToken` (from config), so `DISCORD_TOKEN` = that bot
|
|
845
|
+
// token and `DISCORD_GUILD_ID` = the user's guild.
|
|
846
|
+
enabled: true,
|
|
847
|
+
auth: {
|
|
848
|
+
kind: "oauth_redirect",
|
|
849
|
+
// `bot` invites the app's bot into the user's guild (Guild Install);
|
|
850
|
+
// `guilds` lets the exchange read the guild name for display. The bot's
|
|
851
|
+
// channel permissions (View Channels + Read Message History + Send
|
|
852
|
+
// Messages + Send Messages in Threads) are set on the app's bot, NOT here.
|
|
853
|
+
// ⚠️ The app's bot MUST have the Message Content privileged intent enabled
|
|
854
|
+
// or read_messages returns empty content.
|
|
855
|
+
scopes: ["bot", "guilds"]
|
|
856
|
+
},
|
|
857
|
+
delivery: {
|
|
858
|
+
mcp: {
|
|
859
|
+
// mcp-discord (barryyip0625) — Node stdio, BYO bot token headless via the
|
|
860
|
+
// DISCORD_TOKEN env (never argv). Version PINNED; bump only after
|
|
861
|
+
// re-verifying headless. Tools: list/read channels + messages, send
|
|
862
|
+
// message, reply in thread, add reaction. `DISCORD_GUILD_ID` scopes it to
|
|
863
|
+
// the user's invited guild.
|
|
864
|
+
command: "npx",
|
|
865
|
+
args: ["-y", "mcp-discord@1.3.4"],
|
|
866
|
+
envMapping: {
|
|
867
|
+
DISCORD_TOKEN: "accessToken",
|
|
868
|
+
DISCORD_GUILD_ID: "guildId"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
844
872
|
},
|
|
845
873
|
notion: {
|
|
846
874
|
id: "notion",
|