File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import type { NextRequest } from 'next/server'
21import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
32import {
43 copilotMcpDeprecatedJsonRpcResponse ,
@@ -9,9 +8,6 @@ export const dynamic = 'force-dynamic'
98
109export const GET = withRouteHandler ( async ( ) => copilotMcpDeprecatedResponse ( ) )
1110
12- export const POST = withRouteHandler ( async ( request : NextRequest ) => {
13- void request
14- return copilotMcpDeprecatedJsonRpcResponse ( )
15- } )
11+ export const POST = withRouteHandler ( async ( ) => copilotMcpDeprecatedJsonRpcResponse ( ) )
1612
1713export const DELETE = withRouteHandler ( async ( ) => copilotMcpDeprecatedJsonRpcResponse ( ) )
Original file line number Diff line number Diff line change 1- import type { RequestId } from '@modelcontextprotocol/sdk/types.js'
21import { NextResponse } from 'next/server'
32
43const DEPRECATION_MESSAGE = 'Copilot MCP has been deprecated and is no longer available.'
@@ -21,12 +20,12 @@ export function copilotMcpDeprecatedResponse(): NextResponse {
2120 * JSON-RPC flavored 410 response for the deprecated Copilot MCP `POST` endpoint,
2221 * so MCP clients surface a clean error envelope instead of an opaque body.
2322 */
24- export function copilotMcpDeprecatedJsonRpcResponse ( id : RequestId = 0 ) : NextResponse {
23+ export function copilotMcpDeprecatedJsonRpcResponse ( ) : NextResponse {
2524 return NextResponse . json (
2625 {
2726 jsonrpc : '2.0' ,
28- id,
29- error : { code : - 32601 , message : DEPRECATION_MESSAGE } ,
27+ id : null ,
28+ error : { code : - 32000 , message : DEPRECATION_MESSAGE } ,
3029 } ,
3130 {
3231 status : 410 ,
You can’t perform that action at this time.
0 commit comments