refactor: susun semula struktur folder — Laravel source ke src/
This commit is contained in:
10
vendor/laravel/mcp/src/Server/Contracts/Annotation.php
vendored
Normal file
10
vendor/laravel/mcp/src/Server/Contracts/Annotation.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
interface Annotation
|
||||
{
|
||||
public function key(): string;
|
||||
}
|
||||
15
vendor/laravel/mcp/src/Server/Contracts/Completable.php
vendored
Normal file
15
vendor/laravel/mcp/src/Server/Contracts/Completable.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
use Laravel\Mcp\Server\Completions\CompletionResponse;
|
||||
|
||||
interface Completable
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $context
|
||||
*/
|
||||
public function complete(string $argument, string $value, array $context): CompletionResponse;
|
||||
}
|
||||
39
vendor/laravel/mcp/src/Server/Contracts/Content.php
vendored
Normal file
39
vendor/laravel/mcp/src/Server/Contracts/Content.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
use Illuminate\Contracts\Support\Arrayable;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
use Laravel\Mcp\Server\Resource;
|
||||
use Laravel\Mcp\Server\Tool;
|
||||
use Stringable;
|
||||
|
||||
/**
|
||||
* @extends Arrayable<string, mixed>
|
||||
*/
|
||||
interface Content extends Arrayable, Stringable
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toTool(Tool $tool): array;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toPrompt(Prompt $prompt): array;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toResource(Resource $resource): array;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed>|string $meta
|
||||
*/
|
||||
public function setMeta(array|string $meta, mixed $value = null): void;
|
||||
|
||||
public function __toString(): string;
|
||||
}
|
||||
10
vendor/laravel/mcp/src/Server/Contracts/Errable.php
vendored
Normal file
10
vendor/laravel/mcp/src/Server/Contracts/Errable.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
interface Errable
|
||||
{
|
||||
//
|
||||
}
|
||||
15
vendor/laravel/mcp/src/Server/Contracts/HasUriTemplate.php
vendored
Normal file
15
vendor/laravel/mcp/src/Server/Contracts/HasUriTemplate.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
use Laravel\Mcp\Support\UriTemplate;
|
||||
|
||||
interface HasUriTemplate
|
||||
{
|
||||
/**
|
||||
* Get the URI pattern for the resource template.
|
||||
*/
|
||||
public function uriTemplate(): UriTemplate;
|
||||
}
|
||||
20
vendor/laravel/mcp/src/Server/Contracts/Method.php
vendored
Normal file
20
vendor/laravel/mcp/src/Server/Contracts/Method.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
use Laravel\Mcp\Server\Exceptions\JsonRpcException;
|
||||
use Laravel\Mcp\Server\ServerContext;
|
||||
use Laravel\Mcp\Server\Transport\JsonRpcRequest;
|
||||
use Laravel\Mcp\Server\Transport\JsonRpcResponse;
|
||||
|
||||
interface Method
|
||||
{
|
||||
/**
|
||||
* @return iterable<JsonRpcResponse>|JsonRpcResponse
|
||||
*
|
||||
* @throws JsonRpcException
|
||||
*/
|
||||
public function handle(JsonRpcRequest $request, ServerContext $context): iterable|JsonRpcResponse;
|
||||
}
|
||||
20
vendor/laravel/mcp/src/Server/Contracts/Transport.php
vendored
Normal file
20
vendor/laravel/mcp/src/Server/Contracts/Transport.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laravel\Mcp\Server\Contracts;
|
||||
|
||||
use Closure;
|
||||
|
||||
interface Transport
|
||||
{
|
||||
public function onReceive(Closure $handler): void;
|
||||
|
||||
public function run(); // @phpstan-ignore-line
|
||||
|
||||
public function send(string $message, ?string $sessionId = null): void;
|
||||
|
||||
public function sessionId(): ?string;
|
||||
|
||||
public function stream(Closure $stream): void;
|
||||
}
|
||||
Reference in New Issue
Block a user