Client continuation messages can be stored with the agent role
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 50/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 514
- Forks
- 200
- Merge médio
- 1d 2h
- PRs com merge (30d)
- 53
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
-
Document 1.x is the actively supported stream, and not 0.3.xTalvez já em andamento @Linux2010 assumiu há 2 dias. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 62/100
a2aproject/a2a-java#1321 ·
Mantenedores costumam responder em até 1 dia
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorTalvez livre de novo @ravismash assumiu há 9 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 já em andamento @prachisinghal-1 assumiu há 24 dias. 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á 390 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
Todas as issues de a2aproject/a2a-java
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/skywalking#14239 ·
Mantenedores costumam responder em até 1 dia
-
account bug exercise lecture modeling programming
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Mantenedores costumam responder em até 1 dia
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Talvez já em andamento @dbusche assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
h2database/h2database#4580 ·
Mantenedores costumam responder em até 1 dia
-
vips-drift
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Stirling-Tools/JPDFium#300 ·
Mantenedores costumam responder em até 1 dia
-
hermes-queue
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Mantenedores costumam responder em até 1 dia