feat(install): add ZCode host (skills, commands, agent wrappers) - #64
feat(install): add ZCode host (skills, commands, agent wrappers)#64dpolishuk wants to merge 1 commit into
Conversation
ZCode (z.ai CLI agent) discovers user-scope skills from ~/.zcode/skills and commands from ~/.zcode/commands. The host installs the canonical skills and commands directly, and exposes xpowers agents via the codex-agent-* wrapper skills from .agents/skills because ZCode has no user-scope subagent registry. No third-party features are offered for this host yet. install.sh (curl|bash path) still needs a matching zcode agent entry; tracked as follow-up.
|
Warning Review limit reached
Next review available in: 32 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds support for a new ZCode host to the TypeScript installer so XPowers skills/commands can be installed under ~/.zcode, with agents exposed via codex-agent-* wrapper skills.
Changes:
- Extend
scripts/install.tswith a newzcodeHostConfig (detect~/.zcode, install skills/commands, copycodex-agent-*wrappers). - Add
tests/zcode-host.test.jsto cover install/uninstall behavior and--helpoutput forzcode. - Update README and installer help text to list
zcodeas a supported host.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/install.ts | Adds ZCode host config, installs into ~/.zcode, and updates --hosts help text. |
| tests/zcode-host.test.js | Verifies ZCode install/uninstall and --help host listing via the TS installer. |
| README.md | Documents ZCode as an available host in user-facing docs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const wrapperRoot = join(REPO_ROOT, ".agents", "skills") | ||
| if (!existsSync(wrapperRoot)) return | ||
| for (const entry of await readdir(wrapperRoot, { withFileTypes: true })) { | ||
| if (!entry.isDirectory() || !entry.name.startsWith("codex-agent-")) continue | ||
| await copyDir(join(wrapperRoot, entry.name), join(targetDir, "skills", entry.name)) | ||
| installedFiles.push(`skills/${entry.name}/`) | ||
| } |
| ``` | ||
|
|
||
| Available hosts: `claude`, `opencode`, `kimi`, `gemini`, `pi` | ||
| Available hosts: `claude`, `opencode`, `kimi`, `gemini`, `pi`, `zcode` |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1300fa712c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| <p align="center"> | ||
| <strong>Structured engineering workflows for Claude Code, OpenCode, Gemini CLI, Kimi Code CLI, Kimi CLI, Codex CLI, and Pi.</strong> | ||
| <strong>Structured engineering workflows for Claude Code, OpenCode, Gemini CLI, Kimi Code CLI, Kimi CLI, Codex CLI, Pi, and ZCode.</strong> |
There was a problem hiding this comment.
Add ZCode to the advertised universal installer
When a ZCode user follows the README's primary “Universal installer” at lines 40–45, this support claim is false for that path: scripts/install.sh still defines AGENT_ORDER without ZCode and its --hosts parser rejects zcode, so automatic installation ignores ~/.zcode while explicit selection errors. Either implement ZCode in the shell installer or qualify the README claim as Bun-installer-only.
Useful? React with 👍 / 👎.
| await copyDir(join(wrapperRoot, entry.name), join(targetDir, "skills", entry.name)) | ||
| installedFiles.push(`skills/${entry.name}/`) |
There was a problem hiding this comment.
Roll back copied agent wrappers after install failures
If an error occurs after any wrapper is copied—for example, a pre-existing ~/.zcode/.xpowers-version directory makes the final writeFile fail—the installer catch block removes only paths registered by the normal source-copy loop. These post-install wrapper destinations are not registered for rollback, so the command reports failure and writes no manifest while leaving active codex-agent-* directories that a later --uninstall cannot discover; register these paths with the transaction or clean them up from the failure path.
Useful? React with 👍 / 👎.
What
Adds a
zcodehost to the TypeScript installer (scripts/install.ts):~/.zcodedirectory present.~/.zcode— canonical skills →~/.zcode/skills, slash commands →~/.zcode/commands. ZCode scans user-scope~/.zcode/skills/~/.zcode/commandsand tolerates non-skill reference dirs (common-patterns,skills/commands), so those are kept for the relative-path references other skills make into them.agentsfield is recorded but not executed), so agents are exposed via the existingcodex-agent-*wrapper skills from.agents/skills(generated/maintained byscripts/sync-codex-skills.js). Wrappers are pushed ontoinstalledFilesso manifest uninstall removes them.availableFeatures: []) — no third-party feature supports ZCode today.Also updates the
--hostshelp line and README host lists.Testing
New
tests/zcode-host.test.js(RED → GREEN, followsinstall-script.test.jsconventions: fake $HOME +bun scripts/install.ts):codex-agent-ralphwrapper exist under fake~/.zcode, JSONhostsincludeszcode.xpowers-version)--helplistszcodeTests use a minimal PATH without npm so
--yesruns stay hermetic — the tm-cli feature skips itsnpm install @linear/sdkstep when npm is absent, avoiding the network-install flakiness that already affects some installer tests under parallel load (verified those failures reproduce on clean main).node --test tests/zcode-host.test.js: 3/3 pass.bun test: 3/3 pass. Full suite: 467→470 passing with this patch; the remaining failures (br/bv network installs, heavy Pi tests) reproduce on clean main and are pre-existing.Follow-up (not in this PR)
scripts/install.sh(curl|bash path) still needs its own zcode agent entry.gemini extensions installneeds--consent, an expect-driven folder-trust prompt, and the.gemini-extensionsubdir as source (verified manually on macOS).