Skip to content

feat(kimi): add Kimi host support - #85

Closed
pierreaubert wants to merge 24 commits into
evo-hq:mainfrom
pierreaubert:main
Closed

feat(kimi): add Kimi host support#85
pierreaubert wants to merge 24 commits into
evo-hq:mainfrom
pierreaubert:main

Conversation

@pierreaubert

Copy link
Copy Markdown
  • docs: add Kimi host support plan and design, ignore worktrees
  • feat(kimi): register kimi host in SUPPORTED_HOSTS and ADAPTERS
  • fix(kimi): make stub adapter fail loudly, sync test with core SUPPORTED_HOSTS
  • feat(kimi): add host install adapter with install/uninstall/doctor
  • fix(kimi): address Task 2 review findings
  • feat(kimi): add Kimi plugin manifest with skills, commands, and hooks
  • feat(kimi): add /evo:discover and /evo:optimize slash commands
  • feat(kimi): add self-contained drain path and hook envelope
  • fix(kimi): address Task 5 review findings for Kimi drain support
  • feat(kimi): detect Kimi session from KIMI_CODE_SESSION_ID
  • docs(kimi): list Kimi as supported host
  • test(kimi): smoke test install and doctor cycle
  • feat(kimi): add native Agent dispatch mapping helpers
  • feat(kimi): add evo_spawn_subagent plugin tool
  • feat(kimi): add evo_wait_subagent plugin tool
  • feat(kimi): declare evo_spawn_subagent and evo_wait_subagent tools
  • feat(kimi): document Kimi Agent tool dispatch in optimize skill
  • fix(kimi): version-based install fetches GitHub tarball instead of missing kimi plugin install

- Correct default plugin-root path (use .parent.parent.parent.parent).
- Honor --force for version-based installs; document local-copy behavior.
- Compile release-version regex once at module level.
- Move re/json imports to top; replace subprocess.call with subprocess.run.
- Use host-specific session precedence in self-contained drain path:
  cursor prefers conversation_id, kimi prefers session_id.
- Wire Kimi engagement detection by calling _maybe_mark_engaged_from_shell
  unconditionally for cursor/kimi.
- Allow Kimi stop-hook self-continuation in _maybe_stop_nudge_text.
- Update --host help text, main() docstring, and _resolve_root_from_payload
  docstring to mention Kimi.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 7 potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread plugins/evo/src/evo/inject/drain.py
Comment thread plugins/evo/src/evo/inject/drain.py
Comment thread plugins/evo/src/evo/inject/drain.py
Comment thread plugins/evo/src/evo/inject/drain.py Outdated
Comment thread plugins/evo/kimi_tools/spawn_subagent.py Outdated
Comment thread plugins/evo/kimi_tools/wait_subagent.py Outdated
Comment on lines +11 to +12
REPO_ROOT = Path(__file__).resolve().parents[3]
sys.path.insert(0, str(REPO_ROOT / "plugins" / "evo" / "src"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Plugin tool scripts fail with import errors when run from the installed location (wait_subagent)

Same path calculation bug as spawn_subagent: Path(__file__).resolve().parents[3] at plugins/evo/kimi_tools/wait_subagent.py:11 only resolves correctly in the development repo, not when installed to Kimi's managed plugin directory.

Impact: The evo_wait_subagent tool crashes with ImportError whenever invoked by Kimi after installation.

See BUG-0003 for full explanation

Identical issue to spawn_subagent.py. When installed to $KIMI_CODE_HOME/plugins/managed/evo/kimi_tools/wait_subagent.py, parents[3] resolves to $KIMI_CODE_HOME/plugins/ instead of the repo root, making the sys.path entry point to a non-existent directory.

Suggested change
REPO_ROOT = Path(__file__).resolve().parents[3]
sys.path.insert(0, str(REPO_ROOT / "plugins" / "evo" / "src"))
_PLUGIN_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(_PLUGIN_ROOT / "src"))
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread plugins/evo/skills/infra-setup/references/provider-matrix.md Outdated
@pierreaubert
pierreaubert marked this pull request as draft July 12, 2026 16:24
alokwhitewolf added a commit that referenced this pull request Jul 17, 2026
Adds Kimi Code as a supported evo host: install adapter (managed-dir copy plus installed.json registration), plugin manifest, skills and slash-command wiring, and the self-contained drain path for hooks and mid-run directives. Verified end-to-end against kimi-code 0.26.0 — install, SessionStart hook registration, and directive delivery/ack.

Also wires the Kimi manifest into the release version tooling and bumps the release to v0.8.0.

Supersedes #85.

Co-authored-by: pierre aubert <pierre@spinorama.org>
@alokwhitewolf

Copy link
Copy Markdown
Collaborator

Superseded by #86, which landed Kimi host support in v0.8.0 (merged as ab5fbd6). Thanks for the groundwork here — #86 builds directly on this and credits you as co-author.

#86 carried the implementation forward and corrected a few places where the draft assumed the Claude Code plugin contract, each verified against kimi-code 0.26.0:

  • Install now targets KIMI_CODE_HOME ?? ~/.kimi-code (not ~/.kimi) and registers the plugin in plugins/installed.json, which is the only source Kimi reads to discover plugins.
  • Dropped the manifest tools block: tools is in kimi-code's UNSUPPORTED_RUNTIME_FIELDS, so those tools never loaded (removed the kimi_tools/ and hosts/kimi_native.py that backed them).
  • Mid-run directives are delivered through a Stop-hook block (permissionDecision: deny with the directive as the reason); Kimi has no passive-context channel, so additionalContext/message were silently dropped.
  • Removed KIMI_CODE_SESSION_ID (doesn't exist); the session id arrives on the hook payload.
  • Bare evo install kimi on a wheel now falls back to the GitHub tarball at the running version instead of copying the site-packages parent.
  • Slash commands load the discover/optimize skills instead of running evo discover/evo optimize, which aren't CLI subcommands.

Closing in favor of #86.

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