Proposal: Introduce a plugin framework
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- backend-api-design, developer-experience
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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?
- Linguagem predominante
- Java
- Estrelas
- 516
- Forks
- 205
- Merge médio
- 2d 22h
- PRs com merge (30d)
- 78
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de a2aproject/a2a-java
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorTalvez livre de novo @ravismash assumiu há 21 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
a2aproject/a2a-java#1298 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
-
fix: handle blank push notification config id consistently across transportsTalvez livre de novo @prachisinghal-1 assumiu há 36 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
a2aproject/a2a-java#1012 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
a2aproject/a2a-java#464 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksTalvez livre de novo @tanish111 assumiu há 403 dias e não há nenhum pull request aberto. Abertasample
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
a2aproject/a2a-java#375 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
a2aproject/a2a-java#1351 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de a2aproject/a2a-java
Issues semelhantes
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
apache/maven-fluido-skin#387 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 91/100
simplex-chat/simplex-chat#8372 ·
Mantenedores costumam responder em até 1 dia
-
bug good-first-issue samples
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
avaje/avaje-metrics#139 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 17 dias