Skip to content

feat: customize Discord lifecycle reactions - #29954

Open
pvinis wants to merge 1 commit into
NousResearch:mainfrom
pvinis:feat/custom-discord-reactions
Open

feat: customize Discord lifecycle reactions#29954
pvinis wants to merge 1 commit into
NousResearch:mainfrom
pvinis:feat/custom-discord-reactions

Conversation

@pvinis

@pvinis pvinis commented May 21, 2026

Copy link
Copy Markdown

Summary

  • Allow discord.reactions / DISCORD_REACTIONS to be a per-lifecycle emoji mapping
  • Preserve existing boolean behavior while supporting null/false-ish values to disable individual processing/success/failure reactions
  • Document the YAML/JSON formats and add regression coverage

Test Plan

  • python -m pytest tests/gateway/test_discord_reactions.py tests/gateway/test_config.py -q -o 'addopts='
  • python -m ruff check gateway/platforms/discord.py gateway/config.py hermes_cli/config.py tests/gateway/test_discord_reactions.py tests/gateway/test_config.py

@alt-glitch alt-glitch added type/feature New feature or request platform/discord Discord bot adapter comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of open PR #22100 (feat(discord): configurable reaction emojis for processing lifecycle) — same feature: configurable per-lifecycle reaction emojis for Discord. #22100 has been open since 2026-05-08.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the focused lifecycle configuration and documentation work. The requested behavior is still absent on current main: plugins/platforms/discord/adapter.py:1964-1986 still gates reactions as a boolean and emits fixed 👀/✅/❌ values.

Problems

  • This branch changes the former adapter at gateway/platforms/discord.py and the former YAML bridge in gateway/config.py. Commit cc8e5ec2afbfd10a3cff4e710210dd9ecae64a33 moved both live surfaces into the bundled plugin. Current YAML handling is plugins/platforms/discord/adapter.py:8229-8291; current lifecycle handling is plugins/platforms/discord/adapter.py:1964-1986.
  • The PR is currently conflicting with main, so its implementation cannot reach the active Discord adapter without a targeted port.

Suggested changes

  • Port the resolver/lifecycle edits to plugins/platforms/discord/adapter.py and serialize the YAML mapping in that module's _apply_yaml_config hook.
  • Consolidate with the duplicate feature work identified in the member comment on #29954: #22100.

Automated hermes-sweeper review.

logger.debug("[%s] remove_reaction failed (%s): %s", self.name, emoji, e)
return False

def _reaction_config(self) -> Optional[Dict[str, Optional[str]]]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current main no longer loads this module: commit cc8e5ec2afbfd10a3cff4e710210dd9ecae64a33 moved the active adapter to plugins/platforms/discord/adapter.py. Port this resolver and the lifecycle-hook edits there; current main's live hooks remain at lines 1964-1986.

Comment thread gateway/config.py
os.environ["DISCORD_AUTO_THREAD"] = str(discord_cfg["auto_thread"]).lower()
if "reactions" in discord_cfg and not os.getenv("DISCORD_REACTIONS"):
os.environ["DISCORD_REACTIONS"] = str(discord_cfg["reactions"]).lower()
reactions_cfg = discord_cfg["reactions"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Discord YAML-to-env bridge was moved out of gateway/config.py by cc8e5ec2afbfd10a3cff4e710210dd9ecae64a33. Apply this mapping serialization in plugins/platforms/discord/adapter.py::_apply_yaml_config instead; that is the active current-main config path.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/discord Discord bot adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants