| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | namespace Nexus\Mcp\Server; |
| 15: | |
| 16: | use Amp\Cancellation; |
| 17: | use Nexus\Mcp\Core\Handler\AbstractContext; |
| 18: | use Nexus\Mcp\Core\Handler\SenderInterface; |
| 19: | use Nexus\Mcp\Core\Schema\MetaObject\RequestMetaObject; |
| 20: | use Nexus\Mcp\Core\Schema\RequestId; |
| 21: | use Nexus\Mcp\Core\Schema\Result\InputResponse; |
| 22: | use Nexus\Mcp\Core\Transport\ReceiveContext; |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | final readonly class ServerContext extends AbstractContext |
| 28: | { |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | public function __construct( |
| 34: | RequestId $requestId, |
| 35: | Cancellation $cancellation, |
| 36: | public RequestMetaObject $meta, |
| 37: | SenderInterface $sender, |
| 38: | public ReceiveContext $receiveContext = new ReceiveContext(), |
| 39: | public ?array $inputResponses = null, |
| 40: | public ?string $requestState = null, |
| 41: | ) { |
| 42: | parent::__construct($requestId, $cancellation, $meta->progressToken, $sender); |
| 43: | } |
| 44: | } |
| 45: | |