Skip to content

feat(install): add ZCode host (skills, commands, agent wrappers) - #64

Open
dpolishuk wants to merge 1 commit into
mainfrom
feat/zcode-host
Open

feat(install): add ZCode host (skills, commands, agent wrappers)#64
dpolishuk wants to merge 1 commit into
mainfrom
feat/zcode-host

Conversation

@dpolishuk

Copy link
Copy Markdown
Owner

What

Adds a zcode host to the TypeScript installer (scripts/install.ts):

  • Detection: ~/.zcode directory present.
  • Install target: ~/.zcode — canonical skills → ~/.zcode/skills, slash commands → ~/.zcode/commands. ZCode scans user-scope ~/.zcode/skills / ~/.zcode/commands and tolerates non-skill reference dirs (common-patterns, skills/commands), so those are kept for the relative-path references other skills make into them.
  • Agents: ZCode has no user-scope subagent registry (plugin agents field is recorded but not executed), so agents are exposed via the existing codex-agent-* wrapper skills from .agents/skills (generated/maintained by scripts/sync-codex-skills.js). Wrappers are pushed onto installedFiles so manifest uninstall removes them.
  • Features: none offered yet (availableFeatures: []) — no third-party feature supports ZCode today.

Also updates the --hosts help line and README host lists.

Testing

New tests/zcode-host.test.js (RED → GREEN, follows install-script.test.js conventions: fake $HOME + bun scripts/install.ts):

  1. install → skills, commands, and codex-agent-ralph wrapper exist under fake ~/.zcode, JSON hosts includes zcode
  2. uninstall → all of the above removed (including .xpowers-version)
  3. --help lists zcode

Tests use a minimal PATH without npm so --yes runs stay hermetic — the tm-cli feature skips its npm install @linear/sdk step 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.
  • The gemini host hangs when driven non-interactively: gemini extensions install needs --consent, an expect-driven folder-trust prompt, and the .gemini-extension subdir as source (verified manually on macOS).

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.
Copilot AI lite review requested due to automatic review settings August 20, 2026 12:09
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dpolishuk, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a9bf6f8-5a4e-4a4b-9af3-7dcc97024da7

📥 Commits

Reviewing files that changed from the base of the PR and between 73e1207 and 1300fa7.

📒 Files selected for processing (3)
  • README.md
  • scripts/install.ts
  • tests/zcode-host.test.js

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts with a new zcode HostConfig (detect ~/.zcode, install skills/commands, copy codex-agent-* wrappers).
  • Add tests/zcode-host.test.js to cover install/uninstall behavior and --help output for zcode.
  • Update README and installer help text to list zcode as 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.

Comment thread scripts/install.ts
Comment on lines +559 to +565
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}/`)
}
Comment thread README.md
```

Available hosts: `claude`, `opencode`, `kimi`, `gemini`, `pi`
Available hosts: `claude`, `opencode`, `kimi`, `gemini`, `pi`, `zcode`

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md

<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread scripts/install.ts
Comment on lines +563 to +564
await copyDir(join(wrapperRoot, entry.name), join(targetDir, "skills", entry.name))
installedFiles.push(`skills/${entry.name}/`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants