MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / constructor

Method constructor

packages/oauth/src/toolkit.ts:117–133  ·  view source on GitHub ↗
(options: KimiOAuthToolkitOptions<TConfig>)

Source from the content-addressed store, hash-verified

115 private _identityHeaders: Record<string, string> | undefined;
116
117 constructor(options: KimiOAuthToolkitOptions<TConfig>) {
118 this.identity =
119 options.identity === undefined ? undefined : assertKimiHostIdentity(options.identity);
120 this.homeDir = options.homeDir ?? defaultKimiHome();
121 const credentialsDir = options.credentialsDir ?? join(this.homeDir, 'credentials');
122 this.storage = options.storage ?? new FileTokenStorage(credentialsDir);
123 this.flowConfig = options.flowConfig ?? KIMI_CODE_FLOW_CONFIG;
124 this.configAdapter = options.configAdapter;
125 this.fetchImpl = options.fetchImpl;
126 this.managerOptions = {
127 now: options.now,
128 sleep: options.sleep,
129 deviceCodeTimeoutMs: options.deviceCodeTimeoutMs,
130 refreshThreshold: options.refreshThreshold,
131 onRefresh: options.onRefresh,
132 };
133 }
134
135 async status(
136 providerName?: string | undefined,

Callers

nothing calls this directly

Calls 2

assertKimiHostIdentityFunction · 0.90
defaultKimiHomeFunction · 0.85

Tested by

no test coverage detected