@swmansion/argent 0.35.1-next.83 → 0.35.1-next.85
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 +390 -43
- package/dist/client.js +8 -1
- package/dist/installer.mjs +4 -1
- package/dist/mcp-server.mjs +214 -187
- package/dist/tool-server.cjs +101 -22
- package/package.json +2 -2
- package/skills/argent-device-interact/SKILL.md +1 -1
package/dist/tool-server.cjs
CHANGED
|
@@ -73410,7 +73410,7 @@ function isCi(env = process.env) {
|
|
|
73410
73410
|
var SESSION_ID = (0, import_node_crypto4.randomUUID)();
|
|
73411
73411
|
function readCliVersion() {
|
|
73412
73412
|
if (true) {
|
|
73413
|
-
return "0.35.1-next.
|
|
73413
|
+
return "0.35.1-next.84";
|
|
73414
73414
|
}
|
|
73415
73415
|
return "0.0.0";
|
|
73416
73416
|
}
|
|
@@ -101018,6 +101018,7 @@ function nativeTreeToUi(node2, orientation) {
|
|
|
101018
101018
|
return {
|
|
101019
101019
|
...node2,
|
|
101020
101020
|
frame: nativeFrameToUi(node2.frame, orientation),
|
|
101021
|
+
...node2.tapPoint ? { tapPoint: nativePointToUi(node2.tapPoint, orientation) } : {},
|
|
101021
101022
|
children: node2.children.map((child) => nativeTreeToUi(child, orientation))
|
|
101022
101023
|
};
|
|
101023
101024
|
}
|
|
@@ -109525,6 +109526,7 @@ var describeNodeSchema = external_exports.lazy(
|
|
|
109525
109526
|
() => external_exports.object({
|
|
109526
109527
|
role: external_exports.string().min(1),
|
|
109527
109528
|
frame: describeFrameSchema,
|
|
109529
|
+
tapPoint: describePointSchema.optional(),
|
|
109528
109530
|
children: external_exports.array(describeNodeSchema),
|
|
109529
109531
|
label: external_exports.string().optional(),
|
|
109530
109532
|
hint: external_exports.string().optional(),
|
|
@@ -110023,8 +110025,8 @@ var axServiceBlueprint = {
|
|
|
110023
110025
|
treeVersion: result.treeVersion
|
|
110024
110026
|
};
|
|
110025
110027
|
},
|
|
110026
|
-
async foregroundApp() {
|
|
110027
|
-
return await query("foreground_app");
|
|
110028
|
+
async foregroundApp(timeoutMs) {
|
|
110029
|
+
return await query("foreground_app", timeoutMs);
|
|
110028
110030
|
},
|
|
110029
110031
|
async orientation() {
|
|
110030
110032
|
if (!lacksOrientationCommand) {
|
|
@@ -110347,7 +110349,42 @@ function clamp012(value) {
|
|
|
110347
110349
|
function roundNormalized2(value) {
|
|
110348
110350
|
return Math.round(value * 1e12) / 1e12;
|
|
110349
110351
|
}
|
|
110350
|
-
|
|
110352
|
+
var SWITCH_WIDTH_PT = 63;
|
|
110353
|
+
var FLUSH_PT = 2;
|
|
110354
|
+
function containsFrame(outer, inner) {
|
|
110355
|
+
const eps = 1e-6;
|
|
110356
|
+
return inner.x >= outer.x - eps && inner.y >= outer.y - eps && inner.x + inner.width <= outer.x + outer.width + eps && inner.y + inner.height <= outer.y + outer.height + eps;
|
|
110357
|
+
}
|
|
110358
|
+
function onScreen(f) {
|
|
110359
|
+
return f.x >= 0 && f.y >= 0 && f.x + f.width <= 1 && f.y + f.height <= 1;
|
|
110360
|
+
}
|
|
110361
|
+
function switchRowTapPoint(el, elements, response) {
|
|
110362
|
+
const screen = response.screenFrame;
|
|
110363
|
+
const frame2 = el.frame;
|
|
110364
|
+
if (!screen || screen.width <= 0 || screen.height <= 0 || !frame2 || !el.label) return void 0;
|
|
110365
|
+
if (!el.traits?.includes("toggleButton") || el.value !== "0" && el.value !== "1") {
|
|
110366
|
+
return void 0;
|
|
110367
|
+
}
|
|
110368
|
+
if (!onScreen(frame2)) return void 0;
|
|
110369
|
+
const inside = elements.filter((o) => o !== el && o.frame && containsFrame(frame2, o.frame));
|
|
110370
|
+
const label = inside[0];
|
|
110371
|
+
if (inside.length !== 1 || label?.label?.trim() !== el.label.trim()) return void 0;
|
|
110372
|
+
const orientation = response.interfaceOrientation;
|
|
110373
|
+
const row = nativeFrameToUi(frame2, orientation);
|
|
110374
|
+
const text = nativeFrameToUi(label.frame, orientation);
|
|
110375
|
+
const pt = 1 / uiScreenSize(screen, orientation).width;
|
|
110376
|
+
const switchWidth = SWITCH_WIDTH_PT * pt;
|
|
110377
|
+
if (row.width <= switchWidth) return void 0;
|
|
110378
|
+
const flushLeading = Math.abs(text.x - row.x) <= FLUSH_PT * pt;
|
|
110379
|
+
const flushTrailing = Math.abs(text.x + text.width - (row.x + row.width)) <= FLUSH_PT * pt;
|
|
110380
|
+
if (flushLeading === flushTrailing) return void 0;
|
|
110381
|
+
const free = flushLeading ? row.x + row.width - (text.x + text.width) : text.x - row.x;
|
|
110382
|
+
if (free < switchWidth) return void 0;
|
|
110383
|
+
const x = flushLeading ? row.x + row.width - switchWidth / 2 : row.x + switchWidth / 2;
|
|
110384
|
+
const p = uiPointToNative({ x, y: row.y + row.height / 2 }, orientation);
|
|
110385
|
+
return { x: roundNormalized2(p.x), y: roundNormalized2(p.y) };
|
|
110386
|
+
}
|
|
110387
|
+
function adaptAXElement(el, response) {
|
|
110351
110388
|
if (!el.frame) return null;
|
|
110352
110389
|
const x1 = clamp012(el.frame.x);
|
|
110353
110390
|
const y1 = clamp012(el.frame.y);
|
|
@@ -110357,6 +110394,7 @@ function adaptAXElement(el) {
|
|
|
110357
110394
|
const height = y2 - y1;
|
|
110358
110395
|
if (width <= 0 || height <= 0) return null;
|
|
110359
110396
|
const traits = el.traits ?? [];
|
|
110397
|
+
const tapPoint = response && switchRowTapPoint(el, response.elements, response);
|
|
110360
110398
|
return {
|
|
110361
110399
|
role: mapNativeTraitsToDescribeRole(traits),
|
|
110362
110400
|
frame: {
|
|
@@ -110365,6 +110403,7 @@ function adaptAXElement(el) {
|
|
|
110365
110403
|
width: roundNormalized2(width),
|
|
110366
110404
|
height: roundNormalized2(height)
|
|
110367
110405
|
},
|
|
110406
|
+
...tapPoint ? { tapPoint } : {},
|
|
110368
110407
|
children: [],
|
|
110369
110408
|
label: el.label,
|
|
110370
110409
|
hint: el.hint,
|
|
@@ -110376,8 +110415,11 @@ function adaptAXElement(el) {
|
|
|
110376
110415
|
...traits.includes("selected") ? { selected: true } : {}
|
|
110377
110416
|
};
|
|
110378
110417
|
}
|
|
110379
|
-
function
|
|
110380
|
-
|
|
110418
|
+
function hasSwitchRow(response) {
|
|
110419
|
+
return response.elements.some((el) => switchRowTapPoint(el, response.elements, response));
|
|
110420
|
+
}
|
|
110421
|
+
function adaptAXDescribeToDescribeResult(response, options = {}) {
|
|
110422
|
+
const children = response.elements.map((el) => adaptAXElement(el, options.stockSwitches ? response : void 0)).filter((n) => n !== null);
|
|
110381
110423
|
return parseDescribeResult({
|
|
110382
110424
|
role: "AXGroup",
|
|
110383
110425
|
frame: { x: 0, y: 0, width: 1, height: 1 },
|
|
@@ -110400,6 +110442,17 @@ function isStandingCaveat(hint) {
|
|
|
110400
110442
|
function isBlindCaveat(hint) {
|
|
110401
110443
|
return Boolean(hint?.endsWith(DEGRADED_BLIND_HINT) || hint?.endsWith(EXTERNAL_BLIND_BODY));
|
|
110402
110444
|
}
|
|
110445
|
+
var FRONT_APP_TIMEOUT_MS = 1e3;
|
|
110446
|
+
var WEB_CONTENT_APPS = /* @__PURE__ */ new Set(["com.apple.mobilesafari", "com.apple.SafariViewService"]);
|
|
110447
|
+
async function appleAppInFront(ax) {
|
|
110448
|
+
try {
|
|
110449
|
+
const { bundleId } = await ax.foregroundApp(FRONT_APP_TIMEOUT_MS);
|
|
110450
|
+
return bundleId?.startsWith("com.apple.") === true && !WEB_CONTENT_APPS.has(bundleId);
|
|
110451
|
+
} catch (err) {
|
|
110452
|
+
if (axDaemonCrashSignal(err) !== void 0) throw err;
|
|
110453
|
+
return false;
|
|
110454
|
+
}
|
|
110455
|
+
}
|
|
110403
110456
|
function startFailure(err) {
|
|
110404
110457
|
return `The accessibility service failed to start (${errMsg(err)})`;
|
|
110405
110458
|
}
|
|
@@ -110504,6 +110557,9 @@ async function readIos(registry2, device, params, options, facts) {
|
|
|
110504
110557
|
facts.uiOrientation = response.interfaceOrientation;
|
|
110505
110558
|
noteUiOrientation(device.id, response.interfaceOrientation, response.screenFrame);
|
|
110506
110559
|
tree = adaptAXDescribeToDescribeResult(response);
|
|
110560
|
+
if (hasSwitchRow(response) && await appleAppInFront(axApi)) {
|
|
110561
|
+
tree = adaptAXDescribeToDescribeResult(response, { stockSwitches: true });
|
|
110562
|
+
}
|
|
110507
110563
|
} catch (err) {
|
|
110508
110564
|
crashSignal = axDaemonCrashSignal(err);
|
|
110509
110565
|
if (crashSignal === void 0) {
|
|
@@ -116589,8 +116645,8 @@ function splitTvLabel(label) {
|
|
|
116589
116645
|
function frameOf(element) {
|
|
116590
116646
|
const f = element.frame;
|
|
116591
116647
|
if (!f) return { x: 0, y: 0, width: 0, height: 0 };
|
|
116592
|
-
const
|
|
116593
|
-
return
|
|
116648
|
+
const onScreen3 = f.x < 1 && f.y < 1 && f.x + f.width > 0 && f.y + f.height > 0;
|
|
116649
|
+
return onScreen3 ? f : { x: f.x, y: f.y, width: 0, height: 0 };
|
|
116594
116650
|
}
|
|
116595
116651
|
var FOCUSED_TRAIT = "focused";
|
|
116596
116652
|
function toNode(element) {
|
|
@@ -145921,12 +145977,12 @@ async function queryAndroidFullHierarchy(registry2, device, options = {}) {
|
|
|
145921
145977
|
|
|
145922
145978
|
// ../tool-server/src/tools/flows/flow-chromium-tree.ts
|
|
145923
145979
|
function projectChromiumNode(node2) {
|
|
145924
|
-
const
|
|
145980
|
+
const onScreen3 = node2.frame.width > 0 && node2.frame.height > 0;
|
|
145925
145981
|
const addressable = Boolean(
|
|
145926
145982
|
node2.identifier || node2.label || node2.value || node2.clickable || node2.focused
|
|
145927
145983
|
);
|
|
145928
145984
|
let leaf = null;
|
|
145929
|
-
if (
|
|
145985
|
+
if (onScreen3 && addressable) {
|
|
145930
145986
|
leaf = { ...node2, children: [] };
|
|
145931
145987
|
if (node2.password) {
|
|
145932
145988
|
leaf.label = "[password]";
|
|
@@ -145939,7 +145995,7 @@ function projectChromiumNode(node2) {
|
|
|
145939
145995
|
// Off-screen text must not hoist, or a text assert against an ancestor
|
|
145940
145996
|
// would pass on content the screen doesn't show. A password's text never
|
|
145941
145997
|
// bubbles up.
|
|
145942
|
-
ownText:
|
|
145998
|
+
ownText: onScreen3 && !node2.password ? nodeText(node2) : "",
|
|
145943
145999
|
leaf,
|
|
145944
146000
|
shield: Boolean(node2.identifier) || node2.password === true
|
|
145945
146001
|
};
|
|
@@ -149686,6 +149742,9 @@ function fmtCoord(n) {
|
|
|
149686
149742
|
function fmtFrame(f) {
|
|
149687
149743
|
return `(${fmtCoord(f.x)},${fmtCoord(f.y)},${fmtCoord(f.width)},${fmtCoord(f.height)})`;
|
|
149688
149744
|
}
|
|
149745
|
+
function fmtTapPoint(n) {
|
|
149746
|
+
return n.tapPoint ? ` tap=(${fmtCoord(n.tapPoint.x)},${fmtCoord(n.tapPoint.y)})` : "";
|
|
149747
|
+
}
|
|
149689
149748
|
function escapeForLine(s) {
|
|
149690
149749
|
return s.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t");
|
|
149691
149750
|
}
|
|
@@ -149736,7 +149795,7 @@ function formatLine(n, indent, source) {
|
|
|
149736
149795
|
const flagPart = formatFlags(n, source);
|
|
149737
149796
|
const annotations = `${labelPart}${valuePart}${idPart}${hintPart}${flagPart}`.trim();
|
|
149738
149797
|
const annotated = annotations ? ` ${annotations}` : "";
|
|
149739
|
-
return `${pad}${n.role}${annotated} ${fmtFrame(n.frame)}`;
|
|
149798
|
+
return `${pad}${n.role}${annotated} ${fmtFrame(n.frame)}${fmtTapPoint(n)}`;
|
|
149740
149799
|
}
|
|
149741
149800
|
var CONTAIN_EPS = 5e-3;
|
|
149742
149801
|
function frameContains2(outer, inner) {
|
|
@@ -150040,7 +150099,7 @@ function createDescribeTool(registry2) {
|
|
|
150040
150099
|
longRunning: true,
|
|
150041
150100
|
description: `Read the accessibility / DOM element tree for the current screen (or focused/focusable elements on TV targets). On a physical iPhone it covers only the app started with \`launch-app\`; call \`launch-app\` \`com.apple.springboard\` first to read system dialogs.<flag:harmonyos> On HarmonyOS (\`source: "harmony-uitest"\`), each top-level child is a window whose \`identifier\` is the owning bundle; a suspended display dumps its last frame with a \`hint\`.</flag:harmonyos><flag:macos-apps> On a Mac app, frames are fractions of the app window (expanded for sheets/menus).</flag:macos-apps>
|
|
150042
150101
|
Use when you need tap coordinates or labels and have no fresh tree: interaction tools already attach one after each action (or reference an earlier \`Tree id\`).
|
|
150043
|
-
Returns \`{ description, source, hint? }\`: one line per element with role, label/value/id/hint, flags, and normalized \`[0,1]\` frame \`(x,y,w,h)
|
|
150102
|
+
Returns \`{ description, source, hint? }\`: one line per element with role, label/value/id/hint, flags, and normalized \`[0,1]\` frame \`(x,y,w,h)\`, and \`tap=(x,y)\` where the center misses the control. Tap at \`tap\` when present, else at \`(x+w/2, y+h/2)\`. No z-order/occlusion info; check a screenshot if a tap hits an overlay or a text field shows its placeholder as value. Fails if the tree backend is unreachable.
|
|
150044
150103
|
For UIKit view properties (iOS sim) use \`native-find-views\`; for React Native components/testIDs use \`debugger-component-tree\`.`,
|
|
150045
150104
|
zodSchema: zodSchema42,
|
|
150046
150105
|
alwaysLoad: true,
|
|
@@ -150303,7 +150362,7 @@ function mapNode(xml, screenW, screenH, isRoot, v2) {
|
|
|
150303
150362
|
}
|
|
150304
150363
|
return node2;
|
|
150305
150364
|
}
|
|
150306
|
-
function
|
|
150365
|
+
function onScreen2(frame2) {
|
|
150307
150366
|
if (!frame2) return false;
|
|
150308
150367
|
const w = Math.min(frame2.x + frame2.width, 1) - Math.max(frame2.x, 0);
|
|
150309
150368
|
const h = Math.min(frame2.y + frame2.height, 1) - Math.max(frame2.y, 0);
|
|
@@ -150343,7 +150402,7 @@ function adaptAndroidTree(capture, screen) {
|
|
|
150343
150402
|
windows.forEach((w, i) => {
|
|
150344
150403
|
const windowType = Number(w.attrs["window-type"]);
|
|
150345
150404
|
const root = roots[i];
|
|
150346
|
-
if (windowType === TYPE_INPUT_METHOD &&
|
|
150405
|
+
if (windowType === TYPE_INPUT_METHOD && onScreen2(root.frame)) keyboard = true;
|
|
150347
150406
|
if (foreground !== void 0 || !root.bundleId) return;
|
|
150348
150407
|
if (windowType === TYPE_SYSTEM && root.bundleId === "android") alert = true;
|
|
150349
150408
|
if (windowType !== TYPE_APPLICATION) return;
|
|
@@ -151788,6 +151847,7 @@ var TV_NO_CURSOR_STABLE_MS = 1200;
|
|
|
151788
151847
|
var DARK_TAIL_POLLS = 2;
|
|
151789
151848
|
var DARK_TAIL_MAX_MS = 2e3;
|
|
151790
151849
|
var TV_NO_CURSOR_NOTE = "no element holds focus on this screen, so a remote press may be lost";
|
|
151850
|
+
var LAUNCHING_NOTE = "an app is still launching: its splash screen is on screen";
|
|
151791
151851
|
var capability31 = {
|
|
151792
151852
|
apple: { simulator: true, device: true },
|
|
151793
151853
|
appleRemote: { simulator: true },
|
|
@@ -151824,6 +151884,14 @@ function unsettledNote(lastData, lastError, darkTailMs) {
|
|
|
151824
151884
|
if (lastData.hint) parts2.push(lastData.hint);
|
|
151825
151885
|
return parts2.join("; ");
|
|
151826
151886
|
}
|
|
151887
|
+
async function splashScreenShowing(serial) {
|
|
151888
|
+
try {
|
|
151889
|
+
const windows = await adbShell(serial, "dumpsys window visible", { timeoutMs: 2e3 });
|
|
151890
|
+
return windows.includes("Splash Screen ");
|
|
151891
|
+
} catch {
|
|
151892
|
+
return false;
|
|
151893
|
+
}
|
|
151894
|
+
}
|
|
151827
151895
|
var zodSchema47 = external_exports.object({
|
|
151828
151896
|
udid: external_exports.string().min(1).describe(
|
|
151829
151897
|
"Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, <flag:harmonyos>HarmonyOS id, </flag:harmonyos><flag:macos-apps>Mac app id, </flag:macos-apps>or Chromium id)."
|
|
@@ -151863,7 +151931,7 @@ function createAwaitScreenIdleTool(registry2) {
|
|
|
151863
151931
|
id: AWAIT_SCREEN_IDLE_TOOL_ID,
|
|
151864
151932
|
description: `Block until the screen has rendered content and held it for minStableMs, or the timeout elapses. It polls the same element tree as \`describe\`.
|
|
151865
151933
|
Use when a launch or navigation must finish rendering before a screenshot or tap.
|
|
151866
|
-
Returns { settled, waitedMs, polls, note? }. If that is not seen before timeoutMs, it returns settled=false instead of failing.<flag:harmonyos> A note on settled=true means the screen it settled on is not live: a suspended HarmonyOS panel settles instantly on its last frame, and taps land nowhere until it is woken.</flag:harmonyos>`,
|
|
151934
|
+
Returns { settled, waitedMs, polls, launching?, note? }. If that is not seen before timeoutMs, it returns settled=false instead of failing. On Android, launching=true (and settled=false) means an app's splash screen was still showing.<flag:harmonyos> A note on settled=true means the screen it settled on is not live: a suspended HarmonyOS panel settles instantly on its last frame, and taps land nowhere until it is woken.</flag:harmonyos>`,
|
|
151867
151935
|
zodSchema: zodSchema47,
|
|
151868
151936
|
searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
|
|
151869
151937
|
readOnly: true,
|
|
@@ -151897,8 +151965,17 @@ Returns { settled, waitedMs, polls, note? }. If that is not seen before timeoutM
|
|
|
151897
151965
|
let stableSignature;
|
|
151898
151966
|
let stableSince = 0;
|
|
151899
151967
|
let lastReadAt = 0;
|
|
151968
|
+
let splashSeen = false;
|
|
151969
|
+
const readScreen = async (budgetMs) => {
|
|
151970
|
+
const data = await fetchTree(device, services, tvApi, androidIsTv, budgetMs);
|
|
151971
|
+
if (device.platform !== "android" || data.tree.children.length === 0) return data;
|
|
151972
|
+
const canSettle = minStableMs === 0 || treeSignature(data.tree) === stableSignature;
|
|
151973
|
+
if (!splashSeen && !canSettle) return data;
|
|
151974
|
+
splashSeen = await splashScreenShowing(device.id);
|
|
151975
|
+
return splashSeen ? { ...data, tree: { ...data.tree, children: [] } } : data;
|
|
151976
|
+
};
|
|
151900
151977
|
const poll = await pollDescribeTree({
|
|
151901
|
-
fetchTree:
|
|
151978
|
+
fetchTree: readScreen,
|
|
151902
151979
|
timeoutMs: params.timeoutMs ?? DEFAULT_TIMEOUT_MS5,
|
|
151903
151980
|
pollIntervalMs,
|
|
151904
151981
|
signal: ctx?.signal,
|
|
@@ -151926,11 +152003,13 @@ Returns { settled, waitedMs, polls, note? }. If that is not seen before timeoutM
|
|
|
151926
152003
|
const settled = poll.result === true;
|
|
151927
152004
|
const darkTailMs = Date.now() - lastReadAt;
|
|
151928
152005
|
const hung = lastReadAt > 0 && darkTailMs > Math.min(DARK_TAIL_POLLS * pollIntervalMs, DARK_TAIL_MAX_MS);
|
|
151929
|
-
const
|
|
152006
|
+
const launching = !settled && !poll.aborted && device.platform === "android" && await splashScreenShowing(device.id);
|
|
152007
|
+
const note = launching ? LAUNCHING_NOTE : settled ? poll.lastData?.stale ? poll.lastData.hint : void 0 : unsettledNote(poll.lastData, poll.lastError, hung ? darkTailMs : void 0);
|
|
151930
152008
|
const populatedNoCursor = tvApi && poll.lastData?.tree.children.length && !hasTvCursor(poll.lastData);
|
|
151931
152009
|
const cursorNote = populatedNoCursor ? TV_NO_CURSOR_NOTE : void 0;
|
|
151932
152010
|
return {
|
|
151933
152011
|
settled,
|
|
152012
|
+
...launching ? { launching } : {},
|
|
151934
152013
|
waitedMs: poll.elapsedMs,
|
|
151935
152014
|
polls: poll.polls,
|
|
151936
152015
|
...note || cursorNote ? { note: note ?? cursorNote } : {}
|
|
@@ -169637,12 +169716,12 @@ function wrapPreservingFailure(message, err) {
|
|
|
169637
169716
|
return signal ? new FailureError(message, signal, { cause }) : new Error(message, { cause });
|
|
169638
169717
|
}
|
|
169639
169718
|
function projectIosDeviceNode(node2) {
|
|
169640
|
-
const
|
|
169719
|
+
const onScreen3 = node2.frame.width > 0 && node2.frame.height > 0;
|
|
169641
169720
|
return {
|
|
169642
169721
|
skip: false,
|
|
169643
169722
|
children: node2.children,
|
|
169644
169723
|
// Off-screen text must not hoist.
|
|
169645
|
-
ownText:
|
|
169724
|
+
ownText: onScreen3 ? nodeText(node2) : "",
|
|
169646
169725
|
leaf: { ...node2, children: [] },
|
|
169647
169726
|
shield: Boolean(node2.identifier),
|
|
169648
169727
|
// Scroll-clip inputs (see `flattenHoisting`), in the adapter's normalized
|
|
@@ -169677,13 +169756,13 @@ async function queryIosDeviceFlowTree(registry2, device) {
|
|
|
169677
169756
|
|
|
169678
169757
|
// ../tool-server/src/tools/flows/flow-vega-tree.ts
|
|
169679
169758
|
function projectVegaNode(node2) {
|
|
169680
|
-
const
|
|
169759
|
+
const onScreen3 = node2.frame.width > 0 && node2.frame.height > 0;
|
|
169681
169760
|
return {
|
|
169682
169761
|
skip: false,
|
|
169683
169762
|
children: node2.children,
|
|
169684
169763
|
// Off-screen text must not hoist, or a text assert against an ancestor
|
|
169685
169764
|
// would pass on content the screen doesn't show.
|
|
169686
|
-
ownText:
|
|
169765
|
+
ownText: onScreen3 ? nodeText(node2) : "",
|
|
169687
169766
|
leaf: { ...node2, children: [] },
|
|
169688
169767
|
shield: isAuthoredVegaTestId(node2.identifier)
|
|
169689
169768
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.85",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "b8bb524e5ad5658b82c3ec99e055c0af0e5fd7de"
|
|
102
102
|
}
|
|
@@ -19,7 +19,7 @@ Each tool's description carries its parameters, defaults, and return shape. This
|
|
|
19
19
|
## Core Rules
|
|
20
20
|
|
|
21
21
|
- **Open apps directly:** use `launch-app` or `open-url`, never tap home-screen icons. Use `restart-app` for clean in-memory state.
|
|
22
|
-
- **Use the returned element tree:** interaction tools already attach a downscaled screenshot and `--- Elements after action (describe) ---` with normalized `[0,1]` tap frames. Call `describe` only when no fresh tree covers the current screen. Never derive routine tap coordinates from pixels.
|
|
22
|
+
- **Use the returned element tree:** interaction tools already attach a downscaled screenshot and `--- Elements after action (describe) ---` with normalized `[0,1]` tap frames. Tap at a line's `tap=(x,y)` when it has one, else at the frame center. Call `describe` only when no fresh tree covers the current screen. Never derive routine tap coordinates from pixels.
|
|
23
23
|
- **Tree & screenshot IDs:** full trees/screenshots carry a `Tree id` / `Screenshot id`. When unchanged or slightly changed, a later result references that id (unchanged note or `-`/`+` diff); call `describe` or `screenshot` if that earlier result isn't in context. An identical tree does not mean the action did nothing.
|
|
24
24
|
- **Batch known steps:** use `run-sequence` when multiple consecutive steps are known ahead of time (scroll sweeps, type + enter, form fill + submit).
|
|
25
25
|
- **Text entry:** tap the field first (`keyboard` with no focus is a silent no-op). `keyboard` takes either `text` or `key`, not both. Keep `keyboard` as default; reserve `paste` for real paste flows (OTP, long tokens). Use `{{secret:<NAME>}}` placeholders for credentials and navigate/submit before capturing non-secure fields.
|