Client continuation messages can be stored with the agent role
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 50/100
Direzione di ricerca
Start in DefaultRequestHandler.onMessageSend, where a client message reaches the executor with ROLE_AGENT and is written to task history for an existing task. The probe test DefaultRequestHandlerTest#probeClientAgentRoleIsAccepted reproduces the sequence and can be adapted to assert rejection. Done means a client message without ROLE_USER is refused before the executor runs or history changes, and the existing tests still pass. Confirm the rejection behaviour with maintainers first, since the issue proposes enforcing the protocol direction rather than citing an explicit MUST.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
A client can send an agent-authored message to DefaultRequestHandler.onMessageSend when continuing an existing task. The request succeeds, the executor receives ROLE_AGENT, and the same caller-supplied message is persisted in the task history with ROLE_AGENT. This can make client text appear agent-authored to history consumers.
Reproduced on a2a-java main 897835ef with an in-memory task store and the real default request handler:
- Save a task in
TASK_STATE_INPUT_REQUIREDwith a task ID and context ID. - Call
onMessageSendwith a message containing those IDs, a text part, andMessage.Role.ROLE_AGENT. - Have the executor start work and complete the task.
- The call succeeds;
RequestContext.getMessage().role()isROLE_AGENT, and the persisted task history contains the caller's message ID withROLE_AGENT.
A focused JUnit test using this sequence passed with mvn -o -pl server-common -am -Dtest=DefaultRequestHandlerTest#probeClientAgentRoleIsAccepted -Dsurefire.failIfNoSpecifiedTests=false test. This reproduction uses the default handler directly, not a network transport. It establishes the existing-task continuation case; it does not claim the new-task response has the same history behavior.
Expected behavior
Reject client messages without ROLE_USER as invalid input before invoking the agent or updating task history. The protocol describes ROLE_USER as client-to-server and ROLE_AGENT as server-to-client. This proposes enforcing that direction rather than asserting a separate explicit protocol MUST for rejection.
Related reports: a2aproject/a2a-go#564, a2aproject/a2a-js#819, a2aproject/a2a-rs#557 and a2aproject/a2a-dotnet#607.
- Lingua principale
- Java
- Stelle
- 514
- Fork
- 200
- Merge medio
- 1g 2h
- PR unite (30g)
- 53
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di a2aproject/a2a-java
-
Document 1.x is the actively supported stream, and not 0.3.xForse già presa @Linux2010 l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
a2aproject/a2a-java#1321 ·
I maintainer di solito rispondono entro 1 giorno
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorForse di nuovo libera @ravismash l’ha presa 9 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
a2aproject/a2a-java#1298 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
fix: handle blank push notification config id consistently across transportsForse già presa @prachisinghal-1 l’ha presa 23 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
a2aproject/a2a-java#1012 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
a2aproject/a2a-java#464 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksForse di nuovo libera @tanish111 l’ha presa 390 giorni fa e non c’è nessuna pull request aperta. Apertasample
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
a2aproject/a2a-java#375 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di a2aproject/a2a-java
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/skywalking#14239 ·
I maintainer di solito rispondono entro 1 giorno
-
account bug exercise lecture modeling programming
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Forse già presa @dbusche l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
h2database/h2database#4580 ·
I maintainer di solito rispondono entro 1 giorno
-
vips-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Stirling-Tools/JPDFium#300 ·
I maintainer di solito rispondono entro 1 giorno
-
hermes-queue
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
I maintainer di solito rispondono entro 1 giorno