php-sdk/src/Schema/Enum/CacheScope.php
Christopher Hertel ef0c1c2808
[Server][Tests] Complete the multi round-trip request flow (SEP-2322) (#446)
The revision has no way for a server to put a request on a response stream,
so a handler that needs input from the user says so in its result instead: a
handler returning InputRequiredResult comes back as
resultType: "input_required" with the asks and an opaque requestState, and
the client retries the same request carrying inputResponses.

RequestContext::getInputContext() is what the handler reads them through.
RequestStateCodec signs and time-bounds the state, so a tampered or expired
one is refused rather than trusted - the state travels through the client,
which is not a place to keep something the server later believes.
2026-08-18 22:45:35 +02:00

30 lines
871 B
PHP

<?php
/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mcp\Schema\Enum;
/**
* How widely a cacheable result may be reused (SEP-2549).
*
* A security boundary, not a performance knob: `public` lets shared caches
* serve the result to other authorization contexts, so anything shaped by who
* asked must stay private — which is why private is the default throughout.
*
* @author Christopher Hertel <mail@christopher-hertel.de>
*/
enum CacheScope: string
{
/** Contains no caller-specific data; any cache may share it. */
case Public = 'public';
/** Reusable only within the same authorization context. */
case Private = 'private';
}