(request: Request)
| 87 | // selector but keeps the toolkit segment), so a session minted on a toolkit path |
| 88 | // scopes its tool catalog to that toolkit. |
| 89 | const resourceFromPath = (request: Request): McpResource => { |
| 90 | const segments = new URL(request.url).pathname.split("/").filter((s) => s.length > 0); |
| 91 | if (segments.length === 3 && segments[0] === "mcp" && segments[1] === "toolkits" && segments[2]) { |
| 92 | return { kind: "toolkit", slug: segments[2] }; |
| 93 | } |
| 94 | return defaultMcpResource; |
| 95 | }; |
| 96 | |
| 97 | const propsForPrincipal = ( |
| 98 | request: Request, |
no outgoing calls
no test coverage detected