@swmansion/argent 0.28.1-next.10 → 0.28.1-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli-cmds.mjs CHANGED
@@ -30092,7 +30092,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
30092
30092
  var SESSION_ID2 = randomUUID5();
30093
30093
  function readCliVersion() {
30094
30094
  if (true) {
30095
- return "0.28.1-next.10";
30095
+ return "0.28.1-next.11";
30096
30096
  }
30097
30097
  return "0.0.0";
30098
30098
  }
package/dist/client.d.ts CHANGED
@@ -81,6 +81,15 @@ export interface UiTree {
81
81
  */
82
82
  unsupportedFields: string[];
83
83
  }
84
+ /** The `foreground-app` result: which app is in front, as `UiTree.foregroundApp` reports it. */
85
+ export interface ForegroundApp {
86
+ /** iOS bundle id or Android package of the app in front; under a system alert, the app it covers. Unset when unknown. */
87
+ bundleId?: string;
88
+ /** iOS: the app's display name. */
89
+ name?: string;
90
+ /** A system alert or dialog covers the app. Unset when unknown. */
91
+ alertVisible?: boolean;
92
+ }
84
93
  export interface CallToolOptions {
85
94
  /** Receive progress events while a long-running tool works. */
86
95
  onProgress?: (event: unknown) => void;
@@ -16736,7 +16736,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16736
16736
  var SESSION_ID = randomUUID4();
16737
16737
  function readCliVersion() {
16738
16738
  if (true) {
16739
- return "0.28.1-next.10";
16739
+ return "0.28.1-next.11";
16740
16740
  }
16741
16741
  return "0.0.0";
16742
16742
  }
@@ -268,6 +268,10 @@ export interface ArgentToolArgs {
268
268
  /** The hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`. */
269
269
  angle?: number;
270
270
  };
271
+ "foreground-app": {
272
+ /** Target device id from `list-devices`. */
273
+ udid: string;
274
+ };
271
275
  "gather-workspace-data": {
272
276
  /** Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp) */
273
277
  workspacePath: string;
@@ -13223,8 +13223,8 @@ function finalize(ctx, schema) {
13223
13223
  const root = ctx.seen.get(schema);
13224
13224
  if (!root)
13225
13225
  throw new Error("Unprocessed schema. This is a bug in Zod.");
13226
- const flattenRef = (zodSchema80) => {
13227
- const seen = ctx.seen.get(zodSchema80);
13226
+ const flattenRef = (zodSchema81) => {
13227
+ const seen = ctx.seen.get(zodSchema81);
13228
13228
  if (seen.ref === null)
13229
13229
  return;
13230
13230
  const schema2 = seen.def ?? seen.schema;
@@ -13242,7 +13242,7 @@ function finalize(ctx, schema) {
13242
13242
  Object.assign(schema2, refSchema);
13243
13243
  }
13244
13244
  Object.assign(schema2, _cached);
13245
- const isParentRef = zodSchema80._zod.parent === ref;
13245
+ const isParentRef = zodSchema81._zod.parent === ref;
13246
13246
  if (isParentRef) {
13247
13247
  for (const key2 in schema2) {
13248
13248
  if (key2 === "$ref" || key2 === "allOf")
@@ -13262,7 +13262,7 @@ function finalize(ctx, schema) {
13262
13262
  }
13263
13263
  }
13264
13264
  }
13265
- const parent = zodSchema80._zod.parent;
13265
+ const parent = zodSchema81._zod.parent;
13266
13266
  if (parent && parent !== ref) {
13267
13267
  flattenRef(parent);
13268
13268
  const parentSeen = ctx.seen.get(parent);
@@ -13280,7 +13280,7 @@ function finalize(ctx, schema) {
13280
13280
  }
13281
13281
  }
13282
13282
  ctx.override({
13283
- zodSchema: zodSchema80,
13283
+ zodSchema: zodSchema81,
13284
13284
  jsonSchema: schema2,
13285
13285
  path: seen.path ?? []
13286
13286
  });
@@ -16081,10 +16081,10 @@ function convertBaseSchema(schema, ctx) {
16081
16081
  }
16082
16082
  ctx.processing.add(refPath);
16083
16083
  const resolved = resolveRef(refPath, ctx);
16084
- const zodSchema81 = convertSchema(resolved, ctx);
16085
- ctx.refs.set(refPath, zodSchema81);
16084
+ const zodSchema82 = convertSchema(resolved, ctx);
16085
+ ctx.refs.set(refPath, zodSchema82);
16086
16086
  ctx.processing.delete(refPath);
16087
- return zodSchema81;
16087
+ return zodSchema82;
16088
16088
  }
16089
16089
  if (schema.enum !== void 0) {
16090
16090
  const enumValues = schema.enum;
@@ -16126,7 +16126,7 @@ function convertBaseSchema(schema, ctx) {
16126
16126
  if (!type) {
16127
16127
  return z.any();
16128
16128
  }
16129
- let zodSchema80;
16129
+ let zodSchema81;
16130
16130
  switch (type) {
16131
16131
  case "string": {
16132
16132
  let stringSchema = z.string();
@@ -16189,7 +16189,7 @@ function convertBaseSchema(schema, ctx) {
16189
16189
  if (schema.pattern) {
16190
16190
  stringSchema = stringSchema.regex(new RegExp(schema.pattern));
16191
16191
  }
16192
- zodSchema80 = stringSchema;
16192
+ zodSchema81 = stringSchema;
16193
16193
  break;
16194
16194
  }
16195
16195
  case "number":
@@ -16214,15 +16214,15 @@ function convertBaseSchema(schema, ctx) {
16214
16214
  if (typeof schema.multipleOf === "number") {
16215
16215
  numberSchema = numberSchema.multipleOf(schema.multipleOf);
16216
16216
  }
16217
- zodSchema80 = numberSchema;
16217
+ zodSchema81 = numberSchema;
16218
16218
  break;
16219
16219
  }
16220
16220
  case "boolean": {
16221
- zodSchema80 = z.boolean();
16221
+ zodSchema81 = z.boolean();
16222
16222
  break;
16223
16223
  }
16224
16224
  case "null": {
16225
- zodSchema80 = z.null();
16225
+ zodSchema81 = z.null();
16226
16226
  break;
16227
16227
  }
16228
16228
  case "object": {
@@ -16237,12 +16237,12 @@ function convertBaseSchema(schema, ctx) {
16237
16237
  const keySchema = convertSchema(schema.propertyNames, ctx);
16238
16238
  const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
16239
16239
  if (Object.keys(shape).length === 0) {
16240
- zodSchema80 = z.record(keySchema, valueSchema);
16240
+ zodSchema81 = z.record(keySchema, valueSchema);
16241
16241
  break;
16242
16242
  }
16243
16243
  const objectSchema2 = z.object(shape).passthrough();
16244
16244
  const recordSchema = z.looseRecord(keySchema, valueSchema);
16245
- zodSchema80 = z.intersection(objectSchema2, recordSchema);
16245
+ zodSchema81 = z.intersection(objectSchema2, recordSchema);
16246
16246
  break;
16247
16247
  }
16248
16248
  if (schema.patternProperties) {
@@ -16260,25 +16260,25 @@ function convertBaseSchema(schema, ctx) {
16260
16260
  }
16261
16261
  schemasToIntersect.push(...looseRecords);
16262
16262
  if (schemasToIntersect.length === 0) {
16263
- zodSchema80 = z.object({}).passthrough();
16263
+ zodSchema81 = z.object({}).passthrough();
16264
16264
  } else if (schemasToIntersect.length === 1) {
16265
- zodSchema80 = schemasToIntersect[0];
16265
+ zodSchema81 = schemasToIntersect[0];
16266
16266
  } else {
16267
16267
  let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
16268
16268
  for (let i = 2; i < schemasToIntersect.length; i++) {
16269
16269
  result = z.intersection(result, schemasToIntersect[i]);
16270
16270
  }
16271
- zodSchema80 = result;
16271
+ zodSchema81 = result;
16272
16272
  }
16273
16273
  break;
16274
16274
  }
16275
16275
  const objectSchema = z.object(shape);
16276
16276
  if (schema.additionalProperties === false) {
16277
- zodSchema80 = objectSchema.strict();
16277
+ zodSchema81 = objectSchema.strict();
16278
16278
  } else if (typeof schema.additionalProperties === "object") {
16279
- zodSchema80 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
16279
+ zodSchema81 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
16280
16280
  } else {
16281
- zodSchema80 = objectSchema.passthrough();
16281
+ zodSchema81 = objectSchema.passthrough();
16282
16282
  }
16283
16283
  break;
16284
16284
  }
@@ -16289,29 +16289,29 @@ function convertBaseSchema(schema, ctx) {
16289
16289
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
16290
16290
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
16291
16291
  if (rest) {
16292
- zodSchema80 = z.tuple(tupleItems).rest(rest);
16292
+ zodSchema81 = z.tuple(tupleItems).rest(rest);
16293
16293
  } else {
16294
- zodSchema80 = z.tuple(tupleItems);
16294
+ zodSchema81 = z.tuple(tupleItems);
16295
16295
  }
16296
16296
  if (typeof schema.minItems === "number") {
16297
- zodSchema80 = zodSchema80.check(z.minLength(schema.minItems));
16297
+ zodSchema81 = zodSchema81.check(z.minLength(schema.minItems));
16298
16298
  }
16299
16299
  if (typeof schema.maxItems === "number") {
16300
- zodSchema80 = zodSchema80.check(z.maxLength(schema.maxItems));
16300
+ zodSchema81 = zodSchema81.check(z.maxLength(schema.maxItems));
16301
16301
  }
16302
16302
  } else if (Array.isArray(items)) {
16303
16303
  const tupleItems = items.map((item) => convertSchema(item, ctx));
16304
16304
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
16305
16305
  if (rest) {
16306
- zodSchema80 = z.tuple(tupleItems).rest(rest);
16306
+ zodSchema81 = z.tuple(tupleItems).rest(rest);
16307
16307
  } else {
16308
- zodSchema80 = z.tuple(tupleItems);
16308
+ zodSchema81 = z.tuple(tupleItems);
16309
16309
  }
16310
16310
  if (typeof schema.minItems === "number") {
16311
- zodSchema80 = zodSchema80.check(z.minLength(schema.minItems));
16311
+ zodSchema81 = zodSchema81.check(z.minLength(schema.minItems));
16312
16312
  }
16313
16313
  if (typeof schema.maxItems === "number") {
16314
- zodSchema80 = zodSchema80.check(z.maxLength(schema.maxItems));
16314
+ zodSchema81 = zodSchema81.check(z.maxLength(schema.maxItems));
16315
16315
  }
16316
16316
  } else if (items !== void 0) {
16317
16317
  const element = convertSchema(items, ctx);
@@ -16322,16 +16322,16 @@ function convertBaseSchema(schema, ctx) {
16322
16322
  if (typeof schema.maxItems === "number") {
16323
16323
  arraySchema = arraySchema.max(schema.maxItems);
16324
16324
  }
16325
- zodSchema80 = arraySchema;
16325
+ zodSchema81 = arraySchema;
16326
16326
  } else {
16327
- zodSchema80 = z.array(z.any());
16327
+ zodSchema81 = z.array(z.any());
16328
16328
  }
16329
16329
  break;
16330
16330
  }
16331
16331
  default:
16332
16332
  throw new Error(`Unsupported type: ${type}`);
16333
16333
  }
16334
- return zodSchema80;
16334
+ return zodSchema81;
16335
16335
  }
16336
16336
  function convertSchema(schema, ctx) {
16337
16337
  if (typeof schema === "boolean") {
@@ -73655,16 +73655,16 @@ function lookupExternalDeviceNow(id) {
73655
73655
  }
73656
73656
  return device;
73657
73657
  }
73658
- async function assertExternalCapability(namespace, device, capability37) {
73659
- assertExternalCapabilitySync(namespace, device, capability37);
73658
+ async function assertExternalCapability(namespace, device, capability38) {
73659
+ assertExternalCapabilitySync(namespace, device, capability38);
73660
73660
  }
73661
- function assertExternalCapabilitySync(namespace, device, capability37) {
73661
+ function assertExternalCapabilitySync(namespace, device, capability38) {
73662
73662
  const id = typeof device === "string" ? device : device.id;
73663
73663
  const externalDevice = isExternalId(id) ? lookupExternalDeviceNow(id) : externalClaimForNativeId(id);
73664
73664
  if (!externalDevice) return;
73665
- if (externalDevice.capabilities.has(capability37)) return;
73665
+ if (externalDevice.capabilities.has(capability38)) return;
73666
73666
  throw new FailureError(
73667
- `${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${capability37}' capability for this device.`,
73667
+ `${namespace} is not available on '${externalDevice.name}': ${externalDevice.provider.name} did not grant the '${capability38}' capability for this device.`,
73668
73668
  {
73669
73669
  error_code: FAILURE_CODES.EXTERNAL_DEVICE_CAPABILITY_DENIED,
73670
73670
  error_kind: "unsupported",
@@ -94920,7 +94920,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
94920
94920
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
94921
94921
  function readCliVersion() {
94922
94922
  if (true) {
94923
- return "0.28.1-next.10";
94923
+ return "0.28.1-next.11";
94924
94924
  }
94925
94925
  return "0.0.0";
94926
94926
  }
@@ -96694,8 +96694,8 @@ async function simctlArgsForUdid(udid, args, options) {
96694
96694
  return [...simctlPrefix(await deviceSetForUdid(udid)), ...nativeArgs(udid, args)];
96695
96695
  }
96696
96696
  function assertSimctlEntitlement(udid, options) {
96697
- const capability37 = options?.granted ?? "simctl";
96698
- assertExternalCapabilitySync(capability37, udid, capability37);
96697
+ const capability38 = options?.granted ?? "simctl";
96698
+ assertExternalCapabilitySync(capability38, udid, capability38);
96699
96699
  }
96700
96700
  async function simctlTargetForUdid(udid, options) {
96701
96701
  assertSimctlEntitlement(udid, options);
@@ -97760,6 +97760,9 @@ var axServiceBlueprint = {
97760
97760
  treeVersion: result.treeVersion
97761
97761
  };
97762
97762
  },
97763
+ async foregroundApp() {
97764
+ return await query("foreground_app");
97765
+ },
97763
97766
  async livePanel() {
97764
97767
  const result = await query("live_panel", LIVE_PANEL_TIMEOUT_MS);
97765
97768
  if (result.error) {
@@ -97869,23 +97872,23 @@ var InvalidToolInputError = class extends Error {
97869
97872
  });
97870
97873
  }
97871
97874
  };
97872
- function platformMatrix(platform, capability37) {
97875
+ function platformMatrix(platform, capability38) {
97873
97876
  switch (platform) {
97874
97877
  case "ios":
97875
- return capability37.apple;
97878
+ return capability38.apple;
97876
97879
  case "ios-remote":
97877
- return capability37.appleRemote;
97880
+ return capability38.appleRemote;
97878
97881
  case "android":
97879
- return capability37.android;
97882
+ return capability38.android;
97880
97883
  case "chromium":
97881
- return capability37.chromium;
97884
+ return capability38.chromium;
97882
97885
  case "vega":
97883
- return capability37.vega;
97886
+ return capability38.vega;
97884
97887
  }
97885
97888
  }
97886
- function assertSupported(toolId, capability37, device) {
97887
- if (!capability37) return;
97888
- const matrix = platformMatrix(device.platform, capability37);
97889
+ function assertSupported(toolId, capability38, device) {
97890
+ if (!capability38) return;
97891
+ const matrix = platformMatrix(device.platform, capability38);
97889
97892
  if (!matrix) {
97890
97893
  throw new UnsupportedOperationError(toolId, device, `no ${device.platform} support declared`);
97891
97894
  }
@@ -97893,7 +97896,7 @@ function assertSupported(toolId, capability37, device) {
97893
97896
  if (!supported) {
97894
97897
  throw new UnsupportedOperationError(toolId, device, `kind '${device.kind}' not supported`);
97895
97898
  }
97896
- if (capability37.supports && !capability37.supports(device)) {
97899
+ if (capability38.supports && !capability38.supports(device)) {
97897
97900
  throw new UnsupportedOperationError(toolId, device, "supports() refiner rejected device");
97898
97901
  }
97899
97902
  }
@@ -127262,9 +127265,9 @@ async function invokeSubTool(registry2, ctx, toolId, args, extra) {
127262
127265
  }
127263
127266
  function describeNestedParamError(registry2, err, toolId, dispatchedArgs, authoredArgs) {
127264
127267
  if (getFailureSignal(err)?.error_code !== FAILURE_CODES.TOOL_INPUT_INVALID) return void 0;
127265
- const zodSchema80 = registry2.getTool(toolId)?.zodSchema;
127266
- if (!zodSchema80) return void 0;
127267
- const parsed = zodSchema80.safeParse(dispatchedArgs ?? {});
127268
+ const zodSchema81 = registry2.getTool(toolId)?.zodSchema;
127269
+ if (!zodSchema81) return void 0;
127270
+ const parsed = zodSchema81.safeParse(dispatchedArgs ?? {});
127268
127271
  if (parsed.success) return void 0;
127269
127272
  return `Invalid params for tool "${toolId}": ${describeParamIssues(parsed.error, authoredArgs)}`;
127270
127273
  }
@@ -137042,6 +137045,73 @@ Fails if the iOS ax-service predates the tree command; update argent.`,
137042
137045
  };
137043
137046
  }
137044
137047
 
137048
+ // ../tool-server/src/tools/foreground-app/index.ts
137049
+ init_zod();
137050
+ var zodSchema42 = external_exports.object({
137051
+ udid: external_exports.string().min(1).describe("Target device id from `list-devices`.")
137052
+ });
137053
+ var capability27 = {
137054
+ apple: { simulator: true },
137055
+ appleRemote: { simulator: true },
137056
+ android: { emulator: true, device: true, unknown: true }
137057
+ };
137058
+ async function readIosForegroundApp(registry2, device) {
137059
+ const ref = axServiceRef(device);
137060
+ const ax = await registry2.resolveService(ref.urn, ref.options);
137061
+ const { bundleId, name, alertVisible } = await ax.foregroundApp();
137062
+ return { bundleId, name, alertVisible };
137063
+ }
137064
+ async function readAndroidForegroundApp(registry2, device) {
137065
+ const ref = androidDevtoolsRef(device);
137066
+ const devtools = await registry2.resolveService(ref.urn, ref.options);
137067
+ const [capture, size] = await Promise.all([
137068
+ // The default settle, as ui-tree: free on a settled screen, and it keeps a
137069
+ // mid-transition window list (right after home or a launch) from naming the old app.
137070
+ devtools.getHierarchy({ maxDepth: 0, clearCache: true }),
137071
+ devtools.getScreenSize()
137072
+ ]);
137073
+ const tree = adaptAndroidTree({ ...capture, truncated: false }, size);
137074
+ return { bundleId: tree.foregroundApp, alertVisible: tree.alertVisible };
137075
+ }
137076
+ function createForegroundAppTool(registry2) {
137077
+ return {
137078
+ id: "foreground-app",
137079
+ interaction: {
137080
+ startedMsg: () => "Reading foreground app",
137081
+ completedMsg: () => "Read foreground app",
137082
+ failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to read foreground app: ${failureSignal2.error_code}`
137083
+ },
137084
+ description: `Read which app is in front, for SDK callers.
137085
+ Returns { bundleId, name, alertVisible }; under a system alert, bundleId is the app it covers.
137086
+ A field is unset when it is unknown.`,
137087
+ hideFromMcp: true,
137088
+ zodSchema: zodSchema42,
137089
+ capability: capability27,
137090
+ services: () => ({}),
137091
+ execute: dispatchByPlatform({
137092
+ toolId: "foreground-app",
137093
+ capability: capability27,
137094
+ ios: {
137095
+ requires: iosRequires,
137096
+ handler: async (_services, _params, device) => {
137097
+ if (await isTvOsSimulator(device.id)) {
137098
+ throw new UnsupportedOperationError("foreground-app", device, "tvOS");
137099
+ }
137100
+ return readIosForegroundApp(registry2, device);
137101
+ }
137102
+ },
137103
+ iosRemote: {
137104
+ requires: ["sim-remote"],
137105
+ handler: async (_services, _params, device) => readIosForegroundApp(registry2, device)
137106
+ },
137107
+ android: {
137108
+ requires: androidRequires,
137109
+ handler: async (_services, _params, device) => readAndroidForegroundApp(registry2, device)
137110
+ }
137111
+ })
137112
+ };
137113
+ }
137114
+
137045
137115
  // ../tool-server/src/tools/await-screen-idle/index.ts
137046
137116
  init_zod();
137047
137117
  init_device_info();
@@ -137050,7 +137120,7 @@ var AWAIT_SCREEN_IDLE_TOOL_ID = "await-screen-idle";
137050
137120
  var DEFAULT_TIMEOUT_MS4 = 3e3;
137051
137121
  var DEFAULT_POLL_INTERVAL_MS2 = 200;
137052
137122
  var DEFAULT_MIN_STABLE_MS = 250;
137053
- var zodSchema42 = external_exports.object({
137123
+ var zodSchema43 = external_exports.object({
137054
137124
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
137055
137125
  timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
137056
137126
  `Max time to wait for the screen to settle before giving up (default ${DEFAULT_TIMEOUT_MS4}).`
@@ -137060,7 +137130,7 @@ var zodSchema42 = external_exports.object({
137060
137130
  `The screen must hold the same content for at least this long to count as settled (default ${DEFAULT_MIN_STABLE_MS}).`
137061
137131
  )
137062
137132
  }).strict();
137063
- var capability27 = {
137133
+ var capability28 = {
137064
137134
  apple: { simulator: true, device: true },
137065
137135
  appleRemote: { simulator: true },
137066
137136
  android: { emulator: true, device: true, unknown: true },
@@ -137107,8 +137177,8 @@ ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls } \u201
137107
137177
  still before the timeout. Use after a launch/navigation to wait for the UI to render before screenshotting or tapping.`,
137108
137178
  searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
137109
137179
  longRunning: true,
137110
- zodSchema: zodSchema42,
137111
- capability: capability27,
137180
+ zodSchema: zodSchema43,
137181
+ capability: capability28,
137112
137182
  services: (params) => {
137113
137183
  const device = resolveDevice(params.udid);
137114
137184
  if (device.platform === "chromium") {
@@ -137118,7 +137188,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
137118
137188
  },
137119
137189
  async execute(services, params, ctx) {
137120
137190
  const device = resolveDevice(params.udid);
137121
- assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability27, device);
137191
+ assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability28, device);
137122
137192
  if (device.platform === "ios") await ensureDeps(iosRequires);
137123
137193
  else if (device.platform === "ios-remote") await ensureDeps(["sim-remote"]);
137124
137194
  else if (device.platform === "android") await ensureDeps(androidRequires);
@@ -137205,7 +137275,7 @@ function bootstrapFailureMessage(bootstrap) {
137205
137275
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
137206
137276
  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.";
137207
137277
  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.";
137208
- var zodSchema43 = external_exports.object({
137278
+ var zodSchema44 = external_exports.object({
137209
137279
  port: metroPortField,
137210
137280
  device_id: external_exports.string().describe(
137211
137281
  "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
@@ -137237,7 +137307,7 @@ Before calling this, ask the user if they also want native profiling (native-pro
137237
137307
  After starting, ask the user to perform the interaction to profile, then call react-profiler-stop.
137238
137308
  Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture } on success, or the already_running payload described above.
137239
137309
  Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
137240
- zodSchema: zodSchema43,
137310
+ zodSchema: zodSchema44,
137241
137311
  capability: RN_ONLY_TOOL_CAPABILITY,
137242
137312
  services: () => ({}),
137243
137313
  async execute(_services, params) {
@@ -137508,7 +137578,7 @@ async function readCommitTree(path53) {
137508
137578
  }
137509
137579
 
137510
137580
  // ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
137511
- var zodSchema44 = external_exports.object({
137581
+ var zodSchema45 = external_exports.object({
137512
137582
  port: metroPortField,
137513
137583
  device_id: external_exports.string().describe(
137514
137584
  "Device id from list-devices \u2014 the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial)."
@@ -137597,7 +137667,7 @@ Call react-profiler-start first, then exercise the app, then call this.
137597
137667
  Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices } summarizing the session.
137598
137668
  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).
137599
137669
  Fails if no active profiling session exists or the CDP connection was lost during recording.`,
137600
- zodSchema: zodSchema44,
137670
+ zodSchema: zodSchema45,
137601
137671
  capability: RN_ONLY_TOOL_CAPABILITY,
137602
137672
  services: () => ({}),
137603
137673
  async execute(_services, params) {
@@ -137822,7 +137892,7 @@ Fails if no active profiling session exists or the CDP connection was lost durin
137822
137892
 
137823
137893
  // ../tool-server/src/tools/profiler/react/react-profiler-status.ts
137824
137894
  init_zod();
137825
- var zodSchema45 = external_exports.object({
137895
+ var zodSchema46 = external_exports.object({
137826
137896
  port: metroPortField,
137827
137897
  device_id: external_exports.string().describe(
137828
137898
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -137837,7 +137907,7 @@ function createReactProfilerStatusTool(registry2) {
137837
137907
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to check React profiler: ${failureSignal2.error_code}`
137838
137908
  },
137839
137909
  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.`,
137840
- zodSchema: zodSchema45,
137910
+ zodSchema: zodSchema46,
137841
137911
  // RN-only: companion to react-profiler-start.
137842
137912
  capability: RN_ONLY_TOOL_CAPABILITY,
137843
137913
  services: () => ({}),
@@ -139451,7 +139521,7 @@ var annotationSchema = external_exports.object({
139451
139521
  ),
139452
139522
  label: external_exports.string().describe("Description of the action performed")
139453
139523
  });
139454
- var zodSchema46 = external_exports.object({
139524
+ var zodSchema47 = external_exports.object({
139455
139525
  port: metroPortField,
139456
139526
  device_id: external_exports.string().describe(
139457
139527
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139484,7 +139554,7 @@ where tapTimestampMs is the timestampMs returned by the tap/swipe tool and start
139484
139554
  is returned by react-profiler-start.
139485
139555
  Use when the profiling session is complete and you need to interpret the collected data.
139486
139556
  Fails if react-profiler-stop has not been called or no profiling data is stored.`,
139487
- zodSchema: zodSchema46,
139557
+ zodSchema: zodSchema47,
139488
139558
  // RN-only: reads commit data captured via the React DevTools backend, which
139489
139559
  // Chromium does not have.
139490
139560
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -139621,7 +139691,7 @@ Fails if react-profiler-stop has not been called or no profiling data is stored.
139621
139691
  // ../tool-server/src/tools/profiler/react/react-profiler-component-source.ts
139622
139692
  init_zod();
139623
139693
  var import_fs6 = require("fs");
139624
- var zodSchema47 = external_exports.object({
139694
+ var zodSchema48 = external_exports.object({
139625
139695
  component_name: external_exports.string().describe("Name of the React component to look up"),
139626
139696
  project_root: external_exports.string().describe("Absolute path to the RN project root")
139627
139697
  });
@@ -139639,7 +139709,7 @@ var reactProfilerComponentSourceTool = {
139639
139709
  Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
139640
139710
  Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
139641
139711
  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.`,
139642
- zodSchema: zodSchema47,
139712
+ zodSchema: zodSchema48,
139643
139713
  // Declared so the tool catalogue groups this with the other react-profiler-*
139644
139714
  // tools; the HTTP gate itself is a no-op here, as there is no device arg to
139645
139715
  // inspect.
@@ -139695,7 +139765,7 @@ When several files define a component with the same name (e.g. platform variants
139695
139765
  // ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
139696
139766
  init_zod();
139697
139767
  init_src2();
139698
- var zodSchema48 = external_exports.object({
139768
+ var zodSchema49 = external_exports.object({
139699
139769
  port: metroPortField,
139700
139770
  device_id: external_exports.string().describe(
139701
139771
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139777,7 +139847,7 @@ Use when you specifically need to investigate JS CPU hotspots that are NOT tied
139777
139847
  Call react-profiler-stop first. Reads directly from the stored cpuProfile.
139778
139848
  Returns a markdown table of the top hotspot functions with self-time, total-time, and location.
139779
139849
  Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
139780
- zodSchema: zodSchema48,
139850
+ zodSchema: zodSchema49,
139781
139851
  // RN-only: reads a Hermes CPU profile; Chromium's V8 sample format differs.
139782
139852
  capability: RN_ONLY_TOOL_CAPABILITY,
139783
139853
  services: () => ({}),
@@ -139873,7 +139943,7 @@ function renderMarkdownTable2(entries) {
139873
139943
  );
139874
139944
  return [header, sep5, ...rows].join("\n");
139875
139945
  }
139876
- var zodSchema49 = external_exports.object({
139946
+ var zodSchema50 = external_exports.object({
139877
139947
  port: metroPortField,
139878
139948
  device_id: external_exports.string().describe(
139879
139949
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -139891,7 +139961,7 @@ var reactProfilerRendersTool = {
139891
139961
  Returns a markdown table of the top re-rendering components. No profiling session required \u2014 works on a live connected app.
139892
139962
  Use when you want a quick snapshot of render counts without a full profiling session.
139893
139963
  Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
139894
- zodSchema: zodSchema49,
139964
+ zodSchema: zodSchema50,
139895
139965
  // RN-only: queries the React DevTools backend hook on the live runtime.
139896
139966
  capability: RN_ONLY_TOOL_CAPABILITY,
139897
139967
  services: (params) => ({
@@ -140048,7 +140118,7 @@ function buildFiberTreeScript(maxDepth, filter) {
140048
140118
  }
140049
140119
  })()`;
140050
140120
  }
140051
- var zodSchema50 = external_exports.object({
140121
+ var zodSchema51 = external_exports.object({
140052
140122
  port: metroPortField,
140053
140123
  device_id: external_exports.string().describe(
140054
140124
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -140067,7 +140137,7 @@ var reactProfilerFiberTreeTool = {
140067
140137
  Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component).
140068
140138
  Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
140069
140139
  Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
140070
- zodSchema: zodSchema50,
140140
+ zodSchema: zodSchema51,
140071
140141
  // RN-only: walks the fiber tree via the React DevTools backend hook.
140072
140142
  capability: RN_ONLY_TOOL_CAPABILITY,
140073
140143
  services: (params) => ({
@@ -143865,7 +143935,7 @@ function metroDeviceIdParam(description) {
143865
143935
  }
143866
143936
 
143867
143937
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
143868
- var zodSchema51 = external_exports.object({
143938
+ var zodSchema52 = external_exports.object({
143869
143939
  device_id: metroDeviceIdParam(
143870
143940
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143871
143941
  ),
@@ -143879,7 +143949,7 @@ var zodSchema51 = external_exports.object({
143879
143949
  "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."
143880
143950
  )
143881
143951
  });
143882
- var capability28 = {
143952
+ var capability29 = {
143883
143953
  apple: { simulator: true },
143884
143954
  android: { emulator: true, device: true, unknown: true }
143885
143955
  };
@@ -143890,21 +143960,21 @@ var nativeProfilerStartTool = {
143890
143960
  completedMsg: () => "Started native profiler",
143891
143961
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start native profiler: ${failureSignal2.error_code}`
143892
143962
  },
143893
- capability: capability28,
143963
+ capability: capability29,
143894
143964
  description: `Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal).
143895
143965
  Auto-detects the running app process unless app_process is explicitly provided.
143896
143966
  After starting, let the user interact with the app, then call native-profiler-stop.
143897
143967
  Use when you want to capture native CPU, hang, and memory data for a running app.
143898
143968
  Returns { status, pid, traceFile } confirming the recording has started.
143899
143969
  Fails if no app is running on the device, or the profiler cannot attach to the process.`,
143900
- zodSchema: zodSchema51,
143970
+ zodSchema: zodSchema52,
143901
143971
  services: (params) => ({
143902
143972
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
143903
143973
  }),
143904
143974
  async execute(services, params) {
143905
143975
  const api = services.session;
143906
143976
  const device = resolveDevice(params.device_id);
143907
- assertSupported("native-profiler-start", capability28, device);
143977
+ assertSupported("native-profiler-start", capability29, device);
143908
143978
  if (api.platform === "ios") {
143909
143979
  await ensureDeps(["xcrun"]);
143910
143980
  return startNativeProfilerIos(api, params);
@@ -143917,12 +143987,12 @@ Fails if no app is running on the device, or the profiler cannot attach to the p
143917
143987
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-stop.ts
143918
143988
  init_zod();
143919
143989
  init_device_info();
143920
- var zodSchema52 = external_exports.object({
143990
+ var zodSchema53 = external_exports.object({
143921
143991
  device_id: metroDeviceIdParam(
143922
143992
  "Target device id from `list-devices` (iOS UDID or Android serial)."
143923
143993
  )
143924
143994
  });
143925
- var capability29 = {
143995
+ var capability30 = {
143926
143996
  apple: { simulator: true },
143927
143997
  android: { emulator: true, device: true, unknown: true }
143928
143998
  };
@@ -143950,7 +144020,7 @@ var nativeProfilerStopTool = {
143950
144020
  completedMsg: ({ result }) => `Saved native profile ${result.traceFile.filename}`,
143951
144021
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop native profiler: ${failureSignal2.error_code}`
143952
144022
  },
143953
- capability: capability29,
144023
+ capability: capability30,
143954
144024
  // Packaging plus the export passes routinely exceed the 30s MCP fetch timeout.
143955
144025
  longRunning: true,
143956
144026
  description: `Stop native profiling and export trace data.
@@ -143960,14 +144030,14 @@ Call native-profiler-start first.
143960
144030
  Use when the user has finished the interaction to profile and you need to export the trace.
143961
144031
  Returns { traceFile, exportedFiles, exportDiagnostics? }; traceFile is the raw trace bundle and exportedFiles the exports, all downloadable artifacts materialized to local paths.
143962
144032
  Fails if no active native-profiler-start session exists for the given device_id.`,
143963
- zodSchema: zodSchema52,
144033
+ zodSchema: zodSchema53,
143964
144034
  services: (params) => ({
143965
144035
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
143966
144036
  }),
143967
144037
  async execute(services, params, ctx) {
143968
144038
  const api = services.session;
143969
144039
  const device = resolveDevice(params.device_id);
143970
- assertSupported("native-profiler-stop", capability29, device);
144040
+ assertSupported("native-profiler-stop", capability30, device);
143971
144041
  if (api.platform === "ios") {
143972
144042
  await ensureDeps(["xcrun"]);
143973
144043
  const ios = await stopNativeProfilerIos(api);
@@ -143995,12 +144065,12 @@ Fails if no active native-profiler-start session exists for the given device_id.
143995
144065
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-analyze.ts
143996
144066
  init_zod();
143997
144067
  init_device_info();
143998
- var zodSchema53 = external_exports.object({
144068
+ var zodSchema54 = external_exports.object({
143999
144069
  device_id: metroDeviceIdParam(
144000
144070
  "Target device id from `list-devices` (iOS UDID or Android serial)."
144001
144071
  )
144002
144072
  });
144003
- var capability30 = {
144073
+ var capability31 = {
144004
144074
  apple: { simulator: true },
144005
144075
  android: { emulator: true, device: true, unknown: true }
144006
144076
  };
@@ -144011,7 +144081,7 @@ var nativeProfilerAnalyzeTool = {
144011
144081
  completedMsg: () => "Analyzed native profile",
144012
144082
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to analyze native profile: ${failureSignal2.error_code}`
144013
144083
  },
144014
- capability: capability30,
144084
+ capability: capability31,
144015
144085
  // Parsing a trace from a recording up to RECORDING_CAP_MS long routinely exceeds
144016
144086
  // the 30s MCP fetch timeout, and an aborted call is replayed, not cancelled.
144017
144087
  longRunning: true,
@@ -144024,14 +144094,14 @@ profiler-stack-query for hang stacks, CPU context, leak details) or implement fi
144024
144094
  Call native-profiler-stop first to export the trace data.
144025
144095
  Use when you need to interpret a completed native profiling recording.
144026
144096
  Fails if native-profiler-stop has not been called first to export trace data.`,
144027
- zodSchema: zodSchema53,
144097
+ zodSchema: zodSchema54,
144028
144098
  services: (params) => ({
144029
144099
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
144030
144100
  }),
144031
144101
  async execute(services, params, ctx) {
144032
144102
  const api = services.session;
144033
144103
  const device = resolveDevice(params.device_id);
144034
- assertSupported("native-profiler-analyze", capability30, device);
144104
+ assertSupported("native-profiler-analyze", capability31, device);
144035
144105
  let result;
144036
144106
  if (api.platform === "ios") {
144037
144107
  await ensureDeps(["xcrun"]);
@@ -145094,7 +145164,7 @@ var DEFAULT_TIME_LIMIT_SECONDS = 180;
145094
145164
  var MAX_TIME_LIMIT_SECONDS = 600;
145095
145165
  var POINTER_TRAIL_LENGTH = 8;
145096
145166
  var POINTER_REQUEST_TIMEOUT_MS = 2e3;
145097
- var zodSchema54 = external_exports.object({
145167
+ var zodSchema55 = external_exports.object({
145098
145168
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial)."),
145099
145169
  timeLimitSeconds: external_exports.number().int().min(1).max(MAX_TIME_LIMIT_SECONDS).optional().describe(
145100
145170
  `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.`
@@ -145106,7 +145176,7 @@ var zodSchema54 = external_exports.object({
145106
145176
  "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."
145107
145177
  )
145108
145178
  });
145109
- var capability31 = {
145179
+ var capability32 = {
145110
145180
  apple: { simulator: true },
145111
145181
  android: { emulator: true, device: true, unknown: true }
145112
145182
  };
@@ -145118,7 +145188,7 @@ function createScreenRecordingStartTool(registry2) {
145118
145188
  completedMsg: () => "Started screen recording",
145119
145189
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to start screen recording: ${failureSignal2.error_code}`
145120
145190
  },
145121
- capability: capability31,
145191
+ capability: capability32,
145122
145192
  description: `Start recording the device screen to a video file (h264 mp4, 30fps at the device's native resolution).
145123
145193
  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.
145124
145194
  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.
@@ -145127,7 +145197,7 @@ Use when the user wants a video of an interaction, animation, or app behavior \u
145127
145197
  Returns { status: "recording", timeLimitSeconds, outputFile } \u2014 the video is retrieved later by \`screen-recording-stop\`, not by reading outputFile directly.
145128
145198
  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).`,
145129
145199
  searchHint: "record video screen capture movie mp4 start filming screencast",
145130
- zodSchema: zodSchema54,
145200
+ zodSchema: zodSchema55,
145131
145201
  // Resolved inside execute, not declared eagerly: a tvOS udid classifies as
145132
145202
  // iOS by shape, so an eager service would spawn simulator-server for a
145133
145203
  // device it cannot drive and hang on its ready timeout (as in `screenshot`).
@@ -145137,7 +145207,7 @@ Fails if a recording is already running on the device, the device is not booted,
145137
145207
  async execute(services, params) {
145138
145208
  const api = services.session;
145139
145209
  const device = resolveDevice(params.udid);
145140
- assertSupported("screen-recording-start", capability31, device);
145210
+ assertSupported("screen-recording-start", capability32, device);
145141
145211
  if (device.platform === "ios" && await isTvOsSimulator(params.udid)) {
145142
145212
  throw new FailureError(
145143
145213
  `Screen recording is not supported on tvOS simulators (device ${params.udid}).`,
@@ -145226,11 +145296,11 @@ function makePointerControl(simulator) {
145226
145296
  var import_node_path22 = require("node:path");
145227
145297
  init_zod();
145228
145298
  init_device_info();
145229
- var zodSchema55 = external_exports.object({
145299
+ var zodSchema56 = external_exports.object({
145230
145300
  udid: external_exports.string().describe("Target device id from `list-devices` (iOS Simulator UDID or Android serial).")
145231
145301
  });
145232
145302
  var RECORDINGS_DIR = ".argent/recordings";
145233
- var capability32 = {
145303
+ var capability33 = {
145234
145304
  apple: { simulator: true },
145235
145305
  android: { emulator: true, device: true, unknown: true }
145236
145306
  };
@@ -145241,21 +145311,21 @@ var screenRecordingStopTool = {
145241
145311
  completedMsg: ({ result }) => `Saved screen recording ${result.video.filename}`,
145242
145312
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to stop screen recording: ${failureSignal2.error_code}`
145243
145313
  },
145244
- capability: capability32,
145314
+ capability: capability33,
145245
145315
  description: `Stop the screen recording started by \`screen-recording-start\` and retrieve the video: frame capture ends and ffmpeg finalizes the mp4.
145246
145316
  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.
145247
145317
  Use when the interaction being captured is finished, or a tool-result note reminds you a recording is still running.
145248
145318
  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.
145249
145319
  Fails if no recording (running or finished-but-unretrieved) exists for the given udid.`,
145250
145320
  searchHint: "stop end finish screen recording video capture save retrieve",
145251
- zodSchema: zodSchema55,
145321
+ zodSchema: zodSchema56,
145252
145322
  services: (params) => ({
145253
145323
  session: screenRecordingSessionRef(resolveDevice(params.udid))
145254
145324
  }),
145255
145325
  async execute(services, params, ctx) {
145256
145326
  const api = services.session;
145257
145327
  const device = resolveDevice(params.udid);
145258
- assertSupported("screen-recording-stop", capability32, device);
145328
+ assertSupported("screen-recording-stop", capability33, device);
145259
145329
  const stopped = await stopCapture(api);
145260
145330
  const artifacts = requireArtifacts(ctx);
145261
145331
  const video = await artifacts.register({
@@ -145287,7 +145357,7 @@ var timeWindowSchema = external_exports.object({
145287
145357
  "End of window in ms since profiling started \u2014 the same clock profiler-commit-query prints"
145288
145358
  )
145289
145359
  });
145290
- var zodSchema56 = external_exports.object({
145360
+ var zodSchema57 = external_exports.object({
145291
145361
  port: metroPortField,
145292
145362
  device_id: metroDeviceIdParam(
145293
145363
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -145576,7 +145646,7 @@ Every table states how many samples it covers and how much of that was idle.
145576
145646
  Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
145577
145647
  Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
145578
145648
  Fails if no CPU profile is stored \u2014 run react-profiler-stop first.`,
145579
- zodSchema: zodSchema56,
145649
+ zodSchema: zodSchema57,
145580
145650
  // RN-only: reads Hermes-format CPU profiles; Chromium's V8 sample format differs.
145581
145651
  capability: RN_ONLY_TOOL_CAPABILITY,
145582
145652
  services: () => ({}),
@@ -145662,7 +145732,7 @@ var timeRangeSchema = external_exports.object({
145662
145732
  "End of range in ms since profiling started \u2014 the same clock profiler-commit-query prints"
145663
145733
  )
145664
145734
  });
145665
- var zodSchema57 = external_exports.object({
145735
+ var zodSchema58 = external_exports.object({
145666
145736
  port: metroPortField,
145667
145737
  device_id: metroDeviceIdParam(
145668
145738
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -145935,7 +146005,7 @@ Modes:
145935
146005
  Use when drilling into specific components or time windows after react-profiler-analyze.
145936
146006
  Returns a markdown table or tree of commit data matching the requested mode.
145937
146007
  Fails if react-profiler-stop has not been called or no commit data is stored.`,
145938
- zodSchema: zodSchema57,
146008
+ zodSchema: zodSchema58,
145939
146009
  // Reads React commit data captured via the React DevTools backend.
145940
146010
  capability: RN_ONLY_TOOL_CAPABILITY,
145941
146011
  services: () => ({}),
@@ -146006,7 +146076,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
146006
146076
  init_zod();
146007
146077
  init_src2();
146008
146078
  init_device_info();
146009
- var zodSchema58 = external_exports.object({
146079
+ var zodSchema59 = external_exports.object({
146010
146080
  device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
146011
146081
  mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe(
146012
146082
  "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)"
@@ -146324,7 +146394,7 @@ Modes:
146324
146394
  Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze.
146325
146395
  Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode.
146326
146396
  Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.`,
146327
- zodSchema: zodSchema58,
146397
+ zodSchema: zodSchema59,
146328
146398
  // No chromium entry: it has no native trace capture.
146329
146399
  capability: {
146330
146400
  apple: { simulator: true },
@@ -146394,7 +146464,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
146394
146464
  }
146395
146465
 
146396
146466
  // ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
146397
- var zodSchema59 = external_exports.object({
146467
+ var zodSchema60 = external_exports.object({
146398
146468
  port: metroPortField,
146399
146469
  device_id: metroDeviceIdParam("iOS Simulator/device UDID or Android serial")
146400
146470
  });
@@ -146411,7 +146481,7 @@ Requires both react-profiler-analyze and native-profiler-analyze to have been ca
146411
146481
  Call this tool when both profilers were run in parallel on the same session.
146412
146482
  Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
146413
146483
  Fails if either react-profiler-analyze or native-profiler-analyze has not been called first.`,
146414
- zodSchema: zodSchema59,
146484
+ zodSchema: zodSchema60,
146415
146485
  // iOS reads xctrace output; Android re-queries the Perfetto .pftrace via
146416
146486
  // loadAndroidCombinedData. Chromium has no native trace capture.
146417
146487
  capability: {
@@ -146735,7 +146805,7 @@ function assertSafeSessionId(sessionId) {
146735
146805
  );
146736
146806
  }
146737
146807
  }
146738
- var zodSchema60 = external_exports.object({
146808
+ var zodSchema61 = external_exports.object({
146739
146809
  mode: external_exports.enum(["list", "load_react", "load_native"]).describe(
146740
146810
  "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."
146741
146811
  ),
@@ -147096,7 +147166,7 @@ Modes:
147096
147166
  For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar.
147097
147167
  Returns a summary of the loaded session or a session list for the list mode.
147098
147168
  Fails if the session_id is not found or required XML files are missing from disk.`,
147099
- zodSchema: zodSchema60,
147169
+ zodSchema: zodSchema61,
147100
147170
  // The Hermes, xctrace and perfetto formats this loads have no Chromium
147101
147171
  // equivalent; the gate fails at the call site, not inside the trace parser.
147102
147172
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -147225,7 +147295,7 @@ function unnameableSessionUrns(urns) {
147225
147295
  }
147226
147296
 
147227
147297
  // ../tool-server/src/tools/simulator/stop-simulator-server.ts
147228
- var zodSchema61 = external_exports.object({
147298
+ var zodSchema62 = external_exports.object({
147229
147299
  udid: external_exports.string().describe(
147230
147300
  "Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
147231
147301
  )
@@ -147239,7 +147309,7 @@ function createStopSimulatorServerTool(registry2) {
147239
147309
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop simulator server for ${params.udid}: ${failureSignal2.error_code}`
147240
147310
  },
147241
147311
  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.`,
147242
- zodSchema: zodSchema61,
147312
+ zodSchema: zodSchema62,
147243
147313
  services: () => ({}),
147244
147314
  async execute(_services, params) {
147245
147315
  const udid = params.udid;
@@ -147270,7 +147340,7 @@ function createStopSimulatorServerTool(registry2) {
147270
147340
  init_zod();
147271
147341
  init_src2();
147272
147342
  init_external_devices();
147273
- var zodSchema62 = external_exports.object({
147343
+ var zodSchema63 = external_exports.object({
147274
147344
  devices: external_exports.array(external_exports.string()).optional().describe(
147275
147345
  "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."
147276
147346
  )
@@ -147309,7 +147379,7 @@ function createStopAllSimulatorServersTool(registry2) {
147309
147379
  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.
147310
147380
  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.
147311
147381
  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 live debugger sessions (and the network inspectors / React profiler sessions riding on them) whose id no device scope can name - re-call with that id 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.`,
147312
- zodSchema: zodSchema62,
147382
+ zodSchema: zodSchema63,
147313
147383
  services: () => ({}),
147314
147384
  async execute(_services, params, ctx) {
147315
147385
  const devices = params.devices;
@@ -147389,7 +147459,7 @@ function listeningPids(port) {
147389
147459
  if (!output) return [];
147390
147460
  return output.split("\n").map((s) => parseInt(s.trim(), 10)).filter((n) => !Number.isNaN(n));
147391
147461
  }
147392
- var zodSchema63 = external_exports.object({
147462
+ var zodSchema64 = external_exports.object({
147393
147463
  port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on (default 8081)")
147394
147464
  });
147395
147465
  var stopMetroTool = {
@@ -147400,7 +147470,7 @@ var stopMetroTool = {
147400
147470
  failedMsg: ({ params, failureSignal: failureSignal2 }) => `Failed to stop Metro on port ${params.port}: ${failureSignal2.error_code}`
147401
147471
  },
147402
147472
  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.`,
147403
- zodSchema: zodSchema63,
147473
+ zodSchema: zodSchema64,
147404
147474
  services: () => ({}),
147405
147475
  async execute(_services, params) {
147406
147476
  const port = params.port;
@@ -149744,7 +149814,7 @@ async function appendStepToFlow(session, step) {
149744
149814
  }
149745
149815
 
149746
149816
  // ../tool-server/src/tools/flows/flow-start-recording.ts
149747
- var zodSchema64 = external_exports.object({
149817
+ var zodSchema65 = external_exports.object({
149748
149818
  name: external_exports.string().describe(
149749
149819
  'Name for this flow (e.g. "settings-explore") \u2014 letters, digits, underscore and hyphen only.'
149750
149820
  ),
@@ -149801,7 +149871,7 @@ recording. Over a link, the next recorded step writes over your edit.
149801
149871
  Without a link, the recorder reads the file again before each step, but an
149802
149872
  edit that renumbers the steps drops the warnings that flow-finish-recording
149803
149873
  reports for those steps.`,
149804
- zodSchema: zodSchema64,
149874
+ zodSchema: zodSchema65,
149805
149875
  fileInputs: fileInputs2,
149806
149876
  services: () => ({}),
149807
149877
  async execute(_services, params, ctx) {
@@ -152301,7 +152371,7 @@ function stepAnchor(step) {
152301
152371
 
152302
152372
  // ../tool-server/src/tools/flows/flow-add-step.ts
152303
152373
  init_device_info();
152304
- var zodSchema65 = external_exports.object({
152374
+ var zodSchema66 = external_exports.object({
152305
152375
  name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
152306
152376
  project_root: external_exports.string().describe(
152307
152377
  "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."
@@ -152760,7 +152830,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
152760
152830
  // more times — and every retry re-runs the action and appends another step,
152761
152831
  // because an aborted request still appends its first.
152762
152832
  longRunning: true,
152763
- zodSchema: zodSchema65,
152833
+ zodSchema: zodSchema66,
152764
152834
  fileInputs: fileInputs3,
152765
152835
  services: () => ({}),
152766
152836
  async execute(_services, params, ctx) {
@@ -152949,7 +153019,7 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
152949
153019
 
152950
153020
  // ../tool-server/src/tools/flows/flow-insert-echo.ts
152951
153021
  init_zod();
152952
- var zodSchema66 = external_exports.object({
153022
+ var zodSchema67 = external_exports.object({
152953
153023
  name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
152954
153024
  project_root: external_exports.string().describe(
152955
153025
  "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."
@@ -152967,7 +153037,7 @@ var flowInsertEchoTool = {
152967
153037
  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.
152968
153038
  Use when you want to annotate a recorded flow with a human-readable label or checkpoint message.
152969
153039
  Returns { message, stepCount, savedTo }. Fails if that flow has no recording in progress.`,
152970
- zodSchema: zodSchema66,
153040
+ zodSchema: zodSchema67,
152971
153041
  services: () => ({}),
152972
153042
  async execute(_services, params) {
152973
153043
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154270,7 +154340,7 @@ function errMsg3(err) {
154270
154340
 
154271
154341
  // ../tool-server/src/tools/flows/flow-add-script.ts
154272
154342
  var OUTPUT_RENDER_LIMIT_BYTES = 64 * 1024;
154273
- var zodSchema67 = external_exports.object({
154343
+ var zodSchema68 = external_exports.object({
154274
154344
  name: external_exports.string().describe("Flow name passed to flow-start-recording."),
154275
154345
  project_root: external_exports.string().describe("Absolute project root passed to flow-start-recording."),
154276
154346
  path: external_exports.string().describe(
@@ -154327,7 +154397,7 @@ var flowAddScriptTool = {
154327
154397
  // The flag only skips the adapter's own abort timer; its retry loop is
154328
154398
  // untouched, so a call that fails some other way is still re-POSTed.
154329
154399
  longRunning: true,
154330
- zodSchema: zodSchema67,
154400
+ zodSchema: zodSchema68,
154331
154401
  services: () => ({}),
154332
154402
  async execute(_services, params, ctx) {
154333
154403
  const session = await requireRecordingSession(params.project_root, params.name);
@@ -154417,7 +154487,7 @@ var flowAddScriptTool = {
154417
154487
  // ../tool-server/src/tools/flows/flow-finish-recording.ts
154418
154488
  init_zod();
154419
154489
  var fs60 = __toESM(require("node:fs/promises"));
154420
- var zodSchema68 = external_exports.object({
154490
+ var zodSchema69 = external_exports.object({
154421
154491
  name: external_exports.string().describe("Name of the flow being recorded \u2014 the one passed to flow-start-recording."),
154422
154492
  project_root: external_exports.string().describe(
154423
154493
  "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."
@@ -154476,7 +154546,7 @@ var flowFinishRecordingTool = {
154476
154546
  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.
154477
154547
  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.
154478
154548
  You can still edit the .yaml file directly afterwards to remove or reorder steps.`,
154479
- zodSchema: zodSchema68,
154549
+ zodSchema: zodSchema69,
154480
154550
  services: () => ({}),
154481
154551
  async execute(_services, params) {
154482
154552
  const { filePath, flowFile, savedTo, flow, summary, headline } = await withFlowFileLock(
@@ -156954,7 +157024,7 @@ async function restoreStatusBar(device) {
156954
157024
  }
156955
157025
 
156956
157026
  // ../tool-server/src/tools/flows/flow-run.ts
156957
- var zodSchema69 = external_exports.object({
157027
+ var zodSchema70 = external_exports.object({
156958
157028
  name: external_exports.string().optional().describe(
156959
157029
  'Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
156960
157030
  ),
@@ -157461,7 +157531,7 @@ one-off interaction use the gesture tools instead, and to author a flow use flow
157461
157531
  exactly one flow source: name (under project_root) or flow_path.
157462
157532
  Returns a per-step report: the first failure stops the run and the rest report as skipped.`,
157463
157533
  longRunning: true,
157464
- zodSchema: zodSchema69,
157534
+ zodSchema: zodSchema70,
157465
157535
  fileInputs: fileInputs4,
157466
157536
  services: () => ({}),
157467
157537
  async execute(_services, params, ctx) {
@@ -158438,7 +158508,7 @@ async function resolveFlowSource(params, fileInput, flowPathInput) {
158438
158508
  // ../tool-server/src/tools/flows/flow-read-prerequisite.ts
158439
158509
  init_zod();
158440
158510
  var fs64 = __toESM(require("node:fs/promises"));
158441
- var zodSchema70 = external_exports.object({
158511
+ var zodSchema71 = external_exports.object({
158442
158512
  name: external_exports.string().optional().describe(
158443
158513
  'Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set.'
158444
158514
  ),
@@ -158494,7 +158564,7 @@ Touches no device: nothing is launched, tapped, dispatched or torn down, and no
158494
158564
  needs booting, so calling this costs nothing but a file read.
158495
158565
  Fails if the flow file does not exist.
158496
158566
  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.`,
158497
- zodSchema: zodSchema70,
158567
+ zodSchema: zodSchema71,
158498
158568
  fileInputs: fileInputs5,
158499
158569
  services: () => ({}),
158500
158570
  async execute(_services, params, ctx) {
@@ -158810,7 +158880,7 @@ async function readWorkspaceSnapshot(workspacePath) {
158810
158880
  }
158811
158881
 
158812
158882
  // ../tool-server/src/tools/workspace/gather-workspace-data.ts
158813
- var zodSchema71 = external_exports.object({
158883
+ var zodSchema72 = external_exports.object({
158814
158884
  workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
158815
158885
  });
158816
158886
  var fileInputs6 = [
@@ -158841,7 +158911,7 @@ exploration of anything the snapshot surfaces.
158841
158911
  Use when you need to inspect project configuration without manually reading multiple files.
158842
158912
  Returns partial data if workspacePath does not exist or is not readable; missing items are represented as null or empty collections.
158843
158913
  Fails if the workspacePath is not an absolute path or the directory cannot be accessed.`,
158844
- zodSchema: zodSchema71,
158914
+ zodSchema: zodSchema72,
158845
158915
  fileInputs: fileInputs6,
158846
158916
  services: () => ({}),
158847
158917
  async execute(_services, params) {
@@ -158915,7 +158985,7 @@ function targetFlagsFor(target) {
158915
158985
  if (target === "both") return ["--global", "--local"];
158916
158986
  return [`--${target}`];
158917
158987
  }
158918
- var zodSchema72 = external_exports.object({
158988
+ var zodSchema73 = external_exports.object({
158919
158989
  target: external_exports.enum(["auto", "global", "local", "both"]).optional().describe(
158920
158990
  "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."
158921
158991
  )
@@ -158929,7 +158999,7 @@ var updateArgentTool = {
158929
158999
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to update Argent: ${failureSignal2.error_code}`
158930
159000
  },
158931
159001
  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.",
158932
- zodSchema: zodSchema72,
159002
+ zodSchema: zodSchema73,
158933
159003
  services: () => ({}),
158934
159004
  async execute(_services, params, _options) {
158935
159005
  const { updateAvailable, updateInstallable, currentVersion, installableVersion } = getUpdateState();
@@ -159014,7 +159084,7 @@ var updateArgentTool = {
159014
159084
 
159015
159085
  // ../tool-server/src/tools/system/dismiss-update.ts
159016
159086
  init_zod();
159017
- var zodSchema73 = external_exports.object({
159087
+ var zodSchema74 = external_exports.object({
159018
159088
  hours: external_exports.number().min(0).describe("Number of hours to suppress the update notification")
159019
159089
  });
159020
159090
  var dismissUpdateTool = {
@@ -159025,7 +159095,7 @@ var dismissUpdateTool = {
159025
159095
  failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to dismiss Argent update: ${failureSignal2.error_code}`
159026
159096
  },
159027
159097
  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.",
159028
- zodSchema: zodSchema73,
159098
+ zodSchema: zodSchema74,
159029
159099
  services: () => ({}),
159030
159100
  async execute(_services, params, _options) {
159031
159101
  const durationMs = params.hours * 60 * 60 * 1e3;
@@ -159044,7 +159114,7 @@ var import_path8 = __toESM(require("path"));
159044
159114
  init_zod();
159045
159115
  init_src2();
159046
159116
  init_device_info();
159047
- var zodSchema74 = external_exports.object({
159117
+ var zodSchema75 = external_exports.object({
159048
159118
  baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
159049
159119
  currentPath: external_exports.string().min(1).optional().describe("Path to the current PNG file. Required unless captureCurrent is true."),
159050
159120
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
@@ -159061,7 +159131,7 @@ var zodSchema74 = external_exports.object({
159061
159131
  "Directory where diff artifacts should be written. Optional \u2014 defaults to a temp directory; the diff images are returned in the result either way."
159062
159132
  )
159063
159133
  }).strict();
159064
- var capability33 = {
159134
+ var capability34 = {
159065
159135
  apple: { simulator: true, device: true },
159066
159136
  android: { emulator: true, device: true, unknown: true }
159067
159137
  };
@@ -159086,8 +159156,8 @@ Returns { summary, diffPath, contextDiffPath }. The summary uses normalized [0,1
159086
159156
  Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
159087
159157
  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.`,
159088
159158
  searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture",
159089
- zodSchema: zodSchema74,
159090
- capability: capability33,
159159
+ zodSchema: zodSchema75,
159160
+ capability: capability34,
159091
159161
  fileInputs: fileInputs7,
159092
159162
  services: (params) => {
159093
159163
  if (params.captureBaseline || params.captureCurrent) {
@@ -159400,7 +159470,7 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
159400
159470
  }
159401
159471
 
159402
159472
  // ../tool-server/src/tools/variants/propose-variant.ts
159403
- var zodSchema75 = external_exports.object({
159473
+ var zodSchema76 = external_exports.object({
159404
159474
  element: external_exports.string().min(1).max(200).describe(
159405
159475
  '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.'
159406
159476
  ),
@@ -159460,7 +159530,7 @@ arrives as a follow-up message (this is the case in an \`argent lens\` CLI sessi
159460
159530
  Returns { round, elementId, variantId, element, variantCount, totalElements } \u2014 confirmation only;
159461
159531
  it does not wait for the user.`,
159462
159532
  searchHint: "propose design variant alternative option for element non-blocking ab choice",
159463
- zodSchema: zodSchema75,
159533
+ zodSchema: zodSchema76,
159464
159534
  services: () => ({}),
159465
159535
  async execute(_services, params) {
159466
159536
  let frame = params.variant.frame;
@@ -159484,7 +159554,7 @@ it does not wait for the user.`,
159484
159554
 
159485
159555
  // ../tool-server/src/tools/variants/await-user-selection.ts
159486
159556
  init_zod();
159487
- var zodSchema76 = external_exports.object({
159557
+ var zodSchema77 = external_exports.object({
159488
159558
  timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
159489
159559
  "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."
159490
159560
  )
@@ -159525,7 +159595,7 @@ This tool is long-running; it intentionally holds the request open. It honors cl
159525
159595
  disconnects (aborts cleanly).`,
159526
159596
  searchHint: "await wait user selection choice variant blocking confirm picks complete",
159527
159597
  longRunning: true,
159528
- zodSchema: zodSchema76,
159598
+ zodSchema: zodSchema77,
159529
159599
  services: () => ({}),
159530
159600
  async execute(_services, params, options) {
159531
159601
  const timeoutMs = (params.timeoutSeconds ?? 1800) * 1e3;
@@ -159540,7 +159610,7 @@ disconnects (aborts cleanly).`,
159540
159610
  init_zod();
159541
159611
  init_src2();
159542
159612
  init_device_info();
159543
- var zodSchema77 = external_exports.object({
159613
+ var zodSchema78 = external_exports.object({
159544
159614
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159545
159615
  action: external_exports.enum(["list", "select", "new", "close"]).describe(
159546
159616
  "list: enumerate tabs/windows. select: make a tab active (every other tool then acts on it). new: open a tab. close: close a tab."
@@ -159573,7 +159643,7 @@ var tabAction = {
159573
159643
  failure: "close"
159574
159644
  }
159575
159645
  };
159576
- var capability34 = {
159646
+ var capability35 = {
159577
159647
  chromium: { app: true }
159578
159648
  };
159579
159649
  var chromiumTabsTool = {
@@ -159591,8 +159661,8 @@ var chromiumTabsTool = {
159591
159661
  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.
159592
159662
  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.`,
159593
159663
  searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
159594
- zodSchema: zodSchema77,
159595
- capability: capability34,
159664
+ zodSchema: zodSchema78,
159665
+ capability: capability35,
159596
159666
  services: (params) => {
159597
159667
  const device = resolveDevice(params.udid);
159598
159668
  if (device.platform === "chromium") {
@@ -159693,7 +159763,7 @@ async function clearStorage(cdp, type) {
159693
159763
  }
159694
159764
 
159695
159765
  // ../tool-server/src/tools/chromium-cookies/index.ts
159696
- var zodSchema78 = external_exports.object({
159766
+ var zodSchema79 = external_exports.object({
159697
159767
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159698
159768
  action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
159699
159769
  "get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."
@@ -159716,7 +159786,7 @@ var cookieAction = {
159716
159786
  delete: { started: "Deleting", completed: "Deleted", failure: "delete" },
159717
159787
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159718
159788
  };
159719
- var capability35 = {
159789
+ var capability36 = {
159720
159790
  chromium: { app: true }
159721
159791
  };
159722
159792
  var chromiumCookiesTool = {
@@ -159734,8 +159804,8 @@ var chromiumCookiesTool = {
159734
159804
  Use when seeding an authenticated session before a flow (set the session cookie, then navigate) or asserting cookie state after one.
159735
159805
  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.`,
159736
159806
  searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
159737
- zodSchema: zodSchema78,
159738
- capability: capability35,
159807
+ zodSchema: zodSchema79,
159808
+ capability: capability36,
159739
159809
  services: (params) => {
159740
159810
  const device = resolveDevice(params.udid);
159741
159811
  if (device.platform === "chromium") {
@@ -159800,7 +159870,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
159800
159870
  init_zod();
159801
159871
  init_src2();
159802
159872
  init_device_info();
159803
- var zodSchema79 = external_exports.object({
159873
+ var zodSchema80 = external_exports.object({
159804
159874
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
159805
159875
  store: external_exports.enum(["local", "session"]).describe("Which Web Storage area: `local` (localStorage) or `session` (sessionStorage)."),
159806
159876
  action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
@@ -159815,7 +159885,7 @@ var storageAction = {
159815
159885
  remove: { started: "Removing from", completed: "Removed from", failure: "remove from" },
159816
159886
  clear: { started: "Clearing", completed: "Cleared", failure: "clear" }
159817
159887
  };
159818
- var capability36 = {
159888
+ var capability37 = {
159819
159889
  chromium: { app: true }
159820
159890
  };
159821
159891
  var chromiumStorageTool = {
@@ -159834,8 +159904,8 @@ Set \`store\` to "local" or "session". Storage is per-origin, so it reflects the
159834
159904
  Use when seeding feature flags / auth tokens before a flow or asserting persisted app state after one.
159835
159905
  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.`,
159836
159906
  searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
159837
- zodSchema: zodSchema79,
159838
- capability: capability36,
159907
+ zodSchema: zodSchema80,
159908
+ capability: capability37,
159839
159909
  services: (params) => {
159840
159910
  const device = resolveDevice(params.udid);
159841
159911
  if (device.platform === "chromium") {
@@ -159947,6 +160017,7 @@ function createRegistry() {
159947
160017
  registry2.registerTool(networkRequestTool);
159948
160018
  registry2.registerTool(createDescribeTool(registry2));
159949
160019
  registry2.registerTool(createUiTreeTool(registry2));
160020
+ registry2.registerTool(createForegroundAppTool(registry2));
159950
160021
  registry2.registerTool(createAwaitUiElementTool(registry2));
159951
160022
  registry2.registerTool(createAwaitScreenIdleTool(registry2));
159952
160023
  registry2.registerTool(createReactProfilerStartTool(registry2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.28.1-next.10",
3
+ "version": "0.28.1-next.11",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator and Android Emulator control",
6
6
  "license": "Apache-2.0",