(lookup: "not-found" | "forbidden")
| 208 | |
| 209 | /** Render a non-`Response` {@link McpDispatchResult} discriminant. */ |
| 210 | const renderDispatchError = (lookup: "not-found" | "forbidden"): Response => |
| 211 | lookup === "not-found" |
| 212 | ? jsonRpcResponse(404, -32001, "Session not found") |
| 213 | : jsonRpcResponse(403, -32003, "MCP session does not belong to the current bearer"); |
| 214 | |
| 215 | /** Dispatch an MCP request through authenticate -> store.dispatch -> transport. */ |
| 216 | const mcpDispatch = (resource: McpResource) => |
no test coverage detected