@swmansion/argent 0.28.1-next.21 → 0.28.1-next.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/agents/argent-environment-inspector.md +7 -7
  2. package/agents/references/quality-control-checklist.md +14 -14
  3. package/assets/manifest.json +2 -2
  4. package/bin/argent-android-devtools-0.3.0.apk +0 -0
  5. package/bin/darwin/ax-service +0 -0
  6. package/bin/darwin/tvos-ax-service +0 -0
  7. package/bin/darwin/tvos-hid-daemon +0 -0
  8. package/bin/tcp/ax-service +0 -0
  9. package/dist/cli-cmds.mjs +4 -1
  10. package/dist/client.d.ts +9 -0
  11. package/dist/client.js +3 -0
  12. package/dist/installer.mjs +4 -1
  13. package/dist/mcp-server.mjs +3 -0
  14. package/dist/tool-args.generated.d.ts +82 -76
  15. package/dist/tool-server.cjs +794 -333
  16. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  17. package/dylibs/libKeyboardPatch.dylib +0 -0
  18. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  19. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  20. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  21. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  22. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  23. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  24. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  25. package/package.json +1 -1
  26. package/rules/argent.md +16 -16
  27. package/skills/argent-android-emulator-setup/SKILL.md +9 -9
  28. package/skills/argent-create-flow/references/flow-yaml.md +11 -11
  29. package/skills/argent-create-flow/references/live-authoring.md +9 -9
  30. package/skills/argent-create-flow/references/reliability-and-recovery.md +13 -13
  31. package/skills/argent-device-interact/SKILL.md +47 -47
  32. package/skills/argent-device-interact/references/chromium.md +1 -1
  33. package/skills/argent-device-interact/references/gesture-examples.md +7 -7
  34. package/skills/argent-device-interact/references/secrets.md +6 -6
  35. package/skills/argent-lens/SKILL.md +21 -21
  36. package/skills/argent-metro-debugger/SKILL.md +22 -22
  37. package/skills/argent-metro-debugger/references/failure-scenarios.md +11 -11
  38. package/skills/argent-metro-debugger/references/source-maps.md +4 -4
  39. package/skills/argent-native-profiler/SKILL.md +13 -13
  40. package/skills/argent-qa-flows/SKILL.md +3 -3
  41. package/skills/argent-react-native-app-workflow/SKILL.md +18 -18
  42. package/skills/argent-react-native-optimization/SKILL.md +12 -12
  43. package/skills/argent-react-native-optimization/references/fix-reference.md +10 -10
  44. package/skills/argent-react-native-optimization/references/lint-rules.md +1 -1
  45. package/skills/argent-react-native-profiler/SKILL.md +25 -25
  46. package/skills/argent-react-native-profiler/references/diagnostic-tools.md +19 -19
  47. package/skills/argent-screen-recording/SKILL.md +14 -14
  48. package/skills/argent-test-ui-flow/SKILL.md +9 -9
  49. package/skills/argent-tv-interact/SKILL.md +19 -19
  50. package/bin/argent-android-devtools-0.2.0.apk +0 -0
@@ -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.21";
94926
+ return "0.28.1-next.23";
94924
94927
  }
94925
94928
  return "0.0.0";
94926
94929
  }
@@ -96694,8 +96697,8 @@ async function simctlArgsForUdid(udid, args, options) {
96694
96697
  return [...simctlPrefix(await deviceSetForUdid(udid)), ...nativeArgs(udid, args)];
96695
96698
  }
96696
96699
  function assertSimctlEntitlement(udid, options) {
96697
- const 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
  }
