Serve input_required handlers on 2025-era connections via a legacy fulfilment shim (#2381)

This commit is contained in:
Felix Weinberger 2026-06-29 16:43:43 +01:00 • committed by GitHub
commit f0bf785239
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,7 +145,8 @@ function buildServer(reqCtx: McpRequestContext): McpServer {
// for integrity-protecting `requestState` in production.
const dates = acceptedContent<{ departure: string; nights: number }>(ctx.mcpReq.inputResponses, 'dates');
const destination =
ctx.mcpReq.requestState ?? acceptedContent<{ destination: string }>(ctx.mcpReq.inputResponses, 'dest')?.destination;
ctx.mcpReq.requestState<string>() ??
acceptedContent<{ destination: string }>(ctx.mcpReq.inputResponses, 'dest')?.destination;
if (!destination) {
return inputRequired({ inputRequests: { dest: inputRequired.elicit({ message: 'Where to?', requestedSchema: DEST }) } });
}