MCPcopy Create free account
hub / github.com/Noumena-Network/code / getEmailAsync

Function getEmailAsync

src/utils/user.ts:166–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166async 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`.

Callers 1

initUserFunction · 0.85

Calls 1

Tested by

no test coverage detected