@swmansion/argent 0.36.1-next.10 → 0.36.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.
package/dist/cli-cmds.mjs CHANGED
@@ -39193,7 +39193,7 @@ function isCi(env = process.env) {
39193
39193
  var SESSION_ID2 = randomUUID5();
39194
39194
  function readCliVersion() {
39195
39195
  if (true) {
39196
- return "0.36.1-next.10";
39196
+ return "0.36.1-next.12";
39197
39197
  }
39198
39198
  return "0.0.0";
39199
39199
  }
@@ -17199,7 +17199,7 @@ function isCi(env = process.env) {
17199
17199
  var SESSION_ID = randomUUID4();
17200
17200
  function readCliVersion() {
17201
17201
  if (true) {
17202
- return "0.36.1-next.10";
17202
+ return "0.36.1-next.12";
17203
17203
  }
17204
17204
  return "0.0.0";
17205
17205
  }
@@ -38677,7 +38677,7 @@ async function startMcpServer(options) {
38677
38677
  const autoDescribeOn = autoDescribeEnabled();
38678
38678
  const whatsNewOn = whatsNewEnabled();
38679
38679
  const installedVersion = getInstalledVersion();
38680
- const highlightsVersion = true ? "0.36.1-next.10" : installedVersion;
38680
+ const highlightsVersion = true ? "0.36.1-next.12" : installedVersion;
38681
38681
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38682
38682
  const trees = createTreeMemory();
38683
38683
  const screenshots = createScreenshotMemory();
@@ -73485,7 +73485,7 @@ function isCi(env = process.env) {
73485
73485
  var SESSION_ID = (0, import_node_crypto4.randomUUID)();
73486
73486
  function readCliVersion() {
73487
73487
  if (true) {
73488
- return "0.36.1-next.10";
73488
+ return "0.36.1-next.12";
73489
73489
  }
73490
73490
  return "0.0.0";
73491
73491
  }
@@ -129617,6 +129617,16 @@ function checkTokenExemptAccess(req, policy) {
129617
129617
  error: `This request came ${from2}. Without a token, the tool-server serves /preview and its WebSocket only to clients on its own machine. Send \`Authorization: Bearer <token>\`, or reach the server through an SSH tunnel to 127.0.0.1. \`argent server start\` prints the token and saves it to ${TOKEN_FILE_HINT}.`
129618
129618
  };
129619
129619
  }
129620
+ function checkChromiumWebsocketAccess(req, policy) {
129621
+ const denial = checkTokenExemptAccess(req, policy);
129622
+ if (denial || !policy.expectedToken) return denial;
129623
+ const provided = extractBearerToken(req.headers.authorization);
129624
+ if (provided && constantTimeEqual(provided, policy.expectedToken)) return null;
129625
+ return {
129626
+ status: 401,
129627
+ error: `Missing or invalid Authorization header. The Chromium WebSocket requires \`Authorization: Bearer <token>\` where <token> matches the value in ${TOKEN_FILE_HINT}.`
129628
+ };
129629
+ }
129620
129630
  function interfaceAddresses() {
129621
129631
  const out = [];
129622
129632
  for (const list of Object.values((0, import_node_os13.networkInterfaces)())) {
@@ -130335,7 +130345,10 @@ function createHttpApp(registry2, options) {
130335
130345
  if (!api) return null;
130336
130346
  return api.server;
130337
130347
  },
130338
- (req) => checkTokenExemptAccess(req, { allowedHostnames: tokenExemptHostnames(), expectedToken })
130348
+ (req) => checkChromiumWebsocketAccess(req, {
130349
+ allowedHostnames: tokenExemptHostnames(),
130350
+ expectedToken
130351
+ })
130339
130352
  );
130340
130353
  }
130341
130354
  };
@@ -140287,6 +140300,9 @@ var iosRemoteImpl = {
140287
140300
  init_src2();
140288
140301
  init_adb();
140289
140302
  function assertAmStartOk(out) {
140303
+ if (/Status:\s*timeout/i.test(out)) {
140304
+ return "Android started the app, but its launch wait ended first (Status: timeout). Wait for the app's screen before the next action.";
140305
+ }
140290
140306
  if (!/Status:\s*ok/i.test(out)) {
140291
140307
  throw new FailureError(`am start failed: ${out.trim()}`, {
140292
140308
  error_code: FAILURE_CODES.ANDROID_LAUNCH_AM_START_FAILED,
@@ -140295,6 +140311,7 @@ function assertAmStartOk(out) {
140295
140311
  error_kind: "subprocess"
140296
140312
  });
140297
140313
  }
140314
+ return void 0;
140298
140315
  }
140299
140316
  function normalizeActivityComponent(bundleId, activity) {
140300
140317
  if (activity.includes("/")) return activity;
@@ -140369,9 +140386,9 @@ var androidImpl = {
140369
140386
  const out = await adbShell(params.udid, start2, {
140370
140387
  timeoutMs: 3e4
140371
140388
  });
140372
- assertAmStartOk(out);
140389
+ const note = assertAmStartOk(out);
140373
140390
  const capture = await followNativeNetworkCapture(params.udid, params.bundleId);
140374
- return { launched: true, bundleId: params.bundleId, ...capture };
140391
+ return { launched: true, bundleId: params.bundleId, ...note && { note }, ...capture };
140375
140392
  }
140376
140393
  };
140377
140394
 
@@ -140812,8 +140829,9 @@ var androidImpl2 = {
140812
140829
  const out = await adbShell(udid, start2, {
140813
140830
  timeoutMs: 3e4
140814
140831
  });
140832
+ let note;
140815
140833
  try {
140816
- assertAmStartOk(out);
140834
+ note = assertAmStartOk(out);
140817
140835
  } catch (err) {
140818
140836
  throw new FailureError(
140819
140837
  `relaunch failed: ${err instanceof Error ? err.message : String(err)}`,
@@ -140827,7 +140845,7 @@ var androidImpl2 = {
140827
140845
  );
140828
140846
  }
140829
140847
  const capture = await followNativeNetworkCapture(udid, bundleId);
140830
- return { restarted: true, bundleId, ...capture };
140848
+ return { restarted: true, bundleId, ...note && { note }, ...capture };
140831
140849
  }
140832
140850
  };
140833
140851
 
@@ -140894,7 +140912,7 @@ function createRestartAppTool(registry2) {
140894
140912
  // Android's device probes, force-stop and `am start -W` can outlast the 30s MCP fetch timeout.
140895
140913
  longRunning: true,
140896
140914
  description: `Terminate and relaunch an app (also refreshes native-devtools injection on iOS/tvOS).<flag:macos-apps> On a Mac app, quits and restarts the same .app in the background.</flag:macos-apps>
140897
- Use when you need a clean in-memory app state without reinstalling. Returns { restarted, bundleId, <flag:macos-apps>kind?, appPath?, args?, note?, </flag:macos-apps>networkCapture? }. Fails if the app is not installed or fails to terminate.`,
140915
+ Use when you need a clean in-memory app state without reinstalling. Returns { restarted, bundleId, <flag:macos-apps>kind?, appPath?, args?, </flag:macos-apps>note?, networkCapture? }. Fails if the app is not installed or fails to terminate.`,
140898
140916
  zodSchema: zodSchema15,
140899
140917
  alwaysLoad: true,
140900
140918
  searchHint: "terminate relaunch restart reset app bundle id package simulator emulator vega tvos fire tv<flag:harmonyos> harmony harmonyos</flag:harmonyos>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.36.1-next.10",
3
+ "version": "0.36.1-next.12",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server, CLI, and skills by Software Mansion that let AI coding agents control, test, debug, and profile apps on iOS simulators, Android emulators, physical devices, TVs, and desktop apps",
6
6
  "license": "Apache-2.0",
@@ -99,5 +99,5 @@
99
99
  "vitest": "^5.0.5",
100
100
  "yaml": "^2.9.1"
101
101
  },
102
- "gitHead": "03188df677b883dd20058352c99c5ec6b9db5790"
102
+ "gitHead": "bc85b71dc996faea55449af29a2020d03bbd6c4c"
103
103
  }