Skip to content

feat(gateway): add native Discord thread and channel slash commands#866

Closed
insecurejezza wants to merge 1 commit intoNousResearch:mainfrom
insecurejezza:feat/discord-slash-provisioning
Closed

feat(gateway): add native Discord thread and channel slash commands#866
insecurejezza wants to merge 1 commit intoNousResearch:mainfrom
insecurejezza:feat/discord-slash-provisioning

Conversation

@insecurejezza
Copy link
Contributor

@insecurejezza insecurejezza commented Mar 10, 2026

Summary

  • add native /thread and /channel Discord slash commands
  • create threads/channels directly in the Discord adapter without introducing an agent tool
  • add regression coverage for slash-command provisioning and native creation handling

Notes

Test Plan

  • source .venv/bin/activate
  • python -m pytest -q tests/gateway/test_discord_slash_commands.py tests/gateway/test_discord_free_response.py tests/gateway/test_platform_base.py tests/test_model_tools.py

@insecurejezza insecurejezza force-pushed the feat/discord-slash-provisioning branch from 6da41ff to 596d374 Compare March 13, 2026 04:24
@insecurejezza insecurejezza force-pushed the feat/discord-slash-provisioning branch from 596d374 to ac82f8a Compare March 13, 2026 04:32
@insecurejezza
Copy link
Contributor Author

Restacked this so it no longer depends on the tool-based implementation from #865. /thread and /channel now create Discord threads/channels directly in the adapter, with regression coverage for the native path only.

teknium1 pushed a commit that referenced this pull request Mar 13, 2026
…adata fix

- Add /thread slash command that creates a Discord thread and starts a
  new Hermes session in it. The starter message (if provided) becomes
  the first user input in the new session.
- Add discord.auto_thread config option (DISCORD_AUTO_THREAD env var):
  when enabled, every message in a text channel automatically creates
  a thread, allowing parallel isolated sessions.
- Fix Discord media method signatures to accept metadata kwarg
  (send_voice, send_image_file, send_image) — prevents TypeError
  when the base adapter passes platform metadata.
- Fix test mock isolation: add app_commands and ForumChannel to
  discord mocks so tests pass in full-suite runs.

Based on PRs #866 and #1109 by insecurejezza, modified per review:
removed /channel command (unsafe), added auto_thread feature,
made /thread dispatch new sessions.

Co-authored-by: insecurejezza <insecurejezza@users.noreply.github.com>
@teknium1
Copy link
Contributor

Merged via PR #1178. Thread creation was kept (with session dispatch added); channel creation was removed as unsafe. Your commit was cherry-picked with authorship preserved. Thank you @insecurejezza!

@teknium1 teknium1 closed this Mar 13, 2026
teknium1 added a commit that referenced this pull request Mar 13, 2026
…adata fix (#1178)

- Add /thread slash command that creates a Discord thread and starts a
  new Hermes session in it. The starter message (if provided) becomes
  the first user input in the new session.
- Add discord.auto_thread config option (DISCORD_AUTO_THREAD env var):
  when enabled, every message in a text channel automatically creates
  a thread, allowing parallel isolated sessions.
- Fix Discord media method signatures to accept metadata kwarg
  (send_voice, send_image_file, send_image) — prevents TypeError
  when the base adapter passes platform metadata.
- Fix test mock isolation: add app_commands and ForumChannel to
  discord mocks so tests pass in full-suite runs.

Based on PRs #866 and #1109 by insecurejezza, modified per review:
removed /channel command (unsafe), added auto_thread feature,
made /thread dispatch new sessions.

Co-authored-by: insecurejezza <insecurejezza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants