1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Server\Transport\Http;
15:
16: /**
17: * How the Streamable HTTP transport answers a POST that dispatches to a handler.
18: */
19: enum ResponseMode
20: {
21: /**
22: * Always buffer the final response into a single JSON object. Progress notifications are dropped.
23: */
24: case Json;
25:
26: /**
27: * Always answer with a request-scoped SSE stream carrying progress notifications and the final response.
28: */
29: case Sse;
30:
31: /**
32: * Buffer a JSON response, upgrading to an SSE stream the moment a progress notification arrives mid-call.
33: */
34: case Auto;
35: }
36: