Skip to content

feat(hosts): add Kimi Code host adapter - #56

Merged
phodal merged 2 commits into
QoderAI:mainfrom
Kim-Goodman:feat/kimi-host-adapter
Aug 3, 2026
Merged

feat(hosts): add Kimi Code host adapter#56
phodal merged 2 commits into
QoderAI:mainfrom
Kim-Goodman:feat/kimi-host-adapter

Conversation

@Kim-Goodman

Copy link
Copy Markdown
Contributor

Add Kimi Code as an analysis-capable source-local host, following the host contribution guide and the Qwen Code / GitHub Copilot / Pi host template. Native contracts were verified against a local Kimi Code installation; a dated spec lives at docs/specs/2026-07-30-kimi-host-support.md (kimi-host-support) with stable KHS-AC acceptance ids.

  • Distribution shell: .kimi-plugin/plugin.json manifest with the canonical skills pointer, so /plugins install <repo> discovers the root skills/ Skill and /skill:better-harness invokes it. The manifest ships in the public npm package as the seventh filesystem metadata root; the Qoder runtime bundle stays Qoder-only.
  • Configured assets: scripts/agent-customize/providers/kimi.mjs inventories user-level ~/.kimi-code/skills/**/SKILL.md and mcp.json, project-level .kimi-code/skills and .kimi/skills, plus managed plugins from ~/.kimi-code/plugins/installed.json (enabled: true only, plugin-root path confinement). Memory is declared unsupported (no Kimi Code equivalent); config.toml is a diagnostics flag only; credentials and server.token are never read.
  • Session evidence: scripts/session-analysis/platforms/kimi.mjs reads workspace-matching wire transcripts under ~/.kimi-code/sessions/<wd_*>/ses{sion}_*/agents/*/wire.jsonl, resolves the workspace-to-wd_* mapping through workspaces.json and session_index.jsonl, and falls back to wd_<name>_* directory prefixes only when both indexes are absent (recording a kimi-workspace-index-absent warning). User/command/content text stays behind the shared privacy flags; unknown wire record types degrade to bounded metadata.* events.
  • Register kimi across the supported-platform set and --kimi-home threading; the A-06 consistency test now covers the expanded host set.
  • Sync the host adapter matrix, references, READMEs (en/zh), and CHANGELOG; add provider, session, plugin-inventory, symlink, workspace-index, and privacy-gating tests.

Kimi Code stays outside the public Quickstart set until a full report render is validated end to end in Kimi Code, per the host contribution contract (same treatment as Pi).

Validation: focused consistency suites 133/133 pass; full npm test 1139 tests with 35 failures that reproduce identically on a clean origin/main worktree (missing esbuild-wasm / vendor/tree-sitter-wasm in this environment — zero code regressions); pack verification passes.

This branch is merged up to current main (includes the Grok / WorkBuddy / topology work); platform ordering follows the host-introduction timeline ..., pi, kimi, workbuddy, grok.

- Add Kimi configured-asset provider with managed-plugin inventory
- Add Kimi session source adapter (wire.jsonl, workspace index fallback)
- Add .kimi-plugin/plugin.json shell for /plugins install discovery
- Support symlinked skill directories in walkFiles (opt-in, cycle-safe)
- Register kimi across evidence-bundle, report, agent-lint, and asset tools
- Sync README/zh-CN, adapter docs, routing, spec, and CHANGELOG
Resolve 42 conflicted files by unioning the Kimi Code, WorkBuddy, and Grok
host registrations (platform lists, provider maps, help text, docs, tests)
while keeping upstream's refactored structure:

- session-analysis entrypoints: keep upstream's dedupe into
  session-analysis/analyzer.mjs with the PLATFORM_MODULES registry; re-apply
  the kimi entry there and keep scripts/session-analysis.mjs as the upstream
  re-export shim. kimi.mjs provider now imports session-analysis through its
  public index.mjs surface per the new refactor contract.
- session-analysis/fs.mjs: take upstream's topology rewrite (walkFiles now
  follows directory/file symlinks by default with realpath cycle dedupe);
  the kimi followSymlinks option stays accepted and existing symlink tests
  are updated to the dedupe semantics.
- agent-customize/providers/claude.mjs: keep upstream's designated-config-
  workspace inventory logic (pathsReferToSameRoot/canonicalPathInsideRoot)
  while pluginPathValues/pathInsideRoot continue to come from core/items.mjs.
- Regenerate scripts-refactor-contract help fixtures and sha256 freezes from
  actual CLI output; bump .kimi-plugin/plugin.json to 0.4.0 to match the
  other host manifests; add kimi to the render-report platform allowlist to
  satisfy the registry parity test.
@phodal
phodal merged commit 6ba2ed6 into QoderAI:main Aug 3, 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