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

Function hasUsableVoiceSession

src/voice/voiceSession.ts:12–20  ·  view source on GitHub ↗
(session: VoiceSession)

Source from the content-addressed store, hash-verified

10 | undefined
11
12export function hasUsableVoiceSession(session: VoiceSession): boolean {
13 return Boolean(
14 session &&
15 session.providerPlan.mode === 'noumena_managed' &&
16 session.headersKind === 'bearer' &&
17 session.scopes.includes('user:inference') &&
18 session.accessToken,
19 )
20}
21
22export function getCurrentVoiceSession(): ResolvedAuthSession | null {
23 const session = getAuthRuntime().getCurrentSession()

Callers 3

connectVoiceStreamFunction · 0.85
getCurrentVoiceSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected