@swmansion/argent 0.14.1-next.10 → 0.14.1-next.12

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.
Binary file
Binary file
Binary file
@@ -18810,8 +18810,21 @@ async function startMcpServer(options) {
18810
18810
  }
18811
18811
  const udid = getUdidFromArgs(params.arguments);
18812
18812
  if (autoScreenshotOn && udid && shouldAutoScreenshot(params.name)) {
18813
- const delayMs = getAutoScreenshotDelayMs(params.name);
18814
- if (delayMs > 0) await new Promise((r) => setTimeout(r, delayMs));
18813
+ const maxWaitMs = getAutoScreenshotDelayMs(params.name);
18814
+ if (maxWaitMs > 0) {
18815
+ try {
18816
+ const idle = await callTool("await-screen-idle", { udid, timeoutMs: maxWaitMs });
18817
+ await spyLog({
18818
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
18819
+ event: "auto_screenshot_readiness",
18820
+ name: params.name,
18821
+ maxWaitMs,
18822
+ ...idle.result
18823
+ });
18824
+ } catch {
18825
+ await new Promise((r) => setTimeout(r, maxWaitMs));
18826
+ }
18827
+ }
18815
18828
  try {
18816
18829
  const screenshotResult = await callTool("screenshot", { udid });
18817
18830
  const screenshotContent = await toMcpContent(screenshotResult.result, "image", {
@@ -12075,8 +12075,8 @@ function finalize(ctx, schema) {
12075
12075
  const root2 = ctx.seen.get(schema);
12076
12076
  if (!root2)
12077
12077
  throw new Error("Unprocessed schema. This is a bug in Zod.");
12078
- const flattenRef = (zodSchema70) => {
12079
- const seen = ctx.seen.get(zodSchema70);
12078
+ const flattenRef = (zodSchema71) => {
12079
+ const seen = ctx.seen.get(zodSchema71);
12080
12080
  if (seen.ref === null)
12081
12081
  return;
12082
12082
  const schema2 = seen.def ?? seen.schema;
@@ -12094,7 +12094,7 @@ function finalize(ctx, schema) {
12094
12094
  Object.assign(schema2, refSchema);
12095
12095
  }
12096
12096
  Object.assign(schema2, _cached);
12097
- const isParentRef = zodSchema70._zod.parent === ref;
12097
+ const isParentRef = zodSchema71._zod.parent === ref;
12098
12098
  if (isParentRef) {
12099
12099
  for (const key in schema2) {
12100
12100
  if (key === "$ref" || key === "allOf")
@@ -12114,7 +12114,7 @@ function finalize(ctx, schema) {
12114
12114
  }
12115
12115
  }
12116
12116
  }
12117
- const parent = zodSchema70._zod.parent;
12117
+ const parent = zodSchema71._zod.parent;
12118
12118
  if (parent && parent !== ref) {
12119
12119
  flattenRef(parent);
12120
12120
  const parentSeen = ctx.seen.get(parent);
@@ -12132,7 +12132,7 @@ function finalize(ctx, schema) {
12132
12132
  }
12133
12133
  }
12134
12134
  ctx.override({
12135
- zodSchema: zodSchema70,
12135
+ zodSchema: zodSchema71,
12136
12136
  jsonSchema: schema2,
12137
12137
  path: seen.path ?? []
12138
12138
  });
@@ -14933,10 +14933,10 @@ function convertBaseSchema(schema, ctx) {
14933
14933
  }
14934
14934
  ctx.processing.add(refPath);
14935
14935
  const resolved = resolveRef(refPath, ctx);
14936
- const zodSchema71 = convertSchema(resolved, ctx);
14937
- ctx.refs.set(refPath, zodSchema71);
14936
+ const zodSchema72 = convertSchema(resolved, ctx);
14937
+ ctx.refs.set(refPath, zodSchema72);
14938
14938
  ctx.processing.delete(refPath);
14939
- return zodSchema71;
14939
+ return zodSchema72;
14940
14940
  }
14941
14941
  if (schema.enum !== void 0) {
14942
14942
  const enumValues = schema.enum;
@@ -14978,7 +14978,7 @@ function convertBaseSchema(schema, ctx) {
14978
14978
  if (!type) {
14979
14979
  return z.any();
14980
14980
  }
14981
- let zodSchema70;
14981
+ let zodSchema71;
14982
14982
  switch (type) {
14983
14983
  case "string": {
14984
14984
  let stringSchema = z.string();
@@ -15041,7 +15041,7 @@ function convertBaseSchema(schema, ctx) {
15041
15041
  if (schema.pattern) {
15042
15042
  stringSchema = stringSchema.regex(new RegExp(schema.pattern));
15043
15043
  }
15044
- zodSchema70 = stringSchema;
15044
+ zodSchema71 = stringSchema;
15045
15045
  break;
15046
15046
  }
15047
15047
  case "number":
@@ -15066,15 +15066,15 @@ function convertBaseSchema(schema, ctx) {
15066
15066
  if (typeof schema.multipleOf === "number") {
15067
15067
  numberSchema = numberSchema.multipleOf(schema.multipleOf);
15068
15068
  }
15069
- zodSchema70 = numberSchema;
15069
+ zodSchema71 = numberSchema;
15070
15070
  break;
15071
15071
  }
15072
15072
  case "boolean": {
15073
- zodSchema70 = z.boolean();
15073
+ zodSchema71 = z.boolean();
15074
15074
  break;
15075
15075
  }
15076
15076
  case "null": {
15077
- zodSchema70 = z.null();
15077
+ zodSchema71 = z.null();
15078
15078
  break;
15079
15079
  }
15080
15080
  case "object": {
@@ -15089,12 +15089,12 @@ function convertBaseSchema(schema, ctx) {
15089
15089
  const keySchema = convertSchema(schema.propertyNames, ctx);
15090
15090
  const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any();
15091
15091
  if (Object.keys(shape).length === 0) {
15092
- zodSchema70 = z.record(keySchema, valueSchema);
15092
+ zodSchema71 = z.record(keySchema, valueSchema);
15093
15093
  break;
15094
15094
  }
15095
15095
  const objectSchema2 = z.object(shape).passthrough();
15096
15096
  const recordSchema = z.looseRecord(keySchema, valueSchema);
15097
- zodSchema70 = z.intersection(objectSchema2, recordSchema);
15097
+ zodSchema71 = z.intersection(objectSchema2, recordSchema);
15098
15098
  break;
15099
15099
  }
15100
15100
  if (schema.patternProperties) {
@@ -15112,25 +15112,25 @@ function convertBaseSchema(schema, ctx) {
15112
15112
  }
15113
15113
  schemasToIntersect.push(...looseRecords);
15114
15114
  if (schemasToIntersect.length === 0) {
15115
- zodSchema70 = z.object({}).passthrough();
15115
+ zodSchema71 = z.object({}).passthrough();
15116
15116
  } else if (schemasToIntersect.length === 1) {
15117
- zodSchema70 = schemasToIntersect[0];
15117
+ zodSchema71 = schemasToIntersect[0];
15118
15118
  } else {
15119
15119
  let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
15120
15120
  for (let i = 2; i < schemasToIntersect.length; i++) {
15121
15121
  result = z.intersection(result, schemasToIntersect[i]);
15122
15122
  }
15123
- zodSchema70 = result;
15123
+ zodSchema71 = result;
15124
15124
  }
15125
15125
  break;
15126
15126
  }
15127
15127
  const objectSchema = z.object(shape);
15128
15128
  if (schema.additionalProperties === false) {
15129
- zodSchema70 = objectSchema.strict();
15129
+ zodSchema71 = objectSchema.strict();
15130
15130
  } else if (typeof schema.additionalProperties === "object") {
15131
- zodSchema70 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
15131
+ zodSchema71 = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
15132
15132
  } else {
15133
- zodSchema70 = objectSchema.passthrough();
15133
+ zodSchema71 = objectSchema.passthrough();
15134
15134
  }
15135
15135
  break;
15136
15136
  }
@@ -15141,29 +15141,29 @@ function convertBaseSchema(schema, ctx) {
15141
15141
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
15142
15142
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
15143
15143
  if (rest) {
15144
- zodSchema70 = z.tuple(tupleItems).rest(rest);
15144
+ zodSchema71 = z.tuple(tupleItems).rest(rest);
15145
15145
  } else {
15146
- zodSchema70 = z.tuple(tupleItems);
15146
+ zodSchema71 = z.tuple(tupleItems);
15147
15147
  }
15148
15148
  if (typeof schema.minItems === "number") {
15149
- zodSchema70 = zodSchema70.check(z.minLength(schema.minItems));
15149
+ zodSchema71 = zodSchema71.check(z.minLength(schema.minItems));
15150
15150
  }
15151
15151
  if (typeof schema.maxItems === "number") {
15152
- zodSchema70 = zodSchema70.check(z.maxLength(schema.maxItems));
15152
+ zodSchema71 = zodSchema71.check(z.maxLength(schema.maxItems));
15153
15153
  }
15154
15154
  } else if (Array.isArray(items)) {
15155
15155
  const tupleItems = items.map((item) => convertSchema(item, ctx));
15156
15156
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
15157
15157
  if (rest) {
15158
- zodSchema70 = z.tuple(tupleItems).rest(rest);
15158
+ zodSchema71 = z.tuple(tupleItems).rest(rest);
15159
15159
  } else {
15160
- zodSchema70 = z.tuple(tupleItems);
15160
+ zodSchema71 = z.tuple(tupleItems);
15161
15161
  }
15162
15162
  if (typeof schema.minItems === "number") {
15163
- zodSchema70 = zodSchema70.check(z.minLength(schema.minItems));
15163
+ zodSchema71 = zodSchema71.check(z.minLength(schema.minItems));
15164
15164
  }
15165
15165
  if (typeof schema.maxItems === "number") {
15166
- zodSchema70 = zodSchema70.check(z.maxLength(schema.maxItems));
15166
+ zodSchema71 = zodSchema71.check(z.maxLength(schema.maxItems));
15167
15167
  }
15168
15168
  } else if (items !== void 0) {
15169
15169
  const element = convertSchema(items, ctx);
@@ -15174,16 +15174,16 @@ function convertBaseSchema(schema, ctx) {
15174
15174
  if (typeof schema.maxItems === "number") {
15175
15175
  arraySchema = arraySchema.max(schema.maxItems);
15176
15176
  }
15177
- zodSchema70 = arraySchema;
15177
+ zodSchema71 = arraySchema;
15178
15178
  } else {
15179
- zodSchema70 = z.array(z.any());
15179
+ zodSchema71 = z.array(z.any());
15180
15180
  }
15181
15181
  break;
15182
15182
  }
15183
15183
  default:
15184
15184
  throw new Error(`Unsupported type: ${type}`);
15185
15185
  }
15186
- return zodSchema70;
15186
+ return zodSchema71;
15187
15187
  }
15188
15188
  function convertSchema(schema, ctx) {
15189
15189
  if (typeof schema === "boolean") {
@@ -101494,7 +101494,6 @@ var bootstrapDylibPath = () => {
101494
101494
  return requireDylibIn(DYLIB_DIR, "libArgentInjectionBootstrap.dylib");
101495
101495
  };
101496
101496
  var bootstrapDylibPathTcp = () => {
101497
- requireDarwin("bootstrapDylibPathTcp");
101498
101497
  return requireDylibIn(DYLIB_TCP_DIR, "libArgentInjectionBootstrap.dylib");
101499
101498
  };
101500
101499
  var bootstrapDylibPathTvos = () => {
@@ -101502,11 +101501,9 @@ var bootstrapDylibPathTvos = () => {
101502
101501
  return requireDylibIn(DYLIB_TVOS_DIR, "libArgentInjectionBootstrap.dylib");
101503
101502
  };
101504
101503
  var nativeDevtoolsDylibPathTcp = () => {
101505
- requireDarwin("nativeDevtoolsDylibPathTcp");
101506
101504
  return requireDylibIn(DYLIB_TCP_DIR, "libNativeDevtoolsIos.dylib");
101507
101505
  };
101508
101506
  var keyboardPatchDylibPathTcp = () => {
101509
- requireDarwin("keyboardPatchDylibPathTcp");
101510
101507
  return requireDylibIn(DYLIB_TCP_DIR, "libKeyboardPatch.dylib");
101511
101508
  };
101512
101509
  function tcpInjectionDylibs() {
@@ -101554,7 +101551,6 @@ function axServiceBinaryPath() {
101554
101551
  return requireBinIn(platformBinDir(), "ax-service");
101555
101552
  }
101556
101553
  function axServiceBinaryPathTcp() {
101557
- requireDarwin("ax-service (tcp)");
101558
101554
  return requireBinIn(platformTcpBinDir(), "ax-service");
101559
101555
  }
101560
101556
  function tvosAxServiceBinaryPath() {
@@ -102451,23 +102447,23 @@ var NotImplementedOnPlatformError = class extends Error {
102451
102447
  });
102452
102448
  }
102453
102449
  };
102454
- function platformMatrix(platform, capability28) {
102450
+ function platformMatrix(platform, capability29) {
102455
102451
  switch (platform) {
102456
102452
  case "ios":
102457
- return capability28.apple;
102453
+ return capability29.apple;
102458
102454
  case "ios-remote":
102459
- return capability28.appleRemote;
102455
+ return capability29.appleRemote;
102460
102456
  case "android":
102461
- return capability28.android;
102457
+ return capability29.android;
102462
102458
  case "chromium":
102463
- return capability28.chromium;
102459
+ return capability29.chromium;
102464
102460
  case "vega":
102465
- return capability28.vega;
102461
+ return capability29.vega;
102466
102462
  }
102467
102463
  }
102468
- function assertSupported(toolId, capability28, device) {
102469
- if (!capability28) return;
102470
- const matrix = platformMatrix(device.platform, capability28);
102464
+ function assertSupported(toolId, capability29, device) {
102465
+ if (!capability29) return;
102466
+ const matrix = platformMatrix(device.platform, capability29);
102471
102467
  if (!matrix) {
102472
102468
  throw new UnsupportedOperationError(toolId, device, `no ${device.platform} support declared`);
102473
102469
  }
@@ -102475,7 +102471,7 @@ function assertSupported(toolId, capability28, device) {
102475
102471
  if (!supported) {
102476
102472
  throw new UnsupportedOperationError(toolId, device, `kind '${device.kind}' not supported`);
102477
102473
  }
102478
- if (capability28.supports && !capability28.supports(device)) {
102474
+ if (capability29.supports && !capability29.supports(device)) {
102479
102475
  throw new UnsupportedOperationError(toolId, device, "supports() refiner rejected device");
102480
102476
  }
102481
102477
  }
@@ -109462,6 +109458,28 @@ function sleepOrAbort(ms, signal) {
109462
109458
  signal?.addEventListener("abort", onAbort, { once: true });
109463
109459
  });
109464
109460
  }
109461
+ function settleWithin(p, ms, signal) {
109462
+ return new Promise((resolve5) => {
109463
+ let done = false;
109464
+ const teardown = [];
109465
+ const finish = (r) => {
109466
+ if (done) return;
109467
+ done = true;
109468
+ for (const fn of teardown) fn();
109469
+ resolve5(r);
109470
+ };
109471
+ p.then(
109472
+ (value) => finish({ type: "value", value }),
109473
+ (err) => finish({ type: "error", error: err instanceof Error ? err.message : String(err) })
109474
+ );
109475
+ if (signal?.aborted) return finish({ type: "aborted" });
109476
+ const onAbort = () => finish({ type: "aborted" });
109477
+ signal?.addEventListener("abort", onAbort, { once: true });
109478
+ teardown.push(() => signal?.removeEventListener("abort", onAbort));
109479
+ const timer = setTimeout(() => finish({ type: "timeout" }), Math.max(0, ms));
109480
+ teardown.push(() => clearTimeout(timer));
109481
+ });
109482
+ }
109465
109483
 
109466
109484
  // ../tool-server/src/utils/simulator-client.ts
109467
109485
  var fs9 = __toESM(require("node:fs/promises"));
@@ -121351,6 +121369,11 @@ function makeIosImpl3(registry2) {
121351
121369
  handler: async (_services, params, device) => await isTvOsSimulator(device.id) ? typeTv(registry2, device, params) : typeSimulatorServer(registry2, device, params)
121352
121370
  };
121353
121371
  }
121372
+ function makeIosRemoteImpl(registry2) {
121373
+ return {
121374
+ handler: async (_services, params, device) => typeSimulatorServer(registry2, device, params)
121375
+ };
121376
+ }
121354
121377
 
121355
121378
  // ../tool-server/src/tools/keyboard/platforms/android.ts
121356
121379
  init_adb();
@@ -121664,6 +121687,7 @@ Provide text, key, or both.`,
121664
121687
  toolId: "keyboard",
121665
121688
  capability: capability15,
121666
121689
  ios: makeIosImpl3(registry2),
121690
+ iosRemote: makeIosRemoteImpl(registry2),
121667
121691
  android: makeAndroidImpl(registry2),
121668
121692
  chromium: makeChromiumImpl(registry2),
121669
121693
  vega: vegaImpl4
@@ -121856,6 +121880,49 @@ async function invokeSubTool(registry2, ctx, toolId, args) {
121856
121880
  // ../tool-server/src/tools/await-ui-element/index.ts
121857
121881
  init_zod();
121858
121882
 
121883
+ // ../tool-server/src/utils/poll-describe-tree.ts
121884
+ async function pollDescribeTree(args) {
121885
+ const { fetchTree, timeoutMs, pollIntervalMs, signal, onSample } = args;
121886
+ const start2 = Date.now();
121887
+ const deadline = start2 + timeoutMs;
121888
+ let polls = 0;
121889
+ let lastData = null;
121890
+ let lastError;
121891
+ const outcome = (result, aborted2) => ({
121892
+ result,
121893
+ aborted: aborted2,
121894
+ polls,
121895
+ elapsedMs: Date.now() - start2,
121896
+ lastData,
121897
+ lastError
121898
+ });
121899
+ for (; ; ) {
121900
+ if (signal?.aborted) return outcome(void 0, true);
121901
+ const remaining = Math.max(0, deadline - Date.now());
121902
+ const settled = await settleWithin(fetchTree(), remaining, signal);
121903
+ polls += 1;
121904
+ if (settled.type === "aborted") return outcome(void 0, true);
121905
+ if (settled.type === "timeout") {
121906
+ if (lastData === null) {
121907
+ lastError ??= `tree fetch did not complete within the ${timeoutMs}ms wait budget`;
121908
+ }
121909
+ break;
121910
+ }
121911
+ if (settled.type === "error") {
121912
+ lastError = settled.error;
121913
+ } else {
121914
+ lastData = settled.value;
121915
+ lastError = void 0;
121916
+ const verdict = onSample(settled.value, Date.now());
121917
+ if (verdict.done) return outcome(verdict.result, false);
121918
+ }
121919
+ if (Date.now() >= deadline) break;
121920
+ const sleepMs = Math.min(pollIntervalMs, Math.max(0, deadline - Date.now()));
121921
+ if (!await sleepOrAbort(sleepMs, signal)) return outcome(void 0, true);
121922
+ }
121923
+ return outcome(void 0, false);
121924
+ }
121925
+
121859
121926
  // ../tool-server/src/tools/describe/platforms/chromium.ts
121860
121927
  init_src();
121861
121928
  var DESCRIBE_FAILURE = {
@@ -122443,28 +122510,6 @@ function timeoutNote(params, lastTree, fetchError, lastData) {
122443
122510
  }
122444
122511
  return appendDiagnostics(base, lastData);
122445
122512
  }
122446
- function settleWithin(p, ms, signal) {
122447
- return new Promise((resolve5) => {
122448
- let done = false;
122449
- const teardown = [];
122450
- const finish = (r) => {
122451
- if (done) return;
122452
- done = true;
122453
- for (const fn of teardown) fn();
122454
- resolve5(r);
122455
- };
122456
- p.then(
122457
- (value) => finish({ type: "value", value }),
122458
- (err) => finish({ type: "error", error: err instanceof Error ? err.message : String(err) })
122459
- );
122460
- if (signal?.aborted) return finish({ type: "aborted" });
122461
- const onAbort = () => finish({ type: "aborted" });
122462
- signal?.addEventListener("abort", onAbort, { once: true });
122463
- teardown.push(() => signal?.removeEventListener("abort", onAbort));
122464
- const timer = setTimeout(() => finish({ type: "timeout" }), Math.max(0, ms));
122465
- teardown.push(() => clearTimeout(timer));
122466
- });
122467
- }
122468
122513
  function createAwaitUiElementTool(registry2) {
122469
122514
  async function fetchTree(device, params, services, isTvOs) {
122470
122515
  if (device.platform === "ios") {
@@ -122522,34 +122567,14 @@ or before tapping an element that appears asynchronously.`,
122522
122567
  });
122523
122568
  const timeoutMs = params.timeoutMs ?? DEFAULT_TIMEOUT_MS3;
122524
122569
  const pollIntervalMs = params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
122525
- const deadline = start2 + timeoutMs;
122526
122570
  const selector = params.selector;
122527
- let lastTree = null;
122528
- let lastData = null;
122529
- let fetchError;
122530
122571
  let everMatched = false;
122531
- for (; ; ) {
122532
- if (signal?.aborted) return cancelled();
122533
- const remaining = Math.max(0, deadline - Date.now());
122534
- const settled = await settleWithin(
122535
- fetchTree(device, params, services, isTvOs),
122536
- remaining,
122537
- signal
122538
- );
122539
- if (settled.type === "aborted") return cancelled();
122540
- if (settled.type === "timeout") {
122541
- if (lastTree === null) {
122542
- fetchError ??= `tree fetch did not complete within the ${timeoutMs}ms wait budget`;
122543
- }
122544
- break;
122545
- }
122546
- if (settled.type === "error") {
122547
- fetchError = settled.error;
122548
- } else {
122549
- const data = settled.value;
122550
- lastData = data;
122551
- lastTree = data.tree;
122552
- fetchError = void 0;
122572
+ const poll = await pollDescribeTree({
122573
+ fetchTree: () => fetchTree(device, params, services, isTvOs),
122574
+ timeoutMs,
122575
+ pollIntervalMs,
122576
+ signal,
122577
+ onSample: (data) => {
122553
122578
  const matches2 = findAll(data.tree, selector);
122554
122579
  if (matches2.length > 0) everMatched = true;
122555
122580
  const blind = isBlindRead(data, everMatched);
@@ -122558,17 +122583,17 @@ or before tapping an element that appears asynchronously.`,
122558
122583
  if (params.condition === "hidden" && !everMatched) {
122559
122584
  result.note = "condition met immediately \u2014 the selector never matched any element, so it may have already been hidden before the wait, or the selector is wrong";
122560
122585
  }
122561
- return result;
122586
+ return { done: true, result };
122562
122587
  }
122588
+ return { done: false };
122563
122589
  }
122564
- if (Date.now() >= deadline) break;
122565
- const sleepMs = Math.min(pollIntervalMs, Math.max(0, deadline - Date.now()));
122566
- if (!await sleepOrAbort(sleepMs, signal)) return cancelled();
122567
- }
122590
+ });
122591
+ if (poll.aborted) return cancelled();
122592
+ if (poll.result) return poll.result;
122568
122593
  return {
122569
122594
  success: false,
122570
122595
  elapsed: Date.now() - start2,
122571
- note: timeoutNote(params, lastTree, fetchError, lastData)
122596
+ note: timeoutNote(params, poll.lastData?.tree ?? null, poll.lastError, poll.lastData)
122572
122597
  };
122573
122598
  }
122574
122599
  };
@@ -130153,6 +130178,105 @@ back/menu/home), then call describe again to confirm where focus landed.`,
130153
130178
  };
130154
130179
  }
130155
130180
 
130181
+ // ../tool-server/src/tools/await-screen-idle/index.ts
130182
+ init_zod();
130183
+ var AWAIT_SCREEN_IDLE_TOOL_ID = "await-screen-idle";
130184
+ var DEFAULT_TIMEOUT_MS4 = 3e3;
130185
+ var DEFAULT_POLL_INTERVAL_MS2 = 200;
130186
+ var DEFAULT_MIN_STABLE_MS = 250;
130187
+ var zodSchema38 = external_exports.object({
130188
+ udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
130189
+ timeoutMs: external_exports.number().int().positive().max(12e4).optional().describe(
130190
+ `Max time to wait for the screen to settle before giving up (default ${DEFAULT_TIMEOUT_MS4}).`
130191
+ ),
130192
+ pollIntervalMs: external_exports.number().int().min(50).max(5e3).optional().describe(`How often to re-read the tree (default ${DEFAULT_POLL_INTERVAL_MS2}).`),
130193
+ minStableMs: external_exports.number().int().min(0).max(1e4).optional().describe(
130194
+ `The screen must hold the same content for at least this long to count as settled (default ${DEFAULT_MIN_STABLE_MS}).`
130195
+ )
130196
+ });
130197
+ var capability21 = {
130198
+ apple: { simulator: true, device: true },
130199
+ android: { emulator: true, device: true, unknown: true },
130200
+ chromium: { app: true }
130201
+ };
130202
+ function treeSignature(root2) {
130203
+ const round2 = (n) => Math.round(n * 100) / 100;
130204
+ const parts = [];
130205
+ const walk = (node) => {
130206
+ const f = node.frame;
130207
+ parts.push(
130208
+ `${node.role}|${node.label ?? ""}|${node.value ?? ""}|${round2(f.x)},${round2(f.y)},${round2(f.width)},${round2(f.height)}`
130209
+ );
130210
+ for (const child of node.children) walk(child);
130211
+ };
130212
+ for (const child of root2.children) walk(child);
130213
+ return parts.join("\n");
130214
+ }
130215
+ function createAwaitScreenIdleTool(registry2) {
130216
+ function fetchTree(device, services, isTvOs) {
130217
+ if (device.platform === "ios") {
130218
+ return describeIos(registry2, device, {}, { isTvOs });
130219
+ }
130220
+ if (device.platform === "android") {
130221
+ return describeAndroid(registry2, device.id);
130222
+ }
130223
+ return describeChromium(services.chromium);
130224
+ }
130225
+ return {
130226
+ id: AWAIT_SCREEN_IDLE_TOOL_ID,
130227
+ description: `Block until the screen has rendered content and stopped changing, or a timeout elapses.
130228
+
130229
+ Polls the same accessibility / DOM tree as \`describe\` every pollIntervalMs (default ${DEFAULT_POLL_INTERVAL_MS2}ms) until it
130230
+ has content and that content holds identical for minStableMs (default ${DEFAULT_MIN_STABLE_MS}ms), or timeoutMs (default
130231
+ ${DEFAULT_TIMEOUT_MS4}ms) is reached. Returns { settled, waitedMs, polls } \u2014 settled=false means the screen never went
130232
+ still before the timeout. Use after a launch/navigation to wait for the UI to render before screenshotting or tapping.`,
130233
+ searchHint: "wait until screen settles idle stable stops changing animation transition rendered ready before screenshot",
130234
+ longRunning: true,
130235
+ zodSchema: zodSchema38,
130236
+ capability: capability21,
130237
+ services: (params) => {
130238
+ const device = resolveDevice(params.udid);
130239
+ if (device.platform === "chromium") {
130240
+ return { chromium: chromiumCdpRef(device) };
130241
+ }
130242
+ return {};
130243
+ },
130244
+ async execute(services, params, ctx) {
130245
+ const device = resolveDevice(params.udid);
130246
+ assertSupported(AWAIT_SCREEN_IDLE_TOOL_ID, capability21, device);
130247
+ if (device.platform === "ios") await ensureDeps(iosRequires);
130248
+ else if (device.platform === "android") await ensureDeps(androidRequires);
130249
+ const isTvOs = device.platform === "ios" && await isTvOsSimulator(device.id);
130250
+ const minStableMs = params.minStableMs ?? DEFAULT_MIN_STABLE_MS;
130251
+ let stableSignature;
130252
+ let stableSince = 0;
130253
+ const poll = await pollDescribeTree({
130254
+ fetchTree: () => fetchTree(device, services, isTvOs),
130255
+ timeoutMs: params.timeoutMs ?? DEFAULT_TIMEOUT_MS4,
130256
+ pollIntervalMs: params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2,
130257
+ signal: ctx?.signal,
130258
+ onSample: (data, nowMs) => {
130259
+ if (data.tree.children.length === 0) {
130260
+ stableSignature = void 0;
130261
+ stableSince = 0;
130262
+ return { done: false };
130263
+ }
130264
+ const signature = treeSignature(data.tree);
130265
+ if (signature === stableSignature) {
130266
+ if (nowMs - stableSince >= minStableMs) return { done: true, result: true };
130267
+ } else {
130268
+ stableSignature = signature;
130269
+ stableSince = nowMs;
130270
+ if (minStableMs === 0) return { done: true, result: true };
130271
+ }
130272
+ return { done: false };
130273
+ }
130274
+ });
130275
+ return { settled: poll.result === true, waitedMs: poll.elapsedMs, polls: poll.polls };
130276
+ }
130277
+ };
130278
+ }
130279
+
130156
130280
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
130157
130281
  var crypto6 = __toESM(require("node:crypto"));
130158
130282
  init_zod();
@@ -130204,7 +130328,7 @@ function bootstrapFailureMessage(bootstrap) {
130204
130328
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
130205
130329
  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.";
130206
130330
  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.";
130207
- var zodSchema38 = external_exports.object({
130331
+ var zodSchema39 = external_exports.object({
130208
130332
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
130209
130333
  device_id: external_exports.string().describe(
130210
130334
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -130231,7 +130355,7 @@ Before calling this, ask the user if they also want native profiling (native-pro
130231
130355
  After starting, ask the user to perform the interaction to profile, then call react-profiler-stop.
130232
130356
  Returns { started_at, startedAtEpochMs, hermes_version, detected_architecture } on success, or the already_running payload described above.
130233
130357
  Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot be established.`,
130234
- zodSchema: zodSchema38,
130358
+ zodSchema: zodSchema39,
130235
130359
  // RN-only: bootstraps the React DevTools backend and uses Hermes'
130236
130360
  // Profiler.start. A CDP-direct CPU profile for Chromium is tracked as a
130237
130361
  // follow-up; the React commit recording has no Chromium analog.
@@ -130503,7 +130627,7 @@ async function readCommitTree(path31) {
130503
130627
  }
130504
130628
 
130505
130629
  // ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
130506
- var zodSchema39 = external_exports.object({
130630
+ var zodSchema40 = external_exports.object({
130507
130631
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
130508
130632
  device_id: external_exports.string().describe(
130509
130633
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -130587,7 +130711,7 @@ Call react-profiler-start first, then exercise the app, then call this.
130587
130711
  Returns { duration_ms, sample_count, fiber_renders_captured, total_react_commits, hot_commit_indices } summarizing the session.
130588
130712
  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).
130589
130713
  Fails if no active profiling session exists or the CDP connection was lost during recording.`,
130590
- zodSchema: zodSchema39,
130714
+ zodSchema: zodSchema40,
130591
130715
  // RN-only: companion to react-profiler-start.
130592
130716
  capability: RN_ONLY_TOOL_CAPABILITY,
130593
130717
  services: () => ({}),
@@ -130815,7 +130939,7 @@ Fails if no active profiling session exists or the CDP connection was lost durin
130815
130939
 
130816
130940
  // ../tool-server/src/tools/profiler/react/react-profiler-status.ts
130817
130941
  init_zod();
130818
- var zodSchema40 = external_exports.object({
130942
+ var zodSchema41 = external_exports.object({
130819
130943
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
130820
130944
  device_id: external_exports.string().describe(
130821
130945
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -130825,7 +130949,7 @@ function createReactProfilerStatusTool(registry2) {
130825
130949
  return {
130826
130950
  id: "react-profiler-status",
130827
130951
  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.`,
130828
- zodSchema: zodSchema40,
130952
+ zodSchema: zodSchema41,
130829
130953
  // RN-only: companion to react-profiler-start.
130830
130954
  capability: RN_ONLY_TOOL_CAPABILITY,
130831
130955
  services: () => ({}),
@@ -132320,7 +132444,7 @@ var annotationSchema = external_exports.object({
132320
132444
  ),
132321
132445
  label: external_exports.string().describe("Description of the action performed")
132322
132446
  });
132323
- var zodSchema41 = external_exports.object({
132447
+ var zodSchema42 = external_exports.object({
132324
132448
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
132325
132449
  device_id: external_exports.string().describe(
132326
132450
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -132348,7 +132472,7 @@ where tapTimestampMs is the timestampMs returned by the tap/swipe tool and start
132348
132472
  is returned by react-profiler-start.
132349
132473
  Use when the profiling session is complete and you need to interpret the collected data.
132350
132474
  Fails if react-profiler-stop has not been called or no profiling data is stored.`,
132351
- zodSchema: zodSchema41,
132475
+ zodSchema: zodSchema42,
132352
132476
  // RN-only: operates on profiler trace files captured via the React DevTools
132353
132477
  // backend's commit recording, which is not present on Chromium.
132354
132478
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -132485,7 +132609,7 @@ Fails if react-profiler-stop has not been called or no profiling data is stored.
132485
132609
  // ../tool-server/src/tools/profiler/react/react-profiler-component-source.ts
132486
132610
  init_zod();
132487
132611
  var import_fs6 = require("fs");
132488
- var zodSchema42 = external_exports.object({
132612
+ var zodSchema43 = external_exports.object({
132489
132613
  component_name: external_exports.string().describe("Name of the React component to look up"),
132490
132614
  project_root: external_exports.string().describe("Absolute path to the RN project root")
132491
132615
  });
@@ -132498,7 +132622,7 @@ var reactProfilerComponentSourceTool = {
132498
132622
  Call this per-finding after react-profiler-analyze to inspect source before proposing a fix.
132499
132623
  Returns found: false if the component is not found in user-owned code (e.g. lives in node_modules).
132500
132624
  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.`,
132501
- zodSchema: zodSchema42,
132625
+ zodSchema: zodSchema43,
132502
132626
  // Companion to react-profiler-analyze. Carries the same RN-only capability
132503
132627
  // declaration as the rest of react-profiler-* for intent-clarity, even
132504
132628
  // though the HTTP gate is a no-op here (the tool takes no device_id, so
@@ -132552,7 +132676,7 @@ When several files define a component with the same name (e.g. platform variants
132552
132676
  // ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
132553
132677
  init_zod();
132554
132678
  init_src();
132555
- var zodSchema43 = external_exports.object({
132679
+ var zodSchema44 = external_exports.object({
132556
132680
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
132557
132681
  device_id: external_exports.string().describe(
132558
132682
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -132629,7 +132753,7 @@ Use when you specifically need to investigate JS CPU hotspots that are NOT tied
132629
132753
  Call react-profiler-stop first. Reads directly from the stored cpuProfile.
132630
132754
  Returns a markdown table of the top hotspot functions with self-time, total-time, and location.
132631
132755
  Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
132632
- zodSchema: zodSchema43,
132756
+ zodSchema: zodSchema44,
132633
132757
  // RN-only: reads a Hermes CPU profile captured via the React profiler
132634
132758
  // session. Chromium's V8 Profiler emits a different sample format — see the
132635
132759
  // PR description for the follow-up scope.
@@ -132727,7 +132851,7 @@ function renderMarkdownTable2(entries) {
132727
132851
  );
132728
132852
  return [header, sep4, ...rows].join("\n");
132729
132853
  }
132730
- var zodSchema44 = external_exports.object({
132854
+ var zodSchema45 = external_exports.object({
132731
132855
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
132732
132856
  device_id: external_exports.string().describe(
132733
132857
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -132740,7 +132864,7 @@ var reactProfilerRendersTool = {
132740
132864
  Returns a markdown table of the top re-rendering components. No profiling session required \u2014 works on a live connected app.
132741
132865
  Use when you want a quick snapshot of render counts without a full profiling session.
132742
132866
  Fails if the React DevTools hook is not present in the runtime or the app is not connected.`,
132743
- zodSchema: zodSchema44,
132867
+ zodSchema: zodSchema45,
132744
132868
  // RN-only: queries the React DevTools backend hook on the live runtime.
132745
132869
  capability: RN_ONLY_TOOL_CAPABILITY,
132746
132870
  services: (params) => ({
@@ -132897,7 +133021,7 @@ function buildFiberTreeScript(maxDepth, filter) {
132897
133021
  }
132898
133022
  })()`;
132899
133023
  }
132900
- var zodSchema45 = external_exports.object({
133024
+ var zodSchema46 = external_exports.object({
132901
133025
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
132902
133026
  device_id: external_exports.string().describe(
132903
133027
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -132911,7 +133035,7 @@ var reactProfilerFiberTreeTool = {
132911
133035
  Use when tracing ancestry of a library component or checking for useMemoCache hook (confirms React Compiler is active on a component).
132912
133036
  Returns a nested JSON tree of fiber nodes with name, tag, actualDuration, selfBaseDuration, and children.
132913
133037
  Fails if the React DevTools hook is not present or no fiber roots have been committed yet.`,
132914
- zodSchema: zodSchema45,
133038
+ zodSchema: zodSchema46,
132915
133039
  // RN-only: walks the fiber tree via the React DevTools backend hook.
132916
133040
  capability: RN_ONLY_TOOL_CAPABILITY,
132917
133041
  services: (params) => ({
@@ -136319,7 +136443,7 @@ async function analyzeNativeProfilerAndroid(api) {
136319
136443
  }
136320
136444
 
136321
136445
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-start.ts
136322
- var zodSchema46 = external_exports.object({
136446
+ var zodSchema47 = external_exports.object({
136323
136447
  device_id: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
136324
136448
  app_process: external_exports.string().optional().describe(
136325
136449
  "iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the currently running foreground app. Only provide this if auto-detection picks the wrong app."
@@ -136328,27 +136452,27 @@ var zodSchema46 = external_exports.object({
136328
136452
  "iOS-only: path to an Instruments .tracetemplate file (defaults to bundled Argent template). Ignored on Android."
136329
136453
  )
136330
136454
  });
136331
- var capability21 = {
136455
+ var capability22 = {
136332
136456
  apple: { simulator: true, device: true },
136333
136457
  android: { emulator: true, device: true, unknown: true }
136334
136458
  };
136335
136459
  var nativeProfilerStartTool = {
136336
136460
  id: "native-profiler-start",
136337
- capability: capability21,
136461
+ capability: capability22,
136338
136462
  description: `Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal).
136339
136463
  Auto-detects the running app process unless app_process is explicitly provided.
136340
136464
  After starting, let the user interact with the app, then call native-profiler-stop.
136341
136465
  Use when you want to capture native CPU, hang, and memory data for a running app.
136342
136466
  Returns { status, pid, traceFile } confirming the recording has started.
136343
136467
  Fails if no app is running on the device, or the profiler cannot attach to the process.`,
136344
- zodSchema: zodSchema46,
136468
+ zodSchema: zodSchema47,
136345
136469
  services: (params) => ({
136346
136470
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
136347
136471
  }),
136348
136472
  async execute(services, params) {
136349
136473
  const api = services.session;
136350
136474
  const device = resolveDevice(params.device_id);
136351
- assertSupported("native-profiler-start", capability21, device);
136475
+ assertSupported("native-profiler-start", capability22, device);
136352
136476
  if (api.platform === "ios") {
136353
136477
  await ensureDeps(["xcrun"]);
136354
136478
  return startNativeProfilerIos(api, params);
@@ -136360,10 +136484,10 @@ Fails if no app is running on the device, or the profiler cannot attach to the p
136360
136484
 
136361
136485
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-stop.ts
136362
136486
  init_zod();
136363
- var zodSchema47 = external_exports.object({
136487
+ var zodSchema48 = external_exports.object({
136364
136488
  device_id: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial).")
136365
136489
  });
136366
- var capability22 = {
136490
+ var capability23 = {
136367
136491
  apple: { simulator: true, device: true },
136368
136492
  android: { emulator: true, device: true, unknown: true }
136369
136493
  };
@@ -136379,7 +136503,7 @@ function registerTrace(store, traceFile) {
136379
136503
  }
136380
136504
  var nativeProfilerStopTool = {
136381
136505
  id: "native-profiler-stop",
136382
- capability: capability22,
136506
+ capability: capability23,
136383
136507
  description: `Stop native profiling and export trace data.
136384
136508
  iOS: sends SIGINT to xctrace, waits for packaging, then exports CPU, hangs, and leaks XML.
136385
136509
  Android: sends SIGTERM to the perfetto daemon, polls /proc/<pid>, then \`adb pull\`s the .pftrace.
@@ -136387,14 +136511,14 @@ Call native-profiler-start first.
136387
136511
  Use when the user has finished the interaction to profile and you need to export the trace.
136388
136512
  Returns { traceFile, exportedFiles, exportDiagnostics? }; traceFile is the raw trace bundle and exportedFiles the exports, all downloadable artifacts materialized to local paths.
136389
136513
  Fails if no active native-profiler-start session exists for the given device_id.`,
136390
- zodSchema: zodSchema47,
136514
+ zodSchema: zodSchema48,
136391
136515
  services: (params) => ({
136392
136516
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
136393
136517
  }),
136394
136518
  async execute(services, params, ctx) {
136395
136519
  const api = services.session;
136396
136520
  const device = resolveDevice(params.device_id);
136397
- assertSupported("native-profiler-stop", capability22, device);
136521
+ assertSupported("native-profiler-stop", capability23, device);
136398
136522
  if (api.platform === "ios") {
136399
136523
  await ensureDeps(["xcrun"]);
136400
136524
  const ios = await stopNativeProfilerIos(api);
@@ -136421,16 +136545,16 @@ Fails if no active native-profiler-start session exists for the given device_id.
136421
136545
 
136422
136546
  // ../tool-server/src/tools/profiler/native-profiler/native-profiler-analyze.ts
136423
136547
  init_zod();
136424
- var zodSchema48 = external_exports.object({
136548
+ var zodSchema49 = external_exports.object({
136425
136549
  device_id: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial).")
136426
136550
  });
136427
- var capability23 = {
136551
+ var capability24 = {
136428
136552
  apple: { simulator: true, device: true },
136429
136553
  android: { emulator: true, device: true, unknown: true }
136430
136554
  };
136431
136555
  var nativeProfilerAnalyzeTool = {
136432
136556
  id: "native-profiler-analyze",
136433
- capability: capability23,
136557
+ capability: capability24,
136434
136558
  description: `Analyze exported native trace data and return an LLM-optimized markdown report.
136435
136559
  iOS: parses CPU time profile, UI hangs, and memory leaks from the exported XML files.
136436
136560
  Android: queries the Perfetto .pftrace via the in-process Perfetto trace-processor engine for CPU hotspots, UI hangs with jank reason + main-thread state breakdown, GC annotation, and an RSS-growth weak signal.
@@ -136440,14 +136564,14 @@ profiler-stack-query for hang stacks, CPU context, leak details) or implement fi
136440
136564
  Call native-profiler-stop first to export the trace data.
136441
136565
  Use when you need to interpret a completed native profiling recording.
136442
136566
  Fails if native-profiler-stop has not been called first to export trace data.`,
136443
- zodSchema: zodSchema48,
136567
+ zodSchema: zodSchema49,
136444
136568
  services: (params) => ({
136445
136569
  session: nativeProfilerSessionRef(resolveDevice(params.device_id))
136446
136570
  }),
136447
136571
  async execute(services, params, ctx) {
136448
136572
  const api = services.session;
136449
136573
  const device = resolveDevice(params.device_id);
136450
- assertSupported("native-profiler-analyze", capability23, device);
136574
+ assertSupported("native-profiler-analyze", capability24, device);
136451
136575
  let result;
136452
136576
  if (api.platform === "ios") {
136453
136577
  await ensureDeps(["xcrun"]);
@@ -136471,7 +136595,7 @@ var timeWindowSchema = external_exports.object({
136471
136595
  start: external_exports.coerce.number().describe("Start of window in ms (performance.now clock)"),
136472
136596
  end: external_exports.coerce.number().describe("End of window in ms (performance.now clock)")
136473
136597
  });
136474
- var zodSchema49 = external_exports.object({
136598
+ var zodSchema50 = external_exports.object({
136475
136599
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
136476
136600
  device_id: external_exports.string().describe(
136477
136601
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -136707,7 +136831,7 @@ Modes:
136707
136831
  Use when investigating JS CPU hotspots or correlating CPU cost with specific components.
136708
136832
  Returns a markdown table of CPU hotspots, call tree, or per-component CPU breakdown.
136709
136833
  Fails if no CPU profile is stored \u2014 run react-profiler-stop first.`,
136710
- zodSchema: zodSchema49,
136834
+ zodSchema: zodSchema50,
136711
136835
  // RN-only: reads Hermes-format CPU profiles. Chromium's V8 sample format is
136712
136836
  // different — see the PR description for the follow-up scope.
136713
136837
  capability: RN_ONLY_TOOL_CAPABILITY,
@@ -136790,7 +136914,7 @@ var timeRangeSchema = external_exports.object({
136790
136914
  start: external_exports.coerce.number().describe("Start of range in ms (performance.now clock)"),
136791
136915
  end: external_exports.coerce.number().describe("End of range in ms (performance.now clock)")
136792
136916
  });
136793
- var zodSchema50 = external_exports.object({
136917
+ var zodSchema51 = external_exports.object({
136794
136918
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
136795
136919
  device_id: external_exports.string().describe(
136796
136920
  "Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId)."
@@ -137035,7 +137159,7 @@ Modes:
137035
137159
  Use when drilling into specific components or time windows after react-profiler-analyze.
137036
137160
  Returns a markdown table or tree of commit data matching the requested mode.
137037
137161
  Fails if react-profiler-stop has not been called or no commit data is stored.`,
137038
- zodSchema: zodSchema50,
137162
+ zodSchema: zodSchema51,
137039
137163
  // RN-only: reads React commit data captured via the React DevTools backend.
137040
137164
  capability: RN_ONLY_TOOL_CAPABILITY,
137041
137165
  services: () => ({}),
@@ -137113,7 +137237,7 @@ function formatBytes4(bytes) {
137113
137237
  }
137114
137238
 
137115
137239
  // ../tool-server/src/tools/profiler/query/profiler-stack-query.ts
137116
- var zodSchema51 = external_exports.object({
137240
+ var zodSchema52 = external_exports.object({
137117
137241
  device_id: external_exports.string().describe("iOS Simulator UDID or Android serial."),
137118
137242
  mode: external_exports.enum(["hang_stacks", "function_callers", "thread_breakdown", "leak_stacks"]).describe(
137119
137243
  "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)"
@@ -137413,7 +137537,7 @@ Modes:
137413
137537
  Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze.
137414
137538
  Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode.
137415
137539
  Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.`,
137416
- zodSchema: zodSchema51,
137540
+ zodSchema: zodSchema52,
137417
137541
  // iOS: reads xctrace output. Android: queries the Perfetto .pftrace via the
137418
137542
  // in-process trace-processor engine (see executeAndroid). Chromium has no
137419
137543
  // native trace capture.
@@ -137469,7 +137593,7 @@ function buildPerfettoAnchor(wallClockStartMs) {
137469
137593
  }
137470
137594
 
137471
137595
  // ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
137472
- var zodSchema52 = external_exports.object({
137596
+ var zodSchema53 = external_exports.object({
137473
137597
  port: external_exports.coerce.number().default(8081).describe("Metro server port"),
137474
137598
  device_id: external_exports.string().describe("iOS Simulator/device UDID or Android serial")
137475
137599
  });
@@ -137481,7 +137605,7 @@ Requires both react-profiler-analyze and native-profiler-analyze to have been ca
137481
137605
  Call this tool when both profilers were run in parallel on the same session.
137482
137606
  Returns a markdown report correlating hangs with React commits, memory leaks, and investigation hints.
137483
137607
  Fails if either react-profiler-analyze or native-profiler-analyze has not been called first.`,
137484
- zodSchema: zodSchema52,
137608
+ zodSchema: zodSchema53,
137485
137609
  // Combines React (Hermes) + native traces. iOS reads xctrace output;
137486
137610
  // Android re-queries the Perfetto .pftrace via loadAndroidCombinedData. The
137487
137611
  // capture half exists on neither platform's Chromium.
@@ -137770,7 +137894,7 @@ function assertSafeSessionId(sessionId) {
137770
137894
  );
137771
137895
  }
137772
137896
  }
137773
- var zodSchema53 = external_exports.object({
137897
+ var zodSchema54 = external_exports.object({
137774
137898
  mode: external_exports.enum(["list", "load_react", "load_native"]).describe(
137775
137899
  "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."
137776
137900
  ),
@@ -138094,7 +138218,7 @@ Modes:
138094
138218
  For Android .pftrace restores, pass app_process for older sessions that do not have a metadata sidecar.
138095
138219
  Returns a summary of the loaded session or a session list for the list mode.
138096
138220
  Fails if the session_id is not found or required XML files are missing from disk.`,
138097
- zodSchema: zodSchema53,
138221
+ zodSchema: zodSchema54,
138098
138222
  // Loads Hermes-format React traces or iOS xctrace XML — neither maps onto
138099
138223
  // Chromium yet. The gate keeps the error close to the call site instead of
138100
138224
  // letting it surface from inside the trace parser.
@@ -138154,7 +138278,7 @@ Fails if the session_id is not found or required XML files are missing from disk
138154
138278
  // ../tool-server/src/tools/simulator/stop-simulator-server.ts
138155
138279
  init_zod();
138156
138280
  init_src();
138157
- var zodSchema54 = external_exports.object({
138281
+ var zodSchema55 = external_exports.object({
138158
138282
  udid: external_exports.string().describe(
138159
138283
  "Target device id (iOS UDID, Android serial, or Chromium id) whose transport session to stop"
138160
138284
  )
@@ -138163,7 +138287,7 @@ function createStopSimulatorServerTool(registry2) {
138163
138287
  return {
138164
138288
  id: "stop-simulator-server",
138165
138289
  description: `Stop the transport session for a specific device (iOS / Android: simulator-server process; Chromium: CDP WebSocket) and free its resources. Use when you are done interacting with one device but want to keep others running. Returns { stopped, udid }. Fails silently if no session is open for the given id.`,
138166
- zodSchema: zodSchema54,
138290
+ zodSchema: zodSchema55,
138167
138291
  services: () => ({}),
138168
138292
  async execute(_services, params) {
138169
138293
  const udid = params.udid;
@@ -138222,13 +138346,13 @@ function createStopAllSimulatorServersTool(registry2) {
138222
138346
  // ../tool-server/src/tools/simulator/stop-metro.ts
138223
138347
  init_zod();
138224
138348
  var import_node_child_process23 = require("node:child_process");
138225
- var zodSchema55 = external_exports.object({
138349
+ var zodSchema56 = external_exports.object({
138226
138350
  port: external_exports.number().int().min(1).max(65535).default(8081).describe("TCP port Metro is listening on (default 8081)")
138227
138351
  });
138228
138352
  var stopMetroTool = {
138229
138353
  id: "stop-metro",
138230
138354
  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.`,
138231
- zodSchema: zodSchema55,
138355
+ zodSchema: zodSchema56,
138232
138356
  services: () => ({}),
138233
138357
  async execute(_services, params) {
138234
138358
  const port = params.port;
@@ -138455,7 +138579,7 @@ async function appendStepToActiveFlow(step) {
138455
138579
  }
138456
138580
 
138457
138581
  // ../tool-server/src/tools/flows/flow-start-recording.ts
138458
- var zodSchema56 = external_exports.object({
138582
+ var zodSchema57 = external_exports.object({
138459
138583
  name: external_exports.string().describe('Name for this flow (e.g. "settings-explore")'),
138460
138584
  project_root: external_exports.string().describe(
138461
138585
  "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`."
@@ -138480,7 +138604,7 @@ to add labels. Call flow-finish-recording when done.
138480
138604
 
138481
138605
  If a recorded step turns out to be wrong, you can edit the .yaml file directly
138482
138606
  to remove or reorder steps.`,
138483
- zodSchema: zodSchema56,
138607
+ zodSchema: zodSchema57,
138484
138608
  fileInputs: fileInputs2,
138485
138609
  services: () => ({}),
138486
138610
  async execute(_services, params, ctx) {
@@ -138518,7 +138642,7 @@ to remove or reorder steps.`,
138518
138642
 
138519
138643
  // ../tool-server/src/tools/flows/flow-add-step.ts
138520
138644
  init_zod();
138521
- var zodSchema57 = external_exports.object({
138645
+ var zodSchema58 = external_exports.object({
138522
138646
  command: external_exports.string().describe('MCP tool name (e.g. "tap", "screenshot", "launch-app")'),
138523
138647
  args: external_exports.string().optional().describe(
138524
138648
  `Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments.`
@@ -138530,7 +138654,7 @@ function createFlowAddStepTool(registry2) {
138530
138654
  id: "flow-add-step",
138531
138655
  description: `Execute a tool call and record it as a step in the active flow. Use when recording a flow with flow-start-recording and you want to run and capture each action. Returns { message, toolResult, flowFile } on success. If it fails an error is returned and nothing is recorded. Error if the tool name is not found in the registry or arguments are invalid JSON.
138532
138656
  If a step was recorded by mistake, edit the .yaml file directly to remove it.`,
138533
- zodSchema: zodSchema57,
138657
+ zodSchema: zodSchema58,
138534
138658
  services: () => ({}),
138535
138659
  async execute(_services, params, ctx) {
138536
138660
  const flowName = getActiveFlow();
@@ -138554,7 +138678,7 @@ If a step was recorded by mistake, edit the .yaml file directly to remove it.`,
138554
138678
 
138555
138679
  // ../tool-server/src/tools/flows/flow-insert-echo.ts
138556
138680
  init_zod();
138557
- var zodSchema58 = external_exports.object({
138681
+ var zodSchema59 = external_exports.object({
138558
138682
  message: external_exports.string().describe("Message to echo when the flow is replayed")
138559
138683
  });
138560
138684
  var flowInsertEchoTool = {
@@ -138562,7 +138686,7 @@ var flowInsertEchoTool = {
138562
138686
  description: `Record an echo step in the active flow. Echo steps print a message when the flow is replayed \u2014 useful as labels between tool calls.
138563
138687
  Use when you want to annotate a recorded flow with a human-readable label or checkpoint message.
138564
138688
  Returns { message, flowFile }. Fails if no active flow recording is in progress.`,
138565
- zodSchema: zodSchema58,
138689
+ zodSchema: zodSchema59,
138566
138690
  services: () => ({}),
138567
138691
  async execute(_services, params) {
138568
138692
  const flowName = getActiveFlow();
@@ -138581,12 +138705,12 @@ Returns { message, flowFile }. Fails if no active flow recording is in progress.
138581
138705
  // ../tool-server/src/tools/flows/flow-finish-recording.ts
138582
138706
  init_zod();
138583
138707
  var fs37 = __toESM(require("node:fs/promises"));
138584
- var zodSchema59 = external_exports.object({});
138708
+ var zodSchema60 = external_exports.object({});
138585
138709
  var flowFinishRecordingTool = {
138586
138710
  id: "flow-finish-recording",
138587
138711
  description: `Finish recording the active flow. Returns a summary of all recorded steps and the final YAML content. Use when you have added all desired steps and want to finalize the flow file. Fails if no active flow recording is in progress.
138588
138712
  You can still edit the .yaml file directly afterwards to remove or reorder steps.`,
138589
- zodSchema: zodSchema59,
138713
+ zodSchema: zodSchema60,
138590
138714
  services: () => ({}),
138591
138715
  async execute(_services, _params) {
138592
138716
  const flowName = getActiveFlow();
@@ -138624,7 +138748,7 @@ You can still edit the .yaml file directly afterwards to remove or reorder steps
138624
138748
  // ../tool-server/src/tools/flows/flow-run.ts
138625
138749
  init_zod();
138626
138750
  var fs38 = __toESM(require("node:fs/promises"));
138627
- var zodSchema60 = external_exports.object({
138751
+ var zodSchema61 = external_exports.object({
138628
138752
  name: external_exports.string().describe('Name of the flow to run (e.g. "settings-explore")'),
138629
138753
  project_root: external_exports.string().describe(
138630
138754
  "Absolute path to the project root directory that contains `.argent/flows/<name>.yaml`."
@@ -138655,7 +138779,7 @@ If the flow has an execution prerequisite and prerequisiteAcknowledged is not
138655
138779
  set to true, the tool returns a notice with the prerequisite instead of running.
138656
138780
  Use flow-read-prerequisite to inspect the prerequisite beforehand.`,
138657
138781
  longRunning: true,
138658
- zodSchema: zodSchema60,
138782
+ zodSchema: zodSchema61,
138659
138783
  fileInputs: fileInputs3,
138660
138784
  services: () => ({}),
138661
138785
  async execute(_services, params, ctx) {
@@ -138722,7 +138846,7 @@ function resolveFlowFilePath(params) {
138722
138846
  // ../tool-server/src/tools/flows/flow-read-prerequisite.ts
138723
138847
  init_zod();
138724
138848
  var fs39 = __toESM(require("node:fs/promises"));
138725
- var zodSchema61 = external_exports.object({
138849
+ var zodSchema62 = external_exports.object({
138726
138850
  name: external_exports.string().describe('Name of the flow to inspect (e.g. "settings-explore")'),
138727
138851
  project_root: external_exports.string().describe(
138728
138852
  "Absolute path to the project root directory that contains `.argent/flows/<name>.yaml`."
@@ -138740,7 +138864,7 @@ var flowReadPrerequisiteTool = {
138740
138864
  Returns the prerequisite description so you can verify the required state is met before calling flow-execute.
138741
138865
  Use when you need to check what app/simulator state is required before executing a flow.
138742
138866
  Fails if the flow file does not exist in the .argent/flows/ directory.`,
138743
- zodSchema: zodSchema61,
138867
+ zodSchema: zodSchema62,
138744
138868
  fileInputs: fileInputs4,
138745
138869
  services: () => ({}),
138746
138870
  async execute(_services, params) {
@@ -139053,7 +139177,7 @@ async function readWorkspaceSnapshot(workspacePath) {
139053
139177
  }
139054
139178
 
139055
139179
  // ../tool-server/src/tools/workspace/gather-workspace-data.ts
139056
- var zodSchema62 = external_exports.object({
139180
+ var zodSchema63 = external_exports.object({
139057
139181
  workspacePath: external_exports.string().describe("Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp)")
139058
139182
  });
139059
139183
  var fileInputs5 = [
@@ -139079,7 +139203,7 @@ exploration of anything the snapshot surfaces.
139079
139203
  Use when you need to inspect project configuration without manually reading multiple files.
139080
139204
  Returns partial data if workspacePath does not exist or is not readable; missing items are represented as null or empty collections.
139081
139205
  Fails if the workspacePath is not an absolute path or the directory cannot be accessed.`,
139082
- zodSchema: zodSchema62,
139206
+ zodSchema: zodSchema63,
139083
139207
  fileInputs: fileInputs5,
139084
139208
  services: () => ({}),
139085
139209
  async execute(_services, params) {
@@ -139133,13 +139257,13 @@ var updateArgentTool = {
139133
139257
 
139134
139258
  // ../tool-server/src/tools/system/dismiss-update.ts
139135
139259
  init_zod();
139136
- var zodSchema63 = external_exports.object({
139260
+ var zodSchema64 = external_exports.object({
139137
139261
  hours: external_exports.number().min(0).describe("Number of hours to suppress the update notification")
139138
139262
  });
139139
139263
  var dismissUpdateTool = {
139140
139264
  id: "dismiss-update",
139141
139265
  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.",
139142
- zodSchema: zodSchema63,
139266
+ zodSchema: zodSchema64,
139143
139267
  services: () => ({}),
139144
139268
  async execute(_services, params, _options) {
139145
139269
  const durationMs = params.hours * 60 * 60 * 1e3;
@@ -141194,7 +141318,7 @@ function roundToOne(value) {
141194
141318
  }
141195
141319
 
141196
141320
  // ../tool-server/src/tools/screenshot-diff/index.ts
141197
- var zodSchema64 = external_exports.object({
141321
+ var zodSchema65 = external_exports.object({
141198
141322
  baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
141199
141323
  currentPath: external_exports.string().min(1).optional().describe("Path to the current PNG file. Required unless captureCurrent is true."),
141200
141324
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
@@ -141209,7 +141333,7 @@ var zodSchema64 = external_exports.object({
141209
141333
  "Directory where diff artifacts should be written. Optional \u2014 defaults to a temp directory; the diff images are returned in the result either way."
141210
141334
  )
141211
141335
  }).strict();
141212
- var capability24 = {
141336
+ var capability25 = {
141213
141337
  apple: { simulator: true, device: true },
141214
141338
  android: { emulator: true, device: true, unknown: true }
141215
141339
  };
@@ -141228,8 +141352,8 @@ Returns { summary, diffPath, contextDiffPath }. The summary uses normalized [0,1
141228
141352
  Ignores the fixed top status-bar band for both pixel and OCR text comparisons.
141229
141353
  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.`,
141230
141354
  searchHint: "compare screenshots png diff visual UI changes UI regression visual regression screenshot diff changed regions text ocr live capture",
141231
- zodSchema: zodSchema64,
141232
- capability: capability24,
141355
+ zodSchema: zodSchema65,
141356
+ capability: capability25,
141233
141357
  fileInputs: fileInputs6,
141234
141358
  services: (params) => {
141235
141359
  if (params.captureBaseline || params.captureCurrent) {
@@ -141447,7 +141571,7 @@ async function captureElementFrame(registry2, udid, match, opts = {}) {
141447
141571
  }
141448
141572
 
141449
141573
  // ../tool-server/src/tools/variants/propose-variant.ts
141450
- var zodSchema65 = external_exports.object({
141574
+ var zodSchema66 = external_exports.object({
141451
141575
  element: external_exports.string().min(1).max(200).describe(
141452
141576
  '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.'
141453
141577
  ),
@@ -141502,7 +141626,7 @@ arrives as a follow-up message (this is the case in an \`argent lens\` CLI sessi
141502
141626
  Returns { round, elementId, variantId, element, variantCount, totalElements } \u2014 confirmation only;
141503
141627
  it does not wait for the user.`,
141504
141628
  searchHint: "propose design variant alternative option for element non-blocking ab choice",
141505
- zodSchema: zodSchema65,
141629
+ zodSchema: zodSchema66,
141506
141630
  services: () => ({}),
141507
141631
  async execute(_services, params) {
141508
141632
  let frame = params.variant.frame;
@@ -141526,7 +141650,7 @@ it does not wait for the user.`,
141526
141650
 
141527
141651
  // ../tool-server/src/tools/variants/await-user-selection.ts
141528
141652
  init_zod();
141529
- var zodSchema66 = external_exports.object({
141653
+ var zodSchema67 = external_exports.object({
141530
141654
  timeoutSeconds: external_exports.number().int().min(5).max(86400).optional().describe(
141531
141655
  "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."
141532
141656
  )
@@ -141563,7 +141687,7 @@ This tool is long-running; it intentionally holds the request open. It honors cl
141563
141687
  disconnects (aborts cleanly).`,
141564
141688
  searchHint: "await wait user selection choice variant blocking confirm picks complete",
141565
141689
  longRunning: true,
141566
- zodSchema: zodSchema66,
141690
+ zodSchema: zodSchema67,
141567
141691
  services: () => ({}),
141568
141692
  async execute(_services, params, options) {
141569
141693
  const timeoutMs = (params.timeoutSeconds ?? 1800) * 1e3;
@@ -141577,7 +141701,7 @@ disconnects (aborts cleanly).`,
141577
141701
  // ../tool-server/src/tools/chromium-tabs/index.ts
141578
141702
  init_zod();
141579
141703
  init_src();
141580
- var zodSchema67 = external_exports.object({
141704
+ var zodSchema68 = external_exports.object({
141581
141705
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
141582
141706
  action: external_exports.enum(["list", "select", "new", "close"]).describe(
141583
141707
  "list: enumerate tabs/windows. select: make a tab active (every other tool then acts on it). new: open a tab. close: close a tab."
@@ -141588,7 +141712,7 @@ var zodSchema67 = external_exports.object({
141588
141712
  url: external_exports.string().optional().describe("`new` only: URL to open (defaults to about:blank)."),
141589
141713
  label: external_exports.string().optional().describe("`new` only: a memorable label usable interchangeably with the tabId.")
141590
141714
  });
141591
- var capability25 = {
141715
+ var capability26 = {
141592
141716
  chromium: { app: true }
141593
141717
  };
141594
141718
  var chromiumTabsTool = {
@@ -141601,8 +141725,8 @@ var chromiumTabsTool = {
141601
141725
  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.
141602
141726
  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.`,
141603
141727
  searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
141604
- zodSchema: zodSchema67,
141605
- capability: capability25,
141728
+ zodSchema: zodSchema68,
141729
+ capability: capability26,
141606
141730
  services: (params) => {
141607
141731
  const device = resolveDevice(params.udid);
141608
141732
  if (device.platform === "chromium") {
@@ -141702,7 +141826,7 @@ async function clearStorage(cdp, type) {
141702
141826
  }
141703
141827
 
141704
141828
  // ../tool-server/src/tools/chromium-cookies/index.ts
141705
- var zodSchema68 = external_exports.object({
141829
+ var zodSchema69 = external_exports.object({
141706
141830
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
141707
141831
  action: external_exports.enum(["get", "set", "delete", "clear"]).describe(
141708
141832
  "get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."
@@ -141719,7 +141843,7 @@ var zodSchema68 = external_exports.object({
141719
141843
  sameSite: external_exports.enum(["Strict", "Lax", "None"]).optional().describe("set: SameSite policy."),
141720
141844
  expires: external_exports.number().optional().describe("set: expiry as a Unix timestamp (seconds). Omit for a session cookie.")
141721
141845
  });
141722
- var capability26 = {
141846
+ var capability27 = {
141723
141847
  chromium: { app: true }
141724
141848
  };
141725
141849
  var chromiumCookiesTool = {
@@ -141732,8 +141856,8 @@ var chromiumCookiesTool = {
141732
141856
  Use when seeding an authenticated session before a flow (set the session cookie, then navigate) or asserting cookie state after one.
141733
141857
  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.`,
141734
141858
  searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
141735
- zodSchema: zodSchema68,
141736
- capability: capability26,
141859
+ zodSchema: zodSchema69,
141860
+ capability: capability27,
141737
141861
  services: (params) => {
141738
141862
  const device = resolveDevice(params.udid);
141739
141863
  if (device.platform === "chromium") {
@@ -141797,7 +141921,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
141797
141921
  // ../tool-server/src/tools/chromium-storage/index.ts
141798
141922
  init_zod();
141799
141923
  init_src();
141800
- var zodSchema69 = external_exports.object({
141924
+ var zodSchema70 = external_exports.object({
141801
141925
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
141802
141926
  store: external_exports.enum(["local", "session"]).describe("Which Web Storage area: `local` (localStorage) or `session` (sessionStorage)."),
141803
141927
  action: external_exports.enum(["get", "set", "remove", "clear"]).describe(
@@ -141806,7 +141930,7 @@ var zodSchema69 = external_exports.object({
141806
141930
  key: external_exports.string().optional().describe("get (optional) / set / remove: the storage key."),
141807
141931
  value: external_exports.string().optional().describe("set: the value to store.")
141808
141932
  });
141809
- var capability27 = {
141933
+ var capability28 = {
141810
141934
  chromium: { app: true }
141811
141935
  };
141812
141936
  var chromiumStorageTool = {
@@ -141820,8 +141944,8 @@ Set \`store\` to "local" or "session". Storage is per-origin, so it reflects the
141820
141944
  Use when seeding feature flags / auth tokens before a flow or asserting persisted app state after one.
141821
141945
  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.`,
141822
141946
  searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
141823
- zodSchema: zodSchema69,
141824
- capability: capability27,
141947
+ zodSchema: zodSchema70,
141948
+ capability: capability28,
141825
141949
  services: (params) => {
141826
141950
  const device = resolveDevice(params.udid);
141827
141951
  if (device.platform === "chromium") {
@@ -141919,6 +142043,7 @@ function createRegistry() {
141919
142043
  registry2.registerTool(networkRequestTool);
141920
142044
  registry2.registerTool(createDescribeTool(registry2));
141921
142045
  registry2.registerTool(createAwaitUiElementTool(registry2));
142046
+ registry2.registerTool(createAwaitScreenIdleTool(registry2));
141922
142047
  registry2.registerTool(createReactProfilerStartTool(registry2));
141923
142048
  registry2.registerTool(createReactProfilerStopTool(registry2));
141924
142049
  registry2.registerTool(createReactProfilerStatusTool(registry2));
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.14.1-next.10",
3
+ "version": "0.14.1-next.12",
4
4
  "description": "MCP server for iOS Simulator and Android Emulator control",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {