software-mansion/argent

argent-macos-app-interact

Drive a native Mac app (AppKit, SwiftUI, react-native-macos) through argent.

Voir la source

Mode d’emploi

  1. Copiez la commande et examinez le paquet avant de l’installer dans votre environnement agent.
  2. Consultez le document original pour les outils, identifiants et environnements requis.
  3. Décrivez les entrées et le livrable souhaité ; comparez la sortie aux sources.
npx skills add https://github.com/software-mansion/argent --skill argent-macos-app-interact

Avant de commencer

  • L’installation n’inclut ni abonnement au modèle, ni quota API, ni accès aux fichiers.
  • Étoiles et installations reflètent l’activité, pas un test indépendant de qualité ou de sécurité.
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

argent-device-interact still applies for everything not listed here (run-sequence, await-ui-element, secrets).

Contract

  • Needs the macos-apps flag, which is on by default. When a tool says it is off, tell the user to run the command it names. Do not change the flag yourself.
  • One app is one device. list-devices shows only apps argent started that still run, also those of other sessions: never pick one unless the user named that app or this session started it.
  • Start an app with boot-device {macosAppPath: "<abs path>.app"}, never with open or Xcode. Use launch-app only for an app argent already started: with no recorded path it takes whichever copy Spotlight finds.
  • Build the .app without starting it: xcodebuild ... build, then take the bundle from BUILT_PRODUCTS_DIR (xcodebuild -showBuildSettings). Xcode Run and react-native run-macos start a copy without the argent library: boot-device then fails with already running ... without the argent library. Retry with force: true, but ask the user first when they may have work open in that copy.
  • Never pass force when the error names another build path; report it.
  • After a code change: rebuild, then restart-app.
  • A start result with a note that the app showed no window: taps and screenshots need one. Tell the user, and read the log file it names.
  • On a hardened-runtime refusal, report it to the user. Do not sign files or change code signing.
  • Never activate the app or drive it with osascript, open or other system tools.
  • At the end: stop-all-simulator-servers {devices: ["macos-app-<bundle id>"]} closes argent's connection; the app keeps running.

Per-tool notes

  • Swipe or drag: gesture-drag. Long press: gesture-drag with the same start and end point. Scroll: gesture-scroll.
  • Zoom or rotate: gesture-pinch and gesture-rotate fail; use the app's own controls or shortcuts.
  • After a right-click (gesture-tap with button: "right"), the returned tree lists the menu items; a plain gesture-tap on one chooses it (the menu can stay in the tree for a moment while it closes). keyboard escape closes the menu; enter chooses nothing after a right-click, so tap the item.
  • No hover: a tooltip is out of reach.
  • open-url: the URL goes to the running app. A custom scheme must be one the app declares; http and https go to the app, not the browser; a file: URL opens that document in the app.
  • A SwiftUI DisclosureGroup opens only at its chevron, near the left end of its frame: a tap at the centre passes and does nothing. Tap along the left end in steps of about 0.008 until its value changes.
  • menu-bar for any menu command. An item listed [disabled] cannot be chosen right now: an edit command (Copy, Select All) needs the text field clicked first; while an alert is open only its own commands work, so answer the alert first. When a menu of the app is open, choose fails: send keyboard {key: "escape"}, then choose again.
  • Open and save panels: never click in the file list, which describe cannot read. Use file-panel, also for the Delete or Don't Save prompt of an edited new document.

Tree

  • Identifiers: AppKit accessibility identifier, SwiftUI .accessibilityIdentifier(), web data-testid (else id), React Native testID (also on a plain View or Text).
  • Hint The Mac is locked or fallback walk: clicks and typing still work, elements can be missing (an open context menu among them), and a hidden check cannot pass. Ask the user to unlock when a target is missing.
  • An action that fails or has no effect: a minimized window takes no input. Restore it by choosing it in the Window menu with menu-bar; without such an item, ask the user.

Profiling

Use argent-native-profiler for native profiling or argent-react-native-profiler to capture React performance on a react-native-macos app. Instruments can pause the app during leak checks, delaying actions and inspection. After MACOS_APP_RPC_TIMEOUT, use describe before retrying because the action may already have taken effect.

E2E tests

Read references/e2e.md before recording or writing a test for a Mac app.

react-native-macos

Start Metro before launching a react-native-macos Debug build with boot-device. See argent-react-native-app-workflow for Metro setup. Use describe to inspect the screen. The JavaScript debugger tools are unavailable for Mac apps.

du même dépôt

Autres Skills

Tous les Skills
software-mansion
Communauté

argent-android-emulator-setup

Set up and connect to an Android emulator using argent MCP tools. Use when starting a new session on Android, booting an emulator, getting a device serial, or before any UI interaction task.

Installations / 1h
6
GitHub Stars
3,2 k
Mis à jour
19 nov.
software-mansion
Communauté

argent-create-e2e

Create, record, edit, replay, or repair reusable Argent e2e test YAML files. Use when the user asks to record, replay, or run an e2e test or a repeatable device path, set up profiling or an A/B comparison, or invoke the authoring engine behind argent-qa-e2e. Also use before repeating three or more interactions. For one-off UI checks, acceptance-driven regression tests, or screen video, use argent-test-ui-flow, argent-qa-e2e, or argent-screen-recording respectively.

Installations / 1h
6
GitHub Stars
3,2 k
Mis à jour
19 nov.
software-mansion
Communauté

argent-device-interact

Interact with an iOS simulator or iPhone, Android emulator or phone, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures, scrolling/swiping, typing text, pressing hardware buttons, launching apps, opening URLs, taking screenshots, waiting for an element to appear or disappear, or checking visible app state after interactions. Not for TV targets.

Installations / 1h
6
GitHub Stars
3,2 k
Mis à jour
19 nov.
software-mansion
Communauté

argent-ios-device-interact

Drive a physical iPhone through argent. Use when a physical iPhone is involved (a list-devices iOS entry with kind "device") and ONLY then; never for a simulator. For cable, trust, or signing problems read argent-ios-device-setup.

Installations / 1h
6
GitHub Stars
3,2 k
Mis à jour
19 nov.