Client continuation messages can be stored with the agent role
維護者通常 1 天內回覆
評估
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Java
- 星號
- 514
- 分支
- 200
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 53
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
a2aproject/a2a-java 的其他 Issue
-
Document 1.x is the actively supported stream, and not 0.3.x可能已有人在做 @Linux2010 於 2 天前認領。 未關閉
難度 1/5 1-3 小時 新手友好度 62/100
a2aproject/a2a-java#1321 ·
維護者通常 1 天內回覆
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableError可能重新可做 @ravismash 於 9 天前認領,目前沒有進行中的 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 於 24 天前認領。 未關閉
難度 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 於 390 天前認領,目前沒有進行中的 PR。 未關閉sample
難度 2/5 1-3 小時 新手友好度 70/100
a2aproject/a2a-java#375 · 5 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
apache/skywalking#14239 ·
維護者通常 1 天內回覆
-
account bug exercise lecture modeling programming
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)可能已有人在做 @dbusche 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
h2database/h2database#4580 ·
維護者通常 1 天內回覆
-
vips-drift
難度 2/5 1-3 小時 新手友好度 74/100
Stirling-Tools/JPDFium#300 ·
維護者通常 1 天內回覆
-
hermes-queue
難度 1/5 1-3 小時 新手友好度 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
維護者通常 1 天內回覆