chore(cua-driver-rs): drop -rs from MCP identity + skill pack name - #1677
Conversation
Three user-visible places where the binary still advertised "-rs" after the libs/cua-driver-rs/ folder rename. Renamed all three and added one-shot legacy cleanup so existing installs migrate silently. 1. MCP `serverInfo.name`: "cua-driver-rs" → "cua-driver" (mcp-server/src/protocol.rs) 2. MCP `instructions` text: "cua-driver-rs: cross-platform…" → "cua-driver: …" and the in-string skill-name reference too. This is the text Claude / Codex / etc. see in their system prompt. 3. SKILL_PACK_NAME: "cua-driver-rs" → "cua-driver" + repo dir git-mv libs/cua-driver/rust/Skills/cua-driver-rs/ → cua-driver/. Install dir on disk changes from <HomeDir>/skills/cua-driver-rs/ to <HomeDir>/skills/cua-driver/, and same for agent links under ~/.claude/skills/, ~/.agents/skills/, ~/.openclaw/skills/, and the OpenCode dir. Migration (zero-prompt, runs on next `cua-driver skills install`): - new `sweep_legacy_skill_pack()` removes <HomeDir>/skills/cua-driver-rs/ and any `<agent_skills>/cua-driver-rs` symlink/junction (only when it's a managed link — never clobbers a user-managed real dir). - `skills uninstall` now sweeps BOTH the current name and the legacy one so a partial uninstall still finishes. - uninstall.sh + uninstall.ps1 expanded their junction lists to include both names. Asset name `cua-driver-rs-v<v>-skills.tar.gz` intentionally unchanged per the broader "tag prefix + asset names stay" decision. The CD workflow's Skills staging now packages a `cua-driver/` top-level dir inside the (legacy-named) tarball; the on-binary tarball extractor strips whatever top-level dir it finds, so both old and new tarballs extract correctly. Smoke-tested on Windows: `cua-driver mcp` initialize returns `serverInfo.name = "cua-driver"` and instructions text starts with `"cua-driver: cross-platform…"`. cargo build/test all green.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR renames the cua-driver skill-pack from ChangesSkill-pack rename and backwards-compatible migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
… .cua-driver-rs/ + repairs dangling agent links (#1683) User reported `cua-driver skills install` placing the skill pack at `~/.cua-driver-rs/skills/cua-driver/` even after PR #1677 renamed the SKILL_PACK_NAME — because skills.rs's home_dir() still hardcoded `.cua-driver-rs/` as the package-home subdir, inconsistent with telemetry.rs which migrated to `.cua-driver/` in v0.2.16. Three changes: 1. **home_dir() now defaults to `~/.cua-driver/`** (lifted the same HOME_SUBDIRECTORY / LEGACY_HOME_SUBDIRECTORY constants telemetry.rs already uses). `CUA_DRIVER_RS_HOME` env override still wins. 2. **sweep_legacy_skill_pack() expanded** to clean any of three legacy shapes: - <NewHome>/skills/cua-driver-rs/ (old pack NAME under new home) - <LegacyHome>/skills/cua-driver/ (new pack NAME under old home — the user's case) - <LegacyHome>/skills/cua-driver-rs/ (old NAME under old home) Then attempts to remove the empty `<LegacyHome>/skills/` and `<LegacyHome>/` themselves — but only if they're actually empty (`fs::remove_dir`, never `remove_dir_all`), so a legacy Unix install that still has a packages/ tree alongside keeps its dot-folder. 3. **link_agent() repairs dangling links**, not just creates missing ones. After sweep removes the old target, the agent dir (`~/.claude/skills/cua-driver` etc.) holds a junction pointing at nothing. The old guard `if link.exists() || symlink_metadata.is_ok` misread that as "already linked, skip" and left it broken. Now: - link.exists() = true → real / valid link (skip) - has metadata + !exists + is_symlink/junction → dangling, remove + recreate - real directory → user-managed (skip) `is_symlink_or_junction` already gated dangerous removals — never touches a user-managed real dir. `uninstall --all` similarly extended to sweep the legacy home dir. End-to-end verified on Windows: - legacy pack at ~/.cua-driver-rs/skills/cua-driver ← gone after install - stale junction at ~/.claude/skills/cua-driver ← repaired (now points at ~/.cua-driver/skills/cua-driver) - new home ~/.cua-driver-rs/ ← removed (was empty after sweep)
…apper from skill tarball (#1684) User reported `~/.claude/skills/cua-driver/cua-driver-rs/SKILL.md` after `skills install` on Windows — a nested `cua-driver-rs/` dir inside the pack root. Root cause: tarball-shape mismatch with the extractor. The CD workflow historically staged files at `<outer>/cua-driver-rs/` (and after #1677, `<outer>/cua-driver/`) — TWO wrapping dirs. The extractor only stripped ONE. So files landed at `dest/cua-driver{-rs}/<file>` instead of `dest/<file>`. Two pieces: 1. **`extract_tar_gz` now strips a second wrapper IF named `cua-driver` or `cua-driver-rs`**. This covers three historical tarball shapes: - v0.2.18 and earlier: `…-skills/cua-driver-rs/<file>` - v0.2.19 (briefly): `…-skills/cua-driver/<file>` - v0.2.20+ (post-fix): `…-skills/<file>` (flat — CD workflow now) Stripping is name-gated so a future skill pack with a real subdir (e.g. `examples/`) doesn't get accidentally flattened. 2. **CD workflow flattens the staging dir** — no more redundant inner `cua-driver/` between `<outer>` and the .md files. New tarballs are single-wrap. Four unit tests cover the three legacy shapes + a "preserve real subdir" guard. End-to-end fix: on the user's machine, the live v0.2.18 release tarball still has the legacy double-wrap shape, so the binary needs to keep extracting it correctly via the smart extractor — which it now does. `skills update` will sweep the nested `cua-driver-rs/` dir out (`fetch_into` wipes dest first) and re-extract flat.
Summary
Three user-visible places where the binary still advertised `-rs` after the `libs/cua-driver-rs/` folder rename. Renamed all three and added one-shot legacy cleanup so existing installs migrate silently.
What changed
The `serverInfo.name` + `instructions` change is what fixes the other-Claude-session complaint that prompted this PR ("the cua-driver-rs skill isn't loaded").
Migration (zero-prompt, runs on next `cua-driver skills install`)
What's intentionally NOT changing
Per the user-confirmed scoping from PR #1674:
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation