@swmansion/argent 0.28.1-next.22 → 0.28.1-next.23
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/assets/manifest.json +2 -2
- package/bin/argent-android-devtools-0.3.0.apk +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/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +4 -1
- package/dist/client.d.ts +9 -0
- package/dist/client.js +3 -0
- package/dist/installer.mjs +4 -1
- package/dist/mcp-server.mjs +3 -0
- package/dist/tool-args.generated.d.ts +6 -0
- package/dist/tool-server.cjs +621 -160
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/bin/argent-android-devtools-0.2.0.apk +0 -0
package/dist/tool-server.cjs
CHANGED
|
@@ -1517,6 +1517,9 @@ var init_failure_codes = __esm({
|
|
|
1517
1517
|
KEYBOARD_CHARACTER_UNSUPPORTED: "KEYBOARD_CHARACTER_UNSUPPORTED",
|
|
1518
1518
|
KEYBOARD_TEXT_AND_KEY_COMBINED: "KEYBOARD_TEXT_AND_KEY_COMBINED",
|
|
1519
1519
|
KEYBOARD_INPUT_NOT_FOCUSED: "KEYBOARD_INPUT_NOT_FOCUSED",
|
|
1520
|
+
FILL_NO_FOCUSED_FIELD: "FILL_NO_FOCUSED_FIELD",
|
|
1521
|
+
FILL_NOT_VERIFIED: "FILL_NOT_VERIFIED",
|
|
1522
|
+
FILL_UNSUPPORTED_FIELD: "FILL_UNSUPPORTED_FIELD",
|
|
1520
1523
|
SECRET_PLACEHOLDER_UNKNOWN: "SECRET_PLACEHOLDER_UNKNOWN",
|
|
1521
1524
|
SCREENSHOT_DIFF_INPUT_INVALID: "SCREENSHOT_DIFF_INPUT_INVALID",
|
|
1522
1525
|
BOOT_DEVICE_TARGET_SELECTION_INVALID: "BOOT_DEVICE_TARGET_SELECTION_INVALID",
|
|
@@ -13223,8 +13226,8 @@ function finalize(ctx, schema) {
|
|
|
13223
13226
|
const root = ctx.seen.get(schema);
|
|
13224
13227
|
if (!root)
|
|
13225
13228
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
13226
|
-
const flattenRef = (
|
|
13227
|
-
const seen = ctx.seen.get(
|
|
13229
|
+
const flattenRef = (zodSchema82) => {
|
|
13230
|
+
const seen = ctx.seen.get(zodSchema82);
|
|
13228
13231
|
if (seen.ref === null)
|
|
13229
13232
|
return;
|
|
13230
13233
|
const schema2 = seen.def ?? seen.schema;
|
|
@@ -13242,7 +13245,7 @@ function finalize(ctx, schema) {
|
|
|
13242
13245
|
Object.assign(schema2, refSchema);
|
|
13243
13246
|
}
|
|
13244
13247
|
Object.assign(schema2, _cached);
|
|
13245
|
-
const isParentRef =
|
|
13248
|
+
const isParentRef = zodSchema82._zod.parent === ref;
|
|
13246
13249
|
if (isParentRef) {
|
|
13247
13250
|
for (const key2 in schema2) {
|
|
13248
13251
|
if (key2 === "$ref" || key2 === "allOf")
|
|
@@ -13262,7 +13265,7 @@ function finalize(ctx, schema) {
|
|
|
13262
13265
|
}
|
|
13263
13266
|
}
|
|
13264
13267
|
}
|
|
13265
|
-
const parent =
|
|
13268
|
+
const parent = zodSchema82._zod.parent;
|
|
13266
13269
|
if (parent && parent !== ref) {
|
|
13267
13270
|
flattenRef(parent);
|
|
13268
13271
|
const parentSeen = ctx.seen.get(parent);
|
|
@@ -13280,7 +13283,7 @@ function finalize(ctx, schema) {
|
|
|
13280
13283
|
}
|
|
13281
13284
|
}
|
|
13282
13285
|
ctx.override({
|
|
13283
|
-
zodSchema:
|
|
13286
|
+
zodSchema: zodSchema82,
|
|
13284
13287
|
jsonSchema: schema2,
|
|
13285
13288
|
path: seen.path ?? []
|
|
13286
13289
|
});
|
|
@@ -16081,10 +16084,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16081
16084
|
}
|
|
16082
16085
|
ctx.processing.add(refPath);
|
|
16083
16086
|
const resolved = resolveRef(refPath, ctx);
|
|
16084
|
-
const
|
|
16085
|
-
ctx.refs.set(refPath,
|
|
16087
|
+
const zodSchema83 = convertSchema(resolved, ctx);
|
|
16088
|
+
ctx.refs.set(refPath, zodSchema83);
|
|
16086
16089
|
ctx.processing.delete(refPath);
|
|
16087
|
-
return
|
|
16090
|
+
return zodSchema83;
|
|
16088
16091
|
}
|
|
16089
16092
|
if (schema.enum !== void 0) {
|
|
16090
16093
|
const enumValues = schema.enum;
|
|
@@ -16126,7 +16129,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16126
16129
|
if (!type) {
|
|
16127
16130
|
return z.any();
|
|
16128
16131
|
}
|
|
16129
|
-
let
|
|
16132
|
+
let zodSchema82;
|
|
16130
16133
|
switch (type) {
|
|
16131
16134
|
case "string": {
|
|
16132
16135
|
let stringSchema = z.string();
|
|
@@ -16189,7 +16192,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16189
16192
|
if (schema.pattern) {
|
|
16190
16193
|
stringSchema = stringSchema.regex(new RegExp(schema.pattern));
|
|
16191
16194
|
}
|
|
16192
|
-
|
|
16195
|
+
zodSchema82 = stringSchema;
|
|
16193
16196
|
break;
|
|
16194
16197
|
}
|
|
16195
16198
|
case "number":
|
|
@@ -16214,15 +16217,15 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16214
16217
|
if (typeof schema.multipleOf === "number") {
|
|
16215
16218
|
numberSchema = numberSchema.multipleOf(schema.multipleOf);
|
|
16216
16219
|
}
|
|
16217
|
-
|
|
16220
|
+
zodSchema82 = numberSchema;
|
|
16218
16221
|
break;
|
|
16219
16222
|
}
|
|
16220
16223
|
case "boolean": {
|
|
16221
|
-
|
|
16224
|
+
zodSchema82 = z.boolean();
|
|
16222
16225
|
break;
|
|
16223
16226
|
}
|
|
16224
16227
|
case "null": {
|
|
16225
|
-
|
|
16228
|
+
zodSchema82 = z.null();
|
|
16226
16229
|
break;
|
|
16227
16230
|
}
|
|
16228
16231
|
case "object": {
|
|
@@ -16237,12 +16240,12 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16237
16240
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
16238
16241
|
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
|
|
16239
16242
|
if (Object.keys(shape).length === 0) {
|
|
16240
|
-
|
|
16243
|
+
zodSchema82 = z.record(keySchema, valueSchema);
|
|
16241
16244
|
break;
|
|
16242
16245
|
}
|
|
16243
16246
|
const objectSchema2 = z.object(shape).passthrough();
|
|
16244
16247
|
const recordSchema = z.looseRecord(keySchema, valueSchema);
|
|
16245
|
-
|
|
16248
|
+
zodSchema82 = z.intersection(objectSchema2, recordSchema);
|
|
16246
16249
|
break;
|
|
16247
16250
|
}
|
|
16248
16251
|
if (schema.patternProperties) {
|
|
@@ -16260,25 +16263,25 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16260
16263
|
}
|
|
16261
16264
|
schemasToIntersect.push(...looseRecords);
|
|
16262
16265
|
if (schemasToIntersect.length === 0) {
|
|
16263
|
-
|
|
16266
|
+
zodSchema82 = z.object({}).passthrough();
|
|
16264
16267
|
} else if (schemasToIntersect.length === 1) {
|
|
16265
|
-
|
|
16268
|
+
zodSchema82 = schemasToIntersect[0];
|
|
16266
16269
|
} else {
|
|
16267
16270
|
let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
16268
16271
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
16269
16272
|
result = z.intersection(result, schemasToIntersect[i]);
|
|
16270
16273
|
}
|
|
16271
|
-
|
|
16274
|
+
zodSchema82 = result;
|
|
16272
16275
|
}
|
|
16273
16276
|
break;
|
|
16274
16277
|
}
|
|
16275
16278
|
const objectSchema = z.object(shape);
|
|
16276
16279
|
if (schema.additionalProperties === false) {
|
|
16277
|
-
|
|
16280
|
+
zodSchema82 = objectSchema.strict();
|
|
16278
16281
|
} else if (typeof schema.additionalProperties === "object") {
|
|
16279
|
-
|
|
16282
|
+
zodSchema82 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
|
|
16280
16283
|
} else {
|
|
16281
|
-
|
|
16284
|
+
zodSchema82 = objectSchema.passthrough();
|
|
16282
16285
|
}
|
|
16283
16286
|
break;
|
|
16284
16287
|
}
|
|
@@ -16289,29 +16292,29 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16289
16292
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
16290
16293
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
16291
16294
|
if (rest) {
|
|
16292
|
-
|
|
16295
|
+
zodSchema82 = z.tuple(tupleItems).rest(rest);
|
|
16293
16296
|
} else {
|
|
16294
|
-
|
|
16297
|
+
zodSchema82 = z.tuple(tupleItems);
|
|
16295
16298
|
}
|
|
16296
16299
|
if (typeof schema.minItems === "number") {
|
|
16297
|
-
|
|
16300
|
+
zodSchema82 = zodSchema82.check(z.minLength(schema.minItems));
|
|
16298
16301
|
}
|
|
16299
16302
|
if (typeof schema.maxItems === "number") {
|
|
16300
|
-
|
|
16303
|
+
zodSchema82 = zodSchema82.check(z.maxLength(schema.maxItems));
|
|
16301
16304
|
}
|
|
16302
16305
|
} else if (Array.isArray(items)) {
|
|
16303
16306
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
16304
16307
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
16305
16308
|
if (rest) {
|
|
16306
|
-
|
|
16309
|
+
zodSchema82 = z.tuple(tupleItems).rest(rest);
|
|
16307
16310
|
} else {
|
|
16308
|
-
|
|
16311
|
+
zodSchema82 = z.tuple(tupleItems);
|
|
16309
16312
|
}
|
|
16310
16313
|
if (typeof schema.minItems === "number") {
|
|
16311
|
-
|
|
16314
|
+
zodSchema82 = zodSchema82.check(z.minLength(schema.minItems));
|
|
16312
16315
|
}
|
|
16313
16316
|
if (typeof schema.maxItems === "number") {
|
|
16314
|
-
|
|
16317
|
+
zodSchema82 = zodSchema82.check(z.maxLength(schema.maxItems));
|
|
16315
16318
|
}
|
|
16316
16319
|
} else if (items !== void 0) {
|
|
16317
16320
|
const element = convertSchema(items, ctx);
|
|
@@ -16322,16 +16325,16 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16322
16325
|
if (typeof schema.maxItems === "number") {
|
|
16323
16326
|
arraySchema = arraySchema.max(schema.maxItems);
|
|
16324
16327
|
}
|
|
16325
|
-
|
|
16328
|
+
zodSchema82 = arraySchema;
|
|
16326
16329
|
} else {
|
|
16327
|
-
|
|
16330
|
+
zodSchema82 = z.array(z.any());
|
|
16328
16331
|
}
|
|
16329
16332
|
break;
|
|
16330
16333
|
}
|
|
16331
16334
|
default:
|
|
16332
16335
|
throw new Error(`Unsupported type: ${type}`);
|
|
16333
16336
|
}
|
|
16334
|
-
return
|
|
16337
|
+
return zodSchema82;
|
|
16335
16338
|
}
|
|
16336
16339
|
function convertSchema(schema, ctx) {
|
|
16337
16340
|
if (typeof schema === "boolean") {
|
|
@@ -73655,16 +73658,16 @@ function lookupExternalDeviceNow(id) {
|
|
|
73655
73658
|
}
|
|
73656
73659
|
return device;
|
|
73657
73660
|
}
|
|
73658
|
-
async function assertExternalCapability(namespace, device,
|
|
73659
|
-
assertExternalCapabilitySync(namespace, device,
|
|
73661
|
+
async function assertExternalCapability(namespace, device, capability39) {
|
|
73662
|
+
assertExternalCapabilitySync(namespace, device, capability39);
|
|
73660
73663
|
}
|
|
73661
|
-
function assertExternalCapabilitySync(namespace, device,
|
|
73664
|
+
function assertExternalCapabilitySync(namespace, device, capability39) {
|
|
73662
73665
|
const id = typeof device === "string" ? device : device.id;
|
|
73663
73666
|
const externalDevice = isExternalId(id) ? lookupExternalDeviceNow(id) : externalClaimForNativeId(id);
|
|
73664
73667
|
if (!externalDevice) return;
|
|
73665
|
-
if (externalDevice.capabilities.has(
|
|
73668
|
+
if (externalDevice.capabilities.has(capability39)) return;
|
|
73666
73669
|
throw new FailureError(
|
|
73667
|
-
`${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${
|
|
73670
|
+
`${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${capability39}' capability for this device.`,
|
|
73668
73671
|
{
|
|
73669
73672
|
error_code: FAILURE_CODES.EXTERNAL_DEVICE_CAPABILITY_DENIED,
|
|
73670
73673
|
error_kind: "unsupported",
|
|
@@ -94920,7 +94923,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
94920
94923
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
94921
94924
|
function readCliVersion() {
|
|
94922
94925
|
if (true) {
|
|
94923
|
-
return "0.28.1-next.
|
|
94926
|
+
return "0.28.1-next.23";
|
|
94924
94927
|
}
|
|
94925
94928
|
return "0.0.0";
|
|
94926
94929
|
}
|
|
@@ -96694,8 +96697,8 @@ async function simctlArgsForUdid(udid, args, options) {
|
|
|
96694
96697
|
return [...simctlPrefix(await deviceSetForUdid(udid)), ...nativeArgs(udid, args)];
|
|
96695
96698
|
}
|
|
96696
96699
|
function assertSimctlEntitlement(udid, options) {
|
|
96697
|
-
const
|
|
96698
|
-
assertExternalCapabilitySync(
|
|
96700
|
+
const capability39 = options?.granted ?? "simctl";
|
|
96701
|
+
assertExternalCapabilitySync(capability39, udid, capability39);
|
|
96699
96702
|
}
|
|
96700
96703
|
async function simctlTargetForUdid(udid, options) {
|
|
96701
96704
|
assertSimctlEntitlement(udid, options);
|
|
@@ -97439,6 +97442,7 @@ function axServiceRef(device, { transport = "unix" } = {}) {
|
|
|
97439
97442
|
};
|
|
97440
97443
|
}
|
|
97441
97444
|
var LIVE_PANEL_TIMEOUT_MS = 2e3;
|
|
97445
|
+
var FILL_TIMEOUT_MS = 6e3;
|
|
97442
97446
|
function getSocketPath(udid) {
|
|
97443
97447
|
return `/tmp/ax-${udid.slice(0, 8)}.sock`;
|
|
97444
97448
|
}
|
|
@@ -97689,7 +97693,7 @@ var axServiceBlueprint = {
|
|
|
97689
97693
|
}
|
|
97690
97694
|
throw err;
|
|
97691
97695
|
}
|
|
97692
|
-
function query(command, timeoutMs = 5e3) {
|
|
97696
|
+
function query(command, timeoutMs = 5e3, params) {
|
|
97693
97697
|
return new Promise((resolve14, reject) => {
|
|
97694
97698
|
if (!daemonSocket || daemonSocket.destroyed) {
|
|
97695
97699
|
reject(
|
|
@@ -97717,7 +97721,9 @@ var axServiceBlueprint = {
|
|
|
97717
97721
|
}
|
|
97718
97722
|
}, timeoutMs);
|
|
97719
97723
|
pendingRpc.set(id, { resolve: resolve14, reject, timer });
|
|
97720
|
-
daemonSocket.write(
|
|
97724
|
+
daemonSocket.write(
|
|
97725
|
+
JSON.stringify(params === void 0 ? { id, command } : { id, command, params }) + "\n"
|
|
97726
|
+
);
|
|
97721
97727
|
});
|
|
97722
97728
|
}
|
|
97723
97729
|
const api = {
|
|
@@ -97775,6 +97781,47 @@ var axServiceBlueprint = {
|
|
|
97775
97781
|
}
|
|
97776
97782
|
return typeof result.displayId === "number" && result.displayId > 0 ? result.displayId : null;
|
|
97777
97783
|
},
|
|
97784
|
+
async fill(text, options2 = {}) {
|
|
97785
|
+
let result;
|
|
97786
|
+
try {
|
|
97787
|
+
result = await query("fill", FILL_TIMEOUT_MS, {
|
|
97788
|
+
text,
|
|
97789
|
+
...options2.check ? { check: true } : {},
|
|
97790
|
+
...options2.typeable === false ? { typeable: false } : {}
|
|
97791
|
+
});
|
|
97792
|
+
} catch (err) {
|
|
97793
|
+
const code = err instanceof Error ? err.message : "";
|
|
97794
|
+
if (code === "unknown_command") {
|
|
97795
|
+
throw new FailureError("ax-service predates `fill`; update argent", {
|
|
97796
|
+
error_code: FAILURE_CODES.AX_QUERY_FAILED,
|
|
97797
|
+
failure_stage: "ax_service_fill",
|
|
97798
|
+
failure_area: "tool_server",
|
|
97799
|
+
error_kind: "unknown"
|
|
97800
|
+
});
|
|
97801
|
+
}
|
|
97802
|
+
if (code === "no_focused_field" || code === "not_editable") {
|
|
97803
|
+
return { focused: false, verified: false };
|
|
97804
|
+
}
|
|
97805
|
+
if (code === "unsupported_field") {
|
|
97806
|
+
return { focused: true, verified: false, unsupported: true };
|
|
97807
|
+
}
|
|
97808
|
+
if (code === "single_line") return { focused: true, verified: false, singleLine: true };
|
|
97809
|
+
if (code === "select_failed") return { focused: true, verified: false, untouched: true };
|
|
97810
|
+
if (code === "fill_failed") return { focused: true, verified: false };
|
|
97811
|
+
if (code === "fill_timeout" || code === "fill_busy" || getFailureSignal(err)?.error_code === FAILURE_CODES.AX_QUERY_TIMEOUT) {
|
|
97812
|
+
return { focused: true, verified: false, timedOut: true };
|
|
97813
|
+
}
|
|
97814
|
+
throw err;
|
|
97815
|
+
}
|
|
97816
|
+
return {
|
|
97817
|
+
focused: true,
|
|
97818
|
+
verified: result.verified === true,
|
|
97819
|
+
...result.needsBackspace === true ? { needsBackspace: true } : {},
|
|
97820
|
+
...result.secure === true ? { secure: true } : {},
|
|
97821
|
+
...typeof result.cleared === "boolean" ? { cleared: result.cleared } : {},
|
|
97822
|
+
...result.untouched === true ? { untouched: true } : {}
|
|
97823
|
+
};
|
|
97824
|
+
},
|
|
97778
97825
|
async alertCheck() {
|
|
97779
97826
|
const result = await query("alert_check");
|
|
97780
97827
|
return result.alertVisible ?? false;
|
|
@@ -97872,23 +97919,23 @@ var InvalidToolInputError = class extends Error {
|
|
|
97872
97919
|
});
|
|
97873
97920
|
}
|
|
97874
97921
|
};
|
|
97875
|
-
function platformMatrix(platform,
|
|
97922
|
+
function platformMatrix(platform, capability39) {
|
|
97876
97923
|
switch (platform) {
|
|
97877
97924
|
case "ios":
|
|
97878
|
-
return
|
|
97925
|
+
return capability39.apple;
|
|
97879
97926
|
case "ios-remote":
|
|
97880
|
-
return
|
|
97927
|
+
return capability39.appleRemote;
|
|
97881
97928
|
case "android":
|
|
97882
|
-
return
|
|
97929
|
+
return capability39.android;
|
|
97883
97930
|
case "chromium":
|
|
97884
|
-
return
|
|
97931
|
+
return capability39.chromium;
|
|
97885
97932
|
case "vega":
|
|
97886
|
-
return
|
|
97933
|
+
return capability39.vega;
|
|
97887
97934
|
}
|
|
97888
97935
|
}
|
|
97889
|
-
function assertSupported(toolId,
|
|
97890
|
-
if (!
|
|
97891
|
-
const matrix = platformMatrix(device.platform,
|
|
97936
|
+
function assertSupported(toolId, capability39, device) {
|
|
97937
|
+
if (!capability39) return;
|
|
97938
|
+
const matrix = platformMatrix(device.platform, capability39);
|
|
97892
97939
|
if (!matrix) {
|
|
97893
97940
|
throw new UnsupportedOperationError(toolId, device, `no ${device.platform} support declared`);
|
|
97894
97941
|
}
|
|
@@ -97896,7 +97943,7 @@ function assertSupported(toolId, capability38, device) {
|
|
|
97896
97943
|
if (!supported) {
|
|
97897
97944
|
throw new UnsupportedOperationError(toolId, device, `kind '${device.kind}' not supported`);
|
|
97898
97945
|
}
|
|
97899
|
-
if (
|
|
97946
|
+
if (capability39.supports && !capability39.supports(device)) {
|
|
97900
97947
|
throw new UnsupportedOperationError(toolId, device, "supports() refiner rejected device");
|
|
97901
97948
|
}
|
|
97902
97949
|
}
|
|
@@ -113762,6 +113809,7 @@ var net3 = __toESM(require("node:net"));
|
|
|
113762
113809
|
init_src2();
|
|
113763
113810
|
var DEFAULT_RPC_TIMEOUT_MS = 5e3;
|
|
113764
113811
|
var LONG_RPC_TIMEOUT_MS = 15e3;
|
|
113812
|
+
var SET_TEXT_RPC_TIMEOUT_MS = 14e3;
|
|
113765
113813
|
function connectAndroidDevtoolsClient(localPort, onTerminated) {
|
|
113766
113814
|
return new Promise((resolve14, reject) => {
|
|
113767
113815
|
const socket = net3.createConnection({ host: "127.0.0.1", port: localPort });
|
|
@@ -113832,7 +113880,7 @@ function connectAndroidDevtoolsClient(localPort, onTerminated) {
|
|
|
113832
113880
|
);
|
|
113833
113881
|
}
|
|
113834
113882
|
const id = nextId++;
|
|
113835
|
-
const timeoutMs = method === "getHierarchy" ? LONG_RPC_TIMEOUT_MS : DEFAULT_RPC_TIMEOUT_MS;
|
|
113883
|
+
const timeoutMs = method === "getHierarchy" ? LONG_RPC_TIMEOUT_MS : method === "setText" ? SET_TEXT_RPC_TIMEOUT_MS : DEFAULT_RPC_TIMEOUT_MS;
|
|
113836
113884
|
return new Promise((resolveReq, rejectReq) => {
|
|
113837
113885
|
const timer = setTimeout(() => {
|
|
113838
113886
|
pending.delete(id);
|
|
@@ -114201,6 +114249,35 @@ var androidDevtoolsBlueprint = {
|
|
|
114201
114249
|
},
|
|
114202
114250
|
ping() {
|
|
114203
114251
|
return client2.request("ping");
|
|
114252
|
+
},
|
|
114253
|
+
async setText(text, setOpts = {}) {
|
|
114254
|
+
let result;
|
|
114255
|
+
try {
|
|
114256
|
+
result = await client2.request("setText", {
|
|
114257
|
+
text,
|
|
114258
|
+
...setOpts.check ? { check: true } : {}
|
|
114259
|
+
});
|
|
114260
|
+
} catch (err) {
|
|
114261
|
+
if (err instanceof Error && err.message.includes("Unknown method: setText")) {
|
|
114262
|
+
throw new FailureError("The devtools helper predates `setText`; update argent", {
|
|
114263
|
+
error_code: FAILURE_CODES.ANDROID_DEVTOOLS_RPC_ERROR,
|
|
114264
|
+
failure_stage: "android_devtools_set_text",
|
|
114265
|
+
failure_area: "tool_server",
|
|
114266
|
+
error_kind: "unknown"
|
|
114267
|
+
});
|
|
114268
|
+
}
|
|
114269
|
+
if (getFailureSignal(err)?.error_code === FAILURE_CODES.ANDROID_DEVTOOLS_RPC_TIMEOUT || err instanceof Error && err.message.includes("Helper worker timed out")) {
|
|
114270
|
+
return { focused: true, verified: false, timedOut: true };
|
|
114271
|
+
}
|
|
114272
|
+
throw err;
|
|
114273
|
+
}
|
|
114274
|
+
return {
|
|
114275
|
+
focused: result.focused === true,
|
|
114276
|
+
verified: result.verified === true,
|
|
114277
|
+
...typeof result.performed === "boolean" ? { performed: result.performed } : {},
|
|
114278
|
+
...typeof result.password === "boolean" ? { password: result.password } : {},
|
|
114279
|
+
...result.singleLine === true ? { singleLine: true } : {}
|
|
114280
|
+
};
|
|
114204
114281
|
}
|
|
114205
114282
|
};
|
|
114206
114283
|
const instance = {
|
|
@@ -116733,11 +116810,11 @@ function scheduleGroupSigkill(pid, graceMs, opts) {
|
|
|
116733
116810
|
}
|
|
116734
116811
|
async function pollPidsUntilGone(pids, opts) {
|
|
116735
116812
|
const isAlive2 = opts.isAlive ?? pidIsAlive;
|
|
116736
|
-
const
|
|
116813
|
+
const sleep15 = opts.sleep ?? ((ms) => new Promise((resolve14) => setTimeout(resolve14, ms)));
|
|
116737
116814
|
const maxPolls = Math.max(1, Math.ceil(opts.timeoutMs / opts.pollIntervalMs));
|
|
116738
116815
|
let remaining = pids.filter((pid) => isAlive2(pid));
|
|
116739
116816
|
for (let poll = 0; poll < maxPolls && remaining.length > 0; poll += 1) {
|
|
116740
|
-
await
|
|
116817
|
+
await sleep15(opts.pollIntervalMs);
|
|
116741
116818
|
remaining = remaining.filter((pid) => isAlive2(pid));
|
|
116742
116819
|
}
|
|
116743
116820
|
return remaining;
|
|
@@ -127267,9 +127344,9 @@ async function invokeSubTool(registry2, ctx, toolId, args, extra) {
|
|
|
127267
127344
|
}
|
|
127268
127345
|
function describeNestedParamError(registry2, err, toolId, dispatchedArgs, authoredArgs) {
|
|
127269
127346
|
if (getFailureSignal(err)?.error_code !== FAILURE_CODES.TOOL_INPUT_INVALID) return void 0;
|
|
127270
|
-
const
|
|
127271
|
-
if (!
|
|
127272
|
-
const parsed =
|
|
127347
|
+
const zodSchema82 = registry2.getTool(toolId)?.zodSchema;
|
|
127348
|
+
if (!zodSchema82) return void 0;
|
|
127349
|
+
const parsed = zodSchema82.safeParse(dispatchedArgs ?? {});
|
|
127273
127350
|
if (parsed.success) return void 0;
|
|
127274
127351
|
return `Invalid params for tool "${toolId}": ${describeParamIssues(parsed.error, authoredArgs)}`;
|
|
127275
127352
|
}
|
|
@@ -137114,6 +137191,389 @@ A field is unset when it is unknown.`,
|
|
|
137114
137191
|
};
|
|
137115
137192
|
}
|
|
137116
137193
|
|
|
137194
|
+
// ../tool-server/src/tools/fill/index.ts
|
|
137195
|
+
init_zod();
|
|
137196
|
+
init_adb();
|
|
137197
|
+
|
|
137198
|
+
// ../tool-server/src/tools/fill/errors.ts
|
|
137199
|
+
init_src2();
|
|
137200
|
+
function noFocusedFieldError(stage) {
|
|
137201
|
+
return new InvalidToolInputError(
|
|
137202
|
+
"Nothing that takes text has keyboard focus, so nothing was changed. Tap the text field first, then call fill again.",
|
|
137203
|
+
{
|
|
137204
|
+
error_code: FAILURE_CODES.FILL_NO_FOCUSED_FIELD,
|
|
137205
|
+
failure_stage: stage,
|
|
137206
|
+
error_kind: "validation"
|
|
137207
|
+
}
|
|
137208
|
+
);
|
|
137209
|
+
}
|
|
137210
|
+
function notVerifiedError(stage) {
|
|
137211
|
+
return new FailureError(
|
|
137212
|
+
"fill wrote to the focused field, but reading it back did not show the requested text. The field may hold other or partial text: read it before retrying.",
|
|
137213
|
+
{
|
|
137214
|
+
error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
|
|
137215
|
+
failure_stage: stage,
|
|
137216
|
+
failure_area: "tool_server",
|
|
137217
|
+
error_kind: "unknown"
|
|
137218
|
+
}
|
|
137219
|
+
);
|
|
137220
|
+
}
|
|
137221
|
+
function notChangedError(stage) {
|
|
137222
|
+
return new FailureError(
|
|
137223
|
+
"fill could not select the text of the focused field, so nothing was changed. Tap the field and retry.",
|
|
137224
|
+
{
|
|
137225
|
+
error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
|
|
137226
|
+
failure_stage: stage,
|
|
137227
|
+
failure_area: "tool_server",
|
|
137228
|
+
error_kind: "unknown"
|
|
137229
|
+
}
|
|
137230
|
+
);
|
|
137231
|
+
}
|
|
137232
|
+
function notAnsweredError(stage) {
|
|
137233
|
+
return new FailureError(
|
|
137234
|
+
"The device did not finish the fill in time. The field may have changed: read it before retrying.",
|
|
137235
|
+
{
|
|
137236
|
+
error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
|
|
137237
|
+
failure_stage: stage,
|
|
137238
|
+
failure_area: "tool_server",
|
|
137239
|
+
error_kind: "timeout"
|
|
137240
|
+
}
|
|
137241
|
+
);
|
|
137242
|
+
}
|
|
137243
|
+
function unsupportedFieldError(detail, stage) {
|
|
137244
|
+
return new InvalidToolInputError(
|
|
137245
|
+
`fill cannot set this field's text: ${detail}. Nothing was changed.`,
|
|
137246
|
+
{
|
|
137247
|
+
error_code: FAILURE_CODES.FILL_UNSUPPORTED_FIELD,
|
|
137248
|
+
failure_stage: stage,
|
|
137249
|
+
error_kind: "unsupported"
|
|
137250
|
+
}
|
|
137251
|
+
);
|
|
137252
|
+
}
|
|
137253
|
+
|
|
137254
|
+
// ../tool-server/src/tools/fill/keys.ts
|
|
137255
|
+
init_src2();
|
|
137256
|
+
init_src2();
|
|
137257
|
+
var MAX_CLEAR_KEYS = 100;
|
|
137258
|
+
var XCTEST_DELETE = "\b";
|
|
137259
|
+
var KEY_TIMING = { holdMs: 20, settleMs: 300, typeDelayMs: 30 };
|
|
137260
|
+
var sleep14 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
137261
|
+
function typeableOnSimulator(text) {
|
|
137262
|
+
for (const char of text) if (!charToKeyPress(char)) return false;
|
|
137263
|
+
return true;
|
|
137264
|
+
}
|
|
137265
|
+
async function withoutTextInErrors(stage, run2) {
|
|
137266
|
+
try {
|
|
137267
|
+
return await run2();
|
|
137268
|
+
} catch (err) {
|
|
137269
|
+
const signal = getFailureSignal(err);
|
|
137270
|
+
throw new FailureError(
|
|
137271
|
+
"fill failed partway through typing: the focused field may hold part of the text. Read it before retrying.",
|
|
137272
|
+
signal ?? {
|
|
137273
|
+
error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
|
|
137274
|
+
failure_stage: stage,
|
|
137275
|
+
failure_area: "tool_server",
|
|
137276
|
+
error_kind: "unknown"
|
|
137277
|
+
}
|
|
137278
|
+
);
|
|
137279
|
+
}
|
|
137280
|
+
}
|
|
137281
|
+
async function pressSimulatorBackspace(registry2, device) {
|
|
137282
|
+
const ref = simulatorServerRef(device);
|
|
137283
|
+
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
137284
|
+
await api.pressKey("Down", NAMED_KEYS.backspace);
|
|
137285
|
+
await sleep14(KEY_TIMING.holdMs);
|
|
137286
|
+
await api.pressKey("Up", NAMED_KEYS.backspace);
|
|
137287
|
+
await sleep14(KEY_TIMING.settleMs);
|
|
137288
|
+
}
|
|
137289
|
+
async function typeOnSimulator(registry2, device, text) {
|
|
137290
|
+
if (!text) return;
|
|
137291
|
+
await withoutTextInErrors(
|
|
137292
|
+
"fill_keys_ios",
|
|
137293
|
+
() => typeSimulatorServer(registry2, device, {
|
|
137294
|
+
udid: device.id,
|
|
137295
|
+
text,
|
|
137296
|
+
delayMs: KEY_TIMING.typeDelayMs
|
|
137297
|
+
})
|
|
137298
|
+
);
|
|
137299
|
+
}
|
|
137300
|
+
async function fillByDeviceKeys(registry2, device, text) {
|
|
137301
|
+
const bundleId = requireCurrentIosDeviceApp(device.id);
|
|
137302
|
+
const ref = iosDeviceRunnerRef(device);
|
|
137303
|
+
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
137304
|
+
const type = async (chars) => {
|
|
137305
|
+
try {
|
|
137306
|
+
await typeText(api, bundleId, chars);
|
|
137307
|
+
} catch (err) {
|
|
137308
|
+
if (err instanceof RunnerCommandError && err.code === "TEXT_INPUT_NOT_FOCUSED") {
|
|
137309
|
+
throw noFocusedFieldError("fill_keys_ios_device_focus");
|
|
137310
|
+
}
|
|
137311
|
+
throw err;
|
|
137312
|
+
}
|
|
137313
|
+
};
|
|
137314
|
+
await type(XCTEST_DELETE.repeat(MAX_CLEAR_KEYS));
|
|
137315
|
+
if (text) await withoutTextInErrors("fill_keys_ios_device", () => type(text));
|
|
137316
|
+
}
|
|
137317
|
+
|
|
137318
|
+
// ../tool-server/src/tools/fill/ios.ts
|
|
137319
|
+
var NEWLINE = /[\r\n]/;
|
|
137320
|
+
async function fillIos(registry2, device, text) {
|
|
137321
|
+
const ref = axServiceRef(device);
|
|
137322
|
+
const ax = await registry2.resolveService(ref.urn, ref.options);
|
|
137323
|
+
const typeable = typeableOnSimulator(text) && !NEWLINE.test(text);
|
|
137324
|
+
const first = await ax.fill(text, { typeable });
|
|
137325
|
+
if (!first.focused) throw noFocusedFieldError("fill_ios_no_focus");
|
|
137326
|
+
if (first.unsupported) {
|
|
137327
|
+
throw unsupportedFieldError(
|
|
137328
|
+
"the focused element is not a text input (a date or time input, or a picker)",
|
|
137329
|
+
"fill_ios_unsupported_field"
|
|
137330
|
+
);
|
|
137331
|
+
}
|
|
137332
|
+
if (first.singleLine) {
|
|
137333
|
+
throw unsupportedFieldError(
|
|
137334
|
+
"a single-line text field cannot hold a newline",
|
|
137335
|
+
"fill_ios_single_line"
|
|
137336
|
+
);
|
|
137337
|
+
}
|
|
137338
|
+
if (first.timedOut) throw notAnsweredError("fill_ios_timeout");
|
|
137339
|
+
if (first.untouched) throw notChangedError("fill_ios_select_failed");
|
|
137340
|
+
if (first.verified) return { verified: true };
|
|
137341
|
+
if (first.secure) {
|
|
137342
|
+
if (!typeable) {
|
|
137343
|
+
throw unsupportedFieldError(
|
|
137344
|
+
"a secure text field takes only text the keyboard can type on one line, and this text has a character it cannot",
|
|
137345
|
+
"fill_ios_secure_untypeable"
|
|
137346
|
+
);
|
|
137347
|
+
}
|
|
137348
|
+
if (!first.cleared) throw notVerifiedError("fill_ios_secure_not_cleared");
|
|
137349
|
+
await typeOnSimulator(registry2, device, text);
|
|
137350
|
+
const check3 = await ax.fill(text, { check: true });
|
|
137351
|
+
if (check3.verified) return { verified: true };
|
|
137352
|
+
throw notVerifiedError("fill_ios_not_verified");
|
|
137353
|
+
}
|
|
137354
|
+
if (first.needsBackspace) {
|
|
137355
|
+
await pressSimulatorBackspace(registry2, device);
|
|
137356
|
+
const check3 = await ax.fill(text, { check: true });
|
|
137357
|
+
if (check3.verified) return { verified: true };
|
|
137358
|
+
}
|
|
137359
|
+
throw notVerifiedError("fill_ios_not_verified");
|
|
137360
|
+
}
|
|
137361
|
+
|
|
137362
|
+
// ../tool-server/src/tools/fill/android.ts
|
|
137363
|
+
async function fillAndroid(registry2, device, text) {
|
|
137364
|
+
const ref = androidDevtoolsRef(device);
|
|
137365
|
+
const helper = await registry2.resolveService(ref.urn, ref.options);
|
|
137366
|
+
const answer = await helper.setText(text);
|
|
137367
|
+
if (!answer.focused) throw noFocusedFieldError("fill_android_no_focus");
|
|
137368
|
+
if (answer.singleLine) {
|
|
137369
|
+
throw unsupportedFieldError(
|
|
137370
|
+
"a single-line text field cannot hold a newline",
|
|
137371
|
+
"fill_android_single_line"
|
|
137372
|
+
);
|
|
137373
|
+
}
|
|
137374
|
+
if (answer.timedOut) throw notAnsweredError("fill_android_timeout");
|
|
137375
|
+
if (answer.verified) return { verified: true };
|
|
137376
|
+
throw notVerifiedError("fill_android_not_verified");
|
|
137377
|
+
}
|
|
137378
|
+
|
|
137379
|
+
// ../tool-server/src/tools/fill/chromium.ts
|
|
137380
|
+
init_src2();
|
|
137381
|
+
function buildChromiumFillScript(text) {
|
|
137382
|
+
return `(async () => {
|
|
137383
|
+
const text = ${JSON.stringify(text)};
|
|
137384
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
137385
|
+
try {
|
|
137386
|
+
const deepActive = (doc) => {
|
|
137387
|
+
let el = doc.activeElement;
|
|
137388
|
+
while (el && el.shadowRoot && el.shadowRoot.activeElement) el = el.shadowRoot.activeElement;
|
|
137389
|
+
return el;
|
|
137390
|
+
};
|
|
137391
|
+
let el = deepActive(document);
|
|
137392
|
+
while (el && String(el.tagName).toLowerCase() === "iframe") {
|
|
137393
|
+
let inner = null;
|
|
137394
|
+
try { inner = el.contentDocument; } catch (e) { inner = null; }
|
|
137395
|
+
if (!inner) return { status: "no_focus" };
|
|
137396
|
+
el = deepActive(inner);
|
|
137397
|
+
}
|
|
137398
|
+
if (!el || el.tagName === undefined) return { status: "no_focus" };
|
|
137399
|
+
const doc = el.ownerDocument || document;
|
|
137400
|
+
const win = doc.defaultView || window;
|
|
137401
|
+
const tag = String(el.tagName).toLowerCase();
|
|
137402
|
+
const type = tag === "input" ? String(el.type || "text").toLowerCase() : null;
|
|
137403
|
+
if (type !== null && /^(date|time|month|week|datetime-local)$/.test(type)) {
|
|
137404
|
+
return { status: "unsupported", detail: "a " + type + " input holds a structured value" };
|
|
137405
|
+
}
|
|
137406
|
+
const control =
|
|
137407
|
+
tag === "textarea" ||
|
|
137408
|
+
(tag === "input" && !/^(button|checkbox|radio|file|submit|reset|image|range|color|hidden)$/.test(type));
|
|
137409
|
+
if (!control && el.isContentEditable !== true) return { status: "no_focus" };
|
|
137410
|
+
if (control && el.disabled === true) return { status: "unsupported", detail: "it is disabled" };
|
|
137411
|
+
if (control && el.readOnly === true) return { status: "unsupported", detail: "it is read-only" };
|
|
137412
|
+
// An <input> holds one line and drops a newline.
|
|
137413
|
+
if (tag === "input" && /[\\r\\n]/.test(text)) {
|
|
137414
|
+
return { status: "unsupported", detail: "a single-line input cannot hold a newline" };
|
|
137415
|
+
}
|
|
137416
|
+
if (!control) {
|
|
137417
|
+
// designMode or <body contenteditable>: the whole document is the field.
|
|
137418
|
+
let host = el;
|
|
137419
|
+
while (host.parentElement && host.parentElement.isContentEditable === true) host = host.parentElement;
|
|
137420
|
+
if (host === doc.body || host === doc.documentElement) {
|
|
137421
|
+
return { status: "unsupported", detail: "the whole document is editable" };
|
|
137422
|
+
}
|
|
137423
|
+
}
|
|
137424
|
+
const trimEnd = (s) => s.replace(/[\\u200b\\ufeff]/g, "").replace(/\\n+$/, "");
|
|
137425
|
+
const read = () =>
|
|
137426
|
+
control ? String(el.value == null ? "" : el.value) : trimEnd(String(el.innerText == null ? el.textContent || "" : el.innerText));
|
|
137427
|
+
const matches = () => (control ? read() === text : read() === trimEnd(text));
|
|
137428
|
+
const settle = async () => {
|
|
137429
|
+
for (let i = 0; i < 10; i++) {
|
|
137430
|
+
await sleep(i === 0 ? 0 : 50);
|
|
137431
|
+
if (matches()) return true;
|
|
137432
|
+
}
|
|
137433
|
+
return false;
|
|
137434
|
+
};
|
|
137435
|
+
|
|
137436
|
+
if (control) {
|
|
137437
|
+
try { el.select(); } catch (e) { /* no selection API */ }
|
|
137438
|
+
} else {
|
|
137439
|
+
const sel = doc.getSelection();
|
|
137440
|
+
const range = doc.createRange();
|
|
137441
|
+
range.selectNodeContents(el);
|
|
137442
|
+
sel.removeAllRanges();
|
|
137443
|
+
sel.addRange(range);
|
|
137444
|
+
}
|
|
137445
|
+
if (text === "") {
|
|
137446
|
+
if (read() !== "") doc.execCommand("delete");
|
|
137447
|
+
} else {
|
|
137448
|
+
doc.execCommand("insertText", false, text);
|
|
137449
|
+
}
|
|
137450
|
+
let verified = await settle();
|
|
137451
|
+
if (!verified && control) {
|
|
137452
|
+
const proto = tag === "textarea" ? win.HTMLTextAreaElement.prototype : win.HTMLInputElement.prototype;
|
|
137453
|
+
const setter = Object.getOwnPropertyDescriptor(proto, "value").set;
|
|
137454
|
+
setter.call(el, text);
|
|
137455
|
+
el.dispatchEvent(new win.Event("input", { bubbles: true }));
|
|
137456
|
+
el.dispatchEvent(new win.Event("change", { bubbles: true }));
|
|
137457
|
+
verified = await settle();
|
|
137458
|
+
}
|
|
137459
|
+
return { status: "ok", verified: verified };
|
|
137460
|
+
} catch (e) {
|
|
137461
|
+
return { status: "error" };
|
|
137462
|
+
}
|
|
137463
|
+
})()`;
|
|
137464
|
+
}
|
|
137465
|
+
async function fillChromium(registry2, device, text) {
|
|
137466
|
+
const ref = chromiumCdpRef(device);
|
|
137467
|
+
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
137468
|
+
const out = await api.cdp.send(
|
|
137469
|
+
"Runtime.evaluate",
|
|
137470
|
+
{ expression: buildChromiumFillScript(text), awaitPromise: true, returnByValue: true },
|
|
137471
|
+
1e4
|
|
137472
|
+
);
|
|
137473
|
+
const answer = out.result?.value;
|
|
137474
|
+
switch (answer?.status) {
|
|
137475
|
+
case "ok":
|
|
137476
|
+
if (answer.verified === true) {
|
|
137477
|
+
return { verified: true };
|
|
137478
|
+
}
|
|
137479
|
+
throw notVerifiedError("fill_chromium_not_verified");
|
|
137480
|
+
case "no_focus":
|
|
137481
|
+
throw noFocusedFieldError("fill_chromium_no_focus");
|
|
137482
|
+
case "unsupported":
|
|
137483
|
+
throw unsupportedFieldError(answer.detail ?? "unsupported field", "fill_chromium_field");
|
|
137484
|
+
default:
|
|
137485
|
+
throw new FailureError("fill could not run in the page; nothing is known about the field.", {
|
|
137486
|
+
error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
|
|
137487
|
+
failure_stage: "fill_chromium_script",
|
|
137488
|
+
failure_area: "tool_server",
|
|
137489
|
+
error_kind: "unknown",
|
|
137490
|
+
failure_command: "cdp"
|
|
137491
|
+
});
|
|
137492
|
+
}
|
|
137493
|
+
}
|
|
137494
|
+
|
|
137495
|
+
// ../tool-server/src/tools/fill/index.ts
|
|
137496
|
+
var zodSchema43 = external_exports.object({
|
|
137497
|
+
udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
|
|
137498
|
+
text: external_exports.string().describe(
|
|
137499
|
+
'The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`.'
|
|
137500
|
+
)
|
|
137501
|
+
});
|
|
137502
|
+
var capability28 = {
|
|
137503
|
+
apple: { simulator: true, device: true },
|
|
137504
|
+
appleRemote: { simulator: true },
|
|
137505
|
+
android: { emulator: true, device: true, unknown: true },
|
|
137506
|
+
chromium: { app: true }
|
|
137507
|
+
};
|
|
137508
|
+
function createFillTool(registry2) {
|
|
137509
|
+
const dispatch = dispatchByPlatform({
|
|
137510
|
+
toolId: "fill",
|
|
137511
|
+
capability: capability28,
|
|
137512
|
+
ios: {
|
|
137513
|
+
requires: iosRequires,
|
|
137514
|
+
handler: async (_services, params, device) => {
|
|
137515
|
+
if (await isTvOsSimulator(device.id)) {
|
|
137516
|
+
throw new UnsupportedOperationError("fill", device, "tvOS");
|
|
137517
|
+
}
|
|
137518
|
+
return fillIos(registry2, device, params.text);
|
|
137519
|
+
}
|
|
137520
|
+
},
|
|
137521
|
+
iosRemote: {
|
|
137522
|
+
requires: ["sim-remote"],
|
|
137523
|
+
handler: async (_services, params, device) => {
|
|
137524
|
+
if (await isRemoteTvOsSimulator(device.id)) {
|
|
137525
|
+
throw new UnsupportedOperationError("fill", device, "tvOS");
|
|
137526
|
+
}
|
|
137527
|
+
return fillIos(registry2, device, params.text);
|
|
137528
|
+
}
|
|
137529
|
+
},
|
|
137530
|
+
iosDevice: {
|
|
137531
|
+
requires: ["xcrun"],
|
|
137532
|
+
handler: async (_services, params, device) => {
|
|
137533
|
+
await fillByDeviceKeys(registry2, device, params.text);
|
|
137534
|
+
return { verified: false };
|
|
137535
|
+
}
|
|
137536
|
+
},
|
|
137537
|
+
android: {
|
|
137538
|
+
requires: androidRequires,
|
|
137539
|
+
handler: async (_services, params, device) => {
|
|
137540
|
+
if (await isAndroidTv(device.id)) {
|
|
137541
|
+
throw new UnsupportedOperationError("fill", device, "Android TV");
|
|
137542
|
+
}
|
|
137543
|
+
return fillAndroid(registry2, device, params.text);
|
|
137544
|
+
}
|
|
137545
|
+
},
|
|
137546
|
+
chromium: {
|
|
137547
|
+
handler: async (_services, params, device) => fillChromium(registry2, device, params.text)
|
|
137548
|
+
}
|
|
137549
|
+
});
|
|
137550
|
+
return {
|
|
137551
|
+
id: "fill",
|
|
137552
|
+
interaction: {
|
|
137553
|
+
// Never quote `text`: it may be a credential, and these messages reach
|
|
137554
|
+
// the event log.
|
|
137555
|
+
startedMsg: () => "Filling the focused field",
|
|
137556
|
+
completedMsg: () => "Filled the focused field",
|
|
137557
|
+
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to fill the field: ${failureSignal2.error_code}`
|
|
137558
|
+
},
|
|
137559
|
+
description: `Set the text of the focused text field to exactly \`text\`, replacing what it holds; "" clears it. Tap the field first.
|
|
137560
|
+
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.
|
|
137561
|
+
Fails with FILL_NO_FOCUSED_FIELD when nothing editable has focus, FILL_NOT_VERIFIED when the field does not read back the text, FILL_UNSUPPORTED_FIELD for a field that cannot take the text (a date or time input, a newline in a single-line field; nothing is changed). Fails if the device's ax-service or devtools helper predates fill; update argent. Not supported on TV targets or Vega.`,
|
|
137562
|
+
hideFromMcp: true,
|
|
137563
|
+
zodSchema: zodSchema43,
|
|
137564
|
+
capability: capability28,
|
|
137565
|
+
services: () => ({}),
|
|
137566
|
+
execute: async (services, params, options) => {
|
|
137567
|
+
const { text, secrets } = resolveSecretPlaceholders(params.text);
|
|
137568
|
+
try {
|
|
137569
|
+
return await dispatch(services, { udid: params.udid, text }, options);
|
|
137570
|
+
} catch (err) {
|
|
137571
|
+
throw redactSecretsFromError(err, secrets);
|
|
137572
|
+
}
|
|
137573
|
+
}
|
|
137574
|
+
};
|
|
137575
|
+
}
|
|
137576
|
+
|
|
137117
137577
|
// ../tool-server/src/tools/await-screen-idle/index.ts
|
|
137118
137578
|
init_zod();
|
|
137119
137579
|
init_device_info();
|
|
@@ -137122,7 +137582,7 @@ var AWAIT_SCREEN_IDLE_TOOL_ID = "await-screen-idle";
|
|
|
137122
137582
|
var DEFAULT_TIMEOUT_MS4 = 3e3;
|
|
137123
137583
|
var DEFAULT_POLL_INTERVAL_MS2 = 200;
|
|
137124
137584
|
var DEFAULT_MIN_STABLE_MS = 250;
|
|
137125
|
-
var
|
|
137585
|
+
var zodSchema44 = external_exports.object({
|
|
137126
137586
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
|
|
137127
137587
|
timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
|
|
137128
137588
|
`Max time to wait for the screen to settle before giving up (default ${DEFAULT_TIMEOUT_MS4}).`
|
|
@@ -137132,7 +137592,7 @@ var zodSchema43 = external_exports.object({
|
|
|
137132
137592
|
`The screen must hold the same content for at least this long to count as settled (default ${DEFAULT_MIN_STABLE_MS}).`
|
|
137133
137593
|
)
|
|
137134
137594
|
}).strict();
|
|
137135
|
-
var
|
|
137595
|
+
var capability29 = {
|
|
137136
137596
|
apple: { simulator: true, device: true },
|
|
137137
137597
|
appleRemote: { simulator: true },
|
|
137138
137598
|
android: { emulator: true, device: true, unknown: true },
|
|
@@ -137179,8 +137639,8 @@ ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls }; sett
|
|
|
137179
137639
|
still before the timeout. Use after a launch/navigation to wait for the UI to render before screenshotting or tapping.`,
|
|
137180
137640
|
searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
|
|
137181
137641
|
longRunning: true,
|
|
137182
|
-
zodSchema:
|
|
137183
|
-
capability:
|
|
137642
|
+
zodSchema: zodSchema44,
|
|
137643
|
+
capability: capability29,
|
|
137184
137644
|
services: (params) => {
|
|
137185
137645
|
const device = resolveDevice(params.udid);
|
|
137186
137646
|
if (device.platform === "chromium") {
|
|
@@ -137190,7 +137650,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
|
|
|
137190
137650
|
},
|
|
137191
137651
|
async execute(services, params, ctx) {
|
|
137192
137652
|
const device = resolveDevice(params.udid);
|
|
137193
|
-
assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID,
|
|
137653
|
+
assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability29, device);
|
|
137194
137654
|
if (device.platform === "ios") await ensureDeps(iosRequires);
|
|
137195
137655
|
else if (device.platform === "ios-remote") await ensureDeps(["sim-remote"]);
|
|
137196
137656
|
else if (device.platform === "android") await ensureDeps(androidRequires);
|
|
@@ -137277,7 +137737,7 @@ function bootstrapFailureMessage(bootstrap) {
|
|
|
137277
137737
|
// ../tool-server/src/tools/profiler/react/react-profiler-start.ts
|
|
137278
137738
|
var NO_DEVTOOLS_HOOK_ERROR = "React DevTools hook (__REACT_DEVTOOLS_GLOBAL_HOOK__) is not present in this app's JavaScript runtime. React profiling requires a development build with React DevTools enabled. Likely causes: (1) the app is a release/production build \u2014 DevTools is stripped to reduce bundle size; (2) you connected to the wrong JS runtime; (3) this isn't a React (Native) app. Fix: rebuild in debug/dev mode (e.g. `npx react-native run-ios` without --configuration Release; for Expo, run a dev client). Once the app is running with DevTools attached, call react-profiler-start again.";
|
|
137279
137739
|
var NO_RENDERERS_ATTACHED_ERROR = "React DevTools hook is present but no React renderer has registered yet. The hook is loaded but no fiber renderer has attached \u2014 typically because the app has not committed its first render, or the DevTools backend has not been bootstrapped on a bridgeless React Native dev build. Fix: ensure the app has rendered (interact with it once, then retry); if it stays empty, call react-profiler-start first \u2014 it will attempt to attach the DevTools backend automatically.";
|
|
137280
|
-
var
|
|
137740
|
+
var zodSchema45 = external_exports.object({
|
|
137281
137741
|
port: metroPortField,
|
|
137282
137742
|
device_id: external_exports.string().describe(
|
|
137283
137743
|
"Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
|
|
@@ -137309,7 +137769,7 @@ Before calling this, ask the user if they also want native profiling (native-pro
|
|
|
137309
137769
|
After starting, ask the user to perform the interaction to profile, then call react-profiler-stop.
|
|
137310
137770
|
Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture } on success, or the already_running payload described above.
|
|
137311
137771
|
Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
|
|
137312
|
-
zodSchema:
|
|
137772
|
+
zodSchema: zodSchema45,
|
|
137313
137773
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
137314
137774
|
services: () => ({}),
|
|
137315
137775
|
async execute(_services, params) {
|
|
@@ -137580,7 +138040,7 @@ async function readCommitTree(path53) {
|
|
|
137580
138040
|
}
|
|
137581
138041
|
|
|
137582
138042
|
// ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
|
|
137583
|
-
var
|
|
138043
|
+
var zodSchema46 = external_exports.object({
|
|
137584
138044
|
port: metroPortField,
|
|
137585
138045
|
device_id: external_exports.string().describe(
|
|
137586
138046
|
"Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
|
|
@@ -137669,7 +138129,7 @@ Call react-profiler-start first, then exercise the app, then call this.
|
|
|
137669
138129
|
Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices } summarizing the session.
|
|
137670
138130
|
When any commit had fibers whose display name could not be resolved at stop time (typically transient components like modals/tooltips/animations that unmounted before stop), the response also includes { unattributed_ms, unattributed_fiber_count, unattributed_commit_count }. These quantify how much work is not accounted for in the per-component breakdown (the per-commit duration itself remains correct).
|
|
137671
138131
|
Fails if no active profiling session exists or the CDP connection was lost during recording.`,
|
|
137672
|
-
zodSchema:
|
|
138132
|
+
zodSchema: zodSchema46,
|
|
137673
138133
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
137674
138134
|
services: () => ({}),
|
|
137675
138135
|
async execute(_services, params) {
|
|
@@ -137894,7 +138354,7 @@ Fails if no active profiling session exists or the CDP connection was lost durin
|
|
|
137894
138354
|
|
|
137895
138355
|
// ../tool-server/src/tools/profiler/react/react-profiler-status.ts
|
|
137896
138356
|
init_zod();
|
|
137897
|
-
var
|
|
138357
|
+
var zodSchema47 = external_exports.object({
|
|
137898
138358
|
port: metroPortField,
|
|
137899
138359
|
device_id: external_exports.string().describe(
|
|
137900
138360
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -137909,7 +138369,7 @@ function createReactProfilerStatusTool(registry2) {
|
|
|
137909
138369
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to check React profiler: ${failureSignal2.error_code}`
|
|
137910
138370
|
},
|
|
137911
138371
|
description: `Check the state of the React profiler session without side effects. Use after an interruption (debugger disconnect, unexpected error, agent pause) to decide whether to continue with react-profiler-stop, start a new session, or reconnect the debugger. Ownership is verified server-side against this tool-server's in-memory session, so no token-threading is required. Returns { session_status, is_running, current_owner, \u2026 }. If this tool-server process restarted after react-profiler-start, status will report 'taken_over'; use react-profiler-start { force: true } to reclaim.`,
|
|
137912
|
-
zodSchema:
|
|
138372
|
+
zodSchema: zodSchema47,
|
|
137913
138373
|
// RN-only: companion to react-profiler-start.
|
|
137914
138374
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
137915
138375
|
services: () => ({}),
|
|
@@ -139523,7 +139983,7 @@ var annotationSchema = external_exports.object({
|
|
|
139523
139983
|
),
|
|
139524
139984
|
label: external_exports.string().describe("Description of the action performed")
|
|
139525
139985
|
});
|
|
139526
|
-
var
|
|
139986
|
+
var zodSchema48 = external_exports.object({
|
|
139527
139987
|
port: metroPortField,
|
|
139528
139988
|
device_id: external_exports.string().describe(
|
|
139529
139989
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -139556,7 +140016,7 @@ where tapTimestampMs is the timestampMs returned by the tap/swipe tool and start
|
|
|
139556
140016
|
is returned by react-profiler-start.
|
|
139557
140017
|
Use when the profiling session is complete and you need to interpret the collected data.
|
|
139558
140018
|
Fails if react-profiler-stop has not been called or no profiling data is stored.`,
|
|
139559
|
-
zodSchema:
|
|
140019
|
+
zodSchema: zodSchema48,
|
|
139560
140020
|
// RN-only: reads commit data captured via the React DevTools backend, which
|
|
139561
140021
|
// Chromium does not have.
|
|
139562
140022
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
@@ -139693,7 +140153,7 @@ Fails if react-profiler-stop has not been called or no profiling data is stored.
|
|
|
139693
140153
|
// ../tool-server/src/tools/profiler/react/react-profiler-component-source.ts
|
|
139694
140154
|
init_zod();
|
|
139695
140155
|
var import_fs6 = require("fs");
|
|
139696
|
-
var
|
|
140156
|
+
var zodSchema49 = external_exports.object({
|
|
139697
140157
|
component_name: external_exports.string().describe("Name of the React component to look up"),
|
|
139698
140158
|
project_root: external_exports.string().describe("Absolute path to the RN project root")
|
|
139699
140159
|
});
|
|
@@ -139711,7 +140171,7 @@ var reactProfilerComponentSourceTool = {
|
|
|
139711
140171
|
Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
|
|
139712
140172
|
Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
|
|
139713
140173
|
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.`,
|
|
139714
|
-
zodSchema:
|
|
140174
|
+
zodSchema: zodSchema49,
|
|
139715
140175
|
// Declared so the tool catalogue groups this with the other react-profiler-*
|
|
139716
140176
|
// tools; the HTTP gate itself is a no-op here, as there is no device arg to
|
|
139717
140177
|
// inspect.
|
|
@@ -139767,7 +140227,7 @@ When several files define a component with the same name (e.g. platform variants
|
|
|
139767
140227
|
// ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
|
|
139768
140228
|
init_zod();
|
|
139769
140229
|
init_src2();
|
|
139770
|
-
var
|
|
140230
|
+
var zodSchema50 = external_exports.object({
|
|
139771
140231
|
port: metroPortField,
|
|
139772
140232
|
device_id: external_exports.string().describe(
|
|
139773
140233
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -139849,7 +140309,7 @@ Use when you specifically need to investigate JS CPU hotspots that are NOT tied
|
|
|
139849
140309
|
Call react-profiler-stop first. Reads directly from the stored cpuProfile.
|
|
139850
140310
|
Returns a markdown table of the top hotspot functions with self-time, total-time, and location.
|
|
139851
140311
|
Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
|
|
139852
|
-
zodSchema:
|
|
140312
|
+
zodSchema: zodSchema50,
|
|
139853
140313
|
// RN-only: reads a Hermes CPU profile; Chromium's V8 sample format differs.
|
|
139854
140314
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
139855
140315
|
services: () => ({}),
|
|
@@ -139945,7 +140405,7 @@ function renderMarkdownTable2(entries) {
|
|
|
139945
140405
|
);
|
|
139946
140406
|
return [header, sep5, ...rows].join("\n");
|
|
139947
140407
|
}
|
|
139948
|
-
var
|
|
140408
|
+
var zodSchema51 = external_exports.object({
|
|
139949
140409
|
port: metroPortField,
|
|
139950
140410
|
device_id: external_exports.string().describe(
|
|
139951
140411
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -139963,7 +140423,7 @@ var reactProfilerRendersTool = {
|
|
|
139963
140423
|
Returns a markdown table of the top re-rendering components. No profiling session required; works on a live connected app.
|
|
139964
140424
|
Use when you want a quick snapshot of render counts without a full profiling session.
|
|
139965
140425
|
Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
|
|
139966
|
-
zodSchema:
|
|
140426
|
+
zodSchema: zodSchema51,
|
|
139967
140427
|
// RN-only: queries the React DevTools backend hook on the live runtime.
|
|
139968
140428
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
139969
140429
|
services: (params) => ({
|
|
@@ -140120,7 +140580,7 @@ function buildFiberTreeScript(maxDepth, filter) {
|
|
|
140120
140580
|
}
|
|
140121
140581
|
})()`;
|
|
140122
140582
|
}
|
|
140123
|
-
var
|
|
140583
|
+
var zodSchema52 = external_exports.object({
|
|
140124
140584
|
port: metroPortField,
|
|
140125
140585
|
device_id: external_exports.string().describe(
|
|
140126
140586
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -140139,7 +140599,7 @@ var reactProfilerFiberTreeTool = {
|
|
|
140139
140599
|
Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component).
|
|
140140
140600
|
Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
|
|
140141
140601
|
Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
|
|
140142
|
-
zodSchema:
|
|
140602
|
+
zodSchema: zodSchema52,
|
|
140143
140603
|
// RN-only: walks the fiber tree via the React DevTools backend hook.
|
|
140144
140604
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
140145
140605
|
services: (params) => ({
|
|
@@ -143937,7 +144397,7 @@ function metroDeviceIdParam(description) {
|
|
|
143937
144397
|
}
|
|
143938
144398
|
|
|
143939
144399
|
// ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
|
|
143940
|
-
var
|
|
144400
|
+
var zodSchema53 = external_exports.object({
|
|
143941
144401
|
device_id: metroDeviceIdParam(
|
|
143942
144402
|
"Target device id from `list-devices` (iOS UDID or Android serial)."
|
|
143943
144403
|
),
|
|
@@ -143951,7 +144411,7 @@ var zodSchema52 = external_exports.object({
|
|
|
143951
144411
|
"iOS-only. When true, cold-launches the app under the profiler with Malloc Stack Logging enabled so memory leaks carry an allocation backtrace (responsible frame + library). Without it, leaks are still detected but unattributable: Instruments reports '<Call stack limit reached>'. Trade-offs: this RESTARTS the app (current state is lost), adds memory/CPU overhead, and makes the app noticeably slow to launch (every startup allocation records a backtrace), so leave it off for pure CPU/hang profiling. Requires a non-degraded Xcode: on Xcode 26.4 and later the cold-launch path is broken, so the call is rejected up front (re-run without the flag, or set ARGENT_IOS_CAPTURE=device to override if the device path works on your host). ARGENT_IOS_CAPTURE=all-processes (e.g. exported globally for the normal capture path) also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android."
|
|
143952
144412
|
)
|
|
143953
144413
|
});
|
|
143954
|
-
var
|
|
144414
|
+
var capability30 = {
|
|
143955
144415
|
apple: { simulator: true },
|
|
143956
144416
|
android: { emulator: true, device: true, unknown: true }
|
|
143957
144417
|
};
|
|
@@ -143962,21 +144422,21 @@ var nativeProfilerStartTool = {
|
|
|
143962
144422
|
completedMsg: () => "Started native profiler",
|
|
143963
144423
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start native profiler: ${failureSignal2.error_code}`
|
|
143964
144424
|
},
|
|
143965
|
-
capability:
|
|
144425
|
+
capability: capability30,
|
|
143966
144426
|
description: `Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal).
|
|
143967
144427
|
Auto-detects the running app process unless app_process is explicitly provided.
|
|
143968
144428
|
After starting, let the user interact with the app, then call native-profiler-stop.
|
|
143969
144429
|
Use when you want to capture native CPU, hang, and memory data for a running app.
|
|
143970
144430
|
Returns { status, pid, traceFile } confirming the recording has started.
|
|
143971
144431
|
Fails if no app is running on the device, or the profiler cannot attach to the process.`,
|
|
143972
|
-
zodSchema:
|
|
144432
|
+
zodSchema: zodSchema53,
|
|
143973
144433
|
services: (params) => ({
|
|
143974
144434
|
session: nativeProfilerSessionRef(resolveDevice(params.device_id))
|
|
143975
144435
|
}),
|
|
143976
144436
|
async execute(services, params) {
|
|
143977
144437
|
const api = services.session;
|
|
143978
144438
|
const device = resolveDevice(params.device_id);
|
|
143979
|
-
assertSupported("native-profiler-start",
|
|
144439
|
+
assertSupported("native-profiler-start", capability30, device);
|
|
143980
144440
|
if (api.platform === "ios") {
|
|
143981
144441
|
await ensureDeps(["xcrun"]);
|
|
143982
144442
|
return startNativeProfilerIos(api, params);
|
|
@@ -143989,12 +144449,12 @@ Fails if no app is running on the device, or the profiler cannot attach to the p
|
|
|
143989
144449
|
// ../tool-server/src/tools/profiler/native-profiler/native-profiler-stop.ts
|
|
143990
144450
|
init_zod();
|
|
143991
144451
|
init_device_info();
|
|
143992
|
-
var
|
|
144452
|
+
var zodSchema54 = external_exports.object({
|
|
143993
144453
|
device_id: metroDeviceIdParam(
|
|
143994
144454
|
"Target device id from `list-devices` (iOS UDID or Android serial)."
|
|
143995
144455
|
)
|
|
143996
144456
|
});
|
|
143997
|
-
var
|
|
144457
|
+
var capability31 = {
|
|
143998
144458
|
apple: { simulator: true },
|
|
143999
144459
|
android: { emulator: true, device: true, unknown: true }
|
|
144000
144460
|
};
|
|
@@ -144022,7 +144482,7 @@ var nativeProfilerStopTool = {
|
|
|
144022
144482
|
completedMsg: ({ result }) => `Saved native profile ${result.traceFile.filename}`,
|
|
144023
144483
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop native profiler: ${failureSignal2.error_code}`
|
|
144024
144484
|
},
|
|
144025
|
-
capability:
|
|
144485
|
+
capability: capability31,
|
|
144026
144486
|
// Packaging plus the export passes routinely exceed the 30s MCP fetch timeout.
|
|
144027
144487
|
longRunning: true,
|
|
144028
144488
|
description: `Stop native profiling and export trace data.
|
|
@@ -144032,14 +144492,14 @@ Call native-profiler-start first.
|
|
|
144032
144492
|
Use when the user has finished the interaction to profile and you need to export the trace.
|
|
144033
144493
|
Returns { traceFile, exportedFiles, exportDiagnostics? }; traceFile is the raw trace bundle and exportedFiles the exports, all downloadable artifacts materialized to local paths.
|
|
144034
144494
|
Fails if no active native-profiler-start session exists for the given device_id.`,
|
|
144035
|
-
zodSchema:
|
|
144495
|
+
zodSchema: zodSchema54,
|
|
144036
144496
|
services: (params) => ({
|
|
144037
144497
|
session: nativeProfilerSessionRef(resolveDevice(params.device_id))
|
|
144038
144498
|
}),
|
|
144039
144499
|
async execute(services, params, ctx) {
|
|
144040
144500
|
const api = services.session;
|
|
144041
144501
|
const device = resolveDevice(params.device_id);
|
|
144042
|
-
assertSupported("native-profiler-stop",
|
|
144502
|
+
assertSupported("native-profiler-stop", capability31, device);
|
|
144043
144503
|
if (api.platform === "ios") {
|
|
144044
144504
|
await ensureDeps(["xcrun"]);
|
|
144045
144505
|
const ios = await stopNativeProfilerIos(api);
|
|
@@ -144067,12 +144527,12 @@ Fails if no active native-profiler-start session exists for the given device_id.
|
|
|
144067
144527
|
// ../tool-server/src/tools/profiler/native-profiler/native-profiler-analyze.ts
|
|
144068
144528
|
init_zod();
|
|
144069
144529
|
init_device_info();
|
|
144070
|
-
var
|
|
144530
|
+
var zodSchema55 = external_exports.object({
|
|
144071
144531
|
device_id: metroDeviceIdParam(
|
|
144072
144532
|
"Target device id from `list-devices` (iOS UDID or Android serial)."
|
|
144073
144533
|
)
|
|
144074
144534
|
});
|
|
144075
|
-
var
|
|
144535
|
+
var capability32 = {
|
|
144076
144536
|
apple: { simulator: true },
|
|
144077
144537
|
android: { emulator: true, device: true, unknown: true }
|
|
144078
144538
|
};
|
|
@@ -144083,7 +144543,7 @@ var nativeProfilerAnalyzeTool = {
|
|
|
144083
144543
|
completedMsg: () => "Analyzed native profile",
|
|
144084
144544
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to analyze native profile: ${failureSignal2.error_code}`
|
|
144085
144545
|
},
|
|
144086
|
-
capability:
|
|
144546
|
+
capability: capability32,
|
|
144087
144547
|
// Parsing a trace from a recording up to RECORDING_CAP_MS long routinely exceeds
|
|
144088
144548
|
// the 30s MCP fetch timeout, and an aborted call is replayed, not cancelled.
|
|
144089
144549
|
longRunning: true,
|
|
@@ -144096,14 +144556,14 @@ profiler-stack-query for hang stacks, CPU context, leak details) or implement fi
|
|
|
144096
144556
|
Call native-profiler-stop first to export the trace data.
|
|
144097
144557
|
Use when you need to interpret a completed native profiling recording.
|
|
144098
144558
|
Fails if native-profiler-stop has not been called first to export trace data.`,
|
|
144099
|
-
zodSchema:
|
|
144559
|
+
zodSchema: zodSchema55,
|
|
144100
144560
|
services: (params) => ({
|
|
144101
144561
|
session: nativeProfilerSessionRef(resolveDevice(params.device_id))
|
|
144102
144562
|
}),
|
|
144103
144563
|
async execute(services, params, ctx) {
|
|
144104
144564
|
const api = services.session;
|
|
144105
144565
|
const device = resolveDevice(params.device_id);
|
|
144106
|
-
assertSupported("native-profiler-analyze",
|
|
144566
|
+
assertSupported("native-profiler-analyze", capability32, device);
|
|
144107
144567
|
let result;
|
|
144108
144568
|
if (api.platform === "ios") {
|
|
144109
144569
|
await ensureDeps(["xcrun"]);
|
|
@@ -145166,7 +145626,7 @@ var DEFAULT_TIME_LIMIT_SECONDS = 180;
|
|
|
145166
145626
|
var MAX_TIME_LIMIT_SECONDS = 600;
|
|
145167
145627
|
var POINTER_TRAIL_LENGTH = 8;
|
|
145168
145628
|
var POINTER_REQUEST_TIMEOUT_MS = 2e3;
|
|
145169
|
-
var
|
|
145629
|
+
var zodSchema56 = external_exports.object({
|
|
145170
145630
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial)."),
|
|
145171
145631
|
timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(
|
|
145172
145632
|
`Auto-stop cap in seconds (default ${DEFAULT_TIME_LIMIT_SECONDS}, max ${MAX_TIME_LIMIT_SECONDS}). Set it to slightly more than the interaction you plan to capture.`
|
|
@@ -145178,7 +145638,7 @@ var zodSchema55 = external_exports.object({
|
|
|
145178
145638
|
"Default true. Draw simulator-server's touch visualizer into the recording: a pulse marks each tap, a comet trail follows swipes and drags, and paired markers show two-finger pinch/rotate, so the video makes clear where every interaction landed. Set false to record the raw screen with no overlay."
|
|
145179
145639
|
)
|
|
145180
145640
|
});
|
|
145181
|
-
var
|
|
145641
|
+
var capability33 = {
|
|
145182
145642
|
apple: { simulator: true },
|
|
145183
145643
|
android: { emulator: true, device: true, unknown: true }
|
|
145184
145644
|
};
|
|
@@ -145190,7 +145650,7 @@ function createScreenRecordingStartTool(registry2) {
|
|
|
145190
145650
|
completedMsg: () => "Started screen recording",
|
|
145191
145651
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start screen recording: ${failureSignal2.error_code}`
|
|
145192
145652
|
},
|
|
145193
|
-
capability:
|
|
145653
|
+
capability: capability33,
|
|
145194
145654
|
description: `Start recording the device screen to a video file (h264 mp4, 30fps at the device's native resolution).
|
|
145195
145655
|
By default stretches where the screen does not change are trimmed out (see trimStatic), so a long session with only brief activity comes back as a short clip instead of minutes of dead air.
|
|
145196
145656
|
By default every tap, swipe, drag, pinch and rotate is drawn into the video as an on-screen touch marker (see showTouches), so the recording shows where each interaction landed.
|
|
@@ -145199,7 +145659,7 @@ Use when the user wants a video of an interaction, animation, or app behavior; f
|
|
|
145199
145659
|
Returns { status: "recording", timeLimitSeconds, outputFile }. The video is retrieved later by \`screen-recording-stop\`, not by reading outputFile directly.
|
|
145200
145660
|
Fails if a recording is already running on the device, the device is not booted, ffmpeg is not installed, or the platform cannot be recorded (tvOS, Chromium, Vega and remote simulators are unsupported).`,
|
|
145201
145661
|
searchHint: "record video screen capture movie mp4 start filming screencast",
|
|
145202
|
-
zodSchema:
|
|
145662
|
+
zodSchema: zodSchema56,
|
|
145203
145663
|
// Resolved inside execute, not declared eagerly: a tvOS udid classifies as
|
|
145204
145664
|
// iOS by shape, so an eager service would spawn simulator-server for a
|
|
145205
145665
|
// device it cannot drive and hang on its ready timeout (as in `screenshot`).
|
|
@@ -145209,7 +145669,7 @@ Fails if a recording is already running on the device, the device is not booted,
|
|
|
145209
145669
|
async execute(services, params) {
|
|
145210
145670
|
const api = services.session;
|
|
145211
145671
|
const device = resolveDevice(params.udid);
|
|
145212
|
-
assertSupported("screen-recording-start",
|
|
145672
|
+
assertSupported("screen-recording-start", capability33, device);
|
|
145213
145673
|
if (device.platform === "ios" && await isTvOsSimulator(params.udid)) {
|
|
145214
145674
|
throw new FailureError(
|
|
145215
145675
|
`Screen recording is not supported on tvOS simulators (device ${params.udid}).`,
|
|
@@ -145298,11 +145758,11 @@ function makePointerControl(simulator) {
|
|
|
145298
145758
|
var import_node_path22 = require("node:path");
|
|
145299
145759
|
init_zod();
|
|
145300
145760
|
init_device_info();
|
|
145301
|
-
var
|
|
145761
|
+
var zodSchema57 = external_exports.object({
|
|
145302
145762
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial).")
|
|
145303
145763
|
});
|
|
145304
145764
|
var RECORDINGS_DIR = ".argent/recordings";
|
|
145305
|
-
var
|
|
145765
|
+
var capability34 = {
|
|
145306
145766
|
apple: { simulator: true },
|
|
145307
145767
|
android: { emulator: true, device: true, unknown: true }
|
|
145308
145768
|
};
|
|
@@ -145313,21 +145773,21 @@ var screenRecordingStopTool = {
|
|
|
145313
145773
|
completedMsg: ({ result }) => `Saved screen recording ${result.video.filename}`,
|
|
145314
145774
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop screen recording: ${failureSignal2.error_code}`
|
|
145315
145775
|
},
|
|
145316
|
-
capability:
|
|
145776
|
+
capability: capability34,
|
|
145317
145777
|
description: `Stop the screen recording started by \`screen-recording-start\` and retrieve the video: frame capture ends and ffmpeg finalizes the mp4.
|
|
145318
145778
|
Also retrieves the video when the recording already ended on its own (time limit reached, capture process died); call it even after the cap fired.
|
|
145319
145779
|
Use when the interaction being captured is finished, or a tool-result note reminds you a recording is still running.
|
|
145320
145780
|
Returns { video, durationMs, wallClockMs?, trimmedMs?, panelSwitches?, warning? }; video is a downloadable artifact materialized to a local path. When static-frame trimming removed dead air, durationMs is the trimmed video length and wallClockMs/trimmedMs report the real duration and how much was cut. On a foldable simulator, the recording follows the panel that shows the UI. panelSwitches gives the number of panel changes. The video keeps the size of the first panel. warning is set when argent could not find that panel during the recording.
|
|
145321
145781
|
Fails if no recording (running or finished-but-unretrieved) exists for the given udid.`,
|
|
145322
145782
|
searchHint: "stop end finish screen recording video capture save retrieve",
|
|
145323
|
-
zodSchema:
|
|
145783
|
+
zodSchema: zodSchema57,
|
|
145324
145784
|
services: (params) => ({
|
|
145325
145785
|
session: screenRecordingSessionRef(resolveDevice(params.udid))
|
|
145326
145786
|
}),
|
|
145327
145787
|
async execute(services, params, ctx) {
|
|
145328
145788
|
const api = services.session;
|
|
145329
145789
|
const device = resolveDevice(params.udid);
|
|
145330
|
-
assertSupported("screen-recording-stop",
|
|
145790
|
+
assertSupported("screen-recording-stop", capability34, device);
|
|
145331
145791
|
const stopped = await stopCapture(api);
|
|
145332
145792
|
const artifacts = requireArtifacts(ctx);
|
|
145333
145793
|
const video = await artifacts.register({
|
|
@@ -145359,7 +145819,7 @@ var timeWindowSchema = external_exports.object({
|
|
|
145359
145819
|
"End of window in ms since profiling started, the same clock profiler-commit-query prints"
|
|
145360
145820
|
)
|
|
145361
145821
|
});
|
|
145362
|
-
var
|
|
145822
|
+
var zodSchema58 = external_exports.object({
|
|
145363
145823
|
port: metroPortField,
|
|
145364
145824
|
device_id: metroDeviceIdParam(
|
|
145365
145825
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -145648,7 +146108,7 @@ Every table states how many samples it covers and how much of that was idle.
|
|
|
145648
146108
|
Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
|
|
145649
146109
|
Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
|
|
145650
146110
|
Fails if no CPU profile is stored; run react-profiler-stop first.`,
|
|
145651
|
-
zodSchema:
|
|
146111
|
+
zodSchema: zodSchema58,
|
|
145652
146112
|
// RN-only: reads Hermes-format CPU profiles; Chromium's V8 sample format differs.
|
|
145653
146113
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
145654
146114
|
services: () => ({}),
|
|
@@ -145734,7 +146194,7 @@ var timeRangeSchema = external_exports.object({
|
|
|
145734
146194
|
"End of range in ms since profiling started, the same clock profiler-commit-query prints"
|
|
145735
146195
|
)
|
|
145736
146196
|
});
|
|
145737
|
-
var
|
|
146197
|
+
var zodSchema59 = external_exports.object({
|
|
145738
146198
|
port: metroPortField,
|
|
145739
146199
|
device_id: metroDeviceIdParam(
|
|
145740
146200
|
"Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
|
|
@@ -146007,7 +146467,7 @@ Modes:
|
|
|
146007
146467
|
Use when drilling into specific components or time windows after react-profiler-analyze.
|
|
146008
146468
|
Returns a markdown table or tree of commit data matching the requested mode.
|
|
146009
146469
|
Fails if react-profiler-stop has not been called or no commit data is stored.`,
|
|
146010
|
-
zodSchema:
|
|
146470
|
+
zodSchema: zodSchema59,
|
|
146011
146471
|
// Reads React commit data captured via the React DevTools backend.
|
|
146012
146472
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
146013
146473
|
services: () => ({}),
|
|
@@ -146078,7 +146538,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
|
|
|
146078
146538
|
init_zod();
|
|
146079
146539
|
init_src2();
|
|
146080
146540
|
init_device_info();
|
|
146081
|
-
var
|
|
146541
|
+
var zodSchema60 = external_exports.object({
|
|
146082
146542
|
device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
|
|
146083
146543
|
mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe(
|
|
146084
146544
|
"Query mode: hang_stacks (full CPU context during a hang), function_callers (who calls a native function), thread_breakdown (CPU split by thread), leak_stacks (leak details by object type)"
|
|
@@ -146396,7 +146856,7 @@ Modes:
|
|
|
146396
146856
|
Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze.
|
|
146397
146857
|
Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode.
|
|
146398
146858
|
Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.`,
|
|
146399
|
-
zodSchema:
|
|
146859
|
+
zodSchema: zodSchema60,
|
|
146400
146860
|
// No chromium entry: it has no native trace capture.
|
|
146401
146861
|
capability: {
|
|
146402
146862
|
apple: { simulator: true },
|
|
@@ -146466,7 +146926,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
|
|
|
146466
146926
|
}
|
|
146467
146927
|
|
|
146468
146928
|
// ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
|
|
146469
|
-
var
|
|
146929
|
+
var zodSchema61 = external_exports.object({
|
|
146470
146930
|
port: metroPortField,
|
|
146471
146931
|
device_id: metroDeviceIdParam("iOS Simulator/device UDID or Android serial")
|
|
146472
146932
|
});
|
|
@@ -146483,7 +146943,7 @@ Requires both react-profiler-analyze and native-profiler-analyze to have been ca
|
|
|
146483
146943
|
Call this tool when both profilers were run in parallel on the same session.
|
|
146484
146944
|
Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
|
|
146485
146945
|
Fails if either react-profiler-analyze or native-profiler-analyze has not been called first.`,
|
|
146486
|
-
zodSchema:
|
|
146946
|
+
zodSchema: zodSchema61,
|
|
146487
146947
|
// iOS reads xctrace output; Android re-queries the Perfetto .pftrace via
|
|
146488
146948
|
// loadAndroidCombinedData. Chromium has no native trace capture.
|
|
146489
146949
|
capability: {
|
|
@@ -146807,7 +147267,7 @@ function assertSafeSessionId(sessionId) {
|
|
|
146807
147267
|
);
|
|
146808
147268
|
}
|
|
146809
147269
|
}
|
|
146810
|
-
var
|
|
147270
|
+
var zodSchema62 = external_exports.object({
|
|
146811
147271
|
mode: external_exports.enum(["list", "load_react", "load_native"]).describe(
|
|
146812
147272
|
"list: show available sessions on disk. load_react: load a React profiler session into memory for query tools. load_native: re-parse native profiler XML files (xctrace on iOS) into memory for query tools."
|
|
146813
147273
|
),
|
|
@@ -147168,7 +147628,7 @@ Modes:
|
|
|
147168
147628
|
For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar.
|
|
147169
147629
|
Returns a summary of the loaded session or a session list for the list mode.
|
|
147170
147630
|
Fails if the session_id is not found or required XML files are missing from disk.`,
|
|
147171
|
-
zodSchema:
|
|
147631
|
+
zodSchema: zodSchema62,
|
|
147172
147632
|
// The Hermes, xctrace and perfetto formats this loads have no Chromium
|
|
147173
147633
|
// equivalent; the gate fails at the call site, not inside the trace parser.
|
|
147174
147634
|
capability: RN_ONLY_TOOL_CAPABILITY,
|
|
@@ -147297,7 +147757,7 @@ function unnameableSessionUrns(urns) {
|
|
|
147297
147757
|
}
|
|
147298
147758
|
|
|
147299
147759
|
// ../tool-server/src/tools/simulator/stop-simulator-server.ts
|
|
147300
|
-
var
|
|
147760
|
+
var zodSchema63 = external_exports.object({
|
|
147301
147761
|
udid: external_exports.string().describe(
|
|
147302
147762
|
"Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
|
|
147303
147763
|
)
|
|
@@ -147311,7 +147771,7 @@ function createStopSimulatorServerTool(registry2) {
|
|
|
147311
147771
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop simulator server for ${params.udid}: ${failureSignal2.error_code}`
|
|
147312
147772
|
},
|
|
147313
147773
|
description: `Stop the transport session for a specific device (iOS simulator / Android: simulator-server process; physical iOS: the on-device runner; Chromium: CDP WebSocket) and free its resources; on a TV target it also reaps that device's TV-control daemons. Use when you are done interacting with one device but want to keep others running, or to restart a wedged transport. On iOS / Android / TV it deliberately leaves this device's native-devtools, accessibility, profiler and debugger services running - to drain those as well, use stop-all-simulator-servers with \`devices\`. On CHROMIUM that does not hold: the JS-runtime debugger declares the CDP session as a dependency, so stopping the transport cascades to it and its captured console history goes with it - reconnect with debugger-connect afterwards. Returns { stopped, udid }. Fails silently if no session is open for the given id.`,
|
|
147314
|
-
zodSchema:
|
|
147774
|
+
zodSchema: zodSchema63,
|
|
147315
147775
|
services: () => ({}),
|
|
147316
147776
|
async execute(_services, params) {
|
|
147317
147777
|
const udid = params.udid;
|
|
@@ -147342,7 +147802,7 @@ function createStopSimulatorServerTool(registry2) {
|
|
|
147342
147802
|
init_zod();
|
|
147343
147803
|
init_src2();
|
|
147344
147804
|
init_external_devices();
|
|
147345
|
-
var
|
|
147805
|
+
var zodSchema64 = external_exports.object({
|
|
147346
147806
|
devices: external_exports.array(external_exports.string()).optional().describe(
|
|
147347
147807
|
"Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to. Pass the devices THIS session actually used. Omit only for a deliberate machine-wide cleanup: one tool-server serves every agent using this argent install, so an unscoped stop also kills devices another agent is mid-session on."
|
|
147348
147808
|
)
|
|
@@ -147381,7 +147841,7 @@ function createStopAllSimulatorServersTool(registry2) {
|
|
|
147381
147841
|
PASS \`devices\` with the device ids this session used: one tool-server serves every agent, subagent and CLI call using this argent install, and an unscoped call tears down THEIR devices too (a mid-recording devtools teardown degrades another agent's flow to brittle coordinate taps; that agent is warned, but its recorded steps are already the worse kind). Omit \`devices\` only when a machine-wide cleanup is what you actually want. Passing an EMPTY array scopes to nothing and stops nothing - it is not a way to ask for the machine-wide sweep.
|
|
147382
147842
|
A JS-runtime debugger session is keyed by the id you called \`debugger-connect\` with. On a Metro serving two or more devices that id is not a udid or serial - connect refuses those and tells you to re-target with the \`logicalDeviceId\` it returns - so a scope built from \`list-devices\` ids cannot reach that session. Pass any such \`logicalDeviceId\` in \`devices\` ALONGSIDE the device id; { left_running } names the ones you missed.
|
|
147383
147843
|
Returns { stopped } - the URNs of the services that were actually live and got shut down; an ERROR node is disposed too but never appears there, so an empty \`stopped\` only means nothing was still running. { unmatched } lists supplied ids that own no service here, so a mistyped id - or a device NAME passed where an id was expected - does not read as a clean machine. It is NOT proof the id is wrong: a Vega device is driven through CLI/adb shell-outs, so one you only booted and drove with the remote registers no service and always lands here, as does a real device of any platform this session never started anything on. Present ONLY when \`devices\` was supplied AND at least one id matched nothing - absent on an unscoped call and when every id matched. Stopping the same device twice does not report it unmatched: ownership counts regardless of service state. { left_running } lists the URNs of live debugger sessions (and the network inspectors / React profiler sessions riding on them) whose id no device scope can name - re-call with the id after each URN's \`<namespace>:<port>:\` prefix to reap them. { aborted: true } means the caller cancelled the request part-way, so the rest of the machine was left untouched and neither of the other two fields was computed. Past the schema - which rejects an unknown key outright, so the \`udids\` slip is an error rather than a silent machine-wide sweep - the call always succeeds; reaping nothing is a result, not a failure.`,
|
|
147384
|
-
zodSchema:
|
|
147844
|
+
zodSchema: zodSchema64,
|
|
147385
147845
|
services: () => ({}),
|
|
147386
147846
|
async execute(_services, params, ctx) {
|
|
147387
147847
|
const devices = params.devices;
|
|
@@ -147461,7 +147921,7 @@ function listeningPids(port) {
|
|
|
147461
147921
|
if (!output) return [];
|
|
147462
147922
|
return output.split("\n").map((s) => parseInt(s.trim(), 10)).filter((n) => !Number.isNaN(n));
|
|
147463
147923
|
}
|
|
147464
|
-
var
|
|
147924
|
+
var zodSchema65 = external_exports.object({
|
|
147465
147925
|
port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on (default 8081)")
|
|
147466
147926
|
});
|
|
147467
147927
|
var stopMetroTool = {
|
|
@@ -147472,7 +147932,7 @@ var stopMetroTool = {
|
|
|
147472
147932
|
failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop Metro on port ${params.port}: ${failureSignal2.error_code}`
|
|
147473
147933
|
},
|
|
147474
147934
|
description: `Stop the Metro bundler process listening on a given port (default 8081). Use when ending a React Native session or when Metro must be restarted. Returns { stopped, port, pids }; stopped=false if no process is found on the port. Fails if the port lookup command times out or the process cannot be killed. This is DESTRUCTIVE: always ask the user for confirmation before calling this tool.`,
|
|
147475
|
-
zodSchema:
|
|
147935
|
+
zodSchema: zodSchema65,
|
|
147476
147936
|
services: () => ({}),
|
|
147477
147937
|
async execute(_services, params) {
|
|
147478
147938
|
const port = params.port;
|
|
@@ -149816,7 +150276,7 @@ async function appendStepToFlow(session, step) {
|
|
|
149816
150276
|
}
|
|
149817
150277
|
|
|
149818
150278
|
// ../tool-server/src/tools/flows/flow-start-recording.ts
|
|
149819
|
-
var
|
|
150279
|
+
var zodSchema66 = external_exports.object({
|
|
149820
150280
|
name: external_exports.string().describe(
|
|
149821
150281
|
'Name for this flow (e.g. "settings-explore"): letters, digits, underscore and hyphen only.'
|
|
149822
150282
|
),
|
|
@@ -149873,7 +150333,7 @@ recording. Over a link, the next recorded step writes over your edit.
|
|
|
149873
150333
|
Without a link, the recorder reads the file again before each step, but an
|
|
149874
150334
|
edit that renumbers the steps drops the warnings that flow-finish-recording
|
|
149875
150335
|
reports for those steps.`,
|
|
149876
|
-
zodSchema:
|
|
150336
|
+
zodSchema: zodSchema66,
|
|
149877
150337
|
fileInputs: fileInputs2,
|
|
149878
150338
|
services: () => ({}),
|
|
149879
150339
|
async execute(_services, params, ctx) {
|
|
@@ -152373,7 +152833,7 @@ function stepAnchor(step) {
|
|
|
152373
152833
|
|
|
152374
152834
|
// ../tool-server/src/tools/flows/flow-add-step.ts
|
|
152375
152835
|
init_device_info();
|
|
152376
|
-
var
|
|
152836
|
+
var zodSchema67 = external_exports.object({
|
|
152377
152837
|
name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
|
|
152378
152838
|
project_root: external_exports.string().describe(
|
|
152379
152839
|
"Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to."
|
|
@@ -152832,7 +153292,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
|
|
|
152832
153292
|
// more times — and every retry re-runs the action and appends another step,
|
|
152833
153293
|
// because an aborted request still appends its first.
|
|
152834
153294
|
longRunning: true,
|
|
152835
|
-
zodSchema:
|
|
153295
|
+
zodSchema: zodSchema67,
|
|
152836
153296
|
fileInputs: fileInputs3,
|
|
152837
153297
|
services: () => ({}),
|
|
152838
153298
|
async execute(_services, params, ctx) {
|
|
@@ -153021,7 +153481,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
|
|
|
153021
153481
|
|
|
153022
153482
|
// ../tool-server/src/tools/flows/flow-insert-echo.ts
|
|
153023
153483
|
init_zod();
|
|
153024
|
-
var
|
|
153484
|
+
var zodSchema68 = external_exports.object({
|
|
153025
153485
|
name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
|
|
153026
153486
|
project_root: external_exports.string().describe(
|
|
153027
153487
|
"Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to."
|
|
@@ -153039,7 +153499,7 @@ var flowInsertEchoTool = {
|
|
|
153039
153499
|
description: `Record an echo step in the flow named by \`name\` + \`project_root\`. Echo steps print a message when the flow is replayed, useful as labels between tool calls.
|
|
153040
153500
|
Use when you want to annotate a recorded flow with a human-readable label or checkpoint message.
|
|
153041
153501
|
Returns { message, stepCount, savedTo }. Fails if that flow has no recording in progress.`,
|
|
153042
|
-
zodSchema:
|
|
153502
|
+
zodSchema: zodSchema68,
|
|
153043
153503
|
services: () => ({}),
|
|
153044
153504
|
async execute(_services, params) {
|
|
153045
153505
|
const session = await requireRecordingSession(params.project_root, params.name);
|
|
@@ -154342,7 +154802,7 @@ function errMsg3(err) {
|
|
|
154342
154802
|
|
|
154343
154803
|
// ../tool-server/src/tools/flows/flow-add-script.ts
|
|
154344
154804
|
var OUTPUT_RENDER_LIMIT_BYTES = 64 * 1024;
|
|
154345
|
-
var
|
|
154805
|
+
var zodSchema69 = external_exports.object({
|
|
154346
154806
|
name: external_exports.string().describe("Flow name passed to flow-start-recording."),
|
|
154347
154807
|
project_root: external_exports.string().describe("Absolute project root passed to flow-start-recording."),
|
|
154348
154808
|
path: external_exports.string().describe(
|
|
@@ -154399,7 +154859,7 @@ var flowAddScriptTool = {
|
|
|
154399
154859
|
// The flag only skips the adapter's own abort timer; its retry loop is
|
|
154400
154860
|
// untouched, so a call that fails some other way is still re-POSTed.
|
|
154401
154861
|
longRunning: true,
|
|
154402
|
-
zodSchema:
|
|
154862
|
+
zodSchema: zodSchema69,
|
|
154403
154863
|
services: () => ({}),
|
|
154404
154864
|
async execute(_services, params, ctx) {
|
|
154405
154865
|
const session = await requireRecordingSession(params.project_root, params.name);
|
|
@@ -154489,7 +154949,7 @@ var flowAddScriptTool = {
|
|
|
154489
154949
|
// ../tool-server/src/tools/flows/flow-finish-recording.ts
|
|
154490
154950
|
init_zod();
|
|
154491
154951
|
var fs60 = __toESM(require("node:fs/promises"));
|
|
154492
|
-
var
|
|
154952
|
+
var zodSchema70 = external_exports.object({
|
|
154493
154953
|
name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
|
|
154494
154954
|
project_root: external_exports.string().describe(
|
|
154495
154955
|
"Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish."
|
|
@@ -154548,7 +155008,7 @@ var flowFinishRecordingTool = {
|
|
|
154548
155008
|
description: `Finish recording the flow named by \`name\` + \`project_root\`, leaving recordings under any other key untouched. Returns { message, path, executionPrerequisite, steps, summary, flowFile, savedTo } - a summary of all recorded steps plus the final YAML. Use when you have added all desired steps and want to finalize the flow file. Fails if that flow has no recording in progress.
|
|
154549
155009
|
A warning flow-add-step raised on a recorded \`await-ui-element\` is repeated in \`summary\` as a \`warning:\` line of its own, right below the step it judges, and \`message\` counts them by kind. A warning is repeated only while the step it judges is still identifiable by its number: hand-editing the .yaml during the recording moves the steps, so those warnings are DROPPED rather than pinned on whichever step inherited the number, and \`message\` says how many were dropped. A step that carries a cross-tree warning was re-probed against the runner's tree: read it before converting that wait to \`await:\`/\`assert:\`, which is what the verdict is about and what this moment is for. A step that recorded a wait which did not pass was never probed at all, and its own warning names the CAUSE, because only one of them judges the condition: an unmet wait was read and found false, and it stops the run at replay; a wait whose tree source could not be read, or one that was cancelled, observed nothing and leaves the condition UNKNOWN rather than known-bad. Read those before replaying.
|
|
154550
155010
|
You can still edit the .yaml file directly afterwards to remove or reorder steps.`,
|
|
154551
|
-
zodSchema:
|
|
155011
|
+
zodSchema: zodSchema70,
|
|
154552
155012
|
services: () => ({}),
|
|
154553
155013
|
async execute(_services, params) {
|
|
154554
155014
|
const { filePath, flowFile, savedTo, flow, summary, headline } = await withFlowFileLock(
|
|
@@ -157026,7 +157486,7 @@ async function restoreStatusBar(device) {
|
|
|
157026
157486
|
}
|
|
157027
157487
|
|
|
157028
157488
|
// ../tool-server/src/tools/flows/flow-run.ts
|
|
157029
|
-
var
|
|
157489
|
+
var zodSchema71 = external_exports.object({
|
|
157030
157490
|
name: external_exports.string().optional().describe(
|
|
157031
157491
|
'Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
|
|
157032
157492
|
),
|
|
@@ -157533,7 +157993,7 @@ one-off interaction use the gesture tools instead, and to author a flow use flow
|
|
|
157533
157993
|
exactly one flow source: name (under project_root) or flow_path.
|
|
157534
157994
|
Returns a per-step report: the first failure stops the run and the rest report as skipped.`,
|
|
157535
157995
|
longRunning: true,
|
|
157536
|
-
zodSchema:
|
|
157996
|
+
zodSchema: zodSchema71,
|
|
157537
157997
|
fileInputs: fileInputs4,
|
|
157538
157998
|
services: () => ({}),
|
|
157539
157999
|
async execute(_services, params, ctx) {
|
|
@@ -158510,7 +158970,7 @@ async function resolveFlowSource(params, fileInput, flowPathInput) {
|
|
|
158510
158970
|
// ../tool-server/src/tools/flows/flow-read-prerequisite.ts
|
|
158511
158971
|
init_zod();
|
|
158512
158972
|
var fs64 = __toESM(require("node:fs/promises"));
|
|
158513
|
-
var
|
|
158973
|
+
var zodSchema72 = external_exports.object({
|
|
158514
158974
|
name: external_exports.string().optional().describe(
|
|
158515
158975
|
'Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
|
|
158516
158976
|
),
|
|
@@ -158566,7 +159026,7 @@ Touches no device: nothing is launched, tapped, dispatched or torn down, and no
|
|
|
158566
159026
|
needs booting, so calling this costs nothing but a file read.
|
|
158567
159027
|
Fails if the flow file does not exist.
|
|
158568
159028
|
Address the flow exactly as you will address it in flow-execute: name or flow_path, one and only one; supplying both or neither is rejected. The name goes in \`name\`, which resolves <project_root>/.argent/flows/<name>.yaml.`,
|
|
158569
|
-
zodSchema:
|
|
159029
|
+
zodSchema: zodSchema72,
|
|
158570
159030
|
fileInputs: fileInputs5,
|
|
158571
159031
|
services: () => ({}),
|
|
158572
159032
|
async execute(_services, params, ctx) {
|
|
@@ -158882,7 +159342,7 @@ async function readWorkspaceSnapshot(workspacePath) {
|
|
|
158882
159342
|
}
|
|
158883
159343
|
|
|
158884
159344
|
// ../tool-server/src/tools/workspace/gather-workspace-data.ts
|
|
158885
|
-
var
|
|
159345
|
+
var zodSchema73 = external_exports.object({
|
|
158886
159346
|
workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
|
|
158887
159347
|
});
|
|
158888
159348
|
var fileInputs6 = [
|
|
@@ -158913,7 +159373,7 @@ exploration of anything the snapshot surfaces.
|
|
|
158913
159373
|
Use when you need to inspect project configuration without manually reading multiple files.
|
|
158914
159374
|
Returns partial data if workspacePath does not exist or is not readable; missing items are represented as null or empty collections.
|
|
158915
159375
|
Fails if the workspacePath is not an absolute path or the directory cannot be accessed.`,
|
|
158916
|
-
zodSchema:
|
|
159376
|
+
zodSchema: zodSchema73,
|
|
158917
159377
|
fileInputs: fileInputs6,
|
|
158918
159378
|
services: () => ({}),
|
|
158919
159379
|
async execute(_services, params) {
|
|
@@ -158987,7 +159447,7 @@ function targetFlagsFor(target) {
|
|
|
158987
159447
|
if (target === "both") return ["--global", "--local"];
|
|
158988
159448
|
return [`--${target}`];
|
|
158989
159449
|
}
|
|
158990
|
-
var
|
|
159450
|
+
var zodSchema74 = external_exports.object({
|
|
158991
159451
|
target: external_exports.enum(["auto", "global", "local", "both"]).optional().describe(
|
|
158992
159452
|
"Which install to update. 'auto' (default) updates the install serving this session: the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated."
|
|
158993
159453
|
)
|
|
@@ -159001,7 +159461,7 @@ var updateArgentTool = {
|
|
|
159001
159461
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to update Argent: ${failureSignal2.error_code}`
|
|
159002
159462
|
},
|
|
159003
159463
|
description: "Apply a pending Argent update. Only call this tool when the user has explicitly consented to updating Argent in this conversation. Use when an update notification indicates a new version is available and the user agrees to update. By default updates the install serving this session; pass `target` to choose global/local/both. Returns { message } with the update status and version info. The tool server will restart automatically after the update. Fails if no update is available or an update is already in progress.",
|
|
159004
|
-
zodSchema:
|
|
159464
|
+
zodSchema: zodSchema74,
|
|
159005
159465
|
services: () => ({}),
|
|
159006
159466
|
async execute(_services, params, _options) {
|
|
159007
159467
|
const { updateAvailable, updateInstallable, currentVersion, installableVersion } = getUpdateState();
|
|
@@ -159086,7 +159546,7 @@ var updateArgentTool = {
|
|
|
159086
159546
|
|
|
159087
159547
|
// ../tool-server/src/tools/system/dismiss-update.ts
|
|
159088
159548
|
init_zod();
|
|
159089
|
-
var
|
|
159549
|
+
var zodSchema75 = external_exports.object({
|
|
159090
159550
|
hours: external_exports.number().min(0).describe("Number of hours to suppress the update notification")
|
|
159091
159551
|
});
|
|
159092
159552
|
var dismissUpdateTool = {
|
|
@@ -159097,7 +159557,7 @@ var dismissUpdateTool = {
|
|
|
159097
159557
|
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to dismiss Argent update: ${failureSignal2.error_code}`
|
|
159098
159558
|
},
|
|
159099
159559
|
description: "Clear the Argent update notification for the given number of hours. Use when the user asks to postpone or silence update reminders. Returns { message } confirming the suppression duration. Fails if the hours value is negative or the suppression state cannot be persisted.",
|
|
159100
|
-
zodSchema:
|
|
159560
|
+
zodSchema: zodSchema75,
|
|
159101
159561
|
services: () => ({}),
|
|
159102
159562
|
async execute(_services, params, _options) {
|
|
159103
159563
|
const durationMs = params.hours * 60 * 60 * 1e3;
|
|
@@ -159116,7 +159576,7 @@ var import_path8 = __toESM(require("path"));
|
|
|
159116
159576
|
init_zod();
|
|
159117
159577
|
init_src2();
|
|
159118
159578
|
init_device_info();
|
|
159119
|
-
var
|
|
159579
|
+
var zodSchema76 = external_exports.object({
|
|
159120
159580
|
baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
|
|
159121
159581
|
currentPath: external_exports.string().min(1).optional().describe("Path to the current PNG file. Required unless captureCurrent is true."),
|
|
159122
159582
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
@@ -159133,7 +159593,7 @@ var zodSchema75 = external_exports.object({
|
|
|
159133
159593
|
"Directory where diff artifacts should be written. Optional: defaults to a temp directory; the diff images are returned in the result either way."
|
|
159134
159594
|
)
|
|
159135
159595
|
}).strict();
|
|
159136
|
-
var
|
|
159596
|
+
var capability35 = {
|
|
159137
159597
|
apple: { simulator: true, device: true },
|
|
159138
159598
|
android: { emulator: true, device: true, unknown: true }
|
|
159139
159599
|
};
|
|
@@ -159158,8 +159618,8 @@ Returns { summary, diffPath, contextDiffPath }. The summary uses normalized [0,1
|
|
|
159158
159618
|
Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
|
|
159159
159619
|
Fails if the input sources are invalid, PNG files cannot be read, outputDir cannot be written, or the simulator-server / emulator backend is not reachable.`,
|
|
159160
159620
|
searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture",
|
|
159161
|
-
zodSchema:
|
|
159162
|
-
capability:
|
|
159621
|
+
zodSchema: zodSchema76,
|
|
159622
|
+
capability: capability35,
|
|
159163
159623
|
fileInputs: fileInputs7,
|
|
159164
159624
|
services: (params) => {
|
|
159165
159625
|
if (params.captureBaseline || params.captureCurrent) {
|
|
@@ -159472,7 +159932,7 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
|
|
|
159472
159932
|
}
|
|
159473
159933
|
|
|
159474
159934
|
// ../tool-server/src/tools/variants/propose-variant.ts
|
|
159475
|
-
var
|
|
159935
|
+
var zodSchema77 = external_exports.object({
|
|
159476
159936
|
element: external_exports.string().min(1).max(200).describe(
|
|
159477
159937
|
'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.'
|
|
159478
159938
|
),
|
|
@@ -159532,7 +159992,7 @@ arrives as a follow-up message (this is the case in an \`argent lens\` CLI sessi
|
|
|
159532
159992
|
Returns { round, elementId, variantId, element, variantCount, totalElements }: confirmation only;
|
|
159533
159993
|
it does not wait for the user.`,
|
|
159534
159994
|
searchHint: "propose design variant alternative option for element non-blocking ab choice",
|
|
159535
|
-
zodSchema:
|
|
159995
|
+
zodSchema: zodSchema77,
|
|
159536
159996
|
services: () => ({}),
|
|
159537
159997
|
async execute(_services, params) {
|
|
159538
159998
|
let frame = params.variant.frame;
|
|
@@ -159556,7 +160016,7 @@ it does not wait for the user.`,
|
|
|
159556
160016
|
|
|
159557
160017
|
// ../tool-server/src/tools/variants/await-user-selection.ts
|
|
159558
160018
|
init_zod();
|
|
159559
|
-
var
|
|
160019
|
+
var zodSchema78 = external_exports.object({
|
|
159560
160020
|
timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
|
|
159561
160021
|
"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."
|
|
159562
160022
|
)
|
|
@@ -159597,7 +160057,7 @@ This tool is long-running; it intentionally holds the request open. It honors cl
|
|
|
159597
160057
|
disconnects (aborts cleanly).`,
|
|
159598
160058
|
searchHint: "await wait user selection choice variant blocking confirm picks complete",
|
|
159599
160059
|
longRunning: true,
|
|
159600
|
-
zodSchema:
|
|
160060
|
+
zodSchema: zodSchema78,
|
|
159601
160061
|
services: () => ({}),
|
|
159602
160062
|
async execute(_services, params, options) {
|
|
159603
160063
|
const timeoutMs = (params.timeoutSeconds ?? 1800) * 1e3;
|
|
@@ -159612,7 +160072,7 @@ disconnects (aborts cleanly).`,
|
|
|
159612
160072
|
init_zod();
|
|
159613
160073
|
init_src2();
|
|
159614
160074
|
init_device_info();
|
|
159615
|
-
var
|
|
160075
|
+
var zodSchema79 = external_exports.object({
|
|
159616
160076
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
159617
160077
|
action: external_exports.enum(["list", "select", "new", "close"]).describe(
|
|
159618
160078
|
"list: enumerate tabs/windows. select: make a tab active (every other tool then acts on it). new: open a tab. close: close a tab."
|
|
@@ -159645,7 +160105,7 @@ var tabAction = {
|
|
|
159645
160105
|
failure: "close"
|
|
159646
160106
|
}
|
|
159647
160107
|
};
|
|
159648
|
-
var
|
|
160108
|
+
var capability36 = {
|
|
159649
160109
|
chromium: { app: true }
|
|
159650
160110
|
};
|
|
159651
160111
|
var chromiumTabsTool = {
|
|
@@ -159663,8 +160123,8 @@ var chromiumTabsTool = {
|
|
|
159663
160123
|
Use when an app exposes multiple windows or tabs and you need to inspect or drive one other than the current page, or to open/close a page during a flow. tabIds are stable for the session and never reused.
|
|
159664
160124
|
Returns { tabs: [{ tabId, targetId, title, url, active, label? }] }. Fails if the device is not a Chromium (CDP) device, or the requested tabId/label no longer matches a live tab. Chromium-only.`,
|
|
159665
160125
|
searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
|
|
159666
|
-
zodSchema:
|
|
159667
|
-
capability:
|
|
160126
|
+
zodSchema: zodSchema79,
|
|
160127
|
+
capability: capability36,
|
|
159668
160128
|
services: (params) => {
|
|
159669
160129
|
const device = resolveDevice(params.udid);
|
|
159670
160130
|
if (device.platform === "chromium") {
|
|
@@ -159765,7 +160225,7 @@ async function clearStorage(cdp, type) {
|
|
|
159765
160225
|
}
|
|
159766
160226
|
|
|
159767
160227
|
// ../tool-server/src/tools/chromium-cookies/index.ts
|
|
159768
|
-
var
|
|
160228
|
+
var zodSchema80 = external_exports.object({
|
|
159769
160229
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
159770
160230
|
action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
|
|
159771
160231
|
"get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."
|
|
@@ -159788,7 +160248,7 @@ var cookieAction = {
|
|
|
159788
160248
|
delete: { started: "Deleting", completed: "Deleted", failure: "delete" },
|
|
159789
160249
|
clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
|
|
159790
160250
|
};
|
|
159791
|
-
var
|
|
160251
|
+
var capability37 = {
|
|
159792
160252
|
chromium: { app: true }
|
|
159793
160253
|
};
|
|
159794
160254
|
var chromiumCookiesTool = {
|
|
@@ -159806,8 +160266,8 @@ var chromiumCookiesTool = {
|
|
|
159806
160266
|
Use when seeding an authenticated session before a flow (set the session cookie, then navigate) or asserting cookie state after one.
|
|
159807
160267
|
Returns { cookies, count } for get, or a small status object ({ set } / { deleted } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or set is missing name/value. Chromium-only.`,
|
|
159808
160268
|
searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
|
|
159809
|
-
zodSchema:
|
|
159810
|
-
capability:
|
|
160269
|
+
zodSchema: zodSchema80,
|
|
160270
|
+
capability: capability37,
|
|
159811
160271
|
services: (params) => {
|
|
159812
160272
|
const device = resolveDevice(params.udid);
|
|
159813
160273
|
if (device.platform === "chromium") {
|
|
@@ -159872,7 +160332,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
|
|
|
159872
160332
|
init_zod();
|
|
159873
160333
|
init_src2();
|
|
159874
160334
|
init_device_info();
|
|
159875
|
-
var
|
|
160335
|
+
var zodSchema81 = external_exports.object({
|
|
159876
160336
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
159877
160337
|
store: external_exports.enum(["local", "session"]).describe("Which Web Storage area: `local` (localStorage) or `session` (sessionStorage)."),
|
|
159878
160338
|
action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
|
|
@@ -159887,7 +160347,7 @@ var storageAction = {
|
|
|
159887
160347
|
remove: { started: "Removing from", completed: "Removed from", failure: "remove from" },
|
|
159888
160348
|
clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
|
|
159889
160349
|
};
|
|
159890
|
-
var
|
|
160350
|
+
var capability38 = {
|
|
159891
160351
|
chromium: { app: true }
|
|
159892
160352
|
};
|
|
159893
160353
|
var chromiumStorageTool = {
|
|
@@ -159906,8 +160366,8 @@ Set \`store\` to "local" or "session". Storage is per-origin, so it reflects the
|
|
|
159906
160366
|
Use when seeding feature flags / auth tokens before a flow or asserting persisted app state after one.
|
|
159907
160367
|
Returns { value } for a single key, { entries, count } for all, or a status object ({ set } / { removed } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or set is missing key/value. Chromium-only.`,
|
|
159908
160368
|
searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
|
|
159909
|
-
zodSchema:
|
|
159910
|
-
capability:
|
|
160369
|
+
zodSchema: zodSchema81,
|
|
160370
|
+
capability: capability38,
|
|
159911
160371
|
services: (params) => {
|
|
159912
160372
|
const device = resolveDevice(params.udid);
|
|
159913
160373
|
if (device.platform === "chromium") {
|
|
@@ -160020,6 +160480,7 @@ function createRegistry() {
|
|
|
160020
160480
|
registry2.registerTool(createDescribeTool(registry2));
|
|
160021
160481
|
registry2.registerTool(createUiTreeTool(registry2));
|
|
160022
160482
|
registry2.registerTool(createForegroundAppTool(registry2));
|
|
160483
|
+
registry2.registerTool(createFillTool(registry2));
|
|
160023
160484
|
registry2.registerTool(createAwaitUiElementTool(registry2));
|
|
160024
160485
|
registry2.registerTool(createAwaitScreenIdleTool(registry2));
|
|
160025
160486
|
registry2.registerTool(createReactProfilerStartTool(registry2));
|