a2ui-project / a2ui-project/a2ui
Refactor all client samples to use @a2a-js/sdk for agent communication
- Langage dominant
- TypeScript
- Étoiles
- 16.4k
- Forks
- 1.3k
- Merge moyen
- 3 j 15 h
- PR mergées (30 j)
- 134
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue concerne les exemples client Angular et Lit (contact, restaurant, rizzcharts, mcp_calculator, component_gallery). Commencez par examiner le code manuel existant de fetch/SSE dans ces exemples et comparez-le à l’exemple Lit Shell qui utilise @a2a-js/sdk. Installez le SDK, remplacez la communication personnalisée par A2AClient et assurez-vous que les réponses typées et les métadonnées sont correctement gérées. Vérifiez que les exemples fonctionnent toujours après la refactorisation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, javascript, typescript
- Domaine
- frontend, tooling
- Type d'issue
- Refactorisation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 65/100