| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | /** |
| 6: | * This file is part of the Nexus MCP SDK package. |
| 7: | * |
| 8: | * (c) 2025 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\Schema\Message; |
| 15: | |
| 16: | use Nexus\Mcp\Schema\Arrayable; |
| 17: | |
| 18: | /** |
| 19: | * Interface marker that refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent. |
| 20: | * |
| 21: | * @template TArray of array<string, mixed> |
| 22: | * @template TJson of array<string, mixed> |
| 23: | * |
| 24: | * @extends Arrayable<TArray> |
| 25: | */ |
| 26: | interface JsonRpcMessage extends \JsonSerializable, Arrayable |
| 27: | { |
| 28: | public const string JSON_RPC_VERSION = '2.0'; |
| 29: | |
| 30: | /** |
| 31: | * @return TJson |
| 32: | */ |
| 33: | #[\Override] |
| 34: | public function jsonSerialize(): array; |
| 35: | } |
| 36: |