@@ -111341,13 +111388,13 @@ var listDevicesTool = {
111341
111388
  description: `List iOS simulators, Android emulators, connected physical Android devices, running Chromium apps, and Vega (Fire TV) devices in one place.
111342
111389
  Use at the start of a session to pick a target id ('udid' for iOS entries, 'serial' for Android/Vega entries, 'id' for Chromium) to pass to interaction tools, and to see which targets are already running.
111343
111390
  Returns { devices, avds } where each device carries a 'platform' discriminator ('ios', 'android', 'chromium', or 'vega'); 'avds' lists Android AVDs bootable via boot-device. A Vega VVD is listed under 'devices' whether running or stopped (state 'running'/'stopped'); start a stopped one with boot-device using its 'vvdImage'.
111344
- Android entries also carry a 'kind' ('emulator' for a local AVD, 'device' for a physical phone connected over USB / wireless adb) \u2014 physical phones are detected from \`adb devices\` (any serial that is not an \`emulator-*\` one) and are driven through the same interaction tools as emulators; they do not need boot-device (just connect the phone with USB debugging authorised).
111391
+ Android entries also carry a 'kind' ('emulator' for a local AVD, 'device' for a physical phone connected over USB / wireless adb). Physical phones are detected from \`adb devices\` (any serial that is not an \`emulator-*\` one) and are driven through the same interaction tools as emulators; they do not need boot-device (just connect the phone with USB debugging authorised).
111345
111392
  Physical iPhones appear as iOS entries with kind 'device' (no iPads); no boot-device. State 'connected' = cabled and usable; 'paired' = not reachable over USB, never auto-bound.
111346
- TV targets are tagged with runtimeKind 'tv' (Apple TV simulators on iOS, Android TV / leanback devices on Android) \u2014 these are focus-driven, not touch-driven: use \`describe\` to read focus, \`tv-remote\` for remote presses (up/down/left/right/select/back/menu/home), and \`keyboard\` to type, rather than the coordinate/gesture tools.
111347
- iOS simulators from an additional CoreSimulator device set (the 'ios.additionalDeviceSets' configuration \u2014 e.g. devices created by Radon IDE) are listed alongside default-set ones, tagged with their owning 'deviceSet' path; they are driven through the same tools by udid, but run headless (no Simulator.app window attaches to them).
111393
+ TV targets are tagged with runtimeKind 'tv' (Apple TV simulators on iOS, Android TV / leanback devices on Android). These are focus-driven, not touch-driven: use \`describe\` to read focus, \`tv-remote\` for remote presses (up/down/left/right/select/back/menu/home), and \`keyboard\` to type, rather than the coordinate/gesture tools.
111394
+ iOS simulators from an additional CoreSimulator device set (the 'ios.additionalDeviceSets' configuration, e.g. devices created by Radon IDE) are listed alongside default-set ones, tagged with their owning 'deviceSet' path; they are driven through the same tools by udid, but run headless (no Simulator.app window attaches to them).
111348
111395
  A foldable iOS simulator (the iPhone Duo) has 'foldable: true'. Use the \`fold\` tool to fold or unfold it.
111349
- Chromium apps are discovered by probing CDP debugging ports (default 9222; extend via the ARGENT_CHROMIUM_PORTS=<comma-separated-ports> env var). They must already be running with --remote-debugging-port=<port> \u2014 use boot-device with electronAppPath to launch one.
111350
- Booted/ready devices are listed first. Platforms whose CLI is unavailable are silently omitted \u2014 an empty result usually means xcode-select, Android platform-tools, or the Vega SDK is not installed.`,
111396
+ Chromium apps are discovered by probing CDP debugging ports (default 9222; extend via the ARGENT_CHROMIUM_PORTS=<comma-separated-ports> env var). They must already be running with --remote-debugging-port=<port>; use boot-device with electronAppPath to launch one.
111397
+ Booted/ready devices are listed first. Platforms whose CLI is unavailable are silently omitted; an empty result usually means xcode-select, Android platform-tools, or the Vega SDK is not installed.`,
111351
111398
  alwaysLoad: true,
111352
111399
  searchHint: "list devices simulators emulators avd serial udid ios android chromium vega app fire tv session start",
111353
111400
  zodSchema,
@@ -111921,7 +111968,7 @@ var NATIVE_DEVTOOLS_NAMESPACE = "NativeDevtools";
111921
111968
  function isInjectableBundleId(bundleId) {
111922
111969
  return !bundleId.toLowerCase().startsWith("com.apple.");
111923
111970
  }
111924
- var NON_INJECTABLE_NATIVE_WARNING = "Do not fall back to the native-devtools feature tools (native-describe-screen, native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point, native-user-interactable-view-at-point) \u2014 they run the same injection precheck and fail with the same non-injectable error.";
111971
+ var NON_INJECTABLE_NATIVE_WARNING = "Do not fall back to the native-devtools feature tools (native-describe-screen, native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point, native-user-interactable-view-at-point): they run the same injection precheck and fail with the same non-injectable error.";
111925
111972
  var NON_INJECTABLE_RECOVERY = "Use the standard `describe` tool (its accessibility path reads the screen without injection) or `screenshot` (then interact by coordinate). " + NON_INJECTABLE_NATIVE_WARNING;
111926
111973
  var MAX_NATIVE_DEVTOOLS_INIT_ATTEMPTS = 3;
111927
111974
  var NATIVE_DEVTOOLS_AGE_SLOP_MS = 3e3;
@@ -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;
@@ -118909,19 +118986,19 @@ Returns { envSetup, appRunning, connected, requiresRestart, state, message, next
118909
118986
  - envSetup: DYLD_INSERT_LIBRARIES is configured in the simulator's launchd environment
118910
118987
  - appRunning: the target bundle currently has a running UIKit process on the simulator
118911
118988
  - connected: the dylib is active in the current running process for this bundleId
118912
- - requiresRestart: the app is already running and a fresh process would reach this simulator's devtools endpoint where the current one does not \u2014 it carries no argent injection, was pointed at an earlier tool-server's listener, or could not be inspected to tell. Always false for a non-injectable app, and false when state is unregistered or connecting, where a relaunch cannot help.
118913
- - state: why devtools are or aren't live, measured from the running process. "connected"; "not_running"; "stale_process" (the process cannot reach this simulator's devtools endpoint \u2014 launched either before argent's instrumentation was in place or against an earlier tool-server's listener \u2014 so restart-app fixes it); "unregistered" (the process IS injected and pointed at this simulator's devtools endpoint yet the service never registered it, so restarting the app cannot help); "connecting" (the process IS injected but launched moments ago and is still connecting, so waiting is what helps); "indeterminate" (the process could not be inspected). Omitted when injectable is false, which is terminal on its own.
118914
- - message: the remedy for that state, in full, including for a state not listed above. Omitted when connected or non-injectable. Prefer it over inferring one from the booleans \u2014 it is the only field that can tell you to stop restarting the app.
118989
+ - requiresRestart: the app is already running and a fresh process would reach this simulator's devtools endpoint where the current one does not: it carries no argent injection, was pointed at an earlier tool-server's listener, or could not be inspected to tell. Always false for a non-injectable app, and false when state is unregistered or connecting, where a relaunch cannot help.
118990
+ - state: why devtools are or aren't live, measured from the running process. "connected"; "not_running"; "stale_process" (the process cannot reach this simulator's devtools endpoint, launched either before argent's instrumentation was in place or against an earlier tool-server's listener, so restart-app fixes it); "unregistered" (the process IS injected and pointed at this simulator's devtools endpoint yet the service never registered it, so restarting the app cannot help); "connecting" (the process IS injected but launched moments ago and is still connecting, so waiting is what helps); "indeterminate" (the process could not be inspected). Omitted when injectable is false, which is terminal on its own.
118991
+ - message: the remedy for that state, in full, including for a state not listed above. Omitted when connected or non-injectable. Prefer it over inferring one from the booleans: it is the only field that can tell you to stop restarting the app.
118915
118992
  - nextLaunchWillBeInjected: if you launch this bundle now, native devtools env setup is already in place (always false for a non-injectable app)
118916
118993
  - injectable: whether this app is a supported target for Argent native devtools. Apple system apps (bundle ids under com.apple.) are not: they are never the app under test, so the native tools refuse to read one.
118917
118994
 
118918
118995
  Call this before using app-scoped native hierarchy tools or native-network-logs.
118919
- If injectable is false: treat this as TERMINAL \u2014 the app is not a supported native-devtools target, and no relaunch changes that. Do NOT restart/retry. Use the standard \`describe\` tool (its accessibility path reads the screen without injection) or \`screenshot\` (then interact by coordinate). Do not fall back to the native-devtools feature tools (native-describe-screen, native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point, native-user-interactable-view-at-point) \u2014 they run the same injection precheck and fail with the same non-injectable error.
118996
+ If injectable is false: treat this as TERMINAL. The app is not a supported native-devtools target, and no relaunch changes that. Do NOT restart/retry. Use the standard \`describe\` tool (its accessibility path reads the screen without injection) or \`screenshot\` (then interact by coordinate). Do not fall back to the native-devtools feature tools (native-describe-screen, native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point, native-user-interactable-view-at-point): they run the same injection precheck and fail with the same non-injectable error.
118920
118997
  If appRunning is false and nextLaunchWillBeInjected is true: use launch-app normally.
118921
- If requiresRestart is true: call restart-app once, then proceed with the native feature. Read state before acting on a second such reading \u2014 indeterminate reaches this rule too, and its line below bounds it at that one restart.
118922
- If state is unregistered: do NOT restart the app again \u2014 it already launched under the terms a restart would recreate. Restart the tool-server (\`argent server stop && argent server start --detach\`), then retry. If it reads unregistered again after that restart, stop: the process loads argent's dylib but never dials, and no further restart on either side changes it \u2014 treat native devtools as unavailable, then use \`describe\` or \`screenshot\` and drive by coordinate.
118923
- If state is connecting: do NOT restart the app \u2014 launching it is what starts the connection, so a relaunch discards the one in progress and returns this same state. Wait a few seconds and repeat this call.
118924
- If state is indeterminate: the process could not be inspected, so restart-app is worth one attempt. If this call still reports it after that restart, do NOT restart the app again \u2014 the service is stale rather than the app uninjected, so restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. Remote simulators can never inspect the process, so this is the only unconnected state a running app reaches there.
118998
+ If requiresRestart is true: call restart-app once, then proceed with the native feature. Read state before acting on a second such reading. Indeterminate reaches this rule too, and its line below bounds it at that one restart.
118999
+ If state is unregistered: do NOT restart the app again: it already launched under the terms a restart would recreate. Restart the tool-server (\`argent server stop && argent server start --detach\`), then retry. If it reads unregistered again after that restart, stop: the process loads argent's dylib but never dials, and no further restart on either side changes it. Treat native devtools as unavailable, then use \`describe\` or \`screenshot\` and drive by coordinate.
119000
+ If state is connecting: do NOT restart the app. Launching it is what starts the connection, so a relaunch discards the one in progress and returns this same state. Wait a few seconds and repeat this call.
119001
+ If state is indeterminate: the process could not be inspected, so restart-app is worth one attempt. If this call still reports it after that restart, do NOT restart the app again: the service is stale rather than the app uninjected, so restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. Remote simulators can never inspect the process, so this is the only unconnected state a running app reaches there.
118925
119002
  Returns { status: "init_failed", message, attempts } instead when the simulator's native-devtools environment failed to initialize.
118926
119003
  Fails if the simulator server is not running for the given UDID.`,
118927
119004
  zodSchema: zodSchema2,
@@ -119016,8 +119093,8 @@ var nativeNetworkLogsTool = {
119016
119093
  Unlike the JS-level network inspector (view-network-logs), this captures ALL network traffic from the app including native modules, Swift/Objective-C networking, and background transfers that bypass JS fetch.
119017
119094
  Use when you need to inspect native-level HTTP traffic that is invisible to JS fetch interception.
119018
119095
  Returns { status, count, events } where each event contains URL, method, status code, headers, and timing.
119019
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119020
- A not-running app comes back as one of those statuses rather than a failure. An app that is not connected does too, except on a device whose devtools agent argent attached to rather than armed itself \u2014 there it fails with \`NATIVE_DEVTOOLS_NOT_CONNECTED\`, since no restart of ours can complete a handshake we do not own. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), while a missing host dependency or a udid that is not an Apple device is not.`,
119096
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119097
+ A not-running app comes back as one of those statuses rather than a failure. An app that is not connected does too, except on a device whose devtools agent argent attached to rather than armed itself: there it fails with \`NATIVE_DEVTOOLS_NOT_CONNECTED\`, since no restart of ours can complete a handshake we do not own. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), while a missing host dependency or a udid that is not an Apple device is not.`,
119021
119098
  zodSchema: zodSchema3,
119022
119099
  services: (params) => ({
119023
119100
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119079,8 +119156,8 @@ var nativeFindViewsTool = {
119079
119156
  Use when you need to locate a specific view by its properties without dumping the entire hierarchy.
119080
119157
  Returns { status: "ok", matches } with matching views including their frames, properties, optional ancestors, and optional children. Much more targeted than native-full-hierarchy.
119081
119158
  At least one of className, identifier, label, tag, or nativeID must be provided.
119082
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119083
- A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), and the hierarchy query itself can error or time out.`,
119159
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119160
+ A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), and the hierarchy query itself can error or time out.`,
119084
119161
  zodSchema: zodSchema4,
119085
119162
  services: (params) => ({
119086
119163
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119130,7 +119207,7 @@ var zodSchema5 = external_exports.object({
119130
119207
  'Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes)'
119131
119208
  ),
119132
119209
  skipClassPrefixes: external_exports.array(external_exports.string()).optional().describe(
119133
- 'Class name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping _UIHostingView and UIKit bridges. Avoid broad prefixes like "_UI" \u2014 they prune useful system views.'
119210
+ 'Class name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping _UIHostingView and UIKit bridges. Avoid broad prefixes like "_UI": they prune useful system views.'
119134
119211
  ),
119135
119212
  maxDepth: external_exports.number().int().positive().optional().describe(
119136
119213
  "Maximum recursion depth (default 8). Increase for deeper inspection, decrease to reduce output size."
@@ -119149,8 +119226,8 @@ WARNING: Output can be extremely large (100KB\u2013500KB+) for complex apps, esp
119149
119226
  Use skipClasses / skipClassPrefixes to prune SwiftUI internal subtrees and reduce output size. Use the fields param to request only the properties you need.
119150
119227
  Use when you need deep layout debugging, finding views with no accessibility labels, or verifying view structure not exposed through the accessibility tree.
119151
119228
  Returns { status: "ok", windows, screen } with the full view hierarchy. screen gives the screen size in points on its portrait axes, and the interfaceOrientation of the UI (portrait, portraitUpsideDown, landscapeLeft, landscapeRight). Each screenFrame uses the portrait axes of the screen. Each windowFrame uses the axes of its window, which turn with the UI.
119152
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119153
- A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), and the hierarchy query itself can error or time out.`,
119229
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119230
+ A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), and the hierarchy query itself can error or time out.`,
119154
119231
  zodSchema: zodSchema5,
119155
119232
  services: (params) => ({
119156
119233
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119218,8 +119295,8 @@ Use when you are evaluating or debugging the lower-level native data behind the
119218
119295
  describe tool, or when you need its raw point-space geometry rather than describe's
119219
119296
  normalized contract.
119220
119297
 
119221
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119222
- A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), and the screen query itself can error or time out.`,
119298
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119299
+ A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), and the screen query itself can error or time out.`,
119223
119300
  zodSchema: zodSchema6,
119224
119301
  services: (params) => ({
119225
119302
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119287,8 +119364,8 @@ var nativeViewAtPointTool = {
119287
119364
  Unlike native-user-interactable-view-at-point, this ignores userInteractionEnabled,
119288
119365
  so it answers "what is visually here?" rather than "what would receive the touch?".
119289
119366
 
119290
- Use when a screenshot shows something the accessibility tree does not name \u2014 an
119291
- unlabeled icon, a decorative overlay, a custom-drawn cell \u2014 and you need the class,
119367
+ Use when a screenshot shows something the accessibility tree does not name (an
119368
+ unlabeled icon, a decorative overlay, a custom-drawn cell) and you need the class,
119292
119369
  identifier or nativeID of whatever draws it.
119293
119370
 
119294
119371
  Returns { status: "ok", view }: the matched view with its class name, frames,
@@ -119300,8 +119377,8 @@ normalized [0,1] simulator tap coordinates. To get them from a describe frame,
119300
119377
  multiply the normalized values by the screen size in points. Do this also when
119301
119378
  the UI is landscape.
119302
119379
 
119303
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119304
- A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), and the point query itself can error or time out.`,
119380
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119381
+ A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), and the point query itself can error or time out.`,
119305
119382
  zodSchema: zodSchema7,
119306
119383
  services: (params) => ({
119307
119384
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119376,7 +119453,7 @@ Unlike native-view-at-point, this respects userInteractionEnabled and is closer
119376
119453
  UIKit hit-testing semantics.
119377
119454
 
119378
119455
  Use when a tap lands somewhere unexpected or does nothing, to see which control
119379
- UIKit would hand the touch to \u2014 a transparent overlay swallowing it, a parent
119456
+ UIKit would hand the touch to: a transparent overlay swallowing it, a parent
119380
119457
  recognizer, a disabled button.
119381
119458
 
119382
119459
  Returns { status: "ok", view }: the hit-test winner with its class name, frames,
@@ -119388,8 +119465,8 @@ normalized [0,1] simulator tap coordinates. To get them from a describe frame,
119388
119465
  multiply the normalized values by the screen size in points. Do this also when
119389
119466
  the UI is landscape.
119390
119467
 
119391
- If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help \u2014 restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting \u2014 do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised \u2014 follow the message (re-boot the simulator) rather than retrying this tool.
119392
- A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal \u2014 never retry it), and the point query itself can error or time out.`,
119468
+ If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help. Restart the tool-server (\`argent server stop && argent server start --detach\`) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting. Do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised. Follow the message (re-boot the simulator) rather than retrying this tool.
119469
+ A not-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal: never retry it), and the point query itself can error or time out.`,
119393
119470
  zodSchema: zodSchema8,
119394
119471
  services: (params) => ({
119395
119472
  nativeDevtools: nativeDevtoolsRef(resolveDevice(params.udid))
@@ -119505,7 +119582,7 @@ init_zod();
119505
119582
  init_external_devices();
119506
119583
  var DEFAULT_METRO_PORT = 8081;
119507
119584
  var metroPortField = external_exports.coerce.number().int().min(1).max(65535).optional().describe(
119508
- "Metro server port. Optional \u2014 omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."
119585
+ "Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."
119509
119586
  );
119510
119587
  function metroPort(params) {
119511
119588
  if (params.port !== void 0) return params.port;
@@ -121560,14 +121637,14 @@ var zodSchema9 = external_exports.object({
121560
121637
  "Android: AVD name to launch a new emulator from (from `list-devices` \u2192 `avds[].name`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`."
121561
121638
  ),
121562
121639
  vvdImage: external_exports.string().optional().describe(
121563
- "Vega (Fire TV): VVD image to boot \u2014 the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). Starts the single SDK-managed Vega Virtual Device. Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`."
121640
+ "Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). Starts the single SDK-managed Vega Virtual Device. Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`."
121564
121641
  ),
121565
121642
  bootTimeoutMs: external_exports.number().int().min(3e4).max(9e5).optional().describe(
121566
121643
  "Android/Vega: overall budget for the boot sequence. Default 480000 (8 min) on Android, 120000 (2 min) on Vega. Clamped to [30s, 15min]. Ignored on iOS."
121567
121644
  ),
121568
121645
  force: external_exports.boolean().optional().describe("Shut down and re-boot the device even if already running."),
121569
121646
  sound: external_exports.boolean().optional().describe(
121570
- "Android only: boot the emulator with audio output enabled. Defaults to false \u2014 argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/Electron, which argent never mutes."
121647
+ "Android only: boot the emulator with audio output enabled. Defaults to false: argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/Electron, which argent never mutes."
121571
121648
  ),
121572
121649
  headless: external_exports.boolean().optional().describe(
121573
121650
  "iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server; used by Argent Lens. Set the `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) to force this host-wide without passing the flag per call (the iOS analog of `ARGENT_EMULATOR_NO_WINDOW`). Ignored on Android/Vega/Electron, which have no equivalent GUI step."
@@ -122801,7 +122878,7 @@ function createLaunchAppTool(registry2) {
122801
122878
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to launch ${params.bundleId}: ${failureSignal2.error_code}`
122802
122879
  },
122803
122880
  description: `Open an app by its bundle id (iOS) or package name (Android), or confirm the running renderer (Chromium).
122804
- Use when starting any app \u2014 prefer this over tapping home-screen / launcher icons. Also prepares the native-devtools injection before the app starts (the iOS slice on iOS, the tvOS slice on Apple TV); on tvOS, interaction is focus-driven \u2014 use the tv-* tools rather than coordinate taps.
122881
+ Use when starting any app; prefer this over tapping home-screen / launcher icons. Also prepares the native-devtools injection before the app starts (the iOS slice on iOS, the tvOS slice on Apple TV); on tvOS, interaction is focus-driven; use the tv-* tools rather than coordinate taps.
122805
122882
  Returns { launched, bundleId, note? }. Fails if the app is not installed on the target device (iOS / Android). On a physical iPhone this registers the app every other tool acts on; com.apple.springboard and com.apple.Spotlight register without launching. note warns when runner signing is not ready.
122806
122883
  For Chromium, the app is already running behind a CDP port; this call simply refreshes the cached viewport and acknowledges the bundleId tag. To change the visible route, use \`open-url\`.
122807
122884
  On Vega (Fire TV), pass the interactive component app id from manifest.toml (e.g. com.example.app.main) as bundleId.
@@ -123020,7 +123097,7 @@ function createRestartAppTool(registry2) {
123020
123097
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to restart ${params.bundleId}: ${failureSignal2.error_code}`
123021
123098
  },
123022
123099
  description: `Terminate then relaunch an app by bundle id / package name.
123023
- Use when you need a clean in-memory state without a full reinstall. Also refreshes the native-devtools injection before the relaunch (the iOS slice on iOS, the tvOS slice on Apple TV); on tvOS, interaction is focus-driven \u2014 use the tv-* tools rather than coordinate taps.
123100
+ Use when you need a clean in-memory state without a full reinstall. Also refreshes the native-devtools injection before the relaunch (the iOS slice on iOS, the tvOS slice on Apple TV); on tvOS, interaction is focus-driven; use the tv-* tools rather than coordinate taps.
123024
123101
  Returns { restarted, bundleId }. Fails if the app is not installed.`,
123025
123102
  alwaysLoad: true,
123026
123103
  searchHint: "terminate relaunch restart reset app bundle id package simulator emulator vega tvos fire tv",
@@ -123589,7 +123666,7 @@ var zodSchema14 = external_exports.object({
123589
123666
  "The permission to change. `notifications` is Android-only (iOS has no simctl service for it); `reminders` is iOS-only; `camera` works on Android and on iOS only when the target simulator's runtime models the service (varies by simruntime, not by the installed Xcode)."
123590
123667
  ),
123591
123668
  bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
123592
- "App to change the permission for \u2014 required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app."
123669
+ "App to change the permission for, required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app."
123593
123670
  )
123594
123671
  });
123595
123672
  var permissionAction = {
@@ -123615,9 +123692,9 @@ var settingsPermissionsTool = {
123615
123692
  },
123616
123693
  description: `Grant, deny, or reset a runtime permission for an app without navigating the system Settings UI. Use during test setup to pre-authorize (or explicitly deny) a service before the app asks, or \`reset\` so the permission dialog appears again on next use. Always per-app: bundleId is required.
123617
123694
  Permissions: camera, microphone, photos, contacts, notifications, calendar, location, location-always, media-library, motion, reminders.
123618
- iOS simulator: edits the simulator's TCC store, always per-app. \`notifications\` is not supported (no iOS equivalent). \`reset\` is per-app \u2014 a device-wide reset is a no-op for existing grants on recent iOS, so it is not offered. \`grant location\`/\`location-always\` needs the app already installed (location auth isn't stored in TCC and isn't applied to a bundle id until the app exists) \u2014 enforced on local simulators; a remote simulator can't be probed for install state, so ensure the app is installed there first. Other services can be granted before install.
123695
+ iOS simulator: edits the simulator's TCC store, always per-app. \`notifications\` is not supported (no iOS equivalent). \`reset\` is per-app: a device-wide reset is a no-op for existing grants on recent iOS, so it is not offered. \`grant location\`/\`location-always\` needs the app already installed (location auth isn't stored in TCC and isn't applied to a bundle id until the app exists). This is enforced on local simulators; a remote simulator can't be probed for install state, so ensure the app is installed there first. Other services can be granted before install.
123619
123696
  Android: changes the mapped \`android.permission.*\` runtime permissions (reset also best-effort clears the user-set permission flags). The app must be installed and declare them in its manifest; \`reminders\` has no Android equivalent.
123620
- Some permission changes terminate the app if it is running (system behavior on both platforms) \u2014 set permissions before launching, or relaunch after.
123697
+ Some permission changes terminate the app if it is running (system behavior on both platforms), so set permissions before launching, or relaunch after.
123621
123698
  Returns { action, permission, bundleId, applied, skipped? }: \`applied\` lists the platform-level services/permissions actually changed; \`skipped\` (Android) lists mapped permissions the package manager rejected, e.g. ones the manifest doesn't declare. Fails if nothing could be applied.`,
123622
123699
  searchHint: "grant deny reset revoke app permissions privacy camera microphone location settings",
123623
123700
  zodSchema: zodSchema14,
@@ -123785,7 +123862,7 @@ var openUrlTool = {
123785
123862
  description: `Open a URL or URL scheme on the device.
123786
123863
  Use to navigate to a web page or deep-link into an app. On Chromium, this navigates the primary renderer to the given URL.
123787
123864
  Cross-platform schemes: https://, tel:, mailto:. iOS also: messages://, settings://, maps://. Android also: geo:, plus any app-specific deep link.
123788
- Deep-linking caveat: an https:// link opens the native app only when an installed app is verified for the link's domain (iOS Universal Links / Android App Links) \u2014 otherwise it opens in the browser, and on iOS simulators it may open in Safari even when the owning app is installed. To reliably open an installed app, use its custom scheme (scheme://path) or launch-app with its bundle id.
123865
+ Deep-linking caveat: an https:// link opens the native app only when an installed app is verified for the link's domain (iOS Universal Links / Android App Links); otherwise it opens in the browser, and on iOS simulators it may open in Safari even when the owning app is installed. To reliably open an installed app, use its custom scheme (scheme://path) or launch-app with its bundle id.
123789
123866
  On a physical iPhone, http(s) URLs default to Safari and any other scheme needs bundleId; the receiving app becomes the app under automation.
123790
123867
  Returns { opened, url, note? }. note carries the deep-linking caveat when a web URL was opened on a native device. Fails if no app is registered to handle the URI (iOS/Android) or the renderer rejects the navigation (Chromium).`,
123791
123868
  zodSchema: zodSchema15,
@@ -124394,7 +124471,7 @@ var zodSchema16 = external_exports.object({
124394
124471
  "Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency."
124395
124472
  ),
124396
124473
  includeImageInContext: external_exports.boolean().optional().default(true).describe(
124397
- "Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff \u2014 the file is still written, but the image bytes are not attached to the agent context."
124474
+ "Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff. The file is still written, but the image bytes are not attached to the agent context."
124398
124475
  ),
124399
124476
  downscaler: external_exports.enum(["lanczos3", "box", "bilinear", "nearest"]).optional().describe(
124400
124477
  "Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum. Ignored on physical iPhones."
@@ -124637,11 +124714,11 @@ var gestureTapTool = {
124637
124714
  },
124638
124715
  description: `Press the device screen (iOS simulator or physical device, Android emulator, or Chromium app) at normalized coordinates: x and y are fractions of screen width and height in 0.0\u20131.0 (not pixels).
124639
124716
  Sends a Down event followed by an Up event at the same point. For Chromium, this dispatches a CDP mouse-press/release on the renderer.
124640
- Set clickCount: 2 for a double-tap / double-click \u2014 the taps are dispatched as one gesture with proper click counting, which two separate tap calls cannot guarantee.
124717
+ Set clickCount: 2 for a double-tap / double-click: the taps are dispatched as one gesture with proper click counting, which two separate tap calls cannot guarantee.
124641
124718
  Use when you need to tap a button, link, or any tappable element on the screen.
124642
124719
  Returns { tapped: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend / Chromium CDP is not reachable for the given device.
124643
124720
  On a physical iPhone use \`describe\`; \`native-describe-screen\` is simulator-only.
124644
- Before tapping, determine the correct coordinates by using discovery tools \u2014 pick by platform: iOS / Android use \`describe\`, \`native-describe-screen\`, or \`debugger-component-tree\`; Chromium uses \`describe\` (the DOM walker), since the native and RN-specific discovery tools don't apply. More information in \`argent-device-interact\` skill`,
124721
+ Before tapping, determine the correct coordinates by using discovery tools. Pick by platform: iOS / Android use \`describe\`, \`native-describe-screen\`, or \`debugger-component-tree\`; Chromium uses \`describe\` (the DOM walker), since the native and RN-specific discovery tools don't apply. More information in \`argent-device-interact\` skill`,
124645
124722
  alwaysLoad: true,
124646
124723
  searchHint: "tap press button element device simulator emulator chromium touch down up click",
124647
124724
  zodSchema: zodSchema17,
@@ -124756,7 +124833,7 @@ var gestureSwipeTool = {
124756
124833
  description: `Execute a smooth swipe / drag touch gesture between two points on the device (iOS simulator or physical device, or Android emulator). All from/to positions are normalized 0.0\u20131.0 (fractions of screen width/height, not pixels), same as gesture-tap.
124757
124834
  Generates interpolated Move events for a natural feel (~60fps).
124758
124835
  Swipe up (fromY > toY) to scroll content down.
124759
- Use when you need to scroll a list, dismiss a modal, drag an element, or navigate between pages. Not supported on Chromium \u2014 use gesture-scroll there instead.
124836
+ Use when you need to scroll a list, dismiss a modal, drag an element, or navigate between pages. Not supported on Chromium; use gesture-scroll there instead.
124760
124837
  Physical iOS: an edge gesture (back-swipe) needs fromX 0 exactly; durationMs sets drag speed, not time; momentum:false only rests 300ms at the end and does not damp.
124761
124838
  Pass momentum:false for a momentum-free swipe that lands where the finger lifts (little to no fling at the 300 default), when you need a deterministic scroll distance; it needs durationMs >= 150 and is rejected below that, a shorter ease-out leaving the OS too little wall clock to read the deceleration as a stop. At 150 it lands short of the lift point instead, and 2 of 47 runs still flung backwards. A plain swipe takes any duration up to 10000ms and is delivered as close to the speed it was authored as a 16ms frame allows: below ~32ms the whole travel lands in one or two frames, which the OS flings as hard as it flings anything. Returns { swiped: true, timestampMs }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if the simulator-server / emulator backend is not reachable for the given device.`,
124762
124839
  alwaysLoad: true,
@@ -124859,7 +124936,7 @@ var sleep4 = (ms) => new Promise((r) => setTimeout(r, ms));
124859
124936
  var zodSchema19 = external_exports.object({
124860
124937
  udid: external_exports.string().describe("Target Chromium device id from `list-devices` (chromium-cdp-<port>)."),
124861
124938
  x: external_exports.number().describe(
124862
- "Anchor x: normalized 0.0\u20131.0 (fraction of window width, not pixels). The wheel events land here \u2014 put it over the element you want to scroll."
124939
+ "Anchor x: normalized 0.0\u20131.0 (fraction of window width, not pixels). The wheel events land here; put it over the element you want to scroll."
124863
124940
  ),
124864
124941
  y: external_exports.number().describe("Anchor y: normalized 0.0\u20131.0 (fraction of window height, not pixels)."),
124865
124942
  deltaX: external_exports.number().optional().describe(
@@ -124892,7 +124969,7 @@ var gestureScrollTool = {
124892
124969
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to scroll: ${failureSignal2.error_code}`
124893
124970
  },
124894
124971
  description: `Scroll content in a Chromium app by dispatching mouse-wheel events at a point. Anchor x/y are normalized 0.0\u20131.0 (fractions of the window, not pixels), same coordinate space as gesture-tap and describe. Deltas are fractions of the window too: deltaY 0.5 scrolls down half a window; negative scrolls back up.
124895
- Use when content is below/above the fold (describe shows off-screen elements with zero height) or a list needs scrolling. Chromium only \u2014 on iOS/Android use gesture-swipe.
124972
+ Use when content is below/above the fold (describe shows off-screen elements with zero height) or a list needs scrolling. Chromium only: on iOS/Android use gesture-swipe.
124896
124973
  Returns { scrolled: true, timestampMs }. Fails if the Chromium CDP session is not reachable for the given device.`,
124897
124974
  searchHint: "scroll wheel list page chromium mouse down up content fold",
124898
124975
  zodSchema: zodSchema19,
@@ -124937,7 +125014,7 @@ var zodSchema20 = external_exports.object({
124937
125014
  `Total drag duration in milliseconds (default 300, at most ${MAX_DURATION_MS2} - the button stays down for exactly this long), interpolated at ~60fps.`
124938
125015
  ),
124939
125016
  momentum: external_exports.boolean().optional().describe(
124940
- "Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum \u2014 use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed."
125017
+ "Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum. Use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed."
124941
125018
  ),
124942
125019
  // `momentum`'s earlier spelling, with the opposite polarity. Declared so this
124943
125020
  // non-strict object refuses it instead of stripping it and running the default.
@@ -124957,8 +125034,8 @@ var gestureDragTool = {
124957
125034
  completedMsg: ({ params }) => `Dragged from (${Math.round(params.fromX * 100)}%, ${Math.round(params.fromY * 100)}%) to (${Math.round(params.toX * 100)}%, ${Math.round(params.toY * 100)}%)`,
124958
125035
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to drag: ${failureSignal2.error_code}`
124959
125036
  },
124960
- description: `Press the left mouse button at a start point, move to an end point, and release \u2014 a desktop mouse drag in a Chromium app. All positions are normalized 0.0\u20131.0 (fractions of the window, not pixels), same coordinate space as gesture-tap and describe, except that a coordinate of exactly 1.0 lands one pixel inside the window edge (gesture-tap maps it to the edge itself). Interpolates mouse-move events at ~60fps over durationMs for a natural drag (a momentum-free drag samples more finely when durationMs is short, so its ease-out has a curve).
124961
- Use for slider thumbs, drag-and-drop, text selection, or draggable UI elements. Dragging never scrolls content on desktop \u2014 use gesture-scroll for lists/pages. Chromium only \u2014 on iOS/Android use gesture-swipe.
125037
+ description: `Press the left mouse button at a start point, move to an end point, and release: a desktop mouse drag in a Chromium app. All positions are normalized 0.0\u20131.0 (fractions of the window, not pixels), same coordinate space as gesture-tap and describe, except that a coordinate of exactly 1.0 lands one pixel inside the window edge (gesture-tap maps it to the edge itself). Interpolates mouse-move events at ~60fps over durationMs for a natural drag (a momentum-free drag samples more finely when durationMs is short, so its ease-out has a curve).
125038
+ Use for slider thumbs, drag-and-drop, text selection, or draggable UI elements. Dragging never scrolls content on desktop; use gesture-scroll for lists/pages. Chromium only: on iOS/Android use gesture-swipe.
124962
125039
  Pass momentum:false for a momentum-free drag that decelerates into the release, so apps that compute a fling from the pointer stream read ~0 velocity and the drag ends where it was aimed instead of flinging past it (a durationMs under ~100ms is too short for the deceleration to suppress the fling entirely). Returns { dragged: true, timestampMs }. Fails if the Chromium CDP session is not reachable for the given device.`,
124963
125040
  searchHint: "drag drop slider mouse press move release chromium select",
124964
125041
  zodSchema: zodSchema20,
@@ -125271,7 +125348,7 @@ var gesturePinchTool = {
125271
125348
  completedMsg: ({ params }) => `Pinched ${params.endDistance > params.startDistance ? "out" : "in"} at (${Math.round(params.centerX * 100)}%, ${Math.round(params.centerY * 100)}%)`,
125272
125349
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to pinch: ${failureSignal2.error_code}`
125273
125350
  },
125274
- description: `Execute a pinch-to-zoom gesture by moving two fingers toward or away from a center point to change the scale of on-screen content. All positions and distances are normalized 0.0\u20131.0 (fractions of screen width/height, not pixels)\u2014same coordinate space as gesture-tap and gesture-swipe.
125351
+ description: `Execute a pinch-to-zoom gesture by moving two fingers toward or away from a center point to change the scale of on-screen content. All positions and distances are normalized 0.0\u20131.0 (fractions of screen width/height, not pixels), same coordinate space as gesture-tap and gesture-swipe.
125275
125352
  startDistance > endDistance = pinch in (zoom out). startDistance < endDistance = pinch out (zoom in).
125276
125353
  Typical values: startDistance 0.2, endDistance 0.6 for a zoom-in pinch at screen center.
125277
125354
  Auto-generates interpolated frames at ~60fps. The angle parameter controls the axis (0 = horizontal, 90 = vertical). Optional endCenterX/endCenterY drift the centroid linearly over the gesture (omitted = fixed center).
@@ -125325,13 +125402,13 @@ var zodSchema23 = external_exports.object({
125325
125402
  "Center of rotation, vertical: normalized 0.0\u20131.0 (fraction of screen height, not pixels)"
125326
125403
  ),
125327
125404
  radius: external_exports.number().optional().describe(
125328
- "Distance from center to each finger: normalized 0.0\u20131.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse \u2014 pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given."
125405
+ "Distance from center to each finger: normalized 0.0\u20131.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse; pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given."
125329
125406
  ),
125330
125407
  radiusX: external_exports.number().optional().describe(
125331
- "Per-axis finger distance, horizontal: normalized 0.0\u20131.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX\xB7screenWidth = radiusY\xB7screenHeight for a physically circular orbit \u2014 constant finger separation, no pinch coupled into the turn."
125408
+ "Per-axis finger distance, horizontal: normalized 0.0\u20131.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX\xB7screenWidth = radiusY\xB7screenHeight for a physically circular orbit: constant finger separation, no pinch coupled into the turn."
125332
125409
  ),
125333
125410
  radiusY: external_exports.number().optional().describe(
125334
- "Per-axis finger distance, vertical: normalized 0.0\u20131.0 fraction of screen HEIGHT. Always paired with radiusX \u2014 see radiusX."
125411
+ "Per-axis finger distance, vertical: normalized 0.0\u20131.0 fraction of screen HEIGHT. Always paired with radiusX; see radiusX."
125335
125412
  ),
125336
125413
  startAngle: external_exports.number().describe("Starting angle in degrees (0 = right, 90 = down)"),
125337
125414
  endAngle: external_exports.number().describe("Ending angle in degrees. endAngle > startAngle = clockwise."),
@@ -125361,7 +125438,7 @@ var gestureRotateTool = {
125361
125438
  },
125362
125439
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to rotate gesture: ${failureSignal2.error_code}`
125363
125440
  },
125364
- description: `Send a two-finger circular arc gesture to rotate on-screen content by a specified angle. Two fingers are placed opposite each other at a fixed radius from the center, then swept from startAngle to endAngle degrees. All positions and radii are normalized 0.0\u20131.0 (fractions of screen width/height, not pixels)\u2014same coordinate space as gesture-tap and gesture-swipe.
125441
+ description: `Send a two-finger circular arc gesture to rotate on-screen content by a specified angle. Two fingers are placed opposite each other at a fixed radius from the center, then swept from startAngle to endAngle degrees. All positions and radii are normalized 0.0\u20131.0 (fractions of screen width/height, not pixels), same coordinate space as gesture-tap and gesture-swipe.
125365
125442
  endAngle > startAngle = clockwise rotation. Typical values: radius 0.15, startAngle 0, endAngle 90 for a 90\xB0 clockwise turn. A single radius applies to both axes, so on a non-square screen it traces a physical ellipse (finger separation varies through the turn); pass radiusX+radiusY (fractions of width/height with radiusX\xB7width = radiusY\xB7height) for a physically circular orbit instead.
125366
125443
  Auto-generates interpolated frames at ~60fps.
125367
125444
  Unlike gesture-pinch which moves fingers linearly to zoom, this orbits fingers in an arc to change orientation.
@@ -126162,7 +126239,7 @@ var zodSchema25 = external_exports.object({
126162
126239
  "Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id)."
126163
126240
  ),
126164
126241
  text: external_exports.string().optional().describe(
126165
- 'Text to type character by character. Cannot be combined with `key` in one call \u2014 one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Handles uppercase and common punctuation. To type a credential without its plaintext ever entering your context, use a secret placeholder: `{{secret:<NAME>}}` \u2014 e.g. text: "{{secret:APP_PASSWORD}}". The value is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project\'s `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Placeholders can be embedded in longer text and are never echoed back resolved. If the secret you need is not set, the failure lists the available names and every source it looked in \u2014 ask the user to add it to one of them (a secrets file applies immediately; an env var needs a restart), NEVER ask the user to paste the secret value into the conversation.'
126242
+ 'Text to type character by character. Cannot be combined with `key` in one call (one call per action); to type and then press a key, put two `keyboard` steps in one `run-sequence`. Handles uppercase and common punctuation. To type a credential without its plaintext ever entering your context, use a secret placeholder: `{{secret:<NAME>}}`, e.g. text: "{{secret:APP_PASSWORD}}". The value is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project\'s `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Placeholders can be embedded in longer text and are never echoed back resolved. If the secret you need is not set, the failure lists the available names and every source it looked in; ask the user to add it to one of them (a secrets file applies immediately; an env var needs a restart), NEVER ask the user to paste the secret value into the conversation.'
126166
126243
  ),
126167
126244
  key: external_exports.string().optional().describe(
126168
126245
  "Named key to press: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Cannot be combined with `text` in one call: one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Not supported on TV targets; move focus with `tv-remote` (up/down/left/right) instead. Physical iOS: only `enter` and `backspace`."
@@ -126210,11 +126287,11 @@ function createKeyboardTool(registry2) {
126210
126287
  description: `Type text or press special keys on the device (iOS simulator, Android emulator or device, Chromium app, Vega Virtual Device, or Apple TV / Android TV) using keyboard events.
126211
126288
  Use when you need to enter text or trigger a named key such as enter, escape, or arrow keys. On Vega and Apple TV / Android TV, prefer the remote tools for D-pad navigation; use keyboard to type into a focused text field (e.g. a search or login box).
126212
126289
  Returns { typed: string, keys: number }. On physical iOS, reactivated: true = app was re-fronted; re-describe. Fails if text and key are both given in one call (rejected before anything is typed), if an unsupported key name is provided, or if the device's input backend is not reachable.
126213
- A failure is not rolled back. An unsupported key name is always rejected before anything is sent. Un-typeable text is not: the iOS simulator and Chromium reject it mid-string and leave the characters before it in the field (Android, Vega and TV targets check the whole string up front). A transport failure partway also leaves the text already sent. On a retry, read the field's actual contents \u2014 do not assume it is unchanged.
126214
- - text: types a string (supports uppercase, digits, common punctuation). To type a credential, use \`{{secret:<NAME>}}\` \u2014 resolved server-side from the \`ARGENT_SECRET_<NAME>\` env var or an argent secrets file (\`.argent/secrets.env\` in the project, \`~/.argent/secrets.env\`, or an \`ARGENT_SECRET_\`-prefixed key in the project's \`.env\`/\`.env.local\`), so the plaintext never enters agent context; the result echoes the placeholder, not the value, and the after-typing auto-screenshot is skipped. To submit after typing a secret, put both steps in ONE \`run-sequence\` \u2014 that keeps the skip covering the Enter, which a second bare \`keyboard\` call would not.
126290
+ A failure is not rolled back. An unsupported key name is always rejected before anything is sent. Un-typeable text is not: the iOS simulator and Chromium reject it mid-string and leave the characters before it in the field (Android, Vega and TV targets check the whole string up front). A transport failure partway also leaves the text already sent. On a retry, read the field's actual contents; do not assume it is unchanged.
126291
+ - text: types a string (supports uppercase, digits, common punctuation). To type a credential, use \`{{secret:<NAME>}}\`, resolved server-side from the \`ARGENT_SECRET_<NAME>\` env var or an argent secrets file (\`.argent/secrets.env\` in the project, \`~/.argent/secrets.env\`, or an \`ARGENT_SECRET_\`-prefixed key in the project's \`.env\`/\`.env.local\`), so the plaintext never enters agent context; the result echoes the placeholder, not the value, and the after-typing auto-screenshot is skipped. To submit after typing a secret, put both steps in ONE \`run-sequence\`: that keeps the skip covering the Enter, which a second bare \`keyboard\` call would not.
126215
126292
  - key: presses a single named key (enter, escape, backspace, tab, arrow-up/down/left/right, f1-f12). NOT supported on TV targets; move focus with \`tv-remote\` instead. Physical iOS: only \`enter\` and \`backspace\`.
126216
- On a TV target (runtimeKind 'tv') only \`text\` applies \u2014 focus a text field first (with \`tv-remote\`), then type into it (injected HID keyboard on Apple TV, \`adb input text\` on Android TV).
126217
- One call does one action: pass text OR key, never both. To type and then press a key, send two \`keyboard\` steps in one \`run-sequence\` \u2014 { text: "hello" } then { key: "enter" } \u2014 which also keeps it to a single round-trip.`,
126293
+ On a TV target (runtimeKind 'tv') only \`text\` applies. Focus a text field first (with \`tv-remote\`), then type into it (injected HID keyboard on Apple TV, \`adb input text\` on Android TV).
126294
+ One call does one action: pass text OR key, never both. To type and then press a key, send two \`keyboard\` steps in one \`run-sequence\` ({ text: "hello" } then { key: "enter" }), which also keeps it to a single round-trip.`,
126218
126295
  zodSchema: zodSchema25,
126219
126296
  capability: capability17,
126220
126297
  alwaysLoad: true,
@@ -126279,7 +126356,7 @@ var pasteZodSchema = external_exports.object({
126279
126356
  "Target device id from `list-devices` (iOS simulator UDID or Android emulator serial)."
126280
126357
  ),
126281
126358
  text: external_exports.string().min(1).describe(
126282
- "Text to put on the device clipboard and paste into the focused field. Supports `{{secret:<NAME>}}` placeholders, resolved on the tool-server from the `ARGENT_SECRET_<NAME>` environment variable or an argent secrets file \u2014 the same sources as `keyboard` \u2014 so a credential never enters your context. If the secret is not set, the failure lists the available names and every source it looked in; ask the user to add it there, NEVER ask for the value in the conversation."
126359
+ "Text to put on the device clipboard and paste into the focused field. Supports `{{secret:<NAME>}}` placeholders, resolved on the tool-server from the `ARGENT_SECRET_<NAME>` environment variable or an argent secrets file (the same sources as `keyboard`), so a credential never enters your context. If the secret is not set, the failure lists the available names and every source it looked in; ask the user to add it there, NEVER ask for the value in the conversation."
126283
126360
  )
126284
126361
  });
126285
126362
 
@@ -126425,7 +126502,7 @@ function createPasteTool(registry2) {
126425
126502
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to paste text: ${failureSignal2.error_code}`
126426
126503
  },
126427
126504
  description: `Paste text into the focused field: puts \`text\` on the DEVICE clipboard, then triggers the platform's paste shortcut (iOS simulator, Android emulator).
126428
- Do NOT use this in place of \`keyboard\`. \`keyboard\` types as a user would and is the default for all text entry; use \`paste\` only where a real user would paste \u2014 a 2FA/OTP code copied from another app, a long link or token, or when testing the app's own paste handling.
126505
+ Do NOT use this in place of \`keyboard\`. \`keyboard\` types as a user would and is the default for all text entry; use \`paste\` only where a real user would paste: a 2FA/OTP code copied from another app, a long link or token, or when testing the app's own paste handling.
126429
126506
  Tap the field first so it has focus. Returns { pasted: true }, plus via: "keyboard" when a secret was typed instead of pasted. Fails on a TV target, when the device clipboard cannot be set, when a secret that has to be typed holds a character that cannot be typed, or when the simulator-server build lacks clipboard support.
126430
126507
  Supports \`{{secret:<NAME>}}\` placeholders like \`keyboard\`; the value is never echoed back.`,
126431
126508
  searchHint: "paste clipboard pasteboard otp 2fa code fill field",
@@ -126466,7 +126543,7 @@ var rotateTool = {
126466
126543
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to rotate device: ${failureSignal2.error_code}`
126467
126544
  },
126468
126545
  description: `Set the device orientation to Portrait, LandscapeLeft, LandscapeRight, or PortraitUpsideDown.
126469
- Use to test layout in a different orientation. Re-run \`describe\` afterwards \u2014 frame coordinates change with the orientation.
126546
+ Use to test layout in a different orientation. Re-run \`describe\` afterwards: frame coordinates change with the orientation.
126470
126547
  On an unfolded foldable iOS simulator (the iPhone Duo), the value sets the orientation of the device, not of the UI: \`Portrait\` gives a landscape UI and \`LandscapeLeft\` gives a portrait UI. To fold or unfold the device, use \`fold\`.
126471
126548
  Returns { orientation }. Fails if the target device is not booted.`,
126472
126549
  zodSchema: zodSchema26,
@@ -126931,7 +127008,7 @@ var shakeTool = {
126931
127008
  },
126932
127009
  description: `Shake the device (iOS simulator or Android emulator).
126933
127010
  Use to trigger anything bound to the shake gesture: iOS's "Undo Typing" / "Redo Typing" prompt in a text field, React Native's developer menu in a debug build, or an app's own shake-to-report handler.
126934
- iOS delivers one discrete shake per gesture (the same motion event a physical device raises). Android has no OS-level shake event \u2014 the accelerometer is driven through a burst of hard direction changes so app-side detectors fire, and the resting orientation is restored afterwards.
127011
+ iOS delivers one discrete shake per gesture (the same motion event a physical device raises). Android has no OS-level shake event: the accelerometer is driven through a burst of hard direction changes so app-side detectors fire, and the resting orientation is restored afterwards.
126935
127012
  Set \`count\` above 1 when a detector needs sustained motion before it triggers.
126936
127013
  Returns { shaken: true, count }.
126937
127014
  Works on local and remote (sim-remote) iOS simulators.
@@ -127189,7 +127266,7 @@ var buttonSchema = external_exports.preprocess(
127189
127266
  },
127190
127267
  external_exports.union([external_exports.enum(BUTTONS), external_exports.array(external_exports.enum(BUTTONS)).min(1).max(64)])
127191
127268
  ).describe(
127192
- 'A single TV-remote button, or a path of them run in one call. Buttons: up/down/left/right (D-pad), select (OK), back, home, menu, playPause, rewind, fastForward, next, previous, volumeUp, volumeDown, mute. The media-transport and volume keys work on Android TV and Vega; on the Apple TV simulator they are rejected (its HID stack ignores them) \u2014 the D-pad/select/back/menu/home/playPause core works on all three. For multi-step navigation pass an array, e.g. ["up","right","right","select"] \u2014 strongly prefer this over multiple `tv-remote` calls: the whole path runs in a single call.'
127269
+ 'A single TV-remote button, or a path of them run in one call. Buttons: up/down/left/right (D-pad), select (OK), back, home, menu, playPause, rewind, fastForward, next, previous, volumeUp, volumeDown, mute. The media-transport and volume keys work on Android TV and Vega; on the Apple TV simulator they are rejected (its HID stack ignores them). The D-pad/select/back/menu/home/playPause core works on all three. For multi-step navigation pass an array, e.g. ["up","right","right","select"]; strongly prefer this over multiple `tv-remote` calls: the whole path runs in a single call.'
127193
127270
  );
127194
127271
  var zodSchema28 = external_exports.object({
127195
127272
  udid: external_exports.string().describe("Target TV device id from `list-devices` (Apple TV, Android TV, or Vega)."),
@@ -127211,10 +127288,10 @@ function createTvRemoteTool(registry2) {
127211
127288
  completedMsg: ({ params }) => `Pressed ${params.button} on TV remote${(params.repeat ?? 1) > 1 ? ` ${params.repeat} times` : ""}`,
127212
127289
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to press ${params.button} on TV remote: ${failureSignal2.error_code}`
127213
127290
  },
127214
- description: `Press a TV remote / D-pad button (or a whole path of them) on a TV device \u2014 Apple TV (tvOS), Android TV (leanback), or Vega (Fire TV).
127215
- A TV is navigated with a directional remote, not touch \u2014 use this instead of gesture-tap/swipe (which do not apply on a TV). Move focus with up/down/left/right, confirm with select, go back with back/menu, exit with home, and use playPause/rewind/fastForward/next/previous/volumeUp/volumeDown/mute for the corresponding remote keys. (On the Apple TV simulator the media-transport and volume keys are rejected \u2014 its HID stack ignores them; they work on Android TV and Vega.)
127291
+ description: `Press a TV remote / D-pad button (or a whole path of them) on a TV device: Apple TV (tvOS), Android TV (leanback), or Vega (Fire TV).
127292
+ A TV is navigated with a directional remote, not touch. Use this instead of gesture-tap/swipe (which do not apply on a TV). Move focus with up/down/left/right, confirm with select, go back with back/menu, exit with home, and use playPause/rewind/fastForward/next/previous/volumeUp/volumeDown/mute for the corresponding remote keys. (On the Apple TV simulator the media-transport and volume keys are rejected (its HID stack ignores them); they work on Android TV and Vega.)
127216
127293
  Single press: { button: "down" }. Repeat the same button: { button: "down", repeat: 3 }.
127217
- Multi-step navigation: pass a path as { button: ["up","right","right","select"] } \u2014 it runs in one tool call, far cheaper than separate presses.
127294
+ Multi-step navigation: pass a path as { button: ["up","right","right","select"] }. It runs in one tool call, far cheaper than separate presses.
127218
127295
  Read the screen with \`describe\` before and after to see where focus landed.
127219
127296
  Returns { pressed, count }.`,
127220
127297
  // A path (≤64 buttons) × repeat (≤50) flattens to thousands of presses, sent
@@ -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
  }
@@ -133566,11 +133643,11 @@ var DEFAULT_POLL_INTERVAL_MS = 400;
133566
133643
  var zodSchema29 = external_exports.object({
133567
133644
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
133568
133645
  condition: external_exports.enum(["exists", "visible", "hidden", "text"]).describe(
133569
- "What to wait for. `exists`: selector is anywhere in the tree. `visible`: selector is present with a non-zero on-screen frame. `hidden`: selector is absent or zero-area. `text`: the first visible match in reading order (topmost), falling back to the first match overall if none is visible, contains (or, with textMatch `equals`, exactly matches) expectedText \u2014 if a loose selector hits several elements, only that one is checked, so narrow it to target the intended element."
133646
+ "What to wait for. `exists`: selector is anywhere in the tree. `visible`: selector is present with a non-zero on-screen frame. `hidden`: selector is absent or zero-area. `text`: the first visible match in reading order (topmost), falling back to the first match overall if none is visible, contains (or, with textMatch `equals`, exactly matches) expectedText. If a loose selector hits several elements, only that one is checked, so narrow it to target the intended element."
133570
133647
  ),
133571
133648
  selector: selectorSchema.describe("Element to match (text / identifier / role)."),
133572
133649
  expectedText: external_exports.string().min(1).optional().describe(
133573
- "For condition `text`: the string the first visible matched element (topmost in reading order; the first match overall if none is visible) must contain (default) or equal \u2014 see `textMatch`. Case-insensitive."
133650
+ "For condition `text`: the string the first visible matched element (topmost in reading order; the first match overall if none is visible) must contain (default) or equal (see `textMatch`). Case-insensitive."
133574
133651
  ),
133575
133652
  textMatch: external_exports.enum(["contains", "equals"]).optional().describe(
133576
133653
  "For condition `text`: how expectedText is compared. `contains` (default) is a case-insensitive substring; `equals` is a case-insensitive full-string match."
@@ -133680,13 +133757,13 @@ function createAwaitUiElementTool(registry2) {
133680
133757
  description: `Block until a UI element reaches an expected state or a timeout elapses, so you don't have to poll screenshot/describe yourself.
133681
133758
 
133682
133759
  Conditions:
133683
- exists \u2014 the selector matches an element anywhere in the tree.
133684
- visible \u2014 the selector matches an element with a non-zero on-screen frame.
133685
- hidden \u2014 the selector matches nothing, or only a zero-area element (e.g. a spinner that disappeared).
133686
- text \u2014 the first VISIBLE match in reading order (topmost, then leftmost; falling back to the first match
133760
+ exists: the selector matches an element anywhere in the tree.
133761
+ visible: the selector matches an element with a non-zero on-screen frame.
133762
+ hidden: the selector matches nothing, or only a zero-area element (e.g. a spinner that disappeared).
133763
+ text: the first VISIBLE match in reading order (topmost, then leftmost; falling back to the first match
133687
133764
  overall if none is visible) contains expectedText (case-insensitive substring), or exactly matches
133688
133765
  it when textMatch is \`equals\`. A loose selector can match several elements; only that one is
133689
- inspected, so if a different match is the one holding the text the wait still reports failure \u2014
133766
+ inspected, so if a different match is the one holding the text the wait still reports failure;
133690
133767
  narrow the selector to target it.
133691
133768
 
133692
133769
  The selector is { text?, identifier?, role? }; every provided field must match. text and role match as
@@ -133697,10 +133774,10 @@ It polls the same accessibility / DOM tree as \`describe\`
133697
133774
  Vega automation toolkit) every pollIntervalMs
133698
133775
  (default ${DEFAULT_POLL_INTERVAL_MS}ms) until timeoutMs (default ${DEFAULT_TIMEOUT_MS3}ms).
133699
133776
 
133700
- Returns { success: boolean, elapsed: number, note?, cause? } \u2014 success=false means the wait ended without the
133701
- condition holding, which is not always a verdict on the condition: \`cause\` says which it was \u2014 \`unmet\` (the tree
133777
+ Returns { success: boolean, elapsed: number, note?, cause? }. success=false means the wait ended without the
133778
+ condition holding, which is not always a verdict on the condition: \`cause\` says which it was: \`unmet\` (the tree
133702
133779
  was read and the condition was false there), \`unreadable\` (no trustworthy read, so nothing was judged) or
133703
- \`cancelled\` \u2014 and \`note\` describes what was seen. Only \`unmet\` licenses rewriting the check. Use this after a
133780
+ \`cancelled\`. \`note\` describes what was seen. Only \`unmet\` licenses rewriting the check. Use this after a
133704
133781
  tap/navigation to wait for the next screen, or before tapping an element that appears asynchronously.`,
133705
133782
  alwaysLoad: true,
133706
133783
  searchHint: "wait await poll until visible hidden exists text appears disappears timeout element condition settle",
@@ -133796,12 +133873,12 @@ var ALLOWED_TOOLS = /* @__PURE__ */ new Set([
133796
133873
  ]);
133797
133874
  var zodSchema30 = external_exports.object({
133798
133875
  udid: external_exports.string().describe(
133799
- "Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id) \u2014 shared across all steps."
133876
+ "Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id), shared across all steps."
133800
133877
  ),
133801
133878
  steps: external_exports.array(
133802
133879
  external_exports.object({
133803
133880
  tool: external_exports.string().describe(
133804
- "Tool name \u2014 one of: gesture-tap, gesture-swipe, gesture-scroll, gesture-drag, gesture-custom, gesture-pinch, gesture-rotate, button, keyboard, paste, rotate, shake, fold, tv-remote, await-ui-element. On a TV target (Apple TV / Android TV / Vega) use tv-remote (remote presses) and keyboard (text)."
133881
+ "Tool name, one of: gesture-tap, gesture-swipe, gesture-scroll, gesture-drag, gesture-custom, gesture-pinch, gesture-rotate, button, keyboard, paste, rotate, shake, fold, tv-remote, await-ui-element. On a TV target (Apple TV / Android TV / Vega) use tv-remote (remote presses) and keyboard (text)."
133805
133882
  ),
133806
133883
  args: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Tool arguments (excluding udid, which is injected automatically)"),
133807
133884
  delayMs: external_exports.number().optional().describe(
@@ -133834,7 +133911,7 @@ On a physical iOS device only gesture-tap, gesture-swipe, gesture-custom, button
133834
133911
  Use when you need sequential actions and do NOT need to observe the screen between them
133835
133912
  (e.g. scrolling multiple times, typing then pressing enter, rotating back and forth).
133836
133913
  Returns { completed, total, steps } with per-step results. Fails if an unrecognised tool name is used in a step (error returned at that step, execution stops).
133837
- One screenshot is captured automatically after the whole sequence (not per step) \u2014 call screenshot separately only for a baseline BEFORE it, or to observe an intermediate step.
133914
+ One screenshot is captured automatically after the whole sequence (not per step). Call screenshot separately only for a baseline BEFORE it, or to observe an intermediate step.
133838
133915
  That single capture is also why a secret belongs in this call rather than in two bare ones: the skip is decided from the whole request, so a \`{{secret:...}}\` in any step suppresses the capture that would otherwise follow the submit.
133839
133916
 
133840
133917
  ONLY use this when every step is known in advance. If any step depends on the
@@ -133852,41 +133929,41 @@ Allowed tools and their args (udid is auto-injected, do NOT include it in args):
133852
133929
  gesture-rotate: { centerX: number, centerY: number, radius?: number, radiusX?: number, radiusY?: number, startAngle: number, endAngle: number, durationMs?: number } [ios/android]
133853
133930
  button: { button: "home"|"back"|"power"|"volumeUp"|"volumeDown"|"appSwitch"|"actionButton" } [ios/android]
133854
133931
  keyboard: { text?: string, key?: string, delayMs?: number } (text OR key per step, never both; TV: text only) [ios/android/chromium/vega/tv]
133855
- text supports {{secret:<NAME>}} placeholders, resolved server-side from ARGENT_SECRET_<NAME> env vars or an argent secrets file \u2014 credentials never enter agent context
133856
- paste: { text: string } (device clipboard + paste shortcut; only where a user would paste, e.g. an OTP \u2014 keyboard otherwise) [ios sim/android emu]
133932
+ text supports {{secret:<NAME>}} placeholders, resolved server-side from ARGENT_SECRET_<NAME> env vars or an argent secrets file; credentials never enter agent context
133933
+ paste: { text: string } (device clipboard + paste shortcut; only where a user would paste, e.g. an OTP; keyboard otherwise) [ios sim/android emu]
133857
133934
  rotate: { orientation: "Portrait"|"LandscapeLeft"|"LandscapeRight"|"PortraitUpsideDown" } [ios/android]
133858
133935
  shake: { count?: number } [ios sim/android emu]
133859
133936
  fold: { posture?: "closed"|"half-open"|"open", angle?: 0-180 } (one of posture/angle; the next step lands on the new panel, whose coordinates are different) [foldable ios sim]
133860
133937
  tv-remote: { button: <remote button | array of them>, repeat?: number } [apple tv/android tv/vega]
133861
- buttons: up/down/left/right/select/back/home/menu/playPause (+ rewind/fastForward/next/previous/volumeUp/volumeDown/mute \u2014 work on Android TV and Vega; rejected on the Apple TV simulator)
133938
+ buttons: up/down/left/right/select/back/home/menu/playPause (+ rewind/fastForward/next/previous/volumeUp/volumeDown/mute work on Android TV and Vega; rejected on the Apple TV simulator)
133862
133939
  await-ui-element: { condition: "exists"|"visible"|"hidden"|"text", selector: {text?,identifier?,role?}, expectedText?, timeoutMs?, pollIntervalMs? } [ios/android/chromium]
133863
133940
 
133864
- Example \u2014 scroll down three times (use gesture-scroll with positive deltaY on Chromium):
133941
+ Example: scroll down three times (use gesture-scroll with positive deltaY on Chromium):
133865
133942
  { "udid": "<UDID>", "steps": [
133866
133943
  { "tool": "gesture-swipe", "args": { "fromX": 0.5, "fromY": 0.7, "toX": 0.5, "toY": 0.3 } },
133867
133944
  { "tool": "gesture-swipe", "args": { "fromX": 0.5, "fromY": 0.7, "toX": 0.5, "toY": 0.3 } },
133868
133945
  { "tool": "gesture-swipe", "args": { "fromX": 0.5, "fromY": 0.7, "toX": 0.5, "toY": 0.3 } }
133869
133946
  ]}
133870
133947
 
133871
- Example \u2014 type text and submit (two keyboard steps; one call cannot carry both):
133948
+ Example: type text and submit (two keyboard steps; one call cannot carry both):
133872
133949
  { "udid": "<UDID>", "steps": [
133873
133950
  { "tool": "keyboard", "args": { "text": "hello world" } },
133874
133951
  { "tool": "keyboard", "args": { "key": "enter" } }
133875
133952
  ]}
133876
133953
 
133877
- Example \u2014 TV: move focus right twice then activate (one tv-remote step with a path is cheaper):
133954
+ Example (TV): move focus right twice then activate (one tv-remote step with a path is cheaper):
133878
133955
  { "udid": "<TV-TARGET-ID>", "steps": [
133879
133956
  { "tool": "tv-remote", "args": { "button": ["right", "right", "select"] } }
133880
133957
  ]}
133881
133958
 
133882
- Example \u2014 tap, wait for the next screen's element, then tap it:
133959
+ Example: tap, wait for the next screen's element, then tap it:
133883
133960
  { "udid": "<UDID>", "steps": [
133884
133961
  { "tool": "gesture-tap", "args": { "x": 0.5, "y": 0.9 } },
133885
133962
  { "tool": "await-ui-element", "args": { "condition": "visible", "selector": { "text": "Continue" } } },
133886
133963
  { "tool": "gesture-tap", "args": { "x": 0.5, "y": 0.5 } }
133887
133964
  ]}
133888
133965
  If the await-ui-element condition is not met before its timeout, the sequence stops there and the
133889
- following steps do NOT run \u2014 so the tap above only fires once "Continue" is actually on screen.
133966
+ following steps do NOT run, so the tap above only fires once "Continue" is actually on screen.
133890
133967
 
133891
133968
  Stops on the first error (or unmet await-ui-element condition) and returns partial results.`,
133892
133969
  alwaysLoad: true,
@@ -133993,7 +134070,7 @@ function debuggerServiceRef(params) {
133993
134070
  var zodSchema31 = external_exports.object({
133994
134071
  port: metroPortField,
133995
134072
  device_id: external_exports.string().describe(
133996
- "Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), or Chromium device id (chromium-cdp-<port>). Pass this SAME id as device_id to every subsequent debugger-* call to pin them to this device. The returned logicalDeviceId is informational (Metro's own per-connection handle, absent on Vega); you do not switch to it \u2014 forwarding it still resolves here, but the list-devices id is the stable one."
134073
+ "Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), or Chromium device id (chromium-cdp-<port>). Pass this SAME id as device_id to every subsequent debugger-* call to pin them to this device. The returned logicalDeviceId is informational (Metro's own per-connection handle, absent on Vega); you do not switch to it. Forwarding it still resolves here, but the list-devices id is the stable one."
133997
134074
  )
133998
134075
  });
133999
134076
  var debuggerConnectTool = {
@@ -134004,7 +134081,7 @@ var debuggerConnectTool = {
134004
134081
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to connect JavaScript debugger: ${failureSignal2.error_code}`
134005
134082
  },
134006
134083
  description: `Connect to a JS runtime CDP debugger.
134007
- iOS / Android / Vega: connects to Metro's CDP endpoint on the given port. Chromium: re-uses the page CDP session opened by boot-device \u2014 port is ignored.
134084
+ iOS / Android / Vega: connects to Metro's CDP endpoint on the given port. Chromium: re-uses the page CDP session opened by boot-device; port is ignored.
134008
134085
  Returns connection info including port, projectRoot (empty on Chromium and on legacy Metro, e.g. Vega), deviceName, appName, logicalDeviceId (absent on Vega), and isNewDebugger, plus a note naming the kept log file when the previous session ended because the app crashed. If already connected, returns the existing connection.
134009
134086
  Use when starting a debug session or before calling other debugger-* tools. Fails if the runtime is unreachable (Metro down, or Chromium CDP terminated).`,
134010
134087
  zodSchema: zodSchema31,
@@ -134116,7 +134193,7 @@ function isDebuggerNotConnectedResult(toolId, result) {
134116
134193
  var zodSchema32 = external_exports.object({
134117
134194
  port: metroPortField,
134118
134195
  device_id: external_exports.string().describe(
134119
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
134196
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
134120
134197
  )
134121
134198
  });
134122
134199
  function createDebuggerStatusTool(registry2) {
@@ -134128,9 +134205,9 @@ function createDebuggerStatusTool(registry2) {
134128
134205
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to check JavaScript debugger: ${failureSignal2.error_code}`
134129
134206
  },
134130
134207
  description: `Get JS runtime debugger connection status and diagnostic info.
134131
- Use when you need to verify connectivity before using other debugger tools. Never fails when the runtime is simply unreachable \u2014 it returns a discriminated result instead:
134132
- - { status: "connected", ... } with port, projectRoot (empty on Chromium and on legacy Metro, e.g. Vega), deviceName, appName, logicalDeviceId (absent on Vega), isNewDebugger (false on the legacy inspector), connected flag, loadedScripts count, and sourceMapReady (always true \u2014 waits for pending source maps before returning; no-op on Chromium).
134133
- - { status: "not_connected", connected: false, reason, detail, guidance } (port omitted on Chromium) when Metro is not running (reason "metro_not_running"), no app is attached ("no_app_connected"), the device_id matches no target ("device_mismatch"), the CDP endpoint is unreachable or answered malformed ("cdp_unreachable"), the runtime accepted the connection but never answered ("runtime_unresponsive"), the cached connection went stale ("stale_connection"), or a reconnect is in flight ("reconnecting"). Follow the guidance field \u2014 do not retry in a loop.`,
134208
+ Use when you need to verify connectivity before using other debugger tools. Never fails when the runtime is simply unreachable: it returns a discriminated result instead:
134209
+ - { status: "connected", ... } with port, projectRoot (empty on Chromium and on legacy Metro, e.g. Vega), deviceName, appName, logicalDeviceId (absent on Vega), isNewDebugger (false on the legacy inspector), connected flag, loadedScripts count, and sourceMapReady (always true: waits for pending source maps before returning; no-op on Chromium).
134210
+ - { status: "not_connected", connected: false, reason, detail, guidance } (port omitted on Chromium) when Metro is not running (reason "metro_not_running"), no app is attached ("no_app_connected"), the device_id matches no target ("device_mismatch"), the CDP endpoint is unreachable or answered malformed ("cdp_unreachable"), the runtime accepted the connection but never answered ("runtime_unresponsive"), the cached connection went stale ("stale_connection"), or a reconnect is in flight ("reconnecting"). Follow the guidance field; do not retry in a loop.`,
134134
134211
  zodSchema: zodSchema32,
134135
134212
  capability: DEBUGGER_TOOL_CAPABILITY,
134136
134213
  // Resolved manually in execute so a not-connected precondition becomes a
@@ -134191,7 +134268,7 @@ init_src2();
134191
134268
  var zodSchema33 = external_exports.object({
134192
134269
  port: metroPortField,
134193
134270
  device_id: external_exports.string().describe(
134194
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
134271
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
134195
134272
  ),
134196
134273
  expression: external_exports.string().describe("JavaScript expression to evaluate in the app runtime")
134197
134274
  });
@@ -134202,8 +134279,8 @@ var debuggerEvaluateTool = {
134202
134279
  completedMsg: () => "Ran JavaScript in the app",
134203
134280
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to run JavaScript in the app: ${failureSignal2.error_code}`
134204
134281
  },
134205
- description: `Execute arbitrary JavaScript in the app's JS runtime via CDP \u2014 Hermes on iOS / Android / Vega, V8 on Chromium.
134206
- Returns the evaluation result as a JSON-serializable value, along with deviceName, appName, and logicalDeviceId for context. Use when you need to read app state, call app functions, or test logic at runtime. The result is serialized by value, so cyclic objects (many RN runtime values \u2014 fiber nodes, navigation refs, global \u2014 are cyclic) fail with a serialization error rather than returning silently. Fails if the expression throws or the runtime is not connected.`,
134282
+ description: `Execute arbitrary JavaScript in the app's JS runtime via CDP: Hermes on iOS / Android / Vega, V8 on Chromium.
134283
+ Returns the evaluation result as a JSON-serializable value, along with deviceName, appName, and logicalDeviceId for context. Use when you need to read app state, call app functions, or test logic at runtime. The result is serialized by value, so cyclic objects (many RN runtime values, such as fiber nodes, navigation refs and global, are cyclic) fail with a serialization error rather than returning silently. Fails if the expression throws or the runtime is not connected.`,
134207
134284
  zodSchema: zodSchema33,
134208
134285
  capability: DEBUGGER_TOOL_CAPABILITY,
134209
134286
  services: (params) => ({
@@ -134244,7 +134321,7 @@ init_src2();
134244
134321
  var zodSchema34 = external_exports.object({
134245
134322
  port: metroPortField,
134246
134323
  device_id: external_exports.string().describe(
134247
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
134324
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
134248
134325
  )
134249
134326
  });
134250
134327
  var debuggerReloadMetroTool = {
@@ -135196,7 +135273,7 @@ async function readTapAxes(registry2, app) {
135196
135273
  var zodSchema35 = external_exports.object({
135197
135274
  port: metroPortField,
135198
135275
  device_id: external_exports.string().describe(
135199
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
135276
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
135200
135277
  ),
135201
135278
  udid: external_exports.string().optional().describe(
135202
135279
  "iOS simulator UDID from list-devices. Pass it when device_id is a logicalDeviceId (two or more devices share one Metro), so that the tap coordinates of a landscape UI are on the screen's axes. Give the UDID of the simulator that shows the app."
@@ -135220,11 +135297,11 @@ function createDebuggerComponentTreeTool(registry2) {
135220
135297
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read React component tree: ${failureSignal2.error_code}`
135221
135298
  },
135222
135299
  description: `Fetch the current screen of a running React Native app as a compact component text tree.
135223
- Only shows on-screen components with unique positions \u2014 off-screen (scrolled) content,
135300
+ Only shows on-screen components with unique positions. Off-screen (scrolled) content,
135224
135301
  full-screen transparent wrappers, and implementation-detail components are pruned.
135225
135302
 
135226
135303
  Each visible component is listed with its name, text content, and normalized
135227
- tap coordinates in [0,1] space (fractions of the screen, not pixels \u2014 same space as tap/swipe/gesture).
135304
+ tap coordinates in [0,1] space (fractions of the screen, not pixels; same space as tap/swipe/gesture).
135228
135305
  On an iOS simulator with a landscape UI (a rotated device, or an unfolded foldable), the tap
135229
135306
  coordinates are on the screen's axes, which the gesture tools use. When two or more devices share
135230
135307
  one Metro, pass the simulator's udid too. If the result says that the orientation could not be
@@ -135723,7 +135800,7 @@ function filterInspectItems(items, includeSkipped = false) {
135723
135800
  var zodSchema36 = external_exports.object({
135724
135801
  port: metroPortField,
135725
135802
  device_id: external_exports.string().describe(
135726
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
135803
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
135727
135804
  ),
135728
135805
  x: external_exports.coerce.number().describe("Logical X coordinate on device screen"),
135729
135806
  y: external_exports.coerce.number().describe("Logical Y coordinate on device screen"),
@@ -135732,7 +135809,7 @@ var zodSchema36 = external_exports.object({
135732
135809
  "When true, resolves bundled frame locations to original source files via Metro symbolication and includes a code fragment. When false, returns the raw bundled frame info (file, line, column) without symbolication or source reading."
135733
135810
  ),
135734
135811
  maxItems: external_exports.coerce.number().default(35).describe(
135735
- "Maximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root \u2014 the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure."
135812
+ "Maximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root, so the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure."
135736
135813
  ),
135737
135814
  includeSkipped: external_exports.boolean().default(false).describe(
135738
135815
  "When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. Useful for understanding what was pruned."
@@ -135749,7 +135826,7 @@ var debuggerInspectElementTool = {
135749
135826
  Returns components from the tapped element upward through its parent hierarchy,
135750
135827
  each with its source file:line and a code fragment.
135751
135828
 
135752
- The first items (lowest indices) are the most specific \u2014 the exact component under
135829
+ The first items (lowest indices) are the most specific: the exact component under
135753
135830
  the tap point and its direct parents. Higher indices are broader context (page, navigator).
135754
135831
  Default shows 35 items which covers all app-specific code; use maxItems=70+ to also
135755
135832
  see the navigation/screen structure.
@@ -135860,7 +135937,7 @@ init_zod();
135860
135937
  var zodSchema37 = external_exports.object({
135861
135938
  port: metroPortField,
135862
135939
  device_id: external_exports.string().describe(
135863
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
135940
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
135864
135941
  )
135865
135942
  });
135866
135943
  function createDebuggerLogRegistryTool(registry2) {
@@ -135873,8 +135950,8 @@ function createDebuggerLogRegistryTool(registry2) {
135873
135950
  },
135874
135951
  description: `Get a summary of all console logs captured from the app's JS runtime.
135875
135952
  Returns the log file path, entry counts by level, and message clusters (grouped by similarity). Works against Hermes (iOS / Android / Vega) and V8 (Chromium).
135876
- Use when investigating warnings, errors, or unexpected output \u2014 call this first for an overview, then read the returned file for details. Returns empty stats if no log data has been captured yet \u2014 but check { note }, which is present only when the stats are empty BECAUSE the previous debugger session ended: torn down (e.g. by stop-all-simulator-servers) with its log file deleted, or cut off by the app crashing with its log file kept at the path the note names. Absent that note, empty really does mean the app has logged nothing.
135877
- When the debugger cannot be reached, this tool does not fail: it returns { status: "not_connected", reason, detail, guidance } with NO log file \u2014 follow the guidance (do not retry in a loop). Read a log file in this state only when a { note } names one kept from before the app crashed. A "connected" result's stats may come from a session whose socket has since died \u2014 use debugger-status, not this tool, to judge debugger health.`,
135953
+ Use when investigating warnings, errors, or unexpected output. Call this first for an overview, then read the returned file for details. Returns empty stats if no log data has been captured yet, but check { note }, which is present only when the stats are empty BECAUSE the previous debugger session ended: torn down (e.g. by stop-all-simulator-servers) with its log file deleted, or cut off by the app crashing with its log file kept at the path the note names. Absent that note, empty really does mean the app has logged nothing.
135954
+ When the debugger cannot be reached, this tool does not fail: it returns { status: "not_connected", reason, detail, guidance } with NO log file. Follow the guidance (do not retry in a loop). Read a log file in this state only when a { note } names one kept from before the app crashed. A "connected" result's stats may come from a session whose socket has since died. Use debugger-status, not this tool, to judge debugger health.`,
135878
135955
  zodSchema: zodSchema37,
135879
135956
  capability: DEBUGGER_TOOL_CAPABILITY,
135880
135957
  // Resolved manually in execute so a not-connected precondition becomes a
@@ -135986,7 +136063,7 @@ ${lines.join("\n")}`;
135986
136063
  var zodSchema38 = external_exports.object({
135987
136064
  port: metroPortField,
135988
136065
  device_id: external_exports.string().describe(
135989
- "Device id from list-devices (iOS simulator UDID or Android serial) \u2014 the same id used with debugger-connect."
136066
+ "Device id from list-devices (iOS simulator UDID or Android serial), the same id used with debugger-connect."
135990
136067
  ),
135991
136068
  pageIndex: external_exports.union([external_exports.coerce.number().int().nonnegative(), external_exports.literal("latest")]).default("latest").describe(
135992
136069
  'Page index (0-based) or "latest" for the most recent page. Each page contains up to 50 entries.'
@@ -136002,7 +136079,7 @@ var networkLogsTool = {
136002
136079
  description: `Retrieve captured network (HTTP) requests from the running app.
136003
136080
  Returns a paginated list of requests with method, URL, status, resource type, size, and duration.
136004
136081
  Each entry includes a requestId that can be passed to view-network-request-details for full details.
136005
- On React Native (iOS / Android / Vega) interception is injected into the JS runtime \u2014 it captures fetch() calls. On Chromium it reads the browser's native CDP Network domain (the active tab; all request types).
136082
+ On React Native (iOS / Android / Vega) interception is injected into the JS runtime: it captures fetch() calls. On Chromium it reads the browser's native CDP Network domain (the active tab; all request types).
136006
136083
  Use when inspecting outbound HTTP traffic or debugging API calls in the running app.
136007
136084
  Fails if the app is not connected (RN) or the device is not reachable (Chromium).`,
136008
136085
  zodSchema: zodSchema38,
@@ -136080,7 +136157,7 @@ var MAX_BODY_SIZE = 1e3;
136080
136157
  var zodSchema39 = external_exports.object({
136081
136158
  port: metroPortField,
136082
136159
  device_id: external_exports.string().describe(
136083
- "Device id from list-devices (iOS simulator UDID or Android serial) \u2014 the same id used with debugger-connect."
136160
+ "Device id from list-devices (iOS simulator UDID or Android serial), the same id used with debugger-connect."
136084
136161
  ),
136085
136162
  requestId: external_exports.string().describe("The requestId from view-network-logs to get full details for"),
136086
136163
  includeBody: external_exports.coerce.boolean().default(true).describe("Whether to include the response body (if captured). Defaults to true.")
@@ -136095,7 +136172,7 @@ var networkRequestTool = {
136095
136172
  description: `Get full details of a specific network request by its requestId (from view-network-logs).
136096
136173
  Returns request/response headers (sensitive headers redacted), status, timing, and optionally the response body.
136097
136174
  Large response bodies are truncated. Use when you need headers, body, or timing for a specific request after listing logs.
136098
- Returns an error message string if the requestId is not found \u2014 use view-network-logs to get valid requestId values.`,
136175
+ Returns an error message string if the requestId is not found; use view-network-logs to get valid requestId values.`,
136099
136176
  zodSchema: zodSchema39,
136100
136177
  capability: DEBUGGER_TOOL_CAPABILITY,
136101
136178
  services: (params) => {
@@ -136484,10 +136561,10 @@ function createDescribeTool(registry2) {
136484
136561
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read screen: ${failureSignal2.error_code}`
136485
136562
  },
136486
136563
  description: `Get the accessibility / DOM element tree for the current screen.
136487
- On iOS, uses the AXRuntime accessibility service to inspect whatever is currently visible \u2014 including
136564
+ On iOS, uses the AXRuntime accessibility service to inspect whatever is currently visible, including
136488
136565
  system dialogs, permission prompts, and any foreground app content. On a physical iOS device the tree
136489
136566
  covers only the app registered by launch-app. On Android, runs \`uiautomator dump\`.
136490
- On Chromium, walks the renderer's DOM via Chrome DevTools Protocol \u2014 every visible element with its ARIA
136567
+ On Chromium, walks the renderer's DOM via Chrome DevTools Protocol: every visible element with its ARIA
136491
136568
  role, accessible name, and bounding rect (normalized to 0\u20131).
136492
136569
  On Vega (Fire TV), reads the on-device automation toolkit (\`getPageSource\`); each element carries
136493
136570
  \`[focused]\`/\`[selected]\` so you can see where the D-pad cursor is, then move it with the \`tv-remote\` tool
@@ -136498,9 +136575,9 @@ When a system dialog is visible, describe returns the dialog's interactive eleme
136498
136575
  with tap coordinates. When no dialog is present, it returns the foreground app's accessible elements.
136499
136576
  On a physical iOS device, launch-app \`com.apple.springboard\` first to read system dialogs.
136500
136577
 
136501
- Returns \`{ description, source }\` where \`description\` is a text rendering of the UI tree \u2014 one
136578
+ Returns \`{ description, source }\` where \`description\` is a text rendering of the UI tree, one
136502
136579
  line per element with its role, label/value/id, interactivity flags, and frame. Frame coordinates
136503
- are normalized [0,1] fractions of the screen / window width/height (not pixels) \u2014 the same space as
136580
+ are normalized [0,1] fractions of the screen / window width/height (not pixels), the same space as
136504
136581
  gesture-tap / gesture-swipe / gesture-pinch.
136505
136582
 
136506
136583
  To tap an element use the centre of its frame: \`tap_x = frame.x + frame.width / 2\`,
@@ -136513,7 +136590,7 @@ For app-scoped inspection with full UIKit properties (accessibilityIdentifier, v
136513
136590
  use native-describe-screen with an explicit bundleId instead (iOS simulator only).
136514
136591
  For React Native apps, debugger-component-tree returns React component names with tap coordinates.
136515
136592
 
136516
- On a TV target (Apple TV / Android TV \u2014 a \`list-devices\` entry with runtimeKind 'tv') this returns
136593
+ On a TV target (Apple TV / Android TV: a \`list-devices\` entry with runtimeKind 'tv') this returns
136517
136594
  the focus-driven view instead: the currently FOCUSED element and the list of FOCUSABLE elements,
136518
136595
  since a TV UI has no tap coordinates. Move the highlight with \`tv-remote\` (up/down/left/right/select/
136519
136596
  back/menu/home), then call describe again to confirm where focus landed.`,
@@ -137114,6 +137191,389 @@ A field is unset when it is unknown.`,
137114
137191
  };
137115
137192
  }
137116
137193
 
137194
+ // ../tool-server/src/tools/fill/index.ts
137195
+ init_zod();
137196
+ init_adb();
137197
+
137198
+ // ../tool-server/src/tools/fill/errors.ts
137199
+ init_src2();
137200
+ function noFocusedFieldError(stage) {
137201
+ return new InvalidToolInputError(
137202
+ "Nothing that takes text has keyboard focus, so nothing was changed. Tap the text field first, then call fill again.",
137203
+ {
137204
+ error_code: FAILURE_CODES.FILL_NO_FOCUSED_FIELD,
137205
+ failure_stage: stage,
137206
+ error_kind: "validation"
137207
+ }
137208
+ );
137209
+ }
137210
+ function notVerifiedError(stage) {
137211
+ return new FailureError(
137212
+ "fill wrote to the focused field, but reading it back did not show the requested text. The field may hold other or partial text: read it before retrying.",
137213
+ {
137214
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137215
+ failure_stage: stage,
137216
+ failure_area: "tool_server",
137217
+ error_kind: "unknown"
137218
+ }
137219
+ );
137220
+ }
137221
+ function notChangedError(stage) {
137222
+ return new FailureError(
137223
+ "fill could not select the text of the focused field, so nothing was changed. Tap the field and retry.",
137224
+ {
137225
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137226
+ failure_stage: stage,
137227
+ failure_area: "tool_server",
137228
+ error_kind: "unknown"
137229
+ }
137230
+ );
137231
+ }
137232
+ function notAnsweredError(stage) {
137233
+ return new FailureError(
137234
+ "The device did not finish the fill in time. The field may have changed: read it before retrying.",
137235
+ {
137236
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137237
+ failure_stage: stage,
137238
+ failure_area: "tool_server",
137239
+ error_kind: "timeout"
137240
+ }
137241
+ );
137242
+ }
137243
+ function unsupportedFieldError(detail, stage) {
137244
+ return new InvalidToolInputError(
137245
+ `fill cannot set this field's text: ${detail}. Nothing was changed.`,
137246
+ {
137247
+ error_code: FAILURE_CODES.FILL_UNSUPPORTED_FIELD,
137248
+ failure_stage: stage,
137249
+ error_kind: "unsupported"
137250
+ }
137251
+ );
137252
+ }
137253
+
137254
+ // ../tool-server/src/tools/fill/keys.ts
137255
+ init_src2();
137256
+ init_src2();
137257
+ var MAX_CLEAR_KEYS = 100;
137258
+ var XCTEST_DELETE = "\b";
137259
+ var KEY_TIMING = { holdMs: 20, settleMs: 300, typeDelayMs: 30 };
137260
+ var sleep14 = (ms) => new Promise((r) => setTimeout(r, ms));
137261
+ function typeableOnSimulator(text) {
137262
+ for (const char of text) if (!charToKeyPress(char)) return false;
137263
+ return true;
137264
+ }
137265
+ async function withoutTextInErrors(stage, run2) {
137266
+ try {
137267
+ return await run2();
137268
+ } catch (err) {
137269
+ const signal = getFailureSignal(err);
137270
+ throw new FailureError(
137271
+ "fill failed partway through typing: the focused field may hold part of the text. Read it before retrying.",
137272
+ signal ?? {
137273
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137274
+ failure_stage: stage,
137275
+ failure_area: "tool_server",
137276
+ error_kind: "unknown"
137277
+ }
137278
+ );
137279
+ }
137280
+ }
137281
+ async function pressSimulatorBackspace(registry2, device) {
137282
+ const ref = simulatorServerRef(device);
137283
+ const api = await registry2.resolveService(ref.urn, ref.options);
137284
+ await api.pressKey("Down", NAMED_KEYS.backspace);
137285
+ await sleep14(KEY_TIMING.holdMs);
137286
+ await api.pressKey("Up", NAMED_KEYS.backspace);
137287
+ await sleep14(KEY_TIMING.settleMs);
137288
+ }
137289
+ async function typeOnSimulator(registry2, device, text) {
137290
+ if (!text) return;
137291
+ await withoutTextInErrors(
137292
+ "fill_keys_ios",
137293
+ () => typeSimulatorServer(registry2, device, {
137294
+ udid: device.id,
137295
+ text,
137296
+ delayMs: KEY_TIMING.typeDelayMs
137297
+ })
137298
+ );
137299
+ }
137300
+ async function fillByDeviceKeys(registry2, device, text) {
137301
+ const bundleId = requireCurrentIosDeviceApp(device.id);
137302
+ const ref = iosDeviceRunnerRef(device);
137303
+ const api = await registry2.resolveService(ref.urn, ref.options);
137304
+ const type = async (chars) => {
137305
+ try {
137306
+ await typeText(api, bundleId, chars);
137307
+ } catch (err) {
137308
+ if (err instanceof RunnerCommandError && err.code === "TEXT_INPUT_NOT_FOCUSED") {
137309
+ throw noFocusedFieldError("fill_keys_ios_device_focus");
137310
+ }
137311
+ throw err;
137312
+ }
137313
+ };
137314
+ await type(XCTEST_DELETE.repeat(MAX_CLEAR_KEYS));
137315
+ if (text) await withoutTextInErrors("fill_keys_ios_device", () => type(text));
137316
+ }
137317
+
137318
+ // ../tool-server/src/tools/fill/ios.ts
137319
+ var NEWLINE = /[\r\n]/;
137320
+ async function fillIos(registry2, device, text) {
137321
+ const ref = axServiceRef(device);
137322
+ const ax = await registry2.resolveService(ref.urn, ref.options);
137323
+ const typeable = typeableOnSimulator(text) && !NEWLINE.test(text);
137324
+ const first = await ax.fill(text, { typeable });
137325
+ if (!first.focused) throw noFocusedFieldError("fill_ios_no_focus");
137326
+ if (first.unsupported) {
137327
+ throw unsupportedFieldError(
137328
+ "the focused element is not a text input (a date or time input, or a picker)",
137329
+ "fill_ios_unsupported_field"
137330
+ );
137331
+ }
137332
+ if (first.singleLine) {
137333
+ throw unsupportedFieldError(
137334
+ "a single-line text field cannot hold a newline",
137335
+ "fill_ios_single_line"
137336
+ );
137337
+ }
137338
+ if (first.timedOut) throw notAnsweredError("fill_ios_timeout");
137339
+ if (first.untouched) throw notChangedError("fill_ios_select_failed");
137340
+ if (first.verified) return { verified: true };
137341
+ if (first.secure) {
137342
+ if (!typeable) {
137343
+ throw unsupportedFieldError(
137344
+ "a secure text field takes only text the keyboard can type on one line, and this text has a character it cannot",
137345
+ "fill_ios_secure_untypeable"
137346
+ );
137347
+ }
137348
+ if (!first.cleared) throw notVerifiedError("fill_ios_secure_not_cleared");
137349
+ await typeOnSimulator(registry2, device, text);
137350
+ const check3 = await ax.fill(text, { check: true });
137351
+ if (check3.verified) return { verified: true };
137352
+ throw notVerifiedError("fill_ios_not_verified");
137353
+ }
137354
+ if (first.needsBackspace) {
137355
+ await pressSimulatorBackspace(registry2, device);
137356
+ const check3 = await ax.fill(text, { check: true });
137357
+ if (check3.verified) return { verified: true };
137358
+ }
137359
+ throw notVerifiedError("fill_ios_not_verified");
137360
+ }
137361
+
137362
+ // ../tool-server/src/tools/fill/android.ts
137363
+ async function fillAndroid(registry2, device, text) {
137364
+ const ref = androidDevtoolsRef(device);
137365
+ const helper = await registry2.resolveService(ref.urn, ref.options);
137366
+ const answer = await helper.setText(text);
137367
+ if (!answer.focused) throw noFocusedFieldError("fill_android_no_focus");
137368
+ if (answer.singleLine) {
137369
+ throw unsupportedFieldError(
137370
+ "a single-line text field cannot hold a newline",
137371
+ "fill_android_single_line"
137372
+ );
137373
+ }
137374
+ if (answer.timedOut) throw notAnsweredError("fill_android_timeout");
137375
+ if (answer.verified) return { verified: true };
137376
+ throw notVerifiedError("fill_android_not_verified");
137377
+ }
137378
+
137379
+ // ../tool-server/src/tools/fill/chromium.ts
137380
+ init_src2();
137381
+ function buildChromiumFillScript(text) {
137382
+ return `(async () => {
137383
+ const text = ${JSON.stringify(text)};
137384
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
137385
+ try {
137386
+ const deepActive = (doc) => {
137387
+ let el = doc.activeElement;
137388
+ while (el && el.shadowRoot && el.shadowRoot.activeElement) el = el.shadowRoot.activeElement;
137389
+ return el;
137390
+ };
137391
+ let el = deepActive(document);
137392
+ while (el && String(el.tagName).toLowerCase() === "iframe") {
137393
+ let inner = null;
137394
+ try { inner = el.contentDocument; } catch (e) { inner = null; }
137395
+ if (!inner) return { status: "no_focus" };
137396
+ el = deepActive(inner);
137397
+ }
137398
+ if (!el || el.tagName === undefined) return { status: "no_focus" };
137399
+ const doc = el.ownerDocument || document;
137400
+ const win = doc.defaultView || window;
137401
+ const tag = String(el.tagName).toLowerCase();
137402
+ const type = tag === "input" ? String(el.type || "text").toLowerCase() : null;
137403
+ if (type !== null && /^(date|time|month|week|datetime-local)$/.test(type)) {
137404
+ return { status: "unsupported", detail: "a " + type + " input holds a structured value" };
137405
+ }
137406
+ const control =
137407
+ tag === "textarea" ||
137408
+ (tag === "input" && !/^(button|checkbox|radio|file|submit|reset|image|range|color|hidden)$/.test(type));
137409
+ if (!control && el.isContentEditable !== true) return { status: "no_focus" };
137410
+ if (control && el.disabled === true) return { status: "unsupported", detail: "it is disabled" };
137411
+ if (control && el.readOnly === true) return { status: "unsupported", detail: "it is read-only" };
137412
+ // An <input> holds one line and drops a newline.
137413
+ if (tag === "input" && /[\\r\\n]/.test(text)) {
137414
+ return { status: "unsupported", detail: "a single-line input cannot hold a newline" };
137415
+ }
137416
+ if (!control) {
137417
+ // designMode or <body contenteditable>: the whole document is the field.
137418
+ let host = el;
137419
+ while (host.parentElement && host.parentElement.isContentEditable === true) host = host.parentElement;
137420
+ if (host === doc.body || host === doc.documentElement) {
137421
+ return { status: "unsupported", detail: "the whole document is editable" };
137422
+ }
137423
+ }
137424
+ const trimEnd = (s) => s.replace(/[\\u200b\\ufeff]/g, "").replace(/\\n+$/, "");
137425
+ const read = () =>
137426
+ control ? String(el.value == null ? "" : el.value) : trimEnd(String(el.innerText == null ? el.textContent || "" : el.innerText));
137427
+ const matches = () => (control ? read() === text : read() === trimEnd(text));
137428
+ const settle = async () => {
137429
+ for (let i = 0; i < 10; i++) {
137430
+ await sleep(i === 0 ? 0 : 50);
137431
+ if (matches()) return true;
137432
+ }
137433
+ return false;
137434
+ };
137435
+
137436
+ if (control) {
137437
+ try { el.select(); } catch (e) { /* no selection API */ }
137438
+ } else {
137439
+ const sel = doc.getSelection();
137440
+ const range = doc.createRange();
137441
+ range.selectNodeContents(el);
137442
+ sel.removeAllRanges();
137443
+ sel.addRange(range);
137444
+ }
137445
+ if (text === "") {
137446
+ if (read() !== "") doc.execCommand("delete");
137447
+ } else {
137448
+ doc.execCommand("insertText", false, text);
137449
+ }
137450
+ let verified = await settle();
137451
+ if (!verified && control) {
137452
+ const proto = tag === "textarea" ? win.HTMLTextAreaElement.prototype : win.HTMLInputElement.prototype;
137453
+ const setter = Object.getOwnPropertyDescriptor(proto, "value").set;
137454
+ setter.call(el, text);
137455
+ el.dispatchEvent(new win.Event("input", { bubbles: true }));
137456
+ el.dispatchEvent(new win.Event("change", { bubbles: true }));
137457
+ verified = await settle();
137458
+ }
137459
+ return { status: "ok", verified: verified };
137460
+ } catch (e) {
137461
+ return { status: "error" };
137462
+ }
137463
+ })()`;
137464
+ }
137465
+ async function fillChromium(registry2, device, text) {
137466
+ const ref = chromiumCdpRef(device);
137467
+ const api = await registry2.resolveService(ref.urn, ref.options);
137468
+ const out = await api.cdp.send(
137469
+ "Runtime.evaluate",
137470
+ { expression: buildChromiumFillScript(text), awaitPromise: true, returnByValue: true },
137471
+ 1e4
137472
+ );
137473
+ const answer = out.result?.value;
137474
+ switch (answer?.status) {
137475
+ case "ok":
137476
+ if (answer.verified === true) {
137477
+ return { verified: true };
137478
+ }
137479
+ throw notVerifiedError("fill_chromium_not_verified");
137480
+ case "no_focus":
137481
+ throw noFocusedFieldError("fill_chromium_no_focus");
137482
+ case "unsupported":
137483
+ throw unsupportedFieldError(answer.detail ?? "unsupported field", "fill_chromium_field");
137484
+ default:
137485
+ throw new FailureError("fill could not run in the page; nothing is known about the field.", {
137486
+ error_code: FAILURE_CODES.FILL_NOT_VERIFIED,
137487
+ failure_stage: "fill_chromium_script",
137488
+ failure_area: "tool_server",
137489
+ error_kind: "unknown",
137490
+ failure_command: "cdp"
137491
+ });
137492
+ }
137493
+ }
137494
+
137495
+ // ../tool-server/src/tools/fill/index.ts
137496
+ var zodSchema43 = external_exports.object({
137497
+ udid: external_exports.string().min(1).describe("Target device id from `list-devices`."),
137498
+ text: external_exports.string().describe(
137499
+ 'The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`.'
137500
+ )
137501
+ });
137502
+ var capability28 = {
137503
+ apple: { simulator: true, device: true },
137504
+ appleRemote: { simulator: true },
137505
+ android: { emulator: true, device: true, unknown: true },
137506
+ chromium: { app: true }
137507
+ };
137508
+ function createFillTool(registry2) {
137509
+ const dispatch = dispatchByPlatform({
137510
+ toolId: "fill",
137511
+ capability: capability28,
137512
+ ios: {
137513
+ requires: iosRequires,
137514
+ handler: async (_services, params, device) => {
137515
+ if (await isTvOsSimulator(device.id)) {
137516
+ throw new UnsupportedOperationError("fill", device, "tvOS");
137517
+ }
137518
+ return fillIos(registry2, device, params.text);
137519
+ }
137520
+ },
137521
+ iosRemote: {
137522
+ requires: ["sim-remote"],
137523
+ handler: async (_services, params, device) => {
137524
+ if (await isRemoteTvOsSimulator(device.id)) {
137525
+ throw new UnsupportedOperationError("fill", device, "tvOS");
137526
+ }
137527
+ return fillIos(registry2, device, params.text);
137528
+ }
137529
+ },
137530
+ iosDevice: {
137531
+ requires: ["xcrun"],
137532
+ handler: async (_services, params, device) => {
137533
+ await fillByDeviceKeys(registry2, device, params.text);
137534
+ return { verified: false };
137535
+ }
137536
+ },
137537
+ android: {
137538
+ requires: androidRequires,
137539
+ handler: async (_services, params, device) => {
137540
+ if (await isAndroidTv(device.id)) {
137541
+ throw new UnsupportedOperationError("fill", device, "Android TV");
137542
+ }
137543
+ return fillAndroid(registry2, device, params.text);
137544
+ }
137545
+ },
137546
+ chromium: {
137547
+ handler: async (_services, params, device) => fillChromium(registry2, device, params.text)
137548
+ }
137549
+ });
137550
+ return {
137551
+ id: "fill",
137552
+ interaction: {
137553
+ // Never quote `text`: it may be a credential, and these messages reach
137554
+ // the event log.
137555
+ startedMsg: () => "Filling the focused field",
137556
+ completedMsg: () => "Filled the focused field",
137557
+ failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to fill the field: ${failureSignal2.error_code}`
137558
+ },
137559
+ description: `Set the text of the focused text field to exactly \`text\`, replacing what it holds; "" clears it. Tap the field first.
137560
+ Returns { verified }, never the text: true when the field was read back holding the text, false on a physical iPhone, where nothing can read it back.
137561
+ Fails with FILL_NO_FOCUSED_FIELD when nothing editable has focus, FILL_NOT_VERIFIED when the field does not read back the text, FILL_UNSUPPORTED_FIELD for a field that cannot take the text (a date or time input, a newline in a single-line field; nothing is changed). Fails if the device's ax-service or devtools helper predates fill; update argent. Not supported on TV targets or Vega.`,
137562
+ hideFromMcp: true,
137563
+ zodSchema: zodSchema43,
137564
+ capability: capability28,
137565
+ services: () => ({}),
137566
+ execute: async (services, params, options) => {
137567
+ const { text, secrets } = resolveSecretPlaceholders(params.text);
137568
+ try {
137569
+ return await dispatch(services, { udid: params.udid, text }, options);
137570
+ } catch (err) {
137571
+ throw redactSecretsFromError(err, secrets);
137572
+ }
137573
+ }
137574
+ };
137575
+ }
137576
+
137117
137577
  // ../tool-server/src/tools/await-screen-idle/index.ts
137118
137578
  init_zod();
137119
137579
  init_device_info();
@@ -137122,7 +137582,7 @@ var AWAIT_SCREEN_IDLE_TOOL_ID = "await-screen-idle";
137122
137582
  var DEFAULT_TIMEOUT_MS4 = 3e3;
137123
137583
  var DEFAULT_POLL_INTERVAL_MS2 = 200;
137124
137584
  var DEFAULT_MIN_STABLE_MS = 250;
137125
- var zodSchema43 = external_exports.object({
137585
+ var zodSchema44 = external_exports.object({
137126
137586
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
137127
137587
  timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
137128
137588
  `Max time to wait for the screen to settle before giving up (default ${DEFAULT_TIMEOUT_MS4}).`
@@ -137132,7 +137592,7 @@ var zodSchema43 = external_exports.object({
137132
137592
  `The screen must hold the same content for at least this long to count as settled (default ${DEFAULT_MIN_STABLE_MS}).`
137133
137593
  )
137134
137594
  }).strict();
137135
- var capability28 = {
137595
+ var capability29 = {
137136
137596
  apple: { simulator: true, device: true },
137137
137597
  appleRemote: { simulator: true },
137138
137598
  android: { emulator: true, device: true, unknown: true },
@@ -137175,12 +137635,12 @@ function createAwaitScreenIdleTool(registry2) {
137175
137635
 
137176
137636
  Polls the same accessibility / DOM tree as \`describe\` every pollIntervalMs (default ${DEFAULT_POLL_INTERVAL_MS2}ms) until it
137177
137637
  has content and that content holds identical for minStableMs (default ${DEFAULT_MIN_STABLE_MS}ms), or timeoutMs (default
137178
- ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls } \u2014 settled=false means the screen never went
137638
+ ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls }; settled=false means the screen never went
137179
137639
  still before the timeout. Use after a launch/navigation to wait for the UI to render before screenshotting or tapping.`,
137180
137640
  searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
137181
137641
  longRunning: true,
137182
- zodSchema: zodSchema43,
137183
- capability: capability28,
137642
+ zodSchema: zodSchema44,
137643
+ capability: capability29,
137184
137644
  services: (params) => {
137185
137645
  const device = resolveDevice(params.udid);
137186
137646
  if (device.platform === "chromium") {
@@ -137190,7 +137650,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
137190
137650
  },
137191
137651
  async execute(services, params, ctx) {
137192
137652
  const device = resolveDevice(params.udid);
137193
- assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability28, device);
137653
+ assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability29, device);
137194
137654
  if (device.platform === "ios") await ensureDeps(iosRequires);
137195
137655
  else if (device.platform === "ios-remote") await ensureDeps(["sim-remote"]);
137196
137656
  else if (device.platform === "android") await ensureDeps(androidRequires);
@@ -137277,10 +137737,10 @@ function bootstrapFailureMessage(bootstrap) {
137277
137737
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
137278
137738
  var NO_DEVTOOLS_HOOK_ERROR = "React DevTools hook (__REACT_DEVTOOLS_GLOBAL_HOOK__) is not present in this app's JavaScript runtime. React profiling requires a development build with React DevTools enabled. Likely causes: (1) the app is a release/production build \u2014 DevTools is stripped to reduce bundle size; (2) you connected to the wrong JS runtime; (3) this isn't a React (Native) app. Fix: rebuild in debug/dev mode (e.g. `npx react-native run-ios` without --configuration Release; for Expo, run a dev client). Once the app is running with DevTools attached, call react-profiler-start again.";
137279
137739
  var NO_RENDERERS_ATTACHED_ERROR = "React DevTools hook is present but no React renderer has registered yet. The hook is loaded but no fiber renderer has attached \u2014 typically because the app has not committed its first render, or the DevTools backend has not been bootstrapped on a bridgeless React Native dev build. Fix: ensure the app has rendered (interact with it once, then retry); if it stays empty, call react-profiler-start first \u2014 it will attempt to attach the DevTools backend automatically.";
137280
- var zodSchema44 = external_exports.object({
137740
+ var zodSchema45 = external_exports.object({
137281
137741
  port: metroPortField,
137282
137742
  device_id: external_exports.string().describe(
137283
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
137743
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
137284
137744
  ),
137285
137745
  sample_interval_us: external_exports.coerce.number().int().positive().default(100).describe("CPU sampling interval in microseconds (default 100)"),
137286
137746
  force: external_exports.boolean().default(false).describe(
@@ -137305,11 +137765,11 @@ function createReactProfilerStartTool(registry2) {
137305
137765
  description: `Start CPU profiling + React commit capture on the connected Hermes runtime.
137306
137766
  Delegates React commit capture to the in-app React DevTools backend (ri.startProfiling).
137307
137767
  If another tool-server already owns the session, returns { already_running: true, owner, stale, how_to_reclaim } without clobbering their data. Pass { force: true } to reclaim a fresh owner's session, but BEFORE OVERTAKING - ask the user for approval first, see relevant skill for guidance.
137308
- Before calling this, ask the user if they also want native profiling (native-profiler-start) \u2014 recommend running both in parallel for a complete picture.
137768
+ Before calling this, ask the user if they also want native profiling (native-profiler-start), and recommend running both in parallel for a complete picture.
137309
137769
  After starting, ask the user to perform the interaction to profile, then call react-profiler-stop.
137310
137770
  Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture } on success, or the already_running payload described above.
137311
137771
  Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
137312
- zodSchema: zodSchema44,
137772
+ zodSchema: zodSchema45,
137313
137773
  capability: RN_ONLY_TOOL_CAPABILITY,
137314
137774
  services: () => ({}),
137315
137775
  async execute(_services, params) {
@@ -137580,10 +138040,10 @@ async function readCommitTree(path53) {
137580
138040
  }
137581
138041
 
137582
138042
  // ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
137583
- var zodSchema45 = external_exports.object({
138043
+ var zodSchema46 = external_exports.object({
137584
138044
  port: metroPortField,
137585
138045
  device_id: external_exports.string().describe(
137586
- "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
138046
+ "Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
137587
138047
  )
137588
138048
  });
137589
138049
  function normalizeChangeDescription(raw) {
@@ -137667,9 +138127,9 @@ Reads commit data from the in-app React DevTools backend.
137667
138127
  Stores results in the ReactProfilerSession for later use by react-profiler-analyze or react-profiler-cpu-summary.
137668
138128
  Call react-profiler-start first, then exercise the app, then call this.
137669
138129
  Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices } summarizing the session.
137670
- 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 } \u2014 these quantify how much work is not accounted for in the per-component breakdown (the per-commit duration itself remains correct).
138130
+ When any commit had fibers whose display name could not be resolved at stop time (typically transient components like modals/tooltips/animations that unmounted before stop), the response also includes { unattributed_ms, unattributed_fiber_count, unattributed_commit_count }. These quantify how much work is not accounted for in the per-component breakdown (the per-commit duration itself remains correct).
137671
138131
  Fails if no active profiling session exists or the CDP connection was lost during recording.`,
137672
- zodSchema: zodSchema45,
138132
+ zodSchema: zodSchema46,
137673
138133
  capability: RN_ONLY_TOOL_CAPABILITY,
137674
138134
  services: () => ({}),
137675
138135
  async execute(_services, params) {
@@ -137894,7 +138354,7 @@ Fails if no active profiling session exists or the CDP connection was lost durin
137894
138354
 
137895
138355
  // ../tool-server/src/tools/profiler/react/react-profiler-status.ts
137896
138356
  init_zod();
137897
- var zodSchema46 = external_exports.object({
138357
+ var zodSchema47 = external_exports.object({
137898
138358
  port: metroPortField,
137899
138359
  device_id: external_exports.string().describe(
137900
138360
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -137908,8 +138368,8 @@ function createReactProfilerStatusTool(registry2) {
137908
138368
  completedMsg: ({ result }) => result.is_running ? "React profiler is running" : "React profiler is stopped",
137909
138369
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to check React profiler: ${failureSignal2.error_code}`
137910
138370
  },
137911
- 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 \u2014 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,
138371
+ description: `Check the state of the React profiler session without side effects. Use after an interruption (debugger disconnect, unexpected error, agent pause) to decide whether to continue with react-profiler-stop, start a new session, or reconnect the debugger. Ownership is verified server-side against this tool-server's in-memory session, so no token-threading is required. Returns { session_status, is_running, current_owner, \u2026 }. If this tool-server process restarted after react-profiler-start, status will report 'taken_over'; use react-profiler-start { force: true } to reclaim.`,
138372
+ zodSchema: zodSchema47,
137913
138373
  // RN-only: companion to react-profiler-start.
137914
138374
  capability: RN_ONLY_TOOL_CAPABILITY,
137915
138375
  services: () => ({}),
@@ -139523,7 +139983,7 @@ var annotationSchema = external_exports.object({
139523
139983
  ),
139524
139984
  label: external_exports.string().describe("Description of the action performed")
139525
139985
  });
139526
- var zodSchema47 = external_exports.object({
139986
+ var zodSchema48 = external_exports.object({
139527
139987
  port: metroPortField,
139528
139988
  device_id: external_exports.string().describe(
139529
139989
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139556,7 +140016,7 @@ where tapTimestampMs is the timestampMs returned by the tap/swipe tool and start
139556
140016
  is returned by react-profiler-start.
139557
140017
  Use when the profiling session is complete and you need to interpret the collected data.
139558
140018
  Fails if react-profiler-stop has not been called or no profiling data is stored.`,
139559
- zodSchema: zodSchema47,
140019
+ zodSchema: zodSchema48,
139560
140020
  // RN-only: reads commit data captured via the React DevTools backend, which
139561
140021
  // Chromium does not have.
139562
140022
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -139693,7 +140153,7 @@ Fails if react-profiler-stop has not been called or no profiling data is stored.
139693
140153
  // ../tool-server/src/tools/profiler/react/react-profiler-component-source.ts
139694
140154
  init_zod();
139695
140155
  var import_fs6 = require("fs");
139696
- var zodSchema48 = external_exports.object({
140156
+ var zodSchema49 = external_exports.object({
139697
140157
  component_name: external_exports.string().describe("Name of the React component to look up"),
139698
140158
  project_root: external_exports.string().describe("Absolute path to the RN project root")
139699
140159
  });
@@ -139710,8 +140170,8 @@ var reactProfilerComponentSourceTool = {
139710
140170
  description: `Find a React component's source via tree-sitter AST lookup: returns file path, line number, memoization status (isMemoized, hasUseCallback, hasUseMemo), and 50 lines of source for a named React component.
139711
140171
  Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
139712
140172
  Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
139713
- 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) \u2014 check it before assuming the returned file is the one you meant.`,
139714
- zodSchema: zodSchema48,
140173
+ When several files define a component with the same name (e.g. platform variants like List.tsx and List.web.tsx), returns the primary match and lists the rest under otherMatches[] (file/line/col). Check it before assuming the returned file is the one you meant.`,
140174
+ zodSchema: zodSchema49,
139715
140175
  // Declared so the tool catalogue groups this with the other react-profiler-*
139716
140176
  // tools; the HTTP gate itself is a no-op here, as there is no device arg to
139717
140177
  // inspect.
@@ -139767,7 +140227,7 @@ When several files define a component with the same name (e.g. platform variants
139767
140227
  // ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
139768
140228
  init_zod();
139769
140229
  init_src2();
139770
- var zodSchema49 = external_exports.object({
140230
+ var zodSchema50 = external_exports.object({
139771
140231
  port: metroPortField,
139772
140232
  device_id: external_exports.string().describe(
139773
140233
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139843,13 +140303,13 @@ var reactProfilerCpuSummaryTool = {
139843
140303
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to summarize React CPU profile: ${failureSignal2.error_code}`
139844
140304
  },
139845
140305
  description: `Return a raw Hermes CPU flamegraph summary (top hotspot functions by self-time).
139846
- FOR DEDICATED CPU INVESTIGATION ONLY \u2014 do NOT call this as part of a normal profiling session.
140306
+ FOR DEDICATED CPU INVESTIGATION ONLY: do NOT call this as part of a normal profiling session.
139847
140307
  Use react-profiler-analyze instead; it covers all React rendering performance analysis.
139848
140308
  Use when you specifically need to investigate JS CPU hotspots that are NOT tied to React rendering (e.g. regex slowness, cryptography, heavy computations).
139849
140309
  Call react-profiler-stop first. Reads directly from the stored cpuProfile.
139850
140310
  Returns a markdown table of the top hotspot functions with self-time, total-time, and location.
139851
140311
  Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
139852
- zodSchema: zodSchema49,
140312
+ zodSchema: zodSchema50,
139853
140313
  // RN-only: reads a Hermes CPU profile; Chromium's V8 sample format differs.
139854
140314
  capability: RN_ONLY_TOOL_CAPABILITY,
139855
140315
  services: () => ({}),
@@ -139945,7 +140405,7 @@ function renderMarkdownTable2(entries) {
139945
140405
  );
139946
140406
  return [header, sep5, ...rows].join("\n");
139947
140407
  }
139948
- var zodSchema50 = external_exports.object({
140408
+ var zodSchema51 = external_exports.object({
139949
140409
  port: metroPortField,
139950
140410
  device_id: external_exports.string().describe(
139951
140411
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139960,10 +140420,10 @@ var reactProfilerRendersTool = {
139960
140420
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read React render activity: ${failureSignal2.error_code}`
139961
140421
  },
139962
140422
  description: `Scan the live React fiber tree to collect component render counts and durations.
139963
- Returns a markdown table of the top re-rendering components. No profiling session required \u2014 works on a live connected app.
140423
+ Returns a markdown table of the top re-rendering components. No profiling session required; works on a live connected app.
139964
140424
  Use when you want a quick snapshot of render counts without a full profiling session.
139965
140425
  Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
139966
- zodSchema: zodSchema50,
140426
+ zodSchema: zodSchema51,
139967
140427
  // RN-only: queries the React DevTools backend hook on the live runtime.
139968
140428
  capability: RN_ONLY_TOOL_CAPABILITY,
139969
140429
  services: (params) => ({
@@ -140120,7 +140580,7 @@ function buildFiberTreeScript(maxDepth, filter) {
140120
140580
  }
140121
140581
  })()`;
140122
140582
  }
140123
- var zodSchema51 = external_exports.object({
140583
+ var zodSchema52 = external_exports.object({
140124
140584
  port: metroPortField,
140125
140585
  device_id: external_exports.string().describe(
140126
140586
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -140139,7 +140599,7 @@ var reactProfilerFiberTreeTool = {
140139
140599
  Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component).
140140
140600
  Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
140141
140601
  Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
140142
- zodSchema: zodSchema51,
140602
+ zodSchema: zodSchema52,
140143
140603
  // RN-only: walks the fiber tree via the React DevTools backend hook.
140144
140604
  capability: RN_ONLY_TOOL_CAPABILITY,
140145
140605
  services: (params) => ({
@@ -143937,7 +144397,7 @@ function metroDeviceIdParam(description) {
143937
144397
  }
143938
144398
 
143939
144399
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
143940
- var zodSchema52 = external_exports.object({
144400
+ var zodSchema53 = external_exports.object({
143941
144401
  device_id: metroDeviceIdParam(
143942
144402
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143943
144403
  ),
@@ -143948,10 +144408,10 @@ var zodSchema52 = external_exports.object({
143948
144408
  "iOS-only: path to an Instruments .tracetemplate file (defaults to bundled Argent template). Ignored on Android."
143949
144409
  ),
143950
144410
  malloc_stack_logging: external_exports.boolean().optional().describe(
143951
- "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 \u2014 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 \u2014 e.g. exported globally for the normal capture path \u2014 also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android."
144411
+ "iOS-only. When true, cold-launches the app under the profiler with Malloc Stack Logging enabled so memory leaks carry an allocation backtrace (responsible frame + library). Without it, leaks are still detected but unattributable: Instruments reports '<Call stack limit reached>'. Trade-offs: this RESTARTS the app (current state is lost), adds memory/CPU overhead, and makes the app noticeably slow to launch (every startup allocation records a backtrace), so leave it off for pure CPU/hang profiling. Requires a non-degraded Xcode: on Xcode 26.4 and later the cold-launch path is broken, so the call is rejected up front (re-run without the flag, or set ARGENT_IOS_CAPTURE=device to override if the device path works on your host). ARGENT_IOS_CAPTURE=all-processes (e.g. exported globally for the normal capture path) also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android."
143952
144412
  )
143953
144413
  });
143954
- var capability29 = {
144414
+ var capability30 = {
143955
144415
  apple: { simulator: true },
143956
144416
  android: { emulator: true, device: true, unknown: true }
143957
144417
  };
@@ -143962,21 +144422,21 @@ var nativeProfilerStartTool = {
143962
144422
  completedMsg: () => "Started native profiler",
143963
144423
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start native profiler: ${failureSignal2.error_code}`
143964
144424
  },
143965
- capability: capability29,
144425
+ capability: capability30,
143966
144426
  description: `Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal).
143967
144427
  Auto-detects the running app process unless app_process is explicitly provided.
143968
144428
  After starting, let the user interact with the app, then call native-profiler-stop.
143969
144429
  Use when you want to capture native CPU, hang, and memory data for a running app.
143970
144430
  Returns { status, pid, traceFile } confirming the recording has started.
143971
144431
  Fails if no app is running on the device, or the profiler cannot attach to the process.`,
143972
- zodSchema: zodSchema52,
144432
+ zodSchema: zodSchema53,
143973
144433
  services: (params) => ({
143974
144434
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
143975
144435
  }),
143976
144436
  async execute(services, params) {
143977
144437
  const api = services.session;
143978
144438
  const device = resolveDevice(params.device_id);
143979
- assertSupported("native-profiler-start", capability29, device);
144439
+ assertSupported("native-profiler-start", capability30, device);
143980
144440
  if (api.platform === "ios") {
143981
144441
  await ensureDeps(["xcrun"]);
143982
144442
  return startNativeProfilerIos(api, params);
@@ -143989,12 +144449,12 @@ Fails if no app is running on the device, or the profiler cannot attach to the p
143989
144449
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-stop.ts
143990
144450
  init_zod();
143991
144451
  init_device_info();
143992
- var zodSchema53 = external_exports.object({
144452
+ var zodSchema54 = external_exports.object({
143993
144453
  device_id: metroDeviceIdParam(
143994
144454
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143995
144455
  )
143996
144456
  });
143997
- var capability30 = {
144457
+ var capability31 = {
143998
144458
  apple: { simulator: true },
143999
144459
  android: { emulator: true, device: true, unknown: true }
144000
144460
  };
@@ -144022,7 +144482,7 @@ var nativeProfilerStopTool = {
144022
144482
  completedMsg: ({ result }) => `Saved native profile ${result.traceFile.filename}`,
144023
144483
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop native profiler: ${failureSignal2.error_code}`
144024
144484
  },
144025
- capability: capability30,
144485
+ capability: capability31,
144026
144486
  // Packaging plus the export passes routinely exceed the 30s MCP fetch timeout.
144027
144487
  longRunning: true,
144028
144488
  description: `Stop native profiling and export trace data.
@@ -144032,14 +144492,14 @@ Call native-profiler-start first.
144032
144492
  Use when the user has finished the interaction to profile and you need to export the trace.
144033
144493
  Returns { traceFile, exportedFiles, exportDiagnostics? }; traceFile is the raw trace bundle and exportedFiles the exports, all downloadable artifacts materialized to local paths.
144034
144494
  Fails if no active native-profiler-start session exists for the given device_id.`,
144035
- zodSchema: zodSchema53,
144495
+ zodSchema: zodSchema54,
144036
144496
  services: (params) => ({
144037
144497
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
144038
144498
  }),
144039
144499
  async execute(services, params, ctx) {
144040
144500
  const api = services.session;
144041
144501
  const device = resolveDevice(params.device_id);
144042
- assertSupported("native-profiler-stop", capability30, device);
144502
+ assertSupported("native-profiler-stop", capability31, device);
144043
144503
  if (api.platform === "ios") {
144044
144504
  await ensureDeps(["xcrun"]);
144045
144505
  const ios = await stopNativeProfilerIos(api);
@@ -144067,12 +144527,12 @@ Fails if no active native-profiler-start session exists for the given device_id.
144067
144527
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-analyze.ts
144068
144528
  init_zod();
144069
144529
  init_device_info();
144070
- var zodSchema54 = external_exports.object({
144530
+ var zodSchema55 = external_exports.object({
144071
144531
  device_id: metroDeviceIdParam(
144072
144532
  "Target device id from `list-devices` (iOS UDID or Android serial)."
144073
144533
  )
144074
144534
  });
144075
- var capability31 = {
144535
+ var capability32 = {
144076
144536
  apple: { simulator: true },
144077
144537
  android: { emulator: true, device: true, unknown: true }
144078
144538
  };
@@ -144083,7 +144543,7 @@ var nativeProfilerAnalyzeTool = {
144083
144543
  completedMsg: () => "Analyzed native profile",
144084
144544
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to analyze native profile: ${failureSignal2.error_code}`
144085
144545
  },
144086
- capability: capability31,
144546
+ capability: capability32,
144087
144547
  // Parsing a trace from a recording up to RECORDING_CAP_MS long routinely exceeds
144088
144548
  // the 30s MCP fetch timeout, and an aborted call is replayed, not cancelled.
144089
144549
  longRunning: true,
@@ -144096,14 +144556,14 @@ profiler-stack-query for hang stacks, CPU context, leak details) or implement fi
144096
144556
  Call native-profiler-stop first to export the trace data.
144097
144557
  Use when you need to interpret a completed native profiling recording.
144098
144558
  Fails if native-profiler-stop has not been called first to export trace data.`,
144099
- zodSchema: zodSchema54,
144559
+ zodSchema: zodSchema55,
144100
144560
  services: (params) => ({
144101
144561
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
144102
144562
  }),
144103
144563
  async execute(services, params, ctx) {
144104
144564
  const api = services.session;
144105
144565
  const device = resolveDevice(params.device_id);
144106
- assertSupported("native-profiler-analyze", capability31, device);
144566
+ assertSupported("native-profiler-analyze", capability32, device);
144107
144567
  let result;
144108
144568
  if (api.platform === "ios") {
144109
144569
  await ensureDeps(["xcrun"]);
@@ -145166,7 +145626,7 @@ var DEFAULT_TIME_LIMIT_SECONDS = 180;
145166
145626
  var MAX_TIME_LIMIT_SECONDS = 600;
145167
145627
  var POINTER_TRAIL_LENGTH = 8;
145168
145628
  var POINTER_REQUEST_TIMEOUT_MS = 2e3;
145169
- var zodSchema55 = external_exports.object({
145629
+ var zodSchema56 = external_exports.object({
145170
145630
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial)."),
145171
145631
  timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(
145172
145632
  `Auto-stop cap in seconds (default ${DEFAULT_TIME_LIMIT_SECONDS}, max ${MAX_TIME_LIMIT_SECONDS}). Set it to slightly more than the interaction you plan to capture.`
@@ -145178,7 +145638,7 @@ var zodSchema55 = external_exports.object({
145178
145638
  "Default true. Draw simulator-server's touch visualizer into the recording: a pulse marks each tap, a comet trail follows swipes and drags, and paired markers show two-finger pinch/rotate, so the video makes clear where every interaction landed. Set false to record the raw screen with no overlay."
145179
145639
  )
145180
145640
  });
145181
- var capability32 = {
145641
+ var capability33 = {
145182
145642
  apple: { simulator: true },
145183
145643
  android: { emulator: true, device: true, unknown: true }
145184
145644
  };
@@ -145190,16 +145650,16 @@ function createScreenRecordingStartTool(registry2) {
145190
145650
  completedMsg: () => "Started screen recording",
145191
145651
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start screen recording: ${failureSignal2.error_code}`
145192
145652
  },
145193
- capability: capability32,
145653
+ capability: capability33,
145194
145654
  description: `Start recording the device screen to a video file (h264 mp4, 30fps at the device's native resolution).
145195
145655
  By default stretches where the screen does not change are trimmed out (see trimStatic), so a long session with only brief activity comes back as a short clip instead of minutes of dead air.
145196
145656
  By default every tap, swipe, drag, pinch and rotate is drawn into the video as an on-screen touch marker (see showTouches), so the recording shows where each interaction landed.
145197
- The recording keeps running across other tool calls (every result carries a reminder) until \`screen-recording-stop\` is called or timeLimitSeconds elapses \u2014 immediately after starting, set yourself a reminder/wakeup for the expected end of the recording so it is never left running.
145198
- Use when the user wants a video of an interaction, animation, or app behavior \u2014 for a single still frame use \`screenshot\` instead.
145199
- Returns { status: "recording", timeLimitSeconds, outputFile } \u2014 the video is retrieved later by \`screen-recording-stop\`, not by reading outputFile directly.
145657
+ The recording keeps running across other tool calls (every result carries a reminder) until \`screen-recording-stop\` is called or timeLimitSeconds elapses. Immediately after starting, set yourself a reminder/wakeup for the expected end of the recording so it is never left running.
145658
+ Use when the user wants a video of an interaction, animation, or app behavior; for a single still frame use \`screenshot\` instead.
145659
+ Returns { status: "recording", timeLimitSeconds, outputFile }. The video is retrieved later by \`screen-recording-stop\`, not by reading outputFile directly.
145200
145660
  Fails if a recording is already running on the device, the device is not booted, ffmpeg is not installed, or the platform cannot be recorded (tvOS, Chromium, Vega and remote simulators are unsupported).`,
145201
145661
  searchHint: "record video screen capture movie mp4 start filming screencast",
145202
- zodSchema: zodSchema55,
145662
+ zodSchema: zodSchema56,
145203
145663
  // Resolved inside execute, not declared eagerly: a tvOS udid classifies as
145204
145664
  // iOS by shape, so an eager service would spawn simulator-server for a
145205
145665
  // device it cannot drive and hang on its ready timeout (as in `screenshot`).
@@ -145209,7 +145669,7 @@ Fails if a recording is already running on the device, the device is not booted,
145209
145669
  async execute(services, params) {
145210
145670
  const api = services.session;
145211
145671
  const device = resolveDevice(params.udid);
145212
- assertSupported("screen-recording-start", capability32, device);
145672
+ assertSupported("screen-recording-start", capability33, device);
145213
145673
  if (device.platform === "ios" && await isTvOsSimulator(params.udid)) {
145214
145674
  throw new FailureError(
145215
145675
  `Screen recording is not supported on tvOS simulators (device ${params.udid}).`,
@@ -145298,11 +145758,11 @@ function makePointerControl(simulator) {
145298
145758
  var import_node_path22 = require("node:path");
145299
145759
  init_zod();
145300
145760
  init_device_info();
145301
- var zodSchema56 = external_exports.object({
145761
+ var zodSchema57 = external_exports.object({
145302
145762
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial).")
145303
145763
  });
145304
145764
  var RECORDINGS_DIR = ".argent/recordings";
145305
- var capability33 = {
145765
+ var capability34 = {
145306
145766
  apple: { simulator: true },
145307
145767
  android: { emulator: true, device: true, unknown: true }
145308
145768
  };
@@ -145313,21 +145773,21 @@ var screenRecordingStopTool = {
145313
145773
  completedMsg: ({ result }) => `Saved screen recording ${result.video.filename}`,
145314
145774
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop screen recording: ${failureSignal2.error_code}`
145315
145775
  },
145316
- capability: capability33,
145776
+ capability: capability34,
145317
145777
  description: `Stop the screen recording started by \`screen-recording-start\` and retrieve the video: frame capture ends and ffmpeg finalizes the mp4.
145318
- Also retrieves the video when the recording already ended on its own (time limit reached, capture process died) \u2014 call it even after the cap fired.
145778
+ Also retrieves the video when the recording already ended on its own (time limit reached, capture process died); call it even after the cap fired.
145319
145779
  Use when the interaction being captured is finished, or a tool-result note reminds you a recording is still running.
145320
145780
  Returns { video, durationMs, wallClockMs?, trimmedMs?, panelSwitches?, warning? }; video is a downloadable artifact materialized to a local path. When static-frame trimming removed dead air, durationMs is the trimmed video length and wallClockMs/trimmedMs report the real duration and how much was cut. On a foldable simulator, the recording follows the panel that shows the UI. panelSwitches gives the number of panel changes. The video keeps the size of the first panel. warning is set when argent could not find that panel during the recording.
145321
145781
  Fails if no recording (running or finished-but-unretrieved) exists for the given udid.`,
145322
145782
  searchHint: "stop end finish screen recording video capture save retrieve",
145323
- zodSchema: zodSchema56,
145783
+ zodSchema: zodSchema57,
145324
145784
  services: (params) => ({
145325
145785
  session: screenRecordingSessionRef(resolveDevice(params.udid))
145326
145786
  }),
145327
145787
  async execute(services, params, ctx) {
145328
145788
  const api = services.session;
145329
145789
  const device = resolveDevice(params.udid);
145330
- assertSupported("screen-recording-stop", capability33, device);
145790
+ assertSupported("screen-recording-stop", capability34, device);
145331
145791
  const stopped = await stopCapture(api);
145332
145792
  const artifacts = requireArtifacts(ctx);
145333
145793
  const video = await artifacts.register({
@@ -145353,13 +145813,13 @@ init_src2();
145353
145813
  var import_fs18 = require("fs");
145354
145814
  var timeWindowSchema = external_exports.object({
145355
145815
  start: external_exports.coerce.number().describe(
145356
- "Start of window in ms since profiling started \u2014 the same clock profiler-commit-query prints"
145816
+ "Start of window in ms since profiling started, the same clock profiler-commit-query prints"
145357
145817
  ),
145358
145818
  end: external_exports.coerce.number().describe(
145359
- "End of window in ms since profiling started \u2014 the same clock profiler-commit-query prints"
145819
+ "End of window in ms since profiling started, the same clock profiler-commit-query prints"
145360
145820
  )
145361
145821
  });
145362
- var zodSchema57 = external_exports.object({
145822
+ var zodSchema58 = external_exports.object({
145363
145823
  port: metroPortField,
145364
145824
  device_id: metroDeviceIdParam(
145365
145825
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -145368,7 +145828,7 @@ var zodSchema57 = external_exports.object({
145368
145828
  "Query mode: top_functions (global hotspots), time_window (CPU in a time range), call_tree (callers/callees of a function), component_cpu (CPU during a component's commits)"
145369
145829
  ),
145370
145830
  time_window_ms: timeWindowSchema.optional().describe(
145371
- "Time window filter for time_window mode (ms since profiling started \u2014 the same clock profiler-commit-query prints)"
145831
+ "Time window filter for time_window mode (ms since profiling started, the same clock profiler-commit-query prints)"
145372
145832
  ),
145373
145833
  component_name: external_exports.string().optional().describe("Component name for component_cpu mode"),
145374
145834
  function_name: external_exports.string().optional().describe("Function name for call_tree mode"),
@@ -145647,8 +146107,8 @@ Every table states how many samples it covers and how much of that was idle.
145647
146107
  - component_cpu: For a given component_name, aggregate CPU activity across all its commits.
145648
146108
  Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
145649
146109
  Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
145650
- Fails if no CPU profile is stored \u2014 run react-profiler-stop first.`,
145651
- zodSchema: zodSchema57,
146110
+ Fails if no CPU profile is stored; run react-profiler-stop first.`,
146111
+ zodSchema: zodSchema58,
145652
146112
  // RN-only: reads Hermes-format CPU profiles; Chromium's V8 sample format differs.
145653
146113
  capability: RN_ONLY_TOOL_CAPABILITY,
145654
146114
  services: () => ({}),
@@ -145728,13 +146188,13 @@ init_zod();
145728
146188
  init_src2();
145729
146189
  var timeRangeSchema = external_exports.object({
145730
146190
  start: external_exports.coerce.number().describe(
145731
- "Start of range in ms since profiling started \u2014 the same clock profiler-commit-query prints"
146191
+ "Start of range in ms since profiling started, the same clock profiler-commit-query prints"
145732
146192
  ),
145733
146193
  end: external_exports.coerce.number().describe(
145734
- "End of range in ms since profiling started \u2014 the same clock profiler-commit-query prints"
146194
+ "End of range in ms since profiling started, the same clock profiler-commit-query prints"
145735
146195
  )
145736
146196
  });
145737
- var zodSchema58 = external_exports.object({
146197
+ var zodSchema59 = external_exports.object({
145738
146198
  port: metroPortField,
145739
146199
  device_id: metroDeviceIdParam(
145740
146200
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -145746,7 +146206,7 @@ var zodSchema58 = external_exports.object({
145746
146206
  time_range_ms: timeRangeSchema.optional().describe("Time range filter for by_time_range mode"),
145747
146207
  commit_index: external_exports.coerce.number().int().optional().describe("Commit index for by_index and cascade_tree modes"),
145748
146208
  top_n: external_exports.coerce.number().int().positive().optional().describe(
145749
- "Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components \u2014 a small cap there can show less than the analyze report it is meant to expand on."
146209
+ "Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components, and a small cap there can show less than the analyze report it is meant to expand on."
145750
146210
  )
145751
146211
  });
145752
146212
  async function getCommitTree(port, deviceId) {
@@ -146007,7 +146467,7 @@ Modes:
146007
146467
  Use when drilling into specific components or time windows after react-profiler-analyze.
146008
146468
  Returns a markdown table or tree of commit data matching the requested mode.
146009
146469
  Fails if react-profiler-stop has not been called or no commit data is stored.`,
146010
- zodSchema: zodSchema58,
146470
+ zodSchema: zodSchema59,
146011
146471
  // Reads React commit data captured via the React DevTools backend.
146012
146472
  capability: RN_ONLY_TOOL_CAPABILITY,
146013
146473
  services: () => ({}),
@@ -146078,7 +146538,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
146078
146538
  init_zod();
146079
146539
  init_src2();
146080
146540
  init_device_info();
146081
- var zodSchema59 = external_exports.object({
146541
+ var zodSchema60 = external_exports.object({
146082
146542
  device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
146083
146543
  mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe(
146084
146544
  "Query mode: hang_stacks (full CPU context during a hang), function_callers (who calls a native function), thread_breakdown (CPU split by thread), leak_stacks (leak details by object type)"
@@ -146396,7 +146856,7 @@ Modes:
146396
146856
  Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze.
146397
146857
  Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode.
146398
146858
  Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.`,
146399
- zodSchema: zodSchema59,
146859
+ zodSchema: zodSchema60,
146400
146860
  // No chromium entry: it has no native trace capture.
146401
146861
  capability: {
146402
146862
  apple: { simulator: true },
@@ -146466,7 +146926,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
146466
146926
  }
146467
146927
 
146468
146928
  // ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
146469
- var zodSchema60 = external_exports.object({
146929
+ var zodSchema61 = external_exports.object({
146470
146930
  port: metroPortField,
146471
146931
  device_id: metroDeviceIdParam("iOS Simulator/device UDID or Android serial")
146472
146932
  });
@@ -146483,7 +146943,7 @@ Requires both react-profiler-analyze and native-profiler-analyze to have been ca
146483
146943
  Call this tool when both profilers were run in parallel on the same session.
146484
146944
  Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
146485
146945
  Fails if either react-profiler-analyze or native-profiler-analyze has not been called first.`,
146486
- zodSchema: zodSchema60,
146946
+ zodSchema: zodSchema61,
146487
146947
  // iOS reads xctrace output; Android re-queries the Perfetto .pftrace via
146488
146948
  // loadAndroidCombinedData. Chromium has no native trace capture.
146489
146949
  capability: {
@@ -146807,7 +147267,7 @@ function assertSafeSessionId(sessionId) {
146807
147267
  );
146808
147268
  }
146809
147269
  }
146810
- var zodSchema61 = external_exports.object({
147270
+ var zodSchema62 = external_exports.object({
146811
147271
  mode: external_exports.enum(["list", "load_react", "load_native"]).describe(
146812
147272
  "list: show available sessions on disk. load_react: load a React profiler session into memory for query tools. load_native: re-parse native profiler XML files (xctrace on iOS) into memory for query tools."
146813
147273
  ),
@@ -147168,7 +147628,7 @@ Modes:
147168
147628
  For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar.
147169
147629
  Returns a summary of the loaded session or a session list for the list mode.
147170
147630
  Fails if the session_id is not found or required XML files are missing from disk.`,
147171
- zodSchema: zodSchema61,
147631
+ zodSchema: zodSchema62,
147172
147632
  // The Hermes, xctrace and perfetto formats this loads have no Chromium
147173
147633
  // equivalent; the gate fails at the call site, not inside the trace parser.
147174
147634
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -147297,7 +147757,7 @@ function unnameableSessionUrns(urns) {
147297
147757
  }
147298
147758
 
147299
147759
  // ../tool-server/src/tools/simulator/stop-simulator-server.ts
147300
- var zodSchema62 = external_exports.object({
147760
+ var zodSchema63 = external_exports.object({
147301
147761
  udid: external_exports.string().describe(
147302
147762
  "Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
147303
147763
  )
@@ -147311,7 +147771,7 @@ function createStopSimulatorServerTool(registry2) {
147311
147771
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop simulator server for ${params.udid}: ${failureSignal2.error_code}`
147312
147772
  },
147313
147773
  description: `Stop the transport session for a specific device (iOS simulator / Android: simulator-server process; physical iOS: the on-device runner; Chromium: CDP WebSocket) and free its resources; on a TV target it also reaps that device's TV-control daemons. Use when you are done interacting with one device but want to keep others running, or to restart a wedged transport. On iOS / Android / TV it deliberately leaves this device's native-devtools, accessibility, profiler and debugger services running - to drain those as well, use stop-all-simulator-servers with \`devices\`. On CHROMIUM that does not hold: the JS-runtime debugger declares the CDP session as a dependency, so stopping the transport cascades to it and its captured console history goes with it - reconnect with debugger-connect afterwards. Returns { stopped, udid }. Fails silently if no session is open for the given id.`,
147314
- zodSchema: zodSchema62,
147774
+ zodSchema: zodSchema63,
147315
147775
  services: () => ({}),
147316
147776
  async execute(_services, params) {
147317
147777
  const udid = params.udid;
@@ -147342,9 +147802,9 @@ function createStopSimulatorServerTool(registry2) {
147342
147802
  init_zod();
147343
147803
  init_src2();
147344
147804
  init_external_devices();
147345
- var zodSchema63 = external_exports.object({
147805
+ var zodSchema64 = external_exports.object({
147346
147806
  devices: external_exports.array(external_exports.string()).optional().describe(
147347
- "Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to \u2014 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."
147807
+ "Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to. Pass the devices THIS session actually used. Omit only for a deliberate machine-wide cleanup: one tool-server serves every agent using this argent install, so an unscoped stop also kills devices another agent is mid-session on."
147348
147808
  )
147349
147809
  }).strict();
147350
147810
  function createStopAllSimulatorServersTool(registry2) {
@@ -147378,10 +147838,10 @@ function createStopAllSimulatorServersTool(registry2) {
147378
147838
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop simulator servers: ${failureSignal2.error_code}`
147379
147839
  },
147380
147840
  description: `Stop the services a device owns - simulator-server processes (iOS + Android), native devtools, the iOS accessibility service, TV-control daemons, Chromium CDP sessions, screen recordings, native profiler sessions, and JS-runtime debugger sessions along with the network inspectors and React profiler sessions that ride on them - freeing their spawned processes, sockets and ports. Call this when your session ends or the user says they are done.
147381
- PASS \`devices\` with the device ids this session used \u2014 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.
147841
+ PASS \`devices\` with the device ids this session used: one tool-server serves every agent, subagent and CLI call using this argent install, and an unscoped call tears down THEIR devices too (a mid-recording devtools teardown degrades another agent's flow to brittle coordinate taps; that agent is warned, but its recorded steps are already the worse kind). Omit \`devices\` only when a machine-wide cleanup is what you actually want. Passing an EMPTY array scopes to nothing and stops nothing - it is not a way to ask for the machine-wide sweep.
147382
147842
  A JS-runtime debugger session is keyed by the id you called \`debugger-connect\` with. On a Metro serving two or more devices that id is not a udid or serial - connect refuses those and tells you to re-target with the \`logicalDeviceId\` it returns - so a scope built from \`list-devices\` ids cannot reach that session. Pass any such \`logicalDeviceId\` in \`devices\` ALONGSIDE the device id; { left_running } names the ones you missed.
147383
- 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 \u2014 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,
147843
+ Returns { stopped } - the URNs of the services that were actually live and got shut down; an ERROR node is disposed too but never appears there, so an empty \`stopped\` only means nothing was still running. { unmatched } lists supplied ids that own no service here, so a mistyped id - or a device NAME passed where an id was expected - does not read as a clean machine. It is NOT proof the id is wrong: a Vega device is driven through CLI/adb shell-outs, so one you only booted and drove with the remote registers no service and always lands here, as does a real device of any platform this session never started anything on. Present ONLY when \`devices\` was supplied AND at least one id matched nothing - absent on an unscoped call and when every id matched. Stopping the same device twice does not report it unmatched: ownership counts regardless of service state. { left_running } lists the URNs of live debugger sessions (and the network inspectors / React profiler sessions riding on them) whose id no device scope can name - re-call with the id after each URN's \`<namespace>:<port>:\` prefix to reap them. { aborted: true } means the caller cancelled the request part-way, so the rest of the machine was left untouched and neither of the other two fields was computed. Past the schema - which rejects an unknown key outright, so the \`udids\` slip is an error rather than a silent machine-wide sweep - the call always succeeds; reaping nothing is a result, not a failure.`,
147844
+ zodSchema: zodSchema64,
147385
147845
  services: () => ({}),
147386
147846
  async execute(_services, params, ctx) {
147387
147847
  const devices = params.devices;
@@ -147461,7 +147921,7 @@ function listeningPids(port) {
147461
147921
  if (!output) return [];
147462
147922
  return output.split("\n").map((s) => parseInt(s.trim(), 10)).filter((n) => !Number.isNaN(n));
147463
147923
  }
147464
- var zodSchema64 = external_exports.object({
147924
+ var zodSchema65 = external_exports.object({
147465
147925
  port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on (default 8081)")
147466
147926
  });
147467
147927
  var stopMetroTool = {
@@ -147471,8 +147931,8 @@ var stopMetroTool = {
147471
147931
  completedMsg: ({ params }) => `Stopped Metro on port ${params.port}`,
147472
147932
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop Metro on port ${params.port}: ${failureSignal2.error_code}`
147473
147933
  },
147474
- 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 \u2014 always ask the user for confirmation before calling this tool.`,
147475
- zodSchema: zodSchema64,
147934
+ description: `Stop the Metro bundler process listening on a given port (default 8081). Use when ending a React Native session or when Metro must be restarted. Returns { stopped, port, pids }; stopped=false if no process is found on the port. Fails if the port lookup command times out or the process cannot be killed. This is DESTRUCTIVE: always ask the user for confirmation before calling this tool.`,
147935
+ zodSchema: zodSchema65,
147476
147936
  services: () => ({}),
147477
147937
  async execute(_services, params) {
147478
147938
  const port = params.port;
@@ -149816,15 +150276,15 @@ async function appendStepToFlow(session, step) {
149816
150276
  }
149817
150277
 
149818
150278
  // ../tool-server/src/tools/flows/flow-start-recording.ts
149819
- var zodSchema65 = external_exports.object({
150279
+ var zodSchema66 = external_exports.object({
149820
150280
  name: external_exports.string().describe(
149821
- 'Name for this flow (e.g. "settings-explore") \u2014 letters, digits, underscore and hyphen only.'
150281
+ 'Name for this flow (e.g. "settings-explore"): letters, digits, underscore and hyphen only.'
149822
150282
  ),
149823
150283
  project_root: external_exports.string().describe(
149824
150284
  "Absolute path to the project root directory (the directory that contains or should contain `.argent/flows/`). The flow file is created at `<project_root>/.argent/flows/<name>.yaml`."
149825
150285
  ),
149826
150286
  executionPrerequisite: external_exports.string().optional().describe(
149827
- 'Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a self-contained e2e flow, omit this and record a `restart-app` as the first step instead \u2014 it is captured as the flow\'s `launch` step. restart-app has no chromium support, so a chromium flow records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one \u2014 a flow that starts with a launch must not declare it.'
150287
+ 'Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a self-contained e2e flow, omit this and record a `restart-app` as the first step instead; it is captured as the flow\'s `launch` step. restart-app has no chromium support, so a chromium flow records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one, since a flow that starts with a launch must not declare it.'
149828
150288
  )
149829
150289
  });
149830
150290
  var fileInputs2 = [
@@ -149848,19 +150308,19 @@ Use when you want to capture a reusable sequence of device interactions for late
149848
150308
  Returns { message, flowFile, savedTo } and optionally { restarted, discardedSteps } if a live recording of the same flow was discarded.
149849
150309
  Without a link, it creates that file and fails if the .argent/flows/ directory cannot be created or the file cannot be written. Over a link (argent link or ARGENT_TOOLS_URL, also to 127.0.0.1), your client writes the file, and \`savedTo\` is its path on your computer, or null when that write failed.
149850
150310
 
149851
- Several flows can be recorded at once \u2014 each keyed by the \`name\` + \`project_root\`
149852
- that every subsequent recording tool repeats \u2014 and one recording's steps never
150311
+ Several flows can be recorded at once, each keyed by the \`name\` + \`project_root\`
150312
+ that every subsequent recording tool repeats, and one recording's steps never
149853
150313
  land in another's file. Steps still run LIVE, so give each concurrent recording
149854
150314
  its own device and pick a name unique to your task.
149855
150315
 
149856
- After starting, use flow-add-step to append tool calls \u2014 each step is executed
150316
+ After starting, use flow-add-step to append tool calls. Each step is executed
149857
150317
  LIVE so you can verify it works before it gets recorded. Read each step's
149858
150318
  \`message\`: an await-ui-element whose condition never held is still recorded (it
149859
150319
  returns success:false rather than failing), and a check that passes live can
149860
150320
  still fail once polished into an \`await:\`/\`assert:\` directive, which resolves
149861
150321
  against a different tree. flow-add-step warns about both when you record the
149862
150322
  wait DIRECTLY. A wait nested inside a recorded run-sequence gets neither warning
149863
- \u2014 that tool reports its own shape \u2014 so for those, read \`toolResult\`. For a self-contained
150323
+ (that tool reports its own shape), so for those, read \`toolResult\`. For a self-contained
149864
150324
  e2e flow, record a restart-app of the app under test as the FIRST step (captured
149865
150325
  as the flow's \`launch\` step); for a reusable fragment, skip that and pass
149866
150326
  executionPrerequisite instead. Use flow-add-echo to add labels, and
@@ -149873,7 +150333,7 @@ recording. Over a link, the next recorded step writes over your edit.
149873
150333
  Without a link, the recorder reads the file again before each step, but an
149874
150334
  edit that renumbers the steps drops the warnings that flow-finish-recording
149875
150335
  reports for those steps.`,
149876
- zodSchema: zodSchema65,
150336
+ zodSchema: zodSchema66,
149877
150337
  fileInputs: fileInputs2,
149878
150338
  services: () => ({}),
149879
150339
  async execute(_services, params, ctx) {
@@ -152373,10 +152833,10 @@ function stepAnchor(step) {
152373
152833
 
152374
152834
  // ../tool-server/src/tools/flows/flow-add-step.ts
152375
152835
  init_device_info();
152376
- var zodSchema66 = external_exports.object({
152377
- name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
152836
+ var zodSchema67 = external_exports.object({
152837
+ name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
152378
152838
  project_root: external_exports.string().describe(
152379
- "Absolute path to the project root of the flow being recorded \u2014 the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to."
152839
+ "Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to."
152380
152840
  ),
152381
152841
  command: external_exports.string().describe(
152382
152842
  'MCP tool to execute and record, for example "gesture-tap". Do not pass a flow directive or a recording tool. Call flow-add-script directly for a requested script step.'
@@ -152832,7 +153292,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
152832
153292
  // more times — and every retry re-runs the action and appends another step,
152833
153293
  // because an aborted request still appends its first.
152834
153294
  longRunning: true,
152835
- zodSchema: zodSchema66,
153295
+ zodSchema: zodSchema67,
152836
153296
  fileInputs: fileInputs3,
152837
153297
  services: () => ({}),
152838
153298
  async execute(_services, params, ctx) {
@@ -153021,10 +153481,10 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
153021
153481
 
153022
153482
  // ../tool-server/src/tools/flows/flow-insert-echo.ts
153023
153483
  init_zod();
153024
- var zodSchema67 = external_exports.object({
153025
- name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
153484
+ var zodSchema68 = external_exports.object({
153485
+ name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
153026
153486
  project_root: external_exports.string().describe(
153027
- "Absolute path to the project root of the flow being recorded \u2014 the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to."
153487
+ "Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to."
153028
153488
  ),
153029
153489
  message: external_exports.string().describe("Message to echo when the flow is replayed")
153030
153490
  });
@@ -153036,10 +153496,10 @@ var flowInsertEchoTool = {
153036
153496
  completedMsg: ({ params }) => `Added note to flow ${params.name}`,
153037
153497
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to add note to flow ${params.name}: ${failureSignal2.error_code}`
153038
153498
  },
153039
- description: `Record an echo step in the flow named by \`name\` + \`project_root\`. Echo steps print a message when the flow is replayed \u2014 useful as labels between tool calls.
153499
+ description: `Record an echo step in the flow named by \`name\` + \`project_root\`. Echo steps print a message when the flow is replayed, useful as labels between tool calls.
153040
153500
  Use when you want to annotate a recorded flow with a human-readable label or checkpoint message.
153041
153501
  Returns { message, stepCount, savedTo }. Fails if that flow has no recording in progress.`,
153042
- zodSchema: zodSchema67,
153502
+ zodSchema: zodSchema68,
153043
153503
  services: () => ({}),
153044
153504
  async execute(_services, params) {
153045
153505
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154342,7 +154802,7 @@ function errMsg3(err) {
154342
154802
 
154343
154803
  // ../tool-server/src/tools/flows/flow-add-script.ts
154344
154804
  var OUTPUT_RENDER_LIMIT_BYTES = 64 * 1024;
154345
- var zodSchema68 = external_exports.object({
154805
+ var zodSchema69 = external_exports.object({
154346
154806
  name: external_exports.string().describe("Flow name passed to flow-start-recording."),
154347
154807
  project_root: external_exports.string().describe("Absolute project root passed to flow-start-recording."),
154348
154808
  path: external_exports.string().describe(
@@ -154399,7 +154859,7 @@ var flowAddScriptTool = {
154399
154859
  // The flag only skips the adapter's own abort timer; its retry loop is
154400
154860
  // untouched, so a call that fails some other way is still re-POSTed.
154401
154861
  longRunning: true,
154402
- zodSchema: zodSchema68,
154862
+ zodSchema: zodSchema69,
154403
154863
  services: () => ({}),
154404
154864
  async execute(_services, params, ctx) {
154405
154865
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154489,10 +154949,10 @@ var flowAddScriptTool = {
154489
154949
  // ../tool-server/src/tools/flows/flow-finish-recording.ts
154490
154950
  init_zod();
154491
154951
  var fs60 = __toESM(require("node:fs/promises"));
154492
- var zodSchema69 = external_exports.object({
154493
- name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
154952
+ var zodSchema70 = external_exports.object({
154953
+ name: external_exports.string().describe("Name of the flow being recorded: the one passed to flow-start-recording."),
154494
154954
  project_root: external_exports.string().describe(
154495
- "Absolute path to the project root of the flow being recorded \u2014 the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish."
154955
+ "Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish."
154496
154956
  )
154497
154957
  });
154498
154958
  function attachStepWarnings(summary, warnings) {
@@ -154548,7 +155008,7 @@ var flowFinishRecordingTool = {
154548
155008
  description: `Finish recording the flow named by \`name\` + \`project_root\`, leaving recordings under any other key untouched. Returns { message, path, executionPrerequisite, steps, summary, flowFile, savedTo } - a summary of all recorded steps plus the final YAML. Use when you have added all desired steps and want to finalize the flow file. Fails if that flow has no recording in progress.
154549
155009
  A warning flow-add-step raised on a recorded \`await-ui-element\` is repeated in \`summary\` as a \`warning:\` line of its own, right below the step it judges, and \`message\` counts them by kind. A warning is repeated only while the step it judges is still identifiable by its number: hand-editing the .yaml during the recording moves the steps, so those warnings are DROPPED rather than pinned on whichever step inherited the number, and \`message\` says how many were dropped. A step that carries a cross-tree warning was re-probed against the runner's tree: read it before converting that wait to \`await:\`/\`assert:\`, which is what the verdict is about and what this moment is for. A step that recorded a wait which did not pass was never probed at all, and its own warning names the CAUSE, because only one of them judges the condition: an unmet wait was read and found false, and it stops the run at replay; a wait whose tree source could not be read, or one that was cancelled, observed nothing and leaves the condition UNKNOWN rather than known-bad. Read those before replaying.
154550
155010
  You can still edit the .yaml file directly afterwards to remove or reorder steps.`,
154551
- zodSchema: zodSchema69,
155011
+ zodSchema: zodSchema70,
154552
155012
  services: () => ({}),
154553
155013
  async execute(_services, params) {
154554
155014
  const { filePath, flowFile, savedTo, flow, summary, headline } = await withFlowFileLock(
@@ -157026,24 +157486,24 @@ async function restoreStatusBar(device) {
157026
157486
  }
157027
157487
 
157028
157488
  // ../tool-server/src/tools/flows/flow-run.ts
157029
- var zodSchema70 = external_exports.object({
157489
+ var zodSchema71 = external_exports.object({
157030
157490
  name: external_exports.string().optional().describe(
157031
157491
  'Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
157032
157492
  ),
157033
157493
  project_root: external_exports.string().describe(
157034
- "Absolute path to the calling agent's project root \u2014 the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the flow, its run: siblings, its script: paths and baselines all resolve beside the YAML instead, so pass the agent's cwd. A script still RUNS in this root whichever source was used."
157494
+ "Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the flow, its run: siblings, its script: paths and baselines all resolve beside the YAML instead, so pass the agent's cwd. A script still RUNS in this root whichever source was used."
157035
157495
  ),
157036
157496
  flow_file: external_exports.string().optional().describe(
157037
- "Path to the flow .yaml as readable by the tool-server. Internal \u2014 the argent client derives it from project_root and name automatically; leave unset."
157497
+ "Path to the flow .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset."
157038
157498
  ),
157039
157499
  flow_path: external_exports.string().optional().describe(
157040
157500
  "Omit when name is set. Absolute path to a flow .yaml on the client. Over a link (argent link or ARGENT_TOOLS_URL), the argent client uploads the file, its run: fragments and the snapshot baselines of each run, and the tool-server runs those copies. Keep run: fragments under project_root or beside the flow file. With updateBaselines, the client writes the new baselines when the run ends. The client also uploads each absolute .png or .yaml path that a tool: step takes as a file argument, when the file is under project_root or beside the flow file. A tool: flow-execute step that names a flow with name and an absolute project_root without a .. segment runs: the client also uploads that flow and its own files. Over a link, the uploaded flows must not have: script: steps; tool: steps that run a flow another way or record a flow; tool: steps that take a directory, an app or an output directory; tool: steps whose tool builds a file path from several arguments; tool: steps that name a relative path or a file other than .png or .yaml. Without a link, the tool-server reads the files in place and all step kinds run."
157041
157501
  ),
157042
157502
  device: external_exports.string().optional().describe(
157043
- "Device id to run against (iOS UDID, Android/Vega serial, Chromium id) \u2014 the id list-devices reports. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up."
157503
+ "Device id to run against (iOS UDID, Android/Vega serial, Chromium id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up."
157044
157504
  ),
157045
157505
  platform: external_exports.enum(SELECTABLE_PLATFORMS).optional().describe(
157046
- "Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only \u2014 pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: \u2026 }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first."
157506
+ "Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: \u2026 }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first."
157047
157507
  ),
157048
157508
  updateBaselines: external_exports.boolean().optional().describe(
157049
157509
  "Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them, also in the flows that tool: flow-execute steps run, unless such a step sets updateBaselines itself."
@@ -157533,7 +157993,7 @@ one-off interaction use the gesture tools instead, and to author a flow use flow
157533
157993
  exactly one flow source: name (under project_root) or flow_path.
157534
157994
  Returns a per-step report: the first failure stops the run and the rest report as skipped.`,
157535
157995
  longRunning: true,
157536
- zodSchema: zodSchema70,
157996
+ zodSchema: zodSchema71,
157537
157997
  fileInputs: fileInputs4,
157538
157998
  services: () => ({}),
157539
157999
  async execute(_services, params, ctx) {
@@ -158510,15 +158970,15 @@ async function resolveFlowSource(params, fileInput, flowPathInput) {
158510
158970
  // ../tool-server/src/tools/flows/flow-read-prerequisite.ts
158511
158971
  init_zod();
158512
158972
  var fs64 = __toESM(require("node:fs/promises"));
158513
- var zodSchema71 = external_exports.object({
158973
+ var zodSchema72 = external_exports.object({
158514
158974
  name: external_exports.string().optional().describe(
158515
158975
  'Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
158516
158976
  ),
158517
158977
  project_root: external_exports.string().describe(
158518
- "Absolute path to the calling agent's project root \u2014 the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd."
158978
+ "Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd."
158519
158979
  ),
158520
158980
  flow_file: external_exports.string().optional().describe(
158521
- "Path to the flow .yaml as readable by the tool-server. Internal \u2014 the argent client derives it from project_root and name automatically; leave unset."
158981
+ "Path to the flow .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset."
158522
158982
  ),
158523
158983
  flow_path: external_exports.string().optional().describe(
158524
158984
  "Omit when name is set. Absolute path to a flow .yaml on the client. Over a link (argent link or ARGENT_TOOLS_URL), the argent client uploads the file and the tool-server reads the uploaded copy; without a link, the tool-server reads the file in place. Pass the path through the argent client; a raw path that the file-input boundary did not verify is rejected. Pass the same flow source here as to flow-execute, so the prerequisite you read belongs to the flow that will run."
@@ -158556,7 +159016,7 @@ var flowReadPrerequisiteTool = {
158556
159016
  completedMsg: () => "Read flow prerequisite",
158557
159017
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read flow prerequisite: ${failureSignal2.error_code}`
158558
159018
  },
158559
- description: `Read the execution prerequisite of a flow without running it \u2014 a saved flow from the .argent/flows/ directory, or an explicit boundary-managed flow_path.
159019
+ description: `Read the execution prerequisite of a flow without running it: a saved flow from the .argent/flows/ directory, or an explicit boundary-managed flow_path.
158560
159020
  Returns { flow, executionPrerequisite }: the logical name, plus the precondition its author recorded
158561
159021
  verbatim. Empty when none was declared, which is always so for a self-contained scenario: one opening
158562
159022
  on a launch may declare no prerequisite, because it builds its own start state.
@@ -158566,7 +159026,7 @@ Touches no device: nothing is launched, tapped, dispatched or torn down, and no
158566
159026
  needs booting, so calling this costs nothing but a file read.
158567
159027
  Fails if the flow file does not exist.
158568
159028
  Address the flow exactly as you will address it in flow-execute: name or flow_path, one and only one; supplying both or neither is rejected. The name goes in \`name\`, which resolves <project_root>/.argent/flows/<name>.yaml.`,
158569
- zodSchema: zodSchema71,
159029
+ zodSchema: zodSchema72,
158570
159030
  fileInputs: fileInputs5,
158571
159031
  services: () => ({}),
158572
159032
  async execute(_services, params, ctx) {
@@ -158882,7 +159342,7 @@ async function readWorkspaceSnapshot(workspacePath) {
158882
159342
  }
158883
159343
 
158884
159344
  // ../tool-server/src/tools/workspace/gather-workspace-data.ts
158885
- var zodSchema72 = external_exports.object({
159345
+ var zodSchema73 = external_exports.object({
158886
159346
  workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
158887
159347
  });
158888
159348
  var fileInputs6 = [
@@ -158913,7 +159373,7 @@ exploration of anything the snapshot surfaces.
158913
159373
  Use when you need to inspect project configuration without manually reading multiple files.
158914
159374
  Returns partial data if workspacePath does not exist or is not readable; missing items are represented as null or empty collections.
158915
159375
  Fails if the workspacePath is not an absolute path or the directory cannot be accessed.`,
158916
- zodSchema: zodSchema72,
159376
+ zodSchema: zodSchema73,
158917
159377
  fileInputs: fileInputs6,
158918
159378
  services: () => ({}),
158919
159379
  async execute(_services, params) {
@@ -158987,9 +159447,9 @@ function targetFlagsFor(target) {
158987
159447
  if (target === "both") return ["--global", "--local"];
158988
159448
  return [`--${target}`];
158989
159449
  }
158990
- var zodSchema73 = external_exports.object({
159450
+ var zodSchema74 = external_exports.object({
158991
159451
  target: external_exports.enum(["auto", "global", "local", "both"]).optional().describe(
158992
- "Which install to update. 'auto' (default) updates the install serving this session \u2014 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."
159452
+ "Which install to update. 'auto' (default) updates the install serving this session: the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated."
158993
159453
  )
158994
159454
  });
158995
159455
  var updateScheduled = false;
@@ -159001,7 +159461,7 @@ var updateArgentTool = {
159001
159461
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to update Argent: ${failureSignal2.error_code}`
159002
159462
  },
159003
159463
  description: "Apply a pending Argent update. Only call this tool when the user has explicitly consented to updating Argent in this conversation. Use when an update notification indicates a new version is available and the user agrees to update. By default updates the install serving this session; pass `target` to choose global/local/both. Returns { message } with the update status and version info. The tool server will restart automatically after the update. Fails if no update is available or an update is already in progress.",
159004
- zodSchema: zodSchema73,
159464
+ zodSchema: zodSchema74,
159005
159465
  services: () => ({}),
159006
159466
  async execute(_services, params, _options) {
159007
159467
  const { updateAvailable, updateInstallable, currentVersion, installableVersion } = getUpdateState();
@@ -159086,7 +159546,7 @@ var updateArgentTool = {
159086
159546
 
159087
159547
  // ../tool-server/src/tools/system/dismiss-update.ts
159088
159548
  init_zod();
159089
- var zodSchema74 = external_exports.object({
159549
+ var zodSchema75 = external_exports.object({
159090
159550
  hours: external_exports.number().min(0).describe("Number of hours to suppress the update notification")
159091
159551
  });
159092
159552
  var dismissUpdateTool = {
@@ -159097,7 +159557,7 @@ var dismissUpdateTool = {
159097
159557
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to dismiss Argent update: ${failureSignal2.error_code}`
159098
159558
  },
159099
159559
  description: "Clear the Argent update notification for the given number of hours. Use when the user asks to postpone or silence update reminders. Returns { message } confirming the suppression duration. Fails if the hours value is negative or the suppression state cannot be persisted.",
159100
- zodSchema: zodSchema74,
159560
+ zodSchema: zodSchema75,
159101
159561
  services: () => ({}),
159102
159562
  async execute(_services, params, _options) {
159103
159563
  const durationMs = params.hours * 60 * 60 * 1e3;
@@ -159116,7 +159576,7 @@ var import_path8 = __toESM(require("path"));
159116
159576
  init_zod();
159117
159577
  init_src2();
159118
159578
  init_device_info();
159119
- var zodSchema75 = external_exports.object({
159579
+ var zodSchema76 = external_exports.object({
159120
159580
  baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
159121
159581
  currentPath: external_exports.string().min(1).optional().describe("Path to the current PNG file. Required unless captureCurrent is true."),
159122
159582
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
@@ -159130,10 +159590,10 @@ var zodSchema75 = external_exports.object({
159130
159590
  "Orientation override for live baseline/current captures. Ignored on physical iPhones."
159131
159591
  ),
159132
159592
  outputDir: external_exports.string().min(1).optional().describe(
159133
- "Directory where diff artifacts should be written. Optional \u2014 defaults to a temp directory; the diff images are returned in the result either way."
159593
+ "Directory where diff artifacts should be written. Optional: defaults to a temp directory; the diff images are returned in the result either way."
159134
159594
  )
159135
159595
  }).strict();
159136
- var capability34 = {
159596
+ var capability35 = {
159137
159597
  apple: { simulator: true, device: true },
159138
159598
  android: { emulator: true, device: true, unknown: true }
159139
159599
  };
@@ -159158,8 +159618,8 @@ Returns { summary, diffPath, contextDiffPath }. The summary uses normalized [0,1
159158
159618
  Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
159159
159619
  Fails if the input sources are invalid, PNG files cannot be read, outputDir cannot be written, or the simulator-server / emulator backend is not reachable.`,
159160
159620
  searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture",
159161
- zodSchema: zodSchema75,
159162
- capability: capability34,
159621
+ zodSchema: zodSchema76,
159622
+ capability: capability35,
159163
159623
  fileInputs: fileInputs7,
159164
159624
  services: (params) => {
159165
159625
  if (params.captureBaseline || params.captureCurrent) {
@@ -159472,12 +159932,12 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
159472
159932
  }
159473
159933
 
159474
159934
  // ../tool-server/src/tools/variants/propose-variant.ts
159475
- var zodSchema76 = external_exports.object({
159935
+ var zodSchema77 = external_exports.object({
159476
159936
  element: external_exports.string().min(1).max(200).describe(
159477
159937
  'Human name of the on-screen element this variant targets, e.g. "Foo button" or "profile header". Repeated calls with the same element accumulate multiple variants on it. Used as the default screen matcher when `match` is omitted.'
159478
159938
  ),
159479
159939
  udid: external_exports.string().min(1).max(200).optional().describe(
159480
- "Device id (iOS udid / Android serial) the variants were captured on. The preview window streams THIS device directly \u2014 pass the same udid you screenshotted/described with, so the human never has to pick a simulator. Set it on the first propose_variant of a round; later calls may omit it (the last non-empty value wins)."
159940
+ "Device id (iOS udid / Android serial) the variants were captured on. The preview window streams THIS device directly; pass the same udid you screenshotted/described with, so the human never has to pick a simulator. Set it on the first propose_variant of a round; later calls may omit it (the last non-empty value wins)."
159481
159941
  ),
159482
159942
  match: external_exports.object({
159483
159943
  by: external_exports.enum(["text", "label", "identifier", "role"]).describe(
@@ -159501,7 +159961,7 @@ var zodSchema76 = external_exports.object({
159501
159961
  width: external_exports.number(),
159502
159962
  height: external_exports.number()
159503
159963
  }).optional().describe(
159504
- "Normalized [0..1] bounds (fractions of screen width/height) of the target element AS IT APPEARS IN THIS VARIANT \u2014 read the matched node's `frame` from `describe` AFTER applying this variant. The preview window crops the screenshot to these bounds, so each variant shows its own re-laid-out element instead of every variant sharing one stale frame. The element moves/resizes between variants, so capture it per variant. Omit if unknown."
159964
+ "Normalized [0..1] bounds (fractions of screen width/height) of the target element AS IT APPEARS IN THIS VARIANT. Read the matched node's `frame` from `describe` AFTER applying this variant. The preview window crops the screenshot to these bounds, so each variant shows its own re-laid-out element instead of every variant sharing one stale frame. The element moves/resizes between variants, so capture it per variant. Omit if unknown."
159505
159965
  )
159506
159966
  }).describe("The variant being proposed for `element`.")
159507
159967
  });
@@ -159519,20 +159979,20 @@ function createProposeVariantTool(registry2) {
159519
159979
  Use when you have produced multiple alternative designs for an element and want the human to pick.
159520
159980
  Call this once per variant: e.g. propose_variant("Foo", v1), propose_variant("Foo", v2),
159521
159981
  propose_variant("Bar", v1)\u2026 Variants accumulate per element and across elements. The agent is NOT
159522
- blocked \u2014 keep proposing and keep working. Each element appears live in the Argent Lens window (a
159982
+ blocked: keep proposing and keep working. Each element appears live in the Argent Lens window (a
159523
159983
  native window that opens automatically) as a floating card beside the streamed simulator, with a thin
159524
159984
  line connecting it to the matched on-screen element; you don't open or display anything yourself. Pass
159525
159985
  variant.previewImage (e.g. a screenshot path) to show how each variant looks.
159526
159986
 
159527
- When you have proposed every variant for every element, you are done staging \u2014 the human reviews them
159987
+ When you have proposed every variant for every element, you are done staging. The human reviews them
159528
159988
  in the Argent Lens window and sends back their picks and comments. If an \`await_user_selection\` tool
159529
159989
  is available, call it once to block until they submit; otherwise just end your turn and their feedback
159530
159990
  arrives as a follow-up message (this is the case in an \`argent lens\` CLI session).
159531
159991
 
159532
- Returns { round, elementId, variantId, element, variantCount, totalElements } \u2014 confirmation only;
159992
+ Returns { round, elementId, variantId, element, variantCount, totalElements }: confirmation only;
159533
159993
  it does not wait for the user.`,
159534
159994
  searchHint: "propose design variant alternative option for element non-blocking ab choice",
159535
- zodSchema: zodSchema76,
159995
+ zodSchema: zodSchema77,
159536
159996
  services: () => ({}),
159537
159997
  async execute(_services, params) {
159538
159998
  let frame = params.variant.frame;
@@ -159556,9 +160016,9 @@ it does not wait for the user.`,
159556
160016
 
159557
160017
  // ../tool-server/src/tools/variants/await-user-selection.ts
159558
160018
  init_zod();
159559
- var zodSchema77 = external_exports.object({
160019
+ var zodSchema78 = external_exports.object({
159560
160020
  timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
159561
- "Max seconds to block this call before returning a re-awaitable { status: 'pending' } result (default 1800). The user's proposals stay live across timeouts \u2014 on 'pending' just call await_user_selection again. Lower this if your MCP client enforces a short request timeout."
160021
+ "Max seconds to block this call before returning a re-awaitable { status: 'pending' } result (default 1800). The user's proposals stay live across timeouts; on 'pending' just call await_user_selection again. Lower this if your MCP client enforces a short request timeout."
159562
160022
  )
159563
160023
  });
159564
160024
  var awaitUserSelectionTool = {
@@ -159583,21 +160043,21 @@ that opens automatically on the user's screen), then returns their choices and a
159583
160043
  Returns one of:
159584
160044
  \u2022 { status: "completed", round, selections: [{ element, chosenVariant, comment? }], unselected,
159585
160045
  annotations: [{ target, match, comment }], globalComment, morePending? }
159586
- \u2014 the user finished this round; apply chosenVariant for each element (skip ones in
160046
+ The user finished this round; apply chosenVariant for each element (skip ones in
159587
160047
  \`unselected\`). \`annotations\` are free-form comments the user pinned to specific on-screen
159588
- elements via the inspector \u2014 treat each as a change request for that element.
160048
+ elements via the inspector; treat each as a change request for that element.
159589
160049
  If \`morePending\` is true, another already-decided round or a freshly-staged round is
159590
- still waiting \u2014 call await_user_selection AGAIN (repeat until you get a completed result
160050
+ still waiting. Call await_user_selection AGAIN (repeat until you get a completed result
159591
160051
  without \`morePending\`, a \`pending\`, or \`no_proposals\`); do not stop on this result alone.
159592
- \u2022 { status: "pending", message, proposedElements } \u2014 timeoutSeconds elapsed with no submission.
160052
+ \u2022 { status: "pending", message, proposedElements }: timeoutSeconds elapsed with no submission.
159593
160053
  Expected, not an error: the proposals are still live; call await_user_selection AGAIN.
159594
- \u2022 { status: "no_proposals" } \u2014 you called this before propose_variant.
160054
+ \u2022 { status: "no_proposals" }: you called this before propose_variant.
159595
160055
 
159596
160056
  This tool is long-running; it intentionally holds the request open. It honors client
159597
160057
  disconnects (aborts cleanly).`,
159598
160058
  searchHint: "await wait user selection choice variant blocking confirm picks complete",
159599
160059
  longRunning: true,
159600
- zodSchema: zodSchema77,
160060
+ zodSchema: zodSchema78,
159601
160061
  services: () => ({}),
159602
160062
  async execute(_services, params, options) {
159603
160063
  const timeoutMs = (params.timeoutSeconds ?? 1800) * 1e3;
@@ -159612,7 +160072,7 @@ disconnects (aborts cleanly).`,
159612
160072
  init_zod();
159613
160073
  init_src2();
159614
160074
  init_device_info();
159615
- var zodSchema78 = external_exports.object({
160075
+ var zodSchema79 = external_exports.object({
159616
160076
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159617
160077
  action: external_exports.enum(["list", "select", "new", "close"]).describe(
159618
160078
  "list: enumerate tabs/windows. select: make a tab active (every other tool then acts on it). new: open a tab. close: close a tab."
@@ -159645,7 +160105,7 @@ var tabAction = {
159645
160105
  failure: "close"
159646
160106
  }
159647
160107
  };
159648
- var capability35 = {
160108
+ var capability36 = {
159649
160109
  chromium: { app: true }
159650
160110
  };
159651
160111
  var chromiumTabsTool = {
@@ -159663,8 +160123,8 @@ var chromiumTabsTool = {
159663
160123
  Use when an app exposes multiple windows or tabs and you need to inspect or drive one other than the current page, or to open/close a page during a flow. tabIds are stable for the session and never reused.
159664
160124
  Returns { tabs: [{ tabId, targetId, title, url, active, label? }] }. Fails if the device is not a Chromium (CDP) device, or the requested tabId/label no longer matches a live tab. Chromium-only.`,
159665
160125
  searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
159666
- zodSchema: zodSchema78,
159667
- capability: capability35,
160126
+ zodSchema: zodSchema79,
160127
+ capability: capability36,
159668
160128
  services: (params) => {
159669
160129
  const device = resolveDevice(params.udid);
159670
160130
  if (device.platform === "chromium") {
@@ -159765,7 +160225,7 @@ async function clearStorage(cdp, type) {
159765
160225
  }
159766
160226
 
159767
160227
  // ../tool-server/src/tools/chromium-cookies/index.ts
159768
- var zodSchema79 = external_exports.object({
160228
+ var zodSchema80 = external_exports.object({
159769
160229
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159770
160230
  action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
159771
160231
  "get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."
@@ -159788,7 +160248,7 @@ var cookieAction = {
159788
160248
  delete: { started: "Deleting", completed: "Deleted", failure: "delete" },
159789
160249
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159790
160250
  };
159791
- var capability36 = {
160251
+ var capability37 = {
159792
160252
  chromium: { app: true }
159793
160253
  };
159794
160254
  var chromiumCookiesTool = {
@@ -159806,8 +160266,8 @@ var chromiumCookiesTool = {
159806
160266
  Use when seeding an authenticated session before a flow (set the session cookie, then navigate) or asserting cookie state after one.
159807
160267
  Returns { cookies, count } for get, or a small status object ({ set } / { deleted } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or set is missing name/value. Chromium-only.`,
159808
160268
  searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
159809
- zodSchema: zodSchema79,
159810
- capability: capability36,
160269
+ zodSchema: zodSchema80,
160270
+ capability: capability37,
159811
160271
  services: (params) => {
159812
160272
  const device = resolveDevice(params.udid);
159813
160273
  if (device.platform === "chromium") {
@@ -159872,7 +160332,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
159872
160332
  init_zod();
159873
160333
  init_src2();
159874
160334
  init_device_info();
159875
- var zodSchema80 = external_exports.object({
160335
+ var zodSchema81 = external_exports.object({
159876
160336
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159877
160337
  store: external_exports.enum(["local", "session"]).describe("Which Web Storage area: `local` (localStorage) or `session` (sessionStorage)."),
159878
160338
  action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
@@ -159887,7 +160347,7 @@ var storageAction = {
159887
160347
  remove: { started: "Removing from", completed: "Removed from", failure: "remove from" },
159888
160348
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159889
160349
  };
159890
- var capability37 = {
160350
+ var capability38 = {
159891
160351
  chromium: { app: true }
159892
160352
  };
159893
160353
  var chromiumStorageTool = {
@@ -159906,8 +160366,8 @@ Set \`store\` to "local" or "session". Storage is per-origin, so it reflects the
159906
160366
  Use when seeding feature flags / auth tokens before a flow or asserting persisted app state after one.
159907
160367
  Returns { value } for a single key, { entries, count } for all, or a status object ({ set } / { removed } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or set is missing key/value. Chromium-only.`,
159908
160368
  searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
159909
- zodSchema: zodSchema80,
159910
- capability: capability37,
160369
+ zodSchema: zodSchema81,
160370
+ capability: capability38,
159911
160371
  services: (params) => {
159912
160372
  const device = resolveDevice(params.udid);
159913
160373
  if (device.platform === "chromium") {
@@ -160020,6 +160480,7 @@ function createRegistry() {
160020
160480
  registry2.registerTool(createDescribeTool(registry2));
160021
160481
  registry2.registerTool(createUiTreeTool(registry2));
160022
160482
  registry2.registerTool(createForegroundAppTool(registry2));
160483
+ registry2.registerTool(createFillTool(registry2));
160023
160484
  registry2.registerTool(createAwaitUiElementTool(registry2));
160024
160485
  registry2.registerTool(createAwaitScreenIdleTool(registry2));
160025
160486
  registry2.registerTool(createReactProfilerStartTool(registry2));