@swmansion/argent 0.28.1-next.22 → 0.28.1-next.24

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.
@@ -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 = (zodSchema81) => {
13227
- const seen = ctx.seen.get(zodSchema81);
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 = zodSchema81._zod.parent === ref;
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 = zodSchema81._zod.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: zodSchema81,
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 zodSchema82 = convertSchema(resolved, ctx);
16085
- ctx.refs.set(refPath, zodSchema82);
16087
+ const zodSchema83 = convertSchema(resolved, ctx);
16088
+ ctx.refs.set(refPath, zodSchema83);
16086
16089
  ctx.processing.delete(refPath);
16087
- return zodSchema82;
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 zodSchema81;
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
- zodSchema81 = stringSchema;
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
- zodSchema81 = numberSchema;
16220
+ zodSchema82 = numberSchema;
16218
16221
  break;
16219
16222
  }
16220
16223
  case "boolean": {
16221
- zodSchema81 = z.boolean();
16224
+ zodSchema82 = z.boolean();
16222
16225
  break;
16223
16226
  }
16224
16227
  case "null": {
16225
- zodSchema81 = z.null();
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
- zodSchema81 = z.record(keySchema, valueSchema);
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
- zodSchema81 = z.intersection(objectSchema2, recordSchema);
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
- zodSchema81 = z.object({}).passthrough();
16266
+ zodSchema82 = z.object({}).passthrough();
16264
16267
  } else if (schemasToIntersect.length === 1) {
16265
- zodSchema81 = schemasToIntersect[0];
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
- zodSchema81 = result;
16274
+ zodSchema82 = result;
16272
16275
  }
16273
16276
  break;
16274
16277
  }
16275
16278
  const objectSchema = z.object(shape);
16276
16279
  if (schema.additionalProperties === false) {
16277
- zodSchema81 = objectSchema.strict();
16280
+ zodSchema82 = objectSchema.strict();
16278
16281
  } else if (typeof schema.additionalProperties === "object") {
16279
- zodSchema81 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
16282
+ zodSchema82 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
16280
16283
  } else {
16281
- zodSchema81 = objectSchema.passthrough();
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
- zodSchema81 = z.tuple(tupleItems).rest(rest);
16295
+ zodSchema82 = z.tuple(tupleItems).rest(rest);
16293
16296
  } else {
16294
- zodSchema81 = z.tuple(tupleItems);
16297
+ zodSchema82 = z.tuple(tupleItems);
16295
16298
  }
16296
16299
  if (typeof schema.minItems === "number") {
16297
- zodSchema81 = zodSchema81.check(z.minLength(schema.minItems));
16300
+ zodSchema82 = zodSchema82.check(z.minLength(schema.minItems));
16298
16301
  }
16299
16302
  if (typeof schema.maxItems === "number") {
16300
- zodSchema81 = zodSchema81.check(z.maxLength(schema.maxItems));
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
- zodSchema81 = z.tuple(tupleItems).rest(rest);
16309
+ zodSchema82 = z.tuple(tupleItems).rest(rest);
16307
16310
  } else {
16308
- zodSchema81 = z.tuple(tupleItems);
16311
+ zodSchema82 = z.tuple(tupleItems);
16309
16312
  }
16310
16313
  if (typeof schema.minItems === "number") {
16311
- zodSchema81 = zodSchema81.check(z.minLength(schema.minItems));
16314
+ zodSchema82 = zodSchema82.check(z.minLength(schema.minItems));
16312
16315
  }
16313
16316
  if (typeof schema.maxItems === "number") {
16314
- zodSchema81 = zodSchema81.check(z.maxLength(schema.maxItems));
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
- zodSchema81 = arraySchema;
16328
+ zodSchema82 = arraySchema;
16326
16329
  } else {
16327
- zodSchema81 = z.array(z.any());
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 zodSchema81;
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, capability38) {
73659
- assertExternalCapabilitySync(namespace, device, capability38);
73661
+ async function assertExternalCapability(namespace, device, capability39) {
73662
+ assertExternalCapabilitySync(namespace, device, capability39);
73660
73663
  }
73661
- function assertExternalCapabilitySync(namespace, device, capability38) {
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(capability38)) return;
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 '${capability38}' capability for this device.`,
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.22";
94926
+ return "0.28.1-next.24";
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 capability38 = options?.granted ?? "simctl";
96698
- assertExternalCapabilitySync(capability38, udid, capability38);
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(JSON.stringify({ id, command }) + "\n");
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, capability38) {
97922
+ function platformMatrix(platform, capability39) {
97876
97923
  switch (platform) {
97877
97924
  case "ios":
97878
- return capability38.apple;
97925
+ return capability39.apple;
97879
97926
  case "ios-remote":
97880
- return capability38.appleRemote;
97927
+ return capability39.appleRemote;
97881
97928
  case "android":
97882
- return capability38.android;
97929
+ return capability39.android;
97883
97930
  case "chromium":
97884
- return capability38.chromium;
97931
+ return capability39.chromium;
97885
97932
  case "vega":
97886
- return capability38.vega;
97933
+ return capability39.vega;
97887
97934
  }
97888
97935
  }
97889
- function assertSupported(toolId, capability38, device) {
97890
- if (!capability38) return;
97891
- const matrix = platformMatrix(device.platform, capability38);
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 (capability38.supports && !capability38.supports(device)) {
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 sleep14 = opts.sleep ?? ((ms) => new Promise((resolve14) => setTimeout(resolve14, ms)));
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 sleep14(opts.pollIntervalMs);
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 zodSchema81 = registry2.getTool(toolId)?.zodSchema;
127271
- if (!zodSchema81) return void 0;
127272
- const parsed = zodSchema81.safeParse(dispatchedArgs ?? {});
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
  }
@@ -133438,6 +133515,9 @@ function evaluateCondition(condition, expectedText, matches2, textMatch = "conta
133438
133515
  case "text": {
133439
133516
  const first = firstInReadingOrder(matches2.filter(isVisible), orientation) ?? firstInReadingOrder(matches2, orientation);
133440
133517
  if (first === void 0 || expectedText === void 0) return false;
133518
+ if (textMatch === "matches" && first.role !== "AXTextField" && !assertText(first) && !nodeText(first)) {
133519
+ return uiTreeMatchInternals.createRegExp(expectedText).test("");
133520
+ }
133441
133521
  return textMatches(assertText(first), expectedText, textMatch) || textMatches(nodeText(first), expectedText, textMatch);
133442
133522
  }
133443
133523
  default:
@@ -137114,6 +137194,389 @@ A field is unset when it is unknown.`,
137114
137194
  };
137115
137195
  }
137116
137196
 
