a2ui-project / a2ui-project/a2ui

Refactor all client samples to use @a2a-js/sdk for agent communication

未關閉
#966 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
a: api-simplicity component: samples javascript P2 sprint ready type: feature/enhancement
主要語言
TypeScript
星號
16.4k
分支
1.3k
平均合併
3 天 15 小時
30 天內合併 PR
134

描述

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.

貢獻指南

開啟貢獻指南

研究方向

此 issue 針對 Angular 和 Lit 用戶端範例(contact、restaurant、rizzcharts、mcp_calculator、component_gallery)。首先,檢查這些範例中現有的手動 fetch/SSE 程式碼,並與使用 @a2a-js/sdk 的 Lit Shell 範例進行比較。安裝 SDK,將自訂通訊替換為 A2AClient,並確保正確處理具型別的回應和中繼資料。驗證重構後這些範例仍可正常運作。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, javascript, typescript
領域
frontend, tooling
Issue 類型
重構
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。