hermes-agent/plugins/platforms
Burgunthy e8b7ce8c19 fix(session): persist profile_name and route batch key by profile
Two follow-ups observed after deploying profile routing:

1. sessions.profile_name was NULL even when the agent ran inside the
   routed profile scope. _insert_session_row never wrote it,
   get_or_create_session / reset_session never passed it through, and
   the agent-side _ensure_db_session fallback had no way to read it.
   - Declare profile_name TEXT in SCHEMA_SQL so _reconcile_columns
     auto-adds it on existing DBs.
   - _insert_session_row takes profile_name and writes it.
   - SessionStore passes source.profile (or old_entry.origin.profile
     on reset) into db_create_kwargs.
   - _ensure_db_session reads the active profile via
     get_active_profile_name() inside _profile_runtime_scope.

2. DiscordAdapter._text_batch_key called build_session_key without
   profile=, so the batch key always landed in agent:main even when
   the routed profile differed — diverging from the agent session
   key namespace (agent:crypto-trader, agent:ai-expert, ...).
   Pass event.source.profile through so both namespaces agree.

Live verification (jth-server-2, 2026-06-28): a test message in a
routed #coin thread produced agent:crypto-trader:discord🧵...
in the batch log and profile_name=crypto-trader in the sessions
row. Default-routed chat still produced agent:main / NULL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 09:50:05 -07:00
..
dingtalk fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
discord fix(session): persist profile_name and route batch key by profile 2026-07-15 09:50:05 -07:00
email fix(email): harden adapter against malformed IMAP responses 2026-07-02 03:12:53 -07:00
feishu fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
google_chat refactor(setup): route dependency installs through the canonical uv→pip→ensurepip ladder 2026-07-07 04:09:35 -07:00
homeassistant fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
irc fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
line fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
matrix fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
mattermost fix(mattermost): accept leading-space slash commands 2026-07-05 14:41:57 -07:00
ntfy fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
photon fix(photon): bound the sidecar dep self-heal npm run with a timeout 2026-07-05 17:38:32 -07:00
raft security(raft): enforce body-size limit on chunked requests 2026-07-05 13:57:37 -07:00
simplex fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
slack fix(slack): clear stuck assistant status on /stop and via explicit metadata 2026-07-14 21:31:32 -07:00
sms fix(sms): set client_max_size on the Twilio webhook Application 2026-07-05 17:38:36 -07:00
teams fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
telegram fix(telegram): instrument getUpdates request via subclass re-tag, not slotted attr 2026-07-14 21:25:44 -07:00
wecom test(gateway): regression: every adapter.connect() must accept is_reconnect 2026-07-09 19:09:38 -07:00
whatsapp feat(gateway): attach MEDIA: caption to the media bubble on standalone sends 2026-07-09 15:38:32 +05:30