@swmansion/argent 0.34.1-next.7 → 0.34.1-next.70
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/LICENSE +1 -0
- package/README.md +1 -1
- package/assets/argent.tracecfg.pbtxt +7 -1
- package/assets/ios-screen-stream/Info.plist +12 -0
- package/assets/ios-screen-stream/ios-screen-stream.swift +321 -0
- package/assets/trace-processor/engine_bundle.node.js +2074 -11121
- package/assets/trace-processor/trace_processor.wasm +0 -0
- package/bin/argent-android-devtools-0.4.0.apk +0 -0
- package/bin/darwin/argent-macos-helper +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/simulator-server +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/linux/simulator-server +0 -0
- package/bin/linux-arm64/simulator-server +0 -0
- package/bin/network-inspector/network-inspector.jar +0 -0
- package/bin/tcp/ax-service +0 -0
- package/bin/win32/simulator-server.exe +0 -0
- package/dist/cli-cmds.mjs +1259 -616
- package/dist/client.js +381 -180
- package/dist/flow-script-runner.mjs +1 -0
- package/dist/installer-help.js +4 -0
- package/dist/installer-help.js.map +1 -1
- package/dist/installer.mjs +1248 -898
- package/dist/ios-device-runner/ArgentRunner/ArgentRunner.xcodeproj/xcshareddata/xcschemes/ArgentRunner.xcscheme +1 -0
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentLaunchPerformanceTests.swift +21 -0
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift +9 -3
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession.swift +3 -0
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/RunnerHTTPServer.swift +21 -9
- package/dist/mcp-server.mjs +2675 -715
- package/dist/preview-ui/index.html +28 -2
- package/dist/tool-args.generated.d.ts +101 -33
- package/dist/tool-server.cjs +15873 -6272
- package/dylibs/libArgentAudio.dylib +0 -0
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/rules/argent.md +6 -23
- package/skills/argent-android-emulator-setup/SKILL.md +4 -4
- package/skills/argent-create-e2e/SKILL.md +3 -0
- package/skills/argent-create-e2e/references/e2e-yaml.md +20 -2
- package/skills/argent-create-e2e/references/live-authoring.md +12 -1
- package/skills/argent-device-interact/SKILL.md +22 -21
- package/skills/argent-device-interact/references/foldables.md +22 -0
- package/skills/argent-ios-device-interact/SKILL.md +3 -3
- package/skills/argent-ios-device-setup/SKILL.md +4 -2
- package/skills/argent-macos-app-interact/SKILL.md +15 -5
- package/skills/argent-macos-app-interact/references/e2e.md +1 -1
- package/skills/argent-metro-debugger/SKILL.md +26 -14
- package/skills/argent-native-profiler/SKILL.md +14 -2
- package/skills/argent-qa-e2e/SKILL.md +1 -1
- package/skills/argent-react-native-app-workflow/SKILL.md +2 -2
- package/skills/argent-react-native-optimization/SKILL.md +10 -1
- package/skills/argent-react-native-optimization/references/fix-reference.md +10 -10
- package/skills/argent-react-native-profiler/SKILL.md +4 -3
- package/skills/argent-screen-recording/SKILL.md +6 -4
- package/skills/argent-screenshot-diff/SKILL.md +1 -1
- package/skills/argent-test-ui-flow/SKILL.md +1 -1
- package/skills/argent-tv-interact/SKILL.md +3 -3
|
@@ -3488,6 +3488,10 @@
|
|
|
3488
3488
|
const j = await d.json();
|
|
3489
3489
|
if (j && j.tree) {
|
|
3490
3490
|
vp.tree = j.tree;
|
|
3491
|
+
// The tree is drawn over the stream, in the screen's
|
|
3492
|
+
// portrait-native space; screenshots are upright. Kept to
|
|
3493
|
+
// turn a frame for cropping one (see vpUprightFrame).
|
|
3494
|
+
vp.uiOrientation = j.uiOrientation || null;
|
|
3491
3495
|
vp.treeAt = Date.now();
|
|
3492
3496
|
describeWarmupPending = false;
|
|
3493
3497
|
// A right-click that landed before the tree was loaded waits
|
|
@@ -3632,6 +3636,27 @@
|
|
|
3632
3636
|
// into a chip. Letterboxed (no distortion). Falls back to the full,
|
|
3633
3637
|
// contained image when the element isn't matched on-screen or the agent
|
|
3634
3638
|
// supplied a data: URI (treated as author-made art, shown whole).
|
|
3639
|
+
// A frame of the preview's describe tree (the screen's portrait-native
|
|
3640
|
+
// space) in the UI's upright space, the space of screenshots. The same
|
|
3641
|
+
// map as the tool-server's nativeFrameToUi.
|
|
3642
|
+
function vpUprightFrame(f, orientation) {
|
|
3643
|
+
switch (orientation) {
|
|
3644
|
+
case "landscapeRight":
|
|
3645
|
+
return { x: f.y, y: 1 - f.x - f.width, width: f.height, height: f.width };
|
|
3646
|
+
case "landscapeLeft":
|
|
3647
|
+
return { x: 1 - f.y - f.height, y: f.x, width: f.height, height: f.width };
|
|
3648
|
+
case "portraitUpsideDown":
|
|
3649
|
+
return {
|
|
3650
|
+
x: 1 - f.x - f.width,
|
|
3651
|
+
y: 1 - f.y - f.height,
|
|
3652
|
+
width: f.width,
|
|
3653
|
+
height: f.height,
|
|
3654
|
+
};
|
|
3655
|
+
default:
|
|
3656
|
+
return { x: f.x, y: f.y, width: f.width, height: f.height };
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3635
3660
|
function applyThumbCrop(tw, frame) {
|
|
3636
3661
|
const im = tw.querySelector(".thumb-img");
|
|
3637
3662
|
if (!im || !im.naturalWidth || !im.naturalHeight) return;
|
|
@@ -5133,8 +5158,9 @@
|
|
|
5133
5158
|
};
|
|
5134
5159
|
}
|
|
5135
5160
|
if (p._node && !vp.thumbFrames[p.id]) {
|
|
5136
|
-
|
|
5137
|
-
|
|
5161
|
+
// The thumbnail crops a screenshot, which is upright, while the
|
|
5162
|
+
// tree's frame is in the stream's portrait-native space.
|
|
5163
|
+
vp.thumbFrames[p.id] = vpUprightFrame(p._node.frame, vp.uiOrientation);
|
|
5138
5164
|
}
|
|
5139
5165
|
}
|
|
5140
5166
|
layoutCards();
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
export interface ArgentToolArgs {
|
|
2
|
+
"audio-input": {
|
|
3
|
+
/** Target iOS Simulator UDID from `list-devices`. */
|
|
4
|
+
udid: string;
|
|
5
|
+
/** `file` plays `path`, `tone` a sine wave, `microphone` restores the real microphone. */
|
|
6
|
+
source: "file" | "tone" | "microphone";
|
|
7
|
+
/** Audio file, required for source=file. */
|
|
8
|
+
path?: string;
|
|
9
|
+
/** source=file only. Times the file plays. Default 1. */
|
|
10
|
+
plays?: number;
|
|
11
|
+
/** source=tone only. Default 1000. */
|
|
12
|
+
frequencyHz?: number;
|
|
13
|
+
/** source=tone only. Default 0.4. */
|
|
14
|
+
amplitude?: number;
|
|
15
|
+
/** App under test; the result then reports `appReady`. */
|
|
16
|
+
bundleId?: string;
|
|
17
|
+
};
|
|
2
18
|
"await-screen-idle": {
|
|
3
|
-
/** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
19
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
4
20
|
udid: string;
|
|
5
21
|
/** Max time to wait for the screen to settle before giving up (default 3000). */
|
|
6
22
|
timeoutMs?: number;
|
|
7
23
|
/** How often to re-read the tree (default 200). */
|
|
8
24
|
pollIntervalMs?: number;
|
|
9
|
-
/** The screen must hold the same content for at least this long to count as settled (default 250). */
|
|
25
|
+
/** The screen must hold the same content for at least this long to count as settled (default 250); 0 settles on the first non-empty read. */
|
|
10
26
|
minStableMs?: number;
|
|
11
27
|
};
|
|
12
28
|
"await-ui-element": {
|
|
@@ -41,7 +57,7 @@ export interface ArgentToolArgs {
|
|
|
41
57
|
"boot-device": {
|
|
42
58
|
/** iOS: simulator UDID to boot (from `list-devices`). A Mac app id (`macos-app-<bundle id>`) starts that app again from its last path. */
|
|
43
59
|
udid?: string;
|
|
44
|
-
/** Android: AVD
|
|
60
|
+
/** Android: AVD to start, the `avdName` of a `list-devices` entry with kind 'avd'. An emulator already running from it is reused. */
|
|
45
61
|
avdName?: string;
|
|
46
62
|
/** Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). */
|
|
47
63
|
vvdImage?: string;
|
|
@@ -63,7 +79,7 @@ export interface ArgentToolArgs {
|
|
|
63
79
|
electronPort?: number;
|
|
64
80
|
/** Electron-only: extra CLI arguments forwarded to the Electron binary after the app path. */
|
|
65
81
|
electronArgs?: Array<string>;
|
|
66
|
-
/** Mac app: path to the .app bundle to start with the argent library; its device id is `macos-app-<bundle id>`.
|
|
82
|
+
/** Mac app: path to the .app bundle to start with the argent library; its device id is `macos-app-<bundle id>`. An exported or notarized Release build with the hardened runtime cannot be driven without extra entitlements; a hardened Debug build needs the step the error names. */
|
|
67
83
|
macosAppPath?: string;
|
|
68
84
|
/** Mac app only: arguments for the app executable. Omitted, the app starts with none, also when an earlier start had some. */
|
|
69
85
|
macosAppArgs?: Array<string>;
|
|
@@ -125,10 +141,8 @@ export interface ArgentToolArgs {
|
|
|
125
141
|
"debugger-component-tree": {
|
|
126
142
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
127
143
|
port?: number;
|
|
128
|
-
/** Device id
|
|
144
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
129
145
|
device_id: string;
|
|
130
|
-
/** iOS simulator UDID from list-devices. Pass it when device_id is a logicalDeviceId (two or more devices share one Metro), so that the tap coordinates of a landscape UI are on the screen's axes. Give the UDID of the simulator that shows the app. */
|
|
131
|
-
udid?: string;
|
|
132
146
|
/** 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. */
|
|
133
147
|
onScreenOnly?: boolean;
|
|
134
148
|
/** Maximum total nodes to include. When exceeded, intermediate single-child wrapper chains are collapsed to preserve both root structure and leaf elements. Default: no limit. */
|
|
@@ -139,13 +153,13 @@ export interface ArgentToolArgs {
|
|
|
139
153
|
"debugger-connect": {
|
|
140
154
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
141
155
|
port?: number;
|
|
142
|
-
/** Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), or Chromium device id (chromium-cdp-<port>). Pass this SAME id as device_id to every subsequent debugger-* call to pin them to this device. The returned logicalDeviceId is informational (Metro's own per-connection handle, absent on Vega); you do not switch to it. Forwarding it still resolves here, but the list-devices id is the stable one. */
|
|
156
|
+
/** Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), Mac app id (macos-app-<bundle id>), or Chromium device id (chromium-cdp-<port>). Pass this SAME id as device_id to every subsequent debugger-* call to pin them to this device. The returned logicalDeviceId is informational (Metro's own per-connection handle, absent on Vega); you do not switch to it. Forwarding it still resolves here, but the list-devices id is the stable one. On a Metro shared by several devices, a simulator UDID or Android serial is matched by the device's name (a simulator's name; an Android model, release and API level); the app's device log must then confirm it runs there. When another booted simulator or attached device shares that name, or the log does not confirm it, the error asks for the logicalDeviceId instead. */
|
|
143
157
|
device_id: string;
|
|
144
158
|
};
|
|
145
159
|
"debugger-evaluate": {
|
|
146
160
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
147
161
|
port?: number;
|
|
148
|
-
/** Device id
|
|
162
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
149
163
|
device_id: string;
|
|
150
164
|
/** JavaScript expression to evaluate in the app runtime */
|
|
151
165
|
expression: string;
|
|
@@ -153,11 +167,11 @@ export interface ArgentToolArgs {
|
|
|
153
167
|
"debugger-inspect-element": {
|
|
154
168
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
155
169
|
port?: number;
|
|
156
|
-
/** Device id
|
|
170
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
157
171
|
device_id: string;
|
|
158
|
-
/**
|
|
172
|
+
/** Horizontal position in logical pixels from the left edge of the screen, or in points from the left edge of the Mac app window, title bar included. */
|
|
159
173
|
x: number;
|
|
160
|
-
/**
|
|
174
|
+
/** Vertical position in logical pixels from the top edge of the screen, or in points from the top edge of the Mac app window, title bar included. */
|
|
161
175
|
y: number;
|
|
162
176
|
/** Lines of source context to include around the component definition */
|
|
163
177
|
contextLines?: number;
|
|
@@ -171,19 +185,19 @@ export interface ArgentToolArgs {
|
|
|
171
185
|
"debugger-log-registry": {
|
|
172
186
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
173
187
|
port?: number;
|
|
174
|
-
/** Device id
|
|
188
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
175
189
|
device_id: string;
|
|
176
190
|
};
|
|
177
191
|
"debugger-reload-metro": {
|
|
178
192
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
179
193
|
port?: number;
|
|
180
|
-
/** Device id
|
|
194
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
181
195
|
device_id: string;
|
|
182
196
|
};
|
|
183
197
|
"debugger-status": {
|
|
184
198
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
185
199
|
port?: number;
|
|
186
|
-
/** Device id
|
|
200
|
+
/** Device id used with debugger-connect. For macOS, use the Mac app id. */
|
|
187
201
|
device_id: string;
|
|
188
202
|
};
|
|
189
203
|
describe: {
|
|
@@ -324,6 +338,8 @@ export interface ArgentToolArgs {
|
|
|
324
338
|
"gesture-custom": {
|
|
325
339
|
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
326
340
|
udid: string;
|
|
341
|
+
/** Starting edge in upright screen coordinates for a single-finger system gesture on a local iOS simulator. */
|
|
342
|
+
edge?: "top" | "right" | "bottom" | "left";
|
|
327
343
|
/** Touch events, dispatched in order. */
|
|
328
344
|
events: Array<{
|
|
329
345
|
/** Touch event type */
|
|
@@ -439,6 +455,8 @@ export interface ArgentToolArgs {
|
|
|
439
455
|
clickCount?: number;
|
|
440
456
|
/** Mouse button, Mac app only: "right" is a right-click, for example to open a context menu; any other device refuses it. Default "left". */
|
|
441
457
|
button?: "left" | "right";
|
|
458
|
+
/** Keys held throughout a click or multi-click gesture. Mac apps only. An empty list leaves the click unmodified. */
|
|
459
|
+
modifiers?: Array<"control" | "option" | "shift" | "command">;
|
|
442
460
|
};
|
|
443
461
|
keyboard: {
|
|
444
462
|
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
@@ -528,19 +546,29 @@ export interface ArgentToolArgs {
|
|
|
528
546
|
udid: string;
|
|
529
547
|
/** App bundle ID on iOS or package name on Android (on a Mac app, the bundle id in the device id) */
|
|
530
548
|
bundleId: string;
|
|
531
|
-
/**
|
|
549
|
+
/** The app's Metro port, whose requests are left out of the listing. Omit it to use this device's port, 8081 by default. */
|
|
532
550
|
port?: number;
|
|
533
|
-
/** Maximum number of
|
|
551
|
+
/** Maximum number of requests to return: the most recent ones, oldest first. 0 returns only the header and the total. */
|
|
534
552
|
limit?: number;
|
|
535
|
-
/** Clear the log after reading.
|
|
553
|
+
/** Clear the log after reading. The IDs of cleared requests still work in view-network-request-details */
|
|
536
554
|
clear?: boolean;
|
|
537
|
-
/** Android only: turn native capture off for this app instead of listing. Other apps keep theirs. */
|
|
538
|
-
stop?: boolean;
|
|
539
555
|
};
|
|
540
556
|
"native-profiler-analyze": {
|
|
541
557
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
542
558
|
device_id: string;
|
|
543
559
|
};
|
|
560
|
+
"native-profiler-launch-analysis": {
|
|
561
|
+
/** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
|
|
562
|
+
mode: "measure" | "profile";
|
|
563
|
+
/** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
|
|
564
|
+
bundle_id: string;
|
|
565
|
+
/** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
|
|
566
|
+
device_id?: string;
|
|
567
|
+
/** Explicitly allow a booted simulator when no iPhone is selected. */
|
|
568
|
+
allow_simulator?: boolean;
|
|
569
|
+
/** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
|
|
570
|
+
duration_seconds?: number;
|
|
571
|
+
};
|
|
544
572
|
"native-profiler-start": {
|
|
545
573
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
546
574
|
device_id: string;
|
|
@@ -560,7 +588,7 @@ export interface ArgentToolArgs {
|
|
|
560
588
|
udid: string;
|
|
561
589
|
/** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
|
|
562
590
|
bundleId: string;
|
|
563
|
-
/** Raw X coordinate in points, on the
|
|
591
|
+
/** Raw X coordinate in points, on the axes of the UI as the user sees it (the axes of screenshots and describe frames); on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
|
|
564
592
|
x: number;
|
|
565
593
|
/** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
|
|
566
594
|
y: number;
|
|
@@ -582,7 +610,7 @@ export interface ArgentToolArgs {
|
|
|
582
610
|
udid: string;
|
|
583
611
|
/** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
|
|
584
612
|
bundleId: string;
|
|
585
|
-
/** Raw X coordinate in points, on the
|
|
613
|
+
/** Raw X coordinate in points, on the axes of the UI as the user sees it (the axes of screenshots and describe frames); on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
|
|
586
614
|
x: number;
|
|
587
615
|
/** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
|
|
588
616
|
y: number;
|
|
@@ -601,6 +629,46 @@ export interface ArgentToolArgs {
|
|
|
601
629
|
/** true returns the view that would receive a touch at the point: it respects userInteractionEnabled, close to UIKit hit-testing. Default false: the deepest visible view. */
|
|
602
630
|
hitTest?: boolean;
|
|
603
631
|
};
|
|
632
|
+
"network-capture-start": {
|
|
633
|
+
/** Device ID from list-devices: an iOS simulator UDID or Android serial, or a Mac app id (macos-app-<bundle id>) */
|
|
634
|
+
udid: string;
|
|
635
|
+
/** App bundle ID on iOS or package name on Android (on a Mac app, the bundle id in the device id) */
|
|
636
|
+
bundleId: string;
|
|
637
|
+
/** The app's Metro port: the JS layer is reached through it, and the native layers leave its requests out. Omit it to use this device's port, 8081 by default. */
|
|
638
|
+
port?: number;
|
|
639
|
+
/** Use js for the app's JavaScript requests or native for requests captured by the native layer. Omit to control all supported layers. On Mac apps, this parameter supports only native. Read view-network-logs to start JavaScript capture in a React Native Mac app. */
|
|
640
|
+
layer?: "js" | "native";
|
|
641
|
+
/** Only when several devices share the Metro port: this device's logicalDeviceId, which the JS layer's reason lists. The JS layer connects to that runtime, and view-network-logs then takes it as device_id. The native layer always uses udid. */
|
|
642
|
+
logicalDeviceId?: string;
|
|
643
|
+
};
|
|
644
|
+
"network-capture-stop": {
|
|
645
|
+
/** Device ID from list-devices: an iOS simulator UDID or Android serial, or a Mac app id (macos-app-<bundle id>) */
|
|
646
|
+
udid: string;
|
|
647
|
+
/** App bundle ID on iOS or package name on Android (on a Mac app, the bundle id in the device id) */
|
|
648
|
+
bundleId: string;
|
|
649
|
+
/** The app's Metro port: the JS layer is reached through it, and the native layers leave its requests out. Omit it to use this device's port, 8081 by default. */
|
|
650
|
+
port?: number;
|
|
651
|
+
/** Use js for the app's JavaScript requests or native for requests captured by the native layer. Omit to control all supported layers. On Mac apps, this parameter supports only native. Read view-network-logs to start JavaScript capture in a React Native Mac app. */
|
|
652
|
+
layer?: "js" | "native";
|
|
653
|
+
/** Only when several devices share the Metro port: this device's logicalDeviceId, which the JS layer's reason lists. The JS layer connects to that runtime, and view-network-logs then takes it as device_id. The native layer always uses udid. */
|
|
654
|
+
logicalDeviceId?: string;
|
|
655
|
+
};
|
|
656
|
+
"network-conditions": {
|
|
657
|
+
/** Target device id from `list-devices`: an iOS simulator UDID, an Android emulator serial, or a Chromium id. */
|
|
658
|
+
udid: string;
|
|
659
|
+
/** iOS only, and required there: the bundle id of the app to throttle. */
|
|
660
|
+
bundleId?: string;
|
|
661
|
+
/** iOS only: the Metro port the throttle leaves alone. Omit it to use this device's port (8081 by default). */
|
|
662
|
+
port?: number;
|
|
663
|
+
/** Minimum time in milliseconds from sending a request to its response. iOS and Chromium only. */
|
|
664
|
+
latencyMs?: number;
|
|
665
|
+
/** Download limit in kilobits per second. iOS and Chromium only. */
|
|
666
|
+
downloadKbps?: number;
|
|
667
|
+
/** Upload limit in kilobits per second. iOS and Chromium only. */
|
|
668
|
+
uploadKbps?: number;
|
|
669
|
+
/** Make requests fail as if the network were down. On Android, ports forwarded with adb reverse stay reachable. */
|
|
670
|
+
offline?: boolean;
|
|
671
|
+
};
|
|
604
672
|
"open-url": {
|
|
605
673
|
/** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
|
|
606
674
|
udid: string;
|
|
@@ -638,7 +706,7 @@ export interface ArgentToolArgs {
|
|
|
638
706
|
end: number;
|
|
639
707
|
};
|
|
640
708
|
/** Commit index */
|
|
641
|
-
commit_index?: number;
|
|
709
|
+
commit_index?: number | null;
|
|
642
710
|
/** 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. */
|
|
643
711
|
top_n?: number;
|
|
644
712
|
};
|
|
@@ -680,12 +748,12 @@ export interface ArgentToolArgs {
|
|
|
680
748
|
app_process?: string;
|
|
681
749
|
};
|
|
682
750
|
"profiler-stack-query": {
|
|
683
|
-
/** Target device id from `list-devices` (iOS
|
|
751
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
684
752
|
device_id: string;
|
|
685
753
|
/** Query mode; see Modes in the tool description. */
|
|
686
754
|
mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
|
|
687
755
|
/** 0-based index into the hang list */
|
|
688
|
-
hang_index?: number;
|
|
756
|
+
hang_index?: number | null;
|
|
689
757
|
/** Native function name */
|
|
690
758
|
function_name?: string;
|
|
691
759
|
/** Thread filter. thread_breakdown: case-insensitive substring match. function_callers: exact raw thread name (e.g. ".blueskyweb.app"), or "main" for the UI thread; omit to search ALL threads (each result is tagged with its thread). Run thread_breakdown first to see the exact raw names. */
|
|
@@ -843,23 +911,23 @@ export interface ArgentToolArgs {
|
|
|
843
911
|
}>;
|
|
844
912
|
};
|
|
845
913
|
"screen-recording-start": {
|
|
846
|
-
/** Target
|
|
914
|
+
/** Target ID from `list-devices`. For a Mac app, use its device ID, such as `macos-app-com.example.notes`. */
|
|
847
915
|
udid: string;
|
|
848
916
|
/** Auto-stop cap in seconds (default 180). Set it to slightly more than the interaction you plan to capture. */
|
|
849
917
|
timeLimitSeconds?: number;
|
|
850
918
|
/** 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. */
|
|
851
919
|
trimStatic?: boolean;
|
|
852
|
-
/**
|
|
920
|
+
/** Draw touch markers in the video (default true). Recordings of physical iPhones have no touch markers. For Mac apps, this shows the agent's pointer, a click ring, and a dot while a mouse button is held. */
|
|
853
921
|
showTouches?: boolean;
|
|
854
922
|
};
|
|
855
923
|
"screen-recording-stop": {
|
|
856
|
-
/** Target
|
|
924
|
+
/** Target ID from `list-devices`. For a Mac app, use its device ID, such as `macos-app-com.example.notes`. */
|
|
857
925
|
udid: string;
|
|
858
926
|
};
|
|
859
927
|
screenshot: {
|
|
860
928
|
/** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
861
929
|
udid: string;
|
|
862
|
-
/** Orientation override for the screenshot (on Chromium it rotates the captured image).
|
|
930
|
+
/** Orientation override for the screenshot (on Chromium it rotates the captured image). Rarely needed: on Android and iOS simulators the capture already follows the UI's orientation, the space describe frames and gesture coordinates use, and an override can make the image disagree with them. Rejected on HarmonyOS, which captures the display in its current orientation and has no override. Ignored on physical iPhones. */
|
|
863
931
|
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
864
932
|
/** Scale factor. Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android/HarmonyOS. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture). On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. On a Mac app the default is one pixel per window point, downscaled to a 768 px long side for a larger window. */
|
|
865
933
|
scale?: number;
|
|
@@ -937,17 +1005,17 @@ export interface ArgentToolArgs {
|
|
|
937
1005
|
"view-network-logs": {
|
|
938
1006
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
939
1007
|
port?: number;
|
|
940
|
-
/** Device id from list-devices
|
|
1008
|
+
/** Device id from list-devices, or the logicalDeviceId used to start an iOS or Android capture on shared Metro. For macOS, use the Mac app id. */
|
|
941
1009
|
device_id: string;
|
|
942
1010
|
/** Page index (0-based) or "latest" for the most recent page. Each page contains up to 50 entries. */
|
|
943
|
-
pageIndex?: number | "latest";
|
|
1011
|
+
pageIndex?: number | "latest" | null;
|
|
944
1012
|
};
|
|
945
1013
|
"view-network-request-details": {
|
|
946
1014
|
/** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
|
|
947
1015
|
port?: number;
|
|
948
|
-
/** Device id
|
|
1016
|
+
/** Device id used to list the request. For macOS, use the Mac app id. */
|
|
949
1017
|
device_id: string;
|
|
950
|
-
/** The requestId from view-network-logs, or
|
|
1018
|
+
/** The requestId from view-network-logs, or a native ID (ios-, android- or macos-) from native-network-logs. */
|
|
951
1019
|
requestId: string;
|
|
952
1020
|
/** Whether to include the response body (if captured). */
|
|
953
1021
|
includeBody?: boolean;
|