@swmansion/argent 0.34.1-next.3 → 0.34.1-next.31
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/assets/ios-screen-stream/Info.plist +12 -0
- package/assets/ios-screen-stream/ios-screen-stream.swift +321 -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 +916 -557
- package/dist/client.js +342 -179
- 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 +1150 -911
- 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/mcp-server.mjs +544 -712
- package/dist/preview-ui/index.html +28 -2
- package/dist/tool-args.generated.d.ts +38 -8
- package/dist/tool-server.cjs +7004 -3444
- 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-create-e2e/references/e2e-yaml.md +2 -2
- package/skills/argent-create-e2e/references/live-authoring.md +1 -1
- package/skills/argent-device-interact/references/foldables.md +22 -0
- package/skills/argent-ios-device-interact/SKILL.md +2 -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-native-profiler/SKILL.md +14 -2
- package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
- package/skills/argent-react-native-optimization/SKILL.md +10 -1
- package/skills/argent-react-native-profiler/SKILL.md +4 -3
- package/skills/argent-screen-recording/SKILL.md +3 -2
|
@@ -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,4 +1,20 @@
|
|
|
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
19
|
/** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
4
20
|
udid: string;
|
|
@@ -127,8 +143,6 @@ export interface ArgentToolArgs {
|
|
|
127
143
|
port?: number;
|
|
128
144
|
/** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
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. */
|
|
@@ -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). */
|
|
@@ -541,6 +559,18 @@ export interface ArgentToolArgs {
|
|
|
541
559
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
542
560
|
device_id: string;
|
|
543
561
|
};
|
|
562
|
+
"native-profiler-launch-analysis": {
|
|
563
|
+
/** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
|
|
564
|
+
mode: "measure" | "profile";
|
|
565
|
+
/** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
|
|
566
|
+
bundle_id: string;
|
|
567
|
+
/** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
|
|
568
|
+
device_id?: string;
|
|
569
|
+
/** Explicitly allow a booted simulator when no iPhone is selected. */
|
|
570
|
+
allow_simulator?: boolean;
|
|
571
|
+
/** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
|
|
572
|
+
duration_seconds?: number;
|
|
573
|
+
};
|
|
544
574
|
"native-profiler-start": {
|
|
545
575
|
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
546
576
|
device_id: string;
|
|
@@ -560,7 +590,7 @@ export interface ArgentToolArgs {
|
|
|
560
590
|
udid: string;
|
|
561
591
|
/** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
|
|
562
592
|
bundleId: string;
|
|
563
|
-
/** Raw X coordinate in points, on the
|
|
593
|
+
/** 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
594
|
x: number;
|
|
565
595
|
/** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
|
|
566
596
|
y: number;
|
|
@@ -582,7 +612,7 @@ export interface ArgentToolArgs {
|
|
|
582
612
|
udid: string;
|
|
583
613
|
/** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
|
|
584
614
|
bundleId: string;
|
|
585
|
-
/** Raw X coordinate in points, on the
|
|
615
|
+
/** 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
616
|
x: number;
|
|
587
617
|
/** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
|
|
588
618
|
y: number;
|
|
@@ -680,7 +710,7 @@ export interface ArgentToolArgs {
|
|
|
680
710
|
app_process?: string;
|
|
681
711
|
};
|
|
682
712
|
"profiler-stack-query": {
|
|
683
|
-
/** Target device id from `list-devices` (iOS
|
|
713
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
684
714
|
device_id: string;
|
|
685
715
|
/** Query mode; see Modes in the tool description. */
|
|
686
716
|
mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
|
|
@@ -843,7 +873,7 @@ export interface ArgentToolArgs {
|
|
|
843
873
|
}>;
|
|
844
874
|
};
|
|
845
875
|
"screen-recording-start": {
|
|
846
|
-
/** Target device id from `list-devices` (iOS Simulator UDID or Android serial). */
|
|
876
|
+
/** Target device id from `list-devices` (iOS Simulator UDID, cabled iPhone UDID, or Android serial). */
|
|
847
877
|
udid: string;
|
|
848
878
|
/** Auto-stop cap in seconds (default 180). Set it to slightly more than the interaction you plan to capture. */
|
|
849
879
|
timeLimitSeconds?: number;
|
|
@@ -853,13 +883,13 @@ export interface ArgentToolArgs {
|
|
|
853
883
|
showTouches?: boolean;
|
|
854
884
|
};
|
|
855
885
|
"screen-recording-stop": {
|
|
856
|
-
/** Target device id from `list-devices` (iOS Simulator UDID or Android serial). */
|
|
886
|
+
/** Target device id from `list-devices` (iOS Simulator UDID, cabled iPhone UDID, or Android serial). */
|
|
857
887
|
udid: string;
|
|
858
888
|
};
|
|
859
889
|
screenshot: {
|
|
860
890
|
/** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
|
|
861
891
|
udid: string;
|
|
862
|
-
/** Orientation override for the screenshot (on Chromium it rotates the captured image).
|
|
892
|
+
/** 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
893
|
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
864
894
|
/** 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
895
|
scale?: number;
|