@swmansion/argent 0.35.1-next.86 → 0.35.1-next.88

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
@@ -33623,7 +33623,8 @@ function tarEnv(env) {
33623
33623
  async function runTar(archive, args, signal) {
33624
33624
  const child = spawn2("tar", [...args, "-f", "-"], {
33625
33625
  signal,
33626
- env: tarEnv(process.env)
33626
+ env: tarEnv(process.env),
33627
+ windowsHide: true
33627
33628
  });
33628
33629
  let childError;
33629
33630
  child.on("error", (err) => {
@@ -39146,7 +39147,7 @@ function isCi(env = process.env) {
39146
39147
  var SESSION_ID2 = randomUUID5();
39147
39148
  function readCliVersion() {
39148
39149
  if (true) {
39149
- return "0.35.1-next.86";
39150
+ return "0.35.1-next.88";
39150
39151
  }
39151
39152
  return "0.0.0";
39152
39153
  }
package/dist/client.js CHANGED
@@ -10092,7 +10092,8 @@ function tarEnv(env) {
10092
10092
  async function runTar(archive, args, signal) {
10093
10093
  const child = spawn2("tar", [...args, "-f", "-"], {
10094
10094
  signal,
10095
- env: tarEnv(process.env)
10095
+ env: tarEnv(process.env),
10096
+ windowsHide: true
10096
10097
  });
10097
10098
  let childError;
10098
10099
  child.on("error", (err) => {
@@ -17177,7 +17177,7 @@ function isCi(env = process.env) {
17177
17177
  var SESSION_ID = randomUUID4();
17178
17178
  function readCliVersion() {
17179
17179
  if (true) {
17180
- return "0.35.1-next.86";
17180
+ return "0.35.1-next.88";
17181
17181
  }
17182
17182
  return "0.0.0";
17183
17183
  }
@@ -34576,7 +34576,8 @@ function tarEnv(env) {
34576
34576
  async function runTar(archive, args, signal) {
34577
34577
  const child = spawn2("tar", [...args, "-f", "-"], {
34578
34578
  signal,
34579
- env: tarEnv(process.env)
34579
+ env: tarEnv(process.env),
34580
+ windowsHide: true
34580
34581
  });
34581
34582
  let childError;
34582
34583
  child.on("error", (err) => {
@@ -38587,7 +38588,7 @@ async function startMcpServer(options) {
38587
38588
  const autoDescribeOn = autoDescribeEnabled();
38588
38589
  const whatsNewOn = whatsNewEnabled();
38589
38590
  const installedVersion = getInstalledVersion();
38590
- const highlightsVersion = true ? "0.35.1-next.86" : installedVersion;
38591
+ const highlightsVersion = true ? "0.35.1-next.88" : installedVersion;
38591
38592
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38592
38593
  const trees = createTreeMemory();
38593
38594
  const screenshots = createScreenshotMemory();
@@ -48689,7 +48689,10 @@ async function commandOnPath(name) {
48689
48689
  if (!/^[A-Za-z0-9_.-]+$/.test(name)) return null;
48690
48690
  try {
48691
48691
  if (process.platform === "win32") {
48692
- const { stdout: stdout2 } = await execFileAsync("where", [name], { timeout: 2e3 });
48692
+ const { stdout: stdout2 } = await execFileAsync("where", [name], {
48693
+ timeout: 2e3,
48694
+ windowsHide: true
48695
+ });
48693
48696
  const cwd = import_node_path4.win32.resolve(process.cwd()).toLowerCase();
48694
48697
  const match = stdout2.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).find((candidate) => import_node_path4.win32.resolve(import_node_path4.win32.dirname(candidate)).toLowerCase() !== cwd);
48695
48698
  return match ?? null;
@@ -52393,7 +52396,8 @@ async function emulatorSupportsFlag(flag, options = {}) {
52393
52396
  // wedged in Qt/graphics init) leaves execFile unsettled forever, and
52394
52397
  // this await has no deadline of its own.
52395
52398
  killSignal: "SIGKILL",
52396
- maxBuffer: 8 * 1024 * 1024
52399
+ maxBuffer: 8 * 1024 * 1024,
52400
+ windowsHide: true
52397
52401
  });
52398
52402
  output2 = stdout + stderr;
52399
52403
  } catch (err) {
@@ -52445,7 +52449,8 @@ async function runAdb(args, options = {}) {
52445
52449
  killSignal: ADB_KILL_SIGNAL,
52446
52450
  maxBuffer: 64 * 1024 * 1024,
52447
52451
  encoding: "utf-8",
52448
- env: envWithoutAdbTrace()
52452
+ env: envWithoutAdbTrace(),
52453
+ windowsHide: true
52449
52454
  });
52450
52455
  return { stdout, stderr };
52451
52456
  } catch (err) {
@@ -52460,7 +52465,8 @@ async function runAdbBinary(args, options = {}) {
52460
52465
  timeout: options.timeoutMs ?? 3e4,
52461
52466
  killSignal: ADB_KILL_SIGNAL,
52462
52467
  maxBuffer: 64 * 1024 * 1024,
52463
- encoding: "buffer"
52468
+ encoding: "buffer",
52469
+ windowsHide: true
52464
52470
  });
52465
52471
  return stdout;
52466
52472
  } catch (err) {
@@ -52494,7 +52500,8 @@ async function adbShellInput(serial, shellCommand, input2, options = {}) {
52494
52500
  timeout: options.timeoutMs ?? 3e4,
52495
52501
  killSignal: ADB_KILL_SIGNAL,
52496
52502
  maxBuffer: 64 * 1024 * 1024,
52497
- encoding: "utf-8"
52503
+ encoding: "utf-8",
52504
+ windowsHide: true
52498
52505
  },
52499
52506
  (err, stdout, stderr) => {
52500
52507
  if (err) {
@@ -52722,7 +52729,8 @@ async function listAvds() {
52722
52729
  try {
52723
52730
  const { stdout } = await execFileAsync7(emulatorPath, ["-list-avds"], {
52724
52731
  timeout: 5e3,
52725
- killSignal: "SIGKILL"
52732
+ killSignal: "SIGKILL",
52733
+ windowsHide: true
52726
52734
  });
52727
52735
  return stdout.split("\n").map((l) => l.trim()).filter((l) => l && AVD_NAME_PATTERN.test(l)).map((name) => ({ name }));
52728
52736
  } catch {
@@ -52742,7 +52750,8 @@ async function checkSnapshotLoadable(avdName, snapshotName = "default_boot", opt
52742
52750
  const { stdout } = await execFileAsync7(emulatorPath, args, {
52743
52751
  timeout: options.timeoutMs ?? 1e4,
52744
52752
  killSignal: "SIGKILL",
52745
- maxBuffer: 4 * 1024 * 1024
52753
+ maxBuffer: 4 * 1024 * 1024,
52754
+ windowsHide: true
52746
52755
  });
52747
52756
  const tail = stdout.split("\n").slice(-6).join("\n");
52748
52757
  if (/(^|\n)\s*Loadable\s*(\n|$)/.test(tail)) return { loadable: true, reason: null };
@@ -73416,7 +73425,7 @@ function isCi(env = process.env) {
73416
73425
  var SESSION_ID = (0, import_node_crypto4.randomUUID)();
73417
73426
  function readCliVersion() {
73418
73427
  if (true) {
73419
- return "0.35.1-next.86";
73428
+ return "0.35.1-next.88";
73420
73429
  }
73421
73430
  return "0.0.0";
73422
73431
  }
@@ -74413,7 +74422,8 @@ function tarEnv(env) {
74413
74422
  async function runTar(archive, args, signal) {
74414
74423
  const child = (0, import_node_child_process2.spawn)("tar", [...args, "-f", "-"], {
74415
74424
  signal,
74416
- env: tarEnv(process.env)
74425
+ env: tarEnv(process.env),
74426
+ windowsHide: true
74417
74427
  });
74418
74428
  let childError;
74419
74429
  child.on("error", (err) => {
@@ -75038,7 +75048,8 @@ async function runHarmonyEmulator(args, timeoutMs = EMULATOR_TIMEOUT_MS) {
75038
75048
  const { stdout, stderr } = await execFileAsync4(bin, args, {
75039
75049
  timeout: timeoutMs,
75040
75050
  killSignal: EMULATOR_KILL_SIGNAL,
75041
- maxBuffer: 8 * 1024 * 1024
75051
+ maxBuffer: 8 * 1024 * 1024,
75052
+ windowsHide: true
75042
75053
  });
75043
75054
  return { stdout, stderr };
75044
75055
  } catch (err) {
@@ -75128,7 +75139,8 @@ async function runHdc(args, timeoutMs = DEFAULT_TIMEOUT_MS) {
75128
75139
  const { stdout, stderr } = await execFileAsync5(bin, args, {
75129
75140
  timeout: timeoutMs,
75130
75141
  killSignal: HDC_KILL_SIGNAL,
75131
- maxBuffer: 64 * 1024 * 1024
75142
+ maxBuffer: 64 * 1024 * 1024,
75143
+ windowsHide: true
75132
75144
  });
75133
75145
  return { stdout, stderr };
75134
75146
  } catch (err) {
@@ -105190,7 +105202,11 @@ var import_node_util16 = require("node:util");
105190
105202
  init_device_info();
105191
105203
  init_android_binary();
105192
105204
  var execFileAsync15 = (0, import_node_util16.promisify)(import_node_child_process21.execFile);
105193
- var SHUTDOWN_EXEC_OPTIONS = { timeout: 3e4, killSignal: "SIGKILL" };
105205
+ var SHUTDOWN_EXEC_OPTIONS = {
105206
+ timeout: 3e4,
105207
+ killSignal: "SIGKILL",
105208
+ windowsHide: true
105209
+ };
105194
105210
  async function shutdownOwnedDevice(id) {
105195
105211
  let platform;
105196
105212
  try {
@@ -112300,7 +112316,7 @@ async function spawnHelper(serial) {
112300
112316
  const proc = (0, import_node_child_process25.spawn)(
112301
112317
  adbPath,
112302
112318
  ["-s", serial, "shell", "am", "instrument", "-w", manifest.instrumentationRunner],
112303
- { stdio: ["ignore", "pipe", "pipe"] }
112319
+ { stdio: ["ignore", "pipe", "pipe"], windowsHide: true }
112304
112320
  );
112305
112321
  return new Promise((resolve24, reject) => {
112306
112322
  let devicePort = null;
@@ -116223,7 +116239,8 @@ function streamDirectoryAsArchive(id, entry, req, res) {
116223
116239
  res.setHeader("Vary", "Accept");
116224
116240
  res.setHeader("Content-Disposition", `attachment; filename="${entry.filename}.${ext}"`);
116225
116241
  const child = (0, import_node_child_process26.spawn)("tar", createTarArgs(entry.path), {
116226
- stdio: ["ignore", "pipe", "ignore"]
116242
+ stdio: ["ignore", "pipe", "ignore"],
116243
+ windowsHide: true
116227
116244
  });
116228
116245
  child.on("error", (err) => {
116229
116246
  if (!res.headersSent) {
@@ -143506,7 +143523,7 @@ async function within2(ms3, run2) {
143506
143523
  clearTimeout(timer);
143507
143524
  }
143508
143525
  }
143509
- async function typeWithReadback(registry2, device, text, type) {
143526
+ async function typeWithReadback(registry2, device, text, type, mismatchWarning = READBACK_MISMATCH_WARNING) {
143510
143527
  if (!text || FOCUS_MOVING.test(text)) return { result: await type() };
143511
143528
  const ax = await within2(READBACK_TIMING.resolveMs, async () => {
143512
143529
  const ref = axServiceRef(device);
@@ -143533,7 +143550,7 @@ async function typeWithReadback(registry2, device, text, type) {
143533
143550
  const late = await judge();
143534
143551
  if (late === "holds") return verified;
143535
143552
  if (late === "moved" || late === "unread") return { result };
143536
- return { result, readback: { verified: false, warning: READBACK_MISMATCH_WARNING } };
143553
+ return { result, readback: { verified: false, warning: mismatchWarning } };
143537
143554
  }
143538
143555
  function judgeTree(nodes, typedInto, text) {
143539
143556
  const focused = focusedInput(nodes);
@@ -144662,6 +144679,7 @@ var LEFT_GUI_KEYCODE = 227;
144662
144679
  var V_KEYCODE = charToKeyPress("v").keyCode;
144663
144680
  var CHORD_STEP_MS = 50;
144664
144681
  var sleep15 = (ms3) => new Promise((r) => setTimeout(r, ms3));
144682
+ var PASTE_MISMATCH_WARNING = "After pasting, the focused field does not hold the pasted text. The app may refuse paste in this field (for example a React Native TextInput with contextMenuHidden), or the app changed the text (an input formatter, a length limit). Read the field before submitting.";
144665
144683
  var typesAsText = (char) => !"\n\r ".includes(char) && !!charToKeyPress(char);
144666
144684
  function rejectTv(device) {
144667
144685
  throw new UnsupportedOperationError(
@@ -144683,18 +144701,31 @@ async function pasteSimulator(registry2, device, api, params) {
144683
144701
  }
144684
144702
  );
144685
144703
  }
144686
- await typeSimulatorServer(registry2, device, { udid: params.udid, text: params.text });
144687
- return { pasted: true, via: "keyboard" };
144704
+ const { readback: readback2 } = await typeWithReadback(
144705
+ registry2,
144706
+ device,
144707
+ params.text,
144708
+ () => typeSimulatorServer(registry2, device, { udid: params.udid, text: params.text })
144709
+ );
144710
+ return { pasted: true, via: "keyboard", ...readback2 };
144688
144711
  }
144689
- await api.pressKey("Down", LEFT_GUI_KEYCODE);
144690
- await sleep15(CHORD_STEP_MS);
144691
- await api.pressKey("Down", V_KEYCODE);
144692
- await sleep15(CHORD_STEP_MS);
144693
- await api.pressKey("Up", V_KEYCODE);
144694
- await sleep15(CHORD_STEP_MS);
144695
- await api.pressKey("Up", LEFT_GUI_KEYCODE);
144696
- await sleep15(CHORD_STEP_MS);
144697
- return { pasted: true };
144712
+ const { readback } = await typeWithReadback(
144713
+ registry2,
144714
+ device,
144715
+ params.text,
144716
+ async () => {
144717
+ await api.pressKey("Down", LEFT_GUI_KEYCODE);
144718
+ await sleep15(CHORD_STEP_MS);
144719
+ await api.pressKey("Down", V_KEYCODE);
144720
+ await sleep15(CHORD_STEP_MS);
144721
+ await api.pressKey("Up", V_KEYCODE);
144722
+ await sleep15(CHORD_STEP_MS);
144723
+ await api.pressKey("Up", LEFT_GUI_KEYCODE);
144724
+ await sleep15(CHORD_STEP_MS);
144725
+ },
144726
+ PASTE_MISMATCH_WARNING
144727
+ );
144728
+ return { pasted: true, ...readback };
144698
144729
  }
144699
144730
  function makeIosImpl4(registry2) {
144700
144731
  return {
@@ -144721,8 +144752,15 @@ function makeIosRemoteImpl2(registry2) {
144721
144752
  `Tool 'paste' resolved an ios-remote simulator-server without a transport for ${device.id}.`
144722
144753
  );
144723
144754
  }
144724
- await api.transport.paste(params.text);
144725
- return { pasted: true };
144755
+ const transport = api.transport;
144756
+ const { readback } = await typeWithReadback(
144757
+ registry2,
144758
+ device,
144759
+ params.text,
144760
+ async () => transport.paste(params.text),
144761
+ PASTE_MISMATCH_WARNING
144762
+ );
144763
+ return { pasted: true, ...readback };
144726
144764
  }
144727
144765
  };
144728
144766
  }
@@ -144810,7 +144848,7 @@ function createPasteTool(registry2) {
144810
144848
  id: "paste",
144811
144849
  description: `Set the device clipboard to \`text\` and paste into the focused field (iOS simulator, Android emulator).<flag:macos-apps> Mac app: types \`text\` directly without touching the pasteboard.</flag:macos-apps>
144812
144850
  Use when pasting something a real user would paste (OTP/2FA code, long token/URL, or testing paste handling). Use \`keyboard\` for normal typing. Tap the field first to focus it.
144813
- Returns \`{ pasted: true, via? }\`. Fails on TV targets, if clipboard/typing fails<flag:macos-apps>, or if the Mac app focus accepts no text</flag:macos-apps>.`,
144851
+ Returns \`{ pasted: true, via?, verified?, warning? }\`. On iOS simulators, pasting into an empty field verifies readback (\`verified: false\` warns). Fails on TV targets, if clipboard/typing fails<flag:macos-apps>, or if the Mac app focus accepts no text</flag:macos-apps>.`,
144814
144852
  zodSchema: pasteZodSchema,
144815
144853
  searchHint: "paste clipboard pasteboard otp 2fa code fill field",
144816
144854
  interaction: {
@@ -159591,7 +159629,10 @@ async function startPerfetto(opts) {
159591
159629
  "-o",
159592
159630
  onDeviceTracePath
159593
159631
  ];
159594
- const child = (0, import_child_process7.spawn)(adbPath, adbArgv(args), { stdio: ["pipe", "pipe", "pipe"] });
159632
+ const child = (0, import_child_process7.spawn)(adbPath, adbArgv(args), {
159633
+ stdio: ["pipe", "pipe", "pipe"],
159634
+ windowsHide: true
159635
+ });
159595
159636
  let stdout = "";
159596
159637
  let stderr = "";
159597
159638
  const pid = await new Promise((resolve24, reject) => {
@@ -167694,7 +167735,8 @@ function listeningPids(port) {
167694
167735
  timeout: 5e3,
167695
167736
  // `netstat -ano` dumps every socket on the host; Node's default 1 MiB
167696
167737
  // can overflow and fail the probe.
167697
- maxBuffer: 16 * 1024 * 1024
167738
+ maxBuffer: 16 * 1024 * 1024,
167739
+ windowsHide: true
167698
167740
  });
167699
167741
  return parseNetstatListeningPids(output3, port);
167700
167742
  }
@@ -178307,7 +178349,8 @@ async function listDir(path78) {
178307
178349
  var COMMAND_TIMEOUT_MS = 3e3;
178308
178350
  function runVersionCommand(cmd, args, cwd) {
178309
178351
  return new Promise((resolve24) => {
178310
- const child = (0, import_node_child_process57.execFile)(cmd, args, { cwd, timeout: COMMAND_TIMEOUT_MS }, (err, stdout) => {
178352
+ const options = { cwd, timeout: COMMAND_TIMEOUT_MS, windowsHide: true };
178353
+ const child = (0, import_node_child_process57.execFile)(cmd, args, options, (err, stdout) => {
178311
178354
  if (err) {
178312
178355
  resolve24(null);
178313
178356
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.35.1-next.86",
3
+ "version": "0.35.1-next.88",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
6
6
  "license": "Apache-2.0",
@@ -98,5 +98,5 @@
98
98
  "vitest": "^5.0.5",
99
99
  "yaml": "^2.9.1"
100
100
  },
101
- "gitHead": "305bf6105b3c376149cab9ba8872c794c5bf1ea9"
101
+ "gitHead": "47e2e551e8a794488a0143236039b9958aa01761"
102
102
  }