(
token: McpSessionInit,
organization: { readonly name: string; readonly slug?: string },
)
| 110 | isUserStoreError(failure) ? failure.reason : "upstream"; |
| 111 | |
| 112 | const metaFromIdentity = ( |
| 113 | token: McpSessionInit, |
| 114 | organization: { readonly name: string; readonly slug?: string }, |
| 115 | ): SessionMeta => ({ |
| 116 | organizationId: token.organizationId, |
| 117 | organizationName: organization.name, |
| 118 | ...(organization.slug === undefined ? {} : { organizationSlug: organization.slug }), |
| 119 | userId: token.userId, |
| 120 | resource: token.resource, |
| 121 | elicitationMode: token.elicitationMode, |
| 122 | artifactsEnabled: token.artifactsEnabled, |
| 123 | searchToolsEnabled: token.searchToolsEnabled, |
| 124 | }); |
| 125 | |
| 126 | /** |
| 127 | * Read the organization row, retrying only failures a retry can clear, and |
no outgoing calls
no test coverage detected