()
| 164 | } |
| 165 | |
| 166 | async function getEmailAsync(): Promise<string | undefined> { |
| 167 | // Only include OAuth email when actively using OAuth authentication |
| 168 | const analyticsSession = getCurrentAnalyticsSession() |
| 169 | if (analyticsSession?.identity.email) { |
| 170 | return analyticsSession.identity.email |
| 171 | } |
| 172 | |
| 173 | // Ant-only fallbacks below |
| 174 | if ((process.env.NCODE_BUILD_MODE !== 'noumena' && process.env.USER_TYPE !== 'ant')) { |
| 175 | return undefined |
| 176 | } |
| 177 | |
| 178 | if (process.env.COO_CREATOR) { |
| 179 | return `${process.env.COO_CREATOR}@anthropic.com` |
| 180 | } |
| 181 | |
| 182 | return getGitEmail() |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Get the user's git email from `git config user.email`. |
no test coverage detected