Proposal: Introduce a plugin framework
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- java
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Java
- Estrellas
- 516
- Forks
- 205
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 78
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de a2aproject/a2a-java
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorQuizá libre de nuevo @ravismash la tomó hace 21 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
a2aproject/a2a-java#1298 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
fix: handle blank push notification config id consistently across transportsQuizá libre de nuevo @prachisinghal-1 la tomó hace 36 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-java#1012 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
a2aproject/a2a-java#464 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksQuizá libre de nuevo @tanish111 la tomó hace 402 días y no hay ningún pull request abierto. Abiertosample
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
a2aproject/a2a-java#375 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
a2aproject/a2a-java#1351 ·
Los mantenedores suelen responder en 1 día
Todos los issues de a2aproject/a2a-java
Issues similares
-
missing Git commit for 10.5-RC1Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
avaje/avaje-metrics#139 ·
-
documentation good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Attachment upload accepts a file part with no file chosen and stores an empty comp_attachmentPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eclipse-sw360/sw360#4849 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
exoego/keycloak-fuhito#888 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
liquid-java/liquidjava#562 ·
Los mantenedores suelen responder en 1 día