Commit Graph

14 Commits

Author SHA1 Message Date
Adam Weidman 60b01761b8 feat: add GCS-backed session and conversation persistence
Enable session resumability across Cloud Run restarts:

- executor.ts: Save conversation history in task metadata during
  toSDKTask(), restore via setHistory() in reconstruct()
- gcs.ts: Persist conversation history as separate GCS object
  (conversation.tar.gz) alongside metadata and workspace
- session-store.ts: Add optional GCS-backed persistence with periodic
  flush and restore-on-startup for thread→session mappings
- handler.ts: Restore persisted sessions on initialize()
- types.ts: Add gcsBucket to ChatBridgeConfig
- app.ts: Pass GCS_BUCKET_NAME to chat bridge config

Validated end-to-end: message persists, Cloud Run restarts, follow-up
message in same thread correctly recalls prior context. Different
threads maintain isolation.
2026-02-12 17:17:08 -05:00
Adam Weidman df81bfe1f2 feat: Google Chat bridge with YOLO mode, text-based approvals, and Add-ons support
- Add normalizeEvent() to convert Workspace Add-ons event format to legacy ChatEvent
- Add wrapAddOnsResponse() for Add-ons response wrapping
- Mount chat bridge routes BEFORE A2A SDK catch-all handler
- Replace card button approvals with text-based approve/reject/always allow
- Add /reset, /yolo, /safe slash commands for session control
- Add YOLO mode tool approval dedup (filter auto-approved surfaces)
- Add extractCommandSummary() for concise tool card display
- Delegate auth to Cloud Run IAM when K_SERVICE env var detected
- Add JWT debug logging for token claim inspection
2026-02-12 16:12:18 -05:00
Adam Weidman 9d12980baa feat: add JWT verification middleware for Google Chat webhook
Verifies Bearer tokens from Google Chat using google-auth-library.
Checks issuer (chat@system.gserviceaccount.com) and audience
(CHAT_PROJECT_NUMBER). Verification is skipped when project number
is not configured, allowing local testing without tokens.
2026-02-12 10:56:42 -05:00
Adam Weidman 57f3c9ca1a feat: add Google Chat bridge for A2UI integration
Implements a Google Chat HTTP webhook bridge that connects Google Chat
to the A2A server. Each Chat thread maps to an A2A contextId/taskId
pair. The bridge converts A2UI tool approval surfaces to Google Chat
Cards V2 with Approve/Always Allow/Reject buttons, and handles
CARD_CLICKED events to forward tool confirmations back to the A2A server.

Components:
- chat-bridge/types.ts: Google Chat event/response types
- chat-bridge/session-store.ts: Thread -> A2A session mapping
- chat-bridge/a2a-bridge-client.ts: A2A SDK client wrapper
- chat-bridge/response-renderer.ts: A2UI -> Google Chat Cards V2
- chat-bridge/handler.ts: Event handler (MESSAGE, CARD_CLICKED)
- chat-bridge/routes.ts: Express routes mounted at /chat/webhook
2026-02-12 10:11:58 -05:00
Adam Weidman 5ea957c84b feat: add A2UI extension support and GKE deployment infrastructure
Implement A2UI v0.10 protocol compliance for the a2a-server:
- Add a2ui-extension.ts with constants, Part helpers, extension detection
- Add a2ui-components.ts with standard catalog component builders
- Add a2ui-surface-manager.ts for tool approval, response, thought surfaces
- Integrate A2UI into task.ts and executor.ts
- Add configurable bind host (CODER_AGENT_HOST) for k8s compatibility

Add GKE deployment infrastructure:
- Dockerfile, cloudbuild.yaml, k8s deployment manifest, .dockerignore
2026-02-11 19:23:56 -05:00
Christian Gunderman fd65416a2f Disallow unsafe type assertions (#18688) 2026-02-10 00:10:15 +00:00
Coco Sheng 5ba6e243b5 Restricting to localhost (#16548)
Co-authored-by: Adam Weidman <adamfweidman@google.com>
2026-01-15 18:59:34 +00:00
Adib234 10ae84869a Migrate console to coreEvents.emitFeedback or debugLogger (#15219) 2025-12-29 20:46:10 +00:00
Coco Sheng 299cc9bebf feat(a2a): Introduce /init command for a2a server (#13419) 2025-12-12 17:09:04 +00:00
Coco Sheng 1f813f6a06 feat(a2a): Introduce restore command for a2a server (#13015)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
2025-12-09 15:08:23 +00:00
cocosheng-g 69339f08a6 Adds listCommands endpoint to a2a server (#12604)
Co-authored-by: Juanda <jdgarrido@google.com>
Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
2025-11-07 15:10:29 +00:00
Jacob MacDonald 1b302deeff Add ExtensionLoader interface, use that on Config object (#12116) 2025-10-28 16:04:30 +00:00
jdgarrido1105 3f38f95b1d Adds executeCommand endpoint with support for /extensions list (#11515) 2025-10-23 13:05:43 +00:00
Sam McCauley 2782af3f57 chore(a2a-server): refactor a2a-server src directory (#7593) 2025-09-03 14:24:48 +00:00