@swmansion/argent 0.35.1-next.14 → 0.35.1-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +2 -2
- package/dist/tool-args.generated.d.ts +65 -63
- package/dist/tool-server.cjs +221 -261
- package/package.json +2 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -38588,7 +38588,7 @@ function isCi(env = process.env) {
|
|
|
38588
38588
|
var SESSION_ID2 = randomUUID5();
|
|
38589
38589
|
function readCliVersion() {
|
|
38590
38590
|
if (true) {
|
|
38591
|
-
return "0.35.1-next.
|
|
38591
|
+
return "0.35.1-next.16";
|
|
38592
38592
|
}
|
|
38593
38593
|
return "0.0.0";
|
|
38594
38594
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -17103,7 +17103,7 @@ function isCi(env = process.env) {
|
|
|
17103
17103
|
var SESSION_ID = randomUUID4();
|
|
17104
17104
|
function readCliVersion() {
|
|
17105
17105
|
if (true) {
|
|
17106
|
-
return "0.35.1-next.
|
|
17106
|
+
return "0.35.1-next.16";
|
|
17107
17107
|
}
|
|
17108
17108
|
return "0.0.0";
|
|
17109
17109
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -37853,7 +37853,7 @@ function debuggerLogRegistryText(result) {
|
|
|
37853
37853
|
}
|
|
37854
37854
|
|
|
37855
37855
|
// ../argent-mcp/src/instructions.ts
|
|
37856
|
-
var SERVER_INSTRUCTIONS = "Argent
|
|
37856
|
+
var SERVER_INSTRUCTIONS = "Argent controls iOS, Android, Chromium, Mac, TV, and HarmonyOS apps. Use the platform named by the user; otherwise prefer an already-running device from `list-devices` (do not default to iOS). In a single-platform project, boot that platform. Prefer Argent tools over raw `xcrun`/`adb`; use `launch-app`/`open-url` instead of tapping home-screen icons. Load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first action if an e2e test may be needed (recording is not retroactive), and load the matching `argent-*` skill before React Native build/debug, profiling, physical phone, Mac app, or TV work. Interaction tools return a screenshot + accessibility tree with normalized [0,1] tap frames (or an unchanged note / `-`+`+` diff referencing an earlier screenshot/tree id). Take tap coordinates from that tree \u2014 never guess from pixels \u2014 and call `describe` only without a fresh tree. After two failed taps, re-discover. Use `await-ui-element` instead of polling. Do not stop simulator servers when finishing; call `stop-all-simulator-servers` only when asked to clean up or when a skill tells you to recycle a device's services, scoped with `devices: [...]` (the tool-server is shared across agents), and never stop a user-started Metro. CLI: `argent --help`.";
|
|
37857
37857
|
|
|
37858
37858
|
// ../argent-mcp/src/installed-version.ts
|
|
37859
37859
|
import * as fs12 from "node:fs";
|
|
@@ -38058,7 +38058,7 @@ async function startMcpServer(options) {
|
|
|
38058
38058
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38059
38059
|
const whatsNewOn = whatsNewEnabled();
|
|
38060
38060
|
const installedVersion = getInstalledVersion();
|
|
38061
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38061
|
+
const highlightsVersion = true ? "0.35.1-next.16" : installedVersion;
|
|
38062
38062
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38063
38063
|
const trees = createTreeMemory();
|
|
38064
38064
|
const screenshots = createScreenshotMemory();
|
|
@@ -46,11 +46,11 @@ export interface ArgentToolArgs {
|
|
|
46
46
|
minStableMs?: number;
|
|
47
47
|
};
|
|
48
48
|
"await-ui-element": {
|
|
49
|
-
/** Target device id from `list-devices
|
|
49
|
+
/** Target device id from `list-devices`. */
|
|
50
50
|
udid: string;
|
|
51
|
-
/**
|
|
51
|
+
/** `exists`: in tree; `visible`: non-zero on-screen frame; `hidden`: absent or zero-area; `text`: first visible match in reading order matches `expectedText`. On a Mac app, open menus match before alerts/sheets and the window. */
|
|
52
52
|
condition: "exists" | "visible" | "hidden" | "text";
|
|
53
|
-
/** Element
|
|
53
|
+
/** Element matcher (at least one field; all given fields must match). */
|
|
54
54
|
selector: {
|
|
55
55
|
/** Case-insensitive substring of the element's visible label or value. */
|
|
56
56
|
text?: string;
|
|
@@ -59,15 +59,15 @@ export interface ArgentToolArgs {
|
|
|
59
59
|
/** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
|
|
60
60
|
role?: string;
|
|
61
61
|
};
|
|
62
|
-
/** Required for
|
|
62
|
+
/** Required for `text`: expected substring or full string (see `textMatch`). */
|
|
63
63
|
expectedText?: string;
|
|
64
|
-
/**
|
|
64
|
+
/** Case-insensitive match mode for `text`: `contains` (default) or `equals`. */
|
|
65
65
|
textMatch?: "contains" | "equals";
|
|
66
|
-
/** iOS
|
|
66
|
+
/** iOS simulator only: fallback bundle id for `describe`. */
|
|
67
67
|
bundleId?: string;
|
|
68
|
-
/**
|
|
68
|
+
/** Timeout in ms (default 5000). */
|
|
69
69
|
timeoutMs?: number;
|
|
70
|
-
/**
|
|
70
|
+
/** Poll interval in ms (default 400). */
|
|
71
71
|
pollIntervalMs?: number;
|
|
72
72
|
};
|
|
73
73
|
await_user_selection: {
|
|
@@ -75,39 +75,39 @@ export interface ArgentToolArgs {
|
|
|
75
75
|
timeoutSeconds?: number;
|
|
76
76
|
};
|
|
77
77
|
"boot-device": {
|
|
78
|
-
/** iOS
|
|
78
|
+
/** iOS simulator UDID from `list-devices`. Or Mac app id (`macos-app-<bundle id>`) to relaunch from its last path. */
|
|
79
79
|
udid?: string;
|
|
80
|
-
/** Android
|
|
80
|
+
/** Android AVD name (`kind: 'avd'` from `list-devices`). Reuses a compatible running emulator. */
|
|
81
81
|
avdName?: string;
|
|
82
|
-
/** Vega (Fire TV)
|
|
82
|
+
/** Vega (Fire TV) VVD image name from `list-devices` (e.g. `tv`). */
|
|
83
83
|
vvdImage?: string;
|
|
84
|
-
/** HarmonyOS
|
|
84
|
+
/** HarmonyOS emulator instance name or `harmony-emulator-<name>` id from `list-devices`. */
|
|
85
85
|
harmonyInstance?: string;
|
|
86
|
-
/**
|
|
86
|
+
/** Overall boot budget in ms (Android default 480000, Vega 120000, HarmonyOS 180000). On HarmonyOS with `force`, this spans shutdown too. */
|
|
87
87
|
bootTimeoutMs?: number;
|
|
88
|
-
/** Shut down and
|
|
88
|
+
/** Shut down and reboot even if already running. On HarmonyOS, also ties a running instance to its `hdc` connect key. On a Mac app, quits and restarts the same .app build, including a copy running without the argent library (losing its unsaved changes); fails if the app shows a save prompt. Ignored for Electron. */
|
|
89
89
|
force?: boolean;
|
|
90
|
-
/** Android only
|
|
90
|
+
/** Android only: enable emulator audio (default false, or `boot-sound` flag). Pair with `force: true` to toggle a running emulator. */
|
|
91
91
|
sound?: boolean;
|
|
92
|
-
/** Android on a macOS host only:
|
|
92
|
+
/** Android on a macOS host only: enable guest Vulkan (default false; true needed for WebGPU/Vulkan renderers, may crash Chrome GPU). Pair with `force: true` to toggle. */
|
|
93
93
|
guestVulkan?: boolean;
|
|
94
|
-
/** Android only: boot
|
|
94
|
+
/** Android only: boot `-read-only` (default false) to run multiple concurrent instances of one AVD without saving snapshot changes. */
|
|
95
95
|
readOnly?: boolean;
|
|
96
|
-
/** Android only:
|
|
96
|
+
/** Android only: emulator console port (even, 5554–5584; serial `emulator-<port>`, gRPC on port+3000). Defaults to first free port. */
|
|
97
97
|
port?: number;
|
|
98
|
-
/** Local iOS simulator only: apply accessibility
|
|
98
|
+
/** Local iOS simulator only: apply accessibility prefs to a Shutdown simulator without booting. Cannot combine with `force: true`. */
|
|
99
99
|
prepareOnly?: boolean;
|
|
100
|
-
/** iOS only: boot
|
|
100
|
+
/** iOS only: boot simulator core without opening Simulator.app (`ARGENT_SIMULATOR_NO_WINDOW=1` forces host-wide). */
|
|
101
101
|
headless?: boolean;
|
|
102
|
-
/** Electron: path to
|
|
102
|
+
/** Electron: path to `.app` bundle, executable, or project directory with `package.json`. */
|
|
103
103
|
electronAppPath?: string;
|
|
104
|
-
/** Electron
|
|
104
|
+
/** Electron only: CDP remote-debugging port (default: free port; id `chromium-cdp-<port>`). */
|
|
105
105
|
electronPort?: number;
|
|
106
|
-
/** Electron
|
|
106
|
+
/** Electron only: extra CLI args forwarded to the Electron binary. */
|
|
107
107
|
electronArgs?: Array<string>;
|
|
108
|
-
/** Mac app: path to
|
|
108
|
+
/** Mac app: path to `.app` bundle (id `macos-app-<bundle id>`). */
|
|
109
109
|
macosAppPath?: string;
|
|
110
|
-
/** Mac app only: arguments
|
|
110
|
+
/** Mac app only: launch arguments (omitted = none). */
|
|
111
111
|
macosAppArgs?: Array<string>;
|
|
112
112
|
};
|
|
113
113
|
button: {
|
|
@@ -231,9 +231,9 @@ export interface ArgentToolArgs {
|
|
|
231
231
|
device_id: string;
|
|
232
232
|
};
|
|
233
233
|
describe: {
|
|
234
|
-
/** Target device id from `list-devices
|
|
234
|
+
/** Target device id from `list-devices`. */
|
|
235
235
|
udid: string;
|
|
236
|
-
/**
|
|
236
|
+
/** iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted). */
|
|
237
237
|
bundleId?: string;
|
|
238
238
|
};
|
|
239
239
|
"dismiss-update": {
|
|
@@ -487,53 +487,55 @@ export interface ArgentToolArgs {
|
|
|
487
487
|
durationMs?: number;
|
|
488
488
|
};
|
|
489
489
|
"gesture-swipe": {
|
|
490
|
-
/** Target device id from `list-devices
|
|
490
|
+
/** Target device id from `list-devices`. */
|
|
491
491
|
udid: string;
|
|
492
|
-
/** Start x. */
|
|
492
|
+
/** Start x [0,1]. */
|
|
493
493
|
fromX: number;
|
|
494
|
-
/** Start y. */
|
|
494
|
+
/** Start y [0,1]. */
|
|
495
495
|
fromY: number;
|
|
496
|
-
/** End x. */
|
|
496
|
+
/** End x [0,1]. */
|
|
497
497
|
toX: number;
|
|
498
|
-
/** End y. */
|
|
498
|
+
/** End y [0,1]. */
|
|
499
499
|
toY: number;
|
|
500
|
-
/**
|
|
500
|
+
/** Swipe duration in ms (default 300). */
|
|
501
501
|
durationMs?: number;
|
|
502
|
-
/**
|
|
502
|
+
/** Default true (flinging swipe). Set false to ease out with no fling for deterministic scroll distance (requires durationMs >= 150). */
|
|
503
503
|
momentum?: boolean;
|
|
504
504
|
};
|
|
505
505
|
"gesture-tap": {
|
|
506
|
-
/** Target device id from `list-devices
|
|
506
|
+
/** Target device id from `list-devices`. */
|
|
507
507
|
udid: string;
|
|
508
|
-
/** Horizontal
|
|
508
|
+
/** Horizontal screen fraction [0,1]. */
|
|
509
509
|
x: number;
|
|
510
|
-
/** Vertical
|
|
510
|
+
/** Vertical screen fraction [0,1]. */
|
|
511
511
|
y: number;
|
|
512
|
-
/**
|
|
512
|
+
/** Tap/click count as one OS gesture (2 = double-tap; default 1). On physical iOS, higher counts loop single taps, which a double-tap recognizer may pair. */
|
|
513
513
|
clickCount?: number;
|
|
514
|
-
/**
|
|
514
|
+
/** Mac app only: mouse button ("left" default, or "right"). */
|
|
515
515
|
button?: "left" | "right";
|
|
516
|
-
/**
|
|
516
|
+
/** Mac app only: modifier keys held during click. */
|
|
517
517
|
modifiers?: Array<"control" | "option" | "shift" | "command">;
|
|
518
518
|
};
|
|
519
519
|
keyboard: {
|
|
520
|
-
/** Target device id from `list-devices
|
|
520
|
+
/** Target device id from `list-devices`. */
|
|
521
521
|
udid: string;
|
|
522
|
-
/** Text to type
|
|
522
|
+
/** Text to type. Cannot be combined with `key` (use two steps in `run-sequence` to type then press enter). Supports `{{secret:<NAME>}}` placeholders resolved server-side from `ARGENT_SECRET_<NAME>` / `.argent/secrets.env` (auto-screenshot is skipped; combine with submit in one `run-sequence` to keep the skip; never ask the user for plaintext). */
|
|
523
523
|
text?: string;
|
|
524
|
-
/** Named key
|
|
524
|
+
/** Named key. Cannot be combined with `text` (use two steps in `run-sequence`). Values: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Not supported on Apple TV / Android TV (use `tv-remote`). Physical iOS: enter/backspace only. HarmonyOS: enter, backspace, space, arrow-left/right. Mac app: also delete (forward delete), home, end, page-up/down, and modifier shortcuts (e.g. command+a). */
|
|
525
525
|
key?: string;
|
|
526
|
-
/**
|
|
526
|
+
/** Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`. */
|
|
527
|
+
repeat?: number;
|
|
528
|
+
/** Delay in ms between key presses (default 50; ignored on platforms that type in one shot). */
|
|
527
529
|
delayMs?: number;
|
|
528
530
|
};
|
|
529
531
|
"launch-app": {
|
|
530
|
-
/** Target device id from `list-devices
|
|
532
|
+
/** Target device id from `list-devices`. */
|
|
531
533
|
udid: string;
|
|
532
|
-
/** App identifier
|
|
534
|
+
/** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id from manifest.toml e.g. `com.example.app.main`, HarmonyOS bundle name from `bm dump -a`, or Chromium tag). */
|
|
533
535
|
bundleId: string;
|
|
534
|
-
/** Android
|
|
536
|
+
/** Android only: Activity name (default: launcher activity). */
|
|
535
537
|
activity?: string;
|
|
536
|
-
/** Apple
|
|
538
|
+
/** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. Relaunches running simulators/phones to apply. */
|
|
537
539
|
launchArgs?: Array<string>;
|
|
538
540
|
};
|
|
539
541
|
"list-devices": Record<string, never>;
|
|
@@ -938,13 +940,13 @@ export interface ArgentToolArgs {
|
|
|
938
940
|
appPath: string;
|
|
939
941
|
};
|
|
940
942
|
"restart-app": {
|
|
941
|
-
/** Target device id from `list-devices
|
|
943
|
+
/** Target device id from `list-devices`. */
|
|
942
944
|
udid: string;
|
|
943
|
-
/** App identifier
|
|
945
|
+
/** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id, or HarmonyOS bundle name). */
|
|
944
946
|
bundleId: string;
|
|
945
|
-
/** Android
|
|
947
|
+
/** Android only: Activity name to relaunch (default: launcher activity). */
|
|
946
948
|
activity?: string;
|
|
947
|
-
/** Apple
|
|
949
|
+
/** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. */
|
|
948
950
|
launchArgs?: Array<string>;
|
|
949
951
|
};
|
|
950
952
|
rotate: {
|
|
@@ -954,20 +956,20 @@ export interface ArgentToolArgs {
|
|
|
954
956
|
orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
955
957
|
};
|
|
956
958
|
"run-sequence": {
|
|
957
|
-
/** Target device id from `list-devices
|
|
959
|
+
/** Target device id from `list-devices`, shared across all steps. */
|
|
958
960
|
udid: string;
|
|
959
|
-
/** Ordered
|
|
961
|
+
/** Ordered steps to execute. */
|
|
960
962
|
steps: Array<{
|
|
961
|
-
/**
|
|
963
|
+
/** Allowed tool name (see description). */
|
|
962
964
|
tool: string;
|
|
963
|
-
/** Tool arguments (
|
|
965
|
+
/** Tool arguments (omit `udid`, injected automatically). */
|
|
964
966
|
args: {
|
|
965
967
|
[key: string]: unknown;
|
|
966
968
|
};
|
|
967
|
-
/**
|
|
969
|
+
/** Extra pause in ms after step settle (default 100). */
|
|
968
970
|
delayMs?: number;
|
|
969
971
|
}>;
|
|
970
|
-
/** Wait up to 1000ms
|
|
972
|
+
/** Wait up to 1000ms for tree settle between screen-changing steps (default true). */
|
|
971
973
|
settle?: boolean;
|
|
972
974
|
};
|
|
973
975
|
"screen-recording-start": {
|
|
@@ -985,15 +987,15 @@ export interface ArgentToolArgs {
|
|
|
985
987
|
udid: string;
|
|
986
988
|
};
|
|
987
989
|
screenshot: {
|
|
988
|
-
/** Target device id from `list-devices
|
|
990
|
+
/** Target device id from `list-devices`. */
|
|
989
991
|
udid: string;
|
|
990
|
-
/** Orientation override
|
|
992
|
+
/** Orientation override (rarely needed; captures already follow UI orientation). Rejected on HarmonyOS (captures display in current orientation). Ignored on physical iPhones. */
|
|
991
993
|
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
992
|
-
/** Scale factor
|
|
994
|
+
/** Scale factor (default 0.25 on iOS/Android/HarmonyOS or `ARGENT_SCREENSHOT_SCALE`, 576px long side on TV, 1.0 on Chromium, <=768px on Mac). */
|
|
993
995
|
scale?: number;
|
|
994
|
-
/** Set false only when
|
|
996
|
+
/** Set false only when saving a full-res (`scale: 1.0`) baseline/current for `screenshot-diff`. */
|
|
995
997
|
includeImageInContext?: boolean;
|
|
996
|
-
/**
|
|
998
|
+
/** Chromium only: downscaler when scale < 1 (default lanczos3). */
|
|
997
999
|
downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
|
|
998
1000
|
};
|
|
999
1001
|
"screenshot-diff": {
|