php-sdk/tests/Unit/Capability
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 8bae3c054e
[Capability] Preserve optional content fields in PromptResultFormatter (#406)
* Preserve optional content fields in PromptResultFormatter

The formatter's typed-content path rebuilt each Content object from only
its required fields, silently dropping everything else a prompt returned
(annotations on every type, _meta and explicit mimeType on embedded
resource contents). Delegate to the schema classes' fromArray() instead,
keeping the historical mimeType defaulting and RuntimeException-with-
index error contract.

ImageContent was the only content class without annotations support, so
it gains the same constructor/fromArray()/jsonSerialize() handling as
TextContent and AudioContent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Reword CHANGELOG entry to be user-facing

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 22:47:26 +02:00
..
Attribute [Schema][Server] Add top-level title to Tool (#288) 2026-04-26 15:37:40 +02:00
Discovery [Server] Always emit items for array tool parameter schemas (#378) 2026-07-14 23:56:50 +02:00
Formatter [Capability] Preserve optional content fields in PromptResultFormatter (#406) 2026-08-14 22:47:26 +02:00
Logger style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
Registry [Server] Defer element loading to first registry read (#389) 2026-07-14 23:55:31 +02:00
Tool Add tool name validation for SEP-986 (#140) 2025-11-13 21:42:30 +01:00
RegistryTest.php [Server] Defer element loading to first registry read (#389) 2026-07-14 23:55:31 +02:00