()
| 205 | // call gives each request its own request-scoped socket. `CoreSharedServices` |
| 206 | // (WorkOS, no per-request socket) stays shared. |
| 207 | const makeMcpOrganizationAuthServices = () => { |
| 208 | const dbLive = makeDbLayer(); |
| 209 | const userStoreLive = makeUserStoreLayer().pipe(Layer.provide(dbLive)); |
| 210 | return Layer.mergeAll(dbLive, userStoreLive, CoreSharedServices); |
| 211 | }; |
| 212 | |
| 213 | // A URL slug resolves through the mirror to its org id before the membership |
| 214 | // check; an unknown slug authorizes nothing. Ids pass straight through — |
no test coverage detected