installer: first-class ZCode target (MCP + skills) (#83) - #102
Merged
Conversation
Mirror of the Cursor path, per the #83 spec: auto-detect (`zcode` on PATH or ~/.zcode/ present) or explicit --agent zcode; non-destructive merge of mcp.servers.infermatrix-copilot into ~/.zcode/cli/config.json with a timestamped .bak (that file also holds hooks/plugin state, so unrelated keys are preserved and malformed JSON refuses the merge leaving the original untouched); skills copied to user-scope ~/.zcode/skills/; restart hint covers the /imreview slash form. Tests cover: unrelated-key preservation + .bak, fresh-config creation, malformed-JSON refusal (no .bak, no skills), non-object mcp.servers refusal, and detection by CLI or config dir. Closes #83. Closes #99 (duplicate request). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0165QsXAeLVPrKfj8Yk5zns3
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.
What
Adds
zcodeas a first-class installer target inscripts/install_mcp.py, mirroring theexisting Cursor path (config-file merge + skill copy, no CLI invocation), exactly as specced
in #83:
--agent zcodechoice + auto-detection (zcodeon PATH or~/.zcode/exists).mcp.servers.infermatrix-copilot(nested key) into~/.zcode/cli/config.json, with a timestamped.bak. That file also holds hooks/pluginstate: unrelated keys are preserved, and malformed JSON or a non-object
mcp/mcp.serversrefuses the merge with the original left untouched (and no
.bakwritten for themalformed case).
~/.zcode/skills/(takes precedence over~/.agents/skills),with the
{{INFERMATRIX_COPILOT_ROOT}}placeholder expansion the other targets get./imreview//imcifix//imupdateslash form.Contract note
The ZCode config location/key hierarchy (
~/.zcode/cli/config.jsonundermcp.servers,skills at
~/.zcode/skills/) follows the spec in #83 — there is no ZCode install on the devmachine to verify against, so @hsliuustc0106 please confirm the contract on a real ZCode
setup before merge.
Tests
test/test_install_mcp_script.py(+6):.bak, installs skills.bak).bak, no skills copiedmcp.serversFull offline suite green.
Closes #83. Closes #99 (duplicate).
🤖 Generated with Claude Code
https://claude.ai/code/session_0165QsXAeLVPrKfj8Yk5zns3