Skip to content

feat: add kimi code cli integration#463

Merged
ogulcancelik merged 2 commits into
ogulcancelik:masterfrom
wbxl2000:qer/kimi-code-integration
Jun 4, 2026
Merged

feat: add kimi code cli integration#463
ogulcancelik merged 2 commits into
ogulcancelik:masterfrom
wbxl2000:qer/kimi-code-integration

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Kimi Code CLI support to Herdr.

This PR installs a Kimi Code hook script, appends a Herdr-managed [[hooks]] block to ~/.kimi-code/config.toml, and improves Kimi screen detection so Herdr can recognize visible approval, question, idle, and working UI states.

Requires Kimi Code CLI 0.8.0 or newer: https://www.npmjs.com/package/@moonshot-ai/kimi-code

Refs #431.

Commits

  • d384219 adds the Kimi Code CLI direct integration: kimi install/uninstall/status target, hook asset, KIMI_CODE_HOME support, managed config.toml hook block, docs, and integration tests.
  • c482407 improves Kimi Code screen detection: approval panels, question dialogs, current prompt boxes, and visible working spinners.

Details

  • Adds kimi as an integration target for install, uninstall, status, and recommendations.
  • Supports KIMI_CODE_HOME; defaults to ~/.kimi-code.
  • Installs hooks/herdr-agent-state.sh.
  • Appends a clearly marked Herdr-managed [[hooks]] block to config.toml.
  • Uninstall removes only the Herdr-managed block and hook script, preserving user hooks.
  • Reports semantic state from Kimi lifecycle, tool, approval, and session events.
  • Adds Kimi visible-state detection for approval panels, question dialogs, current prompt boxes, and working spinners.
  • Keeps native session restore out of scope for this PR; this integration reports semantic state only.

Test plan

  • Successfully tested locally with Kimi Code CLI 0.8.0+.
  • Built Herdr locally and verified the Kimi integration with ./target/debug/herdr.
  • cargo fmt --check
  • git diff origin/master..HEAD --check
  • sh -n src/integration/assets/kimi/herdr-agent-state.sh

@ogulcancelik

Copy link
Copy Markdown
Owner

lgtm ty!

@ogulcancelik ogulcancelik merged commit 66b0f6b into ogulcancelik:master Jun 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants