(request: Request)
| 112 | // selector but keeps the toolkit segment), so a session minted on a toolkit path |
| 113 | // scopes its tool catalog to that toolkit. |
| 114 | const resourceFromPath = (request: Request): McpResource => { |
| 115 | const segments = new URL(request.url).pathname.split("/").filter((s) => s.length > 0); |
| 116 | if (segments.length === 3 && segments[0] === "mcp" && segments[1] === "toolkits" && segments[2]) { |
| 117 | return { kind: "toolkit", slug: segments[2] }; |
| 118 | } |
| 119 | return defaultMcpResource; |
| 120 | }; |
| 121 | |
| 122 | const propsForPrincipal = ( |
| 123 | request: Request, |
no outgoing calls
no test coverage detected