Send messages to external channels through the Gateway system.

**list** — List available channels:
- operation="list"

**sessions** — List active sessions:
- operation="sessions"
- limit: Max sessions to return (default: 50)
- offset: Pagination offset (default: 0)

**contacts** — List contacts (users) for a platform:
- operation="contacts"
- platform: Platform name (e.g., "telegram", "discord")
- limit: Max contacts to return (default: 50)
- offset: Pagination offset (default: 0)

**send** — Send message to channel:
- operation="send"
- content: Message content (required)
- channelId: Specific channel ID (optional)
- userId: User ID to send to (optional, requires channelId)
- contactUid: Full Contact UID like "telegram:123456" (optional)
- sessionId: Session ID to send to (optional, uses session's channel and user)
- messageType: "text", "image", or "file" (default: "text")

## Usage Examples

```
# List available channels
gateway_channel(operation="list")

# List active sessions
gateway_channel(operation="sessions")

# List Telegram users who have messaged the bot
gateway_channel(operation="contacts" platform="telegram")

# Send message to specific user (using contact UID)
gateway_channel(operation="send" contactUid="telegram:123456789" content="Hello!")

# Send message to session (reply to user in session)
gateway_channel(operation="send" sessionId="session_xxx" content="Hello!")

# Send message using channel + userId
gateway_channel(operation="send" channelId="telegram-main" userId="123456789" content="Hello!")
```

## Channel Selection Priority

1. contactUid: Parse to get platform and userId, find channel for that platform
2. userId + channelId: Use specified channel, send to userId
3. sessionId: Get session info, use session's channel and userId
4. channelId: Use specified channel only
5. none: Auto-select first running channel

## Contact UID Format

Contacts are stored with unique identifiers:
- Format: "{platform}:{stableId}"
- Examples:
  - Telegram: "telegram:123456789"
  - Discord: "discord:987654321"

## Platform Names

Supported platforms: telegram, discord, slack, feishu, wechat, webchat, signal, nostr

## Result Limits

Sessions and contacts support pagination with limit/offset. If results are truncated, use higher limit values or paginate with offset.
