Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
519e96c
Fix nullable structured tool results
mikemikimike Oct 13, 2026
de107a5
Fix structured output for required nullable properties
mikemikimike Oct 19, 2026
55b7972
Preserve schema-required nullable output members
mikemikimike Oct 21, 2026
f1a39f8
Fix structured output required member restoration
mikemikimike Oct 22, 2026
6c530f6
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 22, 2026
c4f9d71
Repair structured output against explicit schemas
mikemikimike Oct 23, 2026
0170ae6
Add regression for structured output source lookups
mikemikimike Oct 23, 2026
d633262
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 23, 2026
dfed8d3
Fix structured content schema recovery
mikemikimike Oct 26, 2026
f756988
Test structured output schema edge cases
mikemikimike Oct 26, 2026
e294aeb
Cover branch-isolated structured output recovery
mikemikimike Oct 26, 2026
a3384df
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 26, 2026
5dd99de
Fix structured output repair edge cases
mikemikimike Oct 27, 2026
4dfae0e
Fix structured output recovery edge cases
Oct 27, 2026
db3d9e7
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 27, 2026
4ca13cf
Fix composed structured output recovery and embedded references
Oct 27, 2026
351451e
Fix structured output recovery review issues
mikemikimike Oct 28, 2026
d3d0080
Merge upstream review fixes and preserve expanded regression coverage
Oct 28, 2026
66dfae7
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 28, 2026
9b2f5c8
Fix structured output recovery contracts and bound schema traversal
Oct 28, 2026
5b24706
Fix structured output recovery boundaries and branch selection
Oct 28, 2026
8731f21
Cache structured output recovery contracts without mutating metadata
Oct 28, 2026
a1fb212
Merge upstream main into structured output recovery fixes
Oct 28, 2026
d4c38b2
Preserve ancestor cycle scope during structured output recovery
Oct 28, 2026
d0fe5e4
Respect effective schemas and serialization boundaries during output …
Oct 28, 2026
f249b4a
Fix structured output recovery edge cases
mikemikimike Oct 29, 2026
875cc0f
Avoid recovery from reordered enumerables
mikemikimike Oct 29, 2026
4bac0eb
Align NativeAOT iterator assertions with conservative recovery
Oct 29, 2026
1bee8f7
Recover structured output from generic lists
mikemikimike Oct 29, 2026
49b1bf9
Bound structured output recovery allocation and schema work
Oct 29, 2026
c23927f
Fix structured output recovery safety and annotation boundaries
Oct 29, 2026
4225c52
Preserve serializer readonly-member recovery capabilities
Oct 29, 2026
bd84672
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 29, 2026
21d1b3e
Retain original structured output after recovery failures
Oct 29, 2026
67b6f7a
Preserve effective schemas through forwarding tool invocations
Oct 30, 2026
ee847e7
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 30, 2026
493eb4d
Skip structured output recovery for serialized JSON results
Oct 30, 2026
cad6719
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 30, 2026
64f57d1
Preserve structured output across mutable forwarding boundaries
Oct 31, 2026
13a1357
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Oct 31, 2026
3f0015d
Address structured output recovery review feedback
mikemikimike Oct 31, 2026
d086ca5
Fix structured output recovery across stacked delegation
Nov 3, 2026
87279ec
Merge branch 'main' into fix/structured-content-null-schema
tarekgh Nov 3, 2026
90ab0e5
Isolate structured output recovery and stabilize transport startup
Nov 4, 2026
0f74bab
Merge upstream main and update AOT skills test compatibility
mikemikimike Nov 8, 2026
b53e6c6
Avoid stdio cleanup read-loop deadlock
mikemikimike Nov 11, 2026
e41c1c9
Merge latest main into structured output fix
mikemikimike Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build: restore
test: build
dotnet test \
--no-build \
-p:TestTfmsInParallel=false \
--configuration $(CONFIGURATION) \
--filter '(Execution!=Manual)' \
--blame \
Expand Down
408 changes: 207 additions & 201 deletions src/ModelContextProtocol.Core/Client/StdioClientSessionTransport.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ internal class StreamClientSessionTransport : TransportBase
/// <param name="loggerFactory">
/// Optional factory for creating loggers. If null, a NullLogger is used.
/// </param>
/// <param name="startReading">Whether to start reading immediately rather than after derived initialization.</param>
/// <remarks>
/// This constructor starts a background task to read messages from the server output stream.
/// By default, this constructor starts a background task to read messages from the server output stream.
/// The transport will be marked as connected once initialized.
/// </remarks>
public StreamClientSessionTransport(Stream serverInput, Stream serverOutput, Encoding? encoding, string endpointName, ILoggerFactory? loggerFactory)
public StreamClientSessionTransport(Stream serverInput, Stream serverOutput, Encoding? encoding, string endpointName, ILoggerFactory? loggerFactory, bool startReading = true)
: base(endpointName, loggerFactory)
{
Throw.IfNull(serverInput);
Expand All @@ -55,6 +56,15 @@ public StreamClientSessionTransport(Stream serverInput, Stream serverOutput, Enc

SetConnected();

if (startReading)
{
StartReading();
}
}

/// <summary>Starts reading after state used by overridden cleanup methods has been initialized.</summary>
protected void StartReading()
{
// Start reading messages in the background. We use the rarer pattern of new Task + Start
// in order to ensure that the body of the task will always see _readTask initialized.
// It is then able to reliably null it out on completion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="JsonSchema.Net" />
</ItemGroup>

<!-- Reference analyzers -->
Expand Down
Loading