mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-10-25 08:00:12 +00:00
* feat(kimi-code): add China/International region selection for OAuth login - Add region profiles (cn/overseas) and resolver in @moonshot-ai/kimi-code-oauth: env override → persisted login host → install-channel marker → default cn - /login now offers Kimi Code (China) / Kimi Code (International); the CLI login entries (kimi login, kimi acp --login) accept --region cn|overseas - Update/plugin/site/telemetry endpoints derive from the selected region; plugin trust list covers both .com and .ai hosts - kap-server: POST /oauth/login accepts an optional region; new GET /oauth/region * fix(oauth): keep an explicit default-slot login ahead of the install marker A China login persists no oauthHost (the default credential slot carries no host trace), so after switching back from International the resolver fell through to a stale overseas install marker. Treat a persisted default-slot oauth ref (key === oauth/kimi-code) as an explicit-cn signal that outranks the marker; getRegion() on the v2 side mirrors it. * fix(agent-core-v2): thread the default-slot key through capability region resolution Capability installs resolved the region from the persisted oauthHost only, so an explicit China login (which persists no host) lost to a stale overseas install marker. Pass the oauth ref key through as well, matching getRegion(). Also move the region contract notes into the auth.ts file header per the package comment convention. * fix(agent-core-v2): honor the region-marker opt-out for the telemetry endpoint Hosts that set KIMI_CODE_REGION_MARKER=off (the desktop embedded server) skip the install marker in getRegion(), but the default telemetry endpoint still consulted it, so a stale overseas marker could split the reported region from the telemetry destination. * feat(cli): show region site domains in login platform selector * chore: reword oauth login changesets * fix: honor the region marker opt-out in the CLI and capability resolvers * refactor: rename login region values to mainland-cn and global * fix: keep the --region help text in English * fix: simplify the --region help text to site domains * feat: drop the suggested login platform order * feat: split a browser-safe region profile table out of the region resolver * Revert "feat: split a browser-safe region profile table out of the region resolver" This reverts commit a037b1143eeb8adcbb349264b5bd940f3ef9c0b3. * fix: read the install marker from the bootstrapped home directory * fix: resolve the server plugin marketplace from the active login region * feat: expose the login region option through the klient auth facade * fix: drop a comment from the v2 auth region test * fix: keep scoped base-only logins on their environment for a bare login * fix: invalidate the region cache on the provider-manager logout path * fix: route client-config fetches through the active region profile * fix: resolve the telemetry endpoint per flush so a login region switch applies in-process * test: expect the telemetry endpoint resolver in the CLI init assertions * fix: resolve the default telemetry endpoint from the bootstrapped home * chore: reword the oauth login changeset around the two login methods * chore: trim the oauth login changeset to the headline * feat: let hosts override the region marker env through the server bootstrap env bag |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||