feat: implement channel directory and message mirroring for cross-platform communication

- Introduced a new channel directory to cache reachable channels/contacts for messaging platforms, enhancing the send_message tool's ability to resolve human-friendly names to numeric IDs.
- Added functionality to mirror sent messages into the target's session transcript, providing context for cross-platform message delivery.
- Updated the send_message tool to support listing available targets and improved error handling for channel resolution.
- Enhanced the gateway to build and refresh the channel directory during startup and at regular intervals, ensuring up-to-date channel information.
This commit is contained in:
teknium1 2026-02-22 20:44:15 -08:00
parent 92447141d9
commit 08e4dc2563
9 changed files with 644 additions and 31 deletions

View file

@ -367,6 +367,11 @@ class SessionStore:
return False
def has_any_sessions(self) -> bool:
"""Check if any sessions have ever been created (across all platforms)."""
self._load()
return len(self._entries) > 1 # >1 because the current new session is already in _entries
def get_or_create_session(
self,
source: SessionSource,