Proposal: Introduce a plugin framework
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 活躍
- 技術堆疊
- java
研究方向
Read the SDK architecture and existing extension points, then compare them with the cross-cutting hooks described in the issue. The issue asks whether a plugin framework fits the roadmap and architecture, so first establish the maintainers’ direction before proposing an implementation. Done would require a settled design and scope; no Java files or tests are named.
由索引模型根據 Issue 內容生成。
描述
Context
We (A2A Go, Python and JS SDK maintainers) have recently introduced a plugin framework across all 3 SDKs to give users a unified way to build cross-cutting features (such as OpenTelemetry tracing/metrics, authentication, auditing, retries, caching, and header/context propagation).
Sharing this here in case it makes sense to adopt a similar model in this SDK.
Motivation
Cross-cutting integrations often need to hook into several parts of the SDK at once, not just RPC calls:
- Incoming server calls (unary and streaming)
- Outgoing client calls (unary and streaming)
- Agent execution (before/after execution, around execution for context scoping, emitted events)
- Task store writes (observing task creation and state transitions)
- Push notification deliveries (injecting headers, skipping deliveries, observing status/duration/errors)
Simple before/after call interceptors alone are not enough for cases like retries, caching, timeouts, or ending a tracing span when a stream finishes—so having a way to wrap calls/components alongside (or backing) lifecycle hooks has been key.
Key Ideas (Shared Across Go / Python / JS)
- Single registration point for a plugin that can hook into multiple SDK components.
- Selective hooks: plugins only implement the hooks they need; unused hooks have no overhead.
- Wrapping + lifecycle hooks: support both wrapping execution/calls (for spans, retries, short-circuiting, stream end detection) and simple
before/afterhooks. - Deterministic ordering:
beforehooks run in registration order;afterhooks run in reverse order. - Backwards-compatible: existing interceptors/extension points continue to work.
Reference Implementations
Go (a2a-go) — wrap-based core interfaces + hook-based helper layer:
- Design issue: https://github.com/a2aproject/a2a-go/issues/538
- Core plugin interface: https://github.com/a2aproject/a2a-go/pull/572
- Hook helpers (
a2aplugin): https://github.com/a2aproject/a2a-go/pull/581 - Examples built on it: OAuth client plugin (https://github.com/a2aproject/a2a-go/pull/570), OpenTelemetry tracing plugin (https://github.com/a2aproject/a2a-go/pull/616)
Python (a2a-python) — protocol/interface-based plugins + call wrapping:
- Core plugin framework: https://github.com/a2aproject/a2a-python/pull/1352
wrap_client_call/wrap_server_callhooks: https://github.com/a2aproject/a2a-python/pull/1491- OpenTelemetry client plugin (WIP): https://github.com/a2aproject/a2a-python/pull/1504
JS/TS (a2a-js) — hook-based plugin object wired across server, client, execution, task store, and push:
- Core types: https://github.com/a2aproject/a2a-js/pull/826
- Hook integrations: server (https://github.com/a2aproject/a2a-js/pull/835), client (https://github.com/a2aproject/a2a-js/pull/838), execution (https://github.com/a2aproject/a2a-js/pull/839), task store (https://github.com/a2aproject/a2a-js/pull/840), push (https://github.com/a2aproject/a2a-js/pull/841)
- Tests, samples, and docs: https://github.com/a2aproject/a2a-js/pull/846, https://github.com/a2aproject/a2a-js/pull/847, https://github.com/a2aproject/a2a-js/pull/848
Does a plugin framework like this fit the roadmap and architecture of this SDK?
- 主要語言
- Java
- 星號
- 516
- 分支
- 205
- 平均合併
- 2 天 22 小時
- 30 天內合併 PR
- 78
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
a2aproject/a2a-java 的其他 Issue
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableError可能重新可做 @ravismash 於 21 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
a2aproject/a2a-java#1298 · 5 則留言 ·
維護者通常 1 天內回覆
-
fix: handle blank push notification config id consistently across transports可能重新可做 @prachisinghal-1 於 36 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
a2aproject/a2a-java#1012 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
a2aproject/a2a-java#464 · 1 則留言 ·
維護者通常 1 天內回覆
-
Create a sample that demonstrates how to use a shared contextId across multiple tasks可能重新可做 @tanish111 於 403 天前認領,目前沒有進行中的 PR。 未關閉sample
難度 2/5 1-3 小時 新手友好度 70/100
a2aproject/a2a-java#375 · 5 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 18/100
a2aproject/a2a-java#1351 ·
維護者通常 1 天內回覆
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 92/100
erkamyaman/rust-anything#963 ·
維護者通常 1 天內回覆
-
難度 2/5 半天 新手友好度 76/100
-
Deferred
難度 2/5 1-3 小時 新手友好度 78/100
Sanne/incus-spawn#2768 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
[BUG] Spring SDK returns null for successful plain-text String responses可能已有人在做 @Chrisp12138 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