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

Function harnessIsAuthed

packages/acp-adapter/src/server.ts:113–116  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

111 * set counts as authed.
112 */
113async 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`

Callers 3

newSessionMethod · 0.85
authenticateMethod · 0.85

Calls 1

statusMethod · 0.65

Tested by

no test coverage detected