a2aproject / a2aproject/a2a-js

[Bug]: JSON-RPC streaming responses omit activated extension headers

Đang mở
#710 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
613
Fork
169
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
21

Mô tả

## What happened

When an agent activates a requested extension while handling `SendStreamingMessage`, the JSON-RPC SSE response omits the `A2A-Extensions` header. The same agent and extension return the header correctly for a non-streaming `SendMessage` request.

In a minimal reproduction, both requests return HTTP 200, but the results are:

- `SendMessage`: `A2A-Extensions: https://example.test/ext/stream`
- `SendStreamingMessage`: no `A2A-Extensions` response header

## What I expected

The JSON-RPC streaming response should include every extension that the agent successfully activates for that request, just like the non-streaming response.

## Steps to reproduce

1. Configure a JSON-RPC agent that advertises streaming support and an optional test extension.
2. Send `SendStreamingMessage` with the test extension in the `A2A-Extensions` request header.
3. In the agent executor, activate the extension before publishing the first stream event.
4. Observe that the response is a successful SSE stream but has no `A2A-Extensions` header.
5. Send the equivalent non-streaming `SendMessage` request and observe that its response includes the activated extension header.

## Additional context

This affects per-request extension negotiation for streaming JSON-RPC clients: the response does not tell the client which requested extensions actually became active. The streaming path already prepares the first event before flushing the SSE response, so activations made while producing that event can be known before the headers are committed.

The A2A extension activation guidance says that once the agent has identified the activated extensions, the response should list them in `A2A-Extensions`:
https://github.com/a2aproject/A2A/blob/main/docs/topics/extensions.md#extension-activation

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Look for the JSON-RPC streaming response handling code, likely in a file related to `SendStreamingMessage` or SSE responses. Compare it with the non-streaming `SendMessage` path to see where the `A2A-Extensions` header is added. The first event is prepared before headers are flushed, so check the timing of header commitment. Run the provided reproduction steps to confirm the bug.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, typescript
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.