Repository navigation
Add Kimi Code's default install path to managed-agent binary discovery - #5997
Conversation
Buzz Desktop fails to detect a freshly-installed Kimi Code CLI even though `kimi --version` works in the terminal. Kimi's installer places the binary at ~/.kimi-code/bin and appends its PATH export only to ~/.zshrc, which the login-shell discovery probe (zsh -l, non-interactive) never sources. Add the directory to the static fallback list, matching the existing entries for volta/asdf/bun. Signed-off-by: Shawn Hank <shawn@shawnhank.com>
themiguelamador
left a comment
There was a problem hiding this comment.
Verified against Kimi Code's current official installer: KIMI_INSTALL_DIR defaults to $HOME/.kimi-code, and the script installs the executable at $HOME/.kimi-code/bin/kimi. The fallback is also ordered correctly after PATH and login-shell discovery, so it does not override a user-selected installation.
The patch is clean and the focused Tauri managed-path test passes after staging the repository's required sidecar stubs. No correctness or minor issues found.
|
checks were not triggered. closing & reopening to trigger the checks for this PR. |
🔐 Codex Security Review
|
…i-port * origin/main: fix(agents): stop built-in prompts from teaching sleep polling (#7992) feat(relay): add direct staff ban/timeout/delete with staff guard (#7883) fix(ci): gate security review on repo write access (#7986) feat(acp): wrap workers at the subprocess launch boundary (#7985) feat(buzz-relay): idempotent owner community deletion with quota reservation (#7969) feat(mobile): show contextual names in lists, Search and Pulse (#7896) Add Kimi Code's default install path to managed-agent binary discovery (#5997) Co-authored-by: Will Pfleger <wpfleger@block.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Summary
Buzz Desktop fails to detect a freshly-installed Kimi Code CLI, even though
kimi --versionworks fine in the terminal. Root cause is in binary discovery, not in Kimi's install.Problem
After running Kimi Code's installer, Buzz Desktop's harness list doesn't pick up the
kimibinary — it stays undetected until the user manually sources their shell config.Repro
curl ... code.kimi.com/kimi-code/install.sh | bash— installs to~/.kimi-code/bin, and the installer appends a PATH export only to~/.zshrc.source ~/.zshrc.kimi, even though it's on disk and executable.Root cause
find_via_login_shell()indesktop/src-tauri/src/managed_agents/discovery.rsresolves binaries by spawningzsh -l -c 'command -v <bin>'. A login shell sources~/.zprofile/~/.zshenv, but zsh only sources~/.zshrcfor interactive shells — so a PATH export that lives only in~/.zshrc(which is where Kimi's installer puts it) is invisible to this probe.~/.kimi-code/binis also absent from the static fallback list incommon_binary_paths().This is the same root-cause class already handled for
nvmin this file (see thefind_nvm_default_bincomment) — Kimi just doesn't have an equivalent fallback yet.Fix
Add
~/.kimi-code/binto the Unix branch ofcommon_binary_paths(), alongside the existing.volta/bin/.bun/bin/.asdf/shimsentries.Scope note
This PR only fixes detection (finding the binary). It does not address that Kimi shows a "Ready" badge regardless of login status — that's a separate, larger gap affecting all five preset harnesses (Kimi, OpenCode, Amp, Hermes, OpenClaw), tracked separately.
Test plan
just cipasses~/.zshrc