Installer: first-class ZCode target (MCP + skills) - #84
Open
hsliuustc0106 wants to merge 1 commit into
Open
Conversation
…/cli/config.json, skills in ~/.zcode/skills
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.
Fixes #83
What
Adds
zcodeas a fourth installer target, mirroring the Cursor path (config-file merge + skill copy, no CLI invocation):zcodeon PATH, or an existing~/.zcode/directory.--agent zcodealso accepted explicitly.mcp.servers.infermatrix-copilot(nested key, stdio, sameuvx --from ... infermatrix-copilot-mcpcommand as every other target) into~/.zcode/cli/config.json. That file also holds ZCode hooks and plugin state, so the installer merges non-destructively and writes a timestampedconfig.json.<ts>.bakbackup first — same contract as the Cursor installer. Invalid JSON aborts without touching the file.~/.zcode/skills/(user scope;{{INFERMATRIX_COPILOT_ROOT}}substituted as usual). ZCode invokes them as/imreview,/imdesign,/imcifix,/imupdate— same slash form as Claude Code / Cursor, so the restart hint now readsClaude/Cursor/ZCode.Why
InferMatrixCopilot's core artifacts are already ZCode-compatible (standard stdio MCP server + SKILL.md skills with name/description frontmatter); only the installer lacked the target, forcing manual config wiring.
Testing
test/test_install_mcp_script.py: 4 new tests — merge preserves unrelated keys (plugins, existing servers) and backs up; creates config when missing; invalid JSON raisesInstallErrorand leaves the file unchanged; detection via~/.zcode/dir.test_imupdate_skill,test_skills_scope,test_packaged_runtime) pass (19/19 total).install_mcp.py --agent zcode --config-root <tmp>produces the expected nested config, all four skills, and~/.infermatrix-copilot/.env.Direct mode needs no API keys; Strict config is agent-independent and unchanged.