feat(matrix): support bang command aliases (salvage #28025) - #38175
Merged
Conversation
…mand branch Follow-up to the salvaged contributor commit: - Underscore→hyphen tolerance now emits a resolvable token. Previously the detect set accepted the hyphenated variant but emit returned the raw token, so '!set_home' produced '/set_home' which the dispatcher could not resolve. Now emits '/set-home'. Aliases are left as-is — the gateway dispatcher canonicalizes them itself. - Fix dead skill-command branch: skill command keys are stored slash-prefixed (e.g. '/arxiv') in get_skill_commands(), but the check compared the bare token, so '!arxiv' never normalized. Now compares the '/candidate' form, making skill aliases (e.g. !gif-search) work. - Re-run bang normalization after Matrix reply-fallback stripping so a quoted reply whose content is a bang command reaches command parity with the slash form. - Replace silent 'except Exception: pass' with logger.debug(exc_info=True). - Add AUTHOR_MAP entry for @nepenth. Tests: +5 (underscore-alias, skill-command branch, quoted-reply bang + slash parity). 162 Matrix tests pass.
alt-glitch
enabled auto-merge (rebase)
June 3, 2026 11:45
Contributor
🔎 Lint report:
|
1 task
3 tasks
13 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Matrix users can now type
!commandaliases (e.g.!model,!stop,!queue ...) for gateway slash commands, since many Matrix clients (Element etc.) reserve leading/for local client commands. Salvages #28025 by @nepenth onto currentmain, plus follow-up hardening.Changes
!command→/commandbefore dispatch; only known gateway/plugin/skill commands normalize, so!importantstays chat text. Slash/bang commands bypass room mention-gating.!set_home→/set-home(was/set_home, which the dispatcher couldn't resolve). Aliases left as-is; the gateway canonicalizes them./arxiv) inget_skill_commands(), but the check compared the bare token, so!arxivnever normalized. Now!gif-searchetc. work.except: passwithlogger.debug(exc_info=True).!commandusage.Validation
git diff --checkCredit
Original work by @nepenth (#28025), cherry-picked with authorship preserved. Duplicate #28710 (@NlDev-hub) targeted the same feature a day later.