@swmansion/argent 0.35.1-next.75 → 0.35.1-next.77
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/bin/argent-android-devtools-0.4.0.apk +0 -0
- package/bin/darwin/argent-macos-helper +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/network-inspector/network-inspector.jar +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +3 -1
- package/dist/client.js +2 -0
- package/dist/installer.mjs +3 -1
- package/dist/mcp-server.mjs +6 -1
- package/dist/tool-args.generated.d.ts +12 -0
- package/dist/tool-server.cjs +455 -285
- package/dylibs/libArgentAudio.dylib +0 -0
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
- package/dylibs/tcp/argent-audio-feeder +0 -0
- package/dylibs/tcp/libArgentAudio.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +2 -2
- package/skills/argent-macos-app-interact/SKILL.md +2 -1
- package/skills/argent-macos-app-interact/references/e2e.md +1 -0
package/dist/tool-server.cjs
CHANGED
|
@@ -2170,6 +2170,8 @@ var init_failure_codes = __esm({
|
|
|
2170
2170
|
MACOS_APP_FILE_ACCESS_FAILED: "MACOS_APP_FILE_ACCESS_FAILED",
|
|
2171
2171
|
/** The app's loaded Argent library lacks support for the requested operation. */
|
|
2172
2172
|
MACOS_APP_LIBRARY_OUTDATED: "MACOS_APP_LIBRARY_OUTDATED",
|
|
2173
|
+
/** The user clicked, scrolled or typed in the app while argent's pointer moved, and took the pointer back. */
|
|
2174
|
+
MACOS_APP_POINTER_TAKEN_OVER: "MACOS_APP_POINTER_TAKEN_OVER",
|
|
2173
2175
|
KEYBOARD_KEY_UNSUPPORTED: "KEYBOARD_KEY_UNSUPPORTED",
|
|
2174
2176
|
KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
|
|
2175
2177
|
KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
|
|
@@ -18288,8 +18290,8 @@ function finalize(ctx, schema) {
|
|
|
18288
18290
|
const root = ctx.seen.get(schema);
|
|
18289
18291
|
if (!root)
|
|
18290
18292
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
18291
|
-
const flattenRef = (
|
|
18292
|
-
const seen = ctx.seen.get(
|
|
18293
|
+
const flattenRef = (zodSchema90) => {
|
|
18294
|
+
const seen = ctx.seen.get(zodSchema90);
|
|
18293
18295
|
if (seen.ref === null)
|
|
18294
18296
|
return;
|
|
18295
18297
|
const schema2 = seen.def ?? seen.schema;
|
|
@@ -18307,7 +18309,7 @@ function finalize(ctx, schema) {
|
|
|
18307
18309
|
assignProps(schema2, refSchema);
|
|
18308
18310
|
}
|
|
18309
18311
|
assignProps(schema2, _cached);
|
|
18310
|
-
const isParentRef =
|
|
18312
|
+
const isParentRef = zodSchema90._zod.parent === ref;
|
|
18311
18313
|
if (isParentRef) {
|
|
18312
18314
|
for (const key2 in schema2) {
|
|
18313
18315
|
if (key2 === "$ref" || key2 === "allOf")
|
|
@@ -18327,7 +18329,7 @@ function finalize(ctx, schema) {
|
|
|
18327
18329
|
}
|
|
18328
18330
|
}
|
|
18329
18331
|
}
|
|
18330
|
-
const parent =
|
|
18332
|
+
const parent = zodSchema90._zod.parent;
|
|
18331
18333
|
if (parent && parent !== ref) {
|
|
18332
18334
|
flattenRef(parent);
|
|
18333
18335
|
const parentSeen = ctx.seen.get(parent);
|
|
@@ -18345,7 +18347,7 @@ function finalize(ctx, schema) {
|
|
|
18345
18347
|
}
|
|
18346
18348
|
}
|
|
18347
18349
|
ctx.override({
|
|
18348
|
-
zodSchema:
|
|
18350
|
+
zodSchema: zodSchema90,
|
|
18349
18351
|
jsonSchema: schema2,
|
|
18350
18352
|
path: seen.path ?? []
|
|
18351
18353
|
});
|
|
@@ -21780,10 +21782,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21780
21782
|
}
|
|
21781
21783
|
ctx.processing.add(refPath);
|
|
21782
21784
|
const resolved = resolveRef(refPath, ctx);
|
|
21783
|
-
const
|
|
21784
|
-
ctx.refs.set(refPath,
|
|
21785
|
+
const zodSchema91 = convertSchema(resolved, ctx);
|
|
21786
|
+
ctx.refs.set(refPath, zodSchema91);
|
|
21785
21787
|
ctx.processing.delete(refPath);
|
|
21786
|
-
return
|
|
21788
|
+
return zodSchema91;
|
|
21787
21789
|
}
|
|
21788
21790
|
if (schema.enum !== void 0) {
|
|
21789
21791
|
const enumValues = schema.enum;
|
|
@@ -21825,7 +21827,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21825
21827
|
if (!type) {
|
|
21826
21828
|
return z.any();
|
|
21827
21829
|
}
|
|
21828
|
-
let
|
|
21830
|
+
let zodSchema90;
|
|
21829
21831
|
switch (type) {
|
|
21830
21832
|
case "string": {
|
|
21831
21833
|
let stringSchema = z.string();
|
|
@@ -21894,7 +21896,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21894
21896
|
if (schema.pattern) {
|
|
21895
21897
|
stringSchema = stringSchema.regex(new RegExp(schema.pattern));
|
|
21896
21898
|
}
|
|
21897
|
-
|
|
21899
|
+
zodSchema90 = stringSchema;
|
|
21898
21900
|
break;
|
|
21899
21901
|
}
|
|
21900
21902
|
case "number":
|
|
@@ -21919,15 +21921,15 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21919
21921
|
if (typeof schema.multipleOf === "number") {
|
|
21920
21922
|
numberSchema = numberSchema.multipleOf(schema.multipleOf);
|
|
21921
21923
|
}
|
|
21922
|
-
|
|
21924
|
+
zodSchema90 = numberSchema;
|
|
21923
21925
|
break;
|
|
21924
21926
|
}
|
|
21925
21927
|
case "boolean": {
|
|
21926
|
-
|
|
21928
|
+
zodSchema90 = z.boolean();
|
|
21927
21929
|
break;
|
|
21928
21930
|
}
|
|
21929
21931
|
case "null": {
|
|
21930
|
-
|
|
21932
|
+
zodSchema90 = z.null();
|
|
21931
21933
|
break;
|
|
21932
21934
|
}
|
|
21933
21935
|
case "object": {
|
|
@@ -21954,21 +21956,21 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21954
21956
|
}
|
|
21955
21957
|
schemasToIntersect.push(...looseRecords);
|
|
21956
21958
|
if (schemasToIntersect.length === 0) {
|
|
21957
|
-
|
|
21959
|
+
zodSchema90 = z.object({}).passthrough();
|
|
21958
21960
|
} else if (schemasToIntersect.length === 1) {
|
|
21959
|
-
|
|
21961
|
+
zodSchema90 = schemasToIntersect[0];
|
|
21960
21962
|
} else {
|
|
21961
21963
|
let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
21962
21964
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
21963
21965
|
result = z.intersection(result, schemasToIntersect[i]);
|
|
21964
21966
|
}
|
|
21965
|
-
|
|
21967
|
+
zodSchema90 = result;
|
|
21966
21968
|
}
|
|
21967
21969
|
if (schema.additionalProperties === false) {
|
|
21968
21970
|
const propertyKeys = Object.keys(shape);
|
|
21969
21971
|
const patterns = patternKeys.map((p) => new RegExp(p));
|
|
21970
|
-
const basePatternSchema =
|
|
21971
|
-
|
|
21972
|
+
const basePatternSchema = zodSchema90;
|
|
21973
|
+
zodSchema90 = zodSchema90.check((payload) => {
|
|
21972
21974
|
if (!isPlainObject2(payload.value))
|
|
21973
21975
|
return;
|
|
21974
21976
|
const unrecognized = [];
|
|
@@ -21992,11 +21994,11 @@ function convertBaseSchema(schema, ctx) {
|
|
|
21992
21994
|
} else {
|
|
21993
21995
|
const objectSchema = z.object(shape);
|
|
21994
21996
|
if (schema.additionalProperties === false) {
|
|
21995
|
-
|
|
21997
|
+
zodSchema90 = objectSchema.strict();
|
|
21996
21998
|
} else if (additionalSchema) {
|
|
21997
|
-
|
|
21999
|
+
zodSchema90 = objectSchema.catchall(additionalSchema);
|
|
21998
22000
|
} else {
|
|
21999
|
-
|
|
22001
|
+
zodSchema90 = objectSchema.passthrough();
|
|
22000
22002
|
}
|
|
22001
22003
|
}
|
|
22002
22004
|
const hasKeyGuard = schema.propertyNames !== void 0 && schema.propertyNames !== true;
|
|
@@ -22008,7 +22010,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
22008
22010
|
const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === void 0 ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
|
|
22009
22011
|
keySchema = convertSchema(keyJSONSchema, ctx);
|
|
22010
22012
|
}
|
|
22011
|
-
|
|
22013
|
+
zodSchema90 = checkObjectGuards(zodSchema90, { keySchema, minProperties, maxProperties });
|
|
22012
22014
|
}
|
|
22013
22015
|
break;
|
|
22014
22016
|
}
|
|
@@ -22021,12 +22023,12 @@ function convertBaseSchema(schema, ctx) {
|
|
|
22021
22023
|
const positionalItems = applyMinItems(tupleItems, minItems);
|
|
22022
22024
|
const rest = !Array.isArray(items) ? getTupleRest(items, ctx) : void 0;
|
|
22023
22025
|
const tupleSchema = z.tuple(positionalItems);
|
|
22024
|
-
|
|
22026
|
+
zodSchema90 = rest ? tupleSchema.rest(rest) : tupleSchema;
|
|
22025
22027
|
if (typeof schema.minItems === "number") {
|
|
22026
|
-
|
|
22028
|
+
zodSchema90 = zodSchema90.check(z.minLength(schema.minItems));
|
|
22027
22029
|
}
|
|
22028
22030
|
if (typeof schema.maxItems === "number") {
|
|
22029
|
-
|
|
22031
|
+
zodSchema90 = zodSchema90.check(z.maxLength(schema.maxItems));
|
|
22030
22032
|
}
|
|
22031
22033
|
} else if (Array.isArray(items)) {
|
|
22032
22034
|
const minItems = typeof schema.minItems === "number" ? schema.minItems : 0;
|
|
@@ -22034,12 +22036,12 @@ function convertBaseSchema(schema, ctx) {
|
|
|
22034
22036
|
const positionalItems = applyMinItems(tupleItems, minItems);
|
|
22035
22037
|
const rest = getTupleRest(schema.additionalItems, ctx);
|
|
22036
22038
|
const tupleSchema = z.tuple(positionalItems);
|
|
22037
|
-
|
|
22039
|
+
zodSchema90 = rest ? tupleSchema.rest(rest) : tupleSchema;
|
|
22038
22040
|
if (typeof schema.minItems === "number") {
|
|
22039
|
-
|
|
22041
|
+
zodSchema90 = zodSchema90.check(z.minLength(schema.minItems));
|
|
22040
22042
|
}
|
|
22041
22043
|
if (typeof schema.maxItems === "number") {
|
|
22042
|
-
|
|
22044
|
+
zodSchema90 = zodSchema90.check(z.maxLength(schema.maxItems));
|
|
22043
22045
|
}
|
|
22044
22046
|
} else if (items !== void 0) {
|
|
22045
22047
|
const element = convertSchema(items, ctx);
|
|
@@ -22050,12 +22052,12 @@ function convertBaseSchema(schema, ctx) {
|
|
|
22050
22052
|
if (typeof schema.maxItems === "number") {
|
|
22051
22053
|
arraySchema = arraySchema.max(schema.maxItems);
|
|
22052
22054
|
}
|
|
22053
|
-
|
|
22055
|
+
zodSchema90 = arraySchema;
|
|
22054
22056
|
} else {
|
|
22055
|
-
|
|
22057
|
+
zodSchema90 = z.array(z.any());
|
|
22056
22058
|
}
|
|
22057
22059
|
if (schema.uniqueItems === true || schema.contains !== void 0) {
|
|
22058
|
-
|
|
22060
|
+
zodSchema90 = checkArrayGuards(zodSchema90, {
|
|
22059
22061
|
uniqueItems: schema.uniqueItems === true,
|
|
22060
22062
|
containsSchema: schema.contains !== void 0 ? convertSchema(schema.contains, ctx) : void 0,
|
|
22061
22063
|
minContains: typeof schema.minContains === "number" ? schema.minContains : void 0,
|
|
@@ -22067,7 +22069,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
22067
22069
|
default:
|
|
22068
22070
|
throw new Error(`Unsupported type: ${type}`);
|
|
22069
22071
|
}
|
|
22070
|
-
return
|
|
22072
|
+
return zodSchema90;
|
|
22071
22073
|
}
|
|
22072
22074
|
function convertSchema(schema, ctx) {
|
|
22073
22075
|
if (typeof schema === "boolean") {
|
|
@@ -51740,22 +51742,22 @@ var init_harmony_flag = __esm({
|
|
|
51740
51742
|
});
|
|
51741
51743
|
|
|
51742
51744
|
// ../tool-server/src/utils/capability.ts
|
|
51743
|
-
function platformMatrix(platform,
|
|
51745
|
+
function platformMatrix(platform, capability43) {
|
|
51744
51746
|
switch (platform) {
|
|
51745
51747
|
case "ios":
|
|
51746
|
-
return
|
|
51748
|
+
return capability43.apple;
|
|
51747
51749
|
case "ios-remote":
|
|
51748
|
-
return
|
|
51750
|
+
return capability43.appleRemote;
|
|
51749
51751
|
case "android":
|
|
51750
|
-
return
|
|
51752
|
+
return capability43.android;
|
|
51751
51753
|
case "chromium":
|
|
51752
|
-
return
|
|
51754
|
+
return capability43.chromium;
|
|
51753
51755
|
case "vega":
|
|
51754
|
-
return
|
|
51756
|
+
return capability43.vega;
|
|
51755
51757
|
case "harmony":
|
|
51756
|
-
return
|
|
51758
|
+
return capability43.harmony;
|
|
51757
51759
|
case "macos":
|
|
51758
|
-
return
|
|
51760
|
+
return capability43.macos;
|
|
51759
51761
|
}
|
|
51760
51762
|
}
|
|
51761
51763
|
function macosAppsUnavailableReason() {
|
|
@@ -51767,14 +51769,14 @@ function isFlagOffered(flag) {
|
|
|
51767
51769
|
if (flag === MACOS_APPS_FLAG) return macosAppsUnavailableReason() === null;
|
|
51768
51770
|
return isFeatureEnabled(flag);
|
|
51769
51771
|
}
|
|
51770
|
-
function assertSupported(toolId,
|
|
51771
|
-
if (!
|
|
51772
|
+
function assertSupported(toolId, capability43, device) {
|
|
51773
|
+
if (!capability43) return;
|
|
51772
51774
|
if (device.platform === "harmony" && !isHarmonyEnabled()) {
|
|
51773
51775
|
throw new UnsupportedOperationError(toolId, device, HARMONY_DISABLED_REASON);
|
|
51774
51776
|
}
|
|
51775
51777
|
const macosRefusal = device.platform === "macos" ? macosAppsUnavailableReason() : null;
|
|
51776
51778
|
if (macosRefusal) throw new UnsupportedOperationError(toolId, device, macosRefusal);
|
|
51777
|
-
const matrix = platformMatrix(device.platform,
|
|
51779
|
+
const matrix = platformMatrix(device.platform, capability43);
|
|
51778
51780
|
if (!matrix) {
|
|
51779
51781
|
const reason2 = (device.platform === "macos" ? MACOS_REFUSAL_REASONS[toolId] : void 0) ?? (toolId === "network-capture-start" || toolId === "network-capture-stop" ? NO_CAPTURE_START_STOP_REASONS[device.platform] : void 0) ?? `no ${device.platform} support declared`;
|
|
51780
51782
|
throw new UnsupportedOperationError(toolId, device, reason2);
|
|
@@ -51785,7 +51787,7 @@ function assertSupported(toolId, capability42, device) {
|
|
|
51785
51787
|
const reason2 = device.platform === "harmony" && device.kind === "emulator" ? 'a `harmony-emulator-` id names an instance only boot-device starts; drive the `harmony-<connectKey>` id of its `kind: "device"` entry in list-devices' : catalystReason ?? `kind '${device.kind}' not supported`;
|
|
51786
51788
|
throw new UnsupportedOperationError(toolId, device, reason2);
|
|
51787
51789
|
}
|
|
51788
|
-
if (
|
|
51790
|
+
if (capability43.supports && !capability43.supports(device)) {
|
|
51789
51791
|
throw new UnsupportedOperationError(toolId, device, "supports() refiner rejected device");
|
|
51790
51792
|
}
|
|
51791
51793
|
}
|
|
@@ -52173,16 +52175,16 @@ function lookupExternalDeviceNow(id) {
|
|
|
52173
52175
|
}
|
|
52174
52176
|
return device;
|
|
52175
52177
|
}
|
|
52176
|
-
async function assertExternalCapability(namespace, device,
|
|
52177
|
-
assertExternalCapabilitySync(namespace, device,
|
|
52178
|
+
async function assertExternalCapability(namespace, device, capability43) {
|
|
52179
|
+
assertExternalCapabilitySync(namespace, device, capability43);
|
|
52178
52180
|
}
|
|
52179
|
-
function assertExternalCapabilitySync(namespace, device,
|
|
52181
|
+
function assertExternalCapabilitySync(namespace, device, capability43) {
|
|
52180
52182
|
const id = typeof device === "string" ? device : device.id;
|
|
52181
52183
|
const externalDevice = isExternalId(id) ? lookupExternalDeviceNow(id) : externalClaimForNativeId(id);
|
|
52182
52184
|
if (!externalDevice) return;
|
|
52183
|
-
if (externalDevice.capabilities.has(
|
|
52185
|
+
if (externalDevice.capabilities.has(capability43)) return;
|
|
52184
52186
|
throw new FailureError(
|
|
52185
|
-
`${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${
|
|
52187
|
+
`${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${capability43}' capability for this device.`,
|
|
52186
52188
|
{
|
|
52187
52189
|
error_code: FAILURE_CODES.EXTERNAL_DEVICE_CAPABILITY_DENIED,
|
|
52188
52190
|
error_kind: "unsupported",
|
|
@@ -73357,7 +73359,7 @@ function isCi(env = process.env) {
|
|
|
73357
73359
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
73358
73360
|
function readCliVersion() {
|
|
73359
73361
|
if (true) {
|
|
73360
|
-
return "0.35.1-next.
|
|
73362
|
+
return "0.35.1-next.77";
|
|
73361
73363
|
}
|
|
73362
73364
|
return "0.0.0";
|
|
73363
73365
|
}
|
|
@@ -81327,8 +81329,8 @@ async function simctlArgsForUdid(udid, args, options) {
|
|
|
81327
81329
|
return [...simctlPrefix(await deviceSetForUdid(udid)), ...nativeArgs(udid, args)];
|
|
81328
81330
|
}
|
|
81329
81331
|
function assertSimctlEntitlement(udid, options) {
|
|
81330
|
-
const
|
|
81331
|
-
assertExternalCapabilitySync(
|
|
81332
|
+
const capability43 = options?.granted ?? "simctl";
|
|
81333
|
+
assertExternalCapabilitySync(capability43, udid, capability43);
|
|
81332
81334
|
}
|
|
81333
81335
|
async function simctlTargetForUdid(udid, options) {
|
|
81334
81336
|
assertSimctlEntitlement(udid, options);
|
|
@@ -103027,6 +103029,7 @@ function isInjectableBundleId(bundleId) {
|
|
|
103027
103029
|
var NON_INJECTABLE_NATIVE_WARNING = "Do not fall back to the native-devtools feature tools (native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point): they run the same injection precheck and fail with the same non-injectable error.";
|
|
103028
103030
|
var NON_INJECTABLE_RECOVERY = "Use the standard `describe` tool (its accessibility path reads the screen without injection) or `screenshot` (then interact by coordinate). " + NON_INJECTABLE_NATIVE_WARNING;
|
|
103029
103031
|
var MAX_NATIVE_DEVTOOLS_INIT_ATTEMPTS = 3;
|
|
103032
|
+
var NATIVE_DEVTOOLS_INIT_RETRY_COOLDOWN_MS = 3e4;
|
|
103030
103033
|
var NATIVE_DEVTOOLS_AGE_SLOP_MS = 3e3;
|
|
103031
103034
|
var NATIVE_DEVTOOLS_CONNECT_BUDGET_MS = 15e3;
|
|
103032
103035
|
var LENT_RELEASE_TIMEOUT_MS = 1e3;
|
|
@@ -103046,10 +103049,12 @@ function buildAppStateMessage(bundleId, state3) {
|
|
|
103046
103049
|
return `Native devtools here are an external provider's agent, which serves only the app that provider chose to lend. ${bundleId} is either not that app or its connection has not landed yet. argent did not launch this process and cannot re-point it, so restarting anything is the provider's call rather than argent's. Retry if the app has just started; otherwise read the screen with describe or screenshot and drive it by coordinate.`;
|
|
103047
103050
|
}
|
|
103048
103051
|
}
|
|
103049
|
-
function buildInitFailedResult(udid, failure3) {
|
|
103052
|
+
function buildInitFailedResult(udid, failure3, { afterBoot = false } = {}) {
|
|
103050
103053
|
return {
|
|
103051
103054
|
status: "init_failed",
|
|
103052
|
-
message: `Native devtools failed to initialize for ${udid} after ${failure3.attempts} attempts. Last error: ${failure3.lastError}.
|
|
103055
|
+
message: `Native devtools failed to initialize for ${udid} after ${failure3.attempts} attempts. Last error: ${failure3.lastError}. ` + // boot-device has just booted the simulator and retried, so its own
|
|
103056
|
+
// answer must not send the agent back to boot-device: that would loop.
|
|
103057
|
+
(afterBoot ? `boot-device already retried the setup on the booted simulator, so calling it again does not help on its own. Restart CoreSimulatorService, then call boot-device again.` : `Try shutting down and re-booting the simulator, or restart CoreSimulatorService.`) + (failure3.givenUp ? ` Argent retries the setup in the background at most every ${NATIVE_DEVTOOLS_INIT_RETRY_COOLDOWN_MS / 1e3} s, and a later call picks up a success.` : ""),
|
|
103053
103058
|
attempts: failure3.attempts
|
|
103054
103059
|
};
|
|
103055
103060
|
}
|
|
@@ -103093,7 +103098,11 @@ async function precheckNativeDevtools(api, udid, bundleId) {
|
|
|
103093
103098
|
throw nonInjectableError(bundleId);
|
|
103094
103099
|
}
|
|
103095
103100
|
const existing = api.getInitFailure();
|
|
103096
|
-
if (existing?.givenUp)
|
|
103101
|
+
if (existing?.givenUp) {
|
|
103102
|
+
void api.ensureEnvReady().catch(() => {
|
|
103103
|
+
});
|
|
103104
|
+
return buildInitFailedResult(udid, existing);
|
|
103105
|
+
}
|
|
103097
103106
|
try {
|
|
103098
103107
|
await api.ensureEnvReady();
|
|
103099
103108
|
} catch (err) {
|
|
@@ -103256,6 +103265,7 @@ var nativeDevtoolsBlueprint = {
|
|
|
103256
103265
|
let nextRpcId = 1;
|
|
103257
103266
|
let envSetup = false;
|
|
103258
103267
|
let initFailure = null;
|
|
103268
|
+
let initRetryAt = 0;
|
|
103259
103269
|
let inFlight5 = null;
|
|
103260
103270
|
let envRetired = false;
|
|
103261
103271
|
const activatedBundleIds = /* @__PURE__ */ new Set();
|
|
@@ -103279,7 +103289,8 @@ var nativeDevtoolsBlueprint = {
|
|
|
103279
103289
|
const attempts = (initFailure?.attempts ?? 0) + 1;
|
|
103280
103290
|
const givenUp = attempts >= MAX_NATIVE_DEVTOOLS_INIT_ATTEMPTS;
|
|
103281
103291
|
initFailure = { attempts, lastError, givenUp };
|
|
103282
|
-
|
|
103292
|
+
if (givenUp) initRetryAt = performance.now() + NATIVE_DEVTOOLS_INIT_RETRY_COOLDOWN_MS;
|
|
103293
|
+
const message = givenUp ? `[native-devtools] giving up on ${udid} after ${attempts} attempts, retrying in ${NATIVE_DEVTOOLS_INIT_RETRY_COOLDOWN_MS / 1e3}s: ${lastError}
|
|
103283
103294
|
` : `[native-devtools] init attempt ${attempts}/${MAX_NATIVE_DEVTOOLS_INIT_ATTEMPTS} failed for ${udid}: ${lastError}
|
|
103284
103295
|
`;
|
|
103285
103296
|
process.stderr.write(message);
|
|
@@ -103298,12 +103309,18 @@ var nativeDevtoolsBlueprint = {
|
|
|
103298
103309
|
});
|
|
103299
103310
|
return inFlight5;
|
|
103300
103311
|
};
|
|
103312
|
+
const retryInBackground = () => {
|
|
103313
|
+
if (!inFlight5 && performance.now() >= initRetryAt) void runEnsureEnv().catch(() => {
|
|
103314
|
+
});
|
|
103315
|
+
return Promise.resolve();
|
|
103316
|
+
};
|
|
103301
103317
|
const ensureEnvReady = () => {
|
|
103302
|
-
if (envSetup
|
|
103318
|
+
if (envSetup) return Promise.resolve();
|
|
103319
|
+
if (initFailure?.givenUp) return retryInBackground();
|
|
103303
103320
|
return runEnsureEnv();
|
|
103304
103321
|
};
|
|
103305
103322
|
const reverifyEnv = () => {
|
|
103306
|
-
if (initFailure?.givenUp) return
|
|
103323
|
+
if (initFailure?.givenUp) return retryInBackground();
|
|
103307
103324
|
return runEnsureEnv();
|
|
103308
103325
|
};
|
|
103309
103326
|
const writeMessage = (socket, type, payload) => {
|
|
@@ -103808,6 +103825,7 @@ var nativeDevtoolsBlueprint = {
|
|
|
103808
103825
|
socketPath: lentSocketPath ?? socketPath,
|
|
103809
103826
|
ensureEnvReady: lentSocketPath ? () => Promise.resolve() : ensureEnvReady,
|
|
103810
103827
|
reverifyEnv: lentSocketPath ? () => Promise.resolve() : reverifyEnv,
|
|
103828
|
+
retryEnvNow: lentSocketPath ? () => Promise.resolve() : runEnsureEnv,
|
|
103811
103829
|
armsEnv: !lentSocketPath,
|
|
103812
103830
|
withdrawEnv: lentSocketPath ? () => Promise.resolve() : async () => {
|
|
103813
103831
|
envRetired = true;
|
|
@@ -104357,7 +104375,7 @@ function startSimulatorWatcher(registry2) {
|
|
|
104357
104375
|
);
|
|
104358
104376
|
for (const [udid, service] of trackedServices) {
|
|
104359
104377
|
if (!booted.has(udid)) continue;
|
|
104360
|
-
if (!service.isEnvSetup()
|
|
104378
|
+
if (!service.isEnvSetup()) {
|
|
104361
104379
|
pendingAttempts.push(service.ensureEnvReady().catch(() => {
|
|
104362
104380
|
}));
|
|
104363
104381
|
}
|
|
@@ -126020,18 +126038,22 @@ function insideMaxEdges(point) {
|
|
|
126020
126038
|
};
|
|
126021
126039
|
}
|
|
126022
126040
|
async function macosMouse(app, event2) {
|
|
126023
|
-
await app.call(
|
|
126041
|
+
const reply = await app.call(
|
|
126024
126042
|
"Input.mouse",
|
|
126025
126043
|
insideMaxEdges(event2),
|
|
126026
126044
|
event2.type === "up" ? { runLate: true } : void 0
|
|
126027
126045
|
);
|
|
126046
|
+
rememberPointer(app, event2);
|
|
126047
|
+
return reply;
|
|
126028
126048
|
}
|
|
126029
126049
|
async function macosClick(app, x, y, opts = {}) {
|
|
126030
126050
|
const modifiers = opts.modifiers?.length ? [...new Set(opts.modifiers)] : void 0;
|
|
126031
|
-
const moved = await app
|
|
126032
|
-
"
|
|
126033
|
-
|
|
126034
|
-
|
|
126051
|
+
const moved = await macosMouse(app, {
|
|
126052
|
+
type: "move",
|
|
126053
|
+
x,
|
|
126054
|
+
y,
|
|
126055
|
+
modifiers
|
|
126056
|
+
});
|
|
126035
126057
|
if (modifiers && !Array.isArray(moved?.modifiers)) {
|
|
126036
126058
|
throw macosFailure(
|
|
126037
126059
|
`The argent library running in ${app.bundleId} is older than this argent and cannot hold modifier keys, so nothing was clicked. Restart the app with restart-app to load the current library, then tap again.`,
|
|
@@ -126049,6 +126071,74 @@ async function macosClick(app, x, y, opts = {}) {
|
|
|
126049
126071
|
}
|
|
126050
126072
|
async function macosScroll(app, event2) {
|
|
126051
126073
|
await app.call("Input.scroll", insideMaxEdges(event2));
|
|
126074
|
+
rememberPointer(app, event2);
|
|
126075
|
+
}
|
|
126076
|
+
var lastPointers = /* @__PURE__ */ new WeakMap();
|
|
126077
|
+
function rememberPointer(app, point) {
|
|
126078
|
+
const pid = app.handshake()?.pid;
|
|
126079
|
+
if (pid === void 0) lastPointers.delete(app);
|
|
126080
|
+
else lastPointers.set(app, { pid, x: point.x, y: point.y });
|
|
126081
|
+
}
|
|
126082
|
+
function lastPointer(app) {
|
|
126083
|
+
const last = lastPointers.get(app);
|
|
126084
|
+
return last && last.pid === app.handshake()?.pid ? last : void 0;
|
|
126085
|
+
}
|
|
126086
|
+
var MACOS_HOVER_DURATION_MS = 150;
|
|
126087
|
+
var HOVER_STEP_MS = 16;
|
|
126088
|
+
var MACOS_HOVER_SETTLE_MS = 300;
|
|
126089
|
+
function hoverUnsupported(app, outcome) {
|
|
126090
|
+
return macosFailure(
|
|
126091
|
+
`The argent library running in ${app.bundleId} is older than this argent and cannot hover, so ${outcome}. Restart the app with restart-app to load the current library, then hover again.`,
|
|
126092
|
+
FAILURE_CODES.MACOS_APP_LIBRARY_OUTDATED,
|
|
126093
|
+
"macos_hover",
|
|
126094
|
+
"unsupported"
|
|
126095
|
+
);
|
|
126096
|
+
}
|
|
126097
|
+
async function macosHover(app, x, y, opts = {}) {
|
|
126098
|
+
const from2 = lastPointer(app);
|
|
126099
|
+
const durationMs = opts.durationMs ?? MACOS_HOVER_DURATION_MS;
|
|
126100
|
+
const steps = from2 && (from2.x !== x || from2.y !== y) ? Math.max(1, Math.round(durationMs / HOVER_STEP_MS)) : 1;
|
|
126101
|
+
const throwIfAborted = (sent) => {
|
|
126102
|
+
if (!opts.signal?.aborted) return;
|
|
126103
|
+
const err = new Error(`gesture-hover aborted - cancelled after ${sent} of ${steps} moves`);
|
|
126104
|
+
err.name = "AbortError";
|
|
126105
|
+
throw err;
|
|
126106
|
+
};
|
|
126107
|
+
for (let i = 1; i <= steps; i++) {
|
|
126108
|
+
throwIfAborted(i - 1);
|
|
126109
|
+
const point = i === steps || !from2 ? { x, y } : { x: from2.x + (x - from2.x) * i / steps, y: from2.y + (y - from2.y) * i / steps };
|
|
126110
|
+
const reply = await macosMouse(app, {
|
|
126111
|
+
type: "move",
|
|
126112
|
+
...point,
|
|
126113
|
+
...i > 1 ? { continues: true } : {}
|
|
126114
|
+
});
|
|
126115
|
+
if (i === 1 && reply?.hover !== true) {
|
|
126116
|
+
throw hoverUnsupported(app, "the pointer did not stay over the app");
|
|
126117
|
+
}
|
|
126118
|
+
if (reply?.takenOver === true) {
|
|
126119
|
+
throw macosFailure(
|
|
126120
|
+
`The user clicked, scrolled or typed in ${app.bundleId} during the hover and took the mouse pointer back, so argent stopped moving it and hovers nothing. Hover again once the user is done.`,
|
|
126121
|
+
FAILURE_CODES.MACOS_APP_POINTER_TAKEN_OVER,
|
|
126122
|
+
"macos_hover",
|
|
126123
|
+
"unknown"
|
|
126124
|
+
);
|
|
126125
|
+
}
|
|
126126
|
+
if (i < steps) await sleep3(HOVER_STEP_MS);
|
|
126127
|
+
}
|
|
126128
|
+
throwIfAborted(steps);
|
|
126129
|
+
await sleep3(MACOS_HOVER_SETTLE_MS);
|
|
126130
|
+
}
|
|
126131
|
+
async function macosHoverLeave(app) {
|
|
126132
|
+
try {
|
|
126133
|
+
await app.call("Input.mouse", { type: "leave" });
|
|
126134
|
+
} catch (err) {
|
|
126135
|
+
if (err instanceof Error && /type must be down, up or move/i.test(err.message)) {
|
|
126136
|
+
throw hoverUnsupported(app, "nothing changed");
|
|
126137
|
+
}
|
|
126138
|
+
throw err;
|
|
126139
|
+
}
|
|
126140
|
+
lastPointers.delete(app);
|
|
126141
|
+
await sleep3(MACOS_HOVER_SETTLE_MS);
|
|
126052
126142
|
}
|
|
126053
126143
|
var SCREENSHOT_TIMEOUT_MS = 15e3;
|
|
126054
126144
|
var PNG_SIGNATURE = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
@@ -126583,6 +126673,7 @@ async function readMacosTree(api, limits = MACOS_DESCRIBE_LIMITS) {
|
|
|
126583
126673
|
source: raw.source === "fallback" ? "macos-fallback" : "macos-devtools",
|
|
126584
126674
|
locked: raw.locked === true,
|
|
126585
126675
|
minimized: raw.minimized === true,
|
|
126676
|
+
pointerTakenOver: raw.pointerTakenOver === true,
|
|
126586
126677
|
truncated: raw.truncated === true,
|
|
126587
126678
|
unreachableCount: finite(raw.unreachableCount) ?? 0,
|
|
126588
126679
|
webErrors,
|
|
@@ -126622,6 +126713,7 @@ function toDescribe(n, outsideWindow, hidden) {
|
|
|
126622
126713
|
}
|
|
126623
126714
|
var MACOS_LOCKED_HINT = "The Mac is locked, so this tree can miss elements a custom control draws and an open context menu, and a `hidden` check cannot pass until the Mac is unlocked. Taps, typing and screenshots still work.";
|
|
126624
126715
|
var MACOS_FALLBACK_HINT = "The app's accessibility tree is not available, so this tree comes from a fallback walk that can miss elements a custom control draws and an open context menu.";
|
|
126716
|
+
var MACOS_POINTER_TAKEN_OVER_HINT = "The user took the mouse pointer back from argent's last hover, so the hover has ended. Hover again with gesture-hover if you need it.";
|
|
126625
126717
|
var MACOS_MINIMIZED_HINT = "The app window is minimized, so this tree is empty, and taps, key presses and screenshots fail. To restore the window, choose it in the Window menu with menu-bar.";
|
|
126626
126718
|
function macosTreeData(read, tree, extraHints = []) {
|
|
126627
126719
|
const hints = [];
|
|
@@ -126647,6 +126739,7 @@ function macosTreeData(read, tree, extraHints = []) {
|
|
|
126647
126739
|
if (read.webErrors.length > 0) {
|
|
126648
126740
|
hints.push(`Web content could not be read (${read.webErrors.join("; ")}).`);
|
|
126649
126741
|
}
|
|
126742
|
+
if (read.pointerTakenOver) hints.push(MACOS_POINTER_TAKEN_OVER_HINT);
|
|
126650
126743
|
hints.push(...extraHints);
|
|
126651
126744
|
const data = { tree, source: read.source };
|
|
126652
126745
|
if (hints.length > 0) data.hint = hints.join(" ");
|
|
@@ -137051,11 +137144,11 @@ async function bootIos(udid, registry2, force, headless, prepareOnly) {
|
|
|
137051
137144
|
else await clearAutomationEnabledOrWarn(udid);
|
|
137052
137145
|
const ndRef = nativeDevtoolsRef({ id: udid, platform: "ios", kind: "simulator" });
|
|
137053
137146
|
const ndApi = await registry2.resolveService(ndRef.urn, ndRef.options);
|
|
137054
|
-
await ndApi.
|
|
137147
|
+
await ndApi.retryEnvNow().catch(() => {
|
|
137055
137148
|
});
|
|
137056
137149
|
const initFailure = ndApi.getInitFailure();
|
|
137057
137150
|
if (initFailure?.givenUp) {
|
|
137058
|
-
return buildInitFailedResult(udid, initFailure);
|
|
137151
|
+
return buildInitFailedResult(udid, initFailure, { afterBoot: true });
|
|
137059
137152
|
}
|
|
137060
137153
|
if (!deviceSet) {
|
|
137061
137154
|
await execFileAsync27("defaults", [
|
|
@@ -137120,9 +137213,11 @@ async function bootIosRemote(id, registry2, force) {
|
|
|
137120
137213
|
await simctlBootstatus(id, { boot: true });
|
|
137121
137214
|
const ndRef = nativeDevtoolsRef({ id, platform: "ios-remote", kind: "simulator" });
|
|
137122
137215
|
const ndApi = await registry2.resolveService(ndRef.urn, ndRef.options);
|
|
137216
|
+
if (ndApi.getInitFailure()?.givenUp) await ndApi.retryEnvNow().catch(() => {
|
|
137217
|
+
});
|
|
137123
137218
|
const initFailure = ndApi.getInitFailure();
|
|
137124
137219
|
if (initFailure?.givenUp) {
|
|
137125
|
-
return buildInitFailedResult(id, initFailure);
|
|
137220
|
+
return buildInitFailedResult(id, initFailure, { afterBoot: true });
|
|
137126
137221
|
}
|
|
137127
137222
|
return { platform: "ios-remote", udid: id, booted: true };
|
|
137128
137223
|
}
|
|
@@ -141551,15 +141646,85 @@ Returns \`{ scrolled: true, timestampMs }\`. Fails if CDP is unreachable<flag:ma
|
|
|
141551
141646
|
}
|
|
141552
141647
|
};
|
|
141553
141648
|
|
|
141649
|
+
// ../tool-server/src/tools/gesture-hover/index.ts
|
|
141650
|
+
init_zod();
|
|
141651
|
+
init_capability();
|
|
141652
|
+
init_device_info();
|
|
141653
|
+
var capability13 = {
|
|
141654
|
+
macos: { app: true, catalyst: true }
|
|
141655
|
+
};
|
|
141656
|
+
var MAX_DURATION_MS2 = 2e3;
|
|
141657
|
+
function hoverDescription(params, tense) {
|
|
141658
|
+
if (params.leave) {
|
|
141659
|
+
return `${tense === "present" ? "Moving" : "Moved"} the pointer out of the window`;
|
|
141660
|
+
}
|
|
141661
|
+
const at = `(${Math.round((params.x ?? 0) * 100)}%, ${Math.round((params.y ?? 0) * 100)}%)`;
|
|
141662
|
+
return `${tense === "present" ? "Hovering" : "Hovered"} at ${at}`;
|
|
141663
|
+
}
|
|
141664
|
+
var zodSchema22 = external_exports.object({
|
|
141665
|
+
udid: external_exports.string().describe("Mac app device ID from `list-devices`."),
|
|
141666
|
+
x: external_exports.number().min(0).max(1).optional().describe(
|
|
141667
|
+
"Horizontal fraction of the area reported by `describe`, measured from the left. Required unless `leave` is true."
|
|
141668
|
+
),
|
|
141669
|
+
y: external_exports.number().min(0).max(1).optional().describe(
|
|
141670
|
+
"Vertical fraction of the area reported by `describe`, measured from the top. Required unless `leave` is true."
|
|
141671
|
+
),
|
|
141672
|
+
durationMs: external_exports.number().int().min(0).max(MAX_DURATION_MS2).optional().describe(
|
|
141673
|
+
`Approximate move duration in milliseconds from Argent's last pointer position (default ${MACOS_HOVER_DURATION_MS}). Use 0 to move directly. The pointer also moves directly when there is no starting position, such as immediately after \`leave\`.`
|
|
141674
|
+
),
|
|
141675
|
+
leave: external_exports.boolean().optional().describe(
|
|
141676
|
+
"Set true to move the pointer out of the window and clear the hover. Omit `x`, `y`, and `durationMs`."
|
|
141677
|
+
)
|
|
141678
|
+
}).refine(
|
|
141679
|
+
(p) => p.leave === true ? p.x === void 0 && p.y === void 0 && p.durationMs === void 0 : p.x !== void 0 && p.y !== void 0,
|
|
141680
|
+
{
|
|
141681
|
+
message: "Pass x and y to hover over a point, or leave: true alone to move the pointer out of the window."
|
|
141682
|
+
}
|
|
141683
|
+
);
|
|
141684
|
+
var gestureHoverTool = {
|
|
141685
|
+
id: "gesture-hover",
|
|
141686
|
+
description: `Move Argent's pointer in a Mac app to check hover effects, such as controls that appear on hover. Standard macOS tooltips are unavailable. Use \`gesture-tap\` directly to click a visible control. It moves the pointer before clicking.
|
|
141687
|
+
The pointer stays in place until another pointer action or until the user clicks, scrolls, or presses a key in the app. If user input interrupts the move, the call fails with \`MACOS_APP_POINTER_TAKEN_OVER\`. Retry once the user finishes.
|
|
141688
|
+
On \`MACOS_APP_LIBRARY_OUTDATED\`, run \`restart-app\` to reload the library, then retry.`,
|
|
141689
|
+
zodSchema: zodSchema22,
|
|
141690
|
+
searchHint: "hover mouse over mouseover pointer rollover mouseEnter mouse enter leave highlight reveal mac app",
|
|
141691
|
+
featureFlag: "macos-apps",
|
|
141692
|
+
interaction: {
|
|
141693
|
+
startedMsg: ({ params }) => hoverDescription(params, "present"),
|
|
141694
|
+
completedMsg: ({ params }) => hoverDescription(params, "past"),
|
|
141695
|
+
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to ${params.leave ? "move the pointer out" : "hover"}: ${failureSignal2.error_code}`
|
|
141696
|
+
},
|
|
141697
|
+
capability: capability13,
|
|
141698
|
+
services: (params) => {
|
|
141699
|
+
const device = resolveDevice(params.udid);
|
|
141700
|
+
return device.platform === "macos" ? macosAppServices(device) : {};
|
|
141701
|
+
},
|
|
141702
|
+
async execute(services, params, ctx) {
|
|
141703
|
+
const device = resolveDevice(params.udid);
|
|
141704
|
+
assertSupported("gesture-hover", capability13, device);
|
|
141705
|
+
const app = requireMacosApp(services, "gesture-hover", device);
|
|
141706
|
+
const timestampMs = Date.now();
|
|
141707
|
+
if (params.leave) {
|
|
141708
|
+
await macosHoverLeave(app);
|
|
141709
|
+
return { left: true, timestampMs };
|
|
141710
|
+
}
|
|
141711
|
+
await macosHover(app, params.x, params.y, {
|
|
141712
|
+
durationMs: params.durationMs,
|
|
141713
|
+
signal: ctx?.signal
|
|
141714
|
+
});
|
|
141715
|
+
return { hovered: true, timestampMs };
|
|
141716
|
+
}
|
|
141717
|
+
};
|
|
141718
|
+
|
|
141554
141719
|
// ../tool-server/src/tools/gesture-drag/index.ts
|
|
141555
141720
|
init_zod();
|
|
141556
141721
|
init_device_info();
|
|
141557
141722
|
var sleep8 = (ms3) => new Promise((r) => setTimeout(r, ms3));
|
|
141558
141723
|
var MOMENTUM_FREE_EASE_EXPONENT2 = 3;
|
|
141559
141724
|
var MOMENTUM_FREE_MIN_STEPS = 8;
|
|
141560
|
-
var
|
|
141725
|
+
var MAX_DURATION_MS3 = 1e4;
|
|
141561
141726
|
var MACOS_LONG_PRESS_MS = 800;
|
|
141562
|
-
var
|
|
141727
|
+
var capability14 = {
|
|
141563
141728
|
chromium: { app: true },
|
|
141564
141729
|
macos: { app: true, catalyst: true }
|
|
141565
141730
|
};
|
|
@@ -141618,7 +141783,7 @@ async function runPointerDrag(from2, to, opts, pointer) {
|
|
|
141618
141783
|
throw err;
|
|
141619
141784
|
}
|
|
141620
141785
|
}
|
|
141621
|
-
var
|
|
141786
|
+
var zodSchema23 = external_exports.object({
|
|
141622
141787
|
udid: external_exports.string().describe(
|
|
141623
141788
|
"Chromium device id (`chromium-cdp-<port>`)<flag:macos-apps> or Mac app id</flag:macos-apps> from `list-devices`."
|
|
141624
141789
|
),
|
|
@@ -141626,8 +141791,8 @@ var zodSchema22 = external_exports.object({
|
|
|
141626
141791
|
fromY: external_exports.number().min(0).max(1).describe("Start y."),
|
|
141627
141792
|
toX: external_exports.number().min(0).max(1).describe("End x."),
|
|
141628
141793
|
toY: external_exports.number().min(0).max(1).describe("End y."),
|
|
141629
|
-
durationMs: external_exports.number().max(
|
|
141630
|
-
message: `durationMs must be at most ${
|
|
141794
|
+
durationMs: external_exports.number().max(MAX_DURATION_MS3, {
|
|
141795
|
+
message: `durationMs must be at most ${MAX_DURATION_MS3} (10s): the drag holds the left button down for exactly this long, one frame per ~16ms, so a larger value is that much wall clock spent mid-press.`
|
|
141631
141796
|
}).optional().describe(
|
|
141632
141797
|
"Drag duration in ms (default 300<flag:macos-apps>; 800 for a Mac app long press</flag:macos-apps>)."
|
|
141633
141798
|
),
|
|
@@ -141645,14 +141810,14 @@ var gestureDragTool = {
|
|
|
141645
141810
|
description: `Drag the left mouse button between normalized [0,1] window points in Chromium<flag:macos-apps> or a Mac app</flag:macos-apps>.
|
|
141646
141811
|
Use when dragging sliders, drag-and-drop items, or selecting text (use \`gesture-scroll\` to scroll desktop lists; use \`gesture-swipe\` on iOS/Android<flag:harmonyos>/HarmonyOS</flag:harmonyos>).<flag:macos-apps> Mac app: same start/end point = long press; drops stay inside the app's windows.</flag:macos-apps>
|
|
141647
141812
|
Returns \`{ dragged: true, timestampMs }\`. Fails if the CDP session is unreachable.`,
|
|
141648
|
-
zodSchema:
|
|
141813
|
+
zodSchema: zodSchema23,
|
|
141649
141814
|
searchHint: "drag drop slider mouse press move release chromium<flag:macos-apps> mac</flag:macos-apps> select",
|
|
141650
141815
|
interaction: {
|
|
141651
141816
|
startedMsg: ({ params }) => `Dragging from (${Math.round(params.fromX * 100)}%, ${Math.round(params.fromY * 100)}%) to (${Math.round(params.toX * 100)}%, ${Math.round(params.toY * 100)}%)`,
|
|
141652
141817
|
completedMsg: ({ params }) => `Dragged from (${Math.round(params.fromX * 100)}%, ${Math.round(params.fromY * 100)}%) to (${Math.round(params.toX * 100)}%, ${Math.round(params.toY * 100)}%)`,
|
|
141653
141818
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to drag: ${failureSignal2.error_code}`
|
|
141654
141819
|
},
|
|
141655
|
-
capability:
|
|
141820
|
+
capability: capability14,
|
|
141656
141821
|
services: (params) => {
|
|
141657
141822
|
const device = resolveDevice(params.udid);
|
|
141658
141823
|
if (device.platform === "macos") return macosAppServices(device);
|
|
@@ -141847,7 +142012,7 @@ function stepTo(finger, point, tMs) {
|
|
|
141847
142012
|
init_device_info();
|
|
141848
142013
|
init_capability();
|
|
141849
142014
|
var sleep9 = (ms3) => new Promise((r) => setTimeout(r, ms3));
|
|
141850
|
-
var
|
|
142015
|
+
var capability15 = {
|
|
141851
142016
|
apple: { simulator: true, device: true },
|
|
141852
142017
|
appleRemote: { simulator: true },
|
|
141853
142018
|
android: { emulator: true, device: true, unknown: true }
|
|
@@ -141928,7 +142093,7 @@ var eventSchema = external_exports.object({
|
|
|
141928
142093
|
y2: external_exports.number().min(0).max(1).optional().describe("Second finger y."),
|
|
141929
142094
|
delayMs: external_exports.number().optional().describe("Delay before event in ms (default 16).")
|
|
141930
142095
|
});
|
|
141931
|
-
var
|
|
142096
|
+
var zodSchema24 = external_exports.object({
|
|
141932
142097
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
141933
142098
|
edge: external_exports.enum(screenEdges).optional().describe("Starting screen edge for a single-finger system gesture (local iOS simulator)."),
|
|
141934
142099
|
events: external_exports.array(eventSchema).describe("Ordered touch events."),
|
|
@@ -141954,13 +142119,13 @@ Physical iOS: Down, optional Moves, then Up (\`x2\`/\`y2\` = second finger). Pla
|
|
|
141954
142119
|
Simulator/emulator: a train that ends without Up leaves the finger down and returns \`{ held: true }\`, so \`screenshot\`/\`describe\` can observe a pressed state; the next call continues it (start with Move or Up), and any new Down first lifts it. Argent lifts a held finger after 30 seconds. Not with \`edge\` or on physical iOS.
|
|
141955
142120
|
Example long-press + drag: \`[{"type":"Down","x":0.5,"y":0.6},{"type":"Move","x":0.5,"y":0.6,"delayMs":800},{"type":"Up","x":0.5,"y":0.3,"delayMs":500}]\`.
|
|
141956
142121
|
Returns \`{ events, held?, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if device is not booted or events are invalid.`,
|
|
141957
|
-
zodSchema:
|
|
142122
|
+
zodSchema: zodSchema24,
|
|
141958
142123
|
interaction: {
|
|
141959
142124
|
startedMsg: () => "Performing custom gesture",
|
|
141960
142125
|
completedMsg: () => "Performed custom gesture",
|
|
141961
142126
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to perform custom gesture: ${failureSignal2.error_code}`
|
|
141962
142127
|
},
|
|
141963
|
-
capability:
|
|
142128
|
+
capability: capability15,
|
|
141964
142129
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
141965
142130
|
// whose abort replays the call: the gesture would land once per replay.
|
|
141966
142131
|
longRunning: true,
|
|
@@ -142048,13 +142213,13 @@ async function playTrain(api, deviceId, edge, events) {
|
|
|
142048
142213
|
// ../tool-server/src/tools/gesture-pinch/index.ts
|
|
142049
142214
|
init_zod();
|
|
142050
142215
|
init_device_info();
|
|
142051
|
-
var
|
|
142216
|
+
var capability16 = {
|
|
142052
142217
|
apple: { simulator: true, device: true },
|
|
142053
142218
|
appleRemote: { simulator: true },
|
|
142054
142219
|
android: { emulator: true, device: true, unknown: true },
|
|
142055
142220
|
harmony: { device: true }
|
|
142056
142221
|
};
|
|
142057
|
-
var
|
|
142222
|
+
var zodSchema25 = external_exports.object({
|
|
142058
142223
|
udid: external_exports.string().describe(
|
|
142059
142224
|
"Device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial)."
|
|
142060
142225
|
),
|
|
@@ -142074,13 +142239,13 @@ var gesturePinchTool = {
|
|
|
142074
142239
|
description: `Send a two-finger pinch-to-zoom gesture in normalized [0,1] coords (\`startDistance < endDistance\` zooms in, e.g. 0.2\u21920.6; \`>\` zooms out).
|
|
142075
142240
|
Use when zooming maps, photos, or zoomable views (use \`gesture-rotate\` to rotate).
|
|
142076
142241
|
Returns \`{ pinched: true, timestampMs, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if the backend<flag:harmonyos> (\`hdc\` on HarmonyOS)</flag:harmonyos> is unreachable or a physical iPhone app is not in portrait.`,
|
|
142077
|
-
zodSchema:
|
|
142242
|
+
zodSchema: zodSchema25,
|
|
142078
142243
|
interaction: {
|
|
142079
142244
|
startedMsg: ({ params }) => `Pinching ${params.endDistance > params.startDistance ? "out" : "in"} at (${Math.round(params.centerX * 100)}%, ${Math.round(params.centerY * 100)}%)`,
|
|
142080
142245
|
completedMsg: ({ params }) => `Pinched ${params.endDistance > params.startDistance ? "out" : "in"} at (${Math.round(params.centerX * 100)}%, ${Math.round(params.centerY * 100)}%)`,
|
|
142081
142246
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to pinch: ${failureSignal2.error_code}`
|
|
142082
142247
|
},
|
|
142083
|
-
capability:
|
|
142248
|
+
capability: capability16,
|
|
142084
142249
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
142085
142250
|
// whose abort replays the call: the gesture would land once per replay.
|
|
142086
142251
|
longRunning: true,
|
|
@@ -142166,12 +142331,12 @@ Returns \`{ pinched: true, timestampMs, reactivated? }\` (on physical iOS, \`rea
|
|
|
142166
142331
|
// ../tool-server/src/tools/gesture-rotate/index.ts
|
|
142167
142332
|
init_zod();
|
|
142168
142333
|
init_device_info();
|
|
142169
|
-
var
|
|
142334
|
+
var capability17 = {
|
|
142170
142335
|
apple: { simulator: true, device: true },
|
|
142171
142336
|
appleRemote: { simulator: true },
|
|
142172
142337
|
android: { emulator: true, device: true, unknown: true }
|
|
142173
142338
|
};
|
|
142174
|
-
var
|
|
142339
|
+
var zodSchema26 = external_exports.object({
|
|
142175
142340
|
udid: external_exports.string().describe("Device id from `list-devices` (iOS UDID or Android serial)."),
|
|
142176
142341
|
centerX: external_exports.number().describe("Normalized rotation center x."),
|
|
142177
142342
|
centerY: external_exports.number().describe("Normalized rotation center y."),
|
|
@@ -142191,7 +142356,7 @@ var gestureRotateTool = {
|
|
|
142191
142356
|
description: `Send a two-finger circular arc gesture in normalized [0,1] coords to rotate content from \`startAngle\` to \`endAngle\`. Pass \`radius\`, or \`radiusX\`+\`radiusY\` with \`radiusX\xB7width = radiusY\xB7height\` for a circular physical orbit (a single radius or equal values trace an ellipse on a non-square screen; one half of the pair alone is rejected).
|
|
142192
142357
|
Use when rotating a map, photo, or canvas (use \`gesture-pinch\` for zoom).
|
|
142193
142358
|
Returns \`{ rotated: true, timestampMs, reactivated? }\` (on physical iOS, \`reactivated: true\` means re-describe). Fails if the backend is unreachable or a physical iPhone app is not in portrait.`,
|
|
142194
|
-
zodSchema:
|
|
142359
|
+
zodSchema: zodSchema26,
|
|
142195
142360
|
interaction: {
|
|
142196
142361
|
startedMsg: ({ params }) => {
|
|
142197
142362
|
const degrees = Math.abs(params.endAngle - params.startAngle);
|
|
@@ -142205,7 +142370,7 @@ Returns \`{ rotated: true, timestampMs, reactivated? }\` (on physical iOS, \`rea
|
|
|
142205
142370
|
},
|
|
142206
142371
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to rotate gesture: ${failureSignal2.error_code}`
|
|
142207
142372
|
},
|
|
142208
|
-
capability:
|
|
142373
|
+
capability: capability17,
|
|
142209
142374
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
142210
142375
|
// whose abort replays the call: the gesture would land once per replay.
|
|
142211
142376
|
longRunning: true,
|
|
@@ -142293,7 +142458,7 @@ var BUTTONS_BY_PLATFORM = {
|
|
|
142293
142458
|
// A Mac app has no hardware buttons; the capability omits `macos` as well.
|
|
142294
142459
|
"macos": /* @__PURE__ */ new Set([])
|
|
142295
142460
|
};
|
|
142296
|
-
var
|
|
142461
|
+
var capability18 = {
|
|
142297
142462
|
apple: { simulator: true, device: true },
|
|
142298
142463
|
appleRemote: { simulator: true },
|
|
142299
142464
|
android: { emulator: true, device: true, unknown: true },
|
|
@@ -142314,7 +142479,7 @@ var RUNNER_UNSUPPORTED_OPERATION_CODE = "UNSUPPORTED_OPERATION";
|
|
|
142314
142479
|
function isPhysicalIosButton(button) {
|
|
142315
142480
|
return PHYSICAL_IOS_BUTTONS.has(button);
|
|
142316
142481
|
}
|
|
142317
|
-
var
|
|
142482
|
+
var zodSchema27 = external_exports.object({
|
|
142318
142483
|
udid: external_exports.string().describe(
|
|
142319
142484
|
"Target device id from `list-devices` (iOS UDID<flag:harmonyos>, HarmonyOS id,</flag:harmonyos> or Android serial)."
|
|
142320
142485
|
),
|
|
@@ -142327,13 +142492,13 @@ Supported buttons depend on the platform: buttons not present on the target (e.g
|
|
|
142327
142492
|
Use when you need to trigger hardware button events.
|
|
142328
142493
|
Returns { pressed: buttonName }.
|
|
142329
142494
|
Fails if the device backend is not reachable: the simulator-server for iOS, <flag:harmonyos>\`hdc\` for HarmonyOS, </flag:harmonyos>or \`adb\` for Android.`,
|
|
142330
|
-
zodSchema:
|
|
142495
|
+
zodSchema: zodSchema27,
|
|
142331
142496
|
interaction: {
|
|
142332
142497
|
startedMsg: ({ params }) => `Pressing ${params.button} button`,
|
|
142333
142498
|
completedMsg: ({ params }) => `Pressed ${params.button} button`,
|
|
142334
142499
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to press ${params.button} button: ${failureSignal2.error_code}`
|
|
142335
142500
|
},
|
|
142336
|
-
capability:
|
|
142501
|
+
capability: capability18,
|
|
142337
142502
|
// A physical iPhone's first call waits out the runner build, past the MCP fetch timeout,
|
|
142338
142503
|
// whose abort replays the call: the press would land once per replay.
|
|
142339
142504
|
longRunning: true,
|
|
@@ -143701,7 +143866,7 @@ var harmonyImpl5 = {
|
|
|
143701
143866
|
};
|
|
143702
143867
|
|
|
143703
143868
|
// ../tool-server/src/tools/keyboard/index.ts
|
|
143704
|
-
var
|
|
143869
|
+
var capability19 = {
|
|
143705
143870
|
apple: { simulator: true, device: true },
|
|
143706
143871
|
appleRemote: { simulator: true },
|
|
143707
143872
|
android: { emulator: true, device: true, unknown: true },
|
|
@@ -143710,7 +143875,7 @@ var capability18 = {
|
|
|
143710
143875
|
harmony: { device: true },
|
|
143711
143876
|
macos: { app: true, catalyst: true }
|
|
143712
143877
|
};
|
|
143713
|
-
var
|
|
143878
|
+
var zodSchema28 = external_exports.object({
|
|
143714
143879
|
udid: external_exports.string().describe("Target device id from `list-devices`."),
|
|
143715
143880
|
text: external_exports.string().optional().describe(
|
|
143716
143881
|
"Text to type. Cannot be combined with `key`. Use `{{secret:NAME}}` for credentials, looked up where the MCP server started, first match wins: the `ARGENT_SECRET_NAME` env var, the project's `.argent/secrets.env`, `ARGENT_SECRET_NAME` in the project's `.env.local` or `.env`, then `~/.argent/secrets.env`. Ask the user to configure missing secrets there without sharing their values. Secret placeholders suppress the automatic screenshot for the call. Use one `run-sequence` to type a secret and press Enter with the same protection."
|
|
@@ -143731,7 +143896,7 @@ var zodSchema27 = external_exports.object({
|
|
|
143731
143896
|
function createKeyboardTool(registry2) {
|
|
143732
143897
|
const dispatch = dispatchByPlatform({
|
|
143733
143898
|
toolId: "keyboard",
|
|
143734
|
-
capability:
|
|
143899
|
+
capability: capability19,
|
|
143735
143900
|
ios: makeIosImpl3(registry2),
|
|
143736
143901
|
iosDevice: makeIosDeviceImpl(registry2),
|
|
143737
143902
|
iosRemote: makeIosRemoteImpl(registry2),
|
|
@@ -143746,7 +143911,7 @@ function createKeyboardTool(registry2) {
|
|
|
143746
143911
|
description: `Type text or press a named key on the focused field (tap or focus the field first; with no focus input is silently dropped).
|
|
143747
143912
|
Use when entering text or triggering named keys (enter, escape, backspace, arrows).
|
|
143748
143913
|
Returns { typed, keys, cleared?, verified?, warning?, reactivated? }. Fails if an unsupported key or untypeable character is passed or the input backend is unreachable (partial typing is not rolled back: on an iOS simulator or Chromium, the characters before an untypeable one stay typed; re-read before retrying). On iOS simulators, typing into an empty field verifies readback (\`verified: false\` warns). React Native: after typing, the next tap outside may only close the keyboard (tap again if so); where the field submits on return, \`key: "enter"\` avoids the extra tap.`,
|
|
143749
|
-
zodSchema:
|
|
143914
|
+
zodSchema: zodSchema28,
|
|
143750
143915
|
alwaysLoad: true,
|
|
143751
143916
|
searchHint: "type text keyboard input named key enter escape arrow tv vega fire tv <flag:harmonyos>harmony harmonyos </flag:harmonyos>search field hid leanback",
|
|
143752
143917
|
interaction: {
|
|
@@ -143776,7 +143941,7 @@ Returns { typed, keys, cleared?, verified?, warning?, reactivated? }. Fails if a
|
|
|
143776
143941
|
},
|
|
143777
143942
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to use keyboard: ${failureSignal2.error_code}`
|
|
143778
143943
|
},
|
|
143779
|
-
capability:
|
|
143944
|
+
capability: capability19,
|
|
143780
143945
|
// Typing time grows with text length on several backends and can outlast the MCP
|
|
143781
143946
|
// fetch timeout, whose abort replays the call: the text would be typed twice.
|
|
143782
143947
|
longRunning: true,
|
|
@@ -143978,7 +144143,7 @@ function makeMacosImpl2(registry2) {
|
|
|
143978
144143
|
}
|
|
143979
144144
|
|
|
143980
144145
|
// ../tool-server/src/tools/paste/index.ts
|
|
143981
|
-
var
|
|
144146
|
+
var capability20 = {
|
|
143982
144147
|
apple: { simulator: true },
|
|
143983
144148
|
// A remote sim pastes over the MoQ transport (`simctl pbcopy` + ⌘V); the HTTP
|
|
143984
144149
|
// clipboard route does not exist there.
|
|
@@ -144015,7 +144180,7 @@ function serializedPerDevice(deviceId, task) {
|
|
|
144015
144180
|
function createPasteTool(registry2) {
|
|
144016
144181
|
const dispatch = dispatchByPlatform({
|
|
144017
144182
|
toolId: "paste",
|
|
144018
|
-
capability:
|
|
144183
|
+
capability: capability20,
|
|
144019
144184
|
ios: makeIosImpl4(registry2),
|
|
144020
144185
|
iosRemote: makeIosRemoteImpl2(registry2),
|
|
144021
144186
|
android: makeAndroidImpl2(registry2),
|
|
@@ -144033,7 +144198,7 @@ Returns \`{ pasted: true, via? }\`. Fails on TV targets, if clipboard/typing fai
|
|
|
144033
144198
|
completedMsg: () => "Pasted text",
|
|
144034
144199
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to paste text: ${failureSignal2.error_code}`
|
|
144035
144200
|
},
|
|
144036
|
-
capability:
|
|
144201
|
+
capability: capability20,
|
|
144037
144202
|
services: () => ({}),
|
|
144038
144203
|
execute: async (services, params, options) => {
|
|
144039
144204
|
const { text, secrets } = resolveSecretPlaceholders(params.text, {
|
|
@@ -144057,12 +144222,12 @@ init_zod();
|
|
|
144057
144222
|
init_device_info();
|
|
144058
144223
|
init_adb();
|
|
144059
144224
|
init_capability();
|
|
144060
|
-
var
|
|
144225
|
+
var capability21 = {
|
|
144061
144226
|
apple: { simulator: true },
|
|
144062
144227
|
appleRemote: { simulator: true },
|
|
144063
144228
|
android: { emulator: true, device: true, unknown: true }
|
|
144064
144229
|
};
|
|
144065
|
-
var
|
|
144230
|
+
var zodSchema29 = external_exports.object({
|
|
144066
144231
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
144067
144232
|
orientation: external_exports.enum(["Portrait", "LandscapeLeft", "LandscapeRight", "PortraitUpsideDown"]).describe("Target orientation")
|
|
144068
144233
|
});
|
|
@@ -144076,13 +144241,13 @@ function createRotateTool(registry2) {
|
|
|
144076
144241
|
Use when testing layout in a different orientation. Re-run \`describe\` afterwards: frame coordinates change with the orientation.
|
|
144077
144242
|
On an unfolded foldable iOS simulator (the iPhone Duo), the value sets the orientation of the device, not of the UI: \`Portrait\` gives a landscape UI and \`LandscapeLeft\` gives a portrait UI. To fold or unfold the device, use \`fold\`.
|
|
144078
144243
|
Returns { orientation }. Fails on a TV target, or if the target device is not booted.`,
|
|
144079
|
-
zodSchema:
|
|
144244
|
+
zodSchema: zodSchema29,
|
|
144080
144245
|
interaction: {
|
|
144081
144246
|
startedMsg: ({ params }) => `Rotating device to ${params.orientation}`,
|
|
144082
144247
|
completedMsg: ({ params }) => `Rotated device to ${params.orientation}`,
|
|
144083
144248
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to rotate device: ${failureSignal2.error_code}`
|
|
144084
144249
|
},
|
|
144085
|
-
capability:
|
|
144250
|
+
capability: capability21,
|
|
144086
144251
|
// The simulator-server is resolved in execute, after the Android TV check, so a
|
|
144087
144252
|
// TV is refused without first starting one.
|
|
144088
144253
|
services: () => ({}),
|
|
@@ -144514,7 +144679,7 @@ var androidImpl6 = {
|
|
|
144514
144679
|
};
|
|
144515
144680
|
|
|
144516
144681
|
// ../tool-server/src/tools/shake/index.ts
|
|
144517
|
-
var
|
|
144682
|
+
var capability22 = {
|
|
144518
144683
|
// Simulator only: a physical iPhone's motion is real hardware, with no
|
|
144519
144684
|
// host-side hook to fake it.
|
|
144520
144685
|
apple: { simulator: true },
|
|
@@ -144544,13 +144709,13 @@ Returns \`{ shaken: true, count }\`. Fails on physical devices or TVs.`,
|
|
|
144544
144709
|
completedMsg: ({ params }) => params.count && params.count > 1 ? `Shook device ${params.count}x` : "Shook device",
|
|
144545
144710
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to shake device: ${failureSignal2.error_code}`
|
|
144546
144711
|
},
|
|
144547
|
-
capability:
|
|
144712
|
+
capability: capability22,
|
|
144548
144713
|
// No simulator-server is resolved: `simctl`/`adb` are called directly, so a
|
|
144549
144714
|
// tool that never uses one doesn't spawn it or wait for it to be ready.
|
|
144550
144715
|
services: () => ({}),
|
|
144551
144716
|
execute: dispatchByPlatform({
|
|
144552
144717
|
toolId: "shake",
|
|
144553
|
-
capability:
|
|
144718
|
+
capability: capability22,
|
|
144554
144719
|
ios: iosImpl4,
|
|
144555
144720
|
iosRemote: iosRemoteImpl6,
|
|
144556
144721
|
android: androidImpl6
|
|
@@ -144796,7 +144961,7 @@ var chromiumImpl3 = {
|
|
|
144796
144961
|
};
|
|
144797
144962
|
|
|
144798
144963
|
// ../tool-server/src/tools/network-conditions/index.ts
|
|
144799
|
-
var
|
|
144964
|
+
var capability23 = {
|
|
144800
144965
|
apple: { simulator: true },
|
|
144801
144966
|
android: { emulator: true },
|
|
144802
144967
|
chromium: { app: true }
|
|
@@ -144813,7 +144978,7 @@ Returns the scope and applied conditions (or null on reset), or on iOS a \`{ sta
|
|
|
144813
144978
|
completedMsg: () => "Set network conditions",
|
|
144814
144979
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to set network conditions: ${failureSignal2.error_code}`
|
|
144815
144980
|
},
|
|
144816
|
-
capability:
|
|
144981
|
+
capability: capability23,
|
|
144817
144982
|
services: (params) => {
|
|
144818
144983
|
const device = resolveDevice(params.udid);
|
|
144819
144984
|
if (device.platform === "chromium") return { chromium: chromiumCdpRef(device) };
|
|
@@ -144825,7 +144990,7 @@ Returns the scope and applied conditions (or null on reset), or on iOS a \`{ sta
|
|
|
144825
144990
|
},
|
|
144826
144991
|
execute: dispatchByPlatform({
|
|
144827
144992
|
toolId: "network-conditions",
|
|
144828
|
-
capability:
|
|
144993
|
+
capability: capability23,
|
|
144829
144994
|
ios: iosImpl5,
|
|
144830
144995
|
android: androidImpl7,
|
|
144831
144996
|
chromium: chromiumImpl3
|
|
@@ -145170,7 +145335,7 @@ var iosRemoteImpl7 = {
|
|
|
145170
145335
|
var POSTURES3 = ["closed", "half-open", "open"];
|
|
145171
145336
|
var POSTURE_ANGLE2 = { "closed": 0, "half-open": 120, "open": 180 };
|
|
145172
145337
|
var HINGE_REQUEST_TIMEOUT_MS = 3e4;
|
|
145173
|
-
var
|
|
145338
|
+
var capability24 = {
|
|
145174
145339
|
// The server itself rejects a device that is not foldable, with its own
|
|
145175
145340
|
// reason.
|
|
145176
145341
|
apple: { simulator: true },
|
|
@@ -145289,7 +145454,7 @@ var iosImpl6 = {
|
|
|
145289
145454
|
};
|
|
145290
145455
|
}
|
|
145291
145456
|
};
|
|
145292
|
-
var
|
|
145457
|
+
var zodSchema30 = external_exports.object({
|
|
145293
145458
|
udid: external_exports.string().describe(
|
|
145294
145459
|
"Foldable device id from `list-devices` (iOS simulator UDID or Android emulator serial)."
|
|
145295
145460
|
),
|
|
@@ -145304,7 +145469,7 @@ var foldTool = {
|
|
|
145304
145469
|
Use when testing an app across folded/unfolded postures (\`list-devices\` marks \`foldable: true\`; use \`rotate\` for orientation). Coordinates change with the active panel, so read the returned tree or call \`describe\` before tapping.
|
|
145305
145470
|
iOS: fold to \`closed\`/\`open\` to guarantee a panel switch; returns \`{ activeScreen, screen, posture?, hingeAngle, warning? }\`. A remote iOS simulator returns it without the panel size. Android: returns \`{ posture?, deviceState, hingeAngle?, warning? }\` (use Pixel Fold AVD for accurate cover-panel coords).
|
|
145306
145471
|
Fails if the device is not foldable or is a physical Android device.`,
|
|
145307
|
-
zodSchema:
|
|
145472
|
+
zodSchema: zodSchema30,
|
|
145308
145473
|
searchHint: "fold unfold hinge foldable duo posture open closed half-open panel screen split view",
|
|
145309
145474
|
interaction: {
|
|
145310
145475
|
startedMsg: ({ params }) => `Folding device to ${targetLabel2(params)}`,
|
|
@@ -145315,7 +145480,7 @@ Fails if the device is not foldable or is a physical Android device.`,
|
|
|
145315
145480
|
// send it again while the first is still moving the hinge. Every wait in
|
|
145316
145481
|
// it has a bound of its own.
|
|
145317
145482
|
longRunning: true,
|
|
145318
|
-
capability:
|
|
145483
|
+
capability: capability24,
|
|
145319
145484
|
// The Android hinge is moved through `adb` and a remote one by its runner,
|
|
145320
145485
|
// so no simulator-server is spawned for either; the server follows the new
|
|
145321
145486
|
// panel on its own.
|
|
@@ -145325,7 +145490,7 @@ Fails if the device is not foldable or is a physical Android device.`,
|
|
|
145325
145490
|
},
|
|
145326
145491
|
execute: dispatchByPlatform({
|
|
145327
145492
|
toolId: "fold",
|
|
145328
|
-
capability:
|
|
145493
|
+
capability: capability24,
|
|
145329
145494
|
ios: iosImpl6,
|
|
145330
145495
|
iosRemote: iosRemoteImpl7,
|
|
145331
145496
|
android: androidImpl8
|
|
@@ -145404,7 +145569,7 @@ var vegaImpl5 = {
|
|
|
145404
145569
|
|
|
145405
145570
|
// ../tool-server/src/tools/tv-remote/index.ts
|
|
145406
145571
|
var BUTTONS = [...REMOTE_BUTTONS];
|
|
145407
|
-
var
|
|
145572
|
+
var capability25 = {
|
|
145408
145573
|
apple: { simulator: true },
|
|
145409
145574
|
android: { emulator: true, device: true, unknown: true },
|
|
145410
145575
|
vega: { vvd: true }
|
|
@@ -145429,7 +145594,7 @@ var buttonSchema = external_exports.preprocess(
|
|
|
145429
145594
|
).describe(
|
|
145430
145595
|
'Single remote button or array path run in one call (e.g. ["up","right","select"]; prefer an array over repeated calls).'
|
|
145431
145596
|
);
|
|
145432
|
-
var
|
|
145597
|
+
var zodSchema31 = external_exports.object({
|
|
145433
145598
|
udid: external_exports.string().describe("TV device id from `list-devices` (Apple TV, Android TV, or Vega)."),
|
|
145434
145599
|
button: buttonSchema,
|
|
145435
145600
|
repeat: external_exports.number().int().min(1).max(50).optional().describe('Repeat `button` N times (default 1, e.g. `{ button: "down", repeat: 12 }`).')
|
|
@@ -145440,7 +145605,7 @@ function createTvRemoteTool(registry2) {
|
|
|
145440
145605
|
description: `Press a TV remote / D-pad button (or array path) on Apple TV (tvOS), Android TV, or Vega (Fire TV).
|
|
145441
145606
|
Use when navigating focus or pressing remote keys on a TV instead of touch gestures. Call \`describe\` first to locate focus; check the returned tree after.
|
|
145442
145607
|
Returns \`{ pressed, count }\`. Fails on non-TV targets, or on Apple TV sim for rewind/fastForward/next/previous/volume/mute.`,
|
|
145443
|
-
zodSchema:
|
|
145608
|
+
zodSchema: zodSchema31,
|
|
145444
145609
|
searchHint: "tv remote dpad d-pad navigate focus up down left right select ok back home menu play pause rewind fast forward sequence path apple tv tvos android tv leanback vega fire tv",
|
|
145445
145610
|
interaction: {
|
|
145446
145611
|
startedMsg: ({ params }) => `Pressing ${params.button} on TV remote${(params.repeat ?? 1) > 1 ? ` ${params.repeat} times` : ""}`,
|
|
@@ -145450,11 +145615,11 @@ Returns \`{ pressed, count }\`. Fails on non-TV targets, or on Apple TV sim for
|
|
|
145450
145615
|
// A path (≤64 buttons) × repeat (≤50) flattens to thousands of presses, sent
|
|
145451
145616
|
// one round-trip at a time on the Apple/Android path — minutes of wall-clock.
|
|
145452
145617
|
longRunning: true,
|
|
145453
|
-
capability:
|
|
145618
|
+
capability: capability25,
|
|
145454
145619
|
services: () => ({}),
|
|
145455
145620
|
execute: dispatchByPlatform({
|
|
145456
145621
|
toolId: "tv-remote",
|
|
145457
|
-
capability:
|
|
145622
|
+
capability: capability25,
|
|
145458
145623
|
ios: makeIosImpl5(registry2),
|
|
145459
145624
|
android: makeAndroidImpl3(registry2),
|
|
145460
145625
|
vega: vegaImpl5
|
|
@@ -145664,9 +145829,9 @@ async function invokeSubTool(registry2, ctx, toolId, args, extra) {
|
|
|
145664
145829
|
}
|
|
145665
145830
|
function describeNestedParamError(registry2, err, toolId, dispatchedArgs, authoredArgs) {
|
|
145666
145831
|
if (getFailureSignal(err)?.error_code !== FAILURE_CODES.TOOL_INPUT_INVALID) return void 0;
|
|
145667
|
-
const
|
|
145668
|
-
if (!
|
|
145669
|
-
const parsed2 =
|
|
145832
|
+
const zodSchema90 = registry2.getTool(toolId)?.zodSchema;
|
|
145833
|
+
if (!zodSchema90) return void 0;
|
|
145834
|
+
const parsed2 = zodSchema90.safeParse(dispatchedArgs ?? {});
|
|
145670
145835
|
if (parsed2.success) return void 0;
|
|
145671
145836
|
return `Invalid params for tool "${toolId}": ${describeParamIssues(parsed2.error, authoredArgs)}`;
|
|
145672
145837
|
}
|
|
@@ -145677,6 +145842,7 @@ var ALLOWED_TOOLS = /* @__PURE__ */ new Set([
|
|
|
145677
145842
|
"gesture-swipe",
|
|
145678
145843
|
"gesture-scroll",
|
|
145679
145844
|
"gesture-drag",
|
|
145845
|
+
"gesture-hover",
|
|
145680
145846
|
"gesture-custom",
|
|
145681
145847
|
"gesture-pinch",
|
|
145682
145848
|
"gesture-rotate",
|
|
@@ -145703,7 +145869,7 @@ var SETTLE_TIMEOUT_MS3 = 1e3;
|
|
|
145703
145869
|
var SETTLE_POLL_MS2 = 50;
|
|
145704
145870
|
var TOOLS_THAT_SETTLE = /* @__PURE__ */ new Set(["gesture-tap", "button", AWAIT_UI_ELEMENT_TOOL_ID]);
|
|
145705
145871
|
var KEYS_THAT_SETTLE = /* @__PURE__ */ new Set(["enter", "return", "escape", "esc"]);
|
|
145706
|
-
var
|
|
145872
|
+
var capability26 = {
|
|
145707
145873
|
// Physical iOS is a valid outer target. Unsupported steps fail at their own gate, not the whole sequence.
|
|
145708
145874
|
apple: { simulator: true, device: true },
|
|
145709
145875
|
appleRemote: { simulator: true },
|
|
@@ -145718,7 +145884,7 @@ var capability25 = {
|
|
|
145718
145884
|
// A Mac app takes the mouse and keyboard steps; touch-only steps fail at their own gate.
|
|
145719
145885
|
macos: { app: true, catalyst: true }
|
|
145720
145886
|
};
|
|
145721
|
-
var
|
|
145887
|
+
var zodSchema32 = external_exports.object({
|
|
145722
145888
|
udid: external_exports.string().describe("Target device id from `list-devices`, shared across all steps."),
|
|
145723
145889
|
steps: external_exports.array(
|
|
145724
145890
|
external_exports.object({
|
|
@@ -145780,7 +145946,8 @@ Allowed tools (coords are [0,1] screen fractions; ? = optional):
|
|
|
145780
145946
|
gesture-swipe: fromX, fromY, toX, toY, durationMs?, momentum?
|
|
145781
145947
|
gesture-scroll: x, y, deltaX?, deltaY?, durationMs? [chromium<flag:macos-apps>/macos</flag:macos-apps>]
|
|
145782
145948
|
gesture-drag: fromX, fromY, toX, toY, durationMs?, momentum? [chromium<flag:macos-apps>/macos</flag:macos-apps>]
|
|
145783
|
-
gesture-
|
|
145949
|
+
<flag:macos-apps> gesture-hover: x, y, durationMs? (or leave: true alone) [macos]
|
|
145950
|
+
</flag:macos-apps> gesture-custom: events: [{ type: "Down"|"Move"|"Up", x, y, x2?, y2?, delayMs? }], interpolate?, edge?
|
|
145784
145951
|
gesture-pinch: centerX, centerY, startDistance, endDistance, endCenterX?, endCenterY?, angle?, durationMs?
|
|
145785
145952
|
gesture-rotate: centerX, centerY, startAngle, endAngle, radius (or radiusX+radiusY), durationMs?
|
|
145786
145953
|
button: button ("home"|"back"|"power"|"volumeUp"|"volumeDown"|"appSwitch"|"actionButton")<flag:harmonyos> [harmony: home/back/power]</flag:harmonyos>
|
|
@@ -145792,7 +145959,7 @@ Allowed tools (coords are [0,1] screen fractions; ? = optional):
|
|
|
145792
145959
|
tv-remote: button (string or string[]), repeat?
|
|
145793
145960
|
await-ui-element: condition ("exists"|"visible"|"hidden"|"text"), selector, expectedText?, textMatch?, timeoutMs?, pollIntervalMs?
|
|
145794
145961
|
await-network-request: bundleId, url, plus optional args (start capture first)`,
|
|
145795
|
-
zodSchema:
|
|
145962
|
+
zodSchema: zodSchema32,
|
|
145796
145963
|
alwaysLoad: true,
|
|
145797
145964
|
searchHint: "batch sequence multiple gesture steps sequentially",
|
|
145798
145965
|
interaction: {
|
|
@@ -145801,7 +145968,7 @@ Allowed tools (coords are [0,1] screen fractions; ? = optional):
|
|
|
145801
145968
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to run interaction sequence: ${failureSignal2.error_code}`
|
|
145802
145969
|
},
|
|
145803
145970
|
longRunning: true,
|
|
145804
|
-
capability:
|
|
145971
|
+
capability: capability26,
|
|
145805
145972
|
// Each step resolves its own services. An eager resolver can't be used
|
|
145806
145973
|
// because a tvOS udid shape-classifies as `ios` (there is no `tvos`
|
|
145807
145974
|
// platform), so declaring simulator-server would spawn a controller it
|
|
@@ -145874,7 +146041,7 @@ Allowed tools (coords are [0,1] screen fractions; ? = optional):
|
|
|
145874
146041
|
|
|
145875
146042
|
// ../tool-server/src/tools/debugger/debugger-connect.ts
|
|
145876
146043
|
init_zod();
|
|
145877
|
-
var
|
|
146044
|
+
var zodSchema33 = external_exports.object({
|
|
145878
146045
|
port: metroPortField,
|
|
145879
146046
|
device_id: external_exports.string().describe(
|
|
145880
146047
|
"Device id from `list-devices`: iOS UDID, Android/Vega serial, <flag:macos-apps>Mac app id (`macos-app-<bundle id>`), </flag:macos-apps>or Chromium id (`chromium-cdp-<port>`). Reuse this same id on subsequent `debugger-*` calls (or pass the error's `logicalDeviceId` if shared Metro is ambiguous)."
|
|
@@ -145885,7 +146052,7 @@ var debuggerConnectTool = {
|
|
|
145885
146052
|
description: `Connect to an app's JS debugger (React Native via Metro, or Chromium CDP) and start capturing console logs; reuses existing connections.<flag:macos-apps> Mac apps need a Debug build loading JS from Metro (react-native-macos 0.76+ or Mac Catalyst launched via Argent).</flag:macos-apps>
|
|
145886
146053
|
Use when starting a debug session or before other \`debugger-*\` tools (keep the same \`device_id\`; retry with \`logicalDeviceId\` only if shared Metro reports ambiguity<flag:macos-apps>; Mac apps always keep the Mac app id</flag:macos-apps>).
|
|
145887
146054
|
Returns connection info (plus \`note\` with prior log path after a crash). Fails if the runtime is unreachable.`,
|
|
145888
|
-
zodSchema:
|
|
146055
|
+
zodSchema: zodSchema33,
|
|
145889
146056
|
interaction: {
|
|
145890
146057
|
startedMsg: () => "Connecting JavaScript debugger",
|
|
145891
146058
|
completedMsg: ({ result }) => `Connected JavaScript debugger to ${result.appName || result.deviceName}`,
|
|
@@ -145917,7 +146084,7 @@ Returns connection info (plus \`note\` with prior log path after a crash). Fails
|
|
|
145917
146084
|
// ../tool-server/src/tools/debugger/debugger-status.ts
|
|
145918
146085
|
init_zod();
|
|
145919
146086
|
init_device_info();
|
|
145920
|
-
var
|
|
146087
|
+
var zodSchema34 = external_exports.object({
|
|
145921
146088
|
port: metroPortField,
|
|
145922
146089
|
device_id: external_exports.string().describe(
|
|
145923
146090
|
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
@@ -145929,7 +146096,7 @@ function createDebuggerStatusTool(registry2) {
|
|
|
145929
146096
|
description: `Check JS runtime debugger connectivity and diagnostics.
|
|
145930
146097
|
Use when verifying debugger health before other \`debugger-*\` tools.
|
|
145931
146098
|
Returns \`{ status: "connected", port, projectRoot, deviceName, appName, logicalDeviceId, isNewDebugger, loadedScripts, sourceMapReady }\` or \`{ status: "not_connected", reason, detail, guidance }\` (follow \`guidance\`; don't retry in a loop). Never fails when the runtime is simply unreachable.`,
|
|
145932
|
-
zodSchema:
|
|
146099
|
+
zodSchema: zodSchema34,
|
|
145933
146100
|
readOnly: true,
|
|
145934
146101
|
interaction: {
|
|
145935
146102
|
startedMsg: () => "Checking JavaScript debugger",
|
|
@@ -146022,7 +146189,7 @@ function guardModuleLoadErrors(expression) {
|
|
|
146022
146189
|
}
|
|
146023
146190
|
|
|
146024
146191
|
// ../tool-server/src/tools/debugger/debugger-evaluate.ts
|
|
146025
|
-
var
|
|
146192
|
+
var zodSchema35 = external_exports.object({
|
|
146026
146193
|
port: metroPortField,
|
|
146027
146194
|
device_id: external_exports.string().describe(
|
|
146028
146195
|
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
@@ -146034,7 +146201,7 @@ var debuggerEvaluateTool = {
|
|
|
146034
146201
|
description: `Run JavaScript in the app runtime (Hermes on React Native/Vega<flag:macos-apps>/Mac apps</flag:macos-apps>; V8 on Chromium; awaits Promises).
|
|
146035
146202
|
Use when inspecting runtime state (e.g. localStorage/sessionStorage on Chromium) or calling app functions.
|
|
146036
146203
|
Returns \`{ result, deviceName, appName, logicalDeviceId }\` (JSON-serialized; cyclic objects fail). Fails if disconnected or the expression throws.`,
|
|
146037
|
-
zodSchema:
|
|
146204
|
+
zodSchema: zodSchema35,
|
|
146038
146205
|
searchHint: "javascript js eval expression runtime app state localstorage sessionstorage web storage",
|
|
146039
146206
|
interaction: {
|
|
146040
146207
|
startedMsg: () => "Running JavaScript in the app",
|
|
@@ -146079,7 +146246,7 @@ Returns \`{ result, deviceName, appName, logicalDeviceId }\` (JSON-serialized; c
|
|
|
146079
146246
|
init_zod();
|
|
146080
146247
|
init_device_info();
|
|
146081
146248
|
init_src2();
|
|
146082
|
-
var
|
|
146249
|
+
var zodSchema36 = external_exports.object({
|
|
146083
146250
|
port: metroPortField,
|
|
146084
146251
|
device_id: external_exports.string().describe(
|
|
146085
146252
|
"Device id used with debugger-connect<flag:macos-apps>. For macOS, use the Mac app id</flag:macos-apps>."
|
|
@@ -146089,7 +146256,7 @@ var debuggerReloadMetroTool = {
|
|
|
146089
146256
|
id: "debugger-reload-metro",
|
|
146090
146257
|
description: `Restart the Metro JS bundle in the connected React Native app without restarting the native process.
|
|
146091
146258
|
Use when you want to apply code changes or reset JS state. Returns { reloaded, port, method (cdp or http), deviceName, appName, logicalDeviceId }. Fails if Metro is not running on the given port.<flag:macos-apps> A Mac app reload targets only that app. If it fails, restart the app. A shared Metro reload would also reload other apps.</flag:macos-apps>`,
|
|
146092
|
-
zodSchema:
|
|
146259
|
+
zodSchema: zodSchema36,
|
|
146093
146260
|
interaction: {
|
|
146094
146261
|
startedMsg: () => "Reloading the app through Metro",
|
|
146095
146262
|
completedMsg: () => "Reloaded the app through Metro",
|
|
@@ -146970,7 +147137,7 @@ function buildTextTree(data, opts) {
|
|
|
146970
147137
|
}
|
|
146971
147138
|
return lines.join("\n");
|
|
146972
147139
|
}
|
|
146973
|
-
var
|
|
147140
|
+
var zodSchema37 = external_exports.object({
|
|
146974
147141
|
port: metroPortField,
|
|
146975
147142
|
device_id: external_exports.string().describe(
|
|
146976
147143
|
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
@@ -146985,7 +147152,7 @@ function createDebuggerComponentTreeTool() {
|
|
|
146985
147152
|
description: `Fetch a compact React Native component tree with text/accessibilityLabel, \`[testID=\u2026]\`, and normalized \`(tap: x,y)\`<flag:macos-apps> (Mac app window incl. title bar)</flag:macos-apps>.
|
|
146986
147153
|
Use when you need React component names/nesting or missing Android \`testID\`s (use \`describe\` for tap targets; verify pruned wrappers with \`debugger-inspect-element\`).
|
|
146987
147154
|
Returns a text tree. Fails if the Metro debugger is disconnected.<flag:macos-apps> Mac apps: uses the root with the most components; on Paper, use \`describe\` for tap points.</flag:macos-apps>`,
|
|
146988
|
-
zodSchema:
|
|
147155
|
+
zodSchema: zodSchema37,
|
|
146989
147156
|
searchHint: "react native component tree testID testIDs selector component names hierarchy",
|
|
146990
147157
|
readOnly: true,
|
|
146991
147158
|
interaction: {
|
|
@@ -147525,7 +147692,7 @@ function filterInspectItems(items, includeSkipped = false) {
|
|
|
147525
147692
|
}
|
|
147526
147693
|
return result;
|
|
147527
147694
|
}
|
|
147528
|
-
var
|
|
147695
|
+
var zodSchema38 = external_exports.object({
|
|
147529
147696
|
port: metroPortField,
|
|
147530
147697
|
device_id: external_exports.string().describe(
|
|
147531
147698
|
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
@@ -147546,7 +147713,7 @@ var debuggerInspectElementTool = {
|
|
|
147546
147713
|
description: `Inspect the React component hierarchy at logical pixel (x, y), from the tapped leaf upward with source file:line and code snippets.
|
|
147547
147714
|
Use when finding the source file/line for a React Native element (multiply \`debugger-component-tree\` fractions by its Screen dimensions).
|
|
147548
147715
|
Returns \`{ x, y, items, truncated?, hiddenCount? }\`. Fails if disconnected or (x, y) is off-screen.<flag:macos-apps> Mac apps: uses the window root with the most components; on Paper, native views can offset hits.</flag:macos-apps>`,
|
|
147549
|
-
zodSchema:
|
|
147716
|
+
zodSchema: zodSchema38,
|
|
147550
147717
|
readOnly: true,
|
|
147551
147718
|
interaction: {
|
|
147552
147719
|
startedMsg: ({ params }) => `Inspecting element at (${params.x}, ${params.y})`,
|
|
@@ -147676,7 +147843,7 @@ var CONSOLE_LEVELS = [
|
|
|
147676
147843
|
"count",
|
|
147677
147844
|
"timeEnd"
|
|
147678
147845
|
];
|
|
147679
|
-
var
|
|
147846
|
+
var zodSchema39 = external_exports.object({
|
|
147680
147847
|
port: metroPortField,
|
|
147681
147848
|
device_id: external_exports.string().describe(
|
|
147682
147849
|
"Device id from `debugger-connect`<flag:macos-apps> (macOS: Mac app id)</flag:macos-apps>."
|
|
@@ -147690,7 +147857,7 @@ function createDebuggerLogRegistryTool(registry2) {
|
|
|
147690
147857
|
description: `Get a summary of JS console logs captured from React Native<flag:macos-apps> (including Mac apps)</flag:macos-apps> or Chromium, with newest \`entries\` inline (truncated to 300 chars).
|
|
147691
147858
|
Use when investigating warnings, errors, or console output. Check \`entries\` first; Grep \`file\` for older/full lines (never Read it whole; up to 50k lines). Use \`debugger-status\` to check connection health.
|
|
147692
147859
|
Returns \`{ status: "connected", file, entries, clusters, note? }\` (\`note\` flags missing/crashed prior sessions), or \`{ status: "not_connected", reason, guidance }\` (follow guidance; don't retry in a loop). Never fails when the runtime is simply unreachable.`,
|
|
147693
|
-
zodSchema:
|
|
147860
|
+
zodSchema: zodSchema39,
|
|
147694
147861
|
readOnly: true,
|
|
147695
147862
|
interaction: {
|
|
147696
147863
|
startedMsg: () => "Reading app logs",
|
|
@@ -147917,7 +148084,7 @@ function renderChromiumPage(records, pageIndexParam, redact2) {
|
|
|
147917
148084
|
|
|
147918
148085
|
${lines.join("\n")}`;
|
|
147919
148086
|
}
|
|
147920
|
-
var
|
|
148087
|
+
var zodSchema40 = external_exports.object({
|
|
147921
148088
|
port: metroPortField,
|
|
147922
148089
|
device_id: external_exports.string().describe(
|
|
147923
148090
|
"Device ID from `list-devices` (or `logicalDeviceId` if shared Metro capture used it)<flag:macos-apps>; Mac app: Mac app id `macos-app-<bundle id>`</flag:macos-apps>."
|
|
@@ -147931,7 +148098,7 @@ var networkLogsTool = {
|
|
|
147931
148098
|
description: `List captured JS HTTP requests (React Native) or active-tab requests (Chromium). Call \`network-capture-start\` first on iOS<flag:macos-apps>/Mac apps</flag:macos-apps>/Android (on Vega, reading starts capture). Use \`native-network-logs\` for native traffic.
|
|
147932
148099
|
Use when finding requests or comparing API calls (pass an ID to \`view-network-request-details\` for headers/bodies).
|
|
147933
148100
|
Returns a paginated list of request IDs, status, size, and timing. Fails if Chromium or the JS debugger is unreachable.`,
|
|
147934
|
-
zodSchema:
|
|
148101
|
+
zodSchema: zodSchema40,
|
|
147935
148102
|
readOnly: true,
|
|
147936
148103
|
interaction: {
|
|
147937
148104
|
startedMsg: () => "Reading network activity",
|
|
@@ -148100,7 +148267,7 @@ function truncatePostData(postData, truncated, redact2) {
|
|
|
148100
148267
|
return `${cutMarker(fullSize)}
|
|
148101
148268
|
${shownText(postData, MAX_BODY_SIZE, redact2)}...`;
|
|
148102
148269
|
}
|
|
148103
|
-
var
|
|
148270
|
+
var zodSchema41 = external_exports.object({
|
|
148104
148271
|
port: metroPortField,
|
|
148105
148272
|
device_id: external_exports.string().describe(
|
|
148106
148273
|
"Device ID for the log (or `logicalDeviceId` if JS capture used it)<flag:macos-apps>; Mac app: Mac app id</flag:macos-apps>."
|
|
@@ -148115,7 +148282,7 @@ var networkRequestTool = {
|
|
|
148115
148282
|
description: `Read full details (status, timing, redacted headers, and bodies truncated to 1000 chars) for one captured HTTP request ID. Secret values exposed to Argent show as their {{secret:NAME}} placeholders; other credentials do not.
|
|
148116
148283
|
Use when inspecting payloads or headers of a request from a network log or \`await-network-request\`.
|
|
148117
148284
|
Returns request/response details, or a not-found message (refresh the log after JS reloads). Fails if the backing debugger/CDP target is unreachable.`,
|
|
148118
|
-
zodSchema:
|
|
148285
|
+
zodSchema: zodSchema41,
|
|
148119
148286
|
readOnly: true,
|
|
148120
148287
|
interaction: {
|
|
148121
148288
|
startedMsg: ({ params }) => `Reading network request ${params.requestId}`,
|
|
@@ -149527,7 +149694,9 @@ function formatDescribeTree(root, opts) {
|
|
|
149527
149694
|
);
|
|
149528
149695
|
} else if (isMacos2) {
|
|
149529
149696
|
header.push(`Source: ${opts.source} | Mode: ${mode} | Frame: (x,y,w,h) [0,1] app window`);
|
|
149530
|
-
header.push(
|
|
149697
|
+
header.push(
|
|
149698
|
+
"Mouse only (gesture-tap / gesture-drag / gesture-scroll / gesture-hover); menu bar via menu-bar."
|
|
149699
|
+
);
|
|
149531
149700
|
} else {
|
|
149532
149701
|
header.push(`Source: ${opts.source} | Mode: ${mode} | Frame: (x,y,w,h) [0,1]`);
|
|
149533
149702
|
}
|
|
@@ -149616,7 +149785,7 @@ function withDescription(data, raw) {
|
|
|
149616
149785
|
if (data.hint) out.hint = data.hint;
|
|
149617
149786
|
return out;
|
|
149618
149787
|
}
|
|
149619
|
-
var
|
|
149788
|
+
var capability27 = {
|
|
149620
149789
|
apple: { simulator: true, device: true },
|
|
149621
149790
|
appleRemote: { simulator: true },
|
|
149622
149791
|
android: { emulator: true, device: true, unknown: true },
|
|
@@ -149628,7 +149797,7 @@ var capability26 = {
|
|
|
149628
149797
|
function makeDescribeExecute(registry2) {
|
|
149629
149798
|
return dispatchByPlatform({
|
|
149630
149799
|
toolId: "describe",
|
|
149631
|
-
capability:
|
|
149800
|
+
capability: capability27,
|
|
149632
149801
|
ios: {
|
|
149633
149802
|
requires: iosRequires,
|
|
149634
149803
|
handler: async (_services, params, device) => (
|
|
@@ -149688,7 +149857,7 @@ function makeDescribeExecute(registry2) {
|
|
|
149688
149857
|
}
|
|
149689
149858
|
});
|
|
149690
149859
|
}
|
|
149691
|
-
var
|
|
149860
|
+
var zodSchema42 = external_exports.object({
|
|
149692
149861
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
149693
149862
|
bundleId: external_exports.string().optional().describe(
|
|
149694
149863
|
"iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted)."
|
|
@@ -149706,7 +149875,7 @@ function createDescribeTool(registry2) {
|
|
|
149706
149875
|
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\`).
|
|
149707
149876
|
Returns \`{ description, source, hint? }\`: one line per element with role, label/value/id/hint, flags, and normalized \`[0,1]\` frame \`(x,y,w,h)\`. Tap 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.
|
|
149708
149877
|
For UIKit view properties (iOS sim) use \`native-find-views\`; for React Native components/testIDs use \`debugger-component-tree\`.`,
|
|
149709
|
-
zodSchema:
|
|
149878
|
+
zodSchema: zodSchema42,
|
|
149710
149879
|
alwaysLoad: true,
|
|
149711
149880
|
searchHint: "accessibility element tree ui hierarchy tap coordinates ios android chromium vega <flag:harmonyos>harmony harmonyos </flag:harmonyos><flag:macos-apps>macos mac app </flag:macos-apps>dom tv tvos apple tv android tv fire tv focus focusable remote dpad",
|
|
149712
149881
|
readOnly: true,
|
|
@@ -149715,7 +149884,7 @@ For UIKit view properties (iOS sim) use \`native-find-views\`; for React Native
|
|
|
149715
149884
|
completedMsg: () => "Read screen",
|
|
149716
149885
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read screen: ${failureSignal2.error_code}`
|
|
149717
149886
|
},
|
|
149718
|
-
capability:
|
|
149887
|
+
capability: capability27,
|
|
149719
149888
|
services: (params) => {
|
|
149720
149889
|
const device = resolveDevice(params.udid);
|
|
149721
149890
|
if (device.platform === "chromium") {
|
|
@@ -150039,12 +150208,12 @@ async function readAndroidUiTree(registry2, device) {
|
|
|
150039
150208
|
}
|
|
150040
150209
|
|
|
150041
150210
|
// ../tool-server/src/tools/ui-tree/index.ts
|
|
150042
|
-
var
|
|
150211
|
+
var capability28 = {
|
|
150043
150212
|
apple: { simulator: true },
|
|
150044
150213
|
appleRemote: { simulator: true },
|
|
150045
150214
|
android: { emulator: true, device: true, unknown: true }
|
|
150046
150215
|
};
|
|
150047
|
-
var
|
|
150216
|
+
var zodSchema43 = external_exports.object({
|
|
150048
150217
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices`.")
|
|
150049
150218
|
});
|
|
150050
150219
|
function createUiTreeTool(registry2) {
|
|
@@ -150054,7 +150223,7 @@ function createUiTreeTool(registry2) {
|
|
|
150054
150223
|
Use when a program needs element ancestry, such as an e2e engine's scoped selectors; agents use describe.
|
|
150055
150224
|
Returns { schemaVersion, roots, truncated, alertVisible, keyboardVisible, foregroundApp, unsupportedFields }.
|
|
150056
150225
|
Fails if the iOS ax-service predates the tree command; update argent.`,
|
|
150057
|
-
zodSchema:
|
|
150226
|
+
zodSchema: zodSchema43,
|
|
150058
150227
|
readOnly: true,
|
|
150059
150228
|
hideFromMcp: true,
|
|
150060
150229
|
interaction: {
|
|
@@ -150062,11 +150231,11 @@ Fails if the iOS ax-service predates the tree command; update argent.`,
|
|
|
150062
150231
|
completedMsg: () => "Read UI tree",
|
|
150063
150232
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read UI tree: ${failureSignal2.error_code}`
|
|
150064
150233
|
},
|
|
150065
|
-
capability:
|
|
150234
|
+
capability: capability28,
|
|
150066
150235
|
services: () => ({}),
|
|
150067
150236
|
execute: dispatchByPlatform({
|
|
150068
150237
|
toolId: "ui-tree",
|
|
150069
|
-
capability:
|
|
150238
|
+
capability: capability28,
|
|
150070
150239
|
ios: {
|
|
150071
150240
|
requires: iosRequires,
|
|
150072
150241
|
handler: async (_services, _params, device) => {
|
|
@@ -150093,7 +150262,7 @@ Fails if the iOS ax-service predates the tree command; update argent.`,
|
|
|
150093
150262
|
// ../tool-server/src/tools/foreground-app/index.ts
|
|
150094
150263
|
init_zod();
|
|
150095
150264
|
init_capability();
|
|
150096
|
-
var
|
|
150265
|
+
var capability29 = {
|
|
150097
150266
|
apple: { simulator: true },
|
|
150098
150267
|
appleRemote: { simulator: true },
|
|
150099
150268
|
android: { emulator: true, device: true, unknown: true }
|
|
@@ -150116,7 +150285,7 @@ async function readAndroidForegroundApp(registry2, device) {
|
|
|
150116
150285
|
const tree = adaptAndroidTree({ ...capture, truncated: false }, size);
|
|
150117
150286
|
return { bundleId: tree.foregroundApp, alertVisible: tree.alertVisible };
|
|
150118
150287
|
}
|
|
150119
|
-
var
|
|
150288
|
+
var zodSchema44 = external_exports.object({
|
|
150120
150289
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices`.")
|
|
150121
150290
|
});
|
|
150122
150291
|
function createForegroundAppTool(registry2) {
|
|
@@ -150125,7 +150294,7 @@ function createForegroundAppTool(registry2) {
|
|
|
150125
150294
|
description: `Read which app is in front, for SDK callers.
|
|
150126
150295
|
Returns { bundleId, name, alertVisible }; under a system alert, bundleId is the app it covers.
|
|
150127
150296
|
A field is unset when it is unknown.`,
|
|
150128
|
-
zodSchema:
|
|
150297
|
+
zodSchema: zodSchema44,
|
|
150129
150298
|
readOnly: true,
|
|
150130
150299
|
hideFromMcp: true,
|
|
150131
150300
|
interaction: {
|
|
@@ -150133,11 +150302,11 @@ A field is unset when it is unknown.`,
|
|
|
150133
150302
|
completedMsg: () => "Read foreground app",
|
|
150134
150303
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read foreground app: ${failureSignal2.error_code}`
|
|
150135
150304
|
},
|
|
150136
|
-
capability:
|
|
150305
|
+
capability: capability29,
|
|
150137
150306
|
services: () => ({}),
|
|
150138
150307
|
execute: dispatchByPlatform({
|
|
150139
150308
|
toolId: "foreground-app",
|
|
150140
|
-
capability:
|
|
150309
|
+
capability: capability29,
|
|
150141
150310
|
ios: {
|
|
150142
150311
|
requires: iosRequires,
|
|
150143
150312
|
handler: async (_services, _params, device) => {
|
|
@@ -150163,13 +150332,13 @@ A field is unset when it is unknown.`,
|
|
|
150163
150332
|
init_zod();
|
|
150164
150333
|
init_capability();
|
|
150165
150334
|
init_adb();
|
|
150166
|
-
var
|
|
150335
|
+
var capability30 = {
|
|
150167
150336
|
apple: { simulator: true, device: true },
|
|
150168
150337
|
appleRemote: { simulator: true },
|
|
150169
150338
|
android: { emulator: true, device: true, unknown: true },
|
|
150170
150339
|
chromium: { app: true }
|
|
150171
150340
|
};
|
|
150172
|
-
var
|
|
150341
|
+
var zodSchema45 = external_exports.object({
|
|
150173
150342
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
150174
150343
|
text: external_exports.string().describe(
|
|
150175
150344
|
'The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`.'
|
|
@@ -150178,7 +150347,7 @@ var zodSchema44 = external_exports.object({
|
|
|
150178
150347
|
function createFillTool(registry2) {
|
|
150179
150348
|
const dispatch = dispatchByPlatform({
|
|
150180
150349
|
toolId: "fill",
|
|
150181
|
-
capability:
|
|
150350
|
+
capability: capability30,
|
|
150182
150351
|
ios: {
|
|
150183
150352
|
requires: iosRequires,
|
|
150184
150353
|
handler: async (_services, params, device) => {
|
|
@@ -150222,7 +150391,7 @@ function createFillTool(registry2) {
|
|
|
150222
150391
|
description: `Set the text of the focused text field to exactly \`text\`, replacing what it holds; "" clears it. Tap the field first.
|
|
150223
150392
|
Returns { verified }, never the text: true when the field was read back holding the text, false on a physical iPhone, where nothing can read it back.
|
|
150224
150393
|
Fails with FILL_NO_FOCUSED_FIELD when nothing editable has focus, FILL_NOT_VERIFIED when the field does not read back the text or the device does not answer in time, FILL_UNSUPPORTED_FIELD for a field that cannot take the text (a date or time input, a newline in a single-line field; on Chromium also text over the field's maxlength, text a number input does not hold as a number, whitespace around an email address, or focus in a cross-origin frame, a closed shadow root or an <embed>; nothing is changed). Fails if the device's ax-service or devtools helper predates fill; update argent. Not supported on TV targets or Vega.`,
|
|
150225
|
-
zodSchema:
|
|
150394
|
+
zodSchema: zodSchema45,
|
|
150226
150395
|
hideFromMcp: true,
|
|
150227
150396
|
interaction: {
|
|
150228
150397
|
// Never quote `text`: it may be a credential, and these messages reach
|
|
@@ -150231,7 +150400,7 @@ Fails with FILL_NO_FOCUSED_FIELD when nothing editable has focus, FILL_NOT_VERIF
|
|
|
150231
150400
|
completedMsg: () => "Filled the focused field",
|
|
150232
150401
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to fill the field: ${failureSignal2.error_code}`
|
|
150233
150402
|
},
|
|
150234
|
-
capability:
|
|
150403
|
+
capability: capability30,
|
|
150235
150404
|
services: () => ({}),
|
|
150236
150405
|
execute: async (services, params, options) => {
|
|
150237
150406
|
const { text, secrets } = resolveSecretPlaceholders(params.text, {
|
|
@@ -150981,7 +151150,7 @@ var MIN_JS_READ_MS = 1e3;
|
|
|
150981
151150
|
var BODY_READ_GRACE_MS = 1e3;
|
|
150982
151151
|
var MAX_BODY_READ_MS = 1e4;
|
|
150983
151152
|
var SHOWN_VALUE_CHARS = 200;
|
|
150984
|
-
var
|
|
151153
|
+
var zodSchema46 = external_exports.object({
|
|
150985
151154
|
udid: external_exports.string().min(1).describe("Device ID used in `network-capture-start`."),
|
|
150986
151155
|
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
150987
151156
|
"`bundleId` used in `network-capture-start` (Chromium: placeholder like `argent.capture`)."
|
|
@@ -151052,7 +151221,7 @@ function createAwaitNetworkRequestTool(registry2) {
|
|
|
151052
151221
|
id: "await-network-request",
|
|
151053
151222
|
description: `Wait for an HTTP request or check for no match with \`absent: true\`. Requires a \`network-capture-start\` window for the target. Unavailable on physical iPhones and Vega. On Chromium, match the final URL and method after redirects.
|
|
151054
151223
|
Pass \`match.id\` to \`view-network-request-details\`. \`values\` shows previews of matched values and redacts sensitive headers. A header claim check can show the claim. Check \`cause\` and \`note\` on failure. \`success: false\` fails an e2e step and stops \`run-sequence\`.`,
|
|
151055
|
-
zodSchema:
|
|
151224
|
+
zodSchema: zodSchema46,
|
|
151056
151225
|
searchHint: "wait await network request http api call fetch xhr response status url match after capture start e2e assert",
|
|
151057
151226
|
readOnly: true,
|
|
151058
151227
|
longRunning: true,
|
|
@@ -151452,7 +151621,7 @@ var TV_NO_CURSOR_STABLE_MS = 1200;
|
|
|
151452
151621
|
var DARK_TAIL_POLLS = 2;
|
|
151453
151622
|
var DARK_TAIL_MAX_MS = 2e3;
|
|
151454
151623
|
var TV_NO_CURSOR_NOTE = "no element holds focus on this screen, so a remote press may be lost";
|
|
151455
|
-
var
|
|
151624
|
+
var capability31 = {
|
|
151456
151625
|
apple: { simulator: true, device: true },
|
|
151457
151626
|
appleRemote: { simulator: true },
|
|
151458
151627
|
android: { emulator: true, device: true, unknown: true },
|
|
@@ -151488,7 +151657,7 @@ function unsettledNote(lastData, lastError, darkTailMs) {
|
|
|
151488
151657
|
if (lastData.hint) parts2.push(lastData.hint);
|
|
151489
151658
|
return parts2.join("; ");
|
|
151490
151659
|
}
|
|
151491
|
-
var
|
|
151660
|
+
var zodSchema47 = external_exports.object({
|
|
151492
151661
|
udid: external_exports.string().min(1).describe(
|
|
151493
151662
|
"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)."
|
|
151494
151663
|
),
|
|
@@ -151528,7 +151697,7 @@ function createAwaitScreenIdleTool(registry2) {
|
|
|
151528
151697
|
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\`.
|
|
151529
151698
|
Use when a launch or navigation must finish rendering before a screenshot or tap.
|
|
151530
151699
|
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>`,
|
|
151531
|
-
zodSchema:
|
|
151700
|
+
zodSchema: zodSchema47,
|
|
151532
151701
|
searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
|
|
151533
151702
|
readOnly: true,
|
|
151534
151703
|
interaction: {
|
|
@@ -151537,7 +151706,7 @@ Returns { settled, waitedMs, polls, note? }. If that is not seen before timeoutM
|
|
|
151537
151706
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed while waiting for screen to settle: ${failureSignal2.error_code}`
|
|
151538
151707
|
},
|
|
151539
151708
|
longRunning: true,
|
|
151540
|
-
capability:
|
|
151709
|
+
capability: capability31,
|
|
151541
151710
|
services: (params) => {
|
|
151542
151711
|
const device = resolveDevice(params.udid);
|
|
151543
151712
|
if (device.platform === "chromium") {
|
|
@@ -151547,7 +151716,7 @@ Returns { settled, waitedMs, polls, note? }. If that is not seen before timeoutM
|
|
|
151547
151716
|
},
|
|
151548
151717
|
async execute(services, params, ctx) {
|
|
151549
151718
|
const device = resolveDevice(params.udid);
|
|
151550
|
-
assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID,
|
|
151719
|
+
assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability31, device);
|
|
151551
151720
|
if (device.platform === "ios") await ensureDeps(iosRequires);
|
|
151552
151721
|
else if (device.platform === "ios-remote") await ensureDeps(["sim-remote"]);
|
|
151553
151722
|
else if (device.platform === "android") await ensureDeps(androidRequires);
|
|
@@ -151770,7 +151939,7 @@ function safeGetState(registry2, urn) {
|
|
|
151770
151939
|
return null;
|
|
151771
151940
|
}
|
|
151772
151941
|
}
|
|
151773
|
-
var
|
|
151942
|
+
var zodSchema48 = external_exports.object({
|
|
151774
151943
|
port: metroPortField,
|
|
151775
151944
|
device_id: external_exports.string().describe(
|
|
151776
151945
|
"Device ID from list-devices<flag:macos-apps>, including a Mac app ID</flag:macos-apps> (or `logicalDeviceId` on shared Metro if requested)."
|
|
@@ -151784,7 +151953,7 @@ function createReactProfilerStartTool(registry2) {
|
|
|
151784
151953
|
description: `Start recording Hermes CPU samples and React commits. Use when profiling React Native performance (pair with \`native-profiler-start\` in parallel on iOS/Android<flag:macos-apps>/Mac apps</flag:macos-apps>, then stop with \`react-profiler-stop\`).<flag:macos-apps> Mac apps need a Debug build loading JS from Metro (react-native-macos 0.76+ or Mac Catalyst); connects without debugger-connect.</flag:macos-apps>
|
|
151785
151954
|
Returns \`{ started_at, startedAtEpochMs, hermes_version, detected_architecture }\` or \`{ already_running: true, mine, owner, \u2026 }\` (ask approval before \`force: true\`). On iOS and Android, a warning names the apps with native network capture on.
|
|
151786
151955
|
Fails if Hermes or Metro CDP is unreachable.`,
|
|
151787
|
-
zodSchema:
|
|
151956
|
+
zodSchema: zodSchema48,
|
|
151788
151957
|
interaction: {
|
|
151789
151958
|
startedMsg: () => "Starting React profiler",
|
|
151790
151959
|
completedMsg: ({ result }) => result.already_running ? "React profiler was already running" : "Started React profiler",
|
|
@@ -152851,7 +153020,7 @@ function stopInProgressError() {
|
|
|
152851
153020
|
error_kind: "not_found"
|
|
152852
153021
|
});
|
|
152853
153022
|
}
|
|
152854
|
-
var
|
|
153023
|
+
var zodSchema49 = external_exports.object({
|
|
152855
153024
|
port: metroPortField,
|
|
152856
153025
|
device_id: external_exports.string().describe(
|
|
152857
153026
|
"Device ID passed to react-profiler-start<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
@@ -152863,7 +153032,7 @@ function createReactProfilerStopTool(registry2) {
|
|
|
152863
153032
|
description: `Stop React profiling and store CPU samples + commit tree for \`react-profiler-analyze\`, \`profiler-commit-query\`, and \`profiler-cpu-query\`.
|
|
152864
153033
|
Use when finishing an interaction recorded after \`react-profiler-start\`.
|
|
152865
153034
|
Returns \`{ duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices, react_render_ms, react_render_share_pct, react_render_peak_1s_pct, unattributed_*? }\`. Fails if no active session exists, CDP disconnected, or another session took over.`,
|
|
152866
|
-
zodSchema:
|
|
153035
|
+
zodSchema: zodSchema49,
|
|
152867
153036
|
// Collection can outlast the MCP client's 30 s abort. The client would then
|
|
152868
153037
|
// resend the call, and the resend fails on the stop still collecting.
|
|
152869
153038
|
longRunning: true,
|
|
@@ -153158,7 +153327,7 @@ Returns \`{ duration_ms, sample_count, fiber_renders_captured, total_react_commi
|
|
|
153158
153327
|
|
|
153159
153328
|
// ../tool-server/src/tools/profiler/react/react-profiler-status.ts
|
|
153160
153329
|
init_zod();
|
|
153161
|
-
var
|
|
153330
|
+
var zodSchema50 = external_exports.object({
|
|
153162
153331
|
port: metroPortField,
|
|
153163
153332
|
device_id: external_exports.string().describe(
|
|
153164
153333
|
"Device ID of the app to inspect<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>. During a recording, use the ID passed to react-profiler-start."
|
|
@@ -153176,7 +153345,7 @@ function createReactProfilerStatusTool(registry2) {
|
|
|
153176
153345
|
return {
|
|
153177
153346
|
id: "react-profiler-status",
|
|
153178
153347
|
description: `Check whether a React recording is running, saved, lost, or taken over. Use after an interruption to decide whether to collect the recording or start again. If the runtime is unavailable, session_status is no_react_runtime and note gives the reason.`,
|
|
153179
|
-
zodSchema:
|
|
153348
|
+
zodSchema: zodSchema50,
|
|
153180
153349
|
readOnly: true,
|
|
153181
153350
|
interaction: {
|
|
153182
153351
|
startedMsg: () => "Checking React profiler",
|
|
@@ -154853,7 +155022,7 @@ var annotationSchema = external_exports.object({
|
|
|
154853
155022
|
offsetMs: external_exports.coerce.number().describe("Ms since profiling started (`tapTimestampMs - startedAtEpochMs`)."),
|
|
154854
155023
|
label: external_exports.string().describe("Action label.")
|
|
154855
155024
|
});
|
|
154856
|
-
var
|
|
155025
|
+
var zodSchema51 = external_exports.object({
|
|
154857
155026
|
port: metroPortField,
|
|
154858
155027
|
device_id: external_exports.string().describe(
|
|
154859
155028
|
"Device ID from list-devices used for the profile<flag:macos-apps> (Mac app: its list-devices ID)</flag:macos-apps>."
|
|
@@ -154868,7 +155037,7 @@ var reactProfilerAnalyzeTool = {
|
|
|
154868
155037
|
description: `Analyze stored React profiling data into a markdown report of hot commits (\u226516ms), render cascades, root causes, and top components.
|
|
154869
155038
|
Use when \`react-profiler-stop\` has finished and you want to interpret the profile (drill down further with \`profiler-cpu-query\` / \`profiler-commit-query\`).
|
|
154870
155039
|
Returns \`{ report, reportFile, hotCommitsTotal, hotCommitsShown, sessionFiles }\`. Fails if no profiling data is stored.`,
|
|
154871
|
-
zodSchema:
|
|
155040
|
+
zodSchema: zodSchema51,
|
|
154872
155041
|
interaction: {
|
|
154873
155042
|
startedMsg: () => "Analyzing React profile",
|
|
154874
155043
|
completedMsg: () => "Analyzed React profile",
|
|
@@ -155053,7 +155222,7 @@ var import_fs6 = require("fs");
|
|
|
155053
155222
|
var fileInputs = [
|
|
155054
155223
|
{ target: "project_root", path: "${project_root}", kind: "directory" }
|
|
155055
155224
|
];
|
|
155056
|
-
var
|
|
155225
|
+
var zodSchema52 = external_exports.object({
|
|
155057
155226
|
component_name: external_exports.string().describe("Name of the React component to look up"),
|
|
155058
155227
|
project_root: external_exports.string().describe("Absolute path to the RN project root")
|
|
155059
155228
|
});
|
|
@@ -155063,7 +155232,7 @@ var reactProfilerComponentSourceTool = {
|
|
|
155063
155232
|
Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
|
|
155064
155233
|
Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
|
|
155065
155234
|
When several files define a component with the same name (e.g. platform variants like List.tsx and List.web.tsx), returns the primary match and lists the rest under otherMatches[] (file/line/col). Check it before assuming the returned file is the one you meant.`,
|
|
155066
|
-
zodSchema:
|
|
155235
|
+
zodSchema: zodSchema52,
|
|
155067
155236
|
readOnly: true,
|
|
155068
155237
|
// react-profiler-analyze runs the same AST lookup for each component in its
|
|
155069
155238
|
// table (file, line and other matches) and adds the source of the located ones
|
|
@@ -155190,7 +155359,7 @@ function renderMarkdownTable(entries) {
|
|
|
155190
155359
|
);
|
|
155191
155360
|
return [header, sep12, ...rows].join("\n");
|
|
155192
155361
|
}
|
|
155193
|
-
var
|
|
155362
|
+
var zodSchema53 = external_exports.object({
|
|
155194
155363
|
port: metroPortField,
|
|
155195
155364
|
device_id: external_exports.string().describe(
|
|
155196
155365
|
"Device ID used to record or load the React profile<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
@@ -155205,7 +155374,7 @@ FOR DEDICATED CPU INVESTIGATION ONLY: do NOT call this as part of a normal profi
|
|
|
155205
155374
|
Use react-profiler-analyze instead; it covers all React rendering performance analysis.
|
|
155206
155375
|
Use when you specifically need to investigate JS CPU hotspots that are NOT tied to React rendering (e.g. regex slowness, cryptography, heavy computations).
|
|
155207
155376
|
Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
|
|
155208
|
-
zodSchema:
|
|
155377
|
+
zodSchema: zodSchema53,
|
|
155209
155378
|
readOnly: true,
|
|
155210
155379
|
// Agents use profiler-cpu-query mode top_functions, which reads the same
|
|
155211
155380
|
// profile with per-sample intervals and idle filtered out, and has the same
|
|
@@ -155313,7 +155482,7 @@ function renderMarkdownTable2(entries) {
|
|
|
155313
155482
|
);
|
|
155314
155483
|
return [header, sep12, ...rows].join("\n");
|
|
155315
155484
|
}
|
|
155316
|
-
var
|
|
155485
|
+
var zodSchema54 = external_exports.object({
|
|
155317
155486
|
port: metroPortField,
|
|
155318
155487
|
device_id: external_exports.string().describe(
|
|
155319
155488
|
"Device ID of the app to inspect<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>. During a recording, use the ID passed to react-profiler-start."
|
|
@@ -155326,7 +155495,7 @@ var reactProfilerRendersTool = {
|
|
|
155326
155495
|
Returns a markdown table of the components with the longest total self render time. It reads the top 30 levels of the tree and does not count re-renders: record a profiling session for that.
|
|
155327
155496
|
Use when you want a quick look at what is mounted in a live connected app, without a profiling session.
|
|
155328
155497
|
Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
|
|
155329
|
-
zodSchema:
|
|
155498
|
+
zodSchema: zodSchema54,
|
|
155330
155499
|
readOnly: true,
|
|
155331
155500
|
// It walks only the top 30 fiber levels, above the screens of a real app
|
|
155332
155501
|
// (Bluesky's first feed item sits at depth 446), and counts mounts, not
|
|
@@ -155495,7 +155664,7 @@ function buildFiberTreeScript(maxDepth, filter) {
|
|
|
155495
155664
|
}
|
|
155496
155665
|
})()`;
|
|
155497
155666
|
}
|
|
155498
|
-
var
|
|
155667
|
+
var zodSchema55 = external_exports.object({
|
|
155499
155668
|
port: metroPortField,
|
|
155500
155669
|
device_id: external_exports.string().describe(
|
|
155501
155670
|
"Device ID of the app to inspect<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>. During a recording, use the ID passed to react-profiler-start."
|
|
@@ -155509,7 +155678,7 @@ var reactProfilerFiberTreeTool = {
|
|
|
155509
155678
|
Use when tracing the ancestry of a library component.
|
|
155510
155679
|
Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
|
|
155511
155680
|
Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
|
|
155512
|
-
zodSchema:
|
|
155681
|
+
zodSchema: zodSchema55,
|
|
155513
155682
|
readOnly: true,
|
|
155514
155683
|
interaction: {
|
|
155515
155684
|
startedMsg: () => "Reading React fiber tree",
|
|
@@ -160107,12 +160276,12 @@ function metroDeviceIdParam(description) {
|
|
|
160107
160276
|
}
|
|
160108
160277
|
|
|
160109
160278
|
// ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
|
|
160110
|
-
var
|
|
160279
|
+
var capability32 = {
|
|
160111
160280
|
apple: { simulator: true },
|
|
160112
160281
|
android: { emulator: true, device: true, unknown: true },
|
|
160113
160282
|
macos: { app: true, catalyst: true }
|
|
160114
160283
|
};
|
|
160115
|
-
var
|
|
160284
|
+
var zodSchema56 = external_exports.object({
|
|
160116
160285
|
device_id: metroDeviceIdParam(
|
|
160117
160286
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
160118
160287
|
),
|
|
@@ -160133,13 +160302,13 @@ var nativeProfilerStartTool = {
|
|
|
160133
160302
|
description: `Start native profiling: Instruments (CPU, hangs, leaks) on iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, or Perfetto (CPU, jank, memory) on Android.
|
|
160134
160303
|
Use when profiling native performance. Launch the target app first, wait for this call to return before reproducing the scenario, then call \`native-profiler-stop\` while the app is still running.<flag:macos-apps> Mac apps need a dev-signed build launched via Argent (use "Time Profiler" if signing/WebKit blocks the bundled template, or set \`malloc_stack_logging: true\` for leak stacks).</flag:macos-apps>
|
|
160135
160304
|
Returns \`{ status: "recording", pid, traceFile, warning? }\` (warns on iOS/Android if native network capture is active). Fails if the app, xctrace, or adb is unavailable.`,
|
|
160136
|
-
zodSchema:
|
|
160305
|
+
zodSchema: zodSchema56,
|
|
160137
160306
|
interaction: {
|
|
160138
160307
|
startedMsg: () => "Starting native profiler",
|
|
160139
160308
|
completedMsg: () => "Started native profiler",
|
|
160140
160309
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start native profiler: ${failureSignal2.error_code}`
|
|
160141
160310
|
},
|
|
160142
|
-
capability:
|
|
160311
|
+
capability: capability32,
|
|
160143
160312
|
services: (params) => {
|
|
160144
160313
|
const device = resolveDevice(params.device_id);
|
|
160145
160314
|
return {
|
|
@@ -160150,7 +160319,7 @@ Returns \`{ status: "recording", pid, traceFile, warning? }\` (warns on iOS/Andr
|
|
|
160150
160319
|
async execute(services, params) {
|
|
160151
160320
|
const api = services.session;
|
|
160152
160321
|
const device = resolveDevice(params.device_id);
|
|
160153
|
-
assertSupported("native-profiler-start",
|
|
160322
|
+
assertSupported("native-profiler-start", capability32, device);
|
|
160154
160323
|
let started;
|
|
160155
160324
|
let warning;
|
|
160156
160325
|
if (api.platform === "ios") {
|
|
@@ -160178,7 +160347,7 @@ Returns \`{ status: "recording", pid, traceFile, warning? }\` (warns on iOS/Andr
|
|
|
160178
160347
|
init_zod();
|
|
160179
160348
|
init_device_info();
|
|
160180
160349
|
init_capability();
|
|
160181
|
-
var
|
|
160350
|
+
var capability33 = {
|
|
160182
160351
|
apple: { simulator: true },
|
|
160183
160352
|
android: { emulator: true, device: true, unknown: true },
|
|
160184
160353
|
macos: { app: true, catalyst: true }
|
|
@@ -160200,7 +160369,7 @@ async function exportedFilesToArtifacts(store, files) {
|
|
|
160200
160369
|
function registerTrace(store, traceFile) {
|
|
160201
160370
|
return store.register({ hostPath: traceFile, kind: "native-profile-trace", archive: "tar.gz" });
|
|
160202
160371
|
}
|
|
160203
|
-
var
|
|
160372
|
+
var zodSchema57 = external_exports.object({
|
|
160204
160373
|
device_id: metroDeviceIdParam(
|
|
160205
160374
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
160206
160375
|
)
|
|
@@ -160209,13 +160378,13 @@ var nativeProfilerStopTool = {
|
|
|
160209
160378
|
id: "native-profiler-stop",
|
|
160210
160379
|
description: `End a native profiling session started by native-profiler-start and save the trace as a downloadable artifact.
|
|
160211
160380
|
On iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, export CPU, hangs, and leaks XML from Instruments. Check warning and exportDiagnostics for partial or skipped exports. On Android, save the Perfetto .pftrace.`,
|
|
160212
|
-
zodSchema:
|
|
160381
|
+
zodSchema: zodSchema57,
|
|
160213
160382
|
interaction: {
|
|
160214
160383
|
startedMsg: () => "Stopping native profiler",
|
|
160215
160384
|
completedMsg: ({ result }) => `Saved native profile ${result.traceFile.filename}`,
|
|
160216
160385
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop native profiler: ${failureSignal2.error_code}`
|
|
160217
160386
|
},
|
|
160218
|
-
capability:
|
|
160387
|
+
capability: capability33,
|
|
160219
160388
|
// Packaging plus the export passes routinely exceed the 30s MCP fetch timeout.
|
|
160220
160389
|
longRunning: true,
|
|
160221
160390
|
services: (params) => ({
|
|
@@ -160224,7 +160393,7 @@ On iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, export CPU, hangs, and l
|
|
|
160224
160393
|
async execute(services, params, ctx) {
|
|
160225
160394
|
const api = services.session;
|
|
160226
160395
|
const device = resolveDevice(params.device_id);
|
|
160227
|
-
assertSupported("native-profiler-stop",
|
|
160396
|
+
assertSupported("native-profiler-stop", capability33, device);
|
|
160228
160397
|
if (recordsWithXctrace(api.platform)) {
|
|
160229
160398
|
await ensureDeps(["xcrun"]);
|
|
160230
160399
|
const ios = await stopNativeProfilerIos(api);
|
|
@@ -160253,12 +160422,12 @@ On iOS<flag:macos-apps> and Mac apps</flag:macos-apps>, export CPU, hangs, and l
|
|
|
160253
160422
|
init_zod();
|
|
160254
160423
|
init_device_info();
|
|
160255
160424
|
init_capability();
|
|
160256
|
-
var
|
|
160425
|
+
var capability34 = {
|
|
160257
160426
|
apple: { simulator: true },
|
|
160258
160427
|
android: { emulator: true, device: true, unknown: true },
|
|
160259
160428
|
macos: { app: true, catalyst: true }
|
|
160260
160429
|
};
|
|
160261
|
-
var
|
|
160430
|
+
var zodSchema58 = external_exports.object({
|
|
160262
160431
|
device_id: metroDeviceIdParam(
|
|
160263
160432
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
160264
160433
|
)
|
|
@@ -160268,13 +160437,13 @@ var nativeProfilerAnalyzeTool = {
|
|
|
160268
160437
|
description: `Summarize a native trace saved by native-profiler-stop or restored with profiler-load. Returns a Markdown report with severity and suggested next steps.
|
|
160269
160438
|
Instruments reports CPU hotspots, UI hangs, and memory leaks on iOS<flag:macos-apps> and Mac apps</flag:macos-apps>. Android reports also include jank reasons, main-thread state, garbage collection, and memory growth as a weak leak signal.
|
|
160270
160439
|
Use profiler-stack-query for details behind a finding.`,
|
|
160271
|
-
zodSchema:
|
|
160440
|
+
zodSchema: zodSchema58,
|
|
160272
160441
|
interaction: {
|
|
160273
160442
|
startedMsg: () => "Analyzing native profile",
|
|
160274
160443
|
completedMsg: () => "Analyzed native profile",
|
|
160275
160444
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to analyze native profile: ${failureSignal2.error_code}`
|
|
160276
160445
|
},
|
|
160277
|
-
capability:
|
|
160446
|
+
capability: capability34,
|
|
160278
160447
|
// Parsing a trace from a recording up to RECORDING_CAP_MS long routinely exceeds
|
|
160279
160448
|
// the 30s MCP fetch timeout, and an aborted call is replayed, not cancelled.
|
|
160280
160449
|
longRunning: true,
|
|
@@ -160284,7 +160453,7 @@ Use profiler-stack-query for details behind a finding.`,
|
|
|
160284
160453
|
async execute(services, params, ctx) {
|
|
160285
160454
|
const api = services.session;
|
|
160286
160455
|
const device = resolveDevice(params.device_id);
|
|
160287
|
-
assertSupported("native-profiler-analyze",
|
|
160456
|
+
assertSupported("native-profiler-analyze", capability34, device);
|
|
160288
160457
|
let result;
|
|
160289
160458
|
if (recordsWithXctrace(api.platform)) {
|
|
160290
160459
|
await ensureDeps(["xcrun"]);
|
|
@@ -161558,7 +161727,7 @@ var launchAnalysisMode = {
|
|
|
161558
161727
|
failed: "Failed to record iOS App Launch"
|
|
161559
161728
|
}
|
|
161560
161729
|
};
|
|
161561
|
-
var
|
|
161730
|
+
var zodSchema59 = external_exports.object({
|
|
161562
161731
|
mode: external_exports.enum(["measure", "profile"]).describe("`measure`: 5 XCTest timed launches. `profile`: 1 Instruments App Launch trace."),
|
|
161563
161732
|
bundle_id: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe("Installed Release build bundle ID (not built or installed by this tool)."),
|
|
161564
161733
|
device_id: external_exports.string().optional().describe("iPhone UDID (or booted simulator UDID with `allow_simulator: true`)."),
|
|
@@ -161586,7 +161755,7 @@ var nativeProfilerLaunchAnalysisTool = {
|
|
|
161586
161755
|
description: `Profile or measure iOS app startup on an already-installed Release build (warms once, then measures).
|
|
161587
161756
|
Use when benchmarking launch time (\`measure\`: 5 XCTest launches incl. extended tasks; signed runner on iPhone) or profiling pre-first-frame CPU work (\`profile\`: Instruments App Launch trace; follow \`profilerSession.next\` with \`profiler-load\` + \`profiler-stack-query\`).
|
|
161588
161757
|
Returns \`samplesCollected\` (\`measure\`) or \`launchMs\` + \`profilerSession\` (\`profile\`). Fails if the app is not installed or no iPhone / allowed simulator is available.`,
|
|
161589
|
-
zodSchema:
|
|
161758
|
+
zodSchema: zodSchema59,
|
|
161590
161759
|
services: () => ({}),
|
|
161591
161760
|
async execute(_services, params, ctx) {
|
|
161592
161761
|
switch (params.mode) {
|
|
@@ -162287,7 +162456,7 @@ function resolveAudioSession(registry2, device) {
|
|
|
162287
162456
|
}
|
|
162288
162457
|
|
|
162289
162458
|
// ../tool-server/src/tools/audio/audio-input.ts
|
|
162290
|
-
var
|
|
162459
|
+
var zodSchema60 = external_exports.object({
|
|
162291
162460
|
udid: external_exports.string().describe("Target iOS Simulator UDID from `list-devices`."),
|
|
162292
162461
|
source: external_exports.enum(["file", "tone", "microphone"]).describe(
|
|
162293
162462
|
"`file` plays `path`, `tone` a sine wave, `microphone` restores the real microphone."
|
|
@@ -162315,7 +162484,7 @@ function createAudioInputTool(registry2) {
|
|
|
162315
162484
|
id: "audio-input",
|
|
162316
162485
|
description: `Set what apps in an iOS Simulator hear as microphone input: an audio file, a tone, or the real microphone.
|
|
162317
162486
|
A file starts playing on this call, so call it right before the action that makes the app record.`,
|
|
162318
|
-
zodSchema:
|
|
162487
|
+
zodSchema: zodSchema60,
|
|
162319
162488
|
searchHint: "audio microphone input mock fake inject voice speech sound file tone simulator mic",
|
|
162320
162489
|
interaction: {
|
|
162321
162490
|
startedMsg: ({ params }) => `Setting simulator audio input to ${params.source}`,
|
|
@@ -164242,7 +164411,7 @@ var DEFAULT_TIME_LIMIT_SECONDS = 180;
|
|
|
164242
164411
|
var MAX_TIME_LIMIT_SECONDS = 600;
|
|
164243
164412
|
var POINTER_TRAIL_LENGTH = 8;
|
|
164244
164413
|
var POINTER_REQUEST_TIMEOUT_MS = 2e3;
|
|
164245
|
-
var
|
|
164414
|
+
var capability35 = {
|
|
164246
164415
|
// A cabled iPhone records through a host-side CoreMediaIO helper, not
|
|
164247
164416
|
// simulator-server (see ios-device-stream/).
|
|
164248
164417
|
apple: { simulator: true, device: true },
|
|
@@ -164251,7 +164420,7 @@ var capability34 = {
|
|
|
164251
164420
|
// argent's library records the app's window from inside the app.
|
|
164252
164421
|
macos: { app: true, catalyst: true }
|
|
164253
164422
|
};
|
|
164254
|
-
var
|
|
164423
|
+
var zodSchema61 = external_exports.object({
|
|
164255
164424
|
udid: external_exports.string().describe(
|
|
164256
164425
|
"Target ID from `list-devices`<flag:macos-apps> (Mac app: `macos-app-<bundle id>`)</flag:macos-apps>."
|
|
164257
164426
|
),
|
|
@@ -164267,14 +164436,14 @@ function createScreenRecordingStartTool(registry2) {
|
|
|
164267
164436
|
description: `Start an MP4 recording of the device screen<flag:macos-apps> or Mac app window</flag:macos-apps>. Use when capturing video of an interaction or animation (use \`screenshot\` for a still image).
|
|
164268
164437
|
Continues until \`screen-recording-stop\` or \`timeLimitSeconds\` (always retrieve via \`screen-recording-stop\`). Requires \`ffmpeg\` on simulators, Android, and wired iPhones (needs \`transportType: "wired"\` and camera access for \`ios-screen-stream\`). Unsupported on tvOS, Chromium<flag:harmonyos>, HarmonyOS</flag:harmonyos>, and Vega.<flag:macos-apps> Mac apps: needs a visible window on one display, no capture protection, no Screen Recording permission or ffmpeg; on \`MACOS_APP_LIBRARY_OUTDATED\`, run \`restart-app\` and retry.</flag:macos-apps>
|
|
164269
164438
|
Returns \`{ outputFile }\` on the tool-server host. Fails if target is unavailable or already recording.`,
|
|
164270
|
-
zodSchema:
|
|
164439
|
+
zodSchema: zodSchema61,
|
|
164271
164440
|
searchHint: "record video screen capture movie mp4 start filming screencast",
|
|
164272
164441
|
interaction: {
|
|
164273
164442
|
startedMsg: () => "Starting screen recording",
|
|
164274
164443
|
completedMsg: () => "Started screen recording",
|
|
164275
164444
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start screen recording: ${failureSignal2.error_code}`
|
|
164276
164445
|
},
|
|
164277
|
-
capability:
|
|
164446
|
+
capability: capability35,
|
|
164278
164447
|
// A remote start first ends a leftover runner-side recording, which can
|
|
164279
164448
|
// take minutes, past the 30s MCP fetch timeout.
|
|
164280
164449
|
longRunning: true,
|
|
@@ -164287,7 +164456,7 @@ Returns \`{ outputFile }\` on the tool-server host. Fails if target is unavailab
|
|
|
164287
164456
|
async execute(services, params) {
|
|
164288
164457
|
const api = services.session;
|
|
164289
164458
|
const device = resolveDevice(params.udid);
|
|
164290
|
-
assertSupported("screen-recording-start",
|
|
164459
|
+
assertSupported("screen-recording-start", capability35, device);
|
|
164291
164460
|
const isTvOs = device.platform === "ios-remote" ? await isRemoteTvOsSimulator(params.udid) : device.platform === "ios" && device.kind !== "device" && await isTvOsSimulator(params.udid);
|
|
164292
164461
|
if (isTvOs) {
|
|
164293
164462
|
throw new FailureError(
|
|
@@ -164405,13 +164574,13 @@ init_zod();
|
|
|
164405
164574
|
init_device_info();
|
|
164406
164575
|
init_capability();
|
|
164407
164576
|
var RECORDINGS_DIR = ".argent/recordings";
|
|
164408
|
-
var
|
|
164577
|
+
var capability36 = {
|
|
164409
164578
|
apple: { simulator: true, device: true },
|
|
164410
164579
|
appleRemote: { simulator: true },
|
|
164411
164580
|
android: { emulator: true, device: true, unknown: true },
|
|
164412
164581
|
macos: { app: true, catalyst: true }
|
|
164413
164582
|
};
|
|
164414
|
-
var
|
|
164583
|
+
var zodSchema62 = external_exports.object({
|
|
164415
164584
|
udid: external_exports.string().describe(
|
|
164416
164585
|
"Target ID from `list-devices`.<flag:macos-apps> For a Mac app, use its device ID, such as `macos-app-com.example.notes`.</flag:macos-apps>"
|
|
164417
164586
|
)
|
|
@@ -164421,14 +164590,14 @@ var screenRecordingStopTool = {
|
|
|
164421
164590
|
description: `Stop a screen recording and retrieve its MP4. Call this even after the time limit or an early capture exit. The tool downloads recordings from remote simulators.
|
|
164422
164591
|
Returns the saved \`video\` and its \`durationMs\`. When trimming removes still sections, \`wallClockMs\` gives the original duration and \`trimmedMs\` gives the time removed. On a foldable simulator the video follows the active panel, keeps the first panel's size, and reports any \`panelSwitches\`.
|
|
164423
164592
|
Check \`warning\` for capture problems, such as an undetected foldable panel.<flag:macos-apps> On a Mac app, a warning can report when the video held its last frame or omitted a protected window. Quitting or restarting the app or connecting to it from another Argent tool-server during capture can discard the recording. A stop error can include a path to a recoverable video.</flag:macos-apps>`,
|
|
164424
|
-
zodSchema:
|
|
164593
|
+
zodSchema: zodSchema62,
|
|
164425
164594
|
searchHint: "stop end finish screen recording video capture save retrieve",
|
|
164426
164595
|
interaction: {
|
|
164427
164596
|
startedMsg: () => "Stopping screen recording",
|
|
164428
164597
|
completedMsg: ({ result }) => `Saved screen recording ${result.video.filename}`,
|
|
164429
164598
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop screen recording: ${failureSignal2.error_code}`
|
|
164430
164599
|
},
|
|
164431
|
-
capability:
|
|
164600
|
+
capability: capability36,
|
|
164432
164601
|
// A remote stop waits for the runner to finish the mp4, downloads it and
|
|
164433
164602
|
// re-encodes it locally, which routinely exceeds the 30s MCP fetch timeout.
|
|
164434
164603
|
longRunning: true,
|
|
@@ -164438,7 +164607,7 @@ Check \`warning\` for capture problems, such as an undetected foldable panel.<fl
|
|
|
164438
164607
|
async execute(services, params, ctx) {
|
|
164439
164608
|
const api = services.session;
|
|
164440
164609
|
const device = resolveDevice(params.udid);
|
|
164441
|
-
assertSupported("screen-recording-stop",
|
|
164610
|
+
assertSupported("screen-recording-stop", capability36, device);
|
|
164442
164611
|
const stopped = device.platform === "ios-remote" ? await stopRemoteCapture(api) : device.platform === "macos" ? await stopMacosCapture(api) : await stopCapture(api);
|
|
164443
164612
|
const artifacts = requireArtifacts(ctx);
|
|
164444
164613
|
const video = await artifacts.register({
|
|
@@ -164811,7 +164980,7 @@ var timeRangeSchema = external_exports.object({
|
|
|
164811
164980
|
start: external_exports.coerce.number().describe("Start ms."),
|
|
164812
164981
|
end: external_exports.coerce.number().describe("End ms.")
|
|
164813
164982
|
});
|
|
164814
|
-
var
|
|
164983
|
+
var zodSchema63 = external_exports.object({
|
|
164815
164984
|
port: metroPortField,
|
|
164816
164985
|
device_id: metroDeviceIdParam(
|
|
164817
164986
|
"Device ID used to record or load the React profile<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
@@ -164828,7 +164997,7 @@ var profilerCommitQueryTool = {
|
|
|
164828
164997
|
description: `Query React commit data by mode: \`by_component\`, \`by_time_range\`, \`by_index\` (full fiber dump), \`cascade_tree\` (parent\u2192child triggers), or \`render_counts\` (counts/rates across ALL commits, incl. <16ms).
|
|
164829
164998
|
Use when drilling into components, cascades, or time windows after \`react-profiler-analyze\`.
|
|
164830
164999
|
Returns a markdown table or tree. Fails if \`react-profiler-stop\` has not been called.`,
|
|
164831
|
-
zodSchema:
|
|
165000
|
+
zodSchema: zodSchema63,
|
|
164832
165001
|
readOnly: true,
|
|
164833
165002
|
interaction: {
|
|
164834
165003
|
startedMsg: ({ params }) => `Querying React commits ${params.mode.replace(/^by_/, "by ").replaceAll("_", " ")}`,
|
|
@@ -165264,7 +165433,7 @@ var timeWindowSchema = external_exports.object({
|
|
|
165264
165433
|
start: external_exports.coerce.number().describe("Start ms."),
|
|
165265
165434
|
end: external_exports.coerce.number().describe("End ms.")
|
|
165266
165435
|
});
|
|
165267
|
-
var
|
|
165436
|
+
var zodSchema64 = external_exports.object({
|
|
165268
165437
|
port: metroPortField,
|
|
165269
165438
|
device_id: metroDeviceIdParam(
|
|
165270
165439
|
"Device ID used to record or load the React profile<flag:macos-apps>. For a Mac app, use its ID from list-devices</flag:macos-apps>."
|
|
@@ -165282,7 +165451,7 @@ var profilerCpuQueryTool = {
|
|
|
165282
165451
|
description: `Query Hermes CPU samples by mode: \`top_functions\` (global hotspots, optional \`time_window_ms\`), \`time_window\` (breakdown during \`time_window_ms\`), \`call_tree\` (callees/callers for \`function_name\`), or \`component_cpu\` (CPU across \`component_name\` commits).
|
|
165283
165452
|
Use when drilling into JS CPU hotspots after \`react-profiler-analyze\`. Self-times measure sampled coverage per call path.
|
|
165284
165453
|
Returns a markdown table or call tree. Fails if no CPU profile is stored (run \`react-profiler-stop\` first).`,
|
|
165285
|
-
zodSchema:
|
|
165454
|
+
zodSchema: zodSchema64,
|
|
165286
165455
|
readOnly: true,
|
|
165287
165456
|
interaction: {
|
|
165288
165457
|
startedMsg: ({ params }) => `Querying CPU profile by ${params.mode.replaceAll("_", " ")}`,
|
|
@@ -165669,7 +165838,7 @@ async function executeAndroid(api, params) {
|
|
|
165669
165838
|
topN: params.top_n
|
|
165670
165839
|
});
|
|
165671
165840
|
}
|
|
165672
|
-
var
|
|
165841
|
+
var zodSchema65 = external_exports.object({
|
|
165673
165842
|
device_id: metroDeviceIdParam(
|
|
165674
165843
|
"Target device id from `list-devices` (iOS UDID<flag:macos-apps>, Mac app id</flag:macos-apps> or Android serial)."
|
|
165675
165844
|
),
|
|
@@ -165688,7 +165857,7 @@ var profilerStackQueryTool = {
|
|
|
165688
165857
|
description: `Query native profiler stacks after \`native-profiler-analyze\` or \`profiler-load\`: \`hang_stacks\` (by \`hang_index\`), \`function_callers\` (for \`function_name\`), \`thread_breakdown\`, or \`leak_stacks\` (iOS<flag:macos-apps>/Mac apps</flag:macos-apps>).
|
|
165689
165858
|
Use when drilling into native hangs, callers, threads, or leaks.
|
|
165690
165859
|
Returns a markdown breakdown. Fails if no native trace is loaded.`,
|
|
165691
|
-
zodSchema:
|
|
165860
|
+
zodSchema: zodSchema65,
|
|
165692
165861
|
readOnly: true,
|
|
165693
165862
|
interaction: {
|
|
165694
165863
|
startedMsg: ({ params }) => `Querying native stacks by ${stackQueryMode[params.mode]}`,
|
|
@@ -165766,7 +165935,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
|
|
|
165766
165935
|
}
|
|
165767
165936
|
|
|
165768
165937
|
// ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
|
|
165769
|
-
var
|
|
165938
|
+
var zodSchema66 = external_exports.object({
|
|
165770
165939
|
port: metroPortField,
|
|
165771
165940
|
device_id: metroDeviceIdParam(
|
|
165772
165941
|
"Device ID from list-devices used for the native profile (iOS simulator UDID, Android serial<flag:macos-apps>, or Mac app ID</flag:macos-apps>)."
|
|
@@ -165779,7 +165948,7 @@ Maps native hangs to React commits using wall-clock time alignment.
|
|
|
165779
165948
|
Call this tool when both profilers were run in parallel on the same session.
|
|
165780
165949
|
Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
|
|
165781
165950
|
Fails if either react-profiler-analyze or native-profiler-analyze has not been called first, or if the session stored no React commits.`,
|
|
165782
|
-
zodSchema:
|
|
165951
|
+
zodSchema: zodSchema66,
|
|
165783
165952
|
readOnly: true,
|
|
165784
165953
|
interaction: {
|
|
165785
165954
|
startedMsg: () => "Building combined performance report",
|
|
@@ -166469,7 +166638,7 @@ var profilerLoadAction = {
|
|
|
166469
166638
|
failure: "load"
|
|
166470
166639
|
}
|
|
166471
166640
|
};
|
|
166472
|
-
var
|
|
166641
|
+
var zodSchema67 = external_exports.object({
|
|
166473
166642
|
mode: external_exports.enum(["list", "load_react", "load_native"]).describe("`list`, `load_react`, or `load_native`."),
|
|
166474
166643
|
session_id: external_exports.string().regex(SESSION_ID_PATTERN, "session_id may only contain letters, digits, '_' and '-'").optional().describe("Session ID from `list` (required for `load_*`)."),
|
|
166475
166644
|
port: metroPortField,
|
|
@@ -166481,7 +166650,7 @@ var profilerLoadTool = {
|
|
|
166481
166650
|
description: `List or restore saved React/native profiling sessions from disk into memory for \`profiler-*-query\` / \`react-profiler-analyze\` (\`load_react\` loads CPU+commits; \`load_native\` loads xctrace on iOS<flag:macos-apps>/Mac apps</flag:macos-apps> or \`.pftrace\` on Android).
|
|
166482
166651
|
Use when revisiting past sessions without re-recording (replaces the in-memory session for \`device_id\` without deleting disk files).
|
|
166483
166652
|
Returns a session list or loaded summary. Fails if \`session_id\` or its files are missing.`,
|
|
166484
|
-
zodSchema:
|
|
166653
|
+
zodSchema: zodSchema67,
|
|
166485
166654
|
interaction: {
|
|
166486
166655
|
startedMsg: ({ params }) => profilerLoadAction[params.mode].started(params),
|
|
166487
166656
|
completedMsg: ({ params }) => profilerLoadAction[params.mode].completed(params),
|
|
@@ -166643,7 +166812,7 @@ function unnameableSessionUrns(urns) {
|
|
|
166643
166812
|
}
|
|
166644
166813
|
|
|
166645
166814
|
// ../tool-server/src/tools/simulator/stop-simulator-server.ts
|
|
166646
|
-
var
|
|
166815
|
+
var zodSchema68 = external_exports.object({
|
|
166647
166816
|
udid: external_exports.string().describe(
|
|
166648
166817
|
"Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
|
|
166649
166818
|
)
|
|
@@ -166654,7 +166823,7 @@ function createStopSimulatorServerTool(registry2) {
|
|
|
166654
166823
|
description: `Stop the transport session for one device (simulator-server, physical iOS runner, Chromium CDP, or TV daemons).
|
|
166655
166824
|
Use when restarting a wedged transport or freeing one device without affecting others (not routinely after every task; use \`stop-all-simulator-servers\` with \`devices\` to also stop devtools/profilers/debuggers). On Chromium, also ends the JS debugger session.<flag:macos-apps> On Mac apps, also stops native capture (discarding records) and screen recording.</flag:macos-apps>
|
|
166656
166825
|
Returns \`{ stopped, udid }\` (\`stopped: false\` if none was running). Fails only on invalid input.`,
|
|
166657
|
-
zodSchema:
|
|
166826
|
+
zodSchema: zodSchema68,
|
|
166658
166827
|
interaction: {
|
|
166659
166828
|
startedMsg: ({ params }) => `Stopping simulator server for ${params.udid}`,
|
|
166660
166829
|
completedMsg: ({ params }) => `Stopped simulator server for ${params.udid}`,
|
|
@@ -166689,7 +166858,7 @@ Returns \`{ stopped, udid }\` (\`stopped: false\` if none was running). Fails on
|
|
|
166689
166858
|
// ../tool-server/src/tools/simulator/stop-all-simulator-servers.ts
|
|
166690
166859
|
init_zod();
|
|
166691
166860
|
init_src2();
|
|
166692
|
-
var
|
|
166861
|
+
var zodSchema69 = external_exports.object({
|
|
166693
166862
|
devices: external_exports.array(external_exports.string()).optional().describe(
|
|
166694
166863
|
"Ids of the devices THIS session used (iOS UDID / Android serial / Chromium id), to scope the teardown to."
|
|
166695
166864
|
)
|
|
@@ -166701,7 +166870,7 @@ function createStopAllSimulatorServersTool(registry2) {
|
|
|
166701
166870
|
Use when cleaning up or ending a session, or when a skill asks to recycle services \u2014 not routinely after every task (services are reused). Use \`network-capture-stop\` to stop network capture while keeping recorded requests.
|
|
166702
166871
|
Always pass \`devices\` with this session's device IDs (plus any \`logicalDeviceId\` used with \`debugger-connect\` on shared Metro) so other agents' devices aren't torn down; omit \`devices\` only for a machine-wide sweep. \`[]\` stops nothing.
|
|
166703
166872
|
Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`left_running\` names unscoped debugger URNs; re-call with the id after \`<ns>:<port>:\` to reap them). Fails if unknown keys (e.g. \`udids\`) are passed.`,
|
|
166704
|
-
zodSchema:
|
|
166873
|
+
zodSchema: zodSchema69,
|
|
166705
166874
|
interaction: {
|
|
166706
166875
|
// "all" only holds for the unscoped sweep; a scoped call touches just the
|
|
166707
166876
|
// ids it was given.
|
|
@@ -166904,13 +167073,13 @@ function listeningPids(port) {
|
|
|
166904
167073
|
}
|
|
166905
167074
|
return lines.map((s) => parseInt(s, 10));
|
|
166906
167075
|
}
|
|
166907
|
-
var
|
|
167076
|
+
var zodSchema70 = external_exports.object({
|
|
166908
167077
|
port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on")
|
|
166909
167078
|
});
|
|
166910
167079
|
var stopMetroTool = {
|
|
166911
167080
|
id: "stop-metro",
|
|
166912
167081
|
description: `Stop the Metro bundler process listening on \`port\`. Use when the user asks to stop Metro or when Metro must be restarted - do not offer it when a task wraps up, since the next task would wait on a cold Metro start. Returns { stopped, port, pids }: stopped=true when it sent SIGTERM to every listening pid it found (or the pid had already exited), stopped=false when it found none. Fails if the port lookup cannot run or times out, if it finds a listener but not the process that owns it, or if it cannot signal a listener it found (e.g. EPERM). On macOS another user's listener is detected only when no other listener on the port is visible, so it can survive stopped=true. This is DESTRUCTIVE: always ask the user for confirmation before calling this tool.`,
|
|
166913
|
-
zodSchema:
|
|
167082
|
+
zodSchema: zodSchema70,
|
|
166914
167083
|
interaction: {
|
|
166915
167084
|
startedMsg: ({ params }) => `Stopping Metro on port ${params.port}`,
|
|
166916
167085
|
completedMsg: ({ params }) => `Stopped Metro on port ${params.port}`,
|
|
@@ -168476,7 +168645,7 @@ var MACOS_PLATFORM_FLAG = { [FLAG_ENUM_META_KEY]: { macos: MACOS_APPS_FLAG } };
|
|
|
168476
168645
|
var fileInputs3 = [
|
|
168477
168646
|
{ target: "project_root", path: "${project_root}", kind: "probe" }
|
|
168478
168647
|
];
|
|
168479
|
-
var
|
|
168648
|
+
var zodSchema71 = external_exports.object({
|
|
168480
168649
|
name: external_exports.string().describe("E2E test name (letters, digits, `_`, `-`)."),
|
|
168481
168650
|
project_root: external_exports.string().describe("Absolute path to the project root containing `.argent/e2e/`."),
|
|
168482
168651
|
executionPrerequisite: external_exports.string().optional().describe(
|
|
@@ -168499,7 +168668,7 @@ var flowStartRecordingTool = {
|
|
|
168499
168668
|
Use when capturing a reusable sequence of device actions for replay; load the \`argent-create-e2e\` skill first. Not for Apple TV or Android TV.
|
|
168500
168669
|
Record live steps with \`e2e-add-step\` (start standalone tests with \`restart-app\`; use \`executionPrerequisite\` for fragments), \`e2e-add-echo\`, and \`e2e-add-script\`, then call \`e2e-finish-recording\`. Edit the YAML only after finishing.
|
|
168501
168670
|
Returns \`{ message, e2eTestFile, savedTo, restarted?, discardedSteps?, fragmentShutdown? }\`. Fails if the target file or directory cannot be written.`,
|
|
168502
|
-
zodSchema:
|
|
168671
|
+
zodSchema: zodSchema71,
|
|
168503
168672
|
aliases: ["flow-start-recording"],
|
|
168504
168673
|
interaction: {
|
|
168505
168674
|
// Name the flow: concurrent recordings interleave in one log, and "flow
|
|
@@ -171881,7 +172050,7 @@ function withRecordedPanelKind(command2, args, toolResult, ranAction = args.acti
|
|
|
171881
172050
|
var fileInputs4 = [
|
|
171882
172051
|
{ target: "project_root", path: "${project_root}", kind: "probe", collect: "step" }
|
|
171883
172052
|
];
|
|
171884
|
-
var
|
|
172053
|
+
var zodSchema72 = external_exports.object({
|
|
171885
172054
|
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
171886
172055
|
project_root: external_exports.string().describe("Project root from `e2e-start-recording`."),
|
|
171887
172056
|
command: external_exports.string().describe(
|
|
@@ -171899,7 +172068,7 @@ function createFlowAddStepTool(registry2) {
|
|
|
171899
172068
|
description: `Execute one MCP tool live and append it to an open e2e recording (\`gesture-tap\` records as a portable \`tap\` selector; \`restart-app\` as \`launch\`; supports \`{{output:PATH}}\` references).
|
|
171900
172069
|
Use when recording steps after \`e2e-start-recording\` (pass \`shutdown: true\` for cleanup steps; call recording tools like \`e2e-add-script\` directly).
|
|
171901
172070
|
Returns \`{ message, toolResult, stepCount, recorded?, savedTo }\`. Fails if no recording is open or the step errors (nothing recorded).`,
|
|
171902
|
-
zodSchema:
|
|
172071
|
+
zodSchema: zodSchema72,
|
|
171903
172072
|
aliases: ["flow-add-step"],
|
|
171904
172073
|
interaction: {
|
|
171905
172074
|
// Name the flow: recordings are concurrent, so several of these lines can
|
|
@@ -172211,7 +172380,7 @@ Returns \`{ message, toolResult, stepCount, recorded?, savedTo }\`. Fails if no
|
|
|
172211
172380
|
|
|
172212
172381
|
// ../tool-server/src/tools/flows/flow-insert-echo.ts
|
|
172213
172382
|
init_zod();
|
|
172214
|
-
var
|
|
172383
|
+
var zodSchema73 = external_exports.object({
|
|
172215
172384
|
name: external_exports.string().describe("Name of the e2e test being recorded: the one passed to e2e-start-recording."),
|
|
172216
172385
|
project_root: external_exports.string().describe(
|
|
172217
172386
|
"Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording."
|
|
@@ -172224,7 +172393,7 @@ var flowInsertEchoTool = {
|
|
|
172224
172393
|
description: `Record an echo step in the e2e test named by \`name\` + \`project_root\`. Echo steps print a message when the e2e test is replayed, useful as labels between tool calls.
|
|
172225
172394
|
Use when you want to annotate a recorded e2e test with a human-readable label or checkpoint message; pass \`shutdown: true\` to label its shutdown steps.
|
|
172226
172395
|
Returns { message, stepCount, savedTo }. Fails if that e2e test has no recording in progress.`,
|
|
172227
|
-
zodSchema:
|
|
172396
|
+
zodSchema: zodSchema73,
|
|
172228
172397
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
172229
172398
|
aliases: ["flow-add-echo"],
|
|
172230
172399
|
interaction: {
|
|
@@ -172252,7 +172421,7 @@ Returns { message, stepCount, savedTo }. Fails if that e2e test has no recording
|
|
|
172252
172421
|
// ../tool-server/src/tools/flows/flow-set-vars.ts
|
|
172253
172422
|
init_zod();
|
|
172254
172423
|
init_capability();
|
|
172255
|
-
var
|
|
172424
|
+
var zodSchema74 = external_exports.object({
|
|
172256
172425
|
name: external_exports.string().describe("Test name passed to e2e-start-recording."),
|
|
172257
172426
|
project_root: external_exports.string().describe("Absolute project root passed to e2e-start-recording."),
|
|
172258
172427
|
vars: nameRecordSchema(external_exports.string().nullable(), "vars").describe(
|
|
@@ -172262,7 +172431,7 @@ var zodSchema73 = external_exports.object({
|
|
|
172262
172431
|
var flowSetVarsTool = {
|
|
172263
172432
|
id: "e2e-set-vars",
|
|
172264
172433
|
description: `Update the test inputs in an active e2e recording. Call directly before recording steps that use \`{{var:NAME}}\`. Saves the defaults under \`vars:\` and returns them with secret placeholders intact.`,
|
|
172265
|
-
zodSchema:
|
|
172434
|
+
zodSchema: zodSchema74,
|
|
172266
172435
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
172267
172436
|
interaction: {
|
|
172268
172437
|
startedMsg: ({ params }) => `Setting vars for e2e test ${params.name}`,
|
|
@@ -172346,7 +172515,7 @@ function renderOutput(output2) {
|
|
|
172346
172515
|
const kept = bytes.subarray(0, utf8SafeCut(bytes, OUTPUT_RENDER_LIMIT_BYTES));
|
|
172347
172516
|
return { outputJson: kept.toString("utf8"), outputTruncated: true };
|
|
172348
172517
|
}
|
|
172349
|
-
var
|
|
172518
|
+
var zodSchema75 = external_exports.object({
|
|
172350
172519
|
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
172351
172520
|
project_root: external_exports.string().describe("Project root from `e2e-start-recording`."),
|
|
172352
172521
|
path: external_exports.string().describe("Script path (.mjs/.mts/.js/.ts) relative to the test YAML."),
|
|
@@ -172366,7 +172535,7 @@ var flowAddScriptTool = deferredShutdownFirst({
|
|
|
172366
172535
|
description: `Run a local JS/TS script and record it as a \`script:\` step (requires no \`argent link\` / \`ARGENT_TOOLS_URL\`).
|
|
172367
172536
|
Use when the user requests a local script in an open recording (output is available to later steps via \`{{output:PATH}}\`).
|
|
172368
172537
|
Returns \`{ status, reason?, outputJson?, stepCount, recorded? }\`. A failed script returns \`status: "fail"\` or \`"error"\` without recording (check \`reason\` and affected state before retrying). Fails on invalid input, no open recording, or recording over a link.`,
|
|
172369
|
-
zodSchema:
|
|
172538
|
+
zodSchema: zodSchema75,
|
|
172370
172539
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
172371
172540
|
aliases: ["flow-add-script"],
|
|
172372
172541
|
interaction: {
|
|
@@ -172521,7 +172690,7 @@ function anchoredWarnings(recorded, warnings, steps) {
|
|
|
172521
172690
|
}
|
|
172522
172691
|
return kept;
|
|
172523
172692
|
}
|
|
172524
|
-
var
|
|
172693
|
+
var zodSchema76 = external_exports.object({
|
|
172525
172694
|
name: external_exports.string().describe("E2E test name from `e2e-start-recording`."),
|
|
172526
172695
|
project_root: external_exports.string().describe("Project root from `e2e-start-recording`.")
|
|
172527
172696
|
});
|
|
@@ -172530,7 +172699,7 @@ var flowFinishRecordingTool = {
|
|
|
172530
172699
|
description: `Finalize an open e2e recording (runs pending fragment cleanup first).
|
|
172531
172700
|
Use when all steps have been recorded and you are ready to polish or replay the YAML (check any \`warning:\` lines in \`summary\` for recorded waits).
|
|
172532
172701
|
Returns \`{ message, path, steps, shutdownSteps?, fragmentShutdown?, summary, e2eTestFile, savedTo }\`. Fails if no recording is open for \`name\` + \`project_root\`.`,
|
|
172533
|
-
zodSchema:
|
|
172702
|
+
zodSchema: zodSchema76,
|
|
172534
172703
|
fileInputs: PROJECT_ROOT_INPUT,
|
|
172535
172704
|
aliases: ["flow-finish-recording"],
|
|
172536
172705
|
// It may run the fragments' shutdown, on the device.
|
|
@@ -176062,7 +176231,7 @@ Run the e2e test on the computer that runs the tool-server, with no link and no
|
|
|
176062
176231
|
}
|
|
176063
176232
|
);
|
|
176064
176233
|
}
|
|
176065
|
-
var
|
|
176234
|
+
var zodSchema77 = external_exports.object({
|
|
176066
176235
|
name: external_exports.string().optional().describe("Saved e2e test name in `<project_root>/.argent/e2e/` (or `.argent/flows/`)."),
|
|
176067
176236
|
project_root: external_exports.string().describe(
|
|
176068
176237
|
"Absolute path to the project root (script cwd; with e2e_test_path, run:/script:/baselines resolve beside the YAML)."
|
|
@@ -176103,7 +176272,7 @@ function createRunFlowTool(registry2) {
|
|
|
176103
176272
|
description: `Run a saved YAML e2e test end to end. Use when replaying a recorded path or QA regression (use gesture tools for one-off actions, \`e2e-start-recording\` to author tests). Pass exactly one e2e test source: \`name\` or \`e2e_test_path\`.
|
|
176104
176273
|
Returns a per-step report (\`ok: false\` on step failure). A main-step failure skips remaining main steps, then runs \`shutdown:\` steps (marked \`shutdown: true\`; failure sets \`shutdownFailed\`).
|
|
176105
176274
|
Over a link (\`argent link\` / \`ARGENT_TOOLS_URL\`), the client uploads the test, \`run:\` fragments, baselines, and absolute \`.png\`/\`.yaml\` args; steps needing other client files (e.g. \`script:\`, recording tools, directories) fail before step 1. Fails if the YAML is invalid, no unique matching device is booted, or pre-step link validation fails.`,
|
|
176106
|
-
zodSchema:
|
|
176275
|
+
zodSchema: zodSchema77,
|
|
176107
176276
|
aliases: ["flow-execute"],
|
|
176108
176277
|
interaction: {
|
|
176109
176278
|
startedMsg: ({ params }) => `Running e2e test ${displayFlowName(params)}`,
|
|
@@ -177249,7 +177418,7 @@ async function resolveFlowSource(params, fileInput, flowPathInput) {
|
|
|
177249
177418
|
init_zod();
|
|
177250
177419
|
init_src2();
|
|
177251
177420
|
init_capability();
|
|
177252
|
-
var
|
|
177421
|
+
var zodSchema78 = external_exports.object({
|
|
177253
177422
|
name: external_exports.string().optional().describe(
|
|
177254
177423
|
"Name of a saved e2e test to check from `<project_root>/.argent/e2e`, or `.argent/flows` when it is not there."
|
|
177255
177424
|
),
|
|
@@ -177283,7 +177452,7 @@ each step that fails when it runs for a reason a device does not change, in this
|
|
|
177283
177452
|
run: fragments and nested e2e tests its steps reach. Each problem holds at?, code? and message.
|
|
177284
177453
|
at lists the steps from the e2e test to the problem, each { step, run?, e2e?, when? }.
|
|
177285
177454
|
Pass exactly one e2e test source: name (under project_root) or e2e_test_path.`,
|
|
177286
|
-
zodSchema:
|
|
177455
|
+
zodSchema: zodSchema78,
|
|
177287
177456
|
readOnly: true,
|
|
177288
177457
|
// `argent e2e check` calls it.
|
|
177289
177458
|
hideFromMcp: true,
|
|
@@ -177346,7 +177515,7 @@ var fileInputs5 = [
|
|
|
177346
177515
|
},
|
|
177347
177516
|
...PROJECT_ROOT_INPUT
|
|
177348
177517
|
];
|
|
177349
|
-
var
|
|
177518
|
+
var zodSchema79 = external_exports.object({
|
|
177350
177519
|
name: external_exports.string().optional().describe(
|
|
177351
177520
|
'Name of a saved e2e test to inspect from `<project_root>/.argent/e2e`, or `.argent/flows` when it is not there (e.g. "settings-explore").'
|
|
177352
177521
|
),
|
|
@@ -177377,7 +177546,7 @@ correct account, correct screen) before committing to a run, or when relaying th
|
|
|
177377
177546
|
Touches no device and needs none booted: it only reads the file.
|
|
177378
177547
|
Fails if the e2e test file does not exist.
|
|
177379
177548
|
Address the e2e test exactly as you will address it in e2e-execute: name or e2e_test_path, one and only one; supplying both or neither is rejected.`,
|
|
177380
|
-
zodSchema:
|
|
177549
|
+
zodSchema: zodSchema79,
|
|
177381
177550
|
readOnly: true,
|
|
177382
177551
|
// When its gates pass, e2e-execute without prerequisiteAcknowledged returns
|
|
177383
177552
|
// the same executionPrerequisite, from the same resolveFlowSource, before any
|
|
@@ -177711,7 +177880,7 @@ async function readWorkspaceSnapshot(workspacePath) {
|
|
|
177711
177880
|
var fileInputs6 = [
|
|
177712
177881
|
{ target: "workspacePath", path: "${workspacePath}", kind: "directory" }
|
|
177713
177882
|
];
|
|
177714
|
-
var
|
|
177883
|
+
var zodSchema80 = external_exports.object({
|
|
177715
177884
|
workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
|
|
177716
177885
|
});
|
|
177717
177886
|
var gatherWorkspaceDataTool = {
|
|
@@ -177726,7 +177895,7 @@ Makefile targets, lint-staged config, and a list of detected config files.
|
|
|
177726
177895
|
Use when a program needs the project type (React Native, Expo, Flutter, native iOS/Android,
|
|
177727
177896
|
or other), build commands, platform support, package manager or QA tooling.
|
|
177728
177897
|
Items it cannot read are null or empty collections. Fails if workspacePath is not a directory on the tool-server host.`,
|
|
177729
|
-
zodSchema:
|
|
177898
|
+
zodSchema: zodSchema80,
|
|
177730
177899
|
readOnly: true,
|
|
177731
177900
|
hideFromMcp: true,
|
|
177732
177901
|
interaction: {
|
|
@@ -177744,7 +177913,7 @@ Items it cannot read are null or empty collections. Fails if workspacePath is no
|
|
|
177744
177913
|
// ../tool-server/src/tools/system/dismiss-update.ts
|
|
177745
177914
|
init_zod();
|
|
177746
177915
|
var MAX_HOURS = 24 * 365 * 10;
|
|
177747
|
-
var
|
|
177916
|
+
var zodSchema81 = external_exports.object({
|
|
177748
177917
|
hours: external_exports.number().min(0).describe(
|
|
177749
177918
|
"Hours until reminders resume: 168 is a week, 87600 is the longest, 0 turns them back on"
|
|
177750
177919
|
)
|
|
@@ -177752,7 +177921,7 @@ var zodSchema80 = external_exports.object({
|
|
|
177752
177921
|
var dismissUpdateTool = {
|
|
177753
177922
|
id: "dismiss-update",
|
|
177754
177923
|
description: "Postpone the Argent update reminder and the automatic update, on every tool-server of this Argent home, when the user wants it later or tomorrow, wants it stopped, or never wants it (87600 hours). Installs nothing. A memory or a reminder of your own does not change it. Returns { message, remindersResumeAt, persisted, pendingVersion }: tell the user when reminders resume, and if persisted is false, that it did not fully hold.",
|
|
177755
|
-
zodSchema:
|
|
177924
|
+
zodSchema: zodSchema81,
|
|
177756
177925
|
hideWhen: isUpdateCheckDisabled,
|
|
177757
177926
|
interaction: {
|
|
177758
177927
|
startedMsg: () => "Dismissing Argent update",
|
|
@@ -177795,7 +177964,7 @@ init_zod();
|
|
|
177795
177964
|
init_src2();
|
|
177796
177965
|
init_device_info();
|
|
177797
177966
|
init_capability();
|
|
177798
|
-
var
|
|
177967
|
+
var capability37 = {
|
|
177799
177968
|
apple: { simulator: true, device: true },
|
|
177800
177969
|
android: { emulator: true, device: true, unknown: true },
|
|
177801
177970
|
harmony: { device: true },
|
|
@@ -177806,7 +177975,7 @@ var fileInputs7 = [
|
|
|
177806
177975
|
{ target: "currentPath", path: "${currentPath}", kind: "file", optional: true },
|
|
177807
177976
|
{ target: "outputDir", path: "${outputDir}", kind: "probe", optional: true }
|
|
177808
177977
|
];
|
|
177809
|
-
var
|
|
177978
|
+
var zodSchema82 = external_exports.object({
|
|
177810
177979
|
baselinePath: external_exports.string().min(1).optional().describe("Saved baseline PNG path (omit when `captureBaseline: true`)."),
|
|
177811
177980
|
currentPath: external_exports.string().min(1).optional().describe("Saved current PNG path (omit when `captureCurrent: true`)."),
|
|
177812
177981
|
udid: external_exports.string().min(1).describe(
|
|
@@ -177828,14 +177997,14 @@ var screenshotDiffTool = {
|
|
|
177828
177997
|
description: `Compare two PNG screenshots (saved files or one live capture<flag:harmonyos> on iOS, Android, or HarmonyOS</flag:harmonyos>) and return a visual-diff summary (status bar ignored).
|
|
177829
177998
|
Use when checking pixel-visible regressions (layout, spacing, color, typography, clipping, overflow). Both images must have identical dimensions: save baselines with screenshot scale: 1.0, one per device model.<flag:macos-apps> Mac apps: resized windows fail as a dimension mismatch.</flag:macos-apps>
|
|
177830
177999
|
Returns \`{ summary, diffPath?, contextDiffPath? }\` with normalized [0,1] changed regions. Fails if sources are invalid, dimensions differ, files cannot be read/written, or the capture backend<flag:harmonyos> (\`hdc\` on HarmonyOS)</flag:harmonyos> is unreachable.`,
|
|
177831
|
-
zodSchema:
|
|
178000
|
+
zodSchema: zodSchema82,
|
|
177832
178001
|
searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture<flag:harmonyos> harmony harmonyos</flag:harmonyos>",
|
|
177833
178002
|
interaction: {
|
|
177834
178003
|
startedMsg: () => "Comparing screenshots",
|
|
177835
178004
|
completedMsg: ({ result }) => summaryReportsDimensionMismatch(result.summary) ? "Skipped comparison - screenshot dimensions differ" : "Compared screenshots",
|
|
177836
178005
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to compare screenshots: ${failureSignal2.error_code}`
|
|
177837
178006
|
},
|
|
177838
|
-
capability:
|
|
178007
|
+
capability: capability37,
|
|
177839
178008
|
fileInputs: fileInputs7,
|
|
177840
178009
|
services: (params) => {
|
|
177841
178010
|
if (params.captureBaseline || params.captureCurrent) {
|
|
@@ -178176,7 +178345,7 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
|
|
|
178176
178345
|
|
|
178177
178346
|
// ../tool-server/src/tools/variants/propose-variant.ts
|
|
178178
178347
|
init_capability();
|
|
178179
|
-
var
|
|
178348
|
+
var zodSchema83 = external_exports.object({
|
|
178180
178349
|
element: external_exports.string().min(1).max(200).describe(
|
|
178181
178350
|
'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.'
|
|
178182
178351
|
),
|
|
@@ -178229,7 +178398,7 @@ arrives as a follow-up message (this is the case in an \`argent lens\` CLI sessi
|
|
|
178229
178398
|
|
|
178230
178399
|
Returns { round, elementId, variantId, element, variantCount, totalElements }: confirmation only;
|
|
178231
178400
|
it does not wait for the user.`,
|
|
178232
|
-
zodSchema:
|
|
178401
|
+
zodSchema: zodSchema83,
|
|
178233
178402
|
searchHint: "propose design variant alternative option for element non-blocking ab choice",
|
|
178234
178403
|
featureFlag: "argent-lens",
|
|
178235
178404
|
interaction: {
|
|
@@ -178265,7 +178434,7 @@ it does not wait for the user.`,
|
|
|
178265
178434
|
|
|
178266
178435
|
// ../tool-server/src/tools/variants/await-user-selection.ts
|
|
178267
178436
|
init_zod();
|
|
178268
|
-
var
|
|
178437
|
+
var zodSchema84 = external_exports.object({
|
|
178269
178438
|
timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
|
|
178270
178439
|
"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."
|
|
178271
178440
|
)
|
|
@@ -178293,7 +178462,7 @@ Returns one of:
|
|
|
178293
178462
|
|
|
178294
178463
|
This tool is long-running; it intentionally holds the request open. It honors client
|
|
178295
178464
|
disconnects (aborts cleanly).`,
|
|
178296
|
-
zodSchema:
|
|
178465
|
+
zodSchema: zodSchema84,
|
|
178297
178466
|
searchHint: "await wait user selection choice variant blocking confirm picks complete",
|
|
178298
178467
|
featureFlag: "argent-lens",
|
|
178299
178468
|
// Hidden while an `argent lens` CLI session owns the preview window: there the
|
|
@@ -178343,10 +178512,10 @@ var tabAction = {
|
|
|
178343
178512
|
failure: "close"
|
|
178344
178513
|
}
|
|
178345
178514
|
};
|
|
178346
|
-
var
|
|
178515
|
+
var capability38 = {
|
|
178347
178516
|
chromium: { app: true }
|
|
178348
178517
|
};
|
|
178349
|
-
var
|
|
178518
|
+
var zodSchema85 = external_exports.object({
|
|
178350
178519
|
udid: external_exports.string().describe("Chromium device id (`chromium-cdp-<port>`)."),
|
|
178351
178520
|
action: external_exports.enum(["list", "select", "new", "close"]).describe("Tab operation."),
|
|
178352
178521
|
tab: external_exports.string().optional().describe("Tab id (e.g. `t2`) or label (`select` required; `close` defaults to active)."),
|
|
@@ -178358,14 +178527,14 @@ var chromiumTabsTool = {
|
|
|
178358
178527
|
description: `List and switch tabs/windows (or open/close them) in a Chromium (CDP) or Electron app (all UI tools target the active tab).
|
|
178359
178528
|
Use when switching between multiple tabs/windows or opening/closing pages.
|
|
178360
178529
|
Returns \`{ tabs: [{ tabId, targetId, title, url, active, label? }] }\`. Fails on non-Chromium targets or unknown tab ids.`,
|
|
178361
|
-
zodSchema:
|
|
178530
|
+
zodSchema: zodSchema85,
|
|
178362
178531
|
searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
|
|
178363
178532
|
interaction: {
|
|
178364
178533
|
startedMsg: ({ params }) => tabAction[params.action].started(params),
|
|
178365
178534
|
completedMsg: ({ params, result }) => tabAction[params.action].completed(params, result),
|
|
178366
178535
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to ${tabAction[params.action].failure} browser tabs: ${failureSignal2.error_code}`
|
|
178367
178536
|
},
|
|
178368
|
-
capability:
|
|
178537
|
+
capability: capability38,
|
|
178369
178538
|
services: (params) => {
|
|
178370
178539
|
const device = resolveDevice(params.udid);
|
|
178371
178540
|
if (device.platform === "chromium") {
|
|
@@ -178472,10 +178641,10 @@ var cookieAction = {
|
|
|
178472
178641
|
delete: { started: "Deleting", completed: "Deleted", failure: "delete" },
|
|
178473
178642
|
clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
|
|
178474
178643
|
};
|
|
178475
|
-
var
|
|
178644
|
+
var capability39 = {
|
|
178476
178645
|
chromium: { app: true }
|
|
178477
178646
|
};
|
|
178478
|
-
var
|
|
178647
|
+
var zodSchema86 = external_exports.object({
|
|
178479
178648
|
udid: external_exports.string().describe("Chromium device id (`chromium-cdp-<port>`)."),
|
|
178480
178649
|
action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
|
|
178481
178650
|
"get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies across all domains (ignores url/domain)."
|
|
@@ -178495,14 +178664,14 @@ var chromiumCookiesTool = {
|
|
|
178495
178664
|
description: `Read and write cookies (including HttpOnly) in a Chromium (CDP) app.
|
|
178496
178665
|
Use when seeding an auth session or asserting cookie state (\`set\`/\`delete\` need \`url\` or \`domain\`). \`clear\` wipes ALL browser cookies across every domain (ignores \`url\`/\`domain\`); use \`get\` + \`delete\` to clear a single domain.
|
|
178497
178666
|
Returns \`{ cookies, count }\` (\`get\`) or \`{ set }\` / \`{ deleted }\` / \`{ cleared }\`. Fails on non-Chromium targets or missing required params.`,
|
|
178498
|
-
zodSchema:
|
|
178667
|
+
zodSchema: zodSchema86,
|
|
178499
178668
|
searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
|
|
178500
178669
|
interaction: {
|
|
178501
178670
|
startedMsg: ({ params }) => `${cookieAction[params.action].started} browser cookies`,
|
|
178502
178671
|
completedMsg: ({ params }) => `${cookieAction[params.action].completed} browser cookies`,
|
|
178503
178672
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to ${cookieAction[params.action].failure} browser cookies: ${failureSignal2.error_code}`
|
|
178504
178673
|
},
|
|
178505
|
-
capability:
|
|
178674
|
+
capability: capability39,
|
|
178506
178675
|
services: (params) => {
|
|
178507
178676
|
const device = resolveDevice(params.udid);
|
|
178508
178677
|
if (device.platform === "chromium") {
|
|
@@ -178573,10 +178742,10 @@ var storageAction = {
|
|
|
178573
178742
|
remove: { started: "Removing from", completed: "Removed from", failure: "remove from" },
|
|
178574
178743
|
clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
|
|
178575
178744
|
};
|
|
178576
|
-
var
|
|
178745
|
+
var capability40 = {
|
|
178577
178746
|
chromium: { app: true }
|
|
178578
178747
|
};
|
|
178579
|
-
var
|
|
178748
|
+
var zodSchema87 = external_exports.object({
|
|
178580
178749
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
178581
178750
|
store: external_exports.enum(["local", "session"]).describe("`local`: localStorage. `session`: sessionStorage."),
|
|
178582
178751
|
action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
|
|
@@ -178590,7 +178759,7 @@ var chromiumStorageTool = {
|
|
|
178590
178759
|
description: `Read and write localStorage / sessionStorage of a Chromium (CDP) app, for the origin of the active tab's page.
|
|
178591
178760
|
Use when seeding feature flags / auth tokens before an e2e test or asserting persisted app state after one.
|
|
178592
178761
|
Returns { value } for one key, { entries, count } for all keys, and { set } / { removed } / { cleared } for the writes. Fails if the device is not a Chromium (CDP) device, or the action is missing the \`key\` / \`value\` it needs.`,
|
|
178593
|
-
zodSchema:
|
|
178762
|
+
zodSchema: zodSchema87,
|
|
178594
178763
|
searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
|
|
178595
178764
|
// Agents read and write Web Storage with debugger-evaluate, which runs the same
|
|
178596
178765
|
// Runtime.evaluate on the active page. The SDK and the e2e-full suite still call it.
|
|
@@ -178600,7 +178769,7 @@ Returns { value } for one key, { entries, count } for all keys, and { set } / {
|
|
|
178600
178769
|
completedMsg: ({ params }) => `${storageAction[params.action].completed} ${params.store} storage`,
|
|
178601
178770
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to ${storageAction[params.action].failure} ${params.store} storage: ${failureSignal2.error_code}`
|
|
178602
178771
|
},
|
|
178603
|
-
capability:
|
|
178772
|
+
capability: capability40,
|
|
178604
178773
|
services: (params) => {
|
|
178605
178774
|
const device = resolveDevice(params.udid);
|
|
178606
178775
|
if (device.platform === "chromium") {
|
|
@@ -178660,7 +178829,7 @@ var sleep20 = (ms3) => new Promise((r) => setTimeout(r, ms3));
|
|
|
178660
178829
|
var DEFAULT_PANEL_TIMEOUT_MS = 5e3;
|
|
178661
178830
|
var MAX_PANEL_TIMEOUT_MS = 3e4;
|
|
178662
178831
|
var PANEL_POLL_MS2 = 100;
|
|
178663
|
-
var
|
|
178832
|
+
var capability41 = {
|
|
178664
178833
|
macos: { app: true, catalyst: true }
|
|
178665
178834
|
};
|
|
178666
178835
|
var invalid = (message, stage) => new InvalidToolInputError(message, { failure_stage: stage });
|
|
@@ -178809,7 +178978,7 @@ async function stub(app, params) {
|
|
|
178809
178978
|
});
|
|
178810
178979
|
return { armed, mode, panelKind };
|
|
178811
178980
|
}
|
|
178812
|
-
var
|
|
178981
|
+
var zodSchema88 = external_exports.object({
|
|
178813
178982
|
udid: external_exports.string().describe("Mac app id from `list-devices` (macos-app-<bundle id>)."),
|
|
178814
178983
|
action: external_exports.enum(["list", "choose", "cancel", "discard", "stub"]).describe(
|
|
178815
178984
|
"list: the open file panels. choose: answer a panel with path or paths. cancel: cancel a panel. discard: answer a panel with its Delete or Don't Save button. stub: arm an answer or a cancel for the next panel the app presents (stubMode)."
|
|
@@ -178842,7 +179011,7 @@ For stub, panelKind names the kind of panel the answer is for; without it, paths
|
|
|
178842
179011
|
A sandboxed app that argent started is given access to the chosen paths only. A save panel that lists file formats refuses a path whose extension matches none of them, also a path with no extension, unless it saves any file (public.data, public.item) or allows other file types. On macOS 15 and later, the extension picks the format. argent does not check a path for an open panel against the panel's allowed file types.
|
|
178843
179012
|
Returns { panels } for list, { chosen, panel, kind, paths } for choose, { cancelled, panel } for cancel, { discarded, panel } for discard, { armed, mode, panelKind? } for stub.
|
|
178844
179013
|
Fails if no panel appears within timeoutMs, if more than one panel is open and panel is not given, if a path is relative or does not exist (a save panel needs an existing folder), if a path for a save panel is an existing folder other than a document package the panel saves, if the path does not fit the panel choose finds (a folder for a panel of files, a file for a panel of folders, a refused extension), if discard finds no Delete or Don't Save button, or if the Mac app is not running.`,
|
|
178845
|
-
zodSchema:
|
|
179014
|
+
zodSchema: zodSchema88,
|
|
178846
179015
|
searchHint: "file panel dialog open save choose pick file folder nsopenpanel nssavepanel mac app",
|
|
178847
179016
|
featureFlag: "macos-apps",
|
|
178848
179017
|
interaction: {
|
|
@@ -178852,14 +179021,14 @@ Fails if no panel appears within timeoutMs, if more than one panel is open and p
|
|
|
178852
179021
|
},
|
|
178853
179022
|
// timeoutMs can reach the MCP fetch timeout, whose abort replays the call.
|
|
178854
179023
|
longRunning: true,
|
|
178855
|
-
capability:
|
|
179024
|
+
capability: capability41,
|
|
178856
179025
|
services: (params) => {
|
|
178857
179026
|
const device = resolveDevice(params.udid);
|
|
178858
179027
|
return device.platform === "macos" ? macosAppServices(device) : {};
|
|
178859
179028
|
},
|
|
178860
179029
|
async execute(services, params, ctx) {
|
|
178861
179030
|
const device = resolveDevice(params.udid);
|
|
178862
|
-
assertSupported("file-panel",
|
|
179031
|
+
assertSupported("file-panel", capability41, device);
|
|
178863
179032
|
const app = requireMacosApp(services, "file-panel", device);
|
|
178864
179033
|
switch (params.action) {
|
|
178865
179034
|
case "list":
|
|
@@ -178888,7 +179057,7 @@ init_capability();
|
|
|
178888
179057
|
init_device_info();
|
|
178889
179058
|
var sleep21 = (ms3) => new Promise((r) => setTimeout(r, ms3));
|
|
178890
179059
|
var MAX_PATH_TITLES = 9;
|
|
178891
|
-
var
|
|
179060
|
+
var capability42 = {
|
|
178892
179061
|
macos: { app: true, catalyst: true }
|
|
178893
179062
|
};
|
|
178894
179063
|
var invalid2 = (message) => new InvalidToolInputError(message, { failure_stage: "menu_bar_params" });
|
|
@@ -178944,7 +179113,7 @@ function renderMenus(items, depth, lines) {
|
|
|
178944
179113
|
if (item.items) renderMenus(item.items, depth + 1, lines);
|
|
178945
179114
|
}
|
|
178946
179115
|
}
|
|
178947
|
-
var
|
|
179116
|
+
var zodSchema89 = external_exports.object({
|
|
178948
179117
|
udid: external_exports.string().describe("Mac app id from `list-devices` (macos-app-<bundle id>)."),
|
|
178949
179118
|
action: external_exports.enum(["list", "choose"]).describe(
|
|
178950
179119
|
"list: the app's menu bar, one line per item. choose: run one menu item, by path or identifier."
|
|
@@ -178960,7 +179129,7 @@ var menuBarTool = {
|
|
|
178960
179129
|
Use when a command lives in the app's menus. Use keyboard instead for a shortcut you already know, and file-panel for the open or save panel that a command shows.
|
|
178961
179130
|
list returns { menuBar }, one line per item indented under its menu: the title (a menu ends with " >"), [disabled] or [checked], the shortcut in keyboard syntax, and id="..." when the item has one. choose takes path (the titles from the menu bar down, e.g. ["File", "Export..."]) or identifier, and returns { chosen } with the path; the command runs right after the reply.
|
|
178962
179131
|
Fails if no item matches (the error lists the titles at that level), if the item is disabled or is a menu, if a menu of the app is open, or if the device is not a Mac app.`,
|
|
178963
|
-
zodSchema:
|
|
179132
|
+
zodSchema: zodSchema89,
|
|
178964
179133
|
searchHint: "menu bar main menu command item file edit view window help choose mac app",
|
|
178965
179134
|
featureFlag: "macos-apps",
|
|
178966
179135
|
interaction: {
|
|
@@ -178968,14 +179137,14 @@ Fails if no item matches (the error lists the titles at that level), if the item
|
|
|
178968
179137
|
completedMsg: ({ params }) => params.action === "list" ? "Read the menu bar" : "Chose the menu item",
|
|
178969
179138
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to ${params.action === "list" ? "read" : "choose from"} the menu bar: ${failureSignal2.error_code}`
|
|
178970
179139
|
},
|
|
178971
|
-
capability:
|
|
179140
|
+
capability: capability42,
|
|
178972
179141
|
services: (params) => {
|
|
178973
179142
|
const device = resolveDevice(params.udid);
|
|
178974
179143
|
return device.platform === "macos" ? macosAppServices(device) : {};
|
|
178975
179144
|
},
|
|
178976
179145
|
async execute(services, params) {
|
|
178977
179146
|
const device = resolveDevice(params.udid);
|
|
178978
|
-
assertSupported("menu-bar",
|
|
179147
|
+
assertSupported("menu-bar", capability42, device);
|
|
178979
179148
|
const app = requireMacosApp(services, "menu-bar", device);
|
|
178980
179149
|
if (params.action === "list") {
|
|
178981
179150
|
if (params.path !== void 0 || params.identifier !== void 0) {
|
|
@@ -179070,6 +179239,7 @@ function createRegistry() {
|
|
|
179070
179239
|
registry2.registerTool(chromiumStorageTool);
|
|
179071
179240
|
registry2.registerTool(gestureSwipeTool);
|
|
179072
179241
|
registry2.registerTool(gestureScrollTool);
|
|
179242
|
+
registry2.registerTool(gestureHoverTool);
|
|
179073
179243
|
registry2.registerTool(gestureDragTool);
|
|
179074
179244
|
registry2.registerTool(gestureCustomTool);
|
|
179075
179245
|
registry2.registerTool(gesturePinchTool);
|