@swmansion/argent 0.35.1-next.87 → 0.35.1-next.89

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
@@ -39147,7 +39147,7 @@ function isCi(env = process.env) {
39147
39147
  var SESSION_ID2 = randomUUID5();
39148
39148
  function readCliVersion() {
39149
39149
  if (true) {
39150
- return "0.35.1-next.86";
39150
+ return "0.35.1-next.89";
39151
39151
  }
39152
39152
  return "0.0.0";
39153
39153
  }
@@ -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.89";
17181
17181
  }
17182
17182
  return "0.0.0";
17183
17183
  }
@@ -38588,7 +38588,7 @@ async function startMcpServer(options) {
38588
38588
  const autoDescribeOn = autoDescribeEnabled();
38589
38589
  const whatsNewOn = whatsNewEnabled();
38590
38590
  const installedVersion = getInstalledVersion();
38591
- const highlightsVersion = true ? "0.35.1-next.86" : installedVersion;
38591
+ const highlightsVersion = true ? "0.35.1-next.89" : installedVersion;
38592
38592
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38593
38593
  const trees = createTreeMemory();
38594
38594
  const screenshots = createScreenshotMemory();
@@ -73425,7 +73425,7 @@ function isCi(env = process.env) {
73425
73425
  var SESSION_ID = (0, import_node_crypto4.randomUUID)();
73426
73426
  function readCliVersion() {
73427
73427
  if (true) {
73428
- return "0.35.1-next.86";
73428
+ return "0.35.1-next.89";
73429
73429
  }
73430
73430
  return "0.0.0";
73431
73431
  }
@@ -143523,7 +143523,7 @@ async function within2(ms3, run2) {
143523
143523
  clearTimeout(timer);
143524
143524
  }
143525
143525
  }
143526
- async function typeWithReadback(registry2, device, text, type) {
143526
+ async function typeWithReadback(registry2, device, text, type, mismatchWarning = READBACK_MISMATCH_WARNING) {
143527
143527
  if (!text || FOCUS_MOVING.test(text)) return { result: await type() };
143528
143528
  const ax = await within2(READBACK_TIMING.resolveMs, async () => {
143529
143529
  const ref = axServiceRef(device);
@@ -143550,7 +143550,7 @@ async function typeWithReadback(registry2, device, text, type) {
143550
143550
  const late = await judge();
143551
143551
  if (late === "holds") return verified;
143552
143552
  if (late === "moved" || late === "unread") return { result };
143553
- return { result, readback: { verified: false, warning: READBACK_MISMATCH_WARNING } };
143553
+ return { result, readback: { verified: false, warning: mismatchWarning } };
143554
143554
  }
143555
143555
  function judgeTree(nodes, typedInto, text) {
143556
143556
  const focused = focusedInput(nodes);
@@ -144679,6 +144679,7 @@ var LEFT_GUI_KEYCODE = 227;
144679
144679
  var V_KEYCODE = charToKeyPress("v").keyCode;
144680
144680
  var CHORD_STEP_MS = 50;
144681
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.";
144682
144683
  var typesAsText = (char) => !"\n\r ".includes(char) && !!charToKeyPress(char);
144683
144684
  function rejectTv(device) {
144684
144685
  throw new UnsupportedOperationError(
@@ -144700,18 +144701,31 @@ async function pasteSimulator(registry2, device, api, params) {
144700
144701
  }
144701
144702
  );
144702
144703
  }
144703
- await typeSimulatorServer(registry2, device, { udid: params.udid, text: params.text });
144704
- 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 };
144705
144711
  }
144706
- await api.pressKey("Down", LEFT_GUI_KEYCODE);
144707
- await sleep15(CHORD_STEP_MS);
144708
- await api.pressKey("Down", V_KEYCODE);
144709
- await sleep15(CHORD_STEP_MS);
144710
- await api.pressKey("Up", V_KEYCODE);
144711
- await sleep15(CHORD_STEP_MS);
144712
- await api.pressKey("Up", LEFT_GUI_KEYCODE);
144713
- await sleep15(CHORD_STEP_MS);
144714
- 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 };
144715
144729
  }
144716
144730
  function makeIosImpl4(registry2) {
144717
144731
  return {
@@ -144738,8 +144752,15 @@ function makeIosRemoteImpl2(registry2) {
144738
144752
  `Tool 'paste' resolved an ios-remote simulator-server without a transport for ${device.id}.`
144739
144753
  );
144740
144754
  }
144741
- await api.transport.paste(params.text);
144742
- 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 };
144743
144764
  }
144744
144765
  };
144745
144766
  }
@@ -144827,7 +144848,7 @@ function createPasteTool(registry2) {
144827
144848
  id: "paste",
144828
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>
144829
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.
144830
- 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>.`,
144831
144852
  zodSchema: pasteZodSchema,
144832
144853
  searchHint: "paste clipboard pasteboard otp 2fa code fill field",
144833
144854
  interaction: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.35.1-next.87",
3
+ "version": "0.35.1-next.89",
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": "67e45a9ddc98ae9b6d1a408cc634b5c2ffc017c8"
101
+ "gitHead": "7f1ac94c91afbbebf9b0e53b7c18f684406e523b"
102
102
  }