fix(cli): detect newer layout for bun global installs to avoid error message of unsupported package manager or layout #2291
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.47) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 308 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.343
Real PR Conversation Timeline
1 comments
"Review active on #2291"
general
weight: 0.35
bowenliang123
Related Issue
Discovered while investigating a user report that starting the TUI shows "Detected install source: unsupported package manager or layout" for a bun global installation.
Problem
With installed
kimicli viabunwith newer bun 1.3.x+ layout, thekimiorkimi updatethrows warning messages for "Detected install source: unsupported package manager or layout" .Recent versions of bun install global packages under
~/.bun/node_modules/<pkg>and create a shim in~/.bun/bin/. Kimi Code's install-source detection only recognized the older~/.bun/install/global/node_modules/<pkg>layout, so bun global installs were misclassified asunsupported. This caused:Detected install source: unsupported package manager or layout.kimi upgradefalling back to a manual npm command instead of usingbun add -g.Both layouts are valid bun global installs and expose the CLI through
~/.bun/bin/:What changed
apps/kimi-code/src/cli/update/source.tsso the bun heuristic matches both the legacy.bun/install/global/path and the current.bun/node_modules/path.apps/kimi-code/test/cli/update/source.test.tscovering the real-world~/.bun/node_modules/@moonshot-ai/kimi-codelayout.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.