(private readonly options: KimiAuthFacadeOptions)
| 100 | private readonly toolkit: KimiOAuthToolkit<SDKManagedConfig>; |
| 101 | |
| 102 | constructor(private readonly options: KimiAuthFacadeOptions) { |
| 103 | this.toolkit = new KimiOAuthToolkit<SDKManagedConfig>({ |
| 104 | homeDir: options.homeDir, |
| 105 | identity: options.identity, |
| 106 | onRefresh: options.onRefresh, |
| 107 | configAdapter: { |
| 108 | configPath: options.configPath, |
| 109 | // Write-path base read: strict (a salvaged base would drop the user's |
| 110 | // broken-but-fixable sections on rewrite) with an actionable message. |
| 111 | read: () => readConfigFileForUpdate(options.configPath) as SDKManagedConfig, |
| 112 | write: async (config) => { |
| 113 | await writeConfigFile(options.configPath, config); |
| 114 | }, |
| 115 | apply: applyManagedKimiCodeConfig, |
| 116 | remove: applyManagedKimiCodeLogoutConfig, |
| 117 | }, |
| 118 | }); |
| 119 | } |
| 120 | |
| 121 | async status(providerName?: string | undefined): Promise<AuthStatus> { |
| 122 | return this.toolkit.status(providerName, this.resolveRuntimeManagedAuth(providerName).oauthRef); |
nothing calls this directly
no test coverage detected