Repository navigation
fix(skills): don't wipe shared .builtin-skills; add @minimax-ai/code-acp launcher for ACP registry - #522
Merged
Conversation
The seed wiped the whole .builtin-skills dir on a fingerprint mismatch. That dir is shared between the desktop app and the CLI/ACP agent, so a CLI start deleted desktop-only skills (mavis, create-agent, ...). Replace only the dirs of skills this seed ships; per-skill rm failures (EPERM, EACCES) are logged and retried next start instead of aborting.
@minimax-ai/code ships two bins (mcode, mcode-tools), so the ACP registry's `npx @minimax-ai/code acp` cannot pick one and the registry entry is stuck at 0.2.7. code-acp is a single-bin launcher that runs the mcode bin of a pinned @minimax-ai/code. The opt-in publish-acp job stamps and publishes it at the same version after @minimax-ai/code is on npm.
1anZhang
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
@minimax-ai/code0.4.0+ ships two bins (mcode,mcode-tools), so the registry'snpx @minimax-ai/code acpfails withcould not determine executable to run. The registry's hourly bump runs a launch check first, so every bump since 0.4.0 has been dropped.mcode-toolscan't be removed (the desktop app and the self-updater need it)..builtin-skillsgets wiped.seedBuiltinSkillsranrmSyncon the whole~/.minimax/.builtin-skillsdir whenever the fingerprint marker didn't match. The desktop app uses the same dir, so starting the CLI/ACP agent deleted desktop-only skills such asmavisandcreate-agent. A failed reset (EPERM) also skipped the whole seed.Fix
packages/local-runtime/src/skills/seed-builtin.ts: on a mismatch, only the dirs of skills this seed ships are replaced. Anything else in the dir, like another host's skills or user files, is left alone. Each skill's rm and copy failures (EPERM/EACCES/EBUSY) are logged and kept to that skill. The marker is withheld, so the next start retries.packages/local-runtime/test/unit/seed-builtin-shared-dir.test.ts. It covers two cases: foreign skills and files survive a reseed while owned skills refresh, and a dest dir that can't be written doesn't throw. Both tests fail on the old code. The test is registered intest/vitest-suites.jsonandrelease/public-source.json.packages/code-acp:@minimax-ai/code-acpis a single-bin launcher (code-acp) that runs themcodebin of a pinned@minimax-ai/codeand forwards args, stdio, signals and the exit code. It is not a pnpm workspace member, so the lockfile is unchanged..github/workflows/cli-release.yml: new opt-in jobpublish-acp, enabled whenvars.MCODE_ACP_PUBLISH == 'true'and usingsecrets.NPM_TOKEN. It waits for@minimax-ai/code@<ver>to appear on npm, then publishes@minimax-ai/code-acp@<ver>with the dependency pinned to that version. It skips if that version is already published and uses thenexttag for prereleases.After this is merged and published, the ACP registry entry changes to
"package": "@minimax-ai/code-acp@<ver>", "args": ["acp"].Verification
All runs used Node 24 on Linux. I packed this branch's build as a
@minimax-ai/codetgz with both bins, plus acode-acptgz that depends on it.npx -y file:minimax-ai-code-0.6.5.tgz acpfails withcould not determine executable to run.npx -y file:minimax-ai-code-acp-0.6.5.tgz acp, in a fresh HOME with fake desktop.builtin-skills/{mavis,create-agent}andagents/.builtin/mavis/agent.mdalready in place:initializereturnsagentInfo {name: minimax-code, version: 0.6.5}.session/newreturns-32000 Authentication required(expected, since there is no login).mavis,create-agentandagent.mdall survive.init/SKILL.md. The owned skill was restored and the foreign skills survived every time.verify_agents.py --agent minimax-codeand--auth-check, with the entry pointed at the local tgz: both report "All tests passed".vitest packages/local-runtime: 86 files, 2308 passed, 36 skipped.scripts/source-inventory.mjspasses.Not verified: the logged-in prompt flow, Windows, and a real npm publish or Actions run of
publish-acp.Notes
.seed-fingerprint. If you alternate between them, each start refreshes its own skills. That is harmless, just extra writes.Need help on this PR? Tag
@codesmith-botwith what you need.