(providerName?: string | undefined)
| 279 | }; |
| 280 | |
| 281 | private resolveManagedAuth(providerName?: string | undefined): { |
| 282 | readonly oauthRef?: OAuthRef | undefined; |
| 283 | readonly baseUrl?: string | undefined; |
| 284 | } { |
| 285 | const name = providerName ?? KIMI_CODE_PROVIDER_NAME; |
| 286 | // Read path: token/status resolution must work off a degraded config |
| 287 | // instead of failing the session when an unrelated section is broken. |
| 288 | // Write paths (the toolkit's configAdapter.read) stay strict. |
| 289 | const config = loadRuntimeConfigSafe(this.options.configPath).config; |
| 290 | const provider = config.providers[name]; |
| 291 | return { |
| 292 | oauthRef: provider?.oauth, |
| 293 | baseUrl: provider?.baseUrl, |
| 294 | }; |
| 295 | } |
| 296 | |
| 297 | private resolveRuntimeManagedAuth(providerName?: string | undefined): { |
| 298 | readonly oauthRef: OAuthRef; |
no test coverage detected