Repository navigation
feat(cua-driver): register the nur-packages driver with Claude Code - #301
Conversation
…de Code Pin the signed 0.38.0 release so macOS copies CuaDriver.app to /Applications, and declare the stdio MCP server plus the Claude skill.
The signed release now lives in NoSugarCoffee/nur-packages. This module installs that package, copies CuaDriver.app to /Applications, and registers the Claude Code MCP server. The input is pinned to the PR branch until that package is on main.
Put only the CLI on PATH so copyApps does not install a second bundle, and refuse to replace an /Applications/CuaDriver.app this config did not stamp.
Stub ditto and codesign so the failure path does not depend on the host, and assert a stamped older CuaDriver.app is replaced.
The package landed in 6c59677. Drop the PR-branch pin and lock that commit.
The Nix store bundle is mode 555. ditto keeps that, so xattr and the cleanup rm fail and abort the macOS switch.
A switch installs the driver and the skill pack. Claude Code's MCP server list is owned by APM, so this module no longer writes ~/.claude.json.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Mergestorm reviews this repository's pull requestsEvery PR gets AI code review that flags real bugs before they merge. This account's 30 free credits for this monthly window are used, so reviews are paused at |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 203cfea968
ℹ️ 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".
| if [[ "$name" == "CuaDriver.app" ]]; then | ||
| continue |
There was a problem hiding this comment.
Clean up CuaDriver when its package disappears
When a future NUR update stops exposing pkgs.nosugarcoffee.cua-driver for a Darwin system, the module's package and activation are disabled by cua-driver == null, but this unconditional exception prevents copyApps from removing the previously stamped bundle. The old app can therefore remain installed—and retain Accessibility and Screen Recording grants—despite no longer being declared; gate this exception on package availability or add an absent-package cleanup path for stamped copies.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
Summary
Installs the MIT-licensed cua-driver from NoSugarCoffee/nur-packages (
pkgs.nosugarcoffee.cua-driver), same pattern as JetBrains Air. The input is the default branch, locked at6c59677. This repo does not fetch or unpack the release, and it does not register MCP servers. Claude Code's server list belongs to dotai via APM. Cua Spaces and the perception extension are not installed.What this repo still does
home.packagesis a package that contains only a symlink tocua-driver. The NUR package also ships$out/Applications/CuaDriver.app; this nixpkgsbuildEnvlndirs a whole package and ignorespathsToLink, so asymlinkJoinwould still publish that bundle andcopyAppswould install a second copy under~/Applications/Home Manager Apps. The bin-only package givescopyAppsnothing to copy.dittos the NUR bundle to/Applications/CuaDriver.app(a real directory, not a store symlink). That is the pathcua-driver mcprelaunches. The staged copy is made writable first: the store bundle is mode 555, anddittokeeps that, soxattrand a laterrmwould otherwise fail and abort the switch. The copy is stamped with the samehome-manager.copiedxattrcopyAppsuses. If/Applications/CuaDriver.appis already there and has no stamp, the switch warns and leaves it alone.cua-driver.skillsis linked at~/.cua-driver/skills/cua-driver, and~/.claude/skills/cua-driverpoints at that home copy.macOS permissions
After the first switch, grant Accessibility and Screen Recording to Cua Driver (
/Applications/CuaDriver.app) in System Settings → Privacy & Security. Grant them again if a later pin changes the app's code signature. A switch that replaces a stamped bundle stops a runningcua-driverfirst.If you already switched this branch before the stamp, that copy has no xattr, so the next switch will not replace it. Remove
/Applications/CuaDriver.apponce and switch again.