* Inline auth gate — moved out of `KimiAuthFacade.hasUsableToken()` so * the SDK doesn't have to carry an ACP-specific convenience method. * Mirrors the original semantics exactly: any provider with `hasToken` * set counts as authed.
(harness: KimiHarness)
| 111 | * set counts as authed. |
| 112 | */ |
| 113 | async function harnessIsAuthed(harness: KimiHarness): Promise<boolean> { |
| 114 | const status = await harness.auth.status(); |
| 115 | return status.providers.some((entry) => entry.hasToken === true); |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Agent-side ACP handler. Routes `initialize` + `session/new` + `session/cancel` |
no test coverage detected