refactor: susun semula struktur folder — Laravel source ke src/
This commit is contained in:
47
vendor/laravel/mcp/src/Events/SessionInitialized.php
vendored
Normal file
47
vendor/laravel/mcp/src/Events/SessionInitialized.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Events;
|
||||
|
||||
class SessionInitialized
|
||||
{
|
||||
/**
|
||||
* @param array{name?: string, title?: string, version?: string}|null $clientInfo
|
||||
* @param array<string, mixed>|null $clientCapabilities
|
||||
*
|
||||
* @see https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#initialization
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly string $sessionId,
|
||||
public readonly ?array $clientInfo,
|
||||
public readonly ?string $protocolVersion,
|
||||
public readonly ?array $clientCapabilities,
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client name from clientInfo, if available.
|
||||
*/
|
||||
public function clientName(): ?string
|
||||
{
|
||||
return $this->clientInfo['name'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client title from clientInfo, if available.
|
||||
*/
|
||||
public function clientTitle(): ?string
|
||||
{
|
||||
return $this->clientInfo['title'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client version from clientInfo, if available.
|
||||
*/
|
||||
public function clientVersion(): ?string
|
||||
{
|
||||
return $this->clientInfo['version'] ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user