Commit 7c8a913
authored
fix(cli-precheck): probe ~/.kimi/credentials/kimi-code.json for moonshot auth (#109)
The native Kimi Code build (code.kimi.com — the one #98/#99 taught
detection about) never writes ~/.kimi/auth.json. It stores its OAuth
tokens in ~/.kimi/credentials/kimi-code.json, so the cred gate reported
auth_missing for a user who had just logged in successfully, and the
voice was blocked before it ever spawned.
Additive: the existing auth.json + opencode candidates are unchanged,
so the kimi-via-opencode transport is unaffected. The same candidate
list backs getMostRecentCredMtime, so this also restores auto-heal
after a re-login for kimi (a sticky auth_invalid had no mtime to
compare against before).
Reproduced locally: a logged-in kimi install has
~/.kimi/credentials/kimi-code.json (OAuth access_token + refresh_token)
and no ~/.kimi/auth.json at all.
Reported by @Ikkimel in the #107 thread.
Co-authored-by: chorus-codes <280607145+chorus-codes@users.noreply.github.com>1 parent f34e435 commit 7c8a913
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
285 | 299 | | |
286 | 300 | | |
287 | 301 | | |
| |||
0 commit comments