mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
Rebased onto current main, where _ensure_session_db grew a per-profile cache (get_hermes_home()-keyed) for /p/<profile>/ multiplex — after this PR's base. The PR's async rewrite assumed the old single-self._session_db model, so on current main `session_db=self._session_db` in _create_agent would pass None in production (the real DB lives in the per-home cache). Split the concern: keep a SYNC _ensure_session_db (per-profile, used by _create_agent + the many sync-patching create_agent tests) and add an async _ensure_session_db_async that captures the profile home on the loop thread then offloads only the SQLite open via to_thread (single-flight). Both share _open_and_cache_session_db. Request handlers use the async variant; _create_agent reverts to the sync call. Updated the first-request test's FakeDB to accept db_path to match main's SessionDB(db_path=...). Co-authored-by: necoweb3 <sswdarius@gmail.com> |
||
|---|---|---|
| .. | ||
| qqbot | ||
| __init__.py | ||
| _http_client_limits.py | ||
| ADDING_A_PLATFORM.md | ||
| api_server.py | ||
| base.py | ||
| bluebubbles.py | ||
| helpers.py | ||
| msgraph_webhook.py | ||
| signal.py | ||
| signal_format.py | ||
| signal_rate_limit.py | ||
| webhook.py | ||
| webhook_filters.py | ||
| weixin.py | ||
| whatsapp_cloud.py | ||
| whatsapp_common.py | ||
| yuanbao.py | ||
| yuanbao_media.py | ||
| yuanbao_proto.py | ||
| yuanbao_sticker.py | ||