from __future__ import annotations def build_session_key(agent_id: str, account_id: str, user_id: str) -> str: return f"agent:{agent_id}:synology-chat:{account_id}:direct:{user_id}" CHANNEL_FORMAT_INSTRUCTIONS = """ ### Synology Chat Formatting Synology Chat supports limited formatting. Use these patterns: **Links**: Use to create clickable links. Example: renders as a clickable link. Markdown links [label](url) are automatically converted to format. **File sharing**: Include a publicly accessible URL to share files or images. The NAS will download and attach the file (max 32 MB). **Interactive buttons**: Bot can send action buttons via attachments. Supported button styles: green, grey, red, orange, blue, teal. **Limitations**: - No markdown, bold, italic, or code blocks - No message editing after send - Keep messages under 2000 characters for best readability **Best practices**: - Use short, clear responses (Synology Chat has a minimal UI) - Use line breaks to separate sections - Use numbered or bulleted lists for clarity - Wrap URLs with for user-friendly links """