feat: async streaming chat bridge with Chat API push

Replace blocking A2A calls with streaming: webhook returns
immediate "Processing..." response, then streams results from
A2A agent and pushes them to Google Chat via REST API.

- Add ChatApiClient for proactive messaging via Chat REST API
- Add sendMessageStream() to A2ABridgeClient for SSE streaming
- Add extractFromStreamEvent() for parsing individual stream events
- Refactor handler to fire-and-forget async processing
- Fix isTerminal logic to use stream state instead of taskId presence
- Add asyncProcessing guard to prevent overlapping requests
- Add comprehensive README with deployment and setup guide
This commit is contained in:
Adam Weidman
2026-02-14 19:54:47 -07:00
parent 03ef280120
commit 4f3ffc8959
8 changed files with 819 additions and 95 deletions
+1
View File
@@ -218,6 +218,7 @@ export async function createApp() {
projectNumber: process.env['CHAT_PROJECT_NUMBER'],
debug: process.env['CHAT_BRIDGE_DEBUG'] === 'true',
gcsBucket: process.env['GCS_BUCKET_NAME'],
serviceAccountKeyPath: process.env['CHAT_SA_KEY_PATH'],
});
expressApp.use(chatRoutes);
logger.info(