@swmansion/argent 0.35.1-next.15 → 0.35.1-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +2 -2
- package/dist/tool-args.generated.d.ts +63 -63
- package/dist/tool-server.cjs +111 -199
- package/package.json +2 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -38588,7 +38588,7 @@ function isCi(env = process.env) {
|
|
|
38588
38588
|
var SESSION_ID2 = randomUUID5();
|
|
38589
38589
|
function readCliVersion() {
|
|
38590
38590
|
if (true) {
|
|
38591
|
-
return "0.35.1-next.
|
|
38591
|
+
return "0.35.1-next.16";
|
|
38592
38592
|
}
|
|
38593
38593
|
return "0.0.0";
|
|
38594
38594
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -17103,7 +17103,7 @@ function isCi(env = process.env) {
|
|
|
17103
17103
|
var SESSION_ID = randomUUID4();
|
|
17104
17104
|
function readCliVersion() {
|
|
17105
17105
|
if (true) {
|
|
17106
|
-
return "0.35.1-next.
|
|
17106
|
+
return "0.35.1-next.16";
|
|
17107
17107
|
}
|
|
17108
17108
|
return "0.0.0";
|
|
17109
17109
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -37853,7 +37853,7 @@ function debuggerLogRegistryText(result) {
|
|
|
37853
37853
|
}
|
|
37854
37854
|
|
|
37855
37855
|
// ../argent-mcp/src/instructions.ts
|
|
37856
|
-
var SERVER_INSTRUCTIONS = "Argent
|
|
37856
|
+
var SERVER_INSTRUCTIONS = "Argent controls iOS, Android, Chromium, Mac, TV, and HarmonyOS apps. Use the platform named by the user; otherwise prefer an already-running device from `list-devices` (do not default to iOS). In a single-platform project, boot that platform. Prefer Argent tools over raw `xcrun`/`adb`; use `launch-app`/`open-url` instead of tapping home-screen icons. Load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first action if an e2e test may be needed (recording is not retroactive), and load the matching `argent-*` skill before React Native build/debug, profiling, physical phone, Mac app, or TV work. Interaction tools return a screenshot + accessibility tree with normalized [0,1] tap frames (or an unchanged note / `-`+`+` diff referencing an earlier screenshot/tree id). Take tap coordinates from that tree \u2014 never guess from pixels \u2014 and call `describe` only without a fresh tree. After two failed taps, re-discover. Use `await-ui-element` instead of polling. Do not stop simulator servers when finishing; call `stop-all-simulator-servers` only when asked to clean up or when a skill tells you to recycle a device's services, scoped with `devices: [...]` (the tool-server is shared across agents), and never stop a user-started Metro. CLI: `argent --help`.";
|
|
37857
37857
|
|
|
37858
37858
|
// ../argent-mcp/src/installed-version.ts
|
|
37859
37859
|
import * as fs12 from "node:fs";
|
|
@@ -38058,7 +38058,7 @@ async function startMcpServer(options) {
|
|
|
38058
38058
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38059
38059
|
const whatsNewOn = whatsNewEnabled();
|
|
38060
38060
|
const installedVersion = getInstalledVersion();
|
|
38061
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38061
|
+
const highlightsVersion = true ? "0.35.1-next.16" : installedVersion;
|
|
38062
38062
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38063
38063
|
const trees = createTreeMemory();
|
|
38064
38064
|
const screenshots = createScreenshotMemory();
|
|
@@ -46,11 +46,11 @@ export interface ArgentToolArgs {
|
|
|
46
46
|
minStableMs?: number;
|
|
47
47
|
};
|
|
48
48
|
"await-ui-element": {
|
|
49
|
-
/** Target device id from `list-devices
|
|
49
|
+
/** Target device id from `list-devices`. */
|
|
50
50
|
udid: string;
|
|
51
|
-
/**
|
|
51
|
+
/** `exists`: in tree; `visible`: non-zero on-screen frame; `hidden`: absent or zero-area; `text`: first visible match in reading order matches `expectedText`. On a Mac app, open menus match before alerts/sheets and the window. */
|
|
52
52
|
condition: "exists" | "visible" | "hidden" | "text";
|
|
53
|
-
/** Element
|
|
53
|
+
/** Element matcher (at least one field; all given fields must match). */
|
|
54
54
|
selector: {
|
|
55
55
|
/** Case-insensitive substring of the element's visible label or value. */
|
|
56
56
|
text?: string;
|
|
@@ -59,15 +59,15 @@ export interface ArgentToolArgs {
|
|
|
59
59
|
/** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
|
|
60
60
|
role?: string;
|
|
61
61
|
};
|
|
62
|
-
/** Required for
|
|
62
|
+
/** Required for `text`: expected substring or full string (see `textMatch`). */
|
|
63
63
|
expectedText?: string;
|
|
64
|
-
/**
|
|
64
|
+
/** Case-insensitive match mode for `text`: `contains` (default) or `equals`. */
|
|
65
65
|
textMatch?: "contains" | "equals";
|
|
66
|
-
/** iOS
|
|
66
|
+
/** iOS simulator only: fallback bundle id for `describe`. */
|
|
67
67
|
bundleId?: string;
|
|
68
|
-
/**
|
|
68
|
+
/** Timeout in ms (default 5000). */
|
|
69
69
|
timeoutMs?: number;
|
|
70
|
-
/**
|
|
70
|
+
/** Poll interval in ms (default 400). */
|
|
71
71
|
pollIntervalMs?: number;
|
|
72
72
|
};
|
|
73
73
|
await_user_selection: {
|
|
@@ -75,39 +75,39 @@ export interface ArgentToolArgs {
|
|
|
75
75
|
timeoutSeconds?: number;
|
|
76
76
|
};
|
|
77
77
|
"boot-device": {
|
|
78
|
-
/** iOS
|
|
78
|
+
/** iOS simulator UDID from `list-devices`. Or Mac app id (`macos-app-<bundle id>`) to relaunch from its last path. */
|
|
79
79
|
udid?: string;
|
|
80
|
-
/** Android
|
|
80
|
+
/** Android AVD name (`kind: 'avd'` from `list-devices`). Reuses a compatible running emulator. */
|
|
81
81
|
avdName?: string;
|
|
82
|
-
/** Vega (Fire TV)
|
|
82
|
+
/** Vega (Fire TV) VVD image name from `list-devices` (e.g. `tv`). */
|
|
83
83
|
vvdImage?: string;
|
|
84
|
-
/** HarmonyOS
|
|
84
|
+
/** HarmonyOS emulator instance name or `harmony-emulator-<name>` id from `list-devices`. */
|
|
85
85
|
harmonyInstance?: string;
|
|
86
|
-
/**
|
|
86
|
+
/** Overall boot budget in ms (Android default 480000, Vega 120000, HarmonyOS 180000). On HarmonyOS with `force`, this spans shutdown too. */
|
|
87
87
|
bootTimeoutMs?: number;
|
|
88
|
-
/** Shut down and
|
|
88
|
+
/** Shut down and reboot even if already running. On HarmonyOS, also ties a running instance to its `hdc` connect key. On a Mac app, quits and restarts the same .app build, including a copy running without the argent library (losing its unsaved changes); fails if the app shows a save prompt. Ignored for Electron. */
|
|
89
89
|
force?: boolean;
|
|
90
|
-
/** Android only
|
|
90
|
+
/** Android only: enable emulator audio (default false, or `boot-sound` flag). Pair with `force: true` to toggle a running emulator. */
|
|
91
91
|
sound?: boolean;
|
|
92
|
-
/** Android on a macOS host only:
|
|
92
|
+
/** Android on a macOS host only: enable guest Vulkan (default false; true needed for WebGPU/Vulkan renderers, may crash Chrome GPU). Pair with `force: true` to toggle. */
|
|
93
93
|
guestVulkan?: boolean;
|
|
94
|
-
/** Android only: boot
|
|
94
|
+
/** Android only: boot `-read-only` (default false) to run multiple concurrent instances of one AVD without saving snapshot changes. */
|
|
95
95
|
readOnly?: boolean;
|
|
96
|
-
/** Android only:
|
|
96
|
+
/** Android only: emulator console port (even, 5554–5584; serial `emulator-<port>`, gRPC on port+3000). Defaults to first free port. */
|
|
97
97
|
port?: number;
|
|
98
|
-
/** Local iOS simulator only: apply accessibility
|
|
98
|
+
/** Local iOS simulator only: apply accessibility prefs to a Shutdown simulator without booting. Cannot combine with `force: true`. */
|
|
99
99
|
prepareOnly?: boolean;
|
|
100
|
-
/** iOS only: boot
|
|
100
|
+
/** iOS only: boot simulator core without opening Simulator.app (`ARGENT_SIMULATOR_NO_WINDOW=1` forces host-wide). */
|
|
101
101
|
headless?: boolean;
|
|
102
|
-
/** Electron: path to
|
|
102
|
+
/** Electron: path to `.app` bundle, executable, or project directory with `package.json`. */
|
|
103
103
|
electronAppPath?: string;
|
|
104
|
-
/** Electron
|
|
104
|
+
/** Electron only: CDP remote-debugging port (default: free port; id `chromium-cdp-<port>`). */
|
|
105
105
|
electronPort?: number;
|
|
106
|
-
/** Electron
|
|
106
|
+
/** Electron only: extra CLI args forwarded to the Electron binary. */
|
|
107
107
|
electronArgs?: Array<string>;
|
|
108
|
-
/** Mac app: path to
|
|
108
|
+
/** Mac app: path to `.app` bundle (id `macos-app-<bundle id>`). */
|
|
109
109
|
macosAppPath?: string;
|
|
110
|
-
/** Mac app only: arguments
|
|
110
|
+
/** Mac app only: launch arguments (omitted = none). */
|
|
111
111
|
macosAppArgs?: Array<string>;
|
|
112
112
|
};
|
|
113
113
|
button: {
|
|
@@ -231,9 +231,9 @@ export interface ArgentToolArgs {
|
|
|
231
231
|
device_id: string;
|
|
232
232
|
};
|
|
233
233
|
describe: {
|
|
234
|
-
/** Target device id from `list-devices
|
|
234
|
+
/** Target device id from `list-devices`. */
|
|
235
235
|
udid: string;
|
|
236
|
-
/**
|
|
236
|
+
/** iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted). */
|
|
237
237
|
bundleId?: string;
|
|
238
238
|
};
|
|
239
239
|
"dismiss-update": {
|
|
@@ -487,55 +487,55 @@ export interface ArgentToolArgs {
|
|
|
487
487
|
durationMs?: number;
|
|
488
488
|
};
|
|
489
489
|
"gesture-swipe": {
|
|
490
|
-
/** Target device id from `list-devices
|
|
490
|
+
/** Target device id from `list-devices`. */
|
|
491
491
|
udid: string;
|
|
492
|
-
/** Start x. */
|
|
492
|
+
/** Start x [0,1]. */
|
|
493
493
|
fromX: number;
|
|
494
|
-
/** Start y. */
|
|
494
|
+
/** Start y [0,1]. */
|
|
495
495
|
fromY: number;
|
|
496
|
-
/** End x. */
|
|
496
|
+
/** End x [0,1]. */
|
|
497
497
|
toX: number;
|
|
498
|
-
/** End y. */
|
|
498
|
+
/** End y [0,1]. */
|
|
499
499
|
toY: number;
|
|
500
|
-
/**
|
|
500
|
+
/** Swipe duration in ms (default 300). */
|
|
501
501
|
durationMs?: number;
|
|
502
|
-
/**
|
|
502
|
+
/** Default true (flinging swipe). Set false to ease out with no fling for deterministic scroll distance (requires durationMs >= 150). */
|
|
503
503
|
momentum?: boolean;
|
|
504
504
|
};
|
|
505
505
|
"gesture-tap": {
|
|
506
|
-
/** Target device id from `list-devices
|
|
506
|
+
/** Target device id from `list-devices`. */
|
|
507
507
|
udid: string;
|
|
508
|
-
/** Horizontal
|
|
508
|
+
/** Horizontal screen fraction [0,1]. */
|
|
509
509
|
x: number;
|
|
510
|
-
/** Vertical
|
|
510
|
+
/** Vertical screen fraction [0,1]. */
|
|
511
511
|
y: number;
|
|
512
|
-
/**
|
|
512
|
+
/** Tap/click count as one OS gesture (2 = double-tap; default 1). On physical iOS, higher counts loop single taps, which a double-tap recognizer may pair. */
|
|
513
513
|
clickCount?: number;
|
|
514
|
-
/**
|
|
514
|
+
/** Mac app only: mouse button ("left" default, or "right"). */
|
|
515
515
|
button?: "left" | "right";
|
|
516
|
-
/**
|
|
516
|
+
/** Mac app only: modifier keys held during click. */
|
|
517
517
|
modifiers?: Array<"control" | "option" | "shift" | "command">;
|
|
518
518
|
};
|
|
519
519
|
keyboard: {
|
|
520
|
-
/** Target device id from `list-devices
|
|
520
|
+
/** Target device id from `list-devices`. */
|
|
521
521
|
udid: string;
|
|
522
|
-
/** Text to type
|
|
522
|
+
/** Text to type. Cannot be combined with `key` (use two steps in `run-sequence` to type then press enter). Supports `{{secret:<NAME>}}` placeholders resolved server-side from `ARGENT_SECRET_<NAME>` / `.argent/secrets.env` (auto-screenshot is skipped; combine with submit in one `run-sequence` to keep the skip; never ask the user for plaintext). */
|
|
523
523
|
text?: string;
|
|
524
|
-
/** Named key
|
|
524
|
+
/** Named key. Cannot be combined with `text` (use two steps in `run-sequence`). Values: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Not supported on Apple TV / Android TV (use `tv-remote`). Physical iOS: enter/backspace only. HarmonyOS: enter, backspace, space, arrow-left/right. Mac app: also delete (forward delete), home, end, page-up/down, and modifier shortcuts (e.g. command+a). */
|
|
525
525
|
key?: string;
|
|
526
526
|
/** Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`. */
|
|
527
527
|
repeat?: number;
|
|
528
|
-
/** Delay in ms between key presses (default 50
|
|
528
|
+
/** Delay in ms between key presses (default 50; ignored on platforms that type in one shot). */
|
|
529
529
|
delayMs?: number;
|
|
530
530
|
};
|
|
531
531
|
"launch-app": {
|
|
532
|
-
/** Target device id from `list-devices
|
|
532
|
+
/** Target device id from `list-devices`. */
|
|
533
533
|
udid: string;
|
|
534
|
-
/** App identifier
|
|
534
|
+
/** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id from manifest.toml e.g. `com.example.app.main`, HarmonyOS bundle name from `bm dump -a`, or Chromium tag). */
|
|
535
535
|
bundleId: string;
|
|
536
|
-
/** Android
|
|
536
|
+
/** Android only: Activity name (default: launcher activity). */
|
|
537
537
|
activity?: string;
|
|
538
|
-
/** Apple
|
|
538
|
+
/** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. Relaunches running simulators/phones to apply. */
|
|
539
539
|
launchArgs?: Array<string>;
|
|
540
540
|
};
|
|
541
541
|
"list-devices": Record<string, never>;
|
|
@@ -940,13 +940,13 @@ export interface ArgentToolArgs {
|
|
|
940
940
|
appPath: string;
|
|
941
941
|
};
|
|
942
942
|
"restart-app": {
|
|
943
|
-
/** Target device id from `list-devices
|
|
943
|
+
/** Target device id from `list-devices`. */
|
|
944
944
|
udid: string;
|
|
945
|
-
/** App identifier
|
|
945
|
+
/** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id, or HarmonyOS bundle name). */
|
|
946
946
|
bundleId: string;
|
|
947
|
-
/** Android
|
|
947
|
+
/** Android only: Activity name to relaunch (default: launcher activity). */
|
|
948
948
|
activity?: string;
|
|
949
|
-
/** Apple
|
|
949
|
+
/** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. */
|
|
950
950
|
launchArgs?: Array<string>;
|
|
951
951
|
};
|
|
952
952
|
rotate: {
|
|
@@ -956,20 +956,20 @@ export interface ArgentToolArgs {
|
|
|
956
956
|
orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
957
957
|
};
|
|
958
958
|
"run-sequence": {
|
|
959
|
-
/** Target device id from `list-devices
|
|
959
|
+
/** Target device id from `list-devices`, shared across all steps. */
|
|
960
960
|
udid: string;
|
|
961
|
-
/** Ordered
|
|
961
|
+
/** Ordered steps to execute. */
|
|
962
962
|
steps: Array<{
|
|
963
|
-
/**
|
|
963
|
+
/** Allowed tool name (see description). */
|
|
964
964
|
tool: string;
|
|
965
|
-
/** Tool arguments (
|
|
965
|
+
/** Tool arguments (omit `udid`, injected automatically). */
|
|
966
966
|
args: {
|
|
967
967
|
[key: string]: unknown;
|
|
968
968
|
};
|
|
969
|
-
/**
|
|
969
|
+
/** Extra pause in ms after step settle (default 100). */
|
|
970
970
|
delayMs?: number;
|
|
971
971
|
}>;
|
|
972
|
-
/** Wait up to 1000ms
|
|
972
|
+
/** Wait up to 1000ms for tree settle between screen-changing steps (default true). */
|
|
973
973
|
settle?: boolean;
|
|
974
974
|
};
|
|
975
975
|
"screen-recording-start": {
|
|
@@ -987,15 +987,15 @@ export interface ArgentToolArgs {
|
|
|
987
987
|
udid: string;
|
|
988
988
|
};
|
|
989
989
|
screenshot: {
|
|
990
|
-
/** Target device id from `list-devices
|
|
990
|
+
/** Target device id from `list-devices`. */
|
|
991
991
|
udid: string;
|
|
992
|
-
/** Orientation override
|
|
992
|
+
/** Orientation override (rarely needed; captures already follow UI orientation). Rejected on HarmonyOS (captures display in current orientation). Ignored on physical iPhones. */
|
|
993
993
|
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
994
|
-
/** Scale factor
|
|
994
|
+
/** Scale factor (default 0.25 on iOS/Android/HarmonyOS or `ARGENT_SCREENSHOT_SCALE`, 576px long side on TV, 1.0 on Chromium, <=768px on Mac). */
|
|
995
995
|
scale?: number;
|
|
996
|
-
/** Set false only when
|
|
996
|
+
/** Set false only when saving a full-res (`scale: 1.0`) baseline/current for `screenshot-diff`. */
|
|
997
997
|
includeImageInContext?: boolean;
|
|
998
|
-
/**
|
|
998
|
+
/** Chromium only: downscaler when scale < 1 (default lanczos3). */
|
|
999
999
|
downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
|
|
1000
1000
|
};
|
|
1001
1001
|
"screenshot-diff": {
|
package/dist/tool-server.cjs
CHANGED
|
@@ -72957,7 +72957,7 @@ function isCi(env = process.env) {
|
|
|
72957
72957
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
72958
72958
|
function readCliVersion() {
|
|
72959
72959
|
if (true) {
|
|
72960
|
-
return "0.35.1-next.
|
|
72960
|
+
return "0.35.1-next.16";
|
|
72961
72961
|
}
|
|
72962
72962
|
return "0.0.0";
|
|
72963
72963
|
}
|
|
@@ -106124,14 +106124,8 @@ function externalShadowIds(external) {
|
|
|
106124
106124
|
var zodSchema2 = external_exports.object({});
|
|
106125
106125
|
var listDevicesTool = {
|
|
106126
106126
|
id: "list-devices",
|
|
106127
|
-
description: `List
|
|
106128
|
-
Returns { devices, notes? }.
|
|
106129
|
-
Start a stopped device with boot-device: an iOS simulator by 'udid', an Android AVD (kind 'avd', no serial until it runs) by 'avdName', a Vega VVD by 'vvdImage'. A physical phone (kind 'device') needs no boot; use one only when the user asks for it. A physical iPhone is usable only in state 'connected'.
|
|
106130
|
-
<flag:harmonyos>HarmonyOS kind 'device' is an \`hdc\` target that the tools drive; kind 'emulator' is a DevEco Studio instance that boot-device starts, and a running one is listed as both.
|
|
106131
|
-
</flag:harmonyos>platform 'ios-remote' is an iOS simulator hosted on Argent Cloud, usable from Linux too (https://argent.swmansion.com/cloud/); drive it with the same tools by its 'remote:' udid. A 'deviceSet' simulator (e.g. from Radon IDE) runs headless.
|
|
106132
|
-
runtimeKind 'tv' marks a focus-driven TV target: use describe, tv-remote and keyboard, not gestures. 'foldable: true' marks a device the fold tool folds.
|
|
106133
|
-
Chromium apps are found on CDP port 9222 (more via ARGENT_CHROMIUM_PORTS); boot-device with electronAppPath launches one.
|
|
106134
|
-
'notes' says which platform this machine cannot reach and what would change that; tell the user when their task needs that platform.`,
|
|
106127
|
+
description: `List available targets (ready devices first): iOS simulators/iPhones, Android emulators/AVDs/phones, Chromium apps, Vega devices, <flag:harmonyos>HarmonyOS, </flag:harmonyos><flag:macos-apps>Mac apps, </flag:macos-apps>and Argent Cloud simulators (\`ios-remote\`).
|
|
106128
|
+
Use when starting a session to discover target ids. Returns { devices, notes? }. Pass a ready device's \`udid\`, \`serial\`, or \`id\` to other tools; start stopped targets via \`boot-device\`. Use physical phones (\`kind: 'device'\`) only when asked. \`runtimeKind: 'tv'\` uses \`tv-remote\`, not gestures. Fails if device discovery errors; surface \`notes\` if a needed platform is unavailable.`,
|
|
106135
106129
|
zodSchema: zodSchema2,
|
|
106136
106130
|
alwaysLoad: true,
|
|
106137
106131
|
searchHint: "list devices simulators emulators avd serial udid ios android chromium vega <flag:harmonyos>harmony harmonyos </flag:harmonyos>app fire tv session start",
|
|
@@ -124091,28 +124085,18 @@ function timeoutNote(params, lastTree, fetchError, lastData) {
|
|
|
124091
124085
|
return appendDiagnostics(base, lastData);
|
|
124092
124086
|
}
|
|
124093
124087
|
var zodSchema3 = external_exports.object({
|
|
124094
|
-
udid: external_exports.string().min(1).describe(
|
|
124095
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
124096
|
-
),
|
|
124088
|
+
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
124097
124089
|
condition: external_exports.enum(["exists", "visible", "hidden", "text"]).describe(
|
|
124098
|
-
"
|
|
124090
|
+
"`exists`: in tree; `visible`: non-zero on-screen frame; `hidden`: absent or zero-area; `text`: first visible match in reading order matches `expectedText`.<flag:macos-apps> On a Mac app, open menus match before alerts/sheets and the window.</flag:macos-apps>"
|
|
124099
124091
|
),
|
|
124100
124092
|
selector: selectorSchema.describe(
|
|
124101
|
-
"Element
|
|
124102
|
-
),
|
|
124103
|
-
expectedText: external_exports.string().min(1).optional().describe(
|
|
124104
|
-
"Required for condition `text`: the string the checked match must contain or equal (see `textMatch`)."
|
|
124105
|
-
),
|
|
124106
|
-
textMatch: external_exports.enum(["contains", "equals"]).optional().describe(
|
|
124107
|
-
"For condition `text`: how expectedText is compared. `contains` (default) is a case-insensitive substring; `equals` is a case-insensitive full-string match."
|
|
124093
|
+
"Element matcher (at least one field; all given fields must match)."
|
|
124108
124094
|
),
|
|
124109
|
-
|
|
124110
|
-
|
|
124111
|
-
),
|
|
124112
|
-
timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
|
|
124113
|
-
|
|
124114
|
-
),
|
|
124115
|
-
pollIntervalMs: external_exports.number().int().min(50).max(5e3).optional().describe(`How often to re-check the tree (default ${DEFAULT_POLL_INTERVAL_MS}).`)
|
|
124095
|
+
expectedText: external_exports.string().min(1).optional().describe("Required for `text`: expected substring or full string (see `textMatch`)."),
|
|
124096
|
+
textMatch: external_exports.enum(["contains", "equals"]).optional().describe("Case-insensitive match mode for `text`: `contains` (default) or `equals`."),
|
|
124097
|
+
bundleId: external_exports.string().optional().describe("iOS simulator only: fallback bundle id for `describe`."),
|
|
124098
|
+
timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(`Timeout in ms (default ${DEFAULT_TIMEOUT_MS3}).`),
|
|
124099
|
+
pollIntervalMs: external_exports.number().int().min(50).max(5e3).optional().describe(`Poll interval in ms (default ${DEFAULT_POLL_INTERVAL_MS}).`)
|
|
124116
124100
|
}).strict().refine((p) => p.condition !== "text" || p.expectedText !== void 0, {
|
|
124117
124101
|
message: "condition `text` requires expectedText",
|
|
124118
124102
|
path: ["expectedText"]
|
|
@@ -124142,9 +124126,8 @@ function createAwaitUiElementTool(registry2) {
|
|
|
124142
124126
|
}
|
|
124143
124127
|
return {
|
|
124144
124128
|
id: AWAIT_UI_ELEMENT_TOOL_ID,
|
|
124145
|
-
description: `Block until a UI element
|
|
124146
|
-
Use when
|
|
124147
|
-
Returns { success: boolean, elapsed: number, note?, cause? }. If the condition does not hold by the timeout, it returns success=false, and that is not always a verdict on the condition: \`cause\` says which it was: \`unmet\` (the tree was read and the condition was false there), \`unreadable\` (no trustworthy read, so nothing was judged) or \`cancelled\`. \`note\` describes what was seen. Only \`unmet\` licenses rewriting the check.<flag:harmonyos> A \`note\` on success=true can also say the tree was read off a suspended HarmonyOS panel, which is not the live screen.</flag:harmonyos>`,
|
|
124129
|
+
description: `Block server-side until a UI element matches \`condition\` on the \`describe\` tree or times out (never poll screenshot/describe manually).
|
|
124130
|
+
Use when waiting for UI to appear, disappear, or update after an action. Returns { success, elapsed, note?, cause? }. On timeout (\`success: false\`), \`cause\` is \`unmet\` (live tree read and condition false; \`note\` says what was seen), \`unreadable\` (blind/failed read), or \`cancelled\`; only \`unmet\` licenses rewriting the check.<flag:harmonyos> A \`note\` on success=true can also say the tree was read off a suspended HarmonyOS panel, which is not the live screen.</flag:harmonyos> Fails if the target backend is unreachable.`,
|
|
124148
124131
|
zodSchema: zodSchema3,
|
|
124149
124132
|
alwaysLoad: true,
|
|
124150
124133
|
searchHint: "wait await poll until visible hidden exists text appears disappears timeout element condition settle",
|
|
@@ -135215,72 +135198,60 @@ var capability2 = {
|
|
|
135215
135198
|
};
|
|
135216
135199
|
var zodSchema11 = external_exports.object({
|
|
135217
135200
|
udid: external_exports.string().optional().describe(
|
|
135218
|
-
"iOS
|
|
135201
|
+
"iOS simulator UDID from `list-devices`.<flag:macos-apps> Or Mac app id (`macos-app-<bundle id>`) to relaunch from its last path.</flag:macos-apps>"
|
|
135219
135202
|
),
|
|
135220
135203
|
avdName: external_exports.string().optional().describe(
|
|
135221
|
-
"Android
|
|
135222
|
-
),
|
|
135223
|
-
vvdImage: external_exports.string().optional().describe(
|
|
135224
|
-
"Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`)."
|
|
135204
|
+
"Android AVD name (`kind: 'avd'` from `list-devices`). Reuses a compatible running emulator."
|
|
135225
135205
|
),
|
|
135206
|
+
vvdImage: external_exports.string().optional().describe("Vega (Fire TV) VVD image name from `list-devices` (e.g. `tv`)."),
|
|
135226
135207
|
harmonyInstance: external_exports.string().optional().describe(
|
|
135227
|
-
|
|
135208
|
+
"HarmonyOS emulator instance name or `harmony-emulator-<name>` id from `list-devices`."
|
|
135228
135209
|
).meta({ [FLAG_META_KEY]: HARMONY_FLAG }),
|
|
135229
135210
|
bootTimeoutMs: external_exports.number().int().min(3e4).max(9e5).optional().describe(
|
|
135230
|
-
"
|
|
135211
|
+
"Overall boot budget in ms (Android default 480000, Vega 120000<flag:harmonyos>, HarmonyOS 180000</flag:harmonyos>).<flag:harmonyos> On HarmonyOS with `force`, this spans shutdown too.</flag:harmonyos>"
|
|
135231
135212
|
),
|
|
135232
135213
|
force: external_exports.boolean().optional().describe(
|
|
135233
|
-
"Shut down and
|
|
135214
|
+
"Shut down and reboot even if already running.<flag:harmonyos> On HarmonyOS, also ties a running instance to its `hdc` connect key.</flag:harmonyos><flag:macos-apps> On a Mac app, quits and restarts the same .app build, including a copy running without the argent library (losing its unsaved changes); fails if the app shows a save prompt.</flag:macos-apps> Ignored for Electron."
|
|
135234
135215
|
),
|
|
135235
135216
|
sound: external_exports.boolean().optional().describe(
|
|
135236
|
-
"Android only
|
|
135217
|
+
"Android only: enable emulator audio (default false, or `boot-sound` flag). Pair with `force: true` to toggle a running emulator."
|
|
135237
135218
|
),
|
|
135238
135219
|
guestVulkan: external_exports.boolean().optional().describe(
|
|
135239
|
-
"Android on a macOS host only:
|
|
135220
|
+
"Android on a macOS host only: enable guest Vulkan (default false; true needed for WebGPU/Vulkan renderers, may crash Chrome GPU). Pair with `force: true` to toggle."
|
|
135240
135221
|
),
|
|
135241
135222
|
readOnly: external_exports.boolean().optional().describe(
|
|
135242
|
-
"Android only: boot
|
|
135223
|
+
"Android only: boot `-read-only` (default false) to run multiple concurrent instances of one AVD without saving snapshot changes."
|
|
135243
135224
|
),
|
|
135244
135225
|
// The range is checked on the Android path only (`androidPortError`): off
|
|
135245
135226
|
// Android the key is ignored, so an agent echoing a Chromium `port` such as
|
|
135246
135227
|
// 9222 must not fail validation.
|
|
135247
135228
|
port: external_exports.number().int().optional().describe(
|
|
135248
|
-
"Android only:
|
|
135229
|
+
"Android only: emulator console port (even, 5554\u20135584; serial `emulator-<port>`, gRPC on port+3000). Defaults to first free port."
|
|
135249
135230
|
),
|
|
135250
135231
|
prepareOnly: external_exports.boolean().optional().describe(
|
|
135251
|
-
"Local iOS simulator only: apply accessibility
|
|
135232
|
+
"Local iOS simulator only: apply accessibility prefs to a Shutdown simulator without booting. Cannot combine with `force: true`."
|
|
135252
135233
|
),
|
|
135253
135234
|
headless: external_exports.boolean().optional().describe(
|
|
135254
|
-
"iOS only: boot
|
|
135235
|
+
"iOS only: boot simulator core without opening Simulator.app (`ARGENT_SIMULATOR_NO_WINDOW=1` forces host-wide)."
|
|
135255
135236
|
),
|
|
135256
135237
|
electronAppPath: external_exports.string().optional().describe(
|
|
135257
|
-
"Electron: path to
|
|
135238
|
+
"Electron: path to `.app` bundle, executable, or project directory with `package.json`."
|
|
135258
135239
|
),
|
|
135259
135240
|
electronPort: external_exports.number().int().min(1024).max(65535).optional().describe(
|
|
135260
|
-
"Electron
|
|
135241
|
+
"Electron only: CDP remote-debugging port (default: free port; id `chromium-cdp-<port>`)."
|
|
135261
135242
|
),
|
|
135262
|
-
electronArgs: external_exports.array(external_exports.string()).optional().describe(
|
|
135263
|
-
|
|
135264
|
-
)
|
|
135265
|
-
macosAppPath: external_exports.string().optional().describe(
|
|
135266
|
-
"Mac app: path to the .app bundle to start with the argent library; its device id is `macos-app-<bundle id>`. An exported or notarized Release build with the hardened runtime cannot be driven without extra entitlements; a hardened Debug build needs the step the error names."
|
|
135267
|
-
).meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG }),
|
|
135268
|
-
macosAppArgs: external_exports.array(external_exports.string()).optional().describe(
|
|
135269
|
-
"Mac app only: arguments for the app executable. Omitted, the app starts with none, also when an earlier start had some."
|
|
135270
|
-
).meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG })
|
|
135243
|
+
electronArgs: external_exports.array(external_exports.string()).optional().describe("Electron only: extra CLI args forwarded to the Electron binary."),
|
|
135244
|
+
macosAppPath: external_exports.string().optional().describe("Mac app: path to `.app` bundle (id `macos-app-<bundle id>`).").meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG }),
|
|
135245
|
+
macosAppArgs: external_exports.array(external_exports.string()).optional().describe("Mac app only: launch arguments (omitted = none).").meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG })
|
|
135271
135246
|
});
|
|
135272
135247
|
function createBootDeviceTool(registry2) {
|
|
135273
135248
|
return {
|
|
135274
135249
|
id: "boot-device",
|
|
135275
135250
|
// Boots routinely run past the 30s MCP fetch timeout.
|
|
135276
135251
|
longRunning: true,
|
|
135277
|
-
description: `Start
|
|
135278
|
-
|
|
135279
|
-
|
|
135280
|
-
Returns a tagged payload: { platform: 'ios', udid, booted, note? } or { platform: 'android', serial, avdName, booted, note? } or { platform: 'vega', serial, vvdImage, booted } or <flag:harmonyos>{ platform: 'harmony', udid, instanceName, booted, note? } or </flag:harmonyos>{ platform: 'chromium', id, port, pid, booted } (an Electron app boots as a Chromium/CDP device).<flag:macos-apps>
|
|
135281
|
-
Mac apps return platform 'macos' and kind 'catalyst' or 'app'. Pass the returned id as udid to interaction tools. Follow the note when present.</flag:macos-apps>
|
|
135282
|
-
On Android the tool hot-boots from the AVD's default_boot snapshot when usable and falls back to a slower cold boot otherwise. Vega starts the single SDK-managed VVD (~10s). If an Android/Electron boot stage fails, the tool terminates the device it spawned so the next retry starts clean.<flag:harmonyos>
|
|
135283
|
-
HarmonyOS hands the instance to DevEco Studio's Emulator manager, then waits for it to register with 'hdc' and returns its connect key as 'udid', the id the interaction tools drive. The manager reports no readiness signal and never names a port. When the key could not be resolved, the payload names the instance instead, and a 'note' is present whenever the boot left something unproven: no key and why, or a key that is not yet answering or could not be checked against the instance. Huawei serves the emulator images only within mainland China, so a host outside it usually has no instance to start; one that already has an image is started like any other.</flag:harmonyos>`,
|
|
135252
|
+
description: `Start a target device or app and wait until ready: iOS simulator, Android emulator, Vega VVD, <flag:harmonyos>HarmonyOS emulator, </flag:harmonyos><flag:macos-apps>Mac app, </flag:macos-apps>or Electron app.
|
|
135253
|
+
Use when starting a stopped target; pass exactly one target key (\`udid\`, \`avdName\`, \`vvdImage\`, <flag:harmonyos>\`harmonyInstance\`, </flag:harmonyos><flag:macos-apps>\`macosAppPath\`, </flag:macos-apps>or \`electronAppPath\`).
|
|
135254
|
+
Returns a platform-tagged payload with the target id (\`udid\` / \`serial\` / \`id\`), \`booted\`, and optional \`note\`.<flag:harmonyos> HarmonyOS starts the instance via DevEco Studio's Emulator manager and waits for its \`hdc\` connect key as \`udid\` (images are served only in mainland China; \`note\` explains any unproven key/readiness).</flag:harmonyos> Fails if the target is missing or cannot boot (failed Android/Electron spawns are cleaned up automatically).`,
|
|
135284
135255
|
zodSchema: zodSchema11,
|
|
135285
135256
|
alwaysLoad: true,
|
|
135286
135257
|
searchHint: "boot start launch simulator emulator avd device session ios android vega vvd firetv <flag:harmonyos>harmony harmonyos deveco </flag:harmonyos>cold hot",
|
|
@@ -136016,17 +135987,13 @@ var capability3 = {
|
|
|
136016
135987
|
macos: { app: true, catalyst: true }
|
|
136017
135988
|
};
|
|
136018
135989
|
var zodSchema12 = external_exports.object({
|
|
136019
|
-
udid: external_exports.string().min(1).describe(
|
|
136020
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
136021
|
-
),
|
|
135990
|
+
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
136022
135991
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
136023
|
-
"App identifier
|
|
136024
|
-
),
|
|
136025
|
-
activity: external_exports.string().regex(ACTIVITY_PATTERN, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
|
|
136026
|
-
"Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted, the app's default launcher activity is used."
|
|
135992
|
+
"App identifier (iOS<flag:macos-apps>/Mac app</flag:macos-apps> bundle id, Android package name, Vega interactive component app id from manifest.toml e.g. `com.example.app.main`,<flag:harmonyos> HarmonyOS bundle name from `bm dump -a`,</flag:harmonyos> or Chromium tag)."
|
|
136027
135993
|
),
|
|
135994
|
+
activity: external_exports.string().regex(ACTIVITY_PATTERN, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe("Android only: Activity name (default: launcher activity)."),
|
|
136028
135995
|
launchArgs: external_exports.array(external_exports.string()).optional().describe(
|
|
136029
|
-
'Apple
|
|
135996
|
+
'Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. Relaunches running simulators/phones to apply.'
|
|
136030
135997
|
)
|
|
136031
135998
|
});
|
|
136032
135999
|
function createLaunchAppTool(registry2) {
|
|
@@ -136034,14 +136001,11 @@ function createLaunchAppTool(registry2) {
|
|
|
136034
136001
|
id: "launch-app",
|
|
136035
136002
|
// Android's device probes plus `am start -W` can outlast the 30s MCP fetch timeout.
|
|
136036
136003
|
longRunning: true,
|
|
136037
|
-
description: `Open an installed app, or
|
|
136038
|
-
Use when starting
|
|
136039
|
-
Returns { launched, bundleId, <flag:macos-apps>kind?, appPath?, args?, </flag:macos-apps>note?, networkCapture? }. Fails if the app is not installed
|
|
136040
|
-
|
|
136041
|
-
|
|
136042
|
-
|
|
136043
|
-
Common iOS bundle ids: com.apple.MobileSMS, com.apple.mobilesafari, com.apple.Preferences, com.apple.Maps, com.apple.mobileslideshow (Photos), com.apple.MobileAddressBook
|
|
136044
|
-
Common Android packages: com.android.settings, com.android.chrome, com.google.android.apps.maps, com.google.android.gm, com.android.vending, com.google.android.dialer, com.google.android.apps.messaging`,
|
|
136004
|
+
description: `Open an installed app, or refresh a Chromium target (use \`open-url\` to navigate Chromium).<flag:macos-apps> On a Mac app, starts it in the background if stopped.</flag:macos-apps> Also prepares native-devtools injection on iOS/tvOS and registers the active app on physical iPhones (\`com.apple.springboard\` registers without launching so \`describe\` can read system dialogs).
|
|
136005
|
+
Use when starting an app; prefer this over tapping home-screen icons.
|
|
136006
|
+
Returns { launched, bundleId, <flag:macos-apps>kind?, appPath?, args?, </flag:macos-apps>note?, networkCapture? }. Fails if the app is not installed.
|
|
136007
|
+
Common iOS ids: com.apple.Preferences, com.apple.mobilesafari, com.apple.MobileSMS, com.apple.Maps, com.apple.mobileslideshow, com.apple.MobileAddressBook.
|
|
136008
|
+
Common Android packages: com.android.settings, com.android.chrome, com.google.android.apps.maps.`,
|
|
136045
136009
|
zodSchema: zodSchema12,
|
|
136046
136010
|
alwaysLoad: true,
|
|
136047
136011
|
searchHint: "open start app bundle id package simulator emulator chromium vega launch tvos apple tv fire tv",
|
|
@@ -136317,28 +136281,20 @@ var capability4 = {
|
|
|
136317
136281
|
macos: { app: true, catalyst: true }
|
|
136318
136282
|
};
|
|
136319
136283
|
var zodSchema13 = external_exports.object({
|
|
136320
|
-
udid: external_exports.string().min(1).describe(
|
|
136321
|
-
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps><flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial)."
|
|
136322
|
-
),
|
|
136284
|
+
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
136323
136285
|
bundleId: external_exports.string().min(1).regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
136324
|
-
"App identifier
|
|
136286
|
+
"App identifier (iOS<flag:macos-apps>/Mac app</flag:macos-apps> bundle id, Android package name, Vega interactive component app id<flag:harmonyos>, or HarmonyOS bundle name</flag:harmonyos>)."
|
|
136325
136287
|
),
|
|
136326
|
-
activity: external_exports.string().regex(ACTIVITY_PATTERN2, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
|
|
136327
|
-
|
|
136328
|
-
),
|
|
136329
|
-
launchArgs: external_exports.array(external_exports.string()).optional().describe(
|
|
136330
|
-
'Apple simulators<flag:macos-apps>, Mac apps</flag:macos-apps> and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults.<flag:macos-apps> Omitted on a Mac app, the app gets the arguments of its last start.</flag:macos-apps>'
|
|
136331
|
-
)
|
|
136288
|
+
activity: external_exports.string().regex(ACTIVITY_PATTERN2, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe("Android only: Activity name to relaunch (default: launcher activity)."),
|
|
136289
|
+
launchArgs: external_exports.array(external_exports.string()).optional().describe('Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`.')
|
|
136332
136290
|
});
|
|
136333
136291
|
function createRestartAppTool(registry2) {
|
|
136334
136292
|
return {
|
|
136335
136293
|
id: "restart-app",
|
|
136336
136294
|
// Android's device probes, force-stop and `am start -W` can outlast the 30s MCP fetch timeout.
|
|
136337
136295
|
longRunning: true,
|
|
136338
|
-
description: `Terminate
|
|
136339
|
-
Use when you need a clean in-memory state without
|
|
136340
|
-
Returns { restarted, bundleId, <flag:macos-apps>kind?, appPath?, args?, note?, </flag:macos-apps>networkCapture? }. If Argent started native capture, networkCapture reports whether it followed the launch or was stopped. This note applies to Android and local iOS simulators. Fails if the app is not installed, on a local iOS simulator if terminating it does not finish within 15s, or on a remote simulator if terminating it fails for a reason other than the app not running.<flag:macos-apps>
|
|
136341
|
-
For Mac apps, kind is 'catalyst' or 'app'. Check appPath and args to confirm the restarted build and arguments. Check note for warnings such as a force-quit or no window.</flag:macos-apps>`,
|
|
136296
|
+
description: `Terminate and relaunch an app (also refreshes native-devtools injection on iOS/tvOS).<flag:macos-apps> On a Mac app, quits and restarts the same .app in the background.</flag:macos-apps>
|
|
136297
|
+
Use when you need a clean in-memory app state without reinstalling. Returns { restarted, bundleId, <flag:macos-apps>kind?, appPath?, args?, note?, </flag:macos-apps>networkCapture? }. Fails if the app is not installed or fails to terminate.`,
|
|
136342
136298
|
zodSchema: zodSchema13,
|
|
136343
136299
|
alwaysLoad: true,
|
|
136344
136300
|
searchHint: "terminate relaunch restart reset app bundle id package simulator emulator vega tvos fire tv<flag:harmonyos> harmony harmonyos</flag:harmonyos>",
|
|
@@ -137915,28 +137871,23 @@ async function downscalePngInPlace(file2, scale, signal) {
|
|
|
137915
137871
|
});
|
|
137916
137872
|
}
|
|
137917
137873
|
var zodSchema18 = external_exports.object({
|
|
137918
|
-
udid: external_exports.string().describe(
|
|
137919
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
137920
|
-
),
|
|
137874
|
+
udid: external_exports.string().describe("Target device id from `list-devices`."),
|
|
137921
137875
|
rotation: external_exports.enum(["Portrait", "LandscapeLeft", "LandscapeRight", "PortraitUpsideDown"]).optional().describe(
|
|
137922
|
-
"Orientation override
|
|
137876
|
+
"Orientation override (rarely needed; captures already follow UI orientation).<flag:harmonyos> Rejected on HarmonyOS (captures display in current orientation).</flag:harmonyos> Ignored on physical iPhones."
|
|
137923
137877
|
),
|
|
137924
137878
|
scale: external_exports.number().min(0.01).max(1).optional().describe(
|
|
137925
|
-
"Scale factor
|
|
137879
|
+
"Scale factor (default 0.25 on iOS/Android<flag:harmonyos>/HarmonyOS</flag:harmonyos> or `ARGENT_SCREENSHOT_SCALE`, 576px long side on TV, 1.0 on Chromium<flag:macos-apps>, <=768px on Mac</flag:macos-apps>)."
|
|
137926
137880
|
),
|
|
137927
137881
|
includeImageInContext: external_exports.boolean().optional().default(true).describe(
|
|
137928
|
-
"Set false only when
|
|
137882
|
+
"Set false only when saving a full-res (`scale: 1.0`) baseline/current for `screenshot-diff`."
|
|
137929
137883
|
),
|
|
137930
|
-
downscaler: external_exports.enum(["lanczos3", "box", "bilinear", "nearest"]).optional().describe(
|
|
137931
|
-
"Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Ignored on every other platform."
|
|
137932
|
-
)
|
|
137884
|
+
downscaler: external_exports.enum(["lanczos3", "box", "bilinear", "nearest"]).optional().describe("Chromium only: downscaler when scale < 1 (default lanczos3).")
|
|
137933
137885
|
});
|
|
137934
137886
|
function createScreenshotTool(registry2) {
|
|
137935
137887
|
return {
|
|
137936
137888
|
id: "screenshot",
|
|
137937
|
-
description: `Capture a PNG of the device screen
|
|
137938
|
-
Use when you need a baseline image
|
|
137939
|
-
Fails if the capture backend (simulator-server, emulator, Chromium CDP<flag:harmonyos> or \`hdc\`</flag:harmonyos>) cannot be reached for this device.`,
|
|
137889
|
+
description: `Capture a PNG screenshot of the device screen.
|
|
137890
|
+
Use when you need a baseline image or the screen state after a delay (interaction tools already attach a screenshot). Returns { image }. Fails if the capture backend is unreachable.`,
|
|
137940
137891
|
zodSchema: zodSchema18,
|
|
137941
137892
|
alwaysLoad: true,
|
|
137942
137893
|
searchHint: "device simulator emulator chromium screen image capture baseline tvos apple tv",
|
|
@@ -138145,28 +138096,19 @@ async function tapHarmony(connectKey, x, y, clickCount, signal) {
|
|
|
138145
138096
|
);
|
|
138146
138097
|
}
|
|
138147
138098
|
var zodSchema19 = external_exports.object({
|
|
138148
|
-
udid: external_exports.string().describe(
|
|
138149
|
-
|
|
138150
|
-
),
|
|
138151
|
-
x: external_exports.number().min(0).max(1).describe("Horizontal position: 0 = left edge, 1 = right edge."),
|
|
138152
|
-
y: external_exports.number().min(0).max(1).describe("Vertical position: 0 = top edge, 1 = bottom edge."),
|
|
138099
|
+
udid: external_exports.string().describe("Target device id from `list-devices`."),
|
|
138100
|
+
x: external_exports.number().min(0).max(1).describe("Horizontal screen fraction [0,1]."),
|
|
138101
|
+
y: external_exports.number().min(0).max(1).describe("Vertical screen fraction [0,1]."),
|
|
138153
138102
|
clickCount: external_exports.number().int().min(1).max(10).optional().describe(
|
|
138154
|
-
"
|
|
138103
|
+
"Tap/click count as one OS gesture (2 = double-tap; default 1). On physical iOS, higher counts loop single taps, which a double-tap recognizer may pair."
|
|
138155
138104
|
),
|
|
138156
|
-
button: external_exports.enum(["left", "right"]).optional().describe(
|
|
138157
|
-
|
|
138158
|
-
).meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG }),
|
|
138159
|
-
modifiers: external_exports.array(external_exports.enum(MACOS_MODIFIERS)).max(MACOS_MODIFIERS.length).optional().describe(
|
|
138160
|
-
"Keys held throughout a click or multi-click gesture. Mac apps only. An empty list leaves the click unmodified."
|
|
138161
|
-
).meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG })
|
|
138105
|
+
button: external_exports.enum(["left", "right"]).optional().describe('Mac app only: mouse button ("left" default, or "right").').meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG }),
|
|
138106
|
+
modifiers: external_exports.array(external_exports.enum(MACOS_MODIFIERS)).max(MACOS_MODIFIERS.length).optional().describe("Mac app only: modifier keys held during click.").meta({ [FLAG_META_KEY]: MACOS_APPS_FLAG })
|
|
138162
138107
|
});
|
|
138163
138108
|
var gestureTapTool = {
|
|
138164
138109
|
id: "gesture-tap",
|
|
138165
|
-
description: `Press
|
|
138166
|
-
|
|
138167
|
-
Use when tapping a button, link, or any tappable element on the screen.
|
|
138168
|
-
Returns { tapped: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the device backend (simulator-server / emulator / Chromium CDP<flag:harmonyos> / \`hdc\`</flag:harmonyos>) is unreachable.
|
|
138169
|
-
Before tapping, take the coordinates from \`describe\` on every platform (on Chromium it walks the DOM<flag:harmonyos>, on HarmonyOS it reads the \`uitest\` layout dump</flag:harmonyos>). More information in \`argent-device-interact\` skill`,
|
|
138110
|
+
description: `Press (tap, or click on Chromium<flag:macos-apps>/Mac</flag:macos-apps>) at normalized [0,1] coordinates taken from \`describe\`.
|
|
138111
|
+
Use when tapping a button, link, or control. Returns { tapped: true, timestampMs, reactivated?, warning? } (on physical iOS, \`reactivated: true\` means re-fronted; re-describe). Fails if the device backend is unreachable.`,
|
|
138170
138112
|
zodSchema: zodSchema19,
|
|
138171
138113
|
alwaysLoad: true,
|
|
138172
138114
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
@@ -138287,20 +138229,16 @@ var capability11 = {
|
|
|
138287
138229
|
harmony: { device: true }
|
|
138288
138230
|
};
|
|
138289
138231
|
var zodSchema20 = external_exports.object({
|
|
138290
|
-
udid: external_exports.string().describe(
|
|
138291
|
-
|
|
138292
|
-
),
|
|
138293
|
-
|
|
138294
|
-
|
|
138295
|
-
toX: external_exports.number().min(0).max(1).describe("End x."),
|
|
138296
|
-
toY: external_exports.number().min(0).max(1).describe("End y."),
|
|
138232
|
+
udid: external_exports.string().describe("Target device id from `list-devices`."),
|
|
138233
|
+
fromX: external_exports.number().min(0).max(1).describe("Start x [0,1]."),
|
|
138234
|
+
fromY: external_exports.number().min(0).max(1).describe("Start y [0,1]."),
|
|
138235
|
+
toX: external_exports.number().min(0).max(1).describe("End x [0,1]."),
|
|
138236
|
+
toY: external_exports.number().min(0).max(1).describe("End y [0,1]."),
|
|
138297
138237
|
durationMs: external_exports.number().max(MAX_DURATION_MS, {
|
|
138298
138238
|
message: `durationMs must be at most ${MAX_DURATION_MS} (10s): every frame is a real 16ms sleep with the finger held down, so a larger value is that many milliseconds of wall clock spent holding a touch the device cannot shake off.`
|
|
138299
|
-
}).optional().describe(
|
|
138300
|
-
"Total gesture duration in milliseconds (default 300); the finger stays down this long. Below ~32ms the whole travel lands in one or two frames, which the OS flings as hard as any flick."
|
|
138301
|
-
),
|
|
138239
|
+
}).optional().describe("Swipe duration in ms (default 300)."),
|
|
138302
138240
|
momentum: external_exports.boolean().optional().describe(
|
|
138303
|
-
`
|
|
138241
|
+
`Default true (flinging swipe). Set false to ease out with no fling for deterministic scroll distance (requires durationMs >= ${MOMENTUM_FREE_MIN_DURATION_MS}).`
|
|
138304
138242
|
),
|
|
138305
138243
|
// `momentum`'s shipped spelling, with the opposite polarity. Declared so this
|
|
138306
138244
|
// non-strict object refuses it instead of stripping it and flinging - the exact
|
|
@@ -138321,13 +138259,9 @@ var gestureSwipeTool = {
|
|
|
138321
138259
|
id: "gesture-swipe",
|
|
138322
138260
|
// Never interpolate into this description: extract-tools scans it statically,
|
|
138323
138261
|
// so a `${}` in it drops the tool out of the scan.
|
|
138324
|
-
description: `Execute a
|
|
138325
|
-
|
|
138326
|
-
|
|
138327
|
-
Use when you need to scroll a list, dismiss a modal, drag an element, or navigate between pages. Not supported on Chromium; use gesture-scroll there instead.<flag:macos-apps> Not supported on a Mac app; use gesture-scroll or gesture-drag there.</flag:macos-apps>
|
|
138328
|
-
Physical iOS: an edge gesture (back-swipe) needs fromX 0 exactly; durationMs sets drag speed, not time; momentum:false only rests 300ms at the end and does not damp.<flag:harmonyos>
|
|
138329
|
-
HarmonyOS: durationMs sets drag speed, clamped to uitest's 200-40000 px/s, so a short slow swipe ends early and a long fast one runs late.</flag:harmonyos>
|
|
138330
|
-
Returns { swiped: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend<flag:harmonyos>, or \`hdc\` on HarmonyOS,</flag:harmonyos> is not reachable for the given device.`,
|
|
138262
|
+
description: `Execute a swipe/drag between two normalized [0,1] points on touch devices (swipe up, fromY > toY, to scroll down).
|
|
138263
|
+
Use when scrolling a list, dismissing a modal, or swiping between pages (not Chromium<flag:macos-apps>/Mac</flag:macos-apps>: use \`gesture-scroll\` / \`gesture-drag\`). Returns { swiped: true, timestampMs, reactivated?, warning? }. Fails if the touch backend is unreachable.
|
|
138264
|
+
Physical iOS: an edge gesture (back-swipe) needs \`fromX: 0\` exactly; \`durationMs\` sets drag speed, not time; \`momentum: false\` only rests 300ms at the end and does not damp.<flag:harmonyos> HarmonyOS: \`durationMs\` sets drag speed, clamped to 200\u201340000 px/s.</flag:harmonyos>`,
|
|
138331
138265
|
zodSchema: zodSchema20,
|
|
138332
138266
|
alwaysLoad: true,
|
|
138333
138267
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
@@ -140213,20 +140147,18 @@ var capability18 = {
|
|
|
140213
140147
|
macos: { app: true, catalyst: true }
|
|
140214
140148
|
};
|
|
140215
140149
|
var zodSchema27 = external_exports.object({
|
|
140216
|
-
udid: external_exports.string().describe(
|
|
140217
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
140218
|
-
),
|
|
140150
|
+
udid: external_exports.string().describe("Target device id from `list-devices`."),
|
|
140219
140151
|
text: external_exports.string().optional().describe(
|
|
140220
|
-
|
|
140152
|
+
"Text to type. Cannot be combined with `key` (use two steps in `run-sequence` to type then press enter). Supports `{{secret:<NAME>}}` placeholders resolved server-side from `ARGENT_SECRET_<NAME>` / `.argent/secrets.env` (auto-screenshot is skipped; combine with submit in one `run-sequence` to keep the skip; never ask the user for plaintext)."
|
|
140221
140153
|
),
|
|
140222
140154
|
key: external_exports.string().optional().describe(
|
|
140223
|
-
"Named key
|
|
140155
|
+
"Named key. Cannot be combined with `text` (use two steps in `run-sequence`). Values: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Not supported on Apple TV / Android TV (use `tv-remote`). Physical iOS: enter/backspace only.<flag:harmonyos> HarmonyOS: enter, backspace, space, arrow-left/right.</flag:harmonyos><flag:macos-apps> Mac app: also delete (forward delete), home, end, page-up/down, and modifier shortcuts (e.g. command+a).</flag:macos-apps>"
|
|
140224
140156
|
),
|
|
140225
140157
|
repeat: external_exports.number().int().min(1).max(100).optional().describe(
|
|
140226
140158
|
'Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`.'
|
|
140227
140159
|
),
|
|
140228
140160
|
delayMs: external_exports.number().optional().describe(
|
|
140229
|
-
"Delay in ms between key presses (default 50
|
|
140161
|
+
"Delay in ms between key presses (default 50; ignored on platforms that type in one shot)."
|
|
140230
140162
|
)
|
|
140231
140163
|
});
|
|
140232
140164
|
function createKeyboardTool(registry2) {
|
|
@@ -140244,12 +140176,9 @@ function createKeyboardTool(registry2) {
|
|
|
140244
140176
|
});
|
|
140245
140177
|
return {
|
|
140246
140178
|
id: "keyboard",
|
|
140247
|
-
description: `Type text or press
|
|
140248
|
-
Use when
|
|
140249
|
-
|
|
140250
|
-
Returns { typed: string, keys: number }. On physical iOS, reactivated: true = app was re-fronted; re-describe. On an iOS simulator, when the focused field was empty before typing, the field is read back: verified: true = it holds the typed text, though iOS may have capitalized the first letter of a word or curled a quote; no verified = the field was not checked: it held text before typing, the text has a Return or Tab, focus moved to another field while typing, or the field could not be read in time (the app busy, the accessibility service missing or slow); verified: false comes with a warning (keys dropped or repeated, or the app or iOS changed the text), so read the field before submitting. Fails if an unsupported key name is provided (rejected before anything is sent) or if the device's input backend is not reachable.
|
|
140251
|
-
A failure is not rolled back. Un-typeable text is rejected mid-string on the iOS simulator and Chromium, leaving the characters before it in the field (Android, <flag:harmonyos>HarmonyOS, </flag:harmonyos>Vega and TV targets check the whole string up front).<flag:macos-apps> A Mac app types any character.</flag:macos-apps> A transport failure partway also leaves the text already sent. On a retry, read the field's actual contents; do not assume it is unchanged.
|
|
140252
|
-
React Native: after typing, the next tap outside the field may only close the keyboard. If only the keyboard closed, tap again; where the field submits on return, \`key: "enter"\` avoids the extra tap.`,
|
|
140179
|
+
description: `Type text or press a named key on the focused field (tap or focus the field first; with no focus input is silently dropped).
|
|
140180
|
+
Use when entering text or triggering named keys (enter, escape, backspace, arrows).
|
|
140181
|
+
Returns { typed, keys, verified?, warning?, reactivated? }. Fails if an unsupported key is passed or the input backend is unreachable (partial typing is not rolled back; re-read before retrying). On iOS simulators, typing into an empty field verifies readback (\`verified: false\` warns). React Native: after typing, the next tap outside may only close the keyboard (tap again if so); where the field submits on return, \`key: "enter"\` avoids the extra tap.`,
|
|
140253
140182
|
zodSchema: zodSchema27,
|
|
140254
140183
|
alwaysLoad: true,
|
|
140255
140184
|
searchHint: "type text keyboard input named key enter escape arrow tv vega fire tv <flag:harmonyos>harmony harmonyos </flag:harmonyos>search field hid leanback",
|
|
@@ -142138,20 +142067,18 @@ var capability25 = {
|
|
|
142138
142067
|
macos: { app: true, catalyst: true }
|
|
142139
142068
|
};
|
|
142140
142069
|
var zodSchema31 = external_exports.object({
|
|
142141
|
-
udid: external_exports.string().describe(
|
|
142142
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id), shared across all steps."
|
|
142143
|
-
),
|
|
142070
|
+
udid: external_exports.string().describe("Target device id from `list-devices`, shared across all steps."),
|
|
142144
142071
|
steps: external_exports.array(
|
|
142145
142072
|
external_exports.object({
|
|
142146
|
-
tool: external_exports.string().describe("
|
|
142147
|
-
args: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Tool arguments (
|
|
142073
|
+
tool: external_exports.string().describe("Allowed tool name (see description)."),
|
|
142074
|
+
args: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Tool arguments (omit `udid`, injected automatically)."),
|
|
142148
142075
|
delayMs: external_exports.number().optional().describe(
|
|
142149
|
-
`
|
|
142076
|
+
`Extra pause in ms after step settle (default ${DEFAULT_INTER_STEP_DELAY_MS}).`
|
|
142150
142077
|
)
|
|
142151
142078
|
})
|
|
142152
|
-
).min(1).describe("Ordered
|
|
142079
|
+
).min(1).describe("Ordered steps to execute."),
|
|
142153
142080
|
settle: external_exports.boolean().optional().describe(
|
|
142154
|
-
`Wait up to ${SETTLE_TIMEOUT_MS3}ms
|
|
142081
|
+
`Wait up to ${SETTLE_TIMEOUT_MS3}ms for tree settle between screen-changing steps (default true).`
|
|
142155
142082
|
)
|
|
142156
142083
|
});
|
|
142157
142084
|
function mayStartTransition(step) {
|
|
@@ -142193,29 +142120,26 @@ async function waitForStillTree(readTree, signal) {
|
|
|
142193
142120
|
function createRunSequenceTool(registry2) {
|
|
142194
142121
|
return {
|
|
142195
142122
|
id: "run-sequence",
|
|
142196
|
-
description: `Run
|
|
142197
|
-
Use when every step is known in advance (
|
|
142198
|
-
|
|
142199
|
-
|
|
142200
|
-
|
|
142201
|
-
|
|
142202
|
-
|
|
142203
|
-
gesture-tap: x, y, clickCount?<flag:macos-apps>, button? "left"|"right", modifiers? ["control"|"option"|"shift"|"command"] (macos)</flag:macos-apps> [ios/android/chromium<flag:harmonyos>/harmony</flag:harmonyos><flag:macos-apps>/macos</flag:macos-apps>]
|
|
142204
|
-
gesture-swipe: fromX, fromY, toX, toY, durationMs?, momentum? [ios/android<flag:harmonyos>/harmony</flag:harmonyos>]
|
|
142205
|
-
gesture-scroll: x, y, deltaX?, deltaY? (positive scrolls down), durationMs? [chromium<flag:macos-apps>/macos</flag:macos-apps>]
|
|
142123
|
+
description: `Run multiple interaction steps in one call, with one screenshot + tree captured after the last step.
|
|
142124
|
+
Use when every consecutive step is known in advance (scroll sweeps, type + enter, form fill). Stops at the first error or unmet wait (\`success=false\`) and returns \`{ completed, total, steps }\` normally; compare \`completed\` with \`total\` to check for partial failure. Any \`{{secret:...}}\` skips the final capture, so type + submit secrets in one sequence.
|
|
142125
|
+
|
|
142126
|
+
Allowed tools (coords are [0,1] screen fractions; ? = optional):
|
|
142127
|
+
gesture-tap: x, y, clickCount?<flag:macos-apps>, button?, modifiers?</flag:macos-apps>
|
|
142128
|
+
gesture-swipe: fromX, fromY, toX, toY, durationMs?, momentum?
|
|
142129
|
+
gesture-scroll: x, y, deltaX?, deltaY?, durationMs? [chromium<flag:macos-apps>/macos</flag:macos-apps>]
|
|
142206
142130
|
gesture-drag: fromX, fromY, toX, toY, durationMs?, momentum? [chromium<flag:macos-apps>/macos</flag:macos-apps>]
|
|
142207
|
-
gesture-custom: events: [{ type: "Down"|"Move"|"Up", x, y, x2?, y2?, delayMs? }], interpolate?, edge?
|
|
142208
|
-
gesture-pinch: centerX, centerY, startDistance, endDistance, endCenterX?, endCenterY?, angle?, durationMs?
|
|
142209
|
-
gesture-rotate: centerX, centerY, startAngle, endAngle, radius (or radiusX
|
|
142210
|
-
button: button
|
|
142211
|
-
keyboard: text? or key? (one per step
|
|
142212
|
-
paste: text (
|
|
142213
|
-
rotate: orientation
|
|
142214
|
-
shake: count?
|
|
142215
|
-
fold: posture? "closed"|"half-open"|"open" or angle? 0\u2013180
|
|
142216
|
-
tv-remote: button (
|
|
142217
|
-
await-ui-element: condition
|
|
142218
|
-
await-network-request: bundleId, url, plus
|
|
142131
|
+
gesture-custom: events: [{ type: "Down"|"Move"|"Up", x, y, x2?, y2?, delayMs? }], interpolate?, edge?
|
|
142132
|
+
gesture-pinch: centerX, centerY, startDistance, endDistance, endCenterX?, endCenterY?, angle?, durationMs?
|
|
142133
|
+
gesture-rotate: centerX, centerY, startAngle, endAngle, radius (or radiusX+radiusY), durationMs?
|
|
142134
|
+
button: button ("home"|"back"|"power"|"volumeUp"|"volumeDown"|"appSwitch"|"actionButton")<flag:harmonyos> [harmony: home/back/power]</flag:harmonyos>
|
|
142135
|
+
keyboard: text? or key? (one per step), repeat?, delayMs?
|
|
142136
|
+
paste: text (real paste flows only)
|
|
142137
|
+
rotate: orientation ("Portrait"|"LandscapeLeft"|"LandscapeRight"|"PortraitUpsideDown")
|
|
142138
|
+
shake: count?
|
|
142139
|
+
fold: posture? ("closed"|"half-open"|"open") or angle? (0\u2013180)
|
|
142140
|
+
tv-remote: button (string or string[]), repeat?
|
|
142141
|
+
await-ui-element: condition ("exists"|"visible"|"hidden"|"text"), selector, expectedText?, textMatch?, timeoutMs?, pollIntervalMs?
|
|
142142
|
+
await-network-request: bundleId, url, plus optional args (start capture first)`,
|
|
142219
142143
|
zodSchema: zodSchema31,
|
|
142220
142144
|
alwaysLoad: true,
|
|
142221
142145
|
searchHint: "batch sequence multiple gesture steps sequentially",
|
|
@@ -145851,11 +145775,9 @@ function makeDescribeExecute(registry2) {
|
|
|
145851
145775
|
});
|
|
145852
145776
|
}
|
|
145853
145777
|
var zodSchema41 = external_exports.object({
|
|
145854
|
-
udid: external_exports.string().min(1).describe(
|
|
145855
|
-
"Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
145856
|
-
),
|
|
145778
|
+
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
145857
145779
|
bundleId: external_exports.string().optional().describe(
|
|
145858
|
-
"
|
|
145780
|
+
"iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted)."
|
|
145859
145781
|
)
|
|
145860
145782
|
});
|
|
145861
145783
|
function createDescribeTool(registry2) {
|
|
@@ -145863,20 +145785,10 @@ function createDescribeTool(registry2) {
|
|
|
145863
145785
|
id: "describe",
|
|
145864
145786
|
// Android's device probes plus the tree dump can outlast the 30s MCP fetch timeout.
|
|
145865
145787
|
longRunning: true,
|
|
145866
|
-
description: `
|
|
145867
|
-
Use when you need
|
|
145868
|
-
|
|
145869
|
-
|
|
145870
|
-
On Vega (Fire TV) it reads the on-device automation toolkit; \`[focused]\`/\`[selected]\` mark the D-pad cursor, which you move with \`tv-remote\` (Vega has no touch).<flag:harmonyos>
|
|
145871
|
-
On HarmonyOS it runs the device's \`uitest dumpLayout\` (\`source: "harmony-uitest"\`); each top-level child is a window whose \`identifier\` (not its label) is the owning bundle, so an app plus the status bar reads as two windows. A suspended display still dumps its last frame, so the result then carries a \`hint\`, as it does for an empty dump.</flag:harmonyos><flag:macos-apps>
|
|
145872
|
-
On a Mac app it reads the app's accessibility tree with web view content and React Native testIDs merged in; frames are fractions of the app window, grown to include sheets and menus past it.</flag:macos-apps>
|
|
145873
|
-
On a TV target (Apple TV / Android TV: a \`list-devices\` entry with runtimeKind 'tv') it returns the FOCUSED element and the FOCUSABLE elements instead, since a TV UI has no tap coordinates. Move the highlight with \`tv-remote\`, then read where focus landed from the tree in its result, or call describe again when it is missing.
|
|
145874
|
-
|
|
145875
|
-
Returns \`{ description, source }\`: \`description\` renders the tree one line per element, with its role, label/value/id, VoiceOver hint (iOS simulator), interactivity flags and frame. Frames are normalized [0,1] fractions of the screen / window width and height (not pixels); tap an element at the centre of its frame. The tree has no z-order or occlusion information: an element may be covered by an overlay (e.g. a toolbar over list rows), so check a screenshot when a tap lands unexpectedly.
|
|
145876
|
-
Fails if the tree cannot be read, e.g. on a physical iOS device before launch-app has started an app.
|
|
145877
|
-
|
|
145878
|
-
For UIKit properties of a view (class name, accessibilityIdentifier), use native-find-views (iOS simulator only).
|
|
145879
|
-
For React Native component names, or a testID describe does not list, use debugger-component-tree.`,
|
|
145788
|
+
description: `Read the accessibility / DOM element tree for the current screen (or focused/focusable elements on TV targets). On a physical iPhone it covers only the app started with \`launch-app\`; call \`launch-app\` \`com.apple.springboard\` first to read system dialogs.<flag:harmonyos> On HarmonyOS (\`source: "harmony-uitest"\`), each top-level child is a window whose \`identifier\` is the owning bundle; a suspended display dumps its last frame with a \`hint\`.</flag:harmonyos><flag:macos-apps> On a Mac app, frames are fractions of the app window (expanded for sheets/menus).</flag:macos-apps>
|
|
145789
|
+
Use when you need tap coordinates or labels and have no fresh tree: interaction tools already attach one after each action (or reference an earlier \`Tree id\`).
|
|
145790
|
+
Returns \`{ description, source, hint? }\`: one line per element with role, label/value/id/hint, flags, and normalized \`[0,1]\` frame \`(x,y,w,h)\`. Tap at \`(x+w/2, y+h/2)\`. No z-order/occlusion info; check a screenshot if a tap hits an overlay or a text field shows its placeholder as value. Fails if the tree backend is unreachable.
|
|
145791
|
+
For UIKit view properties (iOS sim) use \`native-find-views\`; for React Native components/testIDs use \`debugger-component-tree\`.`,
|
|
145880
145792
|
zodSchema: zodSchema41,
|
|
145881
145793
|
alwaysLoad: true,
|
|
145882
145794
|
searchHint: "accessibility element tree ui hierarchy tap coordinates ios android chromium vega <flag:harmonyos>harmony harmonyos </flag:harmonyos><flag:macos-apps>macos mac app </flag:macos-apps>dom tv tvos apple tv android tv fire tv focus focusable remote dpad",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.16",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "5f334213acb3b53051ce85e4e4816243d5216c6d"
|
|
102
102
|
}
|