Showing the changes to apps/cloud/src (2 of 26 files). Show all
Unified · Split
| @@ -69,6 +69,8 @@ declare global { · 68 unmodified lines | |||
| 69 | MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS?: string; | 69 | MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS?: string; |
| 70 | /** HMAC key for MCP 2026-07-28 continuation state (32+ byte secret). */ | 70 | /** HMAC key for MCP 2026-07-28 continuation state (32+ byte secret). */ |
| 71 | MCP_REQUEST_STATE_KEY?: string; | 71 | MCP_REQUEST_STATE_KEY?: string; |
| 72 | /** Emergency rollback for inbound MCP 2026-07-28 traffic only. */ | ||
| 73 | MCP_2026_07_28_ENABLED?: string; | ||
| 72 | NODE_ENV?: string; | 74 | NODE_ENV?: string; |
| 73 | 75 | ||
| 74 | // Shared with frontend | 76 | // Shared with frontend |
| @@ -4,6 +4,7 @@ import { Effect, Predicate } from "effect"; · 3 unmodified lines | |||
| 4 | import { | 4 | import { |
| 5 | McpAuthProvider, | 5 | McpAuthProvider, |
| 6 | jsonRpcErrorBody, | 6 | jsonRpcErrorBody, |
| 7 | mcpModernDisabledResponse, | ||
| 7 | defaultMcpResource, | 8 | defaultMcpResource, |
| 8 | UNAVAILABLE_RETRY_AFTER_SECONDS, | 9 | UNAVAILABLE_RETRY_AFTER_SECONDS, |
| 9 | type AuthOutcome, | 10 | type AuthOutcome, |
| @@ -174,6 +175,9 @@ export const makeCloudMcpAgentHandler = () => { · 164 unmodified lines | |||
| 174 | const parsedBody = await Effect.runPromise(requestBodyFromRequest(request)); | 175 | const parsedBody = await Effect.runPromise(requestBodyFromRequest(request)); |
| 175 | const era = await classifyMcpProtocolEra(request, parsedBody); | 176 | const era = await classifyMcpProtocolEra(request, parsedBody); |
| 176 | if (era === "modern") { | 177 | if (era === "modern") { |
| 178 | if (env.MCP_2026_07_28_ENABLED === "false") { | ||
| 179 | return mcpModernDisabledResponse(); | ||
| 180 | } | ||
| 177 | const resource = resourceFromPath(request); | 181 | const resource = resourceFromPath(request); |
| 178 | const props = await runTraced( | 182 | const props = await runTraced( |
| 179 | request, | 183 | request, |