137197
+ // ../tool-server/src/tools/fill/index.ts
137198
+ init_zod();
137199
+ init_adb();
137200
+
137201
+ // ../tool-server/src/tools/fill/errors.ts
137202
+ init_src2();
137203
+ function noFocusedFieldError(stage) {
137204
+ return new InvalidToolInputError(
137205
+ "Nothing that takes text has keyboard focus, so nothing was changed. Tap the text field first, then call fill again.",
137206
+ {
137207
+ error_code: FAILURE_CODES.FILL_NO_FOCUSED_FIELD,
137208
+ failure_stage: stage,
137209
+ error_kind: "validation"
137210
+ }
137211
+ );
137212
+ }
137213
+ function notVerifiedError(stage) {
137214
+ return new FailureError(
137215
+ "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.",
137216
+ {
137217
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137218
+ failure_stage: stage,
137219
+ failure_area: "tool_server",
137220
+ error_kind: "unknown"
137221
+ }
137222
+ );
137223
+ }
137224
+ function notChangedError(stage) {
137225
+ return new FailureError(
137226
+ "fill could not select the text of the focused field, so nothing was changed. Tap the field and retry.",
137227
+ {
137228
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137229
+ failure_stage: stage,
137230
+ failure_area: "tool_server",
137231
+ error_kind: "unknown"
137232
+ }
137233
+ );
137234
+ }
137235
+ function notAnsweredError(stage) {
137236
+ return new FailureError(
137237
+ "The device did not finish the fill in time. The field may have changed: read it before retrying.",
137238
+ {
137239
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137240
+ failure_stage: stage,
137241
+ failure_area: "tool_server",
137242
+ error_kind: "timeout"
137243
+ }
137244
+ );
137245
+ }
137246
+ function unsupportedFieldError(detail, stage) {
137247
+ return new InvalidToolInputError(
137248
+ `fill cannot set this field's text: ${detail}. Nothing was changed.`,
137249
+ {
137250
+ error_code: FAILURE_CODES.FILL_UNSUPPORTED_FIELD,
137251
+ failure_stage: stage,
137252
+ error_kind: "unsupported"
137253
+ }
137254
+ );
137255
+ }
137256
+
137257
+ // ../tool-server/src/tools/fill/keys.ts
137258
+ init_src2();
137259
+ init_src2();
137260
+ var MAX_CLEAR_KEYS = 100;
137261
+ var XCTEST_DELETE = "\b";
137262
+ var KEY_TIMING = { holdMs: 20, settleMs: 300, typeDelayMs: 30 };
137263
+ var sleep14 = (ms) => new Promise((r) => setTimeout(r, ms));
137264
+ function typeableOnSimulator(text) {
137265
+ for (const char of text) if (!charToKeyPress(char)) return false;
137266
+ return true;
137267
+ }
137268
+ async function withoutTextInErrors(stage, run2) {
137269
+ try {
137270
+ return await run2();
137271
+ } catch (err) {
137272
+ const signal = getFailureSignal(err);
137273
+ throw new FailureError(
137274
+ "fill failed partway through typing: the focused field may hold part of the text. Read it before retrying.",
137275
+ signal ?? {
137276
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137277
+ failure_stage: stage,
137278
+ failure_area: "tool_server",
137279
+ error_kind: "unknown"
137280
+ }
137281
+ );
137282
+ }
137283
+ }
137284
+ async function pressSimulatorBackspace(registry2, device) {
137285
+ const ref = simulatorServerRef(device);
137286
+ const api = await registry2.resolveService(ref.urn, ref.options);
137287
+ await api.pressKey("Down", NAMED_KEYS.backspace);
137288
+ await sleep14(KEY_TIMING.holdMs);
137289
+ await api.pressKey("Up", NAMED_KEYS.backspace);
137290
+ await sleep14(KEY_TIMING.settleMs);
137291
+ }
137292
+ async function typeOnSimulator(registry2, device, text) {
137293
+ if (!text) return;
137294
+ await withoutTextInErrors(
137295
+ "fill_keys_ios",
137296
+ () => typeSimulatorServer(registry2, device, {
137297
+ udid: device.id,
137298
+ text,
137299
+ delayMs: KEY_TIMING.typeDelayMs
137300
+ })
137301
+ );
137302
+ }
137303
+ async function fillByDeviceKeys(registry2, device, text) {
137304
+ const bundleId = requireCurrentIosDeviceApp(device.id);
137305
+ const ref = iosDeviceRunnerRef(device);
137306
+ const api = await registry2.resolveService(ref.urn, ref.options);
137307
+ const type = async (chars) => {
137308
+ try {
137309
+ await typeText(api, bundleId, chars);
137310
+ } catch (err) {
137311
+ if (err instanceof RunnerCommandError && err.code === "TEXT_INPUT_NOT_FOCUSED") {
137312
+ throw noFocusedFieldError("fill_keys_ios_device_focus");
137313
+ }
137314
+ throw err;
137315
+ }
137316
+ };
137317
+ await type(XCTEST_DELETE.repeat(MAX_CLEAR_KEYS));
137318
+ if (text) await withoutTextInErrors("fill_keys_ios_device", () => type(text));
137319
+ }
137320
+
137321
+ // ../tool-server/src/tools/fill/ios.ts
137322
+ var NEWLINE = /[\r\n]/;
137323
+ async function fillIos(registry2, device, text) {
137324
+ const ref = axServiceRef(device);
137325
+ const ax = await registry2.resolveService(ref.urn, ref.options);
137326
+ const typeable = typeableOnSimulator(text) && !NEWLINE.test(text);
137327
+ const first = await ax.fill(text, { typeable });
137328
+ if (!first.focused) throw noFocusedFieldError("fill_ios_no_focus");
137329
+ if (first.unsupported) {
137330
+ throw unsupportedFieldError(
137331
+ "the focused element is not a text input (a date or time input, or a picker)",
137332
+ "fill_ios_unsupported_field"
137333
+ );
137334
+ }
137335
+ if (first.singleLine) {
137336
+ throw unsupportedFieldError(
137337
+ "a single-line text field cannot hold a newline",
137338
+ "fill_ios_single_line"
137339
+ );
137340
+ }
137341
+ if (first.timedOut) throw notAnsweredError("fill_ios_timeout");
137342
+ if (first.untouched) throw notChangedError("fill_ios_select_failed");
137343
+ if (first.verified) return { verified: true };
137344
+ if (first.secure) {
137345
+ if (!typeable) {
137346
+ throw unsupportedFieldError(
137347
+ "a secure text field takes only text the keyboard can type on one line, and this text has a character it cannot",
137348
+ "fill_ios_secure_untypeable"
137349
+ );
137350
+ }
137351
+ if (!first.cleared) throw notVerifiedError("fill_ios_secure_not_cleared");
137352
+ await typeOnSimulator(registry2, device, text);
137353
+ const check3 = await ax.fill(text, { check: true });
137354
+ if (check3.verified) return { verified: true };
137355
+ throw notVerifiedError("fill_ios_not_verified");
137356
+ }
137357
+ if (first.needsBackspace) {
137358
+ await pressSimulatorBackspace(registry2, device);
137359
+ const check3 = await ax.fill(text, { check: true });
137360
+ if (check3.verified) return { verified: true };
137361
+ }
137362
+ throw notVerifiedError("fill_ios_not_verified");
137363
+ }
137364
+
137365
+ // ../tool-server/src/tools/fill/android.ts
137366
+ async function fillAndroid(registry2, device, text) {
137367
+ const ref = androidDevtoolsRef(device);
137368
+ const helper = await registry2.resolveService(ref.urn, ref.options);
137369
+ const answer = await helper.setText(text);
137370
+ if (!answer.focused) throw noFocusedFieldError("fill_android_no_focus");
137371
+ if (answer.singleLine) {
137372
+ throw unsupportedFieldError(
137373
+ "a single-line text field cannot hold a newline",
137374
+ "fill_android_single_line"
137375
+ );
137376
+ }
137377
+ if (answer.timedOut) throw notAnsweredError("fill_android_timeout");
137378
+ if (answer.verified) return { verified: true };
137379
+ throw notVerifiedError("fill_android_not_verified");
137380
+ }
137381
+
137382
+ // ../tool-server/src/tools/fill/chromium.ts
137383
+ init_src2();
137384
+ function buildChromiumFillScript(text) {
137385
+ return `(async () => {
137386
+ const text = ${JSON.stringify(text)};
137387
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
137388
+ try {
137389
+ const deepActive = (doc) => {
137390
+ let el = doc.activeElement;
137391
+ while (el && el.shadowRoot && el.shadowRoot.activeElement) el = el.shadowRoot.activeElement;
137392
+ return el;
137393
+ };
137394
+ let el = deepActive(document);
137395
+ while (el && String(el.tagName).toLowerCase() === "iframe") {
137396
+ let inner = null;
137397
+ try { inner = el.contentDocument; } catch (e) { inner = null; }
137398
+ if (!inner) return { status: "no_focus" };
137399
+ el = deepActive(inner);
137400
+ }
137401
+ if (!el || el.tagName === undefined) return { status: "no_focus" };
137402
+ const doc = el.ownerDocument || document;
137403
+ const win = doc.defaultView || window;
137404
+ const tag = String(el.tagName).toLowerCase();
137405
+ const type = tag === "input" ? String(el.type || "text").toLowerCase() : null;
137406
+ if (type !== null && /^(date|time|month|week|datetime-local)$/.test(type)) {
137407
+ return { status: "unsupported", detail: "a " + type + " input holds a structured value" };
137408
+ }
137409
+ const control =
137410
+ tag === "textarea" ||
137411
+ (tag === "input" && !/^(button|checkbox|radio|file|submit|reset|image|range|color|hidden)$/.test(type));
137412
+ if (!control && el.isContentEditable !== true) return { status: "no_focus" };
137413
+ if (control && el.disabled === true) return { status: "unsupported", detail: "it is disabled" };
137414
+ if (control && el.readOnly === true) return { status: "unsupported", detail: "it is read-only" };
137415
+ // An <input> holds one line and drops a newline.
137416
+ if (tag === "input" && /[\\r\\n]/.test(text)) {
137417
+ return { status: "unsupported", detail: "a single-line input cannot hold a newline" };
137418
+ }
137419
+ if (!control) {
137420
+ // designMode or <body contenteditable>: the whole document is the field.
137421
+ let host = el;
137422
+ while (host.parentElement && host.parentElement.isContentEditable === true) host = host.parentElement;
137423
+ if (host === doc.body || host === doc.documentElement) {
137424
+ return { status: "unsupported", detail: "the whole document is editable" };
137425
+ }
137426
+ }
137427
+ const trimEnd = (s) => s.replace(/[\\u200b\\ufeff]/g, "").replace(/\\n+$/, "");
137428
+ const read = () =>
137429
+ control ? String(el.value == null ? "" : el.value) : trimEnd(String(el.innerText == null ? el.textContent || "" : el.innerText));
137430
+ const matches = () => (control ? read() === text : read() === trimEnd(text));
137431
+ const settle = async () => {
137432
+ for (let i = 0; i < 10; i++) {
137433
+ await sleep(i === 0 ? 0 : 50);
137434
+ if (matches()) return true;
137435
+ }
137436
+ return false;
137437
+ };
137438
+
137439
+ if (control) {
137440
+ try { el.select(); } catch (e) { /* no selection API */ }
137441
+ } else {
137442
+ const sel = doc.getSelection();
137443
+ const range = doc.createRange();
137444
+ range.selectNodeContents(el);
137445
+ sel.removeAllRanges();
137446
+ sel.addRange(range);
137447
+ }
137448
+ if (text === "") {
137449
+ if (read() !== "") doc.execCommand("delete");
137450
+ } else {
137451
+ doc.execCommand("insertText", false, text);
137452
+ }
137453
+ let verified = await settle();
137454
+ if (!verified && control) {
137455
+ const proto = tag === "textarea" ? win.HTMLTextAreaElement.prototype : win.HTMLInputElement.prototype;
137456
+ const setter = Object.getOwnPropertyDescriptor(proto, "value").set;
137457
+ setter.call(el, text);
137458
+ el.dispatchEvent(new win.Event("input", { bubbles: true }));
137459
+ el.dispatchEvent(new win.Event("change", { bubbles: true }));
137460
+ verified = await settle();
137461
+ }
137462
+ return { status: "ok", verified: verified };
137463
+ } catch (e) {
137464
+ return { status: "error" };
137465
+ }
137466
+ })()`;
137467
+ }
137468
+ async function fillChromium(registry2, device, text) {
137469
+ const ref = chromiumCdpRef(device);
137470
+ const api = await registry2.resolveService(ref.urn, ref.options);
137471
+ const out = await api.cdp.send(
137472
+ "Runtime.evaluate",
137473
+ { expression: buildChromiumFillScript(text), awaitPromise: true, returnByValue: true },
137474
+ 1e4
137475
+ );
137476
+ const answer = out.result?.value;
137477
+ switch (answer?.status) {
137478
+ case "ok":
137479
+ if (answer.verified === true) {
137480
+ return { verified: true };
137481
+ }
137482
+ throw notVerifiedError("fill_chromium_not_verified");
137483
+ case "no_focus":
137484
+ throw noFocusedFieldError("fill_chromium_no_focus");
137485
+ case "unsupported":
137486
+ throw unsupportedFieldError(answer.detail ?? "unsupported field", "fill_chromium_field");
137487
+ default:
137488
+ throw new FailureError("fill could not run in the page; nothing is known about the field.", {
137489
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137490
+ failure_stage: "fill_chromium_script",
137491
+ failure_area: "tool_server",
137492
+ error_kind: "unknown",
137493
+ failure_command: "cdp"
137494
+ });
137495
+ }
137496
+ }
137497
+
137498
+ // ../tool-server/src/tools/fill/index.ts
137499
+ var zodSchema43 = external_exports.object({
137500
+ udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
137501
+ text: external_exports.string().describe(
137502
+ 'The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`.'
137503
+ )
137504
+ });
137505
+ var capability28 = {
137506
+ apple: { simulator: true, device: true },
137507
+ appleRemote: { simulator: true },
137508
+ android: { emulator: true, device: true, unknown: true },
137509
+ chromium: { app: true }
137510
+ };
137511
+ function createFillTool(registry2) {
137512
+ const dispatch = dispatchByPlatform({
137513
+ toolId: "fill",
137514
+ capability: capability28,
137515
+ ios: {
137516
+ requires: iosRequires,
137517
+ handler: async (_services, params, device) => {
137518
+ if (await isTvOsSimulator(device.id)) {
137519
+ throw new UnsupportedOperationError("fill", device, "tvOS");
137520
+ }
137521
+ return fillIos(registry2, device, params.text);
137522
+ }
137523
+ },
137524
+ iosRemote: {
137525
+ requires: ["sim-remote"],
137526
+ handler: async (_services, params, device) => {
137527
+ if (await isRemoteTvOsSimulator(device.id)) {
137528
+ throw new UnsupportedOperationError("fill", device, "tvOS");
137529
+ }
137530
+ return fillIos(registry2, device, params.text);
137531
+ }
137532
+ },
137533
+ iosDevice: {
137534
+ requires: ["xcrun"],
137535
+ handler: async (_services, params, device) => {
137536
+ await fillByDeviceKeys(registry2, device, params.text);
137537
+ return { verified: false };
137538
+ }
137539
+ },
137540
+ android: {
137541
+ requires: androidRequires,
137542
+ handler: async (_services, params, device) => {
137543
+ if (await isAndroidTv(device.id)) {
137544
+ throw new UnsupportedOperationError("fill", device, "Android TV");
137545
+ }
137546
+ return fillAndroid(registry2, device, params.text);
137547
+ }
137548
+ },
137549
+ chromium: {
137550
+ handler: async (_services, params, device) => fillChromium(registry2, device, params.text)
137551
+ }
137552
+ });
137553
+ return {
137554
+ id: "fill",
137555
+ interaction: {
137556
+ // Never quote `text`: it may be a credential, and these messages reach
137557
+ // the event log.
137558
+ startedMsg: () => "Filling the focused field",
137559
+ completedMsg: () => "Filled the focused field",
137560
+ failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to fill the field: ${failureSignal2.error_code}`
137561
+ },
137562
+ description: `Set the text of the focused text field to exactly \`text\`, replacing what it holds; "" clears it. Tap the field first.
137563
+ 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.
137564
+ 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.`,
137565
+ hideFromMcp: true,
137566
+ zodSchema: zodSchema43,
137567
+ capability: capability28,
137568
+ services: () => ({}),
137569
+ execute: async (services, params, options) => {
137570
+ const { text, secrets } = resolveSecretPlaceholders(params.text);
137571
+ try {
137572
+ return await dispatch(services, { udid: params.udid, text }, options);
137573
+ } catch (err) {
137574
+ throw redactSecretsFromError(err, secrets);
137575
+ }
137576
+ }
137577
+ };
137578
+ }
137579
+
137117
137580
  // ../tool-server/src/tools/await-screen-idle/index.ts
137118
137581
  init_zod();
137119
137582
  init_device_info();
@@ -137122,7 +137585,7 @@ var AWAIT_SCREEN_IDLE_TOOL_ID = "await-screen-idle";
137122
137585
  var DEFAULT_TIMEOUT_MS4 = 3e3;
137123
137586
  var DEFAULT_POLL_INTERVAL_MS2 = 200;
137124
137587
  var DEFAULT_MIN_STABLE_MS = 250;
137125
- var zodSchema43 = external_exports.object({
137588
+ var zodSchema44 = external_exports.object({
137126
137589
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
137127
137590
  timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
137128
137591
  `Max time to wait for the screen to settle before giving up (default ${DEFAULT_TIMEOUT_MS4}).`
@@ -137132,7 +137595,7 @@ var zodSchema43 = external_exports.object({
137132
137595
  `The screen must hold the same content for at least this long to count as settled (default ${DEFAULT_MIN_STABLE_MS}).`
137133
137596
  )
137134
137597
  }).strict();
137135
- var capability28 = {
137598
+ var capability29 = {
137136
137599
  apple: { simulator: true, device: true },
137137
137600
  appleRemote: { simulator: true },
137138
137601
  android: { emulator: true, device: true, unknown: true },
@@ -137179,8 +137642,8 @@ ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls }; sett
137179
137642
  still before the timeout. Use after a launch/navigation to wait for the UI to render before screenshotting or tapping.`,
137180
137643
  searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
137181
137644
  longRunning: true,
137182
- zodSchema: zodSchema43,
137183
- capability: capability28,
137645
+ zodSchema: zodSchema44,
137646
+ capability: capability29,
137184
137647
  services: (params) => {
137185
137648
  const device = resolveDevice(params.udid);
137186
137649
  if (device.platform === "chromium") {
@@ -137190,7 +137653,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
137190
137653
  },
137191
137654
  async execute(services, params, ctx) {
137192
137655
  const device = resolveDevice(params.udid);
137193
- assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability28, device);
137656
+ assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability29, device);
137194
137657
  if (device.platform === "ios") await ensureDeps(iosRequires);
137195
137658
  else if (device.platform === "ios-remote") await ensureDeps(["sim-remote"]);
137196
137659
  else if (device.platform === "android") await ensureDeps(androidRequires);
@@ -137277,7 +137740,7 @@ function bootstrapFailureMessage(bootstrap) {
137277
137740
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
137278
137741
  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
137742
  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 zodSchema44 = external_exports.object({
137743
+ var zodSchema45 = external_exports.object({
137281
137744
  port: metroPortField,
137282
137745
  device_id: external_exports.string().describe(
137283
137746
  "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
@@ -137309,7 +137772,7 @@ Before calling this, ask the user if they also want native profiling (native-pro
137309
137772
  After starting, ask the user to perform the interaction to profile, then call react-profiler-stop.
137310
137773
  Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture } on success, or the already_running payload described above.
137311
137774
  Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
137312
- zodSchema: zodSchema44,
137775
+ zodSchema: zodSchema45,
137313
137776
  capability: RN_ONLY_TOOL_CAPABILITY,
137314
137777
  services: () => ({}),
137315
137778
  async execute(_services, params) {
@@ -137580,7 +138043,7 @@ async function readCommitTree(path53) {
137580
138043
  }
137581
138044
 
137582
138045
  // ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
137583
- var zodSchema45 = external_exports.object({
138046
+ var zodSchema46 = external_exports.object({
137584
138047
  port: metroPortField,
137585
138048
  device_id: external_exports.string().describe(
137586
138049
  "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
@@ -137669,7 +138132,7 @@ Call react-profiler-start first, then exercise the app, then call this.
137669
138132
  Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices } summarizing the session.
137670
138133
  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
138134
  Fails if no active profiling session exists or the CDP connection was lost during recording.`,
137672
- zodSchema: zodSchema45,
138135
+ zodSchema: zodSchema46,
137673
138136
  capability: RN_ONLY_TOOL_CAPABILITY,
137674
138137
  services: () => ({}),
137675
138138
  async execute(_services, params) {
@@ -137894,7 +138357,7 @@ Fails if no active profiling session exists or the CDP connection was lost durin
137894
138357
 
137895
138358
  // ../tool-server/src/tools/profiler/react/react-profiler-status.ts
137896
138359
  init_zod();
137897
- var zodSchema46 = external_exports.object({
138360
+ var zodSchema47 = external_exports.object({
137898
138361
  port: metroPortField,
137899
138362
  device_id: external_exports.string().describe(
137900
138363
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -137909,7 +138372,7 @@ function createReactProfilerStatusTool(registry2) {
137909
138372
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to check React profiler: ${failureSignal2.error_code}`
137910
138373
  },
137911
138374
  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: zodSchema46,
138375
+ zodSchema: zodSchema47,
137913
138376
  // RN-only: companion to react-profiler-start.
137914
138377
  capability: RN_ONLY_TOOL_CAPABILITY,
137915
138378
  services: () => ({}),
@@ -139523,7 +139986,7 @@ var annotationSchema = external_exports.object({
139523
139986
  ),
139524
139987
  label: external_exports.string().describe("Description of the action performed")
139525
139988
  });
139526
- var zodSchema47 = external_exports.object({
139989
+ var zodSchema48 = external_exports.object({
139527
139990
  port: metroPortField,
139528
139991
  device_id: external_exports.string().describe(
139529
139992
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139556,7 +140019,7 @@ where tapTimestampMs is the timestampMs returned by the tap/swipe tool and start
139556
140019
  is returned by react-profiler-start.
139557
140020
  Use when the profiling session is complete and you need to interpret the collected data.
139558
140021
  Fails if react-profiler-stop has not been called or no profiling data is stored.`,
139559
- zodSchema: zodSchema47,
140022
+ zodSchema: zodSchema48,
139560
140023
  // RN-only: reads commit data captured via the React DevTools backend, which
139561
140024
  // Chromium does not have.
139562
140025
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -139693,7 +140156,7 @@ Fails if react-profiler-stop has not been called or no profiling data is stored.
139693
140156
  // ../tool-server/src/tools/profiler/react/react-profiler-component-source.ts
139694
140157
  init_zod();
139695
140158
  var import_fs6 = require("fs");
139696
- var zodSchema48 = external_exports.object({
140159
+ var zodSchema49 = external_exports.object({
139697
140160
  component_name: external_exports.string().describe("Name of the React component to look up"),
139698
140161
  project_root: external_exports.string().describe("Absolute path to the RN project root")
139699
140162
  });
@@ -139711,7 +140174,7 @@ var reactProfilerComponentSourceTool = {
139711
140174
  Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
139712
140175
  Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
139713
140176
  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: zodSchema48,
140177
+ zodSchema: zodSchema49,
139715
140178
  // Declared so the tool catalogue groups this with the other react-profiler-*
139716
140179
  // tools; the HTTP gate itself is a no-op here, as there is no device arg to
139717
140180
  // inspect.
@@ -139767,7 +140230,7 @@ When several files define a component with the same name (e.g. platform variants
139767
140230
  // ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
139768
140231
  init_zod();
139769
140232
  init_src2();
139770
- var zodSchema49 = external_exports.object({
140233
+ var zodSchema50 = external_exports.object({
139771
140234
  port: metroPortField,
139772
140235
  device_id: external_exports.string().describe(
139773
140236
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139849,7 +140312,7 @@ Use when you specifically need to investigate JS CPU hotspots that are NOT tied
139849
140312
  Call react-profiler-stop first. Reads directly from the stored cpuProfile.
139850
140313
  Returns a markdown table of the top hotspot functions with self-time, total-time, and location.
139851
140314
  Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
139852
- zodSchema: zodSchema49,
140315
+ zodSchema: zodSchema50,
139853
140316
  // RN-only: reads a Hermes CPU profile; Chromium's V8 sample format differs.
139854
140317
  capability: RN_ONLY_TOOL_CAPABILITY,
139855
140318
  services: () => ({}),
@@ -139945,7 +140408,7 @@ function renderMarkdownTable2(entries) {
139945
140408
  );
139946
140409
  return [header, sep5, ...rows].join("\n");
139947
140410
  }
139948
- var zodSchema50 = external_exports.object({
140411
+ var zodSchema51 = external_exports.object({
139949
140412
  port: metroPortField,
139950
140413
  device_id: external_exports.string().describe(
139951
140414
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139963,7 +140426,7 @@ var reactProfilerRendersTool = {
139963
140426
  Returns a markdown table of the top re-rendering components. No profiling session required; works on a live connected app.
139964
140427
  Use when you want a quick snapshot of render counts without a full profiling session.
139965
140428
  Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
139966
- zodSchema: zodSchema50,
140429
+ zodSchema: zodSchema51,
139967
140430
  // RN-only: queries the React DevTools backend hook on the live runtime.
139968
140431
  capability: RN_ONLY_TOOL_CAPABILITY,
139969
140432
  services: (params) => ({
@@ -140120,7 +140583,7 @@ function buildFiberTreeScript(maxDepth, filter) {
140120
140583
  }
140121
140584
  })()`;
140122
140585
  }
140123
- var zodSchema51 = external_exports.object({
140586
+ var zodSchema52 = external_exports.object({
140124
140587
  port: metroPortField,
140125
140588
  device_id: external_exports.string().describe(
140126
140589
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -140139,7 +140602,7 @@ var reactProfilerFiberTreeTool = {
140139
140602
  Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component).
140140
140603
  Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
140141
140604
  Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
140142
- zodSchema: zodSchema51,
140605
+ zodSchema: zodSchema52,
140143
140606
  // RN-only: walks the fiber tree via the React DevTools backend hook.
140144
140607
  capability: RN_ONLY_TOOL_CAPABILITY,
140145
140608
  services: (params) => ({
@@ -143937,7 +144400,7 @@ function metroDeviceIdParam(description) {
143937
144400
  }
143938
144401
 
143939
144402
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
143940
- var zodSchema52 = external_exports.object({
144403
+ var zodSchema53 = external_exports.object({
143941
144404
  device_id: metroDeviceIdParam(
143942
144405
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143943
144406
  ),
@@ -143951,7 +144414,7 @@ var zodSchema52 = external_exports.object({
143951
144414
  "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
144415
  )
143953
144416
  });
143954
- var capability29 = {
144417
+ var capability30 = {
143955
144418
  apple: { simulator: true },
143956
144419
  android: { emulator: true, device: true, unknown: true }
143957
144420
  };
@@ -143962,21 +144425,21 @@ var nativeProfilerStartTool = {
143962
144425
  completedMsg: () => "Started native profiler",
143963
144426
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start native profiler: ${failureSignal2.error_code}`
143964
144427
  },
143965
- capability: capability29,
144428
+ capability: capability30,
143966
144429
  description: `Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal).
143967
144430
  Auto-detects the running app process unless app_process is explicitly provided.
143968
144431
  After starting, let the user interact with the app, then call native-profiler-stop.
143969
144432
  Use when you want to capture native CPU, hang, and memory data for a running app.
143970
144433
  Returns { status, pid, traceFile } confirming the recording has started.
143971
144434
  Fails if no app is running on the device, or the profiler cannot attach to the process.`,
143972
- zodSchema: zodSchema52,
144435
+ zodSchema: zodSchema53,
143973
144436
  services: (params) => ({
143974
144437
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
143975
144438
  }),
143976
144439
  async execute(services, params) {
143977
144440
  const api = services.session;
143978
144441
  const device = resolveDevice(params.device_id);
143979
- assertSupported("native-profiler-start", capability29, device);
144442
+ assertSupported("native-profiler-start", capability30, device);
143980
144443
  if (api.platform === "ios") {
143981
144444
  await ensureDeps(["xcrun"]);
143982
144445
  return startNativeProfilerIos(api, params);
@@ -143989,12 +144452,12 @@ Fails if no app is running on the device, or the profiler cannot attach to the p
143989
144452
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-stop.ts
143990
144453
  init_zod();
143991
144454
  init_device_info();
143992
- var zodSchema53 = external_exports.object({
144455
+ var zodSchema54 = external_exports.object({
143993
144456
  device_id: metroDeviceIdParam(
143994
144457
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143995
144458
  )
143996
144459
  });
143997
- var capability30 = {
144460
+ var capability31 = {
143998
144461
  apple: { simulator: true },
143999
144462
  android: { emulator: true, device: true, unknown: true }
144000
144463
  };
@@ -144022,7 +144485,7 @@ var nativeProfilerStopTool = {
144022
144485
  completedMsg: ({ result }) => `Saved native profile ${result.traceFile.filename}`,
144023
144486
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop native profiler: ${failureSignal2.error_code}`
144024
144487
  },
144025
- capability: capability30,
144488
+ capability: capability31,
144026
144489
  // Packaging plus the export passes routinely exceed the 30s MCP fetch timeout.
144027
144490
  longRunning: true,
144028
144491
  description: `Stop native profiling and export trace data.
@@ -144032,14 +144495,14 @@ Call native-profiler-start first.
144032
144495
  Use when the user has finished the interaction to profile and you need to export the trace.
144033
144496
  Returns { traceFile, exportedFiles, exportDiagnostics? }; traceFile is the raw trace bundle and exportedFiles the exports, all downloadable artifacts materialized to local paths.
144034
144497
  Fails if no active native-profiler-start session exists for the given device_id.`,
144035
- zodSchema: zodSchema53,
144498
+ zodSchema: zodSchema54,
144036
144499
  services: (params) => ({
144037
144500
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
144038
144501
  }),
144039
144502
  async execute(services, params, ctx) {
144040
144503
  const api = services.session;
144041
144504
  const device = resolveDevice(params.device_id);
144042
- assertSupported("native-profiler-stop", capability30, device);
144505
+ assertSupported("native-profiler-stop", capability31, device);
144043
144506
  if (api.platform === "ios") {
144044
144507
  await ensureDeps(["xcrun"]);
144045
144508
  const ios = await stopNativeProfilerIos(api);
@@ -144067,12 +144530,12 @@ Fails if no active native-profiler-start session exists for the given device_id.
144067
144530
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-analyze.ts
144068
144531
  init_zod();
144069
144532
  init_device_info();
144070
- var zodSchema54 = external_exports.object({
144533
+ var zodSchema55 = external_exports.object({
144071
144534
  device_id: metroDeviceIdParam(
144072
144535
  "Target device id from `list-devices` (iOS UDID or Android serial)."
144073
144536
  )
144074
144537
  });
144075
- var capability31 = {
144538
+ var capability32 = {
144076
144539
  apple: { simulator: true },
144077
144540
  android: { emulator: true, device: true, unknown: true }
144078
144541
  };
@@ -144083,7 +144546,7 @@ var nativeProfilerAnalyzeTool = {
144083
144546
  completedMsg: () => "Analyzed native profile",
144084
144547
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to analyze native profile: ${failureSignal2.error_code}`
144085
144548
  },
144086
- capability: capability31,
144549
+ capability: capability32,
144087
144550
  // Parsing a trace from a recording up to RECORDING_CAP_MS long routinely exceeds
144088
144551
  // the 30s MCP fetch timeout, and an aborted call is replayed, not cancelled.
144089
144552
  longRunning: true,
@@ -144096,14 +144559,14 @@ profiler-stack-query for hang stacks, CPU context, leak details) or implement fi
144096
144559
  Call native-profiler-stop first to export the trace data.
144097
144560
  Use when you need to interpret a completed native profiling recording.
144098
144561
  Fails if native-profiler-stop has not been called first to export trace data.`,
144099
- zodSchema: zodSchema54,
144562
+ zodSchema: zodSchema55,
144100
144563
  services: (params) => ({
144101
144564
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
144102
144565
  }),
144103
144566
  async execute(services, params, ctx) {
144104
144567
  const api = services.session;
144105
144568
  const device = resolveDevice(params.device_id);
144106
- assertSupported("native-profiler-analyze", capability31, device);
144569
+ assertSupported("native-profiler-analyze", capability32, device);
144107
144570
  let result;
144108
144571
  if (api.platform === "ios") {
144109
144572
  await ensureDeps(["xcrun"]);
@@ -145166,7 +145629,7 @@ var DEFAULT_TIME_LIMIT_SECONDS = 180;
145166
145629
  var MAX_TIME_LIMIT_SECONDS = 600;
145167
145630
  var POINTER_TRAIL_LENGTH = 8;
145168
145631
  var POINTER_REQUEST_TIMEOUT_MS = 2e3;
145169
- var zodSchema55 = external_exports.object({
145632
+ var zodSchema56 = external_exports.object({
145170
145633
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial)."),
145171
145634
  timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(
145172
145635
  `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 +145641,7 @@ var zodSchema55 = external_exports.object({
145178
145641
  "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
145642
  )
145180
145643
  });
145181
- var capability32 = {
145644
+ var capability33 = {
145182
145645
  apple: { simulator: true },
145183
145646
  android: { emulator: true, device: true, unknown: true }
145184
145647
  };
@@ -145190,7 +145653,7 @@ function createScreenRecordingStartTool(registry2) {
145190
145653
  completedMsg: () => "Started screen recording",
145191
145654
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start screen recording: ${failureSignal2.error_code}`
145192
145655
  },
145193
- capability: capability32,
145656
+ capability: capability33,
145194
145657
  description: `Start recording the device screen to a video file (h264 mp4, 30fps at the device's native resolution).
145195
145658
  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
145659
  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 +145662,7 @@ Use when the user wants a video of an interaction, animation, or app behavior; f
145199
145662
  Returns { status: "recording", timeLimitSeconds, outputFile }. The video is retrieved later by \`screen-recording-stop\`, not by reading outputFile directly.
145200
145663
  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
145664
  searchHint: "record video screen capture movie mp4 start filming screencast",
145202
- zodSchema: zodSchema55,
145665
+ zodSchema: zodSchema56,
145203
145666
  // Resolved inside execute, not declared eagerly: a tvOS udid classifies as
145204
145667
  // iOS by shape, so an eager service would spawn simulator-server for a
145205
145668
  // device it cannot drive and hang on its ready timeout (as in `screenshot`).
@@ -145209,7 +145672,7 @@ Fails if a recording is already running on the device, the device is not booted,
145209
145672
  async execute(services, params) {
145210
145673
  const api = services.session;
145211
145674
  const device = resolveDevice(params.udid);
145212
- assertSupported("screen-recording-start", capability32, device);
145675
+ assertSupported("screen-recording-start", capability33, device);
145213
145676
  if (device.platform === "ios" && await isTvOsSimulator(params.udid)) {
145214
145677
  throw new FailureError(
145215
145678
  `Screen recording is not supported on tvOS simulators (device ${params.udid}).`,
@@ -145298,11 +145761,11 @@ function makePointerControl(simulator) {
145298
145761
  var import_node_path22 = require("node:path");
145299
145762
  init_zod();
145300
145763
  init_device_info();
145301
- var zodSchema56 = external_exports.object({
145764
+ var zodSchema57 = external_exports.object({
145302
145765
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial).")
145303
145766
  });
145304
145767
  var RECORDINGS_DIR = ".argent/recordings";
145305
- var capability33 = {
145768
+ var capability34 = {
145306
145769
  apple: { simulator: true },
145307
145770
  android: { emulator: true, device: true, unknown: true }
145308
145771
  };
@@ -145313,21 +145776,21 @@ var screenRecordingStopTool = {
145313
145776
  completedMsg: ({ result }) => `Saved screen recording ${result.video.filename}`,
145314
145777
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop screen recording: ${failureSignal2.error_code}`
145315
145778
  },
145316
- capability: capability33,
145779
+ capability: capability34,
145317
145780
  description: `Stop the screen recording started by \`screen-recording-start\` and retrieve the video: frame capture ends and ffmpeg finalizes the mp4.
145318
145781
  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
145782
  Use when the interaction being captured is finished, or a tool-result note reminds you a recording is still running.
145320
145783
  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
145784
  Fails if no recording (running or finished-but-unretrieved) exists for the given udid.`,
145322
145785
  searchHint: "stop end finish screen recording video capture save retrieve",
145323
- zodSchema: zodSchema56,
145786
+ zodSchema: zodSchema57,
145324
145787
  services: (params) => ({
145325
145788
  session: screenRecordingSessionRef(resolveDevice(params.udid))
145326
145789
  }),
145327
145790
  async execute(services, params, ctx) {
145328
145791
  const api = services.session;
145329
145792
  const device = resolveDevice(params.udid);
145330
- assertSupported("screen-recording-stop", capability33, device);
145793
+ assertSupported("screen-recording-stop", capability34, device);
145331
145794
  const stopped = await stopCapture(api);
145332
145795
  const artifacts = requireArtifacts(ctx);
145333
145796
  const video = await artifacts.register({
@@ -145359,7 +145822,7 @@ var timeWindowSchema = external_exports.object({
145359
145822
  "End of window in ms since profiling started, the same clock profiler-commit-query prints"
145360
145823
  )
145361
145824
  });
145362
- var zodSchema57 = external_exports.object({
145825
+ var zodSchema58 = external_exports.object({
145363
145826
  port: metroPortField,
145364
145827
  device_id: metroDeviceIdParam(
145365
145828
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -145648,7 +146111,7 @@ Every table states how many samples it covers and how much of that was idle.
145648
146111
  Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
145649
146112
  Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
145650
146113
  Fails if no CPU profile is stored; run react-profiler-stop first.`,
145651
- zodSchema: zodSchema57,
146114
+ zodSchema: zodSchema58,
145652
146115
  // RN-only: reads Hermes-format CPU profiles; Chromium's V8 sample format differs.
145653
146116
  capability: RN_ONLY_TOOL_CAPABILITY,
145654
146117
  services: () => ({}),
@@ -145734,7 +146197,7 @@ var timeRangeSchema = external_exports.object({
145734
146197
  "End of range in ms since profiling started, the same clock profiler-commit-query prints"
145735
146198
  )
145736
146199
  });
145737
- var zodSchema58 = external_exports.object({
146200
+ var zodSchema59 = external_exports.object({
145738
146201
  port: metroPortField,
145739
146202
  device_id: metroDeviceIdParam(
145740
146203
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -146007,7 +146470,7 @@ Modes:
146007
146470
  Use when drilling into specific components or time windows after react-profiler-analyze.
146008
146471
  Returns a markdown table or tree of commit data matching the requested mode.
146009
146472
  Fails if react-profiler-stop has not been called or no commit data is stored.`,
146010
- zodSchema: zodSchema58,
146473
+ zodSchema: zodSchema59,
146011
146474
  // Reads React commit data captured via the React DevTools backend.
146012
146475
  capability: RN_ONLY_TOOL_CAPABILITY,
146013
146476
  services: () => ({}),
@@ -146078,7 +146541,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
146078
146541
  init_zod();
146079
146542
  init_src2();
146080
146543
  init_device_info();
146081
- var zodSchema59 = external_exports.object({
146544
+ var zodSchema60 = external_exports.object({
146082
146545
  device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
146083
146546
  mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe(
146084
146547
  "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 +146859,7 @@ Modes:
146396
146859
  Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze.
146397
146860
  Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode.
146398
146861
  Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.`,
146399
- zodSchema: zodSchema59,
146862
+ zodSchema: zodSchema60,
146400
146863
  // No chromium entry: it has no native trace capture.
146401
146864
  capability: {
146402
146865
  apple: { simulator: true },
@@ -146466,7 +146929,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
146466
146929
  }
146467
146930
 
146468
146931
  // ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
146469
- var zodSchema60 = external_exports.object({
146932
+ var zodSchema61 = external_exports.object({
146470
146933
  port: metroPortField,
146471
146934
  device_id: metroDeviceIdParam("iOS Simulator/device UDID or Android serial")
146472
146935
  });
@@ -146483,7 +146946,7 @@ Requires both react-profiler-analyze and native-profiler-analyze to have been ca
146483
146946
  Call this tool when both profilers were run in parallel on the same session.
146484
146947
  Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
146485
146948
  Fails if either react-profiler-analyze or native-profiler-analyze has not been called first.`,
146486
- zodSchema: zodSchema60,
146949
+ zodSchema: zodSchema61,
146487
146950
  // iOS reads xctrace output; Android re-queries the Perfetto .pftrace via
146488
146951
  // loadAndroidCombinedData. Chromium has no native trace capture.
146489
146952
  capability: {
@@ -146807,7 +147270,7 @@ function assertSafeSessionId(sessionId) {
146807
147270
  );
146808
147271
  }
146809
147272
  }
146810
- var zodSchema61 = external_exports.object({
147273
+ var zodSchema62 = external_exports.object({
146811
147274
  mode: external_exports.enum(["list", "load_react", "load_native"]).describe(
146812
147275
  "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
147276
  ),
@@ -147168,7 +147631,7 @@ Modes:
147168
147631
  For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar.
147169
147632
  Returns a summary of the loaded session or a session list for the list mode.
147170
147633
  Fails if the session_id is not found or required XML files are missing from disk.`,
147171
- zodSchema: zodSchema61,
147634
+ zodSchema: zodSchema62,
147172
147635
  // The Hermes, xctrace and perfetto formats this loads have no Chromium
147173
147636
  // equivalent; the gate fails at the call site, not inside the trace parser.
147174
147637
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -147297,7 +147760,7 @@ function unnameableSessionUrns(urns) {
147297
147760
  }
147298
147761
 
147299
147762
  // ../tool-server/src/tools/simulator/stop-simulator-server.ts
147300
- var zodSchema62 = external_exports.object({
147763
+ var zodSchema63 = external_exports.object({
147301
147764
  udid: external_exports.string().describe(
147302
147765
  "Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
147303
147766
  )
@@ -147311,7 +147774,7 @@ function createStopSimulatorServerTool(registry2) {
147311
147774
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop simulator server for ${params.udid}: ${failureSignal2.error_code}`
147312
147775
  },
147313
147776
  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: zodSchema62,
147777
+ zodSchema: zodSchema63,
147315
147778
  services: () => ({}),
147316
147779
  async execute(_services, params) {
147317
147780
  const udid = params.udid;
@@ -147342,7 +147805,7 @@ function createStopSimulatorServerTool(registry2) {
147342
147805
  init_zod();
147343
147806
  init_src2();
147344
147807
  init_external_devices();
147345
- var zodSchema63 = external_exports.object({
147808
+ var zodSchema64 = external_exports.object({
147346
147809
  devices: external_exports.array(external_exports.string()).optional().describe(
147347
147810
  "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
147811
  )
@@ -147381,7 +147844,7 @@ function createStopAllSimulatorServersTool(registry2) {
147381
147844
  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
147845
  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
147846
  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: zodSchema63,
147847
+ zodSchema: zodSchema64,
147385
147848
  services: () => ({}),
147386
147849
  async execute(_services, params, ctx) {
147387
147850
  const devices = params.devices;
@@ -147461,7 +147924,7 @@ function listeningPids(port) {
147461
147924
  if (!output) return [];
147462
147925
  return output.split("\n").map((s) => parseInt(s.trim(), 10)).filter((n) => !Number.isNaN(n));
147463
147926
  }
147464
- var zodSchema64 = external_exports.object({
147927
+ var zodSchema65 = external_exports.object({
147465
147928
  port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on (default 8081)")
147466
147929
  });
147467
147930
  var stopMetroTool = {
@@ -147472,7 +147935,7 @@ var stopMetroTool = {
147472
147935
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop Metro on port ${params.port}: ${failureSignal2.error_code}`
147473
147936
  },
147474
147937
  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: zodSchema64,
147938
+ zodSchema: zodSchema65,
147476
147939
  services: () => ({}),
147477
147940
  async execute(_services, params) {
147478
147941
  const port = params.port;
@@ -149816,7 +150279,7 @@ async function appendStepToFlow(session, step) {
149816
150279
  }
149817
150280
 
149818
150281
  // ../tool-server/src/tools/flows/flow-start-recording.ts
149819
- var zodSchema65 = external_exports.object({
150282
+ var zodSchema66 = external_exports.object({
149820
150283
  name: external_exports.string().describe(
149821
150284
  'Name for this flow (e.g. "settings-explore"): letters, digits, underscore and hyphen only.'
149822
150285
  ),
@@ -149873,7 +150336,7 @@ recording. Over a link, the next recorded step writes over your edit.
149873
150336
  Without a link, the recorder reads the file again before each step, but an
149874
150337
  edit that renumbers the steps drops the warnings that flow-finish-recording
149875
150338
  reports for those steps.`,
149876
- zodSchema: zodSchema65,
150339
+ zodSchema: zodSchema66,
149877
150340
  fileInputs: fileInputs2,
149878
150341
  services: () => ({}),
149879
150342
  async execute(_services, params, ctx) {
@@ -152373,7 +152836,7 @@ function stepAnchor(step) {
152373
152836
 
152374
152837
  // ../tool-server/src/tools/flows/flow-add-step.ts
152375
152838
  init_device_info();
152376
- var zodSchema66 = external_exports.object({
152839
+ var zodSchema67 = external_exports.object({
152377
152840
  name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
152378
152841
  project_root: external_exports.string().describe(
152379
152842
  "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 +153295,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
152832
153295
  // more times — and every retry re-runs the action and appends another step,
152833
153296
  // because an aborted request still appends its first.
152834
153297
  longRunning: true,
152835
- zodSchema: zodSchema66,
153298
+ zodSchema: zodSchema67,
152836
153299
  fileInputs: fileInputs3,
152837
153300
  services: () => ({}),
152838
153301
  async execute(_services, params, ctx) {
@@ -153021,7 +153484,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
153021
153484
 
153022
153485
  // ../tool-server/src/tools/flows/flow-insert-echo.ts
153023
153486
  init_zod();
153024
- var zodSchema67 = external_exports.object({
153487
+ var zodSchema68 = external_exports.object({
153025
153488
  name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
153026
153489
  project_root: external_exports.string().describe(
153027
153490
  "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 +153502,7 @@ var flowInsertEchoTool = {
153039
153502
  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
153503
  Use when you want to annotate a recorded flow with a human-readable label or checkpoint message.
153041
153504
  Returns { message, stepCount, savedTo }. Fails if that flow has no recording in progress.`,
153042
- zodSchema: zodSchema67,
153505
+ zodSchema: zodSchema68,
153043
153506
  services: () => ({}),
153044
153507
  async execute(_services, params) {
153045
153508
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154342,7 +154805,7 @@ function errMsg3(err) {
154342
154805
 
154343
154806
  // ../tool-server/src/tools/flows/flow-add-script.ts
154344
154807
  var OUTPUT_RENDER_LIMIT_BYTES = 64 * 1024;
154345
- var zodSchema68 = external_exports.object({
154808
+ var zodSchema69 = external_exports.object({
154346
154809
  name: external_exports.string().describe("Flow name passed to flow-start-recording."),
154347
154810
  project_root: external_exports.string().describe("Absolute project root passed to flow-start-recording."),
154348
154811
  path: external_exports.string().describe(
@@ -154399,7 +154862,7 @@ var flowAddScriptTool = {
154399
154862
  // The flag only skips the adapter's own abort timer; its retry loop is
154400
154863
  // untouched, so a call that fails some other way is still re-POSTed.
154401
154864
  longRunning: true,
154402
- zodSchema: zodSchema68,
154865
+ zodSchema: zodSchema69,
154403
154866
  services: () => ({}),
154404
154867
  async execute(_services, params, ctx) {
154405
154868
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154489,7 +154952,7 @@ var flowAddScriptTool = {
154489
154952
  // ../tool-server/src/tools/flows/flow-finish-recording.ts
154490
154953
  init_zod();
154491
154954
  var fs60 = __toESM(require("node:fs/promises"));
154492
- var zodSchema69 = external_exports.object({
154955
+ var zodSchema70 = external_exports.object({
154493
154956
  name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
154494
154957
  project_root: external_exports.string().describe(
154495
154958
  "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 +155011,7 @@ var flowFinishRecordingTool = {
154548
155011
  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
155012
  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
155013
  You can still edit the .yaml file directly afterwards to remove or reorder steps.`,
154551
- zodSchema: zodSchema69,
155014
+ zodSchema: zodSchema70,
154552
155015
  services: () => ({}),
154553
155016
  async execute(_services, params) {
154554
155017
  const { filePath, flowFile, savedTo, flow, summary, headline } = await withFlowFileLock(
@@ -157026,7 +157489,7 @@ async function restoreStatusBar(device) {
157026
157489
  }
157027
157490
 
157028
157491
  // ../tool-server/src/tools/flows/flow-run.ts
157029
- var zodSchema70 = external_exports.object({
157492
+ var zodSchema71 = external_exports.object({
157030
157493
  name: external_exports.string().optional().describe(
157031
157494
  'Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
157032
157495
  ),
@@ -157533,7 +157996,7 @@ one-off interaction use the gesture tools instead, and to author a flow use flow
157533
157996
  exactly one flow source: name (under project_root) or flow_path.
157534
157997
  Returns a per-step report: the first failure stops the run and the rest report as skipped.`,
157535
157998
  longRunning: true,
157536
- zodSchema: zodSchema70,
157999
+ zodSchema: zodSchema71,
157537
158000
  fileInputs: fileInputs4,
157538
158001
  services: () => ({}),
157539
158002
  async execute(_services, params, ctx) {
@@ -158510,7 +158973,7 @@ async function resolveFlowSource(params, fileInput, flowPathInput) {
158510
158973
  // ../tool-server/src/tools/flows/flow-read-prerequisite.ts
158511
158974
  init_zod();
158512
158975
  var fs64 = __toESM(require("node:fs/promises"));
158513
- var zodSchema71 = external_exports.object({
158976
+ var zodSchema72 = external_exports.object({
158514
158977
  name: external_exports.string().optional().describe(
158515
158978
  'Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
158516
158979
  ),
@@ -158566,7 +159029,7 @@ Touches no device: nothing is launched, tapped, dispatched or torn down, and no
158566
159029
  needs booting, so calling this costs nothing but a file read.
158567
159030
  Fails if the flow file does not exist.
158568
159031
  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: zodSchema71,
159032
+ zodSchema: zodSchema72,
158570
159033
  fileInputs: fileInputs5,
158571
159034
  services: () => ({}),
158572
159035
  async execute(_services, params, ctx) {
@@ -158882,7 +159345,7 @@ async function readWorkspaceSnapshot(workspacePath) {
158882
159345
  }
158883
159346
 
158884
159347
  // ../tool-server/src/tools/workspace/gather-workspace-data.ts
158885
- var zodSchema72 = external_exports.object({
159348
+ var zodSchema73 = external_exports.object({
158886
159349
  workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
158887
159350
  });
158888
159351
  var fileInputs6 = [
@@ -158913,7 +159376,7 @@ exploration of anything the snapshot surfaces.
158913
159376
  Use when you need to inspect project configuration without manually reading multiple files.
158914
159377
  Returns partial data if workspacePath does not exist or is not readable; missing items are represented as null or empty collections.
158915
159378
  Fails if the workspacePath is not an absolute path or the directory cannot be accessed.`,
158916
- zodSchema: zodSchema72,
159379
+ zodSchema: zodSchema73,
158917
159380
  fileInputs: fileInputs6,
158918
159381
  services: () => ({}),
158919
159382
  async execute(_services, params) {
@@ -158987,7 +159450,7 @@ function targetFlagsFor(target) {
158987
159450
  if (target === "both") return ["--global", "--local"];
158988
159451
  return [`--${target}`];
158989
159452
  }
158990
- var zodSchema73 = external_exports.object({
159453
+ var zodSchema74 = external_exports.object({
158991
159454
  target: external_exports.enum(["auto", "global", "local", "both"]).optional().describe(
158992
159455
  "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
159456
  )
@@ -159001,7 +159464,7 @@ var updateArgentTool = {
159001
159464
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to update Argent: ${failureSignal2.error_code}`
159002
159465
  },
159003
159466
  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: zodSchema73,
159467
+ zodSchema: zodSchema74,
159005
159468
  services: () => ({}),
159006
159469
  async execute(_services, params, _options) {
159007
159470
  const { updateAvailable, updateInstallable, currentVersion, installableVersion } = getUpdateState();
@@ -159086,7 +159549,7 @@ var updateArgentTool = {
159086
159549
 
159087
159550
  // ../tool-server/src/tools/system/dismiss-update.ts
159088
159551
  init_zod();
159089
- var zodSchema74 = external_exports.object({
159552
+ var zodSchema75 = external_exports.object({
159090
159553
  hours: external_exports.number().min(0).describe("Number of hours to suppress the update notification")
159091
159554
  });
159092
159555
  var dismissUpdateTool = {
@@ -159097,7 +159560,7 @@ var dismissUpdateTool = {
159097
159560
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to dismiss Argent update: ${failureSignal2.error_code}`
159098
159561
  },
159099
159562
  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: zodSchema74,
159563
+ zodSchema: zodSchema75,
159101
159564
  services: () => ({}),
159102
159565
  async execute(_services, params, _options) {
159103
159566
  const durationMs = params.hours * 60 * 60 * 1e3;
@@ -159116,7 +159579,7 @@ var import_path8 = __toESM(require("path"));
159116
159579
  init_zod();
159117
159580
  init_src2();
159118
159581
  init_device_info();
159119
- var zodSchema75 = external_exports.object({
159582
+ var zodSchema76 = external_exports.object({
159120
159583
  baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
159121
159584
  currentPath: external_exports.string().min(1).optional().describe("Path to the current PNG file. Required unless captureCurrent is true."),
159122
159585
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
@@ -159133,7 +159596,7 @@ var zodSchema75 = external_exports.object({
159133
159596
  "Directory where diff artifacts should be written. Optional: defaults to a temp directory; the diff images are returned in the result either way."
159134
159597
  )
159135
159598
  }).strict();
159136
- var capability34 = {
159599
+ var capability35 = {
159137
159600
  apple: { simulator: true, device: true },
159138
159601
  android: { emulator: true, device: true, unknown: true }
159139
159602
  };
@@ -159158,8 +159621,8 @@ Returns { summary, diffPath, contextDiffPath }. The summary uses normalized [0,1
159158
159621
  Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
159159
159622
  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
159623
  searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture",
159161
- zodSchema: zodSchema75,
159162
- capability: capability34,
159624
+ zodSchema: zodSchema76,
159625
+ capability: capability35,
159163
159626
  fileInputs: fileInputs7,
159164
159627
  services: (params) => {
159165
159628
  if (params.captureBaseline || params.captureCurrent) {
@@ -159472,7 +159935,7 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
159472
159935
  }
159473
159936
 
159474
159937
  // ../tool-server/src/tools/variants/propose-variant.ts
159475
- var zodSchema76 = external_exports.object({
159938
+ var zodSchema77 = external_exports.object({
159476
159939
  element: external_exports.string().min(1).max(200).describe(
159477
159940
  '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
159941
  ),
@@ -159532,7 +159995,7 @@ arrives as a follow-up message (this is the case in an \`argent lens\` CLI sessi
159532
159995
  Returns { round, elementId, variantId, element, variantCount, totalElements }: confirmation only;
159533
159996
  it does not wait for the user.`,
159534
159997
  searchHint: "propose design variant alternative option for element non-blocking ab choice",
159535
- zodSchema: zodSchema76,
159998
+ zodSchema: zodSchema77,
159536
159999
  services: () => ({}),
159537
160000
  async execute(_services, params) {
159538
160001
  let frame = params.variant.frame;
@@ -159556,7 +160019,7 @@ it does not wait for the user.`,
159556
160019
 
159557
160020
  // ../tool-server/src/tools/variants/await-user-selection.ts
159558
160021
  init_zod();
159559
- var zodSchema77 = external_exports.object({
160022
+ var zodSchema78 = external_exports.object({
159560
160023
  timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
159561
160024
  "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
160025
  )
@@ -159597,7 +160060,7 @@ This tool is long-running; it intentionally holds the request open. It honors cl
159597
160060
  disconnects (aborts cleanly).`,
159598
160061
  searchHint: "await wait user selection choice variant blocking confirm picks complete",
159599
160062
  longRunning: true,
159600
- zodSchema: zodSchema77,
160063
+ zodSchema: zodSchema78,
159601
160064
  services: () => ({}),
159602
160065
  async execute(_services, params, options) {
159603
160066
  const timeoutMs = (params.timeoutSeconds ?? 1800) * 1e3;
@@ -159612,7 +160075,7 @@ disconnects (aborts cleanly).`,
159612
160075
  init_zod();
159613
160076
  init_src2();
159614
160077
  init_device_info();
159615
- var zodSchema78 = external_exports.object({
160078
+ var zodSchema79 = external_exports.object({
159616
160079
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159617
160080
  action: external_exports.enum(["list", "select", "new", "close"]).describe(
159618
160081
  "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 +160108,7 @@ var tabAction = {
159645
160108
  failure: "close"
159646
160109
  }
159647
160110
  };
159648
- var capability35 = {
160111
+ var capability36 = {
159649
160112
  chromium: { app: true }
159650
160113
  };
159651
160114
  var chromiumTabsTool = {
@@ -159663,8 +160126,8 @@ var chromiumTabsTool = {
159663
160126
  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
160127
  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
160128
  searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
159666
- zodSchema: zodSchema78,
159667
- capability: capability35,
160129
+ zodSchema: zodSchema79,
160130
+ capability: capability36,
159668
160131
  services: (params) => {
159669
160132
  const device = resolveDevice(params.udid);
159670
160133
  if (device.platform === "chromium") {
@@ -159765,7 +160228,7 @@ async function clearStorage(cdp, type) {
159765
160228
  }
159766
160229
 
159767
160230
  // ../tool-server/src/tools/chromium-cookies/index.ts
159768
- var zodSchema79 = external_exports.object({
160231
+ var zodSchema80 = external_exports.object({
159769
160232
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159770
160233
  action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
159771
160234
  "get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."
@@ -159788,7 +160251,7 @@ var cookieAction = {
159788
160251
  delete: { started: "Deleting", completed: "Deleted", failure: "delete" },
159789
160252
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159790
160253
  };
159791
- var capability36 = {
160254
+ var capability37 = {
159792
160255
  chromium: { app: true }
159793
160256
  };
159794
160257
  var chromiumCookiesTool = {
@@ -159806,8 +160269,8 @@ var chromiumCookiesTool = {
159806
160269
  Use when seeding an authenticated session before a flow (set the session cookie, then navigate) or asserting cookie state after one.
159807
160270
  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
160271
  searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
159809
- zodSchema: zodSchema79,
159810
- capability: capability36,
160272
+ zodSchema: zodSchema80,
160273
+ capability: capability37,
159811
160274
  services: (params) => {
159812
160275
  const device = resolveDevice(params.udid);
159813
160276
  if (device.platform === "chromium") {
@@ -159872,7 +160335,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
159872
160335
  init_zod();
159873
160336
  init_src2();
159874
160337
  init_device_info();
159875
- var zodSchema80 = external_exports.object({
160338
+ var zodSchema81 = external_exports.object({
159876
160339
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159877
160340
  store: external_exports.enum(["local", "session"]).describe("Which Web Storage area: `local` (localStorage) or `session` (sessionStorage)."),
159878
160341
  action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
@@ -159887,7 +160350,7 @@ var storageAction = {
159887
160350
  remove: { started: "Removing from", completed: "Removed from", failure: "remove from" },
159888
160351
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159889
160352
  };
159890
- var capability37 = {
160353
+ var capability38 = {
159891
160354
  chromium: { app: true }
159892
160355
  };
159893
160356
  var chromiumStorageTool = {
@@ -159906,8 +160369,8 @@ Set \`store\` to "local" or "session". Storage is per-origin, so it reflects the
159906
160369
  Use when seeding feature flags / auth tokens before a flow or asserting persisted app state after one.
159907
160370
  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
160371
  searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
159909
- zodSchema: zodSchema80,
159910
- capability: capability37,
160372
+ zodSchema: zodSchema81,
160373
+ capability: capability38,
159911
160374
  services: (params) => {
159912
160375
  const device = resolveDevice(params.udid);
159913
160376
  if (device.platform === "chromium") {
@@ -160020,6 +160483,7 @@ function createRegistry() {
160020
160483
  registry2.registerTool(createDescribeTool(registry2));
160021
160484
  registry2.registerTool(createUiTreeTool(registry2));
160022
160485
  registry2.registerTool(createForegroundAppTool(registry2));
160486
+ registry2.registerTool(createFillTool(registry2));
160023
160487
  registry2.registerTool(createAwaitUiElementTool(registry2));
160024
160488
  registry2.registerTool(createAwaitScreenIdleTool(registry2));
160025
160489
  registry2.registerTool(createReactProfilerStartTool(registry2));