Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating Business updates from the normal agent path and adding substantial regression coverage.
Problems
- The implementation and tests target
gateway/platforms/telegram.py, but current main moved that adapter toplugins/platforms/telegram/adapter.pyin560010547. The PR test imports the removed module attests/gateway/test_telegram_business_inbox.py:9, so this needs a plugin-era port rather than a direct application. gateway/life_inbox_store.py:155introducesHERMES_LIFE_HOMEand persists under~/.hermes-life; this bypasses profile-scoped Hermes state and uses a non-secret env var for behavior.AGENTS.md:102-106requires behavioral configuration inconfig.yaml.resolve_life_inbox_db_path()requires a separateaccounts.jsonregistry, whilescripts/telegram_business_payload_probe.py:26defaults to a specific Telegram owner ID. That is not a generic Telegram Business setup path.
Suggested changes
- Port the handlers and tests to
plugins/platforms/telegram/adapter.py; current main's plugin handler registration surface from7c4cde9e8is the relevant integration point. - Rework state/configuration around
config.yamlandget_hermes_home(), without user-specific account assumptions.
Automated hermes-sweeper review.
| from types import SimpleNamespace | ||
|
|
||
| import pytest | ||
|
|
There was a problem hiding this comment.
gateway.platforms.telegram no longer exists on current main: 560010547 moved the adapter to plugins/platforms/telegram/adapter.py. Port this test and the implementation to the bundled-plugin path rather than restoring the legacy module.
| return Path.home() / ".hermes-life" | ||
|
|
||
|
|
||
| def resolve_life_inbox_db_path(user_chat_id: str | int, *, life_home: Path | str | None = None) -> Path: |
There was a problem hiding this comment.
Do not add HERMES_LIFE_HOME as a user-facing behavior setting or place state in ~/.hermes-life. Use a documented config.yaml setting and profile-aware get_hermes_home() storage; otherwise named profiles can silently share or bypass inbox state.
| LifeInboxStore, | ||
| resolve_life_inbox_db_path, | ||
| ) | ||
|
|
There was a problem hiding this comment.
This hard-coded Telegram owner ID makes the shipped probe user-specific. Require an explicit account selection or derive the owner through the configured Business connection instead.
Summary
Problem
When Hermes is attached to a Telegram Business account, business inbox messages are not handled like normal Telegram chat traffic. In practice this made business events hard to classify and inspect reliably: payloads could be duplicated, empty fields could leak into storage, and archived business text was not persisted in a form that made debugging or follow-up processing easy.
Scope
This PR intentionally stays focused on Telegram Business inbox detection, persistence, and diagnostics. The higher-level inbox workflow and action-card automation built on top of this layer are kept out of scope for a follow-up branch.
Testing