Repository navigation
feat(candy): kimi — Moonshot Kimi Code CLI candy + agent catalog entry - #145
Conversation
candy/kimi installs the Kimi Code CLI globally via npm (@moonshot-ai/kimi-code,
require nodejs — the claude-code/codex/gemini npm-global pattern), with three
baked checks: the ~/.npm-global/bin/kimi binary, the unpacked scoped package,
kimi --version printing a semver. The root charly.yml gains the fourth agent:
catalog entry (kimi -p "${PROMPT}", optional credentials/kimi-code.json
mount; no output_format — the harness's stream-json parsing is Claude-wire).
README's agent catalog names it; the plugins gitlink bumps to 9ab9b98
(plugins#90, the owning skill coder/skills/kimi) and .agents/skills gains the
generator-owned charly-coder--kimi link (290 skills).
R10 (candy-config class): charly box validate clean; transient
check-kimi-candy-pod bed → PASS (12 steps, 525s): fresh npm-multistage image
build, baked checks at build scope, live kimi --version in the deployed
container, fresh-update rebuild. Bed removed after the run.
Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated)
…tover Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated)
pr-validator — APPROVED ✅Change class: candy/box-config (new candy + Bound head SHA: Checklist (every rule; N/A carries a one-line reason)
My independent R10 re-run (validator's own evidence, not the author's)Validator RCA (one anomaly in my own re-run — verified-non-blocking): my bed's Phase 4 finalization: merge-time CalVer Comments considered: none (the PR carries no comments). Cross-PR interactions considered: charly#143 ( Decision: PASS. Every applicable rule verified from the diff plus my own re-runs; the complete candy/box-config gate (pre-flight validate + full R7 sequence on a disposable bed + fresh-rebuild leg) executed green at zero warnings on my own invocation; the final head differs from the validated head only by the mechanical CalVer rename. Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated) |
Summary of changes
Adds the Moonshot Kimi Code CLI as a first-class AI-CLI citizen, mirroring the
existing claude-code/codex/gemini integration exactly: one candy, one root
agent:catalog entry, one owning skill (landed via plugins#90).candy/kimi/charly.yml+candy/kimi/package.json(new) — the candy:require: [nodejs], package.json pinning@moonshot-ai/kimi-code, installedglobally under
NPM_CONFIG_PREFIX(~/.npm-global) by the npm multistagebuilder. Three baked deterministic
check:steps: the~/.npm-global/bin/kimibinary, the unpacked scoped package under~/.npm-global/lib/node_modules/@moonshot-ai/kimi-code, andkimi --versionprinting a semantic version.charly.yml— newkimi:agent:catalog entry beside claude/codex/gemini:kimi -p "${PROMPT}"(verified live:-prejects both--yoloand--auto, so plain prompt mode),kimi --versionprobe, optional~/.kimi-code/credentials/kimi-code.jsoncredential mount. Deliberately nooutput_format: the harness'sstream-jsonrunner-event parsing is theClaude wire format.
README.md— thekind: agentcatalog enumeration nameskimi.pluginsgitlink 7bd6300 → 9ab9b98 — the owning skillcoder/skills/kimi(plugins#90, merged, tag v2026.199.2234)..agents/skills/charly-coder--kimi+.agents/skills/.charly-profile.json—generator-owned skill link (developer profile now 290 skills).
CHANGELOG/2026.199.2359.md— dated entry (placeholder CalVer; thevalidator finalizes the merge-time version).
Out of scope (named next batch): composing
kimiintohermes-full/openclaw-fulland the coder boxes — their@githubpinsrequire the candy tag this PR creates; that is
charly box reconcilefollow-up scope across the box submodules.
Change class
candy/box-config (new candy + agent entity + README enumeration +
documentation-gitlink bump)
How R10-tested — exact gate, commands, and pasted output
charly box validatepre-flight, then —because no committed bed composes the new candy — the matrix's fallback R7
sequence on a disposable deploy: build →
charly check box→ deploy →charly check live→ freshcharly update. Executed as ONEcharly check run check-kimi-candy-pod(a transient disposable bed whosefixture image directly composes
check-keepalive+kimionquay.io/fedora/fedora:43withbuilder: {npm: fedora.fedora-builder});the transient entities were removed after the passing run (per-candy beds
are not kept; kimi gains its permanent composing bed in the metalayer
follow-up).
check-kimi-candy-pod | pod | ok | 12 steps | 525s— on worktree binary./bin/charlyversion2026.199.2121(R9:task build:binaryfrom thistree), shared run-calver
.check/check-kimi-candy-pod/2026.199.2234/.updatestep (102s) is the R10fresh-rebuild leg (image rebuild → check → redeploy), plus
feature-run-rebuild;summary.ymlbelow, zero warnings.through the npm multistage (
FROM ghcr.io/opencharly/fedora-builder:2026.199.2232 AS kimi-npm-build), all three baked checks ran at build scope AND live inthe deployed container, plus an explicit runtime
kimi --versionprobe(kimi-version-live). The
kimi:agent entity is validated statically bycharly box validate(plugin #AgentInput schema); harness scoring with thekimi runner is not exercised by this class's gate (no iterate: bed selects
it — same as the codex/gemini entries).
(config-only addition; the bed ran alone).
RCA'd gate discoveries (zero warnings required honesty about the failures
along the way — all root-caused, none suppressed): (1) ad-hoc
bundle add <name> <ref> [--add-candy]pod deploys never connect theout-of-process deploy-pod provider —
loadDeployPluginsscopes providers toplugin words from AUTHORED deploy nodes; (2) the
add_candyoverlay pathemits an empty npm builder ref (
FROM AS kimi-npm-build, exit 125) when thebase image declares no
builder:. Both are pre-existing product gaps notedfor a future core batch — the sanctioned authored-bed path is the correct
vehicle, used here. Also:
kimi -prejects--yolo/--auto(probed live),which set the agent command shape.
Attribution tier
fully tested and validated— the changed runtime path (the candy's install +all its checks) executed live on a fresh rebuild through the complete R7
sequence at zero warnings, and the change is config/candy/docs only.
Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-image:layer(candyauthoring, npm workflow, mandatory version/plan),
/charly-check:check(R10 matrix — the candy-config gate),
/charly-core:deploy(bundle add /add_candy semantics),
/charly-coder:gemini(sibling pattern source).sdk/pkg submodules in the worktree; two
bundle addprovider-gap probes;overlay exit 125 → empty BuilderRef) — each RCA'd before the next step;
final gate at zero warnings. No "flake/environmental" anywhere.
changelog + this body as future-batch candidates (they pre-date this change
and have a sanctioned alternative path). Nothing else deferred.
SHARED npm multistage builder; no copied install logic (the
package.jsondetection path is the single mechanism).
vehicle moved to the sanctioned authored-bed path; no sleeps/retries/shims.
git grep check-kimi-candyafter the transient-bed removal: 0 references. Sibling enumerations swept:
all
claude-code/codex/geminimetalayer listings stay true (kimi notcomposed there yet); README agent catalog updated in-diff.
removed pre-commit (final diff carries only the shipped change); worktree
status inspected before commit; plugins feat branch deleted only after the
merged-squash SHA was recorded.
check live → fresh update) — pasted above, not just
go test.plan (the three checks execute from the image's own plan — see check-image
output) and the standard
ai.opencharly.*labels (visible in the buildlog); the overlay Containerfile emission was inspected during RCA
(
.build/overlay-check-kimi-candy-pod/Containerfile).task build:binaryfrom this tree;./bin/charly version= 2026.199.2121; no new runtime OS deps(pkg/arch/PKGBUILD untouched).
disposable: trueonly, freshrebuild, zero warnings; the shipped coverage that fails without the change:
the candy's three baked checks (absent the candy, no kimi steps exist) plus
the developer-profile skill count 289→290 asserted by the setup drift
checks.
(
npm view @moonshot-ai/kimi-code→ 0.27.0,bin: {kimi: dist/main.mjs});kimi -pflag rejection probed live; builder resolution proven bybox generateBEFORE the build (concreteFROM ghcr.io/opencharly/fedora-builder:2026.199.2232). ADE: candy hasdescription:+ 3 deterministiccheck:steps;charly box validatepasses. SDD: N/A — no
.cuechange.executed as written (vehicle RCA documented).
only).
disposable lifecycle (plus its teardown cleanup, verified: no leftover
container/quadlet/deploy record).
go vet+go test ./...green from
charly/(tree hygiene), binary rebuilt (above).CHANGELOG/2026.199.2359.mdstaged (placeholder CalVer — thepr-validator finalizes it).
Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated)