agentleFS
hhe48203-ctrlhhe48203-ctrl/macos-computer-use-mcp/AGENTS.md

macos-computer-use-mcp

AGENTS.md1 starsChanged 19 days agoMITView on GitHub

Update the Chinese counterparts of changed bilingual docs. Keep local artifacts and research out of commits. Initialize Git for new projects and commit changes by feature. Create a release tag after that version passes acceptance.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Node.js 22.13 or later on the 22.x line, or Node.js 24 or later, for development.

    line 7
  2. Very specific:

    Run npm run check for ESLint and portable JS tests, including the documentation checks.

    line 8
  3. Very specific:

    Run npm run check:native for Swift or native bridge changes.

    line 9
  4. Distinctive:

    Update the Chinese counterparts of changed bilingual docs.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Working on the repository

中文版本

Setup and checks

  • Use Node.js 22.13 or later on the 22.x line, or Node.js 24 or later, for development. Install with npm ci --ignore-scripts.
  • Run npm run check for ESLint and portable JS tests, including the documentation checks. Use npm run lint to run ESLint alone. These commands need no native helper or desktop permissions. List new macOS-only test files in scripts/check.mjs.
  • Run npm run check:native for Swift or native bridge changes. It builds into .build and runs the full Node regression suite on macOS with Xcode Command Line Tools. Use a separate checkout if an MCP client is using the current helper.
  • Use npm run doctor to inspect the built helper and its macOS permissions. For desktop behavior, choose the relevant npm run test:* command from the README. Use owned fixtures and run desktop tests one at a time on an unlocked, authorized desktop. Benchmarks and human trials need a reserved desktop.
  • Report the checks run and any coverage gaps. Offscreen tests, live desktop tests, and human concurrent-use trials each cover different behavior. Verify actual release archives using the release evidence guide.

Code map and invariants

  • src/server.mjs exposes js and js_reset over MCP stdio. Keep stdout reserved for protocol traffic. With CU_BROKER_URL it uses RemoteBridge; otherwise it uses local Bridge.
  • src/repl.mjs and src/repl-worker.mjs own evaluation and session lifetime. src/bridge.mjs supervises the Swift helper on the host. src/broker.mjs and src/remote-bridge.mjs are the container split: the broker owns helper lifetime, auth, policy and lease expiry; the container never spawns the helper. Cancellation, timeout, reset, disconnect and lease expiry must retire pending native work. After an interrupted mutation, observe the target again before retrying.
  • src/container-host.mjs and Dockerfile package the Node MCP server for a locked-down container while the helper stays on macOS. Prefer that path over bind-mounting the host into the container.
  • src/cua.mjs implements app/window bindings and coordinate handling. src/tools.mjs validates native requests. Reject ambiguous targets and stale snapshots or coordinates. Keep behavior aligned with the JS API.
  • native/ owns macOS Accessibility, capture, input, and the cursor overlay. Preserve background routing by default, require explicit foreground opt-in, and use normal macOS permission grants. See architecture.

Update the Chinese counterparts of changed bilingual docs. Keep local artifacts and research out of commits. Initialize Git for new projects and commit changes by feature. Create a release tag after that version passes acceptance.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.