@swmansion/argent 0.35.1-next.16 → 0.35.1-next.17
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 +1 -1
- package/dist/tool-args.generated.d.ts +258 -258
- package/dist/tool-server.cjs +384 -665
- package/package.json +2 -2
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.17";
|
|
72961
72961
|
}
|
|
72962
72962
|
return "0.0.0";
|
|
72963
72963
|
}
|
|
@@ -124218,9 +124218,7 @@ init_device_info();
|
|
|
124218
124218
|
init_zod();
|
|
124219
124219
|
init_external_devices();
|
|
124220
124220
|
var DEFAULT_METRO_PORT = 8081;
|
|
124221
|
-
var metroPortField = external_exports.coerce.number().int().min(1).max(65535).optional().describe(
|
|
124222
|
-
"Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id."
|
|
124223
|
-
);
|
|
124221
|
+
var metroPortField = external_exports.coerce.number().int().min(1).max(65535).optional().describe("Metro port (omit to use this device's port, default 8081; ignored on Chromium).");
|
|
124224
124222
|
function metroPort(params) {
|
|
124225
124223
|
if (params.port !== void 0) return params.port;
|
|
124226
124224
|
const deviceId = canonicalDeviceId(params.device_id);
|
|
@@ -128792,19 +128790,17 @@ async function queryViewHierarchyFor(services, params, toolId, method, errorCode
|
|
|
128792
128790
|
// ../tool-server/src/tools/network/network-capture.ts
|
|
128793
128791
|
var captureSchema = external_exports.object({
|
|
128794
128792
|
udid: external_exports.string().describe(
|
|
128795
|
-
"Device ID from list-devices
|
|
128793
|
+
"Device ID from `list-devices`<flag:macos-apps> (external Mac builds: `macos-app-<bundle id>`)</flag:macos-apps>."
|
|
128796
128794
|
),
|
|
128797
128795
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
128798
|
-
"
|
|
128796
|
+
"Bundle ID (iOS) / package (Android)<flag:macos-apps> / Mac bundle ID</flag:macos-apps> / placeholder on Chromium (e.g. `argent.capture`)."
|
|
128799
128797
|
),
|
|
128800
128798
|
port: metroPortField.describe(
|
|
128801
|
-
"
|
|
128802
|
-
),
|
|
128803
|
-
layer: external_exports.enum(["js", "native"]).optional().describe(
|
|
128804
|
-
"Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting."
|
|
128799
|
+
"Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium)."
|
|
128805
128800
|
),
|
|
128801
|
+
layer: external_exports.enum(["js", "native"]).optional().describe("Control one layer only (default: both; ignored on Chromium)."),
|
|
128806
128802
|
logicalDeviceId: external_exports.string().min(1).optional().describe(
|
|
128807
|
-
"
|
|
128803
|
+
"Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads)<flag:macos-apps>; omit on Mac apps</flag:macos-apps>."
|
|
128808
128804
|
)
|
|
128809
128805
|
});
|
|
128810
128806
|
function requestedLayers(layer) {
|
|
@@ -128949,19 +128945,17 @@ function errorMessage4(err) {
|
|
|
128949
128945
|
// ../tool-server/src/tools/native-devtools/native-network-logs.ts
|
|
128950
128946
|
var zodSchema5 = external_exports.object({
|
|
128951
128947
|
udid: external_exports.string().describe(
|
|
128952
|
-
"Device ID from list-devices
|
|
128948
|
+
"Device ID from `list-devices`: iOS simulator UDID, Android serial<flag:macos-apps>, or Mac app id (`macos-app-<bundle id>`)</flag:macos-apps>."
|
|
128953
128949
|
),
|
|
128954
128950
|
bundleId: external_exports.string().describe(
|
|
128955
|
-
"
|
|
128951
|
+
"Bundle ID (iOS) or package name (Android)<flag:macos-apps>; on macOS, omit `macos-app-`</flag:macos-apps>."
|
|
128956
128952
|
),
|
|
128957
128953
|
port: metroPortField.describe(
|
|
128958
|
-
"
|
|
128959
|
-
),
|
|
128960
|
-
limit: external_exports.number().int().nonnegative().optional().default(50).describe(
|
|
128961
|
-
"Take the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries."
|
|
128954
|
+
"Metro port to exclude from logs (omit for device default, usually 8081)."
|
|
128962
128955
|
),
|
|
128956
|
+
limit: external_exports.number().int().nonnegative().optional().default(50).describe("Newest requests to return oldest-first (default 50; 0 = status/totals only)."),
|
|
128963
128957
|
clear: external_exports.boolean().optional().default(false).describe(
|
|
128964
|
-
"Hide
|
|
128958
|
+
"Hide current history from later lists (IDs still work in `view-network-request-details`)."
|
|
128965
128959
|
),
|
|
128966
128960
|
// Declared so this non-strict object refuses the old stop instead of stripping it: the read
|
|
128967
128961
|
// would succeed while capture records on.
|
|
@@ -128985,11 +128979,9 @@ function createNativeNetworkLogsTool(registry2) {
|
|
|
128985
128979
|
android: { emulator: true, device: true },
|
|
128986
128980
|
macos: { app: true, catalyst: true }
|
|
128987
128981
|
},
|
|
128988
|
-
description: `List native HTTP requests
|
|
128989
|
-
|
|
128990
|
-
|
|
128991
|
-
If the call fails with NATIVE_DEVTOOLS_NOT_CONNECTED, follow its message.
|
|
128992
|
-
An Apple system app is rejected outright (terminal: never retry it).`,
|
|
128982
|
+
description: `List native HTTP requests (URLSession/NSURLConnection on iOS<flag:macos-apps>/Mac apps</flag:macos-apps>; OkHttp on debuggable Android). Call \`network-capture-start\` first.
|
|
128983
|
+
Use when inspecting native SDK/module traffic (pass an ID to \`view-network-request-details\` for bodies/headers).
|
|
128984
|
+
Returns recent requests oldest-first with capture status in \`header\` (or a precheck status + remedy message on iOS).<flag:macos-apps> If a Mac log stays stopped, check the start result.</flag:macos-apps> Fails on \`NATIVE_DEVTOOLS_NOT_CONNECTED\`. An Apple system app is rejected outright (terminal: never retry it).`,
|
|
128993
128985
|
zodSchema: zodSchema5,
|
|
128994
128986
|
services: (params) => {
|
|
128995
128987
|
const device = resolveDevice(params.udid);
|
|
@@ -129238,25 +129230,24 @@ init_device_info();
|
|
|
129238
129230
|
var MACOS_NO_MATCH_NOTE = "No NSView matched. SwiftUI sets a control's identifier and label on an accessibility element, not on an NSView, so this search does not find SwiftUI controls: describe lists them with their identifiers and frames.";
|
|
129239
129231
|
var zodSchema6 = external_exports.object({
|
|
129240
129232
|
...nativeAppTarget,
|
|
129241
|
-
className: external_exports.string().optional().describe("UIView class name
|
|
129242
|
-
identifier: external_exports.string().optional().describe("
|
|
129243
|
-
label: external_exports.string().optional().describe("
|
|
129244
|
-
tag: external_exports.number().int().optional().describe("UIView
|
|
129245
|
-
nativeID: external_exports.string().optional().describe("React Native nativeID
|
|
129246
|
-
includeAncestors: external_exports.boolean().optional().describe("Include ancestor chain
|
|
129247
|
-
includeChildren: external_exports.boolean().optional().describe("Include child views
|
|
129233
|
+
className: external_exports.string().optional().describe("Exact UIView class name (e.g. UIButton)."),
|
|
129234
|
+
identifier: external_exports.string().optional().describe("Exact accessibility identifier."),
|
|
129235
|
+
label: external_exports.string().optional().describe("Exact accessibility label."),
|
|
129236
|
+
tag: external_exports.number().int().optional().describe("UIView integer tag."),
|
|
129237
|
+
nativeID: external_exports.string().optional().describe("Exact React Native nativeID."),
|
|
129238
|
+
includeAncestors: external_exports.boolean().optional().describe("Include ancestor chain (default true)."),
|
|
129239
|
+
includeChildren: external_exports.boolean().optional().describe("Include child views (default true)."),
|
|
129248
129240
|
fields: external_exports.array(external_exports.string()).optional().describe(
|
|
129249
|
-
"View fields to
|
|
129241
|
+
"View fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder)."
|
|
129250
129242
|
)
|
|
129251
129243
|
});
|
|
129252
129244
|
var nativeFindViewsTool = {
|
|
129253
129245
|
id: "native-find-views",
|
|
129254
|
-
description: `Search
|
|
129255
|
-
Use when
|
|
129256
|
-
Returns { status: "ok", matches }
|
|
129257
|
-
<flag:macos-apps>
|
|
129258
|
-
</flag:macos-apps>If status is restart_required: follow
|
|
129259
|
-
An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129246
|
+
description: `Search UIViews by \`className\`, \`identifier\`, \`label\`, \`tag\`, or \`nativeID\` (at least one required).
|
|
129247
|
+
Use when locating a specific view without dumping \`native-full-hierarchy\`.
|
|
129248
|
+
Returns \`{ status: "ok", matches }\` (frames in points; \`screenFrame\` uses upright UI axes). Matches are not filtered for visibility: before tapping one, check its \`screenFrame\` center with \`native-view-at-point\` \`hitTest: true\` and \`skipClasses: ["UITextEffectsWindow"]\` (check a screenshot if it returns some other view), then divide that center by \`screen\` from \`native-full-hierarchy\` for \`gesture-tap\`.
|
|
129249
|
+
<flag:macos-apps>Mac app: searches NSViews across visible windows; an identifier or label search does not find SwiftUI controls: describe lists them with their identifiers and frames. Tap recipe and statuses below are iOS only.
|
|
129250
|
+
</flag:macos-apps>If status is restart_required: follow message (usually restart-app) and retry. If status is service_stale: restart tool-server (\`argent server stop && argent server start --detach\`) and retry; if the same status comes back, stop restarting. If status is connect_pending: Do not restart it, wait a few seconds and retry. If status is init_failed: reboot simulator. An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129260
129251
|
zodSchema: zodSchema6,
|
|
129261
129252
|
readOnly: true,
|
|
129262
129253
|
interaction: {
|
|
@@ -129298,26 +129289,19 @@ init_zod();
|
|
|
129298
129289
|
var zodSchema7 = external_exports.object({
|
|
129299
129290
|
...nativeAppTarget,
|
|
129300
129291
|
fields: external_exports.array(external_exports.string()).optional().describe(
|
|
129301
|
-
"
|
|
129302
|
-
),
|
|
129303
|
-
skipClasses: external_exports.array(external_exports.string()).optional().describe(
|
|
129304
|
-
'Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes)'
|
|
129305
|
-
),
|
|
129306
|
-
skipClassPrefixes: external_exports.array(external_exports.string()).optional().describe(
|
|
129307
|
-
'Class name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping _UIHostingView and UIKit bridges. Avoid broad prefixes like "_UI": they prune useful system views.'
|
|
129292
|
+
"Exact view fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder)."
|
|
129308
129293
|
),
|
|
129309
|
-
|
|
129294
|
+
skipClasses: external_exports.array(external_exports.string()).optional().describe('Exact UIView classes to prune (e.g. ["UIImageView"]).'),
|
|
129295
|
+
skipClassPrefixes: external_exports.array(external_exports.string()).optional().describe('Class prefixes to prune (e.g. ["_TtGC7SwiftUI"] for SwiftUI; avoid broad "_UI").'),
|
|
129296
|
+
maxDepth: external_exports.number().int().positive().optional().describe("Max recursion depth (default 8).")
|
|
129310
129297
|
});
|
|
129311
129298
|
var nativeFullHierarchyTool = {
|
|
129312
129299
|
id: "native-full-hierarchy",
|
|
129313
|
-
description: `Get the complete UIKit view tree for the running app.
|
|
129314
|
-
|
|
129315
|
-
|
|
129316
|
-
|
|
129317
|
-
|
|
129318
|
-
<flag:macos-apps>On a Mac app it returns the AppKit view tree of the app's windows, each screenFrame in points from the top-left of the area describe reports. The statuses below are iOS only.
|
|
129319
|
-
</flag:macos-apps>If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: follow the message (re-boot the simulator) rather than retrying.
|
|
129320
|
-
An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129300
|
+
description: `Get the complete UIKit view tree for the running app (can be 100KB+; prefer \`native-find-views\` for targeted lookups, or constrain with \`skipClasses\`, \`fields\`, \`maxDepth\`).
|
|
129301
|
+
Use when debugging layout or inspecting views absent from the accessibility tree.
|
|
129302
|
+
Returns \`{ status: "ok", windows, screen }\` (\`screen\` gives upright point size and orientation; \`screenFrame\` uses upright UI axes).
|
|
129303
|
+
<flag:macos-apps>Mac app: returns AppKit window view tree with \`screenFrame\` in points from the \`describe\` area top-left. Statuses below are iOS only.
|
|
129304
|
+
</flag:macos-apps>If status is restart_required: follow message (usually restart-app) and retry. If status is service_stale: restart tool-server (\`argent server stop && argent server start --detach\`) and retry; if the same status comes back, stop restarting. If status is connect_pending: Do not restart it, wait a few seconds and retry. If status is init_failed: reboot simulator. An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129321
129305
|
zodSchema: zodSchema7,
|
|
129322
129306
|
readOnly: true,
|
|
129323
129307
|
interaction: {
|
|
@@ -129413,22 +129397,22 @@ init_src2();
|
|
|
129413
129397
|
var viewAtPointParams = {
|
|
129414
129398
|
...nativeAppTarget,
|
|
129415
129399
|
x: external_exports.number().describe(
|
|
129416
|
-
"Raw X
|
|
129400
|
+
"Raw X in upright UI points<flag:macos-apps> (Mac app: from describe area top-left)</flag:macos-apps>. Not normalized [0,1]."
|
|
129417
129401
|
),
|
|
129418
|
-
y: external_exports.number().describe("Raw Y
|
|
129419
|
-
includeAncestors: external_exports.boolean().optional().describe("Include ancestor chain
|
|
129420
|
-
includeChildren: external_exports.boolean().optional().describe("Include child views
|
|
129402
|
+
y: external_exports.number().describe("Raw Y in upright UI points. Not normalized [0,1]."),
|
|
129403
|
+
includeAncestors: external_exports.boolean().optional().describe("Include ancestor chain (default true)."),
|
|
129404
|
+
includeChildren: external_exports.boolean().optional().describe("Include child views (default false)."),
|
|
129421
129405
|
fields: external_exports.array(external_exports.string()).optional().describe(
|
|
129422
|
-
"View fields to
|
|
129406
|
+
"View fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder)."
|
|
129423
129407
|
),
|
|
129424
|
-
skipClasses: external_exports.array(external_exports.string()).optional().describe("Exact UIView class names
|
|
129425
|
-
skipClassPrefixes: external_exports.array(external_exports.string()).optional().describe("Class name prefixes to prune
|
|
129426
|
-
maxDepth: external_exports.number().int().positive().optional().describe("
|
|
129408
|
+
skipClasses: external_exports.array(external_exports.string()).optional().describe("Exact UIView class names to prune."),
|
|
129409
|
+
skipClassPrefixes: external_exports.array(external_exports.string()).optional().describe("Class name prefixes to prune."),
|
|
129410
|
+
maxDepth: external_exports.number().int().positive().optional().describe("Max serialization depth (default 150).")
|
|
129427
129411
|
};
|
|
129428
129412
|
var zodSchema9 = external_exports.object({
|
|
129429
129413
|
...viewAtPointParams,
|
|
129430
129414
|
hitTest: external_exports.boolean().optional().describe(
|
|
129431
|
-
"true
|
|
129415
|
+
"true: touch-receiving view (UIKit hit-test). false (default): deepest visible view."
|
|
129432
129416
|
)
|
|
129433
129417
|
});
|
|
129434
129418
|
function queryViewAtPoint(services, params, toolId, hitTest) {
|
|
@@ -129443,28 +129427,11 @@ function queryViewAtPoint(services, params, toolId, hitTest) {
|
|
|
129443
129427
|
}
|
|
129444
129428
|
var nativeViewAtPointTool = {
|
|
129445
129429
|
id: "native-view-at-point",
|
|
129446
|
-
description: `Inspect the deepest UIView at
|
|
129447
|
-
|
|
129448
|
-
|
|
129449
|
-
|
|
129450
|
-
|
|
129451
|
-
identifier or nativeID of whatever draws it.
|
|
129452
|
-
|
|
129453
|
-
With hitTest: true it answers "what would receive the touch?". Use when a tap lands
|
|
129454
|
-
somewhere unexpected or does nothing, to see which control UIKit would hand the
|
|
129455
|
-
touch to: a transparent overlay swallowing it, a parent recognizer, a disabled button.
|
|
129456
|
-
|
|
129457
|
-
Returns { status: "ok", view }: the matched view with its class name, frames,
|
|
129458
|
-
identifier, label and layer name, plus its ancestors and subviews as requested.
|
|
129459
|
-
view is null when nothing is drawn at that point, or with hitTest when no touchable view sits under it.
|
|
129460
|
-
|
|
129461
|
-
To get x and y from a normalized describe frame, multiply its values by the
|
|
129462
|
-
screen size in points, on the same axes (landscape when the UI is).
|
|
129463
|
-
native-full-hierarchy returns that size as screen (pass maxDepth: 1 and fields: ["className"] to keep it small).<flag:macos-apps> On a Mac app,
|
|
129464
|
-
multiply them by the size of the area describe reports instead.</flag:macos-apps>
|
|
129465
|
-
|
|
129466
|
-
If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: follow the message (re-boot the simulator) rather than retrying.
|
|
129467
|
-
An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129430
|
+
description: `Inspect the deepest drawn UIView at raw point (x, y) by default, or the touch-receiving UIView with \`hitTest: true\`.
|
|
129431
|
+
Use when debugging unlabeled/custom views not in \`describe\` or checking which view swallows a tap (use \`hitTest: true\`).
|
|
129432
|
+
Convert normalized \`describe\` coords by multiplying by \`screen\` points from \`native-full-hierarchy\` (\`maxDepth: 1\`)<flag:macos-apps>; on a Mac app, multiply by the area \`describe\` reports</flag:macos-apps>.
|
|
129433
|
+
Returns \`{ status: "ok", view }\` (null if none).
|
|
129434
|
+
Status handling: If status is restart_required: follow message (usually restart-app) and retry. If status is service_stale: restart tool-server (\`argent server stop && argent server start --detach\`) and retry; if the same status comes back, stop restarting. If status is connect_pending: Do not restart it, wait a few seconds and retry. If status is init_failed: reboot simulator. An Apple system app is rejected outright (terminal: never retry it).`,
|
|
129468
129435
|
zodSchema: zodSchema9,
|
|
129469
129436
|
readOnly: true,
|
|
129470
129437
|
interaction: {
|
|
@@ -136846,22 +136813,22 @@ var capability6 = {
|
|
|
136846
136813
|
};
|
|
136847
136814
|
var zodSchema15 = external_exports.object({
|
|
136848
136815
|
udid: external_exports.string().min(1).describe(
|
|
136849
|
-
"
|
|
136816
|
+
"Device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial)."
|
|
136850
136817
|
),
|
|
136851
136818
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
136852
|
-
"
|
|
136819
|
+
"Bundle id (iOS), package name (Android), component id (Vega)<flag:harmonyos>, or bundleName (HarmonyOS)</flag:harmonyos>."
|
|
136853
136820
|
),
|
|
136854
136821
|
appPath: external_exports.string().describe(
|
|
136855
|
-
"Path to
|
|
136822
|
+
"Path to `.app` (iOS), `.apk` (Android), `.vpkg` (Vega)<flag:harmonyos>, or `.hap` (HarmonyOS)</flag:harmonyos>."
|
|
136856
136823
|
)
|
|
136857
136824
|
});
|
|
136858
136825
|
var reinstallAppTool = {
|
|
136859
136826
|
id: "reinstall-app",
|
|
136860
136827
|
// An uninstall plus install can take minutes, past the 30s MCP fetch timeout.
|
|
136861
136828
|
longRunning: true,
|
|
136862
|
-
description: `Install
|
|
136863
|
-
Use
|
|
136864
|
-
Returns { reinstalled, bundleId }
|
|
136829
|
+
description: `Install a fresh app package after uninstalling any existing build (clears app data and permissions).
|
|
136830
|
+
Use when installing a new build or resetting to clean state.
|
|
136831
|
+
Returns \`{ reinstalled, bundleId }\`. Fails if \`appPath\` is invalid or \`bundleId\` does not match it (not checked on Vega or remote simulators; checks run before uninstall), or if install fails. An uninstall error fails the call on Android and physical iPhones, and on a local simulator only when it times out; Vega and remote simulators ignore it.`,
|
|
136865
136832
|
zodSchema: zodSchema15,
|
|
136866
136833
|
interaction: {
|
|
136867
136834
|
startedMsg: ({ params }) => `Reinstalling ${params.bundleId}`,
|
|
@@ -137183,24 +137150,16 @@ var capability7 = {
|
|
|
137183
137150
|
android: { emulator: true, device: true, unknown: true }
|
|
137184
137151
|
};
|
|
137185
137152
|
var zodSchema16 = external_exports.object({
|
|
137186
|
-
udid: external_exports.string().min(1).describe("
|
|
137187
|
-
action: external_exports.enum(PERMISSION_ACTIONS).describe(
|
|
137188
|
-
|
|
137189
|
-
),
|
|
137190
|
-
permission: external_exports.enum(PERMISSION_NAMES).describe(
|
|
137191
|
-
"The permission to change. `notifications` is Android-only; `reminders` is iOS-only; `camera` works on Android, and on iOS only when the simulator's runtime models the service."
|
|
137192
|
-
),
|
|
137193
|
-
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
137194
|
-
"App to change the permission for; every action, `reset` included, applies to this app only. iOS: bundle id (e.g. com.example.app). Android: package name."
|
|
137195
|
-
)
|
|
137153
|
+
udid: external_exports.string().min(1).describe("Device id from `list-devices` (iOS simulator UDID or Android serial)."),
|
|
137154
|
+
action: external_exports.enum(PERMISSION_ACTIONS).describe("`grant` (pre-authorize), `deny`, or `reset` (re-prompt on next use)."),
|
|
137155
|
+
permission: external_exports.enum(PERMISSION_NAMES).describe("Permission name (`notifications` = Android-only; `reminders` = iOS-only)."),
|
|
137156
|
+
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe("Target app bundle id (iOS) or package name (Android).")
|
|
137196
137157
|
});
|
|
137197
137158
|
var settingsPermissionsTool = {
|
|
137198
137159
|
id: "settings-permissions",
|
|
137199
|
-
description: `Grant or deny an app's runtime permission, or reset it, without
|
|
137200
|
-
iOS
|
|
137201
|
-
|
|
137202
|
-
Some permission changes terminate the app if it is running (system behavior on both platforms), so set permissions before launching, or relaunch after.
|
|
137203
|
-
Returns { action, permission, bundleId, applied, skipped? }: \`applied\` lists the platform-level services/permissions actually changed; \`skipped\` (Android) lists mapped permissions the package manager rejected, e.g. ones the manifest doesn't declare. Fails if nothing could be applied.`,
|
|
137160
|
+
description: `Grant or deny an app's runtime permission, or reset it, without opening Settings. Use when setting up permissions before launching or triggering a prompt (changing permissions may terminate a running app).
|
|
137161
|
+
iOS sim: \`grant location\`/\`location-always\` requires the app installed first. Android: app must be installed and declare the mapped permissions in its manifest.
|
|
137162
|
+
Returns \`{ action, permission, bundleId, applied, skipped? }\`. Fails if nothing could be applied.`,
|
|
137204
137163
|
zodSchema: zodSchema16,
|
|
137205
137164
|
searchHint: "grant deny reset revoke app permissions privacy camera microphone location settings",
|
|
137206
137165
|
interaction: {
|
|
@@ -137456,13 +137415,11 @@ var capability8 = {
|
|
|
137456
137415
|
};
|
|
137457
137416
|
var zodSchema17 = external_exports.object({
|
|
137458
137417
|
udid: external_exports.string().min(1).describe(
|
|
137459
|
-
"
|
|
137460
|
-
),
|
|
137461
|
-
url: external_exports.string().describe(
|
|
137462
|
-
"URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0)."
|
|
137418
|
+
"Device id from `list-devices` (iOS UDID, Android serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos>or Chromium id)."
|
|
137463
137419
|
),
|
|
137420
|
+
url: external_exports.string().describe("URL or custom scheme (e.g. https://example.com, myapp://path)."),
|
|
137464
137421
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).optional().describe(
|
|
137465
|
-
"Physical iOS only:
|
|
137422
|
+
"Physical iOS only: receiving app (defaults to Safari for http/https; required otherwise)."
|
|
137466
137423
|
)
|
|
137467
137424
|
});
|
|
137468
137425
|
var openUrlTool = {
|
|
@@ -137470,12 +137427,9 @@ var openUrlTool = {
|
|
|
137470
137427
|
// On iOS it first waits up to 15s for the simulator watcher's first poll, so a
|
|
137471
137428
|
// slow openurl can pass the MCP fetch timeout, whose replay would open the URL twice.
|
|
137472
137429
|
longRunning: true,
|
|
137473
|
-
description: `Open a URL or
|
|
137474
|
-
Use when navigating to a web page or deep-linking into an app
|
|
137475
|
-
|
|
137476
|
-
An https:// link opens the native app only if that app is verified for the link's domain (Universal Links / App Links); even then, an iOS simulator may open Safari. To reliably open an installed app, use its custom scheme (scheme://path) or launch-app.
|
|
137477
|
-
On a physical iPhone, the app that receives the URL becomes the app under automation.
|
|
137478
|
-
Returns { opened, url, note? }. \`note\` explains the routing caveat when a web URL was opened on a native device<flag:harmonyos>; on HarmonyOS every result carries one, since success only means the system accepted the URI</flag:harmonyos>. Fails if no app is registered to handle the URI (iOS/Android<flag:harmonyos>/HarmonyOS</flag:harmonyos>) or the renderer rejects the navigation (Chromium).`,
|
|
137430
|
+
description: `Open a URL or deep-link scheme on the device.
|
|
137431
|
+
Use when navigating to a web page or deep-linking into an app (prefer custom schemes or \`launch-app\` over \`https://\` Universal/App Links). On Chromium, navigates the primary page (non-page schemes like \`tel:\`/\`mailto:\` fail). On physical iOS, the receiving app becomes active for automation.<flag:harmonyos> HarmonyOS opens URIs via \`aa start -U\`.</flag:harmonyos>
|
|
137432
|
+
Returns \`{ opened, url, note? }\`. Fails if no handler is registered<flag:harmonyos> (iOS/Android/HarmonyOS)</flag:harmonyos> or Chromium rejects navigation.`,
|
|
137479
137433
|
zodSchema: zodSchema17,
|
|
137480
137434
|
interaction: {
|
|
137481
137435
|
startedMsg: ({ params }) => `Opening ${safeDestination(params.url)}`,
|
|
@@ -138409,29 +138363,23 @@ var capability12 = {
|
|
|
138409
138363
|
};
|
|
138410
138364
|
var zodSchema21 = external_exports.object({
|
|
138411
138365
|
udid: external_exports.string().describe(
|
|
138412
|
-
"
|
|
138413
|
-
),
|
|
138414
|
-
x: external_exports.number().min(0).max(1).describe(
|
|
138415
|
-
"Anchor x. The wheel events land here; put it over the element you want to scroll."
|
|
138416
|
-
),
|
|
138417
|
-
y: external_exports.number().min(0).max(1).describe("Anchor y."),
|
|
138418
|
-
deltaX: external_exports.number().optional().describe(
|
|
138419
|
-
"Horizontal scroll distance as a fraction of the window width. Positive reveals content to the right; negative scrolls back left."
|
|
138420
|
-
),
|
|
138421
|
-
deltaY: external_exports.number().optional().describe(
|
|
138422
|
-
"Vertical scroll distance as a fraction of the window height (0.5 = half a window). Positive scrolls down (reveals content below), like rolling a mouse wheel toward you; negative scrolls back up."
|
|
138366
|
+
"Chromium device id (`chromium-cdp-<port>`)<flag:macos-apps> or Mac app id</flag:macos-apps> from `list-devices`."
|
|
138423
138367
|
),
|
|
138368
|
+
x: external_exports.number().min(0).max(1).describe("Normalized anchor x over the scrollable element."),
|
|
138369
|
+
y: external_exports.number().min(0).max(1).describe("Normalized anchor y."),
|
|
138370
|
+
deltaX: external_exports.number().optional().describe("Horizontal scroll fraction (+ right, - left)."),
|
|
138371
|
+
deltaY: external_exports.number().optional().describe("Vertical scroll fraction (+ down, - up; e.g. 0.5)."),
|
|
138424
138372
|
durationMs: external_exports.number().optional().describe(
|
|
138425
|
-
"
|
|
138373
|
+
"Scroll duration in ms (default 300)<flag:macos-apps>; ignored on Mac apps</flag:macos-apps>."
|
|
138426
138374
|
)
|
|
138427
138375
|
}).refine((p) => (p.deltaX ?? 0) !== 0 || (p.deltaY ?? 0) !== 0, {
|
|
138428
138376
|
message: "Pass a non-zero deltaX and/or deltaY \u2014 a scroll with no delta is a no-op."
|
|
138429
138377
|
});
|
|
138430
138378
|
var gestureScrollTool = {
|
|
138431
138379
|
id: "gesture-scroll",
|
|
138432
|
-
description: `Send mouse-wheel events at
|
|
138433
|
-
Use when
|
|
138434
|
-
Returns { scrolled: true, timestampMs }
|
|
138380
|
+
description: `Send mouse-wheel scroll events at normalized [0,1] anchor (x, y) in Chromium<flag:macos-apps> or a Mac app</flag:macos-apps>.
|
|
138381
|
+
Use when scrolling desktop lists or off-screen content (use \`gesture-swipe\` on iOS/Android<flag:harmonyos>/HarmonyOS</flag:harmonyos>).
|
|
138382
|
+
Returns \`{ scrolled: true, timestampMs }\`. Fails if CDP is unreachable<flag:macos-apps> or nothing under the point scrolls on a Mac app</flag:macos-apps>.`,
|
|
138435
138383
|
zodSchema: zodSchema21,
|
|
138436
138384
|
searchHint: "scroll wheel list page chromium<flag:macos-apps> mac</flag:macos-apps> mouse down up content fold",
|
|
138437
138385
|
interaction: {
|
|
@@ -138543,20 +138491,18 @@ async function runPointerDrag(from2, to, opts, pointer) {
|
|
|
138543
138491
|
}
|
|
138544
138492
|
var zodSchema22 = external_exports.object({
|
|
138545
138493
|
udid: external_exports.string().describe(
|
|
138546
|
-
"
|
|
138494
|
+
"Chromium device id (`chromium-cdp-<port>`)<flag:macos-apps> or Mac app id</flag:macos-apps> from `list-devices`."
|
|
138547
138495
|
),
|
|
138548
|
-
fromX: external_exports.number().min(0).max(1).describe("
|
|
138549
|
-
fromY: external_exports.number().min(0).max(1).describe("
|
|
138550
|
-
toX: external_exports.number().min(0).max(1).describe("
|
|
138551
|
-
toY: external_exports.number().min(0).max(1).describe("
|
|
138496
|
+
fromX: external_exports.number().min(0).max(1).describe("Start x."),
|
|
138497
|
+
fromY: external_exports.number().min(0).max(1).describe("Start y."),
|
|
138498
|
+
toX: external_exports.number().min(0).max(1).describe("End x."),
|
|
138499
|
+
toY: external_exports.number().min(0).max(1).describe("End y."),
|
|
138552
138500
|
durationMs: external_exports.number().max(MAX_DURATION_MS2, {
|
|
138553
138501
|
message: `durationMs must be at most ${MAX_DURATION_MS2} (10s): the drag holds the left button down for exactly this long, one frame per ~16ms, so a larger value is that much wall clock spent mid-press.`
|
|
138554
138502
|
}).optional().describe(
|
|
138555
|
-
"
|
|
138556
|
-
),
|
|
138557
|
-
momentum: external_exports.boolean().optional().describe(
|
|
138558
|
-
"Whether the drag releases with momentum; default true (a constant-speed drag). false decelerates into the release point, so an app that derives a fling from the release velocity (carousels, drag libraries) applies little to no momentum: use it when the drag must stop where it was aimed. Under ~100ms durationMs some fling survives; keep the default 300 when the fling must be fully suppressed."
|
|
138503
|
+
"Drag duration in ms (default 300<flag:macos-apps>; 800 for a Mac app long press</flag:macos-apps>)."
|
|
138559
138504
|
),
|
|
138505
|
+
momentum: external_exports.boolean().optional().describe("Default true (constant speed). false decelerates into release to avoid fling."),
|
|
138560
138506
|
// `momentum`'s earlier spelling, with the opposite polarity. Declared so this
|
|
138561
138507
|
// non-strict object refuses it instead of stripping it and running the default.
|
|
138562
138508
|
settle: external_exports.never({
|
|
@@ -138567,9 +138513,9 @@ var zodSchema22 = external_exports.object({
|
|
|
138567
138513
|
});
|
|
138568
138514
|
var gestureDragTool = {
|
|
138569
138515
|
id: "gesture-drag",
|
|
138570
|
-
description: `
|
|
138571
|
-
Use
|
|
138572
|
-
Returns { dragged: true, timestampMs }
|
|
138516
|
+
description: `Drag the left mouse button between normalized [0,1] window points in Chromium<flag:macos-apps> or a Mac app</flag:macos-apps>.
|
|
138517
|
+
Use when dragging sliders, drag-and-drop items, or selecting text (use \`gesture-scroll\` to scroll desktop lists; use \`gesture-swipe\` on iOS/Android<flag:harmonyos>/HarmonyOS</flag:harmonyos>).<flag:macos-apps> Mac app: same start/end point = long press; drops stay inside the app's windows.</flag:macos-apps>
|
|
138518
|
+
Returns \`{ dragged: true, timestampMs }\`. Fails if the CDP session is unreachable.`,
|
|
138573
138519
|
zodSchema: zodSchema22,
|
|
138574
138520
|
searchHint: "drag drop slider mouse press move release chromium<flag:macos-apps> mac</flag:macos-apps> select",
|
|
138575
138521
|
interaction: {
|
|
@@ -138836,22 +138782,18 @@ async function runOnIosDevice(runner, udid, events, interpolate) {
|
|
|
138836
138782
|
return { events: events.length, ...reactivated ? { reactivated: true } : {} };
|
|
138837
138783
|
}
|
|
138838
138784
|
var eventSchema = external_exports.object({
|
|
138839
|
-
type: external_exports.enum(["Down", "Move", "Up"]).describe("Touch event type"),
|
|
138840
|
-
x: external_exports.number().min(0).max(1).describe("
|
|
138841
|
-
y: external_exports.number().min(0).max(1).describe("
|
|
138842
|
-
x2: external_exports.number().min(0).max(1).optional().describe("Second finger x
|
|
138843
|
-
y2: external_exports.number().min(0).max(1).optional().describe("Second finger y
|
|
138844
|
-
delayMs: external_exports.number().optional().describe("Delay before
|
|
138785
|
+
type: external_exports.enum(["Down", "Move", "Up"]).describe("Touch event type."),
|
|
138786
|
+
x: external_exports.number().min(0).max(1).describe("Normalized x."),
|
|
138787
|
+
y: external_exports.number().min(0).max(1).describe("Normalized y."),
|
|
138788
|
+
x2: external_exports.number().min(0).max(1).optional().describe("Second finger x."),
|
|
138789
|
+
y2: external_exports.number().min(0).max(1).optional().describe("Second finger y."),
|
|
138790
|
+
delayMs: external_exports.number().optional().describe("Delay before event in ms (default 16).")
|
|
138845
138791
|
});
|
|
138846
138792
|
var zodSchema23 = external_exports.object({
|
|
138847
138793
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
138848
|
-
edge: external_exports.enum(screenEdges).optional().describe(
|
|
138849
|
-
|
|
138850
|
-
)
|
|
138851
|
-
events: external_exports.array(eventSchema).describe("Touch events, dispatched in order."),
|
|
138852
|
-
interpolate: external_exports.number().optional().describe(
|
|
138853
|
-
"Number of Move events to insert between each pair of consecutive events, linearly interpolating both x,y and x2,y2 and splitting the delay evenly, for a smooth gesture. Default: no interpolation."
|
|
138854
|
-
)
|
|
138794
|
+
edge: external_exports.enum(screenEdges).optional().describe("Starting screen edge for a single-finger system gesture (local iOS simulator)."),
|
|
138795
|
+
events: external_exports.array(eventSchema).describe("Ordered touch events."),
|
|
138796
|
+
interpolate: external_exports.number().optional().describe("Insert N linearly interpolated Move events between consecutive events (default 0).")
|
|
138855
138797
|
});
|
|
138856
138798
|
function validateEdge(params, device) {
|
|
138857
138799
|
if (params.edge === void 0) return;
|
|
@@ -138867,30 +138809,11 @@ function validateEdge(params, device) {
|
|
|
138867
138809
|
}
|
|
138868
138810
|
var gestureCustomTool = {
|
|
138869
138811
|
id: "gesture-custom",
|
|
138870
|
-
description: `Send a sequence of touch events
|
|
138871
|
-
Use
|
|
138872
|
-
|
|
138873
|
-
|
|
138874
|
-
|
|
138875
|
-
All x/y values are fractions of the screen width/height (not pixels).
|
|
138876
|
-
Physical iOS: a Down, any Moves, then an Up; x2/y2 adds a second finger. A plain Down then Up: same point = press-hold, other point = drag (Up delayMs = rest before the move); one Move at the Down point between them = long-press pickup (Move delayMs = hold, Up delayMs = move time). Any other train plays as timed paths, each event waiting its delayMs, and needs the app drawn in portrait.
|
|
138877
|
-
Returns { events: number } with the total count of events dispatched. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the target device is not booted or an event type is invalid.
|
|
138878
|
-
|
|
138879
|
-
Example long-press at center:
|
|
138880
|
-
[{"type":"Down","x":0.5,"y":0.5},{"type":"Up","x":0.5,"y":0.5,"delayMs":800}]
|
|
138881
|
-
|
|
138882
|
-
Example pick up a list item with a long press, then drag it up:
|
|
138883
|
-
[{"type":"Down","x":0.5,"y":0.6},{"type":"Move","x":0.5,"y":0.6,"delayMs":800},{"type":"Up","x":0.5,"y":0.3,"delayMs":500}]
|
|
138884
|
-
|
|
138885
|
-
Example smooth scroll down:
|
|
138886
|
-
[{"type":"Down","x":0.5,"y":0.7},
|
|
138887
|
-
{"type":"Move","x":0.5,"y":0.6},{"type":"Move","x":0.5,"y":0.5},{"type":"Move","x":0.5,"y":0.4},
|
|
138888
|
-
{"type":"Up","x":0.5,"y":0.3}]
|
|
138889
|
-
|
|
138890
|
-
Example pinch-to-zoom (with interpolate:10 for smoothness):
|
|
138891
|
-
events: [{"type":"Down","x":0.4,"y":0.5,"x2":0.6,"y2":0.5},
|
|
138892
|
-
{"type":"Up","x":0.2,"y":0.5,"x2":0.8,"y2":0.5}]
|
|
138893
|
-
interpolate: 10`,
|
|
138812
|
+
description: `Send a custom sequence of normalized [0,1] touch events.
|
|
138813
|
+
Use when you need long-press, drag-and-drop, edge/system gestures (\`edge\` on local iOS sim), or multi-waypoint/two-finger paths. Prefer \`gesture-tap\`, \`gesture-swipe\`, \`gesture-pinch\`, or \`gesture-rotate\` for standard gestures.<flag:macos-apps> Not supported on Mac apps (use \`gesture-tap\`, \`gesture-drag\`, \`gesture-scroll\`).</flag:macos-apps>
|
|
138814
|
+
Physical iOS: Down, optional Moves, then Up (\`x2\`/\`y2\` = second finger). Plain Down then Up: same point = press-hold, other point = drag (\`Up delayMs\` = rest before move); one Move at Down point between them = long-press pickup (\`Move delayMs\` = hold, \`Up delayMs\` = move time); any other train plays as timed paths (each waiting its \`delayMs\`, portrait required).
|
|
138815
|
+
Example long-press + drag: \`[{"type":"Down","x":0.5,"y":0.6},{"type":"Move","x":0.5,"y":0.6,"delayMs":800},{"type":"Up","x":0.5,"y":0.3,"delayMs":500}]\`.
|
|
138816
|
+
Returns \`{ events, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if device is not booted or events are invalid.`,
|
|
138894
138817
|
zodSchema: zodSchema23,
|
|
138895
138818
|
interaction: {
|
|
138896
138819
|
startedMsg: () => "Performing custom gesture",
|
|
@@ -138965,31 +138888,24 @@ var capability15 = {
|
|
|
138965
138888
|
};
|
|
138966
138889
|
var zodSchema24 = external_exports.object({
|
|
138967
138890
|
udid: external_exports.string().describe(
|
|
138968
|
-
"
|
|
138969
|
-
),
|
|
138970
|
-
centerX: external_exports.number().describe("Center of the pinch, horizontal."),
|
|
138971
|
-
centerY: external_exports.number().describe("Center of the pinch, vertical."),
|
|
138972
|
-
startDistance: external_exports.number().describe("Initial distance between the two fingers."),
|
|
138973
|
-
endDistance: external_exports.number().describe("Final distance between the two fingers."),
|
|
138974
|
-
endCenterX: external_exports.number().optional().describe(
|
|
138975
|
-
"Final horizontal center of the pinch. When set, the centroid drifts linearly from centerX to endCenterX over the gesture (e.g. to keep expanding fingers on-screen near an edge). Omit for a fixed center."
|
|
138976
|
-
),
|
|
138977
|
-
endCenterY: external_exports.number().optional().describe(
|
|
138978
|
-
"Final vertical center of the pinch; drifts from centerY like endCenterX. Omit for a fixed center."
|
|
138979
|
-
),
|
|
138980
|
-
angle: external_exports.number().optional().describe(
|
|
138981
|
-
"Angle in degrees of the axis the fingers lie on: 0 = horizontal (default), 90 = vertical."
|
|
138891
|
+
"Device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial)."
|
|
138982
138892
|
),
|
|
138893
|
+
centerX: external_exports.number().describe("Normalized center x."),
|
|
138894
|
+
centerY: external_exports.number().describe("Normalized center y."),
|
|
138895
|
+
startDistance: external_exports.number().describe("Initial normalized finger distance."),
|
|
138896
|
+
endDistance: external_exports.number().describe("Final normalized finger distance (> start = zoom in)."),
|
|
138897
|
+
endCenterX: external_exports.number().optional().describe("Optional final center x (centroid drifts linearly)."),
|
|
138898
|
+
endCenterY: external_exports.number().optional().describe("Optional final center y."),
|
|
138899
|
+
angle: external_exports.number().optional().describe("Finger axis angle in degrees (0 = horizontal, 90 = vertical)."),
|
|
138983
138900
|
durationMs: external_exports.number().optional().describe(
|
|
138984
|
-
"
|
|
138901
|
+
"Duration in ms (default 300)<flag:harmonyos>; clamped to 1\u201315000ms on HarmonyOS</flag:harmonyos>."
|
|
138985
138902
|
)
|
|
138986
138903
|
});
|
|
138987
138904
|
var gesturePinchTool = {
|
|
138988
138905
|
id: "gesture-pinch",
|
|
138989
|
-
description: `
|
|
138990
|
-
|
|
138991
|
-
|
|
138992
|
-
Use when you need to zoom in or out on a map, image, or zoomable view. Returns { pinched: 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, or on a physical iPhone when the app is not drawn in portrait.`,
|
|
138906
|
+
description: `Send a two-finger pinch-to-zoom gesture in normalized [0,1] coords (\`startDistance < endDistance\` zooms in, e.g. 0.2\u21920.6; \`>\` zooms out).
|
|
138907
|
+
Use when zooming maps, photos, or zoomable views (use \`gesture-rotate\` to rotate).
|
|
138908
|
+
Returns \`{ pinched: true, timestampMs, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if the backend<flag:harmonyos> (\`hdc\` on HarmonyOS)</flag:harmonyos> is unreachable or a physical iPhone app is not in portrait.`,
|
|
138993
138909
|
zodSchema: zodSchema24,
|
|
138994
138910
|
interaction: {
|
|
138995
138911
|
startedMsg: ({ params }) => `Pinching ${params.endDistance > params.startDistance ? "out" : "in"} at (${Math.round(params.centerX * 100)}%, ${Math.round(params.centerY * 100)}%)`,
|
|
@@ -139088,15 +139004,15 @@ var capability16 = {
|
|
|
139088
139004
|
android: { emulator: true, device: true, unknown: true }
|
|
139089
139005
|
};
|
|
139090
139006
|
var zodSchema25 = external_exports.object({
|
|
139091
|
-
udid: external_exports.string().describe("
|
|
139092
|
-
centerX: external_exports.number().describe("
|
|
139093
|
-
centerY: external_exports.number().describe("
|
|
139094
|
-
radius: external_exports.number().optional().describe("
|
|
139095
|
-
radiusX: external_exports.number().optional().describe("
|
|
139096
|
-
radiusY: external_exports.number().optional().describe("
|
|
139097
|
-
startAngle: external_exports.number().describe("
|
|
139098
|
-
endAngle: external_exports.number().describe("
|
|
139099
|
-
durationMs: external_exports.number().optional().describe("
|
|
139007
|
+
udid: external_exports.string().describe("Device id from `list-devices` (iOS UDID or Android serial)."),
|
|
139008
|
+
centerX: external_exports.number().describe("Normalized rotation center x."),
|
|
139009
|
+
centerY: external_exports.number().describe("Normalized rotation center y."),
|
|
139010
|
+
radius: external_exports.number().optional().describe("Normalized finger orbit radius (e.g. 0.15)."),
|
|
139011
|
+
radiusX: external_exports.number().optional().describe("Horizontal radius fraction of screen width (pair with `radiusY`)."),
|
|
139012
|
+
radiusY: external_exports.number().optional().describe("Vertical radius fraction of screen height (pair with `radiusX`)."),
|
|
139013
|
+
startAngle: external_exports.number().describe("Start angle in degrees (0 = right, 90 = down)."),
|
|
139014
|
+
endAngle: external_exports.number().describe("End angle in degrees (> startAngle = clockwise)."),
|
|
139015
|
+
durationMs: external_exports.number().optional().describe("Duration in ms (default 300).")
|
|
139100
139016
|
}).refine((p) => p.radiusX === void 0 === (p.radiusY === void 0), {
|
|
139101
139017
|
message: "radiusX and radiusY must be given together (one physical radius, two normalizations)"
|
|
139102
139018
|
}).refine((p) => p.radius !== void 0 || p.radiusX !== void 0, {
|
|
@@ -139104,10 +139020,9 @@ var zodSchema25 = external_exports.object({
|
|
|
139104
139020
|
});
|
|
139105
139021
|
var gestureRotateTool = {
|
|
139106
139022
|
id: "gesture-rotate",
|
|
139107
|
-
description: `Send a two-finger circular arc gesture
|
|
139108
|
-
|
|
139109
|
-
|
|
139110
|
-
Use when you need to rotate a map, image picker, or any rotateable UI element. Returns { rotated: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend is not reachable for the given device, or on a physical iPhone when the app is not drawn in portrait.`,
|
|
139023
|
+
description: `Send a two-finger circular arc gesture in normalized [0,1] coords to rotate content from \`startAngle\` to \`endAngle\`. Pass \`radius\`, or \`radiusX\`+\`radiusY\` with \`radiusX\xB7width = radiusY\xB7height\` for a circular physical orbit (a single radius or equal values trace an ellipse on a non-square screen; one half of the pair alone is rejected).
|
|
139024
|
+
Use when rotating a map, photo, or canvas (use \`gesture-pinch\` for zoom).
|
|
139025
|
+
Returns \`{ rotated: true, timestampMs, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if the backend is unreachable or a physical iPhone app is not in portrait.`,
|
|
139111
139026
|
zodSchema: zodSchema25,
|
|
139112
139027
|
interaction: {
|
|
139113
139028
|
startedMsg: ({ params }) => {
|
|
@@ -140272,10 +140187,10 @@ Returns { typed, keys, verified?, warning?, reactivated? }. Fails if an unsuppor
|
|
|
140272
140187
|
init_zod();
|
|
140273
140188
|
var pasteZodSchema = external_exports.object({
|
|
140274
140189
|
udid: external_exports.string().min(1).describe(
|
|
140275
|
-
"
|
|
140190
|
+
"Device id from `list-devices` (iOS simulator UDID, Android emulator serial<flag:macos-apps>, or Mac app id</flag:macos-apps>)."
|
|
140276
140191
|
),
|
|
140277
140192
|
text: external_exports.string().min(1).describe(
|
|
140278
|
-
"Text to
|
|
140193
|
+
"Text to paste. Supports `{{secret:<NAME>}}` placeholders resolved server-side (never ask the user for plaintext)."
|
|
140279
140194
|
)
|
|
140280
140195
|
});
|
|
140281
140196
|
|
|
@@ -140432,9 +140347,9 @@ function createPasteTool(registry2) {
|
|
|
140432
140347
|
});
|
|
140433
140348
|
return {
|
|
140434
140349
|
id: "paste",
|
|
140435
|
-
description: `Set the
|
|
140436
|
-
|
|
140437
|
-
|
|
140350
|
+
description: `Set the device clipboard to \`text\` and paste into the focused field (iOS simulator, Android emulator).<flag:macos-apps> Mac app: types \`text\` directly without touching the pasteboard.</flag:macos-apps>
|
|
140351
|
+
Use when pasting something a real user would paste (OTP/2FA code, long token/URL, or testing paste handling). Use \`keyboard\` for normal typing. Tap the field first to focus it.
|
|
140352
|
+
Returns \`{ pasted: true, via? }\`. Fails on TV targets, if clipboard/typing fails<flag:macos-apps>, or if the Mac app focus accepts no text</flag:macos-apps>.`,
|
|
140438
140353
|
zodSchema: pasteZodSchema,
|
|
140439
140354
|
searchHint: "paste clipboard pasteboard otp 2fa code fill field",
|
|
140440
140355
|
interaction: {
|
|
@@ -140943,11 +140858,9 @@ var capability21 = {
|
|
|
140943
140858
|
};
|
|
140944
140859
|
var shakeTool = {
|
|
140945
140860
|
id: "shake",
|
|
140946
|
-
description: `Send a shake gesture to
|
|
140947
|
-
Use when
|
|
140948
|
-
|
|
140949
|
-
Returns { shaken: true, count }.
|
|
140950
|
-
Works on local and remote (sim-remote) iOS simulators. Fails on a physical device or a TV: only phone/tablet simulators and emulators are supported.`,
|
|
140861
|
+
description: `Send a shake gesture to an iOS simulator or Android emulator.
|
|
140862
|
+
Use when triggering shake-bound actions (iOS Undo/Redo Typing, React Native dev menu, shake-to-report).
|
|
140863
|
+
Returns \`{ shaken: true, count }\`. Fails on physical devices or TVs.`,
|
|
140951
140864
|
zodSchema: shakeZodSchema,
|
|
140952
140865
|
searchHint: "shake motion accelerometer undo typing dev menu gesture",
|
|
140953
140866
|
interaction: {
|
|
@@ -140974,18 +140887,16 @@ init_device_info();
|
|
|
140974
140887
|
// ../tool-server/src/tools/network-conditions/schema.ts
|
|
140975
140888
|
init_zod();
|
|
140976
140889
|
var networkConditionsZodSchema = external_exports.object({
|
|
140977
|
-
udid: external_exports.string().min(1).describe("Device ID from list-devices
|
|
140978
|
-
bundleId: external_exports.string().min(1).optional().describe("
|
|
140890
|
+
udid: external_exports.string().min(1).describe("Device ID from `list-devices`."),
|
|
140891
|
+
bundleId: external_exports.string().min(1).optional().describe("App bundle ID (required on iOS; ignored elsewhere)."),
|
|
140979
140892
|
port: metroPortField.describe(
|
|
140980
|
-
"Metro port
|
|
140893
|
+
"Metro port exempt from shaping (omit for device default, usually 8081)."
|
|
140981
140894
|
),
|
|
140982
|
-
latencyMs: external_exports.number().int().min(0).max(6e4).optional().describe(
|
|
140983
|
-
|
|
140984
|
-
),
|
|
140985
|
-
downloadKbps: external_exports.number().int().min(1).optional().describe("Download limit in kilobits per second."),
|
|
140986
|
-
uploadKbps: external_exports.number().int().min(1).optional().describe("Upload limit in kilobits per second."),
|
|
140895
|
+
latencyMs: external_exports.number().int().min(0).max(6e4).optional().describe("Added latency in ms."),
|
|
140896
|
+
downloadKbps: external_exports.number().int().min(1).optional().describe("Download cap in kbps."),
|
|
140897
|
+
uploadKbps: external_exports.number().int().min(1).optional().describe("Upload cap in kbps."),
|
|
140987
140898
|
offline: external_exports.boolean().optional().describe(
|
|
140988
|
-
"
|
|
140899
|
+
"Simulate offline (on Android, `adb reverse` ports stay reachable while Metro at `10.0.2.2` does not; `false` alone resets conditions)."
|
|
140989
140900
|
)
|
|
140990
140901
|
}).strict();
|
|
140991
140902
|
function requestedConditions(params) {
|
|
@@ -141216,12 +141127,9 @@ var capability22 = {
|
|
|
141216
141127
|
};
|
|
141217
141128
|
var networkConditionsTool = {
|
|
141218
141129
|
id: "network-conditions",
|
|
141219
|
-
description: `Add latency,
|
|
141220
|
-
|
|
141221
|
-
|
|
141222
|
-
On Android, Argent shapes traffic that uses the system proxy. Restart the app if existing connections bypass shaping. Throttling fails if the emulator has a proxy Argent did not set. Ethernet can prevent offline mode. Reset if a crash leaves the emulator unable to connect.
|
|
141223
|
-
On Chromium, Argent shapes the active page. Workers and cross-site iframes are outside its scope.
|
|
141224
|
-
Fails on physical devices and remote iOS simulators.`,
|
|
141130
|
+
description: `Add latency, throttle bandwidth, or simulate offline mode on iOS simulators (per-app via native devtools, Metro/WS exempt), Android emulators (system proxy), or Chromium (active page). On Android, restart the app if existing connections bypass shaping, note that Ethernet can prevent offline mode, and reset if a crash leaves the emulator unable to connect. Omit all condition fields to reset.
|
|
141131
|
+
Use when testing loading states, retries, or timeouts (each call replaces previous conditions).
|
|
141132
|
+
Returns the scope and applied conditions (or null on reset), or on iOS a \`{ status, message }\` precheck block (follow \`message\` if \`status\` is present). Fails on physical devices, remote iOS simulators, or if Android has an unmanaged proxy.`,
|
|
141225
141133
|
zodSchema: networkConditionsZodSchema,
|
|
141226
141134
|
searchHint: "network throttle latency slow offline bandwidth 3g conditions emulate",
|
|
141227
141135
|
interaction: {
|
|
@@ -141636,25 +141544,19 @@ var iosImpl6 = {
|
|
|
141636
141544
|
};
|
|
141637
141545
|
var zodSchema29 = external_exports.object({
|
|
141638
141546
|
udid: external_exports.string().describe(
|
|
141639
|
-
"
|
|
141640
|
-
),
|
|
141641
|
-
posture: external_exports.enum(POSTURES2).optional().describe(
|
|
141642
|
-
"Where to move the hinge: `closed` shows the cover panel, `half-open` and `open` show the inner panel."
|
|
141547
|
+
"Foldable device id from `list-devices` (iOS simulator UDID or Android emulator serial)."
|
|
141643
141548
|
),
|
|
141644
|
-
|
|
141549
|
+
posture: external_exports.enum(POSTURES2).optional().describe("Target posture: `closed` (cover panel), `half-open`, or `open` (inner panel)."),
|
|
141550
|
+
angle: external_exports.number().min(0).max(180).optional().describe("Hinge angle in degrees (0 = closed, 180 = open).")
|
|
141645
141551
|
}).refine((p) => p.posture === void 0 !== (p.angle === void 0), {
|
|
141646
141552
|
message: "Pass exactly one of `posture` and `angle`."
|
|
141647
141553
|
});
|
|
141648
141554
|
var foldTool = {
|
|
141649
141555
|
id: "fold",
|
|
141650
|
-
description: `Move
|
|
141651
|
-
Use when
|
|
141652
|
-
|
|
141653
|
-
|
|
141654
|
-
To move a full-screen app onto either half of the open iPhone Duo, use \`gesture-custom\` with \`edge: "bottom"\`. Drag up, pause at center, then drag sideways and release in one contact.
|
|
141655
|
-
iOS returns { activeScreen, screen: { id, panel, width, height }, posture?, hingeAngle, warning? }. screen names the active panel and gives its size in pixels. posture is set only at 0\xB0, 120\xB0 and 180\xB0. warning is set when argent cannot find the active panel, or when the device did not change to the expected panel.
|
|
141656
|
-
Android returns { posture?, deviceState, hingeAngle?, warning? }. deviceState is the state Android committed (CLOSED, HALF_OPENED, OPENED), and posture is the matching preset. A lock screen the fold raises is dismissed; warning is set when it cannot be, or when a lock screen is showing or the screen is off after the fold. On a generic foldable AVD, closed shows only the left part of the display and describe frames do not match tap coordinates; use a Pixel Fold AVD to test the cover panel.
|
|
141657
|
-
Fails if the device is not foldable, is a remote simulator or a physical Android device.`,
|
|
141556
|
+
description: `Move a foldable iOS simulator or Android emulator hinge to a \`posture\` or \`angle\` (pass exactly one) and wait until input is ready.
|
|
141557
|
+
Use when testing an app across folded/unfolded postures (\`list-devices\` marks \`foldable: true\`; use \`rotate\` for orientation). Coordinates change with the active panel, so read the returned tree or call \`describe\` before tapping.
|
|
141558
|
+
iOS: fold to \`closed\`/\`open\` to guarantee a panel switch; returns \`{ activeScreen, screen, posture?, hingeAngle, warning? }\`. Android: returns \`{ posture?, deviceState, hingeAngle?, warning? }\` (use Pixel Fold AVD for accurate cover-panel coords).
|
|
141559
|
+
Fails if the device is not foldable, is a remote simulator, or is a physical Android device.`,
|
|
141658
141560
|
zodSchema: zodSchema29,
|
|
141659
141561
|
searchHint: "fold unfold hinge foldable duo posture open closed half-open panel screen split view",
|
|
141660
141562
|
interaction: {
|
|
@@ -141772,22 +141674,19 @@ var buttonSchema = external_exports.preprocess(
|
|
|
141772
141674
|
},
|
|
141773
141675
|
external_exports.union([external_exports.enum(BUTTONS), external_exports.array(external_exports.enum(BUTTONS)).min(1).max(64)])
|
|
141774
141676
|
).describe(
|
|
141775
|
-
'
|
|
141677
|
+
'Single remote button or array path run in one call (e.g. ["up","right","select"]; prefer an array over repeated calls).'
|
|
141776
141678
|
);
|
|
141777
141679
|
var zodSchema30 = external_exports.object({
|
|
141778
|
-
udid: external_exports.string().describe("
|
|
141680
|
+
udid: external_exports.string().describe("TV device id from `list-devices` (Apple TV, Android TV, or Vega)."),
|
|
141779
141681
|
button: buttonSchema,
|
|
141780
|
-
repeat: external_exports.number().int().min(1).max(50).optional().describe(
|
|
141781
|
-
'Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }.'
|
|
141782
|
-
)
|
|
141682
|
+
repeat: external_exports.number().int().min(1).max(50).optional().describe('Repeat `button` N times (default 1, e.g. `{ button: "down", repeat: 12 }`).')
|
|
141783
141683
|
});
|
|
141784
141684
|
function createTvRemoteTool(registry2) {
|
|
141785
141685
|
return {
|
|
141786
141686
|
id: "tv-remote",
|
|
141787
|
-
description: `Press a TV remote / D-pad button (or
|
|
141788
|
-
|
|
141789
|
-
|
|
141790
|
-
Returns { pressed, count }. Fails on a target that is not a TV, and on the Apple TV simulator for rewind, fastForward, next, previous, volumeUp, volumeDown and mute (its HID stack ignores them); every other button works on all three platforms.`,
|
|
141687
|
+
description: `Press a TV remote / D-pad button (or array path) on Apple TV (tvOS), Android TV, or Vega (Fire TV).
|
|
141688
|
+
Use when navigating focus or pressing remote keys on a TV instead of touch gestures. Call \`describe\` first to locate focus; check the returned tree after.
|
|
141689
|
+
Returns \`{ pressed, count }\`. Fails on non-TV targets, or on Apple TV sim for rewind/fastForward/next/previous/volume/mute.`,
|
|
141791
141690
|
zodSchema: zodSchema30,
|
|
141792
141691
|
searchHint: "tv remote dpad d-pad navigate focus up down left right select ok back home menu play pause rewind fast forward sequence path apple tv tvos android tv leanback vega fire tv",
|
|
141793
141692
|
interaction: {
|
|
@@ -142225,14 +142124,14 @@ init_zod();
|
|
|
142225
142124
|
var zodSchema32 = external_exports.object({
|
|
142226
142125
|
port: metroPortField,
|
|
142227
142126
|
device_id: external_exports.string().describe(
|
|
142228
|
-
"Device id from list-devices
|
|
142127
|
+
"Device id from `list-devices`: iOS UDID, Android/Vega serial, <flag:macos-apps>Mac app id (`macos-app-<bundle id>`), </flag:macos-apps>or Chromium id (`chromium-cdp-<port>`). Reuse this same id on subsequent `debugger-*` calls (or pass the error's `logicalDeviceId` if shared Metro is ambiguous)."
|
|
142229
142128
|
)
|
|
142230
142129
|
});
|
|
142231
142130
|
var debuggerConnectTool = {
|
|
142232
142131
|
id: "debugger-connect",
|
|
142233
|
-
description: `Connect to an app's
|
|
142234
|
-
Use when starting a debug session or before
|
|
142235
|
-
Returns connection
|
|
142132
|
+
description: `Connect to an app's JS debugger (React Native via Metro, or Chromium CDP) and start capturing console logs; reuses existing connections.<flag:macos-apps> Mac apps need a Debug build loading JS from Metro (react-native-macos 0.76+ or Mac Catalyst launched via Argent).</flag:macos-apps>
|
|
142133
|
+
Use when starting a debug session or before other \`debugger-*\` tools (keep the same \`device_id\`; retry with \`logicalDeviceId\` only if shared Metro reports ambiguity<flag:macos-apps>; Mac apps always keep the Mac app id</flag:macos-apps>).
|
|
142134
|
+
Returns connection info (plus \`note\` with prior log path after a crash). Fails if the runtime is unreachable.`,
|
|
142236
142135
|
zodSchema: zodSchema32,
|
|
142237
142136
|
interaction: {
|
|
142238
142137
|
startedMsg: () => "Connecting JavaScript debugger",
|
|
@@ -142268,16 +142167,15 @@ init_device_info();
|
|
|
142268
142167
|
var zodSchema33 = external_exports.object({
|
|
142269
142168
|
port: metroPortField,
|
|
142270
142169
|
device_id: external_exports.string().describe(
|
|
142271
|
-
"Device id
|
|
142170
|
+
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
142272
142171
|
)
|
|
142273
142172
|
});
|
|
142274
142173
|
function createDebuggerStatusTool(registry2) {
|
|
142275
142174
|
return {
|
|
142276
142175
|
id: "debugger-status",
|
|
142277
|
-
description: `
|
|
142278
|
-
Use when
|
|
142279
|
-
|
|
142280
|
-
- { status: "not_connected", connected: false, reason, detail, guidance } (port omitted on Chromium), with reason one of metro_not_running, no_app_connected, device_mismatch, cdp_unreachable, runtime_unresponsive, stale_connection, reconnecting. Follow the guidance field; do not retry in a loop.`,
|
|
142176
|
+
description: `Check JS runtime debugger connectivity and diagnostics.
|
|
142177
|
+
Use when verifying debugger health before other \`debugger-*\` tools.
|
|
142178
|
+
Returns \`{ status: "connected", port, projectRoot, deviceName, appName, logicalDeviceId, isNewDebugger, loadedScripts, sourceMapReady }\` or \`{ status: "not_connected", reason, detail, guidance }\` (follow \`guidance\`; don't retry in a loop). Never fails when the runtime is simply unreachable.`,
|
|
142281
142179
|
zodSchema: zodSchema33,
|
|
142282
142180
|
readOnly: true,
|
|
142283
142181
|
interaction: {
|
|
@@ -142374,14 +142272,15 @@ function guardModuleLoadErrors(expression) {
|
|
|
142374
142272
|
var zodSchema34 = external_exports.object({
|
|
142375
142273
|
port: metroPortField,
|
|
142376
142274
|
device_id: external_exports.string().describe(
|
|
142377
|
-
"Device id
|
|
142275
|
+
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
142378
142276
|
),
|
|
142379
|
-
expression: external_exports.string().describe("JavaScript expression to evaluate
|
|
142277
|
+
expression: external_exports.string().describe("JavaScript expression to evaluate.")
|
|
142380
142278
|
});
|
|
142381
142279
|
var debuggerEvaluateTool = {
|
|
142382
142280
|
id: "debugger-evaluate",
|
|
142383
|
-
description: `Run JavaScript in the app
|
|
142384
|
-
|
|
142281
|
+
description: `Run JavaScript in the app runtime (Hermes on React Native/Vega<flag:macos-apps>/Mac apps</flag:macos-apps>; V8 on Chromium; awaits Promises).
|
|
142282
|
+
Use when inspecting runtime state (e.g. localStorage/sessionStorage on Chromium) or calling app functions.
|
|
142283
|
+
Returns \`{ result, deviceName, appName, logicalDeviceId }\` (JSON-serialized; cyclic objects fail). Fails if disconnected or the expression throws.`,
|
|
142385
142284
|
zodSchema: zodSchema34,
|
|
142386
142285
|
searchHint: "javascript js eval expression runtime app state localstorage sessionstorage web storage",
|
|
142387
142286
|
interaction: {
|
|
@@ -143321,32 +143220,18 @@ function buildTextTree(data, opts) {
|
|
|
143321
143220
|
var zodSchema36 = external_exports.object({
|
|
143322
143221
|
port: metroPortField,
|
|
143323
143222
|
device_id: external_exports.string().describe(
|
|
143324
|
-
"Device id
|
|
143325
|
-
),
|
|
143326
|
-
onScreenOnly: external_exports.boolean().default(true).describe(
|
|
143327
|
-
"When true, only components visible on screen are returned. Set to false to include all mounted components, including those scrolled off-screen, e.g. to understand the full page structure."
|
|
143223
|
+
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
143328
143224
|
),
|
|
143329
|
-
|
|
143330
|
-
|
|
143331
|
-
)
|
|
143332
|
-
includeSkipped: external_exports.boolean().default(false).describe(
|
|
143333
|
-
"When true, appends a summary of all filtered components: total fiber count and skip counts by component name and by filter."
|
|
143334
|
-
)
|
|
143225
|
+
onScreenOnly: external_exports.boolean().default(true).describe("Only on-screen components (default true; false includes off-screen mounted nodes)."),
|
|
143226
|
+
maxNodes: external_exports.coerce.number().optional().describe("Max nodes to return (collapses single-child wrappers when exceeded)."),
|
|
143227
|
+
includeSkipped: external_exports.boolean().default(false).describe("Append filtered/skipped fiber counts summary.")
|
|
143335
143228
|
});
|
|
143336
143229
|
function createDebuggerComponentTreeTool() {
|
|
143337
143230
|
return {
|
|
143338
143231
|
id: "debugger-component-tree",
|
|
143339
|
-
description: `Fetch
|
|
143340
|
-
|
|
143341
|
-
|
|
143342
|
-
Full-screen transparent wrappers and implementation-detail components are pruned. Wrappers the size
|
|
143343
|
-
of their parent are pruned too, so a missing name proves nothing: check with debugger-inspect-element.
|
|
143344
|
-
|
|
143345
|
-
Use when you need what describe does not show: a testID for a selector (on Android, describe omits
|
|
143346
|
-
the testID of a view that has no label and is not tappable), or the component names and nesting
|
|
143347
|
-
behind the screen before editing code. To find what to tap, use describe.
|
|
143348
|
-
|
|
143349
|
-
Returns a compact text tree; call again after navigation. Fails if the Metro debugger is disconnected.<flag:macos-apps> On Mac apps with several React Native windows, the tool uses the root with the most components. With the old architecture (Paper), native views around the React root can shift tap points. Use describe for tap targets.</flag:macos-apps>`,
|
|
143232
|
+
description: `Fetch a compact React Native component tree with text/accessibilityLabel, \`[testID=\u2026]\`, and normalized \`(tap: x,y)\`<flag:macos-apps> (Mac app window incl. title bar)</flag:macos-apps>.
|
|
143233
|
+
Use when you need React component names/nesting or missing Android \`testID\`s (use \`describe\` for tap targets; verify pruned wrappers with \`debugger-inspect-element\`).
|
|
143234
|
+
Returns a text tree. Fails if the Metro debugger is disconnected.<flag:macos-apps> Mac apps: uses the root with the most components; on Paper, use \`describe\` for tap points.</flag:macos-apps>`,
|
|
143350
143235
|
zodSchema: zodSchema36,
|
|
143351
143236
|
searchHint: "react native component tree testID testIDs selector component names hierarchy",
|
|
143352
143237
|
readOnly: true,
|
|
@@ -143890,33 +143775,24 @@ function filterInspectItems(items, includeSkipped = false) {
|
|
|
143890
143775
|
var zodSchema37 = external_exports.object({
|
|
143891
143776
|
port: metroPortField,
|
|
143892
143777
|
device_id: external_exports.string().describe(
|
|
143893
|
-
"Device id
|
|
143778
|
+
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
143894
143779
|
),
|
|
143895
143780
|
x: external_exports.coerce.number().describe(
|
|
143896
|
-
"
|
|
143781
|
+
"X in logical pixels from screen left<flag:macos-apps> (or Mac app window left, title bar included)</flag:macos-apps>."
|
|
143897
143782
|
),
|
|
143898
143783
|
y: external_exports.coerce.number().describe(
|
|
143899
|
-
"
|
|
143784
|
+
"Y in logical pixels from screen top<flag:macos-apps> (or Mac app window top, title bar included)</flag:macos-apps>."
|
|
143900
143785
|
),
|
|
143901
|
-
contextLines: external_exports.coerce.number().default(3).describe("
|
|
143902
|
-
resolveSourceMaps: external_exports.boolean().default(true).describe(
|
|
143903
|
-
|
|
143904
|
-
)
|
|
143905
|
-
maxItems: external_exports.coerce.number().default(35).describe(
|
|
143906
|
-
"Maximum number of hierarchy items to return, most specific first. The default covers all app-specific code; increase to 70+ to also see the navigation/screen structure."
|
|
143907
|
-
),
|
|
143908
|
-
includeSkipped: external_exports.boolean().default(false).describe(
|
|
143909
|
-
"When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason."
|
|
143910
|
-
)
|
|
143786
|
+
contextLines: external_exports.coerce.number().default(3).describe("Source context lines around each component."),
|
|
143787
|
+
resolveSourceMaps: external_exports.boolean().default(true).describe("Symbolicate via Metro and include code snippets (false = raw bundle frames)."),
|
|
143788
|
+
maxItems: external_exports.coerce.number().default(35).describe("Max hierarchy items, most specific first (default 35)."),
|
|
143789
|
+
includeSkipped: external_exports.boolean().default(false).describe("Keep normally filtered items marked `skipped: true`.")
|
|
143911
143790
|
});
|
|
143912
143791
|
var debuggerInspectElementTool = {
|
|
143913
143792
|
id: "debugger-inspect-element",
|
|
143914
|
-
description: `Inspect the React component hierarchy at
|
|
143915
|
-
|
|
143916
|
-
|
|
143917
|
-
The first items (lowest indices) are the most specific: the exact component under
|
|
143918
|
-
the tap point and its direct parents. Higher indices are broader context (page, navigator).
|
|
143919
|
-
Use when you need the source file and line for a component at a point. Convert fractions from debugger-component-tree using the width and height in its Screen line. Fails if the app is disconnected or the point is outside the screen.<flag:macos-apps> On Mac apps with several React Native windows, the tool uses the root with the most components. With the old architecture (Paper), native views around the React root can shift the result. Check the returned component against the intended control.</flag:macos-apps>`,
|
|
143793
|
+
description: `Inspect the React component hierarchy at logical pixel (x, y), from the tapped leaf upward with source file:line and code snippets.
|
|
143794
|
+
Use when finding the source file/line for a React Native element (multiply \`debugger-component-tree\` fractions by its Screen dimensions).
|
|
143795
|
+
Returns \`{ x, y, items, truncated?, hiddenCount? }\`. Fails if disconnected or (x, y) is off-screen.<flag:macos-apps> Mac apps: uses the window root with the most components; on Paper, native views can offset hits.</flag:macos-apps>`,
|
|
143920
143796
|
zodSchema: zodSchema37,
|
|
143921
143797
|
readOnly: true,
|
|
143922
143798
|
interaction: {
|
|
@@ -144048,20 +143924,17 @@ var CONSOLE_LEVELS = [
|
|
|
144048
143924
|
var zodSchema38 = external_exports.object({
|
|
144049
143925
|
port: metroPortField,
|
|
144050
143926
|
device_id: external_exports.string().describe(
|
|
144051
|
-
"Device id
|
|
143927
|
+
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
144052
143928
|
),
|
|
144053
|
-
tail: external_exports.coerce.number().int().min(1).max(RECENT_PER_LEVEL).optional().describe("
|
|
144054
|
-
levels: external_exports.array(external_exports.enum(CONSOLE_LEVELS)).min(1).optional().describe(
|
|
144055
|
-
'Return only these levels in `entries`, e.g. ["warning", "error"]. Stats and clusters stay unfiltered.'
|
|
144056
|
-
)
|
|
143929
|
+
tail: external_exports.coerce.number().int().min(1).max(RECENT_PER_LEVEL).optional().describe("Newest entries to inline (default 20)."),
|
|
143930
|
+
levels: external_exports.array(external_exports.enum(CONSOLE_LEVELS)).min(1).optional().describe('Filter inline `entries` by level (e.g. ["warning", "error"]).')
|
|
144057
143931
|
});
|
|
144058
143932
|
function createDebuggerLogRegistryTool(registry2) {
|
|
144059
143933
|
return {
|
|
144060
143934
|
id: "debugger-log-registry",
|
|
144061
|
-
description: `Get a summary of
|
|
144062
|
-
|
|
144063
|
-
|
|
144064
|
-
When the debugger cannot be reached, it returns { status: "not_connected", reason, detail, guidance } with NO log file. Follow the guidance (do not retry in a loop). Grep a log file in this state only when a { note } names one kept from before the app crashed. A "connected" result's stats may come from a session whose socket has since died. Use debugger-status, not this tool, to judge debugger health.`,
|
|
143935
|
+
description: `Get a summary of JS console logs captured from React Native<flag:macos-apps> (including Mac apps)</flag:macos-apps> or Chromium, with newest \`entries\` inline (truncated to 300 chars).
|
|
143936
|
+
Use when investigating warnings, errors, or console output. Check \`entries\` first; Grep \`file\` for older/full lines (never Read it whole; up to 50k lines). Use \`debugger-status\` to check connection health.
|
|
143937
|
+
Returns \`{ status: "connected", file, entries, clusters, note? }\` (\`note\` flags missing/crashed prior sessions), or \`{ status: "not_connected", reason, guidance }\` (follow guidance; don't retry in a loop). Never fails when the runtime is simply unreachable.`,
|
|
144065
143938
|
zodSchema: zodSchema38,
|
|
144066
143939
|
readOnly: true,
|
|
144067
143940
|
interaction: {
|
|
@@ -144265,20 +144138,17 @@ ${lines.join("\n")}`;
|
|
|
144265
144138
|
var zodSchema39 = external_exports.object({
|
|
144266
144139
|
port: metroPortField,
|
|
144267
144140
|
device_id: external_exports.string().describe(
|
|
144268
|
-
"Device ID from list-devices
|
|
144141
|
+
"Device ID from `list-devices` (or `logicalDeviceId` if shared Metro capture used it)<flag:macos-apps>; Mac app: Mac app id `macos-app-<bundle id>`</flag:macos-apps>."
|
|
144269
144142
|
),
|
|
144270
144143
|
// `.default` covers only an omitted param, and `z.coerce.number()` reads null as 0, so
|
|
144271
144144
|
// null would return the oldest page. Agents send null for "not set": read it as "latest".
|
|
144272
|
-
pageIndex: external_exports.union([external_exports.coerce.number().int().nonnegative(), external_exports.literal("latest")]).nullable().default("latest").transform((value) => value ?? "latest").describe(
|
|
144273
|
-
'Zero-based page index. "latest" and null select the newest page. Each page contains up to 50 entries.'
|
|
144274
|
-
)
|
|
144145
|
+
pageIndex: external_exports.union([external_exports.coerce.number().int().nonnegative(), external_exports.literal("latest")]).nullable().default("latest").transform((value) => value ?? "latest").describe('0-based page index, or `"latest"`/null for newest (50 entries/page).')
|
|
144275
144146
|
});
|
|
144276
144147
|
var networkLogsTool = {
|
|
144277
144148
|
id: "view-network-logs",
|
|
144278
|
-
description: `List captured HTTP requests
|
|
144279
|
-
|
|
144280
|
-
|
|
144281
|
-
Fails if the Chromium target is unreachable. A read can also fail if Argent cannot reach the debugger for an existing JS capture. If the tool returns a capture message in place of a list, follow it before retrying.`,
|
|
144149
|
+
description: `List captured JS HTTP requests (React Native) or active-tab requests (Chromium). Call \`network-capture-start\` first on iOS<flag:macos-apps>/Mac apps</flag:macos-apps>/Android (on Vega, reading starts capture). Use \`native-network-logs\` for native traffic.
|
|
144150
|
+
Use when finding requests or comparing API calls (pass an ID to \`view-network-request-details\` for headers/bodies).
|
|
144151
|
+
Returns a paginated list of request IDs, status, size, and timing. Fails if Chromium or the JS debugger is unreachable.`,
|
|
144282
144152
|
zodSchema: zodSchema39,
|
|
144283
144153
|
readOnly: true,
|
|
144284
144154
|
interaction: {
|
|
@@ -144445,16 +144315,18 @@ ${postData.slice(0, MAX_BODY_SIZE)}...`;
|
|
|
144445
144315
|
var zodSchema40 = external_exports.object({
|
|
144446
144316
|
port: metroPortField,
|
|
144447
144317
|
device_id: external_exports.string().describe(
|
|
144448
|
-
"Device ID for the
|
|
144318
|
+
"Device ID for the log (or `logicalDeviceId` if JS capture used it)<flag:macos-apps>; Mac app: Mac app id</flag:macos-apps>."
|
|
144319
|
+
),
|
|
144320
|
+
requestId: external_exports.string().describe(
|
|
144321
|
+
"Request ID from `view-network-logs`, `native-network-logs`, or `await-network-request`."
|
|
144449
144322
|
),
|
|
144450
|
-
|
|
144451
|
-
includeBody: external_exports.boolean().default(true).describe("Set false to omit the response body. The request body can still appear.")
|
|
144323
|
+
includeBody: external_exports.boolean().default(true).describe("Include response body (default true).")
|
|
144452
144324
|
});
|
|
144453
144325
|
var networkRequestTool = {
|
|
144454
144326
|
id: "view-network-request-details",
|
|
144455
|
-
description: `Read
|
|
144456
|
-
|
|
144457
|
-
|
|
144327
|
+
description: `Read full details (status, timing, redacted headers, and bodies truncated to 1000 chars) for one captured HTTP request ID.
|
|
144328
|
+
Use when inspecting payloads or headers of a request from a network log or \`await-network-request\`.
|
|
144329
|
+
Returns request/response details, or a not-found message (refresh the log after JS reloads). Fails if the backing debugger/CDP target is unreachable.`,
|
|
144458
144330
|
zodSchema: zodSchema40,
|
|
144459
144331
|
readOnly: true,
|
|
144460
144332
|
interaction: {
|
|
@@ -144851,10 +144723,9 @@ var JS_ANSWER_WAIT_MS = 5e3;
|
|
|
144851
144723
|
function createNetworkCaptureStartTool(registry2) {
|
|
144852
144724
|
return {
|
|
144853
144725
|
id: "network-capture-start",
|
|
144854
|
-
description: `Start HTTP capture on iOS simulators, Android<flag:macos-apps>, Mac apps</flag:macos-apps
|
|
144855
|
-
|
|
144856
|
-
|
|
144857
|
-
Fails with NETWORK_CAPTURE_UNAVAILABLE or TOOL_DEPENDENCY_MISSING when every requested layer is unavailable.`,
|
|
144726
|
+
description: `Start HTTP capture (JS and/or native) on iOS simulators, Android<flag:macos-apps>, Mac apps</flag:macos-apps>, and Chromium, opening a new window for \`await-network-request\`.
|
|
144727
|
+
Use when preparing to inspect or assert network traffic before triggering an action (stop with \`network-capture-stop\` afterward; re-call after reload/relaunch for JS capture).<flag:macos-apps> Xcode-launched RN Mac apps: pass \`layer: "js"\`.</flag:macos-apps>
|
|
144728
|
+
Returns \`{ status: "ok", layers }\` with each layer's \`armed\` state and any \`reason\`. Fails if every requested layer is unavailable.`,
|
|
144858
144729
|
zodSchema: captureSchema,
|
|
144859
144730
|
capability: CAPTURE_CAPABILITY,
|
|
144860
144731
|
interaction: {
|
|
@@ -145209,8 +145080,9 @@ var JS_ANSWER_WAIT_MS2 = 5e3;
|
|
|
145209
145080
|
function createNetworkCaptureStopTool(registry2) {
|
|
145210
145081
|
return {
|
|
145211
145082
|
id: "network-capture-stop",
|
|
145212
|
-
description: `Stop capture
|
|
145213
|
-
|
|
145083
|
+
description: `Stop HTTP capture while keeping recorded requests (closes the \`await-network-request\` window on Chromium; read Android native bodies before stopping).
|
|
145084
|
+
Use when done collecting traffic or before profiling.
|
|
145085
|
+
Returns \`{ status: "ok", layers }\` with \`armed\` and any \`reason\`. Fails on invalid targets.`,
|
|
145214
145086
|
zodSchema: captureSchema,
|
|
145215
145087
|
capability: CAPTURE_CAPABILITY,
|
|
145216
145088
|
interaction: {
|
|
@@ -147202,32 +147074,24 @@ var DEFAULT_TIMEOUT_MS4 = 1e4;
|
|
|
147202
147074
|
var DEFAULT_POLL_INTERVAL_MS2 = 400;
|
|
147203
147075
|
var MIN_JS_READ_MS = 1e3;
|
|
147204
147076
|
var zodSchema45 = external_exports.object({
|
|
147205
|
-
udid: external_exports.string().min(1).describe(
|
|
147206
|
-
"Device ID passed as udid to network-capture-start. The wait reuses its Metro target."
|
|
147207
|
-
),
|
|
147077
|
+
udid: external_exports.string().min(1).describe("Device ID used in `network-capture-start`."),
|
|
147208
147078
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
147209
|
-
"
|
|
147079
|
+
"`bundleId` used in `network-capture-start` (Chromium: placeholder like `argent.capture`)."
|
|
147210
147080
|
),
|
|
147211
147081
|
url: external_exports.string().min(1).describe(
|
|
147212
|
-
"URL text
|
|
147082
|
+
"URL text/regex to match (no `{{secret:...}}` placeholders; full URL is returned)."
|
|
147213
147083
|
),
|
|
147214
147084
|
urlMatch: external_exports.enum(["contains", "equals", "matches"]).optional().describe(
|
|
147215
|
-
"contains (default)
|
|
147085
|
+
"`contains` (default) / `equals` (case-insensitive) or `matches` (case-sensitive JS regex)."
|
|
147216
147086
|
),
|
|
147217
|
-
method: external_exports.string().min(1).optional().describe("HTTP method
|
|
147087
|
+
method: external_exports.string().min(1).optional().describe("HTTP method (case-insensitive)."),
|
|
147218
147088
|
status: external_exports.union([
|
|
147219
147089
|
external_exports.enum(STATUS_CLASSES),
|
|
147220
147090
|
external_exports.coerce.number().int().min(100).max(599)
|
|
147221
|
-
]).optional().describe(
|
|
147222
|
-
|
|
147223
|
-
),
|
|
147224
|
-
|
|
147225
|
-
"complete (default) accepts a finished response, including HTTP errors. failed accepts a request error. any accepts either."
|
|
147226
|
-
),
|
|
147227
|
-
timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(`Wait limit in milliseconds. Default ${DEFAULT_TIMEOUT_MS4}.`),
|
|
147228
|
-
pollIntervalMs: external_exports.number().int().min(50).max(5e3).optional().describe(
|
|
147229
|
-
`Interval between capture reads in milliseconds. Default ${DEFAULT_POLL_INTERVAL_MS2}.`
|
|
147230
|
-
)
|
|
147091
|
+
]).optional().describe('Exact HTTP status or class (e.g. "2xx").'),
|
|
147092
|
+
outcome: external_exports.enum(["complete", "failed", "any"]).optional().describe("`complete` (default, incl. HTTP errors), `failed` (network error), or `any`."),
|
|
147093
|
+
timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(`Timeout in ms (default ${DEFAULT_TIMEOUT_MS4}).`),
|
|
147094
|
+
pollIntervalMs: external_exports.number().int().min(50).max(5e3).optional().describe(`Poll interval in ms (default ${DEFAULT_POLL_INTERVAL_MS2}).`)
|
|
147231
147095
|
}).strict().superRefine((params, ctx) => {
|
|
147232
147096
|
if (params.url.includes(SECRET_PLACEHOLDER_MARKER)) {
|
|
147233
147097
|
ctx.addIssue({
|
|
@@ -147276,9 +147140,9 @@ function createAwaitNetworkRequestTool(registry2) {
|
|
|
147276
147140
|
return {
|
|
147277
147141
|
// A literal, so scripts/extract-tools.mjs finds the description it scores.
|
|
147278
147142
|
id: "await-network-request",
|
|
147279
|
-
description: `Check
|
|
147280
|
-
|
|
147281
|
-
|
|
147143
|
+
description: `Check for a matching HTTP request in the latest \`network-capture-start\` window (unsupported on physical iPhones and Vega; Chromium matches post-redirect URL/method).
|
|
147144
|
+
Use when asserting or synchronizing on an API call after triggering a UI action.
|
|
147145
|
+
Returns \`{ success, elapsed, match?, cause?, nearMisses?, layers? }\` (pass \`match.id\` to \`view-network-request-details\`). Fails with \`NETWORK_CAPTURE_NOT_STARTED\` if capture was not started; \`success: false\` fails e2e steps and stops \`run-sequence\`.`,
|
|
147282
147146
|
zodSchema: zodSchema45,
|
|
147283
147147
|
searchHint: "wait await network request http api call fetch xhr response status url match after capture start e2e assert",
|
|
147284
147148
|
readOnly: true,
|
|
@@ -147774,21 +147638,17 @@ function safeGetState(registry2, urn) {
|
|
|
147774
147638
|
var zodSchema47 = external_exports.object({
|
|
147775
147639
|
port: metroPortField,
|
|
147776
147640
|
device_id: external_exports.string().describe(
|
|
147777
|
-
"Device ID from list-devices<flag:macos-apps>, including a Mac app ID</flag:macos-apps
|
|
147641
|
+
"Device ID from list-devices<flag:macos-apps>, including a Mac app ID</flag:macos-apps> (or `logicalDeviceId` on shared Metro if requested)."
|
|
147778
147642
|
),
|
|
147779
|
-
sample_interval_us: external_exports.coerce.number().int().positive().default(100).describe("CPU sampling interval in microseconds"),
|
|
147780
|
-
force: external_exports.boolean().default(false).describe(
|
|
147781
|
-
"Take over an active profiling session even when it is owned by another tool-server and still fresh. Set to true only when you know the prior owner is gone."
|
|
147782
|
-
)
|
|
147643
|
+
sample_interval_us: external_exports.coerce.number().int().positive().default(100).describe("CPU sampling interval in microseconds."),
|
|
147644
|
+
force: external_exports.boolean().default(false).describe("Take over another active fresh session (ask user approval first).")
|
|
147783
147645
|
});
|
|
147784
147646
|
function createReactProfilerStartTool(registry2) {
|
|
147785
147647
|
return {
|
|
147786
147648
|
id: "react-profiler-start",
|
|
147787
|
-
description: `
|
|
147788
|
-
|
|
147789
|
-
|
|
147790
|
-
Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture }. On iOS and Android, a warning names the apps with native network capture on (started by network-capture-start): their timings in the profile can differ. If a session is already running, returns { already_running: true, mine, owner, \u2026 } instead, without clobbering its data, unless it is another tool-server's stale run, has no owner record, or is a lost run of this tool-server: start replaces those. mine: true means this tool-server started the run: if it is yours, call react-profiler-stop. With stale: true it may be another agent's: follow the note. Otherwise, BEFORE OVERTAKING with { force: true }, ask the user for approval first, as how_to_reclaim explains. A start that replaces a run reports it in took_over.
|
|
147791
|
-
Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
|
|
147649
|
+
description: `Start recording Hermes CPU samples and React commits. Use when profiling React Native performance (pair with \`native-profiler-start\` in parallel on iOS/Android<flag:macos-apps>/Mac apps</flag:macos-apps>, then stop with \`react-profiler-stop\`).<flag:macos-apps> Mac apps need a Debug build loading JS from Metro (react-native-macos 0.76+ or Mac Catalyst); connects without debugger-connect.</flag:macos-apps>
|
|
147650
|
+
Returns \`{ started_at, startedAtEpochMs, hermes_version, detected_architecture }\` or \`{ already_running: true, mine, owner, \u2026 }\` (ask approval before \`force: true\`). On iOS and Android, a warning names the apps with native network capture on.
|
|
147651
|
+
Fails if Hermes or Metro CDP is unreachable.`,
|
|
147792
147652
|
zodSchema: zodSchema47,
|
|
147793
147653
|
interaction: {
|
|
147794
147654
|
startedMsg: () => "Starting React profiler",
|
|
@@ -148865,12 +148725,9 @@ var zodSchema48 = external_exports.object({
|
|
|
148865
148725
|
function createReactProfilerStopTool(registry2) {
|
|
148866
148726
|
return {
|
|
148867
148727
|
id: "react-profiler-stop",
|
|
148868
|
-
description: `Stop
|
|
148869
|
-
|
|
148870
|
-
|
|
148871
|
-
Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices, react_render_ms, react_render_share_pct, react_render_peak_1s_pct }.
|
|
148872
|
-
If some fibers' display names could not be resolved (typically modals, tooltips or animations that unmounted before stop), it also returns { unattributed_ms, unattributed_fiber_count, unattributed_commit_count }: the work missing from the per-component breakdown. Per-commit durations stay correct.
|
|
148873
|
-
Fails if no active profiling session exists, another stop is running, the CDP connection was lost during recording, or another session took the run over.`,
|
|
148728
|
+
description: `Stop React profiling and store CPU samples + commit tree for \`react-profiler-analyze\`, \`profiler-commit-query\`, and \`profiler-cpu-query\`.
|
|
148729
|
+
Use when finishing an interaction recorded after \`react-profiler-start\`.
|
|
148730
|
+
Returns \`{ duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices, react_render_ms, react_render_share_pct, react_render_peak_1s_pct, unattributed_*? }\`. Fails if no active session exists, CDP disconnected, or another session took over.`,
|
|
148874
148731
|
zodSchema: zodSchema48,
|
|
148875
148732
|
// Collection can outlast the MCP client's 30 s abort. The client would then
|
|
148876
148733
|
// resend the call, and the resend fails on the stop still collecting.
|
|
@@ -150858,34 +150715,24 @@ async function unrelatedPaths(a, b) {
|
|
|
150858
150715
|
return outside((0, import_path6.relative)(from2, to)) && outside((0, import_path6.relative)(to, from2));
|
|
150859
150716
|
}
|
|
150860
150717
|
var annotationSchema = external_exports.object({
|
|
150861
|
-
offsetMs: external_exports.coerce.number().describe(
|
|
150862
|
-
|
|
150863
|
-
),
|
|
150864
|
-
label: external_exports.string().describe("Description of the action performed")
|
|
150718
|
+
offsetMs: external_exports.coerce.number().describe("Ms since profiling started (`tapTimestampMs - startedAtEpochMs`)."),
|
|
150719
|
+
label: external_exports.string().describe("Action label.")
|
|
150865
150720
|
});
|
|
150866
150721
|
var zodSchema50 = external_exports.object({
|
|
150867
150722
|
port: metroPortField,
|
|
150868
150723
|
device_id: external_exports.string().describe(
|
|
150869
|
-
"Device ID
|
|
150724
|
+
"Device ID from list-devices used for the profile<flag:macos-apps> (Mac app: its list-devices ID)</flag:macos-apps>."
|
|
150870
150725
|
),
|
|
150871
|
-
project_root: external_exports.string().describe("Absolute path to the RN project root
|
|
150872
|
-
platform: external_exports.enum(["ios", "android", "macos"]).optional().describe("
|
|
150873
|
-
rn_version: external_exports.coerce.string().default("unknown").describe('
|
|
150874
|
-
annotations: external_exports.array(annotationSchema).optional().describe(
|
|
150875
|
-
"User actions to annotate the report's commits with: each commit shows the action that preceded it."
|
|
150876
|
-
)
|
|
150726
|
+
project_root: external_exports.string().describe("Absolute path to the RN project root."),
|
|
150727
|
+
platform: external_exports.enum(["ios", "android", "macos"]).optional().describe("Fallback platform for source lookup if absent from recording.").meta({ [FLAG_ENUM_META_KEY]: { macos: MACOS_APPS_FLAG } }),
|
|
150728
|
+
rn_version: external_exports.coerce.string().default("unknown").describe('RN version (e.g. "0.73.4").'),
|
|
150729
|
+
annotations: external_exports.array(annotationSchema).optional().describe("User actions to annotate report commits.")
|
|
150877
150730
|
});
|
|
150878
150731
|
var reactProfilerAnalyzeTool = {
|
|
150879
150732
|
id: "react-profiler-analyze",
|
|
150880
|
-
description: `Analyze stored profiling data
|
|
150881
|
-
|
|
150882
|
-
|
|
150883
|
-
render cascades, root cause identification, and a top components table.
|
|
150884
|
-
Raw profiling data is saved to disk with a unique session timestamp for later reload via profiler-load.
|
|
150885
|
-
After presenting the report, ask the user whether to investigate further (drill-down with
|
|
150886
|
-
profiler-cpu-query / profiler-commit-query) or implement fixes and re-profile for comparison.
|
|
150887
|
-
Use when the profiling session is complete and you need to interpret the collected data.
|
|
150888
|
-
Fails if react-profiler-stop has not been called or no profiling data is stored.`,
|
|
150733
|
+
description: `Analyze stored React profiling data into a markdown report of hot commits (\u226516ms), render cascades, root causes, and top components.
|
|
150734
|
+
Use when \`react-profiler-stop\` has finished and you want to interpret the profile (drill down further with \`profiler-cpu-query\` / \`profiler-commit-query\`).
|
|
150735
|
+
Returns \`{ report, reportFile, hotCommitsTotal, hotCommitsShown, sessionFiles }\`. Fails if no profiling data is stored.`,
|
|
150889
150736
|
zodSchema: zodSchema50,
|
|
150890
150737
|
interaction: {
|
|
150891
150738
|
startedMsg: () => "Analyzing React profile",
|
|
@@ -156121,23 +155968,22 @@ var zodSchema55 = external_exports.object({
|
|
|
156121
155968
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
156122
155969
|
),
|
|
156123
155970
|
app_process: external_exports.string().optional().describe(
|
|
156124
|
-
"iOS
|
|
155971
|
+
"iOS executable/name or Android package (auto-detects foreground app if omitted)<flag:macos-apps>; omit for Mac apps</flag:macos-apps>."
|
|
156125
155972
|
),
|
|
156126
155973
|
template_path: external_exports.string().optional().describe(
|
|
156127
|
-
'iOS<flag:macos-apps
|
|
155974
|
+
'iOS<flag:macos-apps>/Mac app</flag:macos-apps> Instruments `.tracetemplate` path or built-in name (e.g. "Time Profiler"; default: bundled template).'
|
|
156128
155975
|
),
|
|
156129
155976
|
malloc_stack_logging: external_exports.boolean().optional().describe(
|
|
156130
|
-
"iOS<flag:macos-apps
|
|
155977
|
+
"iOS<flag:macos-apps>/Mac apps</flag:macos-apps> only: restart app with allocation stacks from launch (adds overhead; leave off for CPU/hang timing)."
|
|
156131
155978
|
)
|
|
156132
155979
|
});
|
|
156133
155980
|
var nativeProfilerStartTool = {
|
|
156134
155981
|
id: "native-profiler-start",
|
|
156135
155982
|
// iOS can outlast the 30s MCP fetch timeout, whose replay would start a second xctrace.
|
|
156136
155983
|
longRunning: true,
|
|
156137
|
-
description: `Start native profiling
|
|
156138
|
-
|
|
156139
|
-
|
|
156140
|
-
With malloc stack logging off, Argent blocks the bundled template if it detects a WebKit heap or the check fails. Use "Time Profiler" to keep the app's state, or set malloc_stack_logging to true to restart the app and record leaks with the bundled template. With logging off, other templates that use the Allocations instrument, including "Leaks" and "Allocations", can freeze an affected app.</flag:macos-apps>`,
|
|
155984
|
+
description: `Start native profiling: Instruments (CPU, hangs, leaks) on iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, or Perfetto (CPU, jank, memory) on Android.
|
|
155985
|
+
Use when profiling native performance. Launch the target app first, wait for this call to return before reproducing the scenario, then call \`native-profiler-stop\` while the app is still running.<flag:macos-apps> Mac apps need a dev-signed build launched via Argent (use "Time Profiler" if signing/WebKit blocks the bundled template, or set \`malloc_stack_logging: true\` for leak stacks).</flag:macos-apps>
|
|
155986
|
+
Returns \`{ status: "recording", pid, traceFile, warning? }\` (warns on iOS/Android if native network capture is active). Fails if the app, xctrace, or adb is unavailable.`,
|
|
156141
155987
|
zodSchema: zodSchema55,
|
|
156142
155988
|
interaction: {
|
|
156143
155989
|
startedMsg: () => "Starting native profiler",
|
|
@@ -157564,19 +157410,11 @@ var launchAnalysisMode = {
|
|
|
157564
157410
|
}
|
|
157565
157411
|
};
|
|
157566
157412
|
var zodSchema58 = external_exports.object({
|
|
157567
|
-
mode: external_exports.enum(["measure", "profile"]).describe(
|
|
157568
|
-
|
|
157569
|
-
),
|
|
157570
|
-
|
|
157571
|
-
|
|
157572
|
-
),
|
|
157573
|
-
device_id: external_exports.string().optional().describe(
|
|
157574
|
-
"Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works."
|
|
157575
|
-
),
|
|
157576
|
-
allow_simulator: external_exports.boolean().default(false).describe("Explicitly allow a booted simulator when no iPhone is selected."),
|
|
157577
|
-
duration_seconds: external_exports.number().int().min(5).max(60).optional().describe(
|
|
157578
|
-
`profile mode only: App Launch trace recording length in seconds (default ${DEFAULT_PROFILE_SECONDS}). Rejected in measure mode.`
|
|
157579
|
-
)
|
|
157413
|
+
mode: external_exports.enum(["measure", "profile"]).describe("`measure`: 5 XCTest timed launches. `profile`: 1 Instruments App Launch trace."),
|
|
157414
|
+
bundle_id: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe("Installed Release build bundle ID (not built or installed by this tool)."),
|
|
157415
|
+
device_id: external_exports.string().optional().describe("iPhone UDID (or booted simulator UDID with `allow_simulator: true`)."),
|
|
157416
|
+
allow_simulator: external_exports.boolean().default(false).describe("Allow booted simulator when no iPhone is selected."),
|
|
157417
|
+
duration_seconds: external_exports.number().int().min(5).max(60).optional().describe(`\`profile\` mode only: trace duration in s (default ${DEFAULT_PROFILE_SECONDS}).`)
|
|
157580
157418
|
}).superRefine((params, ctx) => {
|
|
157581
157419
|
if (params.mode === "measure" && params.duration_seconds !== void 0) {
|
|
157582
157420
|
ctx.addIssue({
|
|
@@ -157596,13 +157434,9 @@ var nativeProfilerLaunchAnalysisTool = {
|
|
|
157596
157434
|
completedMsg: ({ params }) => launchAnalysisMode[params.mode].completed,
|
|
157597
157435
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `${launchAnalysisMode[params.mode].failed}: ${failureSignal2.error_code}`
|
|
157598
157436
|
},
|
|
157599
|
-
description: `Profile or measure iOS app startup
|
|
157600
|
-
|
|
157601
|
-
|
|
157602
|
-
Install a Release build of bundle_id before calling; the tool does not build or install the app.
|
|
157603
|
-
Use when you need the iOS launch time or want to find what slows the app's startup.
|
|
157604
|
-
Returns samplesCollected in measure mode. In profile mode, launchMs runs from the first lifecycle phase after Process Creation to the first frame (null on a simulator); follow profilerSession.next to load the CPU samples with profiler-load and query them with profiler-stack-query.
|
|
157605
|
-
Fails if the app is not installed or no iPhone or allowed simulator is available.`,
|
|
157437
|
+
description: `Profile or measure iOS app startup on an already-installed Release build (warms once, then measures).
|
|
157438
|
+
Use when benchmarking launch time (\`measure\`: 5 XCTest launches incl. extended tasks; signed runner on iPhone) or profiling pre-first-frame CPU work (\`profile\`: Instruments App Launch trace; follow \`profilerSession.next\` with \`profiler-load\` + \`profiler-stack-query\`).
|
|
157439
|
+
Returns \`samplesCollected\` (\`measure\`) or \`launchMs\` + \`profilerSession\` (\`profile\`). Fails if the app is not installed or no iPhone / allowed simulator is available.`,
|
|
157606
157440
|
zodSchema: zodSchema58,
|
|
157607
157441
|
services: () => ({}),
|
|
157608
157442
|
async execute(_services, params, ctx) {
|
|
@@ -160270,25 +160104,20 @@ var capability34 = {
|
|
|
160270
160104
|
};
|
|
160271
160105
|
var zodSchema60 = external_exports.object({
|
|
160272
160106
|
udid: external_exports.string().describe(
|
|
160273
|
-
"Target ID from `list-devices
|
|
160274
|
-
),
|
|
160275
|
-
timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(
|
|
160276
|
-
`Auto-stop cap in seconds (default ${DEFAULT_TIME_LIMIT_SECONDS}). Set it to slightly more than the interaction you plan to capture.`
|
|
160277
|
-
),
|
|
160278
|
-
trimStatic: external_exports.boolean().optional().describe(
|
|
160279
|
-
"Default true. Collapse stretches where the screen does not change: the first second of each still stretch is kept, then unchanged frames are dropped until something moves again, so a long recording with brief activity comes back short instead of full of dead air. Set false to keep a faithful real-time recording."
|
|
160107
|
+
"Target ID from `list-devices`<flag:macos-apps> (Mac app: `macos-app-<bundle id>`)</flag:macos-apps>."
|
|
160280
160108
|
),
|
|
160109
|
+
timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(`Auto-stop cap in seconds (default ${DEFAULT_TIME_LIMIT_SECONDS}).`),
|
|
160110
|
+
trimStatic: external_exports.boolean().optional().describe("Collapse idle unchanged stretches after 1s (default true; false = real-time)."),
|
|
160281
160111
|
showTouches: external_exports.boolean().optional().describe(
|
|
160282
|
-
"Draw touch markers
|
|
160112
|
+
"Draw touch markers (default true; unsupported on physical iPhones)<flag:macos-apps>. Mac apps: shows pointer, click ring, and hold dot</flag:macos-apps>."
|
|
160283
160113
|
)
|
|
160284
160114
|
});
|
|
160285
160115
|
function createScreenRecordingStartTool(registry2) {
|
|
160286
160116
|
return {
|
|
160287
160117
|
id: "screen-recording-start",
|
|
160288
|
-
description: `Start an MP4 recording of the device screen<flag:macos-apps> or Mac app window</flag:macos-apps>. Use when
|
|
160289
|
-
|
|
160290
|
-
|
|
160291
|
-
For a Mac app started by Argent, restore its window and move it fully onto one display. Capture protection blocks recording. Mac app recording needs neither Screen Recording permission nor ffmpeg and continues while the Mac is locked. If start returns \`MACOS_APP_LIBRARY_OUTDATED\`, run \`restart-app\` and retry.</flag:macos-apps>`,
|
|
160118
|
+
description: `Start an MP4 recording of the device screen<flag:macos-apps> or Mac app window</flag:macos-apps>. Use when capturing video of an interaction or animation (use \`screenshot\` for a still image).
|
|
160119
|
+
Continues until \`screen-recording-stop\` or \`timeLimitSeconds\` (always retrieve via \`screen-recording-stop\`). Requires \`ffmpeg\` on simulators, Android, and wired iPhones (needs \`transportType: "wired"\` and camera access for \`ios-screen-stream\`). Unsupported on tvOS, Chromium<flag:harmonyos>, HarmonyOS</flag:harmonyos>, and Vega.<flag:macos-apps> Mac apps: needs a visible window on one display, no capture protection, no Screen Recording permission or ffmpeg; on \`MACOS_APP_LIBRARY_OUTDATED\`, run \`restart-app\` and retry.</flag:macos-apps>
|
|
160120
|
+
Returns \`{ outputFile }\` on the tool-server host. Fails if target is unavailable or already recording.`,
|
|
160292
160121
|
zodSchema: zodSchema60,
|
|
160293
160122
|
searchHint: "record video screen capture movie mp4 start filming screencast",
|
|
160294
160123
|
interaction: {
|
|
@@ -160830,35 +160659,26 @@ function getTopComponents(entries, topN2) {
|
|
|
160830
160659
|
}));
|
|
160831
160660
|
}
|
|
160832
160661
|
var timeRangeSchema = external_exports.object({
|
|
160833
|
-
start: external_exports.coerce.number().describe("Start
|
|
160834
|
-
end: external_exports.coerce.number().describe("End
|
|
160662
|
+
start: external_exports.coerce.number().describe("Start ms."),
|
|
160663
|
+
end: external_exports.coerce.number().describe("End ms.")
|
|
160835
160664
|
});
|
|
160836
160665
|
var zodSchema62 = external_exports.object({
|
|
160837
160666
|
port: metroPortField,
|
|
160838
160667
|
device_id: metroDeviceIdParam(
|
|
160839
160668
|
"Device ID used to record or load the React profile<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
160840
160669
|
),
|
|
160841
|
-
mode: external_exports.enum(["by_component", "by_time_range", "by_index", "cascade_tree", "render_counts"]).describe("Query mode
|
|
160842
|
-
component_name: external_exports.string().optional().describe("Component name
|
|
160843
|
-
time_range_ms: timeRangeSchema.optional().describe("
|
|
160670
|
+
mode: external_exports.enum(["by_component", "by_time_range", "by_index", "cascade_tree", "render_counts"]).describe("Query mode."),
|
|
160671
|
+
component_name: external_exports.string().optional().describe("Component name (optional filter for `render_counts`)."),
|
|
160672
|
+
time_range_ms: timeRangeSchema.optional().describe("Range in ms since profiling started."),
|
|
160844
160673
|
// Without `.nullable()`, `z.coerce.number()` reads null as commit 0.
|
|
160845
|
-
commit_index: external_exports.coerce.number().int().nullable().transform((value) => value ?? void 0).optional().describe("Commit index"),
|
|
160846
|
-
top_n: external_exports.coerce.number().int().positive().optional().describe(
|
|
160847
|
-
"Max results to return. Defaults to 20 for by_component / by_time_range, which count commits, and render_counts, which counts components. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on."
|
|
160848
|
-
)
|
|
160674
|
+
commit_index: external_exports.coerce.number().int().nullable().transform((value) => value ?? void 0).optional().describe("Commit index."),
|
|
160675
|
+
top_n: external_exports.coerce.number().int().positive().optional().describe("Max results (default 20; unlimited for `by_index`).")
|
|
160849
160676
|
});
|
|
160850
160677
|
var profilerCommitQueryTool = {
|
|
160851
160678
|
id: "profiler-commit-query",
|
|
160852
|
-
description: `Query React commit data
|
|
160853
|
-
|
|
160854
|
-
|
|
160855
|
-
- by_time_range: What happened in time_range_ms.
|
|
160856
|
-
- by_index: Full detail dump of the commit at commit_index (all components, props changed, parent cascade).
|
|
160857
|
-
- cascade_tree: Parent-child cascade tree for the commit at commit_index, showing who triggered whom.
|
|
160858
|
-
- render_counts: Re-render count, rate and self time per component over ALL commits, including those under 16ms that the other modes cannot see. Library components included.
|
|
160859
|
-
Use when drilling into specific components or time windows after react-profiler-analyze.
|
|
160860
|
-
Returns a markdown table or tree of commit data matching the requested mode.
|
|
160861
|
-
Fails if react-profiler-stop has not been called.`,
|
|
160679
|
+
description: `Query React commit data by mode: \`by_component\`, \`by_time_range\`, \`by_index\` (full fiber dump), \`cascade_tree\` (parent\u2192child triggers), or \`render_counts\` (counts/rates across ALL commits, incl. <16ms).
|
|
160680
|
+
Use when drilling into components, cascades, or time windows after \`react-profiler-analyze\`.
|
|
160681
|
+
Returns a markdown table or tree. Fails if \`react-profiler-stop\` has not been called.`,
|
|
160862
160682
|
zodSchema: zodSchema62,
|
|
160863
160683
|
readOnly: true,
|
|
160864
160684
|
interaction: {
|
|
@@ -161292,41 +161112,27 @@ function nodesNestedInSameName(nodeMap, childToParent) {
|
|
|
161292
161112
|
return nested;
|
|
161293
161113
|
}
|
|
161294
161114
|
var timeWindowSchema = external_exports.object({
|
|
161295
|
-
start: external_exports.coerce.number().describe("Start
|
|
161296
|
-
end: external_exports.coerce.number().describe("End
|
|
161115
|
+
start: external_exports.coerce.number().describe("Start ms."),
|
|
161116
|
+
end: external_exports.coerce.number().describe("End ms.")
|
|
161297
161117
|
});
|
|
161298
161118
|
var zodSchema63 = external_exports.object({
|
|
161299
161119
|
port: metroPortField,
|
|
161300
161120
|
device_id: metroDeviceIdParam(
|
|
161301
161121
|
"Device ID used to record or load the React profile<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
161302
161122
|
),
|
|
161303
|
-
mode: external_exports.enum(["top_functions", "time_window", "call_tree", "component_cpu"]).describe("Query mode
|
|
161304
|
-
time_window_ms: timeWindowSchema.optional().describe(
|
|
161305
|
-
|
|
161306
|
-
),
|
|
161307
|
-
|
|
161308
|
-
|
|
161309
|
-
|
|
161310
|
-
include_callers: external_exports.boolean().default(false).describe("Also show callers of the function"),
|
|
161311
|
-
react_only: external_exports.boolean().default(false).describe(
|
|
161312
|
-
"top_functions and time_window: list only React component functions (PascalCase names)"
|
|
161313
|
-
)
|
|
161123
|
+
mode: external_exports.enum(["top_functions", "time_window", "call_tree", "component_cpu"]).describe("Query mode."),
|
|
161124
|
+
time_window_ms: timeWindowSchema.optional().describe("Window in ms since profiling started (same clock as `profiler-commit-query`)."),
|
|
161125
|
+
component_name: external_exports.string().optional().describe("Component name."),
|
|
161126
|
+
function_name: external_exports.string().optional().describe("Function name."),
|
|
161127
|
+
top_n: external_exports.coerce.number().int().positive().default(15).describe("Max rows (default 15)."),
|
|
161128
|
+
include_callers: external_exports.boolean().default(false).describe("Include callers (`call_tree`)."),
|
|
161129
|
+
react_only: external_exports.boolean().default(false).describe("Only PascalCase React components.")
|
|
161314
161130
|
});
|
|
161315
161131
|
var profilerCpuQueryTool = {
|
|
161316
161132
|
id: "profiler-cpu-query",
|
|
161317
|
-
description: `Query Hermes CPU
|
|
161318
|
-
|
|
161319
|
-
|
|
161320
|
-
- time_window: CPU breakdown for time_window_ms (e.g. during a slow commit or hang).
|
|
161321
|
-
- call_tree: For a given function_name, show its callees, and its callers with include_callers.
|
|
161322
|
-
- component_cpu: For a given component_name, aggregate CPU activity across its stored commits.
|
|
161323
|
-
In top_functions and time_window, self-times are the summed sampling intervals of the samples that
|
|
161324
|
-
landed in the window, so they measure sampled coverage rather than the window's width and do not
|
|
161325
|
-
change if you widen the query. Their tables state how many samples they cover and how much was idle.
|
|
161326
|
-
Each row is one call path, so a function can have several rows and top_n counts rows.
|
|
161327
|
-
Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
|
|
161328
|
-
Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
|
|
161329
|
-
Fails if no CPU profile is stored; run react-profiler-stop (and ideally react-profiler-analyze) first.`,
|
|
161133
|
+
description: `Query Hermes CPU samples by mode: \`top_functions\` (global hotspots, optional \`time_window_ms\`), \`time_window\` (breakdown during \`time_window_ms\`), \`call_tree\` (callees/callers for \`function_name\`), or \`component_cpu\` (CPU across \`component_name\` commits).
|
|
161134
|
+
Use when drilling into JS CPU hotspots after \`react-profiler-analyze\`. Self-times measure sampled coverage per call path.
|
|
161135
|
+
Returns a markdown table or call tree. Fails if no CPU profile is stored (run \`react-profiler-stop\` first).`,
|
|
161330
161136
|
zodSchema: zodSchema63,
|
|
161331
161137
|
readOnly: true,
|
|
161332
161138
|
interaction: {
|
|
@@ -161718,24 +161524,21 @@ var zodSchema64 = external_exports.object({
|
|
|
161718
161524
|
device_id: metroDeviceIdParam(
|
|
161719
161525
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
161720
161526
|
),
|
|
161721
|
-
mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe("Query mode
|
|
161527
|
+
mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe("Query mode."),
|
|
161722
161528
|
// Without `.nullable()`, `z.coerce.number()` reads null as hang 0.
|
|
161723
|
-
hang_index: external_exports.coerce.number().int().nullable().transform((value) => value ?? void 0).optional().describe("0-based
|
|
161724
|
-
function_name: external_exports.string().optional().describe("Native function name"),
|
|
161529
|
+
hang_index: external_exports.coerce.number().int().nullable().transform((value) => value ?? void 0).optional().describe("0-based hang index."),
|
|
161530
|
+
function_name: external_exports.string().optional().describe("Native function name."),
|
|
161725
161531
|
thread: external_exports.string().optional().describe(
|
|
161726
|
-
'Thread filter
|
|
161532
|
+
'Thread filter (substring for `thread_breakdown`; exact raw name or `"main"` for `function_callers`).'
|
|
161727
161533
|
),
|
|
161728
|
-
object_type: external_exports.string().optional().describe("Object type filter"),
|
|
161729
|
-
top_n: external_exports.coerce.number().int().positive().default(15).describe("Max results
|
|
161534
|
+
object_type: external_exports.string().optional().describe("Object type filter (`leak_stacks`)."),
|
|
161535
|
+
top_n: external_exports.coerce.number().int().positive().default(15).describe("Max results (default 15).")
|
|
161730
161536
|
});
|
|
161731
161537
|
var profilerStackQueryTool = {
|
|
161732
161538
|
id: "profiler-stack-query",
|
|
161733
|
-
description: `
|
|
161734
|
-
|
|
161735
|
-
|
|
161736
|
-
- function_callers: Who calls function_name and what it calls.
|
|
161737
|
-
- thread_breakdown: CPU time split by thread, optionally filtered.
|
|
161738
|
-
- leak_stacks: Memory leak details (iOS<flag:macos-apps> and Mac apps</flag:macos-apps> only). Requires a trace with leak data.`,
|
|
161539
|
+
description: `Query native profiler stacks after \`native-profiler-analyze\` or \`profiler-load\`: \`hang_stacks\` (by \`hang_index\`), \`function_callers\` (for \`function_name\`), \`thread_breakdown\`, or \`leak_stacks\` (iOS<flag:macos-apps>/Mac apps</flag:macos-apps>).
|
|
161540
|
+
Use when drilling into native hangs, callers, threads, or leaks.
|
|
161541
|
+
Returns a markdown breakdown. Fails if no native trace is loaded.`,
|
|
161739
161542
|
zodSchema: zodSchema64,
|
|
161740
161543
|
readOnly: true,
|
|
161741
161544
|
interaction: {
|
|
@@ -162518,27 +162321,17 @@ var profilerLoadAction = {
|
|
|
162518
162321
|
}
|
|
162519
162322
|
};
|
|
162520
162323
|
var zodSchema66 = external_exports.object({
|
|
162521
|
-
mode: external_exports.enum(["list", "load_react", "load_native"]).describe("
|
|
162522
|
-
session_id: external_exports.string().regex(SESSION_ID_PATTERN, "session_id may only contain letters, digits, '_' and '-'").optional().describe("
|
|
162324
|
+
mode: external_exports.enum(["list", "load_react", "load_native"]).describe("`list`, `load_react`, or `load_native`."),
|
|
162325
|
+
session_id: external_exports.string().regex(SESSION_ID_PATTERN, "session_id may only contain letters, digits, '_' and '-'").optional().describe("Session ID from `list` (required for `load_*`)."),
|
|
162523
162326
|
port: metroPortField,
|
|
162524
|
-
device_id: metroDeviceIdParam(
|
|
162525
|
-
|
|
162526
|
-
),
|
|
162527
|
-
app_process: external_exports.string().optional().describe(
|
|
162528
|
-
"Android package name to pass when restoring an older load_native .pftrace session that has no metadata sidecar."
|
|
162529
|
-
)
|
|
162327
|
+
device_id: metroDeviceIdParam("Device id from `list-devices` to bind the loaded session to."),
|
|
162328
|
+
app_process: external_exports.string().optional().describe("Android package name for legacy `.pftrace` sessions without metadata.")
|
|
162530
162329
|
});
|
|
162531
162330
|
var profilerLoadTool = {
|
|
162532
162331
|
id: "profiler-load",
|
|
162533
|
-
description: `
|
|
162534
|
-
Use when
|
|
162535
|
-
|
|
162536
|
-
- list: Show all available profiling sessions in the project's debug directory.
|
|
162537
|
-
- load_react: Load a React profiler session (CPU profile + commit tree) into memory. Requires session_id.
|
|
162538
|
-
- load_native: Restore native trace data (xctrace XML on iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, .pftrace on Android). Requires session_id.
|
|
162539
|
-
Loading replaces the session in memory for this device_id (and Metro port, for React): the one the query tools and react-profiler-analyze read. The replaced session stays on disk; load it again by its session_id.
|
|
162540
|
-
Returns a summary of the loaded session or a session list for the list mode.
|
|
162541
|
-
Fails if the session_id is not found or the session's trace files are missing from disk.`,
|
|
162332
|
+
description: `List or restore saved React/native profiling sessions from disk into memory for \`profiler-*-query\` / \`react-profiler-analyze\` (\`load_react\` loads CPU+commits; \`load_native\` loads xctrace on iOS<flag:macos-apps>/Mac apps</flag:macos-apps> or \`.pftrace\` on Android).
|
|
162333
|
+
Use when revisiting past sessions without re-recording (replaces the in-memory session for \`device_id\` without deleting disk files).
|
|
162334
|
+
Returns a session list or loaded summary. Fails if \`session_id\` or its files are missing.`,
|
|
162542
162335
|
zodSchema: zodSchema66,
|
|
162543
162336
|
interaction: {
|
|
162544
162337
|
startedMsg: ({ params }) => profilerLoadAction[params.mode].started(params),
|
|
@@ -162709,7 +162502,9 @@ var zodSchema67 = external_exports.object({
|
|
|
162709
162502
|
function createStopSimulatorServerTool(registry2) {
|
|
162710
162503
|
return {
|
|
162711
162504
|
id: "stop-simulator-server",
|
|
162712
|
-
description: `Stop the transport session for
|
|
162505
|
+
description: `Stop the transport session for one device (simulator-server, physical iOS runner, Chromium CDP, or TV daemons).
|
|
162506
|
+
Use when restarting a wedged transport or freeing one device without affecting others (not routinely after every task; use \`stop-all-simulator-servers\` with \`devices\` to also stop devtools/profilers/debuggers). On Chromium, also ends the JS debugger session.<flag:macos-apps> On Mac apps, also stops native capture (discarding records) and screen recording.</flag:macos-apps>
|
|
162507
|
+
Returns \`{ stopped, udid }\` (\`stopped: false\` if none was running). Fails only on invalid input.`,
|
|
162713
162508
|
zodSchema: zodSchema67,
|
|
162714
162509
|
interaction: {
|
|
162715
162510
|
startedMsg: ({ params }) => `Stopping simulator server for ${params.udid}`,
|
|
@@ -162753,11 +162548,10 @@ var zodSchema68 = external_exports.object({
|
|
|
162753
162548
|
function createStopAllSimulatorServersTool(registry2) {
|
|
162754
162549
|
return {
|
|
162755
162550
|
id: "stop-all-simulator-servers",
|
|
162756
|
-
description: `Stop
|
|
162757
|
-
|
|
162758
|
-
|
|
162759
|
-
Returns { stopped
|
|
162760
|
-
Fails if the input has an unknown key (e.g. \`udids\` instead of \`devices\`); otherwise it always succeeds, and reaping nothing is a result, not a failure.`,
|
|
162551
|
+
description: `Stop device-owned background services (simulator-server, devtools, accessibility, TV daemons, Chromium CDP, screen recordings, profilers, network capture/throttle, and JS debugger sessions), freeing their processes and ports.
|
|
162552
|
+
Use when cleaning up or ending a session, or when a skill asks to recycle services \u2014 not routinely after every task (services are reused). Use \`network-capture-stop\` to stop network capture while keeping recorded requests.
|
|
162553
|
+
Always pass \`devices\` with this session's device IDs (plus any \`logicalDeviceId\` used with \`debugger-connect\` on shared Metro) so other agents' devices aren't torn down; omit \`devices\` only for a machine-wide sweep. \`[]\` stops nothing.
|
|
162554
|
+
Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` names unscoped debugger URNs; re-call with the id after \`<ns>:<port>:\` to reap them). Fails if unknown keys (e.g. \`udids\`) are passed.`,
|
|
162761
162555
|
zodSchema: zodSchema68,
|
|
162762
162556
|
interaction: {
|
|
162763
162557
|
// "all" only holds for the unscoped sweep; a scoped call touches just the
|
|
@@ -164493,14 +164287,10 @@ var fileInputs3 = [
|
|
|
164493
164287
|
{ target: "project_root", path: "${project_root}", kind: "probe" }
|
|
164494
164288
|
];
|
|
164495
164289
|
var zodSchema70 = external_exports.object({
|
|
164496
|
-
name: external_exports.string().describe(
|
|
164497
|
-
|
|
164498
|
-
),
|
|
164499
|
-
project_root: external_exports.string().describe(
|
|
164500
|
-
"Absolute path to the project root directory (the directory that contains or should contain `.argent/e2e/`)."
|
|
164501
|
-
),
|
|
164290
|
+
name: external_exports.string().describe("E2E test name (letters, digits, `_`, `-`)."),
|
|
164291
|
+
project_root: external_exports.string().describe("Absolute path to the project root containing `.argent/e2e/`."),
|
|
164502
164292
|
executionPrerequisite: external_exports.string().optional().describe(
|
|
164503
|
-
|
|
164293
|
+
"Fragments only: entry state assumed. Omit for standalone tests (Chromium records as a fragment, then add `launch: { chromium: <app path> }` and remove this)."
|
|
164504
164294
|
),
|
|
164505
164295
|
requires: external_exports.object({
|
|
164506
164296
|
platform: external_exports.union([
|
|
@@ -164508,40 +164298,15 @@ var zodSchema70 = external_exports.object({
|
|
|
164508
164298
|
external_exports.array(external_exports.enum(LAUNCH_PLATFORMS).meta(MACOS_PLATFORM_FLAG)).min(1)
|
|
164509
164299
|
]).optional(),
|
|
164510
164300
|
runtimeKind: external_exports.enum(RUNTIME_KINDS).optional()
|
|
164511
|
-
}).optional().describe(
|
|
164512
|
-
|
|
164513
|
-
),
|
|
164514
|
-
env: envRecordSchema(external_exports.string()).optional().describe(
|
|
164515
|
-
"Default script environment values saved in the test's top-level env. Use {{secret:NAME}} for credentials."
|
|
164516
|
-
)
|
|
164301
|
+
}).optional().describe("Supported target filter (`platform` and/or `runtimeKind`, ANDed). Omit for any."),
|
|
164302
|
+
env: envRecordSchema(external_exports.string()).optional().describe("Top-level script env defaults. Supports `{{secret:NAME}}`.")
|
|
164517
164303
|
});
|
|
164518
164304
|
var flowStartRecordingTool = {
|
|
164519
164305
|
id: "e2e-start-recording",
|
|
164520
|
-
description: `Start recording a new e2e test, resetting
|
|
164521
|
-
Use when
|
|
164522
|
-
|
|
164523
|
-
|
|
164524
|
-
|
|
164525
|
-
Several e2e tests can be recorded at once, each keyed by the \`name\` + \`project_root\`
|
|
164526
|
-
that every subsequent recording tool repeats, and one recording's steps never
|
|
164527
|
-
land in another's file.
|
|
164528
|
-
|
|
164529
|
-
After starting, use e2e-add-step to append tool calls. Each step runs LIVE, so
|
|
164530
|
-
give each concurrent recording its own device and pick a name unique to your
|
|
164531
|
-
task. Read each step's \`message\`: it warns when a recorded await-ui-element did
|
|
164532
|
-
not hold, or may fail once converted to \`await:\`/\`assert:\`. A wait nested in a
|
|
164533
|
-
recorded run-sequence gets no such warning, so read its \`toolResult\`. For a
|
|
164534
|
-
standalone e2e test, record a restart-app of the app under test as the FIRST step
|
|
164535
|
-
(captured as the e2e test's \`launch\` step); for a reusable fragment, skip that and
|
|
164536
|
-
pass executionPrerequisite instead. Starting over an existing e2e test replaces the
|
|
164537
|
-
whole file, including its \`requires:\` and \`env:\` blocks; pass \`requires\` and \`env\` to keep them.
|
|
164538
|
-
Use e2e-add-echo to add labels, and
|
|
164539
|
-
e2e-add-script to run a local .mjs, .mts, .js or .ts file and record it as a \`script:\` step.
|
|
164540
|
-
Call e2e-finish-recording when done.
|
|
164541
|
-
|
|
164542
|
-
To remove or reorder steps, edit the .yaml file after e2e-finish-recording, not
|
|
164543
|
-
during the recording: over a link, the next recorded step writes over your edit,
|
|
164544
|
-
and without a link, an edit that renumbers the steps drops their warnings.`,
|
|
164306
|
+
description: `Start recording a new e2e test, resetting \`.argent/e2e/<name>.yaml\`. Starting over an existing test replaces the whole file, including its \`requires:\` and \`env:\` blocks (pass \`requires\` and \`env\` to keep them), and runs pending fragment cleanup on restart.
|
|
164307
|
+
Use when capturing a reusable sequence of device actions for replay; load the \`argent-create-e2e\` skill first. Not for Apple TV or Android TV.
|
|
164308
|
+
Record live steps with \`e2e-add-step\` (start standalone tests with \`restart-app\`; use \`executionPrerequisite\` for fragments), \`e2e-add-echo\`, and \`e2e-add-script\`, then call \`e2e-finish-recording\`. Edit the YAML only after finishing.
|
|
164309
|
+
Returns \`{ message, e2eTestFile, savedTo, restarted?, discardedSteps?, fragmentShutdown? }\`. Fails if the target file or directory cannot be written.`,
|
|
164545
164310
|
zodSchema: zodSchema70,
|
|
164546
164311
|
aliases: ["flow-start-recording"],
|
|
164547
164312
|
interaction: {
|
|
@@ -167919,17 +167684,13 @@ var fileInputs4 = [
|
|
|
167919
167684
|
{ target: "project_root", path: "${project_root}", kind: "probe", collect: "step" }
|
|
167920
167685
|
];
|
|
167921
167686
|
var zodSchema71 = external_exports.object({
|
|
167922
|
-
name: external_exports.string().describe("
|
|
167923
|
-
project_root: external_exports.string().describe(
|
|
167924
|
-
"Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording."
|
|
167925
|
-
),
|
|
167687
|
+
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
167688
|
+
project_root: external_exports.string().describe("Project root from `e2e-start-recording`."),
|
|
167926
167689
|
command: external_exports.string().describe(
|
|
167927
|
-
'MCP tool to
|
|
167928
|
-
),
|
|
167929
|
-
args: external_exports.string().optional().describe(
|
|
167930
|
-
`Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments.`
|
|
167690
|
+
'MCP tool id to run and record (e.g. "gesture-tap"; call `e2e-add-script` directly for scripts).'
|
|
167931
167691
|
),
|
|
167932
|
-
|
|
167692
|
+
args: external_exports.string().optional().describe("JSON string of tool arguments (omit if none)."),
|
|
167693
|
+
delayMs: external_exports.number().int().min(0).optional().describe("Replay delay in ms before this step."),
|
|
167933
167694
|
shutdown: external_exports.boolean().optional().describe(
|
|
167934
167695
|
"Save the call in the shutdown list. Pending fragment cleanup runs before the call. stepCount counts shutdown entries."
|
|
167935
167696
|
)
|
|
@@ -167937,10 +167698,9 @@ var zodSchema71 = external_exports.object({
|
|
|
167937
167698
|
function createFlowAddStepTool(registry2) {
|
|
167938
167699
|
return deferredShutdownFirst({
|
|
167939
167700
|
id: "e2e-add-step",
|
|
167940
|
-
description: `Execute one MCP tool and
|
|
167941
|
-
|
|
167942
|
-
|
|
167943
|
-
Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status, says whether a step was appended. Fails with an error, recording nothing. Call recording tools, including \`e2e-add-script\`, directly.`,
|
|
167701
|
+
description: `Execute one MCP tool live and append it to an open e2e recording (\`gesture-tap\` records as a portable \`tap\` selector; \`restart-app\` as \`launch\`; supports \`{{output:PATH}}\` references).
|
|
167702
|
+
Use when recording steps after \`e2e-start-recording\` (pass \`shutdown: true\` for cleanup steps; call recording tools like \`e2e-add-script\` directly).
|
|
167703
|
+
Returns \`{ message, toolResult, stepCount, recorded?, savedTo }\`. Fails if no recording is open or the step errors (nothing recorded).`,
|
|
167944
167704
|
zodSchema: zodSchema71,
|
|
167945
167705
|
aliases: ["flow-add-step"],
|
|
167946
167706
|
interaction: {
|
|
@@ -168384,22 +168144,20 @@ function renderOutput(output2) {
|
|
|
168384
168144
|
return { outputJson: kept.toString("utf8"), outputTruncated: true };
|
|
168385
168145
|
}
|
|
168386
168146
|
var zodSchema74 = external_exports.object({
|
|
168387
|
-
name: external_exports.string().describe("E2E test name
|
|
168388
|
-
project_root: external_exports.string().describe("
|
|
168389
|
-
path: external_exports.string().describe(
|
|
168390
|
-
|
|
168391
|
-
),
|
|
168392
|
-
timeout: external_exports.number().optional().describe("Time limit in milliseconds. The default is 30000 and the minimum is 100."),
|
|
168393
|
-
env: envRecordSchema(external_exports.string()).optional().describe(
|
|
168394
|
-
"Environment overrides for this script. Argent uses them immediately and saves them on the step. Values can include {{secret:NAME}} or {{output:PATH}}."
|
|
168395
|
-
),
|
|
168147
|
+
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
168148
|
+
project_root: external_exports.string().describe("Project root from `e2e-start-recording`."),
|
|
168149
|
+
path: external_exports.string().describe("Script path (.mjs/.mts/.js/.ts) relative to the test YAML."),
|
|
168150
|
+
timeout: external_exports.number().optional().describe("Timeout in ms (default 30000, min 100)."),
|
|
168151
|
+
env: envRecordSchema(external_exports.string()).optional().describe("Env overrides (supports `{{secret:NAME}}` and `{{output:PATH}}`)."),
|
|
168396
168152
|
shutdown: external_exports.boolean().optional().describe(
|
|
168397
168153
|
"Save the script in the shutdown list. Pending fragment cleanup runs before the script. The script's output reaches only later shutdown steps. stepCount counts shutdown entries."
|
|
168398
168154
|
)
|
|
168399
168155
|
});
|
|
168400
168156
|
var flowAddScriptTool = deferredShutdownFirst({
|
|
168401
168157
|
id: "e2e-add-script",
|
|
168402
|
-
description: `Run a local
|
|
168158
|
+
description: `Run a local JS/TS script and record it as a \`script:\` step (requires no \`argent link\` / \`ARGENT_TOOLS_URL\`).
|
|
168159
|
+
Use when the user requests a local script in an open recording (output is available to later steps via \`{{output:PATH}}\`).
|
|
168160
|
+
Returns \`{ status, reason?, outputJson?, stepCount, recorded? }\`. A failed script returns \`status: "fail"\` or \`"error"\` without recording (check \`reason\` and affected state before retrying). Fails on invalid input, no open recording, or recording over a link.`,
|
|
168403
168161
|
zodSchema: zodSchema74,
|
|
168404
168162
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
168405
168163
|
aliases: ["flow-add-script"],
|
|
@@ -168555,16 +168313,14 @@ function anchoredWarnings(recorded, warnings, steps) {
|
|
|
168555
168313
|
return kept;
|
|
168556
168314
|
}
|
|
168557
168315
|
var zodSchema75 = external_exports.object({
|
|
168558
|
-
name: external_exports.string().describe("
|
|
168559
|
-
project_root: external_exports.string().describe(
|
|
168560
|
-
"Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording."
|
|
168561
|
-
)
|
|
168316
|
+
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
168317
|
+
project_root: external_exports.string().describe("Project root from `e2e-start-recording`.")
|
|
168562
168318
|
});
|
|
168563
168319
|
var flowFinishRecordingTool = {
|
|
168564
168320
|
id: "e2e-finish-recording",
|
|
168565
|
-
description: `
|
|
168566
|
-
|
|
168567
|
-
|
|
168321
|
+
description: `Finalize an open e2e recording (runs pending fragment cleanup first).
|
|
168322
|
+
Use when all steps have been recorded and you are ready to polish or replay the YAML (check any \`warning:\` lines in \`summary\` for recorded waits).
|
|
168323
|
+
Returns \`{ message, path, steps, shutdownSteps?, fragmentShutdown?, summary, e2eTestFile, savedTo }\`. Fails if no recording is open for \`name\` + \`project_root\`.`,
|
|
168568
168324
|
zodSchema: zodSchema75,
|
|
168569
168325
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
168570
168326
|
aliases: ["flow-finish-recording"],
|
|
@@ -171697,31 +171453,23 @@ Run the e2e test on the computer that runs the tool-server, with no link and no
|
|
|
171697
171453
|
);
|
|
171698
171454
|
}
|
|
171699
171455
|
var zodSchema76 = external_exports.object({
|
|
171700
|
-
name: external_exports.string().optional().describe(
|
|
171701
|
-
'Name of a saved e2e test to run from `<project_root>/.argent/e2e`, or `.argent/flows` when it is not there (e.g. "settings-explore").'
|
|
171702
|
-
),
|
|
171456
|
+
name: external_exports.string().optional().describe("Saved e2e test name in `<project_root>/.argent/e2e/` (or `.argent/flows/`)."),
|
|
171703
171457
|
project_root: external_exports.string().describe(
|
|
171704
|
-
"Absolute path to the
|
|
171705
|
-
),
|
|
171706
|
-
e2e_test_file: external_exports.string().optional().describe(
|
|
171707
|
-
"Path to the e2e test .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset."
|
|
171458
|
+
"Absolute path to the project root (script cwd; with e2e_test_path, run:/script:/baselines resolve beside the YAML)."
|
|
171708
171459
|
),
|
|
171709
|
-
|
|
171460
|
+
e2e_test_file: external_exports.string().optional().describe("Internal; leave unset (derived from `project_root` and `name`)."),
|
|
171461
|
+
e2e_test_path: external_exports.string().optional().describe("Absolute path to an e2e test `.yaml` on the client."),
|
|
171710
171462
|
device: external_exports.string().optional().describe(
|
|
171711
|
-
"
|
|
171463
|
+
"Target device id from `list-devices` (iOS UDID, Android/Vega serial, Chromium id<flag:macos-apps>, Mac app id</flag:macos-apps>). Auto-detected only when one booted device matches; pass explicitly if multiple are booted."
|
|
171712
171464
|
),
|
|
171713
171465
|
platform: external_exports.enum(SELECTABLE_PLATFORMS).optional().describe(
|
|
171714
|
-
"
|
|
171466
|
+
"Filter auto-detection (`ios` = local simulator, `ios-remote` = remote). With `chromium` and no `device`, boots Electron from `launch: { chromium: <app path> }` and tears it down after.<flag:macos-apps> With `macos` and no `device`, runs on the Mac app named in `launch` (auto-detection never picks Mac apps otherwise).</flag:macos-apps>"
|
|
171715
171467
|
).meta({ [FLAG_ENUM_META_KEY]: { macos: MACOS_APPS_FLAG } }),
|
|
171716
|
-
updateBaselines: external_exports.boolean().optional().describe(
|
|
171717
|
-
"Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them, also in the e2e tests that tool: e2e-execute steps run, unless such a step sets updateBaselines itself. Over a link, the client writes the new baselines when the run ends."
|
|
171718
|
-
),
|
|
171468
|
+
updateBaselines: external_exports.boolean().optional().describe("Refresh screenshot baselines for `snapshot` steps instead of diffing."),
|
|
171719
171469
|
prerequisiteAcknowledged: external_exports.boolean().optional().describe(
|
|
171720
|
-
"Set
|
|
171470
|
+
"Set true to confirm a fragment's `executionPrerequisite` is met; otherwise returns the prerequisite text without running. Not a dry run: a test with no prerequisite runs in full (read `executionPrerequisite` in the YAML to inspect without running)."
|
|
171721
171471
|
),
|
|
171722
|
-
env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe(
|
|
171723
|
-
"Script environment overrides for this run, including run: fragments. Names match [A-Za-z_][A-Za-z0-9_]*, except __proto__. Values can include {{secret:NAME}}. A missing secret rejects the run before any step."
|
|
171724
|
-
)
|
|
171472
|
+
env: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Script env overrides (also for `run:` fragments). Supports `{{secret:NAME}}`.")
|
|
171725
171473
|
}).superRefine((params, ctx) => {
|
|
171726
171474
|
const envProblem = params.env === void 0 ? void 0 : flowEnvProblem(params.env);
|
|
171727
171475
|
if (envProblem) {
|
|
@@ -171740,20 +171488,9 @@ var zodSchema76 = external_exports.object({
|
|
|
171740
171488
|
function createRunFlowTool(registry2) {
|
|
171741
171489
|
return {
|
|
171742
171490
|
id: "e2e-execute",
|
|
171743
|
-
description: `Run a saved YAML e2e test end to end. Use when
|
|
171744
|
-
|
|
171745
|
-
|
|
171746
|
-
exactly one e2e test source: name (under project_root) or e2e_test_path.
|
|
171747
|
-
Returns a per-step report. A failure in the main steps skips the rest of that list. Shutdown entries
|
|
171748
|
-
then run independently, unless the run is cancelled. If a shutdown entry fails, the run fails and the
|
|
171749
|
-
report sets \`shutdownFailed\`. Shutdown steps report \`shutdown: true\`.
|
|
171750
|
-
Over a link (argent link or ARGENT_TOOLS_URL), the client uploads the e2e test with the run: fragments,
|
|
171751
|
-
snapshot baselines and absolute .png/.yaml file arguments its steps use, from under project_root or beside
|
|
171752
|
-
the e2e test file. The run fails if a step needs any other project file (a script: step, a recording tool,
|
|
171753
|
-
a nested e2e-execute not called by name with an absolute project_root, a directory, app or output-directory
|
|
171754
|
-
argument, a file path built from several arguments, a relative path): it stops before the first step and the
|
|
171755
|
-
error lists each such step. An absolute .png/.yaml argument from anywhere else fails only when its step runs.
|
|
171756
|
-
Without a link, every step kind runs.`,
|
|
171491
|
+
description: `Run a saved YAML e2e test end to end. Use when replaying a recorded path or QA regression (use gesture tools for one-off actions, \`e2e-start-recording\` to author tests). Pass exactly one e2e test source: \`name\` or \`e2e_test_path\`.
|
|
171492
|
+
Returns a per-step report (\`ok: false\` on step failure). A main-step failure skips remaining main steps, then runs \`shutdown:\` steps (marked \`shutdown: true\`; failure sets \`shutdownFailed\`).
|
|
171493
|
+
Over a link (\`argent link\` / \`ARGENT_TOOLS_URL\`), the client uploads the test, \`run:\` fragments, baselines, and absolute \`.png\`/\`.yaml\` args; steps needing other client files (e.g. \`script:\`, recording tools, directories) fail before step 1. Fails if the YAML is invalid, no unique matching device is booted, or pre-step link validation fails.`,
|
|
171757
171494
|
zodSchema: zodSchema76,
|
|
171758
171495
|
aliases: ["flow-execute"],
|
|
171759
171496
|
interaction: {
|
|
@@ -173448,37 +173185,27 @@ var fileInputs8 = [
|
|
|
173448
173185
|
{ target: "outputDir", path: "${outputDir}", kind: "probe", optional: true }
|
|
173449
173186
|
];
|
|
173450
173187
|
var zodSchema80 = external_exports.object({
|
|
173451
|
-
baselinePath: external_exports.string().min(1).optional().describe(
|
|
173452
|
-
|
|
173453
|
-
),
|
|
173454
|
-
currentPath: external_exports.string().min(1).optional().describe(
|
|
173455
|
-
"Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both."
|
|
173456
|
-
),
|
|
173188
|
+
baselinePath: external_exports.string().min(1).optional().describe("Saved baseline PNG path (omit when `captureBaseline: true`)."),
|
|
173189
|
+
currentPath: external_exports.string().min(1).optional().describe("Saved current PNG path (omit when `captureCurrent: true`)."),
|
|
173457
173190
|
udid: external_exports.string().min(1).describe(
|
|
173458
|
-
"Target device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial<flag:macos-apps>, or
|
|
173191
|
+
"Target device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial<flag:macos-apps>, or Mac app id</flag:macos-apps>)."
|
|
173459
173192
|
),
|
|
173460
173193
|
captureBaseline: external_exports.boolean().optional().describe(
|
|
173461
|
-
"Capture
|
|
173194
|
+
"Capture baseline live from the device, at full resolution (mutually exclusive with `captureCurrent`)."
|
|
173462
173195
|
),
|
|
173463
173196
|
captureCurrent: external_exports.boolean().optional().describe(
|
|
173464
|
-
"Capture
|
|
173197
|
+
"Capture current live from the device, at full resolution (mutually exclusive with `captureBaseline`)."
|
|
173465
173198
|
),
|
|
173466
173199
|
rotation: external_exports.enum(["Portrait", "LandscapeLeft", "LandscapeRight", "PortraitUpsideDown"]).optional().describe(
|
|
173467
|
-
"Orientation override for live
|
|
173200
|
+
"Orientation override for live captures.<flag:harmonyos> Rejected on HarmonyOS.</flag:harmonyos> Ignored on physical iPhones."
|
|
173468
173201
|
),
|
|
173469
|
-
outputDir: external_exports.string().min(1).optional().describe("
|
|
173202
|
+
outputDir: external_exports.string().min(1).optional().describe("Output directory for diff artifacts (default: temp dir).")
|
|
173470
173203
|
}).strict();
|
|
173471
173204
|
var screenshotDiffTool = {
|
|
173472
173205
|
id: "screenshot-diff",
|
|
173473
|
-
description: `Compare two PNG screenshots and return a
|
|
173474
|
-
|
|
173475
|
-
|
|
173476
|
-
Use when stable before/after screenshots exist and the expected result is pixel-visible: layout, spacing, color, typography, image/icon rendering, clipping, overflow, or text rendering.
|
|
173477
|
-
Physical iPhones: live captures are device-wide and need no registered app.
|
|
173478
|
-
<flag:macos-apps>Mac apps: a resized window fails as a dimension mismatch.
|
|
173479
|
-
</flag:macos-apps>Returns { summary }, plus diffPath and contextDiffPath when pixels differ. The summary uses normalized [0,1] screen locations matching describe coordinates; diffPath is the full-size diff image and contextDiffPath is a downscaled image for MCP/agent display.
|
|
173480
|
-
Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
|
|
173481
|
-
Fails if the input sources are invalid, PNG files cannot be read, outputDir cannot be written, or the simulator-server / emulator backend<flag:harmonyos>, or \`hdc\` on HarmonyOS,</flag:harmonyos> is not reachable.`,
|
|
173206
|
+
description: `Compare two PNG screenshots (saved files or one live capture<flag:harmonyos> on iOS, Android, or HarmonyOS</flag:harmonyos>) and return a visual-diff summary (status bar ignored).
|
|
173207
|
+
Use when checking pixel-visible regressions (layout, spacing, color, typography, clipping, overflow). Both images must have identical dimensions: save baselines with screenshot scale: 1.0, one per device model.<flag:macos-apps> Mac apps: resized windows fail as a dimension mismatch.</flag:macos-apps>
|
|
173208
|
+
Returns \`{ summary, diffPath?, contextDiffPath? }\` with normalized [0,1] changed regions. Fails if sources are invalid, dimensions differ, files cannot be read/written, or the capture backend<flag:harmonyos> (\`hdc\` on HarmonyOS)</flag:harmonyos> is unreachable.`,
|
|
173482
173209
|
zodSchema: zodSchema80,
|
|
173483
173210
|
searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture<flag:harmonyos> harmony harmonyos</flag:harmonyos>",
|
|
173484
173211
|
interaction: {
|
|
@@ -173992,22 +173719,17 @@ var capability37 = {
|
|
|
173992
173719
|
chromium: { app: true }
|
|
173993
173720
|
};
|
|
173994
173721
|
var zodSchema83 = external_exports.object({
|
|
173995
|
-
udid: external_exports.string().describe("Chromium device id
|
|
173996
|
-
action: external_exports.enum(["list", "select", "new", "close"]).describe(
|
|
173997
|
-
|
|
173998
|
-
),
|
|
173999
|
-
|
|
174000
|
-
"Target tab for `select` (required) / `close`: a tabId like `t2` or a label. `close` defaults to the active tab."
|
|
174001
|
-
),
|
|
174002
|
-
url: external_exports.string().optional().describe("`new` only: URL to open (defaults to about:blank)."),
|
|
174003
|
-
label: external_exports.string().optional().describe("`new` only: a memorable label usable interchangeably with the tabId.")
|
|
173722
|
+
udid: external_exports.string().describe("Chromium device id (`chromium-cdp-<port>`)."),
|
|
173723
|
+
action: external_exports.enum(["list", "select", "new", "close"]).describe("Tab operation."),
|
|
173724
|
+
tab: external_exports.string().optional().describe("Tab id (e.g. `t2`) or label (`select` required; `close` defaults to active)."),
|
|
173725
|
+
url: external_exports.string().optional().describe("URL for `new` (default `about:blank`)."),
|
|
173726
|
+
label: external_exports.string().optional().describe("Optional alias label for `new`.")
|
|
174004
173727
|
});
|
|
174005
173728
|
var chromiumTabsTool = {
|
|
174006
173729
|
id: "chromium-tabs",
|
|
174007
|
-
description: `List and switch
|
|
174008
|
-
|
|
174009
|
-
|
|
174010
|
-
Returns { tabs: [{ tabId, targetId, title, url, active, label? }] } after the action. Fails if the device is not a Chromium (CDP) device, or the requested tabId/label no longer matches a live tab.`,
|
|
173730
|
+
description: `List and switch tabs/windows (or open/close them) in a Chromium (CDP) or Electron app (all UI tools target the active tab).
|
|
173731
|
+
Use when switching between multiple tabs/windows or opening/closing pages.
|
|
173732
|
+
Returns \`{ tabs: [{ tabId, targetId, title, url, active, label? }] }\`. Fails on non-Chromium targets or unknown tab ids.`,
|
|
174011
173733
|
zodSchema: zodSchema83,
|
|
174012
173734
|
searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
|
|
174013
173735
|
interaction: {
|
|
@@ -174126,28 +173848,25 @@ var capability38 = {
|
|
|
174126
173848
|
chromium: { app: true }
|
|
174127
173849
|
};
|
|
174128
173850
|
var zodSchema84 = external_exports.object({
|
|
174129
|
-
udid: external_exports.string().describe("Chromium device id
|
|
173851
|
+
udid: external_exports.string().describe("Chromium device id (`chromium-cdp-<port>`)."),
|
|
174130
173852
|
action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
|
|
174131
|
-
"get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies."
|
|
174132
|
-
),
|
|
174133
|
-
name: external_exports.string().optional().describe("Cookie name."),
|
|
174134
|
-
value: external_exports.string().optional().describe("Cookie value."),
|
|
174135
|
-
url: external_exports.string().optional().describe(
|
|
174136
|
-
"get: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL."
|
|
173853
|
+
"get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies across all domains (ignores url/domain)."
|
|
174137
173854
|
),
|
|
174138
|
-
|
|
174139
|
-
|
|
174140
|
-
|
|
174141
|
-
|
|
174142
|
-
|
|
174143
|
-
|
|
173855
|
+
name: external_exports.string().optional().describe("Cookie name (required for `set`/`delete`)."),
|
|
173856
|
+
value: external_exports.string().optional().describe("Cookie value (required for `set`)."),
|
|
173857
|
+
url: external_exports.string().optional().describe("URL filter for `get` (defaults to the active page) or scope for `set`/`delete`."),
|
|
173858
|
+
domain: external_exports.string().optional().describe("Domain scope (`set`/`delete`)."),
|
|
173859
|
+
path: external_exports.string().optional().describe("Path scope (default `/`)."),
|
|
173860
|
+
secure: external_exports.boolean().optional().describe("Secure flag (`set`)."),
|
|
173861
|
+
httpOnly: external_exports.boolean().optional().describe("HttpOnly flag (`set`)."),
|
|
173862
|
+
sameSite: external_exports.enum(["Strict", "Lax", "None"]).optional().describe("SameSite policy (`set`)."),
|
|
173863
|
+
expires: external_exports.number().optional().describe("Unix expiry in seconds (`set`; omit for session).")
|
|
174144
173864
|
});
|
|
174145
173865
|
var chromiumCookiesTool = {
|
|
174146
173866
|
id: "chromium-cookies",
|
|
174147
|
-
description: `Read and write cookies
|
|
174148
|
-
|
|
174149
|
-
|
|
174150
|
-
Returns { cookies, count } for get, or a small status object ({ set } / { deleted } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or a param that \`set\` / \`delete\` needs is missing.`,
|
|
173867
|
+
description: `Read and write cookies (including HttpOnly) in a Chromium (CDP) app.
|
|
173868
|
+
Use when seeding an auth session or asserting cookie state (\`set\`/\`delete\` need \`url\` or \`domain\`). \`clear\` wipes ALL browser cookies across every domain (ignores \`url\`/\`domain\`); use \`get\` + \`delete\` to clear a single domain.
|
|
173869
|
+
Returns \`{ cookies, count }\` (\`get\`) or \`{ set }\` / \`{ deleted }\` / \`{ cleared }\`. Fails on non-Chromium targets or missing required params.`,
|
|
174151
173870
|
zodSchema: zodSchema84,
|
|
174152
173871
|
searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
|
|
174153
173872
|
interaction: {
|