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