(lookup: "not-found" | "forbidden")
| 170 | |
| 171 | /** Render a non-`Response` {@link McpDispatchResult} discriminant. */ |
| 172 | const renderDispatchError = (lookup: "not-found" | "forbidden"): Response => |
| 173 | lookup === "not-found" |
| 174 | ? jsonRpcResponse(404, -32001, "Session not found") |
| 175 | : jsonRpcResponse(403, -32003, "MCP session does not belong to the current bearer"); |
| 176 | |
| 177 | /** Dispatch an MCP request through authenticate -> store.dispatch -> transport. */ |
| 178 | const mcpDispatch = (resource: McpResource) => |
no test coverage detected