- Add getThreadParentMessage() to fetch root message of thread
- Include ThreadParentText in agent context
- Thread parent text included in message body for visibility
Completes thread context support for Google Chat
- Add getGoogleChatMessage() API function to fetch messages by name
- Reorder message processing to fetch quoted content before body creation
- Include QuotedMessageText in agent context for thread replies
- Update documentation with implementation details
Fixes thread reply context for Google Chat
Two fixes for Google Chat reliability:
1. Space Events Response (Fixes 'Can't handle app response' error):
- Return proper JSON response for non-MESSAGE events in groups
- Handles ADDED_TO_SPACE, REMOVED_FROM_SPACE, etc.
- Previously returned empty '{}' which caused errors
2. Thread Reply Context (Adds missing context):
- Add threadReply field to GoogleChatMessage type
- Add quotedMessageMetadata field for quoted messages
- Pass IsThreadReply and QuotedMessageId to agent context
- Agent now knows when a message is a reply vs root message
Both fixes improve Google Chat reliability and agent context awareness.
Add space caching and auto-resolution for proactive Google Chat messages:
- Auto-cache space IDs when users message the bot (knownSpaces)
- Auto-resolve users/{id} to cached spaces for outbound messages
- Fallback to findDirectMessage API when not cached
- Add comprehensive documentation for proactive messaging patterns
This enables cron jobs, skills, and agents to send proactive messages
to users who have previously interacted with the bot.
Fixes: Users can now send messages via 'users/{id}' target instead of
needing to know the space ID beforehand.