chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
|
||||
import { copilotMcpDeprecatedResponse } from '@/lib/mcp/copilot-deprecated'
|
||||
|
||||
export const GET = withRouteHandler(async () => copilotMcpDeprecatedResponse())
|
||||
@@ -0,0 +1,4 @@
|
||||
import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
|
||||
import { copilotMcpDeprecatedResponse } from '@/lib/mcp/copilot-deprecated'
|
||||
|
||||
export const GET = withRouteHandler(async () => copilotMcpDeprecatedResponse())
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Tests for the deprecated Copilot MCP route
|
||||
*
|
||||
* @vitest-environment node
|
||||
*/
|
||||
import { NextRequest } from 'next/server'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { GET as authServerDiscoveryGET } from '@/app/api/mcp/copilot/.well-known/oauth-authorization-server/route'
|
||||
import { GET as protectedResourceDiscoveryGET } from '@/app/api/mcp/copilot/.well-known/oauth-protected-resource/route'
|
||||
import { DELETE, GET, POST } from '@/app/api/mcp/copilot/route'
|
||||
|
||||
const URL = 'http://localhost:3000/api/mcp/copilot'
|
||||
|
||||
describe('Deprecated Copilot MCP route', () => {
|
||||
it('GET returns 410', async () => {
|
||||
const response = await GET(new NextRequest(URL))
|
||||
expect(response.status).toBe(410)
|
||||
})
|
||||
|
||||
it('POST returns 410 with a JSON-RPC error envelope', async () => {
|
||||
const request = new NextRequest(URL, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'initialize' }),
|
||||
})
|
||||
const response = await POST(request)
|
||||
expect(response.status).toBe(410)
|
||||
|
||||
const body = (await response.json()) as { jsonrpc?: string; error?: { message?: string } }
|
||||
expect(body.jsonrpc).toBe('2.0')
|
||||
expect(body.error?.message).toContain('deprecated')
|
||||
})
|
||||
|
||||
it('POST still returns 410 when an x-api-key header is present', async () => {
|
||||
const request = new NextRequest(URL, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', 'x-api-key': 'sk-sim-copilot-test' },
|
||||
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' }),
|
||||
})
|
||||
const response = await POST(request)
|
||||
expect(response.status).toBe(410)
|
||||
})
|
||||
|
||||
it('DELETE returns 410', async () => {
|
||||
const response = await DELETE(new NextRequest(URL, { method: 'DELETE' }))
|
||||
expect(response.status).toBe(410)
|
||||
})
|
||||
|
||||
it('copilot OAuth authorization-server discovery returns 410', async () => {
|
||||
const response = await authServerDiscoveryGET(
|
||||
new NextRequest(`${URL}/.well-known/oauth-authorization-server`)
|
||||
)
|
||||
expect(response.status).toBe(410)
|
||||
})
|
||||
|
||||
it('copilot OAuth protected-resource discovery returns 410', async () => {
|
||||
const response = await protectedResourceDiscoveryGET(
|
||||
new NextRequest(`${URL}/.well-known/oauth-protected-resource`)
|
||||
)
|
||||
expect(response.status).toBe(410)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
|
||||
import {
|
||||
copilotMcpDeprecatedJsonRpcResponse,
|
||||
copilotMcpDeprecatedResponse,
|
||||
} from '@/lib/mcp/copilot-deprecated'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export const GET = withRouteHandler(async () => copilotMcpDeprecatedResponse())
|
||||
|
||||
export const POST = withRouteHandler(async () => copilotMcpDeprecatedJsonRpcResponse())
|
||||
|
||||
export const DELETE = withRouteHandler(async () => copilotMcpDeprecatedJsonRpcResponse())
|
||||
Reference in New Issue
Block a user