a2ui-project / a2ui-project/a2ui
Refactor all client samples to use @a2a-js/sdk for agent communication
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.4k
- Forks
- 1.3k
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 134
Descripción
Currently, several client samples (Angular and Lit) implement manual fetch calls and custom SSE parsing to communicate with agents via a proxy. This introduces significant boilerplate and maintenance overhead. We should refactor these samples to use the @a2a-js/sdk A2AClient directly in the browser, matching the standard pattern used in the Lit Shell sample.
**Benefits:**
- **Eliminates Manual SSE Logic:** Removes the need for ReadableStream, TextDecoder, and manual line parsing in every client.
- **Typed Responses:** Standardizes response handling using SDK types (Message, Task, Artifact) instead of manual filtering of parts.
- **Simplified Middlewares:** backend middlewares can transition from protocol converters to simple transparent proxies.
- **Robust Metadata:** Centralizes the management of a2uiClientCapabilities and inlineCatalogs using the SDK's message metadata structure.
**Scope:**
- **Angular Samples:** contact, restaurant, rizzcharts, mcp_calculator.
- **Lit Samples:** contact, component_gallery.
Guía de contribución
Línea de trabajo
El issue aborda ejemplos de cliente de Angular y Lit (contact, restaurant, rizzcharts, mcp_calculator, component_gallery). Primero, examina el código manual existente de fetch/SSE en estos ejemplos y compáralo con el ejemplo Lit Shell, que usa @a2a-js/sdk. Instala el SDK, reemplaza la comunicación personalizada por A2AClient y asegúrate de que las respuestas tipadas y los metadatos se gestionen correctamente. Verifica que los ejemplos sigan funcionando después de la refactorización.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, javascript, typescript
- Área
- frontend, tooling
- Tipo de issue
- Refactorización
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 65/100