Skip to content

Add Windows MS UI Automation server with guardrails - #1

Draft
zapabob wants to merge 1 commit into
nogu66:mainfrom
zapabob:feature/windows-msuia-guardrails
Draft

zapabob wants to merge 1 commit into
nogu66:mainfrom
zapabob:feature/windows-msuia-guardrails

Conversation

@zapabob

@zapabob zapabob commented May 22, 2026

Copy link
Copy Markdown

Summary

Adds a Windows MCP/CLI path beside the existing macOS Swift implementation. The Windows server uses Microsoft UI Automation through Windows PowerShell 5.1 and keeps macOS configs available as .mcp.macos.json and .cursor/mcp.macos.json.

What changed

  • Added scripts/ocu-windows.ps1, scripts/mcp-server.ps1, and a Windows MCP smoke test.
  • Added UIA-backed app listing, tree inspection, element search, click/ref click, activation, typing, key press, wait, scroll, right click, screenshots, menu traversal, clipboard, and safety-check tooling.
  • Added guardrails for destructive Unix commands, recursive Windows deletion, file modification commands, destructive Git cleanup, encoded PowerShell, unsafe paste/Enter flows, and delete-like UI labels.
  • Updated docs, skills, examples, plugin metadata, PR template, and changelog for Windows/macOS support.
  • Made the Swift ocu executable target macOS-only so OCUCore builds/tests on Windows with the official Swift toolchain.
  • Added a Windows GitHub Actions smoke job.

Validation

  • winget install --id Swift.Toolchain -e --source winget --silent --accept-package-agreements --accept-source-agreements
  • swift --version -> Swift 6.3.2, target x86_64-unknown-windows-msvc
  • JSON config validation for all repo JSON files outside .build
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts\smoke-test-windows.ps1
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts\ocu-windows.ps1 safety-check --text "rm -rf /" --json
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts\ocu-windows.ps1 safety-check --text "echo hello" --json
  • swift build from a Visual Studio x64 environment
  • swift test from a Visual Studio x64 environment: 17 XCTest tests, 0 failures

Notes

Windows UI Automation is constrained by normal Windows integrity/session boundaries, so elevated apps, other-user sessions, protected surfaces, and some custom-rendered controls may expose partial trees or reject actions.

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 213cca57-2eae-4a47-8da3-a8ed62e9f588

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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.

1 participant