a2aproject / a2aproject/a2a-js

[Bug]: sendMessage persists follow-up history before the required-extension check

Offen
#684 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
613
Forks
169
Ø Merge
1 T. 6 Std.
Gemergte PRs (30 T.)
21

Beschreibung

### What happened?

`_createRequestContext` appends `incomingMessage` to history and `save()`s, then later throws `ExtensionSupportRequiredError` if a required extension is missing. Existing tests only cover new messages (`taskId: ""`), so the follow-up path is untested.

A client that forgets a required extension on a follow-up still permanently appends that message. Later getTask/listTasks/resubscribe show a message the server refused to execute.

**Repro**
1. Create a task.
2. Configure the agent card with a required extension.
3. sendMessage a follow-up with that taskId and no A2A-Extensions.

Observed: the call throws, but `taskStore.load(taskId).history` already contains the follow-up.
Expected: history unchanged.

### Relevant log output

n/a.

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.