hermes-agent/tests/gateway/relay
Ben Barclay e0dfcf275a
fix(relay): normalize forwarded Discord interactions to leading-slash commands (#71048)
A real APPLICATION_COMMAND interaction forwarded over the relay arrived
slash-less: _discord_interaction_to_event set text = data['name'] ("new",
not "/new"), MessageType.TEXT, and dropped options entirely — so a
registered /new dispatched as plain chat instead of a command
(MessageEvent.is_command() is text.startswith("/")).

Port the connector's Slack slash-command precedent (normalizeSlackCommand
builds `${command} ${args}`.trim() with a leading slash and explicit
command type): for type-2 interactions build "/" + name, append rendered
options space-separated (scalar options contribute their value, matching
the native adapter's f"/model {name}" shape; SUB_COMMAND/
SUB_COMMAND_GROUP contribute their name then recurse into nested
options), and set MessageType.COMMAND. Type-3 (custom_id) and other
interaction types are unchanged. This implements the interaction->command
sub-design previously flagged as deferred in the _on_passthrough
docstring.

Companion connector fix in gateway-gateway: fix(relay): strip own-mention
prefix so addressed slash commands dispatch.
2026-07-25 13:29:36 +10:00
..
__init__.py
stub_connector.py
test_auth.py
test_channel_context_consume.py
test_contract_doc_conformance.py
test_descriptor.py
test_descriptor_from_entry.py
test_identity_token_resolver.py
test_no_stub_leak.py
test_relay_adapter.py fix(relay): restore streaming delivery, Slack command parity, and status clearing (salvage of #69716) (#69747) 2026-07-23 12:51:13 +10:00
test_relay_follow_up.py
test_relay_going_idle.py
test_relay_interrupt.py
test_relay_multiplatform.py
test_relay_passthrough.py fix(relay): normalize forwarded Discord interactions to leading-slash commands (#71048) 2026-07-25 13:29:36 +10:00
test_relay_policy_send.py fix(relay): declare explicit relevance policy when require_mention is configured false (#69816) 2026-07-23 13:57:57 +10:00
test_relay_registration.py
test_relay_roundtrip.py feat(relay): egress typing indicators through the connector (op="typing") (#69721) 2026-07-23 11:21:03 +10:00
test_relay_roundtrip_telegram.py
test_relay_sheds_crypto.py
test_self_provision.py
test_ws_transport.py