Skip to content

docs(telegram): document Bot API 10.0 guest mode media delivery - #56297

Open
elphamale wants to merge 2 commits into
NousResearch:mainfrom
elphamale:docs/telegram-guest-mode-bot-api-10
Open

docs(telegram): document Bot API 10.0 guest mode media delivery#56297
elphamale wants to merge 2 commits into
NousResearch:mainfrom
elphamale:docs/telegram-guest-mode-bot-api-10

Conversation

@elphamale

@elphamale elphamale commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Why

The existing guest_mode section only covers the pre-Bot-API-10.0 @mention bypass. The native two-phase reply and media delivery behavior shipped in #56476/#56477 has no user-facing documentation, so operators have no way to know what TELEGRAM_HOME_CHANNEL does or why a "tap to receive" button shows up instead of an inline file.

Requires

This PR documents behavior that doesn't exist on main yet — please merge those first, or review this as a preview of the docs that will land alongside them.

How to test

  • cd website && npm run build (or yarn build) to confirm the docs page builds without broken links/MDX errors.
  • Manual read-through: is the guest-mode media flow understandable to someone who hasn't seen the code?

Platforms tested

Docs-only change, no runtime platform testing applicable.

@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 documenting the operator-facing behavior of the proposed guest-media flow.

Problems

  • Current main only has the mention-bypass implementation (plugins/platforms/telegram/adapter.py:6713-6720, :7443-7465) and its corresponding guide section (website/docs/user-guide/messaging/telegram.md:1044-1070). It does not yet implement guest_message, answerGuestQuery, or the media delivery-token flow documented here.

Suggested changes

  • Keep this docs change paired with the canonical implementation from the still-open #56476/#56477 stack, and validate the final wording against the landed implementation before it is merged.

Automated hermes-sweeper review.

@@ -1069,6 +1069,32 @@ With `guest_mode: true`, a message from a non-allowlisted group is processed **o

DMs and allowlisted groups behave exactly as before.

### Native guest replies (Bot API 10.0)

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.

This section describes behavior that current main does not provide: the existing adapter implements only the guest_mode mention bypass. Please land this alongside the selected #56476/#56477 implementation and validate the final behavior against it.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 15, 2026
elphamale added 2 commits July 16, 2026 11:34
Guest mode's guest_message/answerGuestQuery flow (two-phase stub reply,
deliver-token media button) ships in NousResearch#51886 and NousResearch#52639 but was never
documented — the existing guest_mode section only covers the pre-Bot-API-10.0
@mention bypass. Adds the missing behavior, config (TELEGRAM_HOME_CHANNEL),
and limitations (10-minute token TTL, no session stickiness) to the
user-guide so operators know what to expect and how to enable file delivery.

Requires NousResearch#51886 and NousResearch#52639 to be merged first — this documents behavior that
doesn't exist on main yet.
…56476/NousResearch#56477 behavior

Two statements had drifted from the implementation as it evolved under
review:

- Caller authorization wasn't documented at all. Guest mode gates the
  chat by mention, but the caller must also pass the bot's normal user
  authorization (allowlist/pairing, '*' opt-out, empty list denies
  everyone) -- added a "Who can use it" paragraph, including the
  operator-facing symptom of an unauthorized tester (silent bot +
  gateway log warning, easily mistaken for an outage).

- "No session stickiness" is no longer true: guest sessions are keyed
  per chat + caller (the session-isolation fix), so repeat mentions
  from the same person deliberately continue their conversation.
  Reworded the limitation bullet and the pre-existing guest_mode
  paragraph to say what actually holds: mention required every turn,
  memory per caller.
@elphamale

Copy link
Copy Markdown
Author

Pushed d0c6df89a — rebased onto current main and re-validated the wording against the #56476/#56477 stack as it stands after review, per the sweeper's condition. Two statements had drifted from the implementation:

Caller authorization was undocumented. #56476 gained a fail-closed caller gate during review (credit @mazzz3r): the chat is gated by mention, but the person mentioning must also pass the bot's normal user authorization — allowlist/pairing union, * as the explicit open-to-everyone opt-out, empty allowlist denies everyone, and unauthorized callers are denied silently (gateway log warning only). Added a "Who can use it" paragraph covering this, including the operator-facing symptom: a silent bot during testing usually means the tester isn't allowlisted, not an outage.

"No session stickiness" was no longer accurate. The session-isolation fix keys guest sessions per chat + caller (default group_sessions_per_user: true), so repeat mentions from the same person deliberately continue their conversation while different askers in the same group stay isolated. Reworded the limitation bullet and the pre-existing guest_mode paragraph to state what actually holds: the @mention is required every turn (no auto-engagement), but per-caller memory persists; deliver-button token redemption is independent of session state.

@elphamale
elphamale force-pushed the docs/telegram-guest-mode-bot-api-10 branch from 86c221d to d0c6df8 Compare July 16, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants