@swmansion/argent 0.27.1-next.0 → 0.27.1-next.2
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/client.d.ts +6 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +5 -2
- package/dist/tool-args.generated.d.ts +872 -0
- package/dist/tool-server.cjs +6 -3
- package/package.json +3 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -21916,7 +21916,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21916
21916
|
var SESSION_ID2 = randomUUID5();
|
|
21917
21917
|
function readCliVersion() {
|
|
21918
21918
|
if (true) {
|
|
21919
|
-
return "0.27.1-next.
|
|
21919
|
+
return "0.27.1-next.2";
|
|
21920
21920
|
}
|
|
21921
21921
|
return "0.0.0";
|
|
21922
21922
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { ArgentToolArgs } from "./tool-args.generated.js";
|
|
2
|
+
export type { ArgentToolArgs };
|
|
3
|
+
export type ArgentToolName = keyof ArgentToolArgs;
|
|
1
4
|
export interface ArgentTool {
|
|
2
5
|
name: string;
|
|
3
6
|
description: string;
|
|
@@ -38,11 +41,13 @@ export interface ArgentFlag {
|
|
|
38
41
|
}
|
|
39
42
|
/** Feature flags and their effective state: project overrides global, then the default. */
|
|
40
43
|
export declare function listFlags(): ArgentFlag[];
|
|
44
|
+
/** `args` may be omitted only when the tool has no required argument. */
|
|
45
|
+
type CallToolParams<N extends ArgentToolName> = Record<never, never> extends ArgentToolArgs[N] ? [args?: ArgentToolArgs[N], options?: CallToolOptions] : [args: ArgentToolArgs[N], options?: CallToolOptions];
|
|
41
46
|
export interface ArgentClient {
|
|
42
47
|
listTools(options?: {
|
|
43
48
|
signal?: AbortSignal;
|
|
44
49
|
}): Promise<ArgentTool[]>;
|
|
45
|
-
callTool<T = unknown>(name:
|
|
50
|
+
callTool<N extends ArgentToolName, T = unknown>(name: N, ...params: CallToolParams<N>): Promise<ArgentToolResult<T>>;
|
|
46
51
|
/**
|
|
47
52
|
* Stop this install's local tool-server, like `argent server stop`. The next
|
|
48
53
|
* call starts a fresh one. Resolves false when none was running.
|
package/dist/installer.mjs
CHANGED
|
@@ -16730,7 +16730,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16730
16730
|
var SESSION_ID = randomUUID4();
|
|
16731
16731
|
function readCliVersion() {
|
|
16732
16732
|
if (true) {
|
|
16733
|
-
return "0.27.1-next.
|
|
16733
|
+
return "0.27.1-next.2";
|
|
16734
16734
|
}
|
|
16735
16735
|
return "0.0.0";
|
|
16736
16736
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -18768,6 +18768,9 @@ function toMcpTool(t) {
|
|
|
18768
18768
|
...Object.keys(meta2).length > 0 ? { _meta: meta2 } : {}
|
|
18769
18769
|
};
|
|
18770
18770
|
}
|
|
18771
|
+
function toMcpToolList(tools) {
|
|
18772
|
+
return tools.filter((t) => !t.hideFromMcp).map(toMcpTool);
|
|
18773
|
+
}
|
|
18771
18774
|
|
|
18772
18775
|
// ../argent-mcp/src/installed-version.ts
|
|
18773
18776
|
import * as fs9 from "node:fs";
|
|
@@ -18912,13 +18915,13 @@ async function startMcpServer(options) {
|
|
|
18912
18915
|
);
|
|
18913
18916
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
18914
18917
|
try {
|
|
18915
|
-
const tools = await fetchTools();
|
|
18918
|
+
const tools = toMcpToolList(await fetchTools());
|
|
18916
18919
|
await spyLog({
|
|
18917
18920
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
18918
18921
|
event: "list_tools",
|
|
18919
18922
|
count: tools.length
|
|
18920
18923
|
});
|
|
18921
|
-
return { tools
|
|
18924
|
+
return { tools };
|
|
18922
18925
|
} catch (err) {
|
|
18923
18926
|
process.stderr.write(
|
|
18924
18927
|
`[argent] Failed to list tools: ${err instanceof Error ? err.message : err}
|
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
export interface ArgentToolArgs {
|
|
2
|
+
"await-screen-idle": {
|
|
3
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
|
|
4
|
+
udid: string;
|
|
5
|
+
/** Max time to wait for the screen to settle before giving up (default 3000). */
|
|
6
|
+
timeoutMs?: number;
|
|
7
|
+
/** How often to re-read the tree (default 200). */
|
|
8
|
+
pollIntervalMs?: number;
|
|
9
|
+
/** The screen must hold the same content for at least this long to count as settled (default 250). */
|
|
10
|
+
minStableMs?: number;
|
|
11
|
+
};
|
|
12
|
+
"await-ui-element": {
|
|
13
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
|
|
14
|
+
udid: string;
|
|
15
|
+
/** What to wait for. `exists`: selector is anywhere in the tree. `visible`: selector is present with a non-zero on-screen frame. `hidden`: selector is absent or zero-area. `text`: the first visible match in reading order (topmost), falling back to the first match overall if none is visible, contains (or, with textMatch `equals`, exactly matches) expectedText — if a loose selector hits several elements, only that one is checked, so narrow it to target the intended element. */
|
|
16
|
+
condition: "exists" | "visible" | "hidden" | "text";
|
|
17
|
+
/** Element to match (text / identifier / role). */
|
|
18
|
+
selector: {
|
|
19
|
+
/** Case-insensitive substring of the element's visible label or value. */
|
|
20
|
+
text?: string;
|
|
21
|
+
/** The element's identifier (accessibilityIdentifier / resource-id / testid), matched case-insensitively as the exact identifier or the unqualified resource-id name ('submit' matches 'com.example.app:id/submit'). */
|
|
22
|
+
identifier?: string;
|
|
23
|
+
/** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
|
|
24
|
+
role?: string;
|
|
25
|
+
};
|
|
26
|
+
/** For condition `text`: the string the first visible matched element (topmost in reading order; the first match overall if none is visible) must contain (default) or equal — see `textMatch`. Case-insensitive. */
|
|
27
|
+
expectedText?: string;
|
|
28
|
+
/** For condition `text`: how expectedText is compared. `contains` (default) is a case-insensitive substring; `equals` is a case-insensitive full-string match. */
|
|
29
|
+
textMatch?: "contains" | "equals";
|
|
30
|
+
/** Optional iOS app bundle id, passed to the describe fallback (see `describe`). Ignored on Android / Chromium, and on physical iOS. */
|
|
31
|
+
bundleId?: string;
|
|
32
|
+
/** Max time to wait for the condition before giving up (default 5000). */
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
/** How often to re-check the tree (default 400). */
|
|
35
|
+
pollIntervalMs?: number;
|
|
36
|
+
};
|
|
37
|
+
await_user_selection: {
|
|
38
|
+
/** Max seconds to block this call before returning a re-awaitable { status: 'pending' } result (default 1800). The user's proposals stay live across timeouts — on 'pending' just call await_user_selection again. Lower this if your MCP client enforces a short request timeout. */
|
|
39
|
+
timeoutSeconds?: number;
|
|
40
|
+
};
|
|
41
|
+
"boot-device": {
|
|
42
|
+
/** iOS: simulator UDID to boot (from `list-devices`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
|
|
43
|
+
udid?: string;
|
|
44
|
+
/** Android: AVD name to launch a new emulator from (from `list-devices` → `avds[].name`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
|
|
45
|
+
avdName?: string;
|
|
46
|
+
/** Vega (Fire TV): VVD image to boot — the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). Starts the single SDK-managed Vega Virtual Device. Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
|
|
47
|
+
vvdImage?: string;
|
|
48
|
+
/** Android/Vega: overall budget for the boot sequence. Default 480000 (8 min) on Android, 120000 (2 min) on Vega. Clamped to [30s, 15min]. Ignored on iOS. */
|
|
49
|
+
bootTimeoutMs?: number;
|
|
50
|
+
/** Shut down and re-boot the device even if already running. */
|
|
51
|
+
force?: boolean;
|
|
52
|
+
/** Android only: boot the emulator with audio output enabled. Defaults to false — argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/Electron, which argent never mutes. */
|
|
53
|
+
sound?: boolean;
|
|
54
|
+
/** iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server; used by Argent Lens. Set the `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) to force this host-wide without passing the flag per call (the iOS analog of `ARGENT_EMULATOR_NO_WINDOW`). Ignored on Android/Vega/Electron, which have no equivalent GUI step. */
|
|
55
|
+
headless?: boolean;
|
|
56
|
+
/** Electron: path to the Electron app to launch. Either a packaged .app bundle / executable, or a project directory whose package.json points the Electron binary at the entry script. Mutually exclusive with udid/avdName. */
|
|
57
|
+
electronAppPath?: string;
|
|
58
|
+
/** Electron-only: CDP remote-debugging port to expose. Defaults to a free port; the resulting device id is `chromium-cdp-<port>`. */
|
|
59
|
+
electronPort?: number;
|
|
60
|
+
/** Electron-only: extra CLI arguments forwarded to the Electron binary after the app path. */
|
|
61
|
+
electronArgs?: Array<string>;
|
|
62
|
+
};
|
|
63
|
+
button: {
|
|
64
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
65
|
+
udid: string;
|
|
66
|
+
/** Hardware button to press */
|
|
67
|
+
button: "home" | "back" | "power" | "volumeUp" | "volumeDown" | "appSwitch" | "actionButton";
|
|
68
|
+
};
|
|
69
|
+
"chromium-cookies": {
|
|
70
|
+
/** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
|
|
71
|
+
udid: string;
|
|
72
|
+
/** get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies. */
|
|
73
|
+
action: "get" | "set" | "delete" | "clear";
|
|
74
|
+
/** set/delete: cookie name. */
|
|
75
|
+
name?: string;
|
|
76
|
+
/** set: cookie value. */
|
|
77
|
+
value?: string;
|
|
78
|
+
/** get: restrict to these URLs (defaults to the active page). set/delete: scope the cookie by URL. */
|
|
79
|
+
url?: string;
|
|
80
|
+
/** set/delete: scope the cookie by domain (alt to url). */
|
|
81
|
+
domain?: string;
|
|
82
|
+
/** set/delete: cookie path (default /). */
|
|
83
|
+
path?: string;
|
|
84
|
+
/** set: mark Secure. */
|
|
85
|
+
secure?: boolean;
|
|
86
|
+
/** set: mark HttpOnly. */
|
|
87
|
+
httpOnly?: boolean;
|
|
88
|
+
/** set: SameSite policy. */
|
|
89
|
+
sameSite?: "Strict" | "Lax" | "None";
|
|
90
|
+
/** set: expiry as a Unix timestamp (seconds). Omit for a session cookie. */
|
|
91
|
+
expires?: number;
|
|
92
|
+
};
|
|
93
|
+
"chromium-storage": {
|
|
94
|
+
/** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
|
|
95
|
+
udid: string;
|
|
96
|
+
/** Which Web Storage area: `local` (localStorage) or `session` (sessionStorage). */
|
|
97
|
+
store: "local" | "session";
|
|
98
|
+
/** get: read one key (with `key`) or all entries. set: write `key`=`value`. remove: delete `key`. clear: empty the store. */
|
|
99
|
+
action: "get" | "set" | "remove" | "clear";
|
|
100
|
+
/** get (optional) / set / remove: the storage key. */
|
|
101
|
+
key?: string;
|
|
102
|
+
/** set: the value to store. */
|
|
103
|
+
value?: string;
|
|
104
|
+
};
|
|
105
|
+
"chromium-tabs": {
|
|
106
|
+
/** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
|
|
107
|
+
udid: string;
|
|
108
|
+
/** list: enumerate tabs/windows. select: make a tab active (every other tool then acts on it). new: open a tab. close: close a tab. */
|
|
109
|
+
action: "list" | "select" | "new" | "close";
|
|
110
|
+
/** Target tab for `select` / `close`: a tabId like `t2` or a label. `close` defaults to the active tab. */
|
|
111
|
+
tab?: string;
|
|
112
|
+
/** `new` only: URL to open (defaults to about:blank). */
|
|
113
|
+
url?: string;
|
|
114
|
+
/** `new` only: a memorable label usable interchangeably with the tabId. */
|
|
115
|
+
label?: string;
|
|
116
|
+
};
|
|
117
|
+
"debugger-component-tree": {
|
|
118
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
119
|
+
port?: number;
|
|
120
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
121
|
+
device_id: string;
|
|
122
|
+
/** 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. */
|
|
123
|
+
udid?: string;
|
|
124
|
+
/** When true (default), only components visible on screen are returned. Set to false to include all mounted components including those scrolled off-screen. Useful when you need to understand the full page structure. */
|
|
125
|
+
onScreenOnly?: boolean;
|
|
126
|
+
/** 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. */
|
|
127
|
+
maxNodes?: number;
|
|
128
|
+
/** When true, appends a summary of all filtered components: total fiber count, JS-side skip counts by name, and TS-side filter pass removals. Useful for understanding what was pruned from the tree. */
|
|
129
|
+
includeSkipped?: boolean;
|
|
130
|
+
};
|
|
131
|
+
"debugger-connect": {
|
|
132
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
133
|
+
port?: number;
|
|
134
|
+
/** 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. */
|
|
135
|
+
device_id: string;
|
|
136
|
+
};
|
|
137
|
+
"debugger-evaluate": {
|
|
138
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
139
|
+
port?: number;
|
|
140
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
|
|
141
|
+
device_id: string;
|
|
142
|
+
/** JavaScript expression to evaluate in the app runtime */
|
|
143
|
+
expression: string;
|
|
144
|
+
};
|
|
145
|
+
"debugger-inspect-element": {
|
|
146
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
147
|
+
port?: number;
|
|
148
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
149
|
+
device_id: string;
|
|
150
|
+
/** Logical X coordinate on device screen */
|
|
151
|
+
x: number;
|
|
152
|
+
/** Logical Y coordinate on device screen */
|
|
153
|
+
y: number;
|
|
154
|
+
/** Lines of source context to include around the component definition */
|
|
155
|
+
contextLines?: number;
|
|
156
|
+
/** When true, resolves bundled frame locations to original source files via Metro symbolication and includes a code fragment. When false, returns the raw bundled frame info (file, line, column) without symbolication or source reading. */
|
|
157
|
+
resolveSourceMaps?: boolean;
|
|
158
|
+
/** Maximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root — the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure. */
|
|
159
|
+
maxItems?: number;
|
|
160
|
+
/** When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. Useful for understanding what was pruned. */
|
|
161
|
+
includeSkipped?: boolean;
|
|
162
|
+
};
|
|
163
|
+
"debugger-log-registry": {
|
|
164
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
165
|
+
port?: number;
|
|
166
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
|
|
167
|
+
device_id: string;
|
|
168
|
+
};
|
|
169
|
+
"debugger-reload-metro": {
|
|
170
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
171
|
+
port?: number;
|
|
172
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
173
|
+
device_id: string;
|
|
174
|
+
};
|
|
175
|
+
"debugger-status": {
|
|
176
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
177
|
+
port?: number;
|
|
178
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
|
|
179
|
+
device_id: string;
|
|
180
|
+
};
|
|
181
|
+
describe: {
|
|
182
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id). */
|
|
183
|
+
udid: string;
|
|
184
|
+
/** Optional app bundle ID. Used as a target hint on iOS when the AX-service returns no elements and the describe tool falls back to native-devtools inspection. If omitted, the fallback auto-detects the frontmost connected app. Ignored on Android / Chromium, and on a physical iOS device. */
|
|
185
|
+
bundleId?: string;
|
|
186
|
+
};
|
|
187
|
+
"dismiss-update": {
|
|
188
|
+
/** Number of hours to suppress the update notification */
|
|
189
|
+
hours: number;
|
|
190
|
+
};
|
|
191
|
+
"flow-add-echo": {
|
|
192
|
+
/** Name of the flow being recorded — the one passed to flow-start-recording. */
|
|
193
|
+
name: string;
|
|
194
|
+
/** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to. */
|
|
195
|
+
project_root: string;
|
|
196
|
+
/** Message to echo when the flow is replayed */
|
|
197
|
+
message: string;
|
|
198
|
+
};
|
|
199
|
+
"flow-add-script": {
|
|
200
|
+
/** Flow name passed to flow-start-recording. */
|
|
201
|
+
name: string;
|
|
202
|
+
/** Absolute project root passed to flow-start-recording. */
|
|
203
|
+
project_root: string;
|
|
204
|
+
/** Path to the .mjs file, relative to the flow YAML. For example: "../../scripts/seed-order.mjs". */
|
|
205
|
+
path: string;
|
|
206
|
+
/** Optional time limit in milliseconds. The default is 30000 and the minimum is 100. */
|
|
207
|
+
timeout?: number;
|
|
208
|
+
};
|
|
209
|
+
"flow-add-step": {
|
|
210
|
+
/** Name of the flow being recorded — the one passed to flow-start-recording. */
|
|
211
|
+
name: string;
|
|
212
|
+
/** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to. */
|
|
213
|
+
project_root: string;
|
|
214
|
+
/** MCP tool to execute and record, for example "gesture-tap". Do not pass a flow directive or a recording tool. Call flow-add-script directly for a requested script step. */
|
|
215
|
+
command: string;
|
|
216
|
+
/** Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments. */
|
|
217
|
+
args?: string;
|
|
218
|
+
/** Milliseconds to sleep before executing this step during replay. */
|
|
219
|
+
delayMs?: number;
|
|
220
|
+
};
|
|
221
|
+
"flow-execute": {
|
|
222
|
+
/** Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
|
|
223
|
+
name?: string;
|
|
224
|
+
/** Absolute path to the calling agent's project root — the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the flow, its run: siblings, its script: paths and baselines all resolve beside the YAML instead, so pass the agent's cwd. A script still RUNS in this root whichever source was used. */
|
|
225
|
+
project_root: string;
|
|
226
|
+
/** Path to the flow .yaml as readable by the tool-server. Internal — the argent client derives it from project_root and name automatically; leave unset. */
|
|
227
|
+
flow_file?: string;
|
|
228
|
+
/** Omit when name is set. Absolute path to a co-located flow .yaml on the client and tool server's shared filesystem. This must be supplied through the file-input boundary. For remote execution, pass name + project_root instead. */
|
|
229
|
+
flow_path?: string;
|
|
230
|
+
/** Device id to run against (iOS UDID, Android/Vega serial, Chromium id) — the id list-devices reports. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
|
|
231
|
+
device?: string;
|
|
232
|
+
/** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only — pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: … }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first. */
|
|
233
|
+
platform?: "ios" | "android" | "chromium" | "vega" | "ios-remote";
|
|
234
|
+
/** Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them. */
|
|
235
|
+
updateBaselines?: boolean;
|
|
236
|
+
/** Set to true to confirm the execution prerequisite has been met. Required (LLM path) when a fragment defines an executionPrerequisite. */
|
|
237
|
+
prerequisiteAcknowledged?: boolean;
|
|
238
|
+
};
|
|
239
|
+
"flow-finish-recording": {
|
|
240
|
+
/** Name of the flow being recorded — the one passed to flow-start-recording. */
|
|
241
|
+
name: string;
|
|
242
|
+
/** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish. */
|
|
243
|
+
project_root: string;
|
|
244
|
+
};
|
|
245
|
+
"flow-read-prerequisite": {
|
|
246
|
+
/** Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
|
|
247
|
+
name?: string;
|
|
248
|
+
/** Absolute path to the calling agent's project root — the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd. */
|
|
249
|
+
project_root: string;
|
|
250
|
+
/** Path to the flow .yaml as readable by the tool-server. Internal — the argent client derives it from project_root and name automatically; leave unset. */
|
|
251
|
+
flow_file?: string;
|
|
252
|
+
/** Omit when name is set. Absolute path to a co-located flow .yaml on the client and tool server's shared filesystem. This must be supplied through the file-input boundary. Pass the same flow source here as to flow-execute, so the prerequisite you read belongs to the flow that will run; for remote reads, pass name + project_root instead. */
|
|
253
|
+
flow_path?: string;
|
|
254
|
+
};
|
|
255
|
+
"flow-start-recording": {
|
|
256
|
+
/** Name for this flow (e.g. "settings-explore") — letters, digits, underscore and hyphen only. */
|
|
257
|
+
name: string;
|
|
258
|
+
/** Absolute path to the project root directory (the directory that contains or should contain `.argent/flows/`). The flow file is created at `<project_root>/.argent/flows/<name>.yaml`. */
|
|
259
|
+
project_root: string;
|
|
260
|
+
/** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a self-contained e2e flow, omit this and record a `restart-app` as the first step instead — it is captured as the flow's `launch` step. restart-app has no chromium support, so a chromium flow records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one — a flow that starts with a launch must not declare it. */
|
|
261
|
+
executionPrerequisite?: string;
|
|
262
|
+
};
|
|
263
|
+
fold: {
|
|
264
|
+
/** Target device id from `list-devices` (a foldable iOS simulator UDID). */
|
|
265
|
+
udid: string;
|
|
266
|
+
/** Where to move the hinge: `closed` (0°, the cover panel), `half-open` (120°) or `open` (180°, the inner panel). Exactly one of `posture` and `angle`. */
|
|
267
|
+
posture?: "closed" | "half-open" | "open";
|
|
268
|
+
/** The hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`. */
|
|
269
|
+
angle?: number;
|
|
270
|
+
};
|
|
271
|
+
"gather-workspace-data": {
|
|
272
|
+
/** Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp) */
|
|
273
|
+
workspacePath: string;
|
|
274
|
+
};
|
|
275
|
+
"gesture-custom": {
|
|
276
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
277
|
+
udid: string;
|
|
278
|
+
/** Sequence of touch events; x/y (and optional second touch) are normalized 0.0–1.0, not pixels */
|
|
279
|
+
events: Array<{
|
|
280
|
+
/** Touch event type */
|
|
281
|
+
type: "Down" | "Move" | "Up";
|
|
282
|
+
/** Normalized x 0.0–1.0 (not pixels; same as tap/swipe) */
|
|
283
|
+
x: number;
|
|
284
|
+
/** Normalized y 0.0–1.0 (not pixels; same as tap/swipe) */
|
|
285
|
+
y: number;
|
|
286
|
+
/** Second touch x for two-finger gestures: normalized 0.0–1.0 (not pixels) */
|
|
287
|
+
x2?: number;
|
|
288
|
+
/** Second touch y for two-finger gestures: normalized 0.0–1.0 (not pixels) */
|
|
289
|
+
y2?: number;
|
|
290
|
+
/** Delay before this event in milliseconds (default 16ms ≈ 60fps) */
|
|
291
|
+
delayMs?: number;
|
|
292
|
+
}>;
|
|
293
|
+
/** Number of intermediate Move events to auto-insert between each pair of consecutive events. Smooths out gestures by linearly interpolating both primary (x,y) and secondary (x2,y2) coordinates. The delay is split evenly across interpolated frames. Default: no interpolation. */
|
|
294
|
+
interpolate?: number;
|
|
295
|
+
};
|
|
296
|
+
"gesture-drag": {
|
|
297
|
+
/** Target Chromium device id from `list-devices` (chromium-cdp-<port>). */
|
|
298
|
+
udid: string;
|
|
299
|
+
/** Press x: normalized 0.0–1.0 (fraction of window width, not pixels). */
|
|
300
|
+
fromX: number;
|
|
301
|
+
/** Press y: normalized 0.0–1.0 (fraction of window height, not pixels). */
|
|
302
|
+
fromY: number;
|
|
303
|
+
/** Release x: normalized 0.0–1.0 (not pixels; same space as tap). */
|
|
304
|
+
toX: number;
|
|
305
|
+
/** Release y: normalized 0.0–1.0 (not pixels; same space as tap). */
|
|
306
|
+
toY: number;
|
|
307
|
+
/** Total drag duration in milliseconds (default 300, at most 10000 - the button stays down for exactly this long), interpolated at ~60fps. */
|
|
308
|
+
durationMs?: number;
|
|
309
|
+
/** Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum — use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed. */
|
|
310
|
+
momentum?: boolean;
|
|
311
|
+
};
|
|
312
|
+
"gesture-pinch": {
|
|
313
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
314
|
+
udid: string;
|
|
315
|
+
/** Center of pinch, horizontal: normalized 0.0–1.0 (fraction of screen width, not pixels) */
|
|
316
|
+
centerX: number;
|
|
317
|
+
/** Center of pinch, vertical: normalized 0.0–1.0 (fraction of screen height, not pixels) */
|
|
318
|
+
centerY: number;
|
|
319
|
+
/** Initial distance between the two fingers: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.2 = fingers 20% of screen apart. Use a larger startDistance than endDistance to pinch in (zoom out). */
|
|
320
|
+
startDistance: number;
|
|
321
|
+
/** Final distance between the two fingers: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.6 = fingers 60% of screen apart. Use a larger endDistance than startDistance to pinch out (zoom in). */
|
|
322
|
+
endDistance: number;
|
|
323
|
+
/** Final horizontal center of the pinch: normalized 0.0–1.0. 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. */
|
|
324
|
+
endCenterX?: number;
|
|
325
|
+
/** Final vertical center of the pinch: normalized 0.0–1.0. When set, the centroid drifts linearly from centerY to endCenterY over the gesture. Omit for a fixed center. */
|
|
326
|
+
endCenterY?: number;
|
|
327
|
+
/** Axis angle in degrees along which the fingers are placed (default 0 = horizontal). */
|
|
328
|
+
angle?: number;
|
|
329
|
+
/** Total gesture duration in milliseconds (default 300) */
|
|
330
|
+
durationMs?: number;
|
|
331
|
+
};
|
|
332
|
+
"gesture-rotate": {
|
|
333
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
334
|
+
udid: string;
|
|
335
|
+
/** Center of rotation, horizontal: normalized 0.0–1.0 (fraction of screen width, not pixels) */
|
|
336
|
+
centerX: number;
|
|
337
|
+
/** Center of rotation, vertical: normalized 0.0–1.0 (fraction of screen height, not pixels) */
|
|
338
|
+
centerY: number;
|
|
339
|
+
/** Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse — pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given. */
|
|
340
|
+
radius?: number;
|
|
341
|
+
/** Per-axis finger distance, horizontal: normalized 0.0–1.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX·screenWidth = radiusY·screenHeight for a physically circular orbit — constant finger separation, no pinch coupled into the turn. */
|
|
342
|
+
radiusX?: number;
|
|
343
|
+
/** Per-axis finger distance, vertical: normalized 0.0–1.0 fraction of screen HEIGHT. Always paired with radiusX — see radiusX. */
|
|
344
|
+
radiusY?: number;
|
|
345
|
+
/** Starting angle in degrees (0 = right, 90 = down) */
|
|
346
|
+
startAngle: number;
|
|
347
|
+
/** Ending angle in degrees. endAngle > startAngle = clockwise. */
|
|
348
|
+
endAngle: number;
|
|
349
|
+
/** Total gesture duration in milliseconds (default 300) */
|
|
350
|
+
durationMs?: number;
|
|
351
|
+
};
|
|
352
|
+
"gesture-scroll": {
|
|
353
|
+
/** Target Chromium device id from `list-devices` (chromium-cdp-<port>). */
|
|
354
|
+
udid: string;
|
|
355
|
+
/** Anchor x: normalized 0.0–1.0 (fraction of window width, not pixels). The wheel events land here — put it over the element you want to scroll. */
|
|
356
|
+
x: number;
|
|
357
|
+
/** Anchor y: normalized 0.0–1.0 (fraction of window height, not pixels). */
|
|
358
|
+
y: number;
|
|
359
|
+
/** Horizontal scroll distance as a fraction of the window width (e.g. 0.5 = half a window). Positive scrolls content right (reveals content to the right). */
|
|
360
|
+
deltaX?: number;
|
|
361
|
+
/** Vertical scroll distance as a fraction of the window height (e.g. 0.5 = half a window). Positive scrolls content down (reveals content below), like rolling a mouse wheel toward you. */
|
|
362
|
+
deltaY?: number;
|
|
363
|
+
/** Spread the scroll over this many milliseconds in wheel-event steps (default 300) so scroll handlers fire progressively. */
|
|
364
|
+
durationMs?: number;
|
|
365
|
+
};
|
|
366
|
+
"gesture-swipe": {
|
|
367
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
368
|
+
udid: string;
|
|
369
|
+
/** Start x: normalized 0.0–1.0 (not pixels; same as tap) */
|
|
370
|
+
fromX: number;
|
|
371
|
+
/** Start y: normalized 0.0–1.0 (not pixels; same as tap) */
|
|
372
|
+
fromY: number;
|
|
373
|
+
/** End x: normalized 0.0–1.0 (not pixels; same as tap) */
|
|
374
|
+
toX: number;
|
|
375
|
+
/** End y: normalized 0.0–1.0 (not pixels; same as tap) */
|
|
376
|
+
toY: number;
|
|
377
|
+
/** Total gesture duration in milliseconds (default 300, at most 10000 - the gesture holds a finger down for exactly this long) */
|
|
378
|
+
durationMs?: number;
|
|
379
|
+
/** Whether the swipe releases with momentum; default true (a natural flinging swipe). Pass false for a momentum-free swipe at the default durationMs: the finger decelerates into the end point (ease-out) so the OS reads ~0 release velocity and applies little to no fling. Use false for scroll-to-element loops. momentum: false needs durationMs >= 150 and is rejected below it: a shorter ease-out gives the OS velocity fit too little wall clock to read the deceleration as a stop, and it flings harder than a plain swipe instead (on Android, backwards). At 150 itself the swipe lands short of where the finger stopped, and 2 of 47 runs still flung backwards. */
|
|
380
|
+
momentum?: boolean;
|
|
381
|
+
};
|
|
382
|
+
"gesture-tap": {
|
|
383
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
|
|
384
|
+
udid: string;
|
|
385
|
+
/** Normalized horizontal position 0.0–1.0 (left=0, right=1), not pixels */
|
|
386
|
+
x: number;
|
|
387
|
+
/** Normalized vertical position 0.0–1.0 (top=0, bottom=1), not pixels */
|
|
388
|
+
y: number;
|
|
389
|
+
/** Number of taps/clicks dispatched as ONE multi-tap gesture (2 = double-tap / double-click). The taps land inside the OS double-tap window; on Chromium each click carries an escalating CDP clickCount so dblclick actually fires; on physical iOS 2 is the native double-tap and higher counts land as separate taps. Default 1. */
|
|
390
|
+
clickCount?: number;
|
|
391
|
+
};
|
|
392
|
+
keyboard: {
|
|
393
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id). */
|
|
394
|
+
udid: string;
|
|
395
|
+
/** Text to type character by character. Cannot be combined with `key` in one call — one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Handles uppercase and common punctuation. To type a credential without its plaintext ever entering your context, use a secret placeholder: `{{secret:<NAME>}}` — e.g. text: "{{secret:APP_PASSWORD}}". The value is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project's `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Placeholders can be embedded in longer text and are never echoed back resolved. If the secret you need is not set, the failure lists the available names and every source it looked in — ask the user to add it to one of them (a secrets file applies immediately; an env var needs a restart), NEVER ask the user to paste the secret value into the conversation. */
|
|
396
|
+
text?: string;
|
|
397
|
+
/** Named key to press: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Cannot be combined with `text` in one call: one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Not supported on TV targets; move focus with `tv-remote` (up/down/left/right) instead. Physical iOS: only `enter` and `backspace`. */
|
|
398
|
+
key?: string;
|
|
399
|
+
/** Delay in ms between key presses (default 50). Ignored on Android phones/tablets (typed via `adb input text`, which has no per-key cadence), on Vega (text/keys injected in a single shot), on TV targets (Apple TV / Android TV type the whole string at the daemon's own cadence), and on physical iOS. */
|
|
400
|
+
delayMs?: number;
|
|
401
|
+
};
|
|
402
|
+
"launch-app": {
|
|
403
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
|
|
404
|
+
udid: string;
|
|
405
|
+
/** App identifier. iOS: bundle id (e.g. com.apple.MobileSMS). Android: package name from build.gradle `applicationId` (e.g. com.android.settings). Chromium: any tag matching the same alphabet (letters, digits, '.', '_' and '-'); the call is a no-op since the renderer is already running. */
|
|
406
|
+
bundleId: string;
|
|
407
|
+
/** Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted on Android, the app's default launcher activity is used. Ignored on iOS / Chromium. */
|
|
408
|
+
activity?: string;
|
|
409
|
+
};
|
|
410
|
+
"list-devices": Record<string, never>;
|
|
411
|
+
"native-describe-screen": {
|
|
412
|
+
/** Simulator UDID */
|
|
413
|
+
udid: string;
|
|
414
|
+
/** Bundle ID of the app */
|
|
415
|
+
bundleId: string;
|
|
416
|
+
/** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image-heavy branches) */
|
|
417
|
+
skipClasses?: Array<string>;
|
|
418
|
+
/** Class name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping UIKit bridges. */
|
|
419
|
+
skipClassPrefixes?: Array<string>;
|
|
420
|
+
};
|
|
421
|
+
"native-devtools-status": {
|
|
422
|
+
/** Simulator UDID */
|
|
423
|
+
udid: string;
|
|
424
|
+
/** Bundle ID of the app to check (e.g. com.example.MyApp) */
|
|
425
|
+
bundleId: string;
|
|
426
|
+
};
|
|
427
|
+
"native-find-views": {
|
|
428
|
+
/** Simulator UDID */
|
|
429
|
+
udid: string;
|
|
430
|
+
/** Bundle ID of the app */
|
|
431
|
+
bundleId: string;
|
|
432
|
+
/** UIView class name to match (exact, e.g. UIButton) */
|
|
433
|
+
className?: string;
|
|
434
|
+
/** Accessibility identifier to match (exact) */
|
|
435
|
+
identifier?: string;
|
|
436
|
+
/** Accessibility label to match (exact) */
|
|
437
|
+
label?: string;
|
|
438
|
+
/** UIView tag integer to match */
|
|
439
|
+
tag?: number;
|
|
440
|
+
/** React Native nativeID prop to match (exact) */
|
|
441
|
+
nativeID?: string;
|
|
442
|
+
/** Include ancestor chain for each matched view (default true) */
|
|
443
|
+
includeAncestors?: boolean;
|
|
444
|
+
/** Include child views for each matched view (default true) */
|
|
445
|
+
includeChildren?: boolean;
|
|
446
|
+
/** View fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName */
|
|
447
|
+
fields?: Array<string>;
|
|
448
|
+
};
|
|
449
|
+
"native-full-hierarchy": {
|
|
450
|
+
/** Simulator UDID */
|
|
451
|
+
udid: string;
|
|
452
|
+
/** Bundle ID of the app */
|
|
453
|
+
bundleId: string;
|
|
454
|
+
/** View fields to include. Use EXACT names: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth, pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName. Defaults to all of the first group when omitted. */
|
|
455
|
+
fields?: Array<string>;
|
|
456
|
+
/** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
|
|
457
|
+
skipClasses?: Array<string>;
|
|
458
|
+
/** 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. */
|
|
459
|
+
skipClassPrefixes?: Array<string>;
|
|
460
|
+
/** Maximum recursion depth (default 8). Increase for deeper inspection, decrease to reduce output size. */
|
|
461
|
+
maxDepth?: number;
|
|
462
|
+
};
|
|
463
|
+
"native-network-logs": {
|
|
464
|
+
/** Simulator UDID */
|
|
465
|
+
udid: string;
|
|
466
|
+
/** Bundle ID of the app */
|
|
467
|
+
bundleId: string;
|
|
468
|
+
/** Maximum number of events to return (most recent first) */
|
|
469
|
+
limit?: number;
|
|
470
|
+
/** Clear the log after reading */
|
|
471
|
+
clear?: boolean;
|
|
472
|
+
};
|
|
473
|
+
"native-profiler-analyze": {
|
|
474
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
475
|
+
device_id: string;
|
|
476
|
+
};
|
|
477
|
+
"native-profiler-start": {
|
|
478
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
479
|
+
device_id: string;
|
|
480
|
+
/** iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the currently running foreground app. Only provide this if auto-detection picks the wrong app. */
|
|
481
|
+
app_process?: string;
|
|
482
|
+
/** iOS-only: path to an Instruments .tracetemplate file (defaults to bundled Argent template). Ignored on Android. */
|
|
483
|
+
template_path?: string;
|
|
484
|
+
/** iOS-only. When true, cold-launches the app under the profiler with Malloc Stack Logging enabled so memory leaks carry an allocation backtrace (responsible frame + library). Without it, leaks are still detected but unattributable — Instruments reports '<Call stack limit reached>'. Trade-offs: this RESTARTS the app (current state is lost), adds memory/CPU overhead, and makes the app noticeably slow to launch (every startup allocation records a backtrace), so leave it off for pure CPU/hang profiling. Requires a non-degraded Xcode: on Xcode 26.4 and later the cold-launch path is broken, so the call is rejected up front (re-run without the flag, or set ARGENT_IOS_CAPTURE=device to override if the device path works on your host). ARGENT_IOS_CAPTURE=all-processes — e.g. exported globally for the normal capture path — also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android. */
|
|
485
|
+
malloc_stack_logging?: boolean;
|
|
486
|
+
};
|
|
487
|
+
"native-profiler-stop": {
|
|
488
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
489
|
+
device_id: string;
|
|
490
|
+
};
|
|
491
|
+
"native-user-interactable-view-at-point": {
|
|
492
|
+
/** Simulator UDID */
|
|
493
|
+
udid: string;
|
|
494
|
+
/** Bundle ID of the app */
|
|
495
|
+
bundleId: string;
|
|
496
|
+
/** Raw X coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
|
|
497
|
+
x: number;
|
|
498
|
+
/** Raw Y coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
|
|
499
|
+
y: number;
|
|
500
|
+
/** Include ancestor chain for the matched view (default true) */
|
|
501
|
+
includeAncestors?: boolean;
|
|
502
|
+
/** Include child views for the matched view (default false) */
|
|
503
|
+
includeChildren?: boolean;
|
|
504
|
+
/** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor */
|
|
505
|
+
fields?: Array<string>;
|
|
506
|
+
/** Exact UIView class names whose entire subtree should be pruned */
|
|
507
|
+
skipClasses?: Array<string>;
|
|
508
|
+
/** Class name prefixes to prune entire subtrees */
|
|
509
|
+
skipClassPrefixes?: Array<string>;
|
|
510
|
+
/** Maximum depth for returned child/ancestor serialization (default 150) */
|
|
511
|
+
maxDepth?: number;
|
|
512
|
+
};
|
|
513
|
+
"native-view-at-point": {
|
|
514
|
+
/** Simulator UDID */
|
|
515
|
+
udid: string;
|
|
516
|
+
/** Bundle ID of the app */
|
|
517
|
+
bundleId: string;
|
|
518
|
+
/** Raw X coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
|
|
519
|
+
x: number;
|
|
520
|
+
/** Raw Y coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
|
|
521
|
+
y: number;
|
|
522
|
+
/** Include ancestor chain for the matched view (default true) */
|
|
523
|
+
includeAncestors?: boolean;
|
|
524
|
+
/** Include child views for the matched view (default false) */
|
|
525
|
+
includeChildren?: boolean;
|
|
526
|
+
/** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor */
|
|
527
|
+
fields?: Array<string>;
|
|
528
|
+
/** Exact UIView class names whose entire subtree should be pruned */
|
|
529
|
+
skipClasses?: Array<string>;
|
|
530
|
+
/** Class name prefixes to prune entire subtrees */
|
|
531
|
+
skipClassPrefixes?: Array<string>;
|
|
532
|
+
/** Maximum depth for returned child/ancestor serialization (default 150) */
|
|
533
|
+
maxDepth?: number;
|
|
534
|
+
};
|
|
535
|
+
"open-url": {
|
|
536
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
|
|
537
|
+
udid: string;
|
|
538
|
+
/** URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0). For Chromium this navigates the renderer. */
|
|
539
|
+
url: string;
|
|
540
|
+
/** Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. Ignored elsewhere. */
|
|
541
|
+
bundleId?: string;
|
|
542
|
+
};
|
|
543
|
+
paste: {
|
|
544
|
+
/** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
|
|
545
|
+
udid: string;
|
|
546
|
+
/** Text to put on the device clipboard and paste into the focused field. Supports `{{secret:<NAME>}}` placeholders, resolved on the tool-server from the `ARGENT_SECRET_<NAME>` environment variable or an argent secrets file — the same sources as `keyboard` — so a credential never enters your context. If the secret is not set, the failure lists the available names and every source it looked in; ask the user to add it there, NEVER ask for the value in the conversation. */
|
|
547
|
+
text: string;
|
|
548
|
+
};
|
|
549
|
+
"profiler-combined-report": {
|
|
550
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
551
|
+
port?: number;
|
|
552
|
+
/** iOS Simulator/device UDID or Android serial */
|
|
553
|
+
device_id: string;
|
|
554
|
+
};
|
|
555
|
+
"profiler-commit-query": {
|
|
556
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
557
|
+
port?: number;
|
|
558
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
559
|
+
device_id: string;
|
|
560
|
+
/** Query mode: by_component (commits for a component), by_time_range (commits in a window), by_index (full detail for one commit), cascade_tree (parent-child cascade for a commit) */
|
|
561
|
+
mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree";
|
|
562
|
+
/** Component name for by_component mode */
|
|
563
|
+
component_name?: string;
|
|
564
|
+
/** Time range filter for by_time_range mode */
|
|
565
|
+
time_range_ms?: {
|
|
566
|
+
/** Start of range in ms since profiling started — the same clock profiler-commit-query prints */
|
|
567
|
+
start: number;
|
|
568
|
+
/** End of range in ms since profiling started — the same clock profiler-commit-query prints */
|
|
569
|
+
end: number;
|
|
570
|
+
};
|
|
571
|
+
/** Commit index for by_index and cascade_tree modes */
|
|
572
|
+
commit_index?: number;
|
|
573
|
+
/** Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components — a small cap there can show less than the analyze report it is meant to expand on. */
|
|
574
|
+
top_n?: number;
|
|
575
|
+
};
|
|
576
|
+
"profiler-cpu-query": {
|
|
577
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
578
|
+
port?: number;
|
|
579
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
580
|
+
device_id: string;
|
|
581
|
+
/** Query mode: top_functions (global hotspots), time_window (CPU in a time range), call_tree (callers/callees of a function), component_cpu (CPU during a component's commits) */
|
|
582
|
+
mode: "top_functions" | "time_window" | "call_tree" | "component_cpu";
|
|
583
|
+
/** Time window filter for time_window mode (ms since profiling started — the same clock profiler-commit-query prints) */
|
|
584
|
+
time_window_ms?: {
|
|
585
|
+
/** Start of window in ms since profiling started — the same clock profiler-commit-query prints */
|
|
586
|
+
start: number;
|
|
587
|
+
/** End of window in ms since profiling started — the same clock profiler-commit-query prints */
|
|
588
|
+
end: number;
|
|
589
|
+
};
|
|
590
|
+
/** Component name for component_cpu mode */
|
|
591
|
+
component_name?: string;
|
|
592
|
+
/** Function name for call_tree mode */
|
|
593
|
+
function_name?: string;
|
|
594
|
+
/** Number of results to return (default 15) */
|
|
595
|
+
top_n?: number;
|
|
596
|
+
/** For call_tree mode: also show callers of the function */
|
|
597
|
+
include_callers?: boolean;
|
|
598
|
+
};
|
|
599
|
+
"profiler-load": {
|
|
600
|
+
/** list: show available sessions on disk. load_react: load a React profiler session into memory for query tools. load_native: re-parse native profiler XML files (xctrace on iOS) into memory for query tools. */
|
|
601
|
+
mode: "list" | "load_react" | "load_native";
|
|
602
|
+
/** Timestamp-based session identifier (e.g. '20250313-143022') from the list output. Required for load_react and load_native modes. */
|
|
603
|
+
session_id?: string;
|
|
604
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
605
|
+
port?: number;
|
|
606
|
+
/** Target device id from `list-devices`. Used to cache the loaded React session under the correct port+device key, and required to resolve the native profiler session for load_native. */
|
|
607
|
+
device_id: string;
|
|
608
|
+
/** Android package name to use when restoring older load_native .pftrace sessions that do not have a metadata sidecar. */
|
|
609
|
+
app_process?: string;
|
|
610
|
+
};
|
|
611
|
+
"profiler-stack-query": {
|
|
612
|
+
/** iOS Simulator UDID or Android serial. */
|
|
613
|
+
device_id: string;
|
|
614
|
+
/** Query mode: hang_stacks (full CPU context during a hang), function_callers (who calls a native function), thread_breakdown (CPU split by thread), leak_stacks (leak details by object type) */
|
|
615
|
+
mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
|
|
616
|
+
/** 0-based index into the hang list for hang_stacks mode */
|
|
617
|
+
hang_index?: number;
|
|
618
|
+
/** Function name for function_callers mode */
|
|
619
|
+
function_name?: string;
|
|
620
|
+
/** 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. */
|
|
621
|
+
thread?: string;
|
|
622
|
+
/** Object type filter for leak_stacks mode */
|
|
623
|
+
object_type?: string;
|
|
624
|
+
/** Max results to return (default 15) */
|
|
625
|
+
top_n?: number;
|
|
626
|
+
};
|
|
627
|
+
propose_variant: {
|
|
628
|
+
/** Human name of the on-screen element this variant targets, e.g. "Foo button" or "profile header". Repeated calls with the same element accumulate multiple variants on it. Used as the default screen matcher when `match` is omitted. */
|
|
629
|
+
element: string;
|
|
630
|
+
/** Device id (iOS udid / Android serial) the variants were captured on. The preview window streams THIS device directly — pass the same udid you screenshotted/described with, so the human never has to pick a simulator. Set it on the first propose_variant of a round; later calls may omit it (the last non-empty value wins). */
|
|
631
|
+
udid?: string;
|
|
632
|
+
/** Optional precise matcher so the floating variant bubble anchors to the right element on the streamed screen. Defaults to { by: 'text', value: element }. Get exact labels/identifiers from the `describe` tool first for reliable anchoring. */
|
|
633
|
+
match?: {
|
|
634
|
+
/** How the preview window locates the live element in the running app's accessibility tree: `text` (fuzzy contains on label/value/identifier), `label` (exact a11y label), `identifier` (exact testID / accessibilityIdentifier / resource-id), `role` (e.g. Button). */
|
|
635
|
+
by: "text" | "label" | "identifier" | "role";
|
|
636
|
+
/** Value to match against, per `by`. */
|
|
637
|
+
value: string;
|
|
638
|
+
};
|
|
639
|
+
/** The variant being proposed for `element`. */
|
|
640
|
+
variant: {
|
|
641
|
+
/** Short variant name shown on the chip, e.g. "Bold CTA". */
|
|
642
|
+
name: string;
|
|
643
|
+
/** One- or two-sentence description of what this variant changes and why. */
|
|
644
|
+
summary: string;
|
|
645
|
+
/** Optional inline code/JSX for the variant, shown when the chip is expanded. */
|
|
646
|
+
code?: string;
|
|
647
|
+
/** Optional path to a file containing the variant implementation. */
|
|
648
|
+
filePath?: string;
|
|
649
|
+
/** Required preview of how the variant looks, shown on the floating card. An http(s) URL, a data: URI, or a local image file path (e.g. a screenshot path returned by the screenshot tool after you rendered the variant). */
|
|
650
|
+
previewImage: string;
|
|
651
|
+
/** Normalized [0..1] bounds (fractions of screen width/height) of the target element AS IT APPEARS IN THIS VARIANT — read the matched node's `frame` from `describe` AFTER applying this variant. The preview window crops the screenshot to these bounds, so each variant shows its own re-laid-out element instead of every variant sharing one stale frame. The element moves/resizes between variants, so capture it per variant. Omit if unknown. */
|
|
652
|
+
frame?: {
|
|
653
|
+
x: number;
|
|
654
|
+
y: number;
|
|
655
|
+
width: number;
|
|
656
|
+
height: number;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
"react-profiler-analyze": {
|
|
661
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
662
|
+
port?: number;
|
|
663
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
664
|
+
device_id: string;
|
|
665
|
+
/** Absolute path to the RN project root for session context detection */
|
|
666
|
+
project_root: string;
|
|
667
|
+
/** Target platform */
|
|
668
|
+
platform?: "ios" | "android";
|
|
669
|
+
/** React Native version (e.g. "0.73.4") */
|
|
670
|
+
rn_version?: string;
|
|
671
|
+
/** Optional list of user actions with their time offset from profiling start. Compute offsetMs = tapTimestampMs - startedAtEpochMs, where tapTimestampMs comes from the tap/swipe tool return value and startedAtEpochMs comes from react-profiler-start return value. */
|
|
672
|
+
annotations?: Array<{
|
|
673
|
+
/** Milliseconds since profiling started. Compute as: tapTimestampMs - startedAtEpochMs, using the timestampMs returned by tap/swipe and the startedAtEpochMs returned by react-profiler-start. */
|
|
674
|
+
offsetMs: number;
|
|
675
|
+
/** Description of the action performed */
|
|
676
|
+
label: string;
|
|
677
|
+
}>;
|
|
678
|
+
};
|
|
679
|
+
"react-profiler-component-source": {
|
|
680
|
+
/** Name of the React component to look up */
|
|
681
|
+
component_name: string;
|
|
682
|
+
/** Absolute path to the RN project root */
|
|
683
|
+
project_root: string;
|
|
684
|
+
};
|
|
685
|
+
"react-profiler-cpu-summary": {
|
|
686
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
687
|
+
port?: number;
|
|
688
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
689
|
+
device_id: string;
|
|
690
|
+
/** Number of top hotspot functions to return (default 20) */
|
|
691
|
+
top_n?: number;
|
|
692
|
+
/** If true, only show React component functions (PascalCase names) */
|
|
693
|
+
react_only?: boolean;
|
|
694
|
+
};
|
|
695
|
+
"react-profiler-fiber-tree": {
|
|
696
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
697
|
+
port?: number;
|
|
698
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
699
|
+
device_id: string;
|
|
700
|
+
/** Maximum tree depth to traverse (default 10) */
|
|
701
|
+
max_depth?: number;
|
|
702
|
+
/** Regex string to filter component names */
|
|
703
|
+
filter?: string;
|
|
704
|
+
};
|
|
705
|
+
"react-profiler-renders": {
|
|
706
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
707
|
+
port?: number;
|
|
708
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
709
|
+
device_id: string;
|
|
710
|
+
/** Number of top re-rendering components to return (default 20) */
|
|
711
|
+
top_n?: number;
|
|
712
|
+
};
|
|
713
|
+
"react-profiler-start": {
|
|
714
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
715
|
+
port?: number;
|
|
716
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
717
|
+
device_id: string;
|
|
718
|
+
/** CPU sampling interval in microseconds (default 100) */
|
|
719
|
+
sample_interval_us?: number;
|
|
720
|
+
/** 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. */
|
|
721
|
+
force?: boolean;
|
|
722
|
+
};
|
|
723
|
+
"react-profiler-status": {
|
|
724
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
725
|
+
port?: number;
|
|
726
|
+
/** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
|
|
727
|
+
device_id: string;
|
|
728
|
+
};
|
|
729
|
+
"react-profiler-stop": {
|
|
730
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
731
|
+
port?: number;
|
|
732
|
+
/** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
|
|
733
|
+
device_id: string;
|
|
734
|
+
};
|
|
735
|
+
"reinstall-app": {
|
|
736
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
737
|
+
udid: string;
|
|
738
|
+
/** App identifier that matches the bundle at `appPath`. iOS: bundle id (used to uninstall first). Android: package name (used to uninstall first; the install itself identifies the app from the APK). Vega: interactive component app id (e.g. com.example.app.main), used to uninstall first. */
|
|
739
|
+
bundleId: string;
|
|
740
|
+
/** Path to the app bundle. iOS: `.app` directory (e.g. ./build/.../MyApp.app). Android: `.apk` file (e.g. android/app/build/outputs/apk/debug/app-debug.apk). Vega: `.vpkg` file. Relative paths are resolved from the current working directory. */
|
|
741
|
+
appPath: string;
|
|
742
|
+
};
|
|
743
|
+
"restart-app": {
|
|
744
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
745
|
+
udid: string;
|
|
746
|
+
/** App identifier. iOS: bundle id. Android: package name. */
|
|
747
|
+
bundleId: string;
|
|
748
|
+
/** Android-only: relaunch a non-launcher Activity (e.g. `.SettingsActivity` or `com.example/com.example.SettingsActivity`). If omitted, the app's default launcher activity is used. Ignored on iOS. */
|
|
749
|
+
activity?: string;
|
|
750
|
+
};
|
|
751
|
+
rotate: {
|
|
752
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
753
|
+
udid: string;
|
|
754
|
+
/** Target orientation */
|
|
755
|
+
orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
756
|
+
};
|
|
757
|
+
"run-sequence": {
|
|
758
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id) — shared across all steps. */
|
|
759
|
+
udid: string;
|
|
760
|
+
/** Ordered list of interaction steps to execute sequentially */
|
|
761
|
+
steps: Array<{
|
|
762
|
+
/** Tool name — one of: gesture-tap, gesture-swipe, gesture-scroll, gesture-drag, gesture-custom, gesture-pinch, gesture-rotate, button, keyboard, paste, rotate, shake, fold, tv-remote, await-ui-element. On a TV target (Apple TV / Android TV / Vega) use tv-remote (remote presses) and keyboard (text). */
|
|
763
|
+
tool: string;
|
|
764
|
+
/** Tool arguments (excluding udid, which is injected automatically) */
|
|
765
|
+
args: {
|
|
766
|
+
[key: string]: unknown;
|
|
767
|
+
};
|
|
768
|
+
/** Wait time in ms after this step before the next (default 100) */
|
|
769
|
+
delayMs?: number;
|
|
770
|
+
}>;
|
|
771
|
+
};
|
|
772
|
+
"screen-recording-start": {
|
|
773
|
+
/** Target device id from `list-devices` (iOS Simulator UDID or Android serial). */
|
|
774
|
+
udid: string;
|
|
775
|
+
/** Auto-stop cap in seconds (default 180, max 600). Set it to slightly more than the interaction you plan to capture. */
|
|
776
|
+
timeLimitSeconds?: number;
|
|
777
|
+
/** 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. The returned durationMs is the trimmed length; wallClockMs/trimmedMs report what was removed. Set false to keep a faithful real-time recording. */
|
|
778
|
+
trimStatic?: boolean;
|
|
779
|
+
/** Default true. Draw simulator-server's touch visualizer into the recording: a pulse marks each tap, a comet trail follows swipes and drags, and paired markers show two-finger pinch/rotate, so the video makes clear where every interaction landed. Set false to record the raw screen with no overlay. */
|
|
780
|
+
showTouches?: boolean;
|
|
781
|
+
};
|
|
782
|
+
"screen-recording-stop": {
|
|
783
|
+
/** Target device id from `list-devices` (iOS Simulator UDID or Android serial). */
|
|
784
|
+
udid: string;
|
|
785
|
+
};
|
|
786
|
+
screenshot: {
|
|
787
|
+
/** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, or Chromium id). */
|
|
788
|
+
udid: string;
|
|
789
|
+
/** Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation. Ignored on physical iPhones. */
|
|
790
|
+
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
791
|
+
/** Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. */
|
|
792
|
+
scale?: number;
|
|
793
|
+
/** Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff — the file is still written, but the image bytes are not attached to the agent context. */
|
|
794
|
+
includeImageInContext?: boolean;
|
|
795
|
+
/** Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum. Ignored on physical iPhones. */
|
|
796
|
+
downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
|
|
797
|
+
};
|
|
798
|
+
"screenshot-diff": {
|
|
799
|
+
/** Path to the baseline PNG file. Required unless captureBaseline is true. */
|
|
800
|
+
baselinePath?: string;
|
|
801
|
+
/** Path to the current PNG file. Required unless captureCurrent is true. */
|
|
802
|
+
currentPath?: string;
|
|
803
|
+
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
804
|
+
udid: string;
|
|
805
|
+
/** Capture the baseline screenshot live at full resolution before diffing. Cannot be combined with captureCurrent. */
|
|
806
|
+
captureBaseline?: boolean;
|
|
807
|
+
/** Capture the current screenshot live at full resolution before diffing. Cannot be combined with captureBaseline. */
|
|
808
|
+
captureCurrent?: boolean;
|
|
809
|
+
/** Orientation override for live baseline/current captures. Ignored on physical iPhones. */
|
|
810
|
+
rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
|
|
811
|
+
/** Directory where diff artifacts should be written. Optional — defaults to a temp directory; the diff images are returned in the result either way. */
|
|
812
|
+
outputDir?: string;
|
|
813
|
+
};
|
|
814
|
+
"settings-permissions": {
|
|
815
|
+
/** Target device id from `list-devices` (iOS simulator UDID or Android serial). */
|
|
816
|
+
udid: string;
|
|
817
|
+
/** `grant` pre-authorizes the permission, `deny` refuses it, `reset` returns it to the not-yet-asked state so the app prompts on next use. */
|
|
818
|
+
action: "grant" | "deny" | "reset";
|
|
819
|
+
/** The permission to change. `notifications` is Android-only (iOS has no simctl service for it); `reminders` is iOS-only; `camera` works on Android and on iOS only when the target simulator's runtime models the service (varies by simruntime, not by the installed Xcode). */
|
|
820
|
+
permission: "camera" | "microphone" | "photos" | "contacts" | "notifications" | "calendar" | "location" | "location-always" | "media-library" | "motion" | "reminders";
|
|
821
|
+
/** App to change the permission for — required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app. */
|
|
822
|
+
bundleId: string;
|
|
823
|
+
};
|
|
824
|
+
shake: {
|
|
825
|
+
/** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
|
|
826
|
+
udid: string;
|
|
827
|
+
/** How many shake gestures to deliver back-to-back (default 1, max 10). Raise it for apps whose shake detector needs sustained motion before it fires. */
|
|
828
|
+
count?: number;
|
|
829
|
+
};
|
|
830
|
+
"stop-all-simulator-servers": {
|
|
831
|
+
/** Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to — pass the devices THIS session actually used. Omit only for a deliberate machine-wide cleanup: one tool-server serves every agent using this argent install, so an unscoped stop also kills devices another agent is mid-session on. */
|
|
832
|
+
devices?: Array<string>;
|
|
833
|
+
};
|
|
834
|
+
"stop-metro": {
|
|
835
|
+
/** TCP port Metro is listening on (default 8081) */
|
|
836
|
+
port?: number;
|
|
837
|
+
};
|
|
838
|
+
"stop-simulator-server": {
|
|
839
|
+
/** Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop */
|
|
840
|
+
udid: string;
|
|
841
|
+
};
|
|
842
|
+
"tv-remote": {
|
|
843
|
+
/** Target TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
|
|
844
|
+
udid: string;
|
|
845
|
+
/** A single TV-remote button, or a path of them run in one call. Buttons: up/down/left/right (D-pad), select (OK), back, home, menu, playPause, rewind, fastForward, next, previous, volumeUp, volumeDown, mute. The media-transport and volume keys work on Android TV and Vega; on the Apple TV simulator they are rejected (its HID stack ignores them) — the D-pad/select/back/menu/home/playPause core works on all three. For multi-step navigation pass an array, e.g. ["up","right","right","select"] — strongly prefer this over multiple `tv-remote` calls: the whole path runs in a single call. */
|
|
846
|
+
button?: "up" | "down" | "left" | "right" | "select" | "back" | "home" | "menu" | "playPause" | "rewind" | "fastForward" | "next" | "previous" | "volumeUp" | "volumeDown" | "mute" | Array<"up" | "down" | "left" | "right" | "select" | "back" | "home" | "menu" | "playPause" | "rewind" | "fastForward" | "next" | "previous" | "volumeUp" | "volumeDown" | "mute">;
|
|
847
|
+
/** Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }. */
|
|
848
|
+
repeat?: number;
|
|
849
|
+
};
|
|
850
|
+
"update-argent": {
|
|
851
|
+
/** Which install to update. 'auto' (default) updates the install serving this session — the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated. */
|
|
852
|
+
target?: "auto" | "global" | "local" | "both";
|
|
853
|
+
};
|
|
854
|
+
"view-network-logs": {
|
|
855
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
856
|
+
port?: number;
|
|
857
|
+
/** Device id from list-devices (iOS simulator UDID or Android serial) — the same id used with debugger-connect. */
|
|
858
|
+
device_id: string;
|
|
859
|
+
/** Page index (0-based) or "latest" for the most recent page. Each page contains up to 50 entries. */
|
|
860
|
+
pageIndex?: number | "latest";
|
|
861
|
+
};
|
|
862
|
+
"view-network-request-details": {
|
|
863
|
+
/** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
|
|
864
|
+
port?: number;
|
|
865
|
+
/** Device id from list-devices (iOS simulator UDID or Android serial) — the same id used with debugger-connect. */
|
|
866
|
+
device_id: string;
|
|
867
|
+
/** The requestId from view-network-logs to get full details for */
|
|
868
|
+
requestId: string;
|
|
869
|
+
/** Whether to include the response body (if captured). Defaults to true. */
|
|
870
|
+
includeBody?: boolean;
|
|
871
|
+
};
|
|
872
|
+
}
|
package/dist/tool-server.cjs
CHANGED
|
@@ -94814,7 +94814,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
94814
94814
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
94815
94815
|
function readCliVersion() {
|
|
94816
94816
|
if (true) {
|
|
94817
|
-
return "0.27.1-next.
|
|
94817
|
+
return "0.27.1-next.2";
|
|
94818
94818
|
}
|
|
94819
94819
|
return "0.0.0";
|
|
94820
94820
|
}
|
|
@@ -115596,6 +115596,7 @@ function createHttpApp(registry2, options) {
|
|
|
115596
115596
|
if (def.alwaysLoad) entry.alwaysLoad = true;
|
|
115597
115597
|
if (def.searchHint) entry.searchHint = def.searchHint;
|
|
115598
115598
|
if (def.longRunning) entry.longRunning = true;
|
|
115599
|
+
if (def.hideFromMcp) entry.hideFromMcp = true;
|
|
115599
115600
|
return entry;
|
|
115600
115601
|
});
|
|
115601
115602
|
res.json({ tools });
|
|
@@ -158522,11 +158523,13 @@ function createRegistry() {
|
|
|
158522
158523
|
registry2.registerTool(updateArgentTool);
|
|
158523
158524
|
registry2.registerTool(dismissUpdateTool);
|
|
158524
158525
|
if (process.platform === "darwin") {
|
|
158525
|
-
registry2.registerTool(
|
|
158526
|
-
registry2.registerTool(awaitUserSelectionTool);
|
|
158526
|
+
for (const tool of createLensTools(registry2)) registry2.registerTool(tool);
|
|
158527
158527
|
}
|
|
158528
158528
|
return registry2;
|
|
158529
158529
|
}
|
|
158530
|
+
function createLensTools(registry2) {
|
|
158531
|
+
return [createProposeVariantTool(registry2), awaitUserSelectionTool];
|
|
158532
|
+
}
|
|
158530
158533
|
|
|
158531
158534
|
// ../tool-server/src/utils/probe-argent-tool-server.ts
|
|
158532
158535
|
var http5 = __toESM(require("node:http"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.27.1-next.
|
|
3
|
+
"version": "0.27.1-next.2",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator and Android Emulator control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "npm run build:dispatcher && npm run build:bundles && npm run sync-readme",
|
|
43
|
-
"build:dispatcher": "rm -rf dist tsconfig.tsbuildinfo && tsc",
|
|
43
|
+
"build:dispatcher": "npm run build:tool-args && rm -rf dist tsconfig.tsbuildinfo && tsc",
|
|
44
|
+
"build:tool-args": "tsc --build ../tool-server && node ../tool-server/dist/sdk-tool-args.js src/tool-args.generated.ts",
|
|
44
45
|
"build:bundles": "node scripts/bundle-tools.cjs",
|
|
45
46
|
"sync-readme": "node scripts/sync-readme.cjs",
|
|
46
47
|
"prepack": "node scripts/sync-readme.cjs",
|