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

Function makeSession

src/auth/runtime/continuity.test.ts:6–53  ·  view source on GitHub ↗
(
  overrides: Partial<ResolvedAuthSession> = {},
)

Source from the content-addressed store, hash-verified

4import type { ResolvedAuthSession } from './types.js'
5
6function makeSession(
7 overrides: Partial<ResolvedAuthSession> = {},
8): ResolvedAuthSession {
9 return {
10 principalKind: 'noumena_account',
11 principalSource: 'managed_oauth',
12 sessionState: 'usable',
13 headersKind: 'bearer',
14 providerAuthKind: 'noumena_first_party',
15 providerPlan: {
16 mode: 'noumena_managed',
17 source: 'managed_principal',
18 staticKeyEnvVarName: null,
19 },
20 isInteractive: true,
21 canRefresh: true,
22 canReauthenticateInteractively: true,
23 identity: {
24 email: 'dev@noumena.com',
25 accountUuid: 'acct-1',
26 organizationUuid: 'org-1',
27 organizationName: 'Acme',
28 },
29 subscription: {
30 subscriptionName: 'Noumena Pro',
31 subscriptionType: 'pro',
32 rateLimitTier: 'tier-1',
33 },
34 scopes: ['user:profile', 'user:inference'],
35 hasUsableToken: true,
36 hasUsableApiKey: false,
37 accessToken: 'token',
38 accessTokenExpiresAt: Date.now() + 60 * 60 * 1000,
39 refreshTokenPresent: true,
40 apiKey: null,
41 rawAuthTokenSource: 'noumena.com',
42 rawApiKeySource: null,
43 recoveryAction: 'none',
44 recoveryMessage: null,
45 sourceDetails: {
46 usedLegacyCompat: false,
47 usedEnvVar: false,
48 usedFileDescriptor: false,
49 usedHelper: false,
50 },
51 ...overrides,
52 }
53}
54
55function makeLease(
56 overrides: Partial<IssuedRuntimeLease> = {},

Callers 1

continuity.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected