Skip to content

feat(discord): add bot actions and Gateway message triggers - #15958

Open
erichare wants to merge 86 commits into
release-1.14.0from
fix/le-3200-discord-integrations
Open

erichare wants to merge 86 commits into
release-1.14.0from
fix/le-3200-discord-integrations

Conversation

@erichare

@erichare erichare commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Adds Discord guild-message and mention triggers through the supervised Gateway listener, plus send and reply actions. Each verified bot has one active receiver. Gateway triggers require a self-managed listener and a single-shard bot. Actions also support hosted, Desktop, and headless execution.

Fresh JSON and Python CLI tests preserve supported headless actions. The guide covers bot setup, intents, permissions, session replay limits, event identity, and reconnect followed by Resume. Slash commands and interaction responses remain unsupported.

Depends on #15947. This branch includes the shared runtime prerequisite and targets release-1.14.0.

Verification

54 provider, recovery, and API tests passed. 84 bundle and capability contract tests passed. 331 connection, trigger, and locale UI tests passed. The full documentation build passed. Commands used synced environments with this branch first on PYTHONPATH.

uv run --no-sync pytest src/backend/tests/unit/services/triggers/providers/discord src/backend/tests/unit/services/triggers/test_discord_runtime.py src/backend/tests/unit/api/v1/test_trigger_recovery.py -q -o log_cli=false --tb=short -o cache_dir=/private/tmp/le3200-final-backend-cache
uv run --no-sync pytest src/bundles/discord/tests scripts/ci/test_capability_manifests.py scripts/ci/test_provider_integration_contracts.py -q --no-cov
node node_modules/jest/bin/jest.js --runInBand src/pages/SettingsPage/pages/ConnectionsPage/__tests__ src/components/core/triggers/__tests__ src/pages/SettingsPage/pages/TriggersPage/__tests__ src/locales/__tests__/locale-parity.test.ts
npm run build

Live provider acceptance and public documentation deployment remain unverified. The shared frontend type check has 255 baseline errors, unchanged before and after the fixes in the Jira and Confluence reference branches. CI and review remain separate requirements.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 25, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 26, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 28, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 28, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

if (
parsed.scheme != "wss"
or not (host == "gateway.discord.gg" or host.endswith(".gateway.discord.gg"))
or parsed.port is not None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Accept Discord's regional Gateway hostnames

A normal READY payload can contain resume_gateway_url: wss://gateway-us-east1-b.discord.gg (see the raw READY payload in Discord's API tracker). This host is neither gateway.discord.gg nor a subdomain of it, so this guard rejects it. _read() calls gateway_url() before setting connected or saving the session, which means the initial connection closes immediately and emits no messages; this is not limited to reconnects. Replaying that READY payload against this head reproduces the failure. Please allow Discord's regional Gateway hostname form while retaining the scheme/authority restrictions, and cover a regional URL in the READY and resume paths.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants