php-sdk/tests/Unit/Server/Stateless
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel cad686aba7
[Server] Complete the multi round-trip request surface (SEP-2322) (#449)
* [Server] Let resources/read ask for input, and stop caching retries

The MRTR pattern names three methods and resources/read was the one whose
handler dropped an InputRequiredResult into the resource formatter. A
retry's answer also carried ttlMs and cacheScope, which the caching rules
forbid: its inputs are not part of any cache key.

* [Server] Refuse an ask the client cannot answer

A handler could put an elicitation into inputRequests for a client that
never declared one, and the only symptom was a retry that never came.
Checked against the request's own capabilities now, and reported as -32021
with the missing set — which is the code the spec defines for exactly this.

* [Server] Hand multi round-trip answers back typed

response() returned whatever JSON arrived, so every handler re-implemented
the same array poking. A malformed answer now reads as absent, which sends
the handler back to asking rather than to failing.

* [Server] Gate streamed input_required asks by capability too

checkInputRequests() only ran on the non-streaming path, so a handler
that emits a notification before returning InputRequiredResult could
still leak an undeclared-capability ask under HTTP 200.
2026-08-18 23:41:00 +02:00
..
InputContextTest.php [Server] Complete the multi round-trip request surface (SEP-2322) (#449) 2026-08-18 23:41:00 +02:00
RequestStateCodecTest.php [Server][Tests] Complete the multi round-trip request flow (SEP-2322) (#446) 2026-08-18 22:45:35 +02:00
StandardHeaderValidatorTest.php [Server] Close the conformance gaps in the modern lifecycle (#447) 2026-08-18 23:09:34 +02:00
StatelessProtocolTest.php [Server] Complete the multi round-trip request surface (SEP-2322) (#449) 2026-08-18 23:41:00 +02:00