@swmansion/argent 0.36.1-next.12 → 0.36.1-next.14

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.12";
39196
+ return "0.36.1-next.14";
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.12";
17202
+ return "0.36.1-next.14";
17203
17203
  }
17204
17204
  return "0.0.0";
17205
17205
  }
@@ -38048,6 +38048,16 @@ function asSchema(value) {
38048
38048
  }
38049
38049
 
38050
38050
  // ../argent-mcp/src/tool-mapping.ts
38051
+ function toAnnotations(t) {
38052
+ if (typeof t.destructive !== "boolean" || typeof t.openWorld !== "boolean") {
38053
+ return t.readOnly ? { readOnlyHint: true } : void 0;
38054
+ }
38055
+ return {
38056
+ readOnlyHint: t.readOnly === true,
38057
+ destructiveHint: t.destructive,
38058
+ openWorldHint: t.openWorld
38059
+ };
38060
+ }
38051
38061
  function withoutRetiredParams(schema) {
38052
38062
  const properties = schema.properties;
38053
38063
  if (!properties) return schema;
@@ -38062,11 +38072,12 @@ function toMcpTool(t, { keywordFacts = false } = {}) {
38062
38072
  if (t.alwaysLoad) meta2["anthropic/alwaysLoad"] = true;
38063
38073
  if (t.searchHint) meta2["anthropic/searchHint"] = t.searchHint;
38064
38074
  const schema = withoutRetiredParams(t.inputSchema);
38075
+ const annotations = toAnnotations(t);
38065
38076
  return {
38066
38077
  name: t.name,
38067
38078
  description: t.description,
38068
38079
  inputSchema: { type: "object", ...keywordFacts ? withKeywordFacts(schema) : schema },
38069
- ...t.readOnly ? { annotations: { readOnlyHint: true } } : {},
38080
+ ...annotations ? { annotations } : {},
38070
38081
  ...Object.keys(meta2).length > 0 ? { _meta: meta2 } : {}
38071
38082
  };
38072
38083
  }
@@ -38677,7 +38688,7 @@ async function startMcpServer(options) {
38677
38688
  const autoDescribeOn = autoDescribeEnabled();
38678
38689
  const whatsNewOn = whatsNewEnabled();
38679
38690
  const installedVersion = getInstalledVersion();
38680
- const highlightsVersion = true ? "0.36.1-next.12" : installedVersion;
38691
+ const highlightsVersion = true ? "0.36.1-next.14" : installedVersion;
38681
38692
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38682
38693
  const trees = createTreeMemory();
38683
38694
  const screenshots = createScreenshotMemory();
@@ -23289,6 +23289,7 @@ var init_registry = __esm({
23289
23289
  blueprint,
23290
23290
  state: "IDLE" /* IDLE */,
23291
23291
  instance: null,
23292
+ initAbort: null,
23292
23293
  initPromise: null,
23293
23294
  dependents: /* @__PURE__ */ new Set()
23294
23295
  };
@@ -23317,11 +23318,18 @@ var init_registry = __esm({
23317
23318
  return node2.initPromise;
23318
23319
  }
23319
23320
  this._transition(node2, "STARTING" /* STARTING */);
23320
- const initPromise = this._initialize(node2, [...resolutionPath, urn], options);
23321
+ const initAbort = new AbortController();
23322
+ node2.initAbort = initAbort;
23323
+ const initPromise = this._initialize(
23324
+ node2,
23325
+ [...resolutionPath, urn],
23326
+ initAbort.signal,
23327
+ options
23328
+ );
23321
23329
  node2.initPromise = initPromise;
23322
23330
  return initPromise;
23323
23331
  }
23324
- async _initialize(node2, resolutionPath, options) {
23332
+ async _initialize(node2, resolutionPath, signal, options) {
23325
23333
  const { urn, blueprint } = node2;
23326
23334
  const { payload } = parseURN(urn);
23327
23335
  try {
@@ -23332,7 +23340,13 @@ var init_registry = __esm({
23332
23340
  const depNode = this.services.get(depUrn);
23333
23341
  depNode.dependents.add(urn);
23334
23342
  }
23335
- const instance = await blueprint.factory(resolvedDeps, payload, options);
23343
+ if (signal.aborted) {
23344
+ throw new ServiceInitializationError(urn, "Service was terminated during initialization", {
23345
+ cause: terminatingSignalCause("Service was terminated during initialization")
23346
+ });
23347
+ }
23348
+ const instance = await blueprint.factory(resolvedDeps, payload, options, signal);
23349
+ if (!signal.aborted) node2.initAbort = null;
23336
23350
  if (node2.state !== "STARTING" /* STARTING */) {
23337
23351
  try {
23338
23352
  await instance.dispose();
@@ -23352,6 +23366,12 @@ var init_registry = __esm({
23352
23366
  });
23353
23367
  return instance.api;
23354
23368
  } catch (error63) {
23369
+ if (signal.aborted) {
23370
+ throw new ServiceInitializationError(urn, "Service was terminated during initialization", {
23371
+ cause: terminatingSignalCause("Service was terminated during initialization")
23372
+ });
23373
+ }
23374
+ node2.initAbort = null;
23355
23375
  const cause = error63 instanceof Error ? error63 : new Error(String(error63));
23356
23376
  this._transition(node2, "ERROR" /* ERROR */, cause);
23357
23377
  node2.initPromise = null;
@@ -23387,6 +23407,8 @@ var init_registry = __esm({
23387
23407
  if (!node2 || node2.state === "IDLE" /* IDLE */ || node2.state === "TERMINATING" /* TERMINATING */)
23388
23408
  return;
23389
23409
  this._transition(node2, "TERMINATING" /* TERMINATING */);
23410
+ node2.initAbort?.abort();
23411
+ node2.initAbort = null;
23390
23412
  for (const depUrn of [...node2.dependents]) {
23391
23413
  await this._teardown(depUrn, cause);
23392
23414
  }
@@ -73485,7 +73507,7 @@ function isCi(env = process.env) {
73485
73507
  var SESSION_ID = (0, import_node_crypto4.randomUUID)();
73486
73508
  function readCliVersion() {
73487
73509
  if (true) {
73488
- return "0.36.1-next.12";
73510
+ return "0.36.1-next.14";
73489
73511
  }
73490
73512
  return "0.0.0";
73491
73513
  }
@@ -81814,6 +81836,8 @@ var updateArgentTool = {
81814
81836
  id: "update-argent",
81815
81837
  description: "Apply a pending Argent update. Call this only when the user has explicitly consented in this conversation to updating Argent, e.g. after an update notification reports a new version. Returns { message } with the update status, version info, and whether the tool server restarts. Fails if no update is available or an update is already in progress.",
81816
81838
  zodSchema: zodSchema2,
81839
+ destructive: true,
81840
+ openWorld: true,
81817
81841
  hideWhen: isUpdateCheckDisabled,
81818
81842
  interaction: {
81819
81843
  startedMsg: () => `Updating Argent to ${getUpdateState().installableVersion ?? "latest"}`,
@@ -103952,6 +103976,7 @@ var NATIVE_DEVTOOLS_INIT_RETRY_COOLDOWN_MS = 3e4;
103952
103976
  var NATIVE_DEVTOOLS_AGE_SLOP_MS = 3e3;
103953
103977
  var NATIVE_DEVTOOLS_CONNECT_BUDGET_MS = 15e3;
103954
103978
  var LENT_RELEASE_TIMEOUT_MS = 1e3;
103979
+ var NATIVE_DEVTOOLS_ATTACH_HANDSHAKE_TIMEOUT_MS = 2e3;
103955
103980
  function buildAppStateMessage(bundleId, state3) {
103956
103981
  switch (state3) {
103957
103982
  case "not_running":
@@ -104150,7 +104175,7 @@ var nativeDevtoolsBlueprint = {
104150
104175
  getURN(device) {
104151
104176
  return nativeDevtoolsRef(device).urn;
104152
104177
  },
104153
- async factory(_deps, _payload, options) {
104178
+ async factory(_deps, _payload, options, signal) {
104154
104179
  const opts = options;
104155
104180
  if (!opts?.device) {
104156
104181
  throw new FailureError(
@@ -104571,7 +104596,7 @@ var nativeDevtoolsBlueprint = {
104571
104596
  } catch {
104572
104597
  }
104573
104598
  }
104574
- const serveAgentConnection = (socket) => {
104599
+ const serveAgentConnection = (socket, onHandshake) => {
104575
104600
  let bundleId = null;
104576
104601
  let conn = null;
104577
104602
  attachNdjsonReader(socket, {
@@ -104660,6 +104685,7 @@ var nativeDevtoolsBlueprint = {
104660
104685
  }
104661
104686
  if (conn.pid === void 0) void readConnectionPid(bundleId, conn);
104662
104687
  else wakeConnectionWaiters();
104688
+ onHandshake?.();
104663
104689
  return;
104664
104690
  }
104665
104691
  if (msg.type === "CDP" && conn) {
@@ -104685,8 +104711,12 @@ var nativeDevtoolsBlueprint = {
104685
104711
  let lentConnectedAt = 0;
104686
104712
  let disposed = false;
104687
104713
  if (lentSocketPath) {
104714
+ let pending = null;
104715
+ const hangUp = () => pending?.destroy(new Error("the service was torn down"));
104716
+ signal?.addEventListener("abort", hangUp, { once: true });
104688
104717
  lentSocket = await new Promise((resolve24, reject) => {
104689
104718
  const socket = net3.connect(lentSocketPath);
104719
+ pending = socket;
104690
104720
  const onError = (err) => {
104691
104721
  socket.destroy();
104692
104722
  reject(
@@ -104706,9 +104736,34 @@ var nativeDevtoolsBlueprint = {
104706
104736
  socket.off("error", onError);
104707
104737
  resolve24(socket);
104708
104738
  });
104739
+ if (signal?.aborted) hangUp();
104709
104740
  });
104741
+ const attached = lentSocket;
104710
104742
  lentConnectedAt = performance.now();
104711
- serveAgentConnection(lentSocket);
104743
+ const hungUpBeforeHandshake = await new Promise((resolve24) => {
104744
+ const finish = (hungUp) => {
104745
+ clearTimeout(timer);
104746
+ attached.off("close", onClose);
104747
+ resolve24(hungUp);
104748
+ };
104749
+ const onClose = () => finish(true);
104750
+ const timer = setTimeout(() => finish(false), NATIVE_DEVTOOLS_ATTACH_HANDSHAKE_TIMEOUT_MS);
104751
+ attached.once("close", onClose);
104752
+ serveAgentConnection(attached, () => finish(false));
104753
+ if (attached.destroyed) onClose();
104754
+ });
104755
+ signal?.removeEventListener("abort", hangUp);
104756
+ if (hungUpBeforeHandshake) {
104757
+ throw new FailureError(
104758
+ `${NATIVE_DEVTOOLS_NAMESPACE} lost the agent connection its provider was lending before the provider named the app it serves. Retry the call to attach again; if it keeps failing, run list-devices to see what the provider is offering now.`,
104759
+ {
104760
+ error_code: FAILURE_CODES.NATIVE_DEVTOOLS_ATTACH_LOST,
104761
+ error_kind: "network",
104762
+ failure_area: "tool_server",
104763
+ failure_stage: "native_devtools_attach"
104764
+ }
104765
+ );
104766
+ }
104712
104767
  lentSocket.once("close", () => {
104713
104768
  if (disposed) return;
104714
104769
  events.emit(
@@ -105167,6 +105222,7 @@ function execSimctl(args, options = {}) {
105167
105222
  // ../tool-server/src/utils/simulator-watcher.ts
105168
105223
  var POLL_INTERVAL_MS = 1e4;
105169
105224
  var MAX_BACKOFF_TICKS = 29;
105225
+ var MAX_ATTACH_BACKOFF_POLLS = 30;
105170
105226
  var ARM_WAIT_MS = 15e3;
105171
105227
  var NATIVE_DEVTOOLS_URN_PREFIX = `${NATIVE_DEVTOOLS_NAMESPACE}:`;
105172
105228
  var armTarget = () => Promise.resolve();
@@ -105209,10 +105265,11 @@ async function getBootedUdids(signal) {
105209
105265
  async function initUdid(registry2, udid, trackedServices) {
105210
105266
  const started = await runningNativeDevtools(registry2, udid);
105211
105267
  const service = started ?? await resolveNativeDevtools(registry2, udid);
105212
- if (!service) return;
105268
+ if (!service) return false;
105213
105269
  trackedServices.set(udid, service);
105214
105270
  await started?.reverifyEnv().catch(() => {
105215
105271
  });
105272
+ return true;
105216
105273
  }
105217
105274
  function simulatorNativeDevtoolsRef(udid) {
105218
105275
  return nativeDevtoolsRef({ id: udid, platform: "ios", kind: "simulator" });
@@ -105284,6 +105341,7 @@ function startSimulatorWatcher(registry2) {
105284
105341
  }
105285
105342
  return true;
105286
105343
  }
105344
+ const attachBackoff = /* @__PURE__ */ new Map();
105287
105345
  function withoutForeignSimulators(booted) {
105288
105346
  const ours = /* @__PURE__ */ new Set();
105289
105347
  const claimed = /* @__PURE__ */ new Set();
@@ -105373,12 +105431,32 @@ function startSimulatorWatcher(registry2) {
105373
105431
  }
105374
105432
  consecutiveTimeouts = 0;
105375
105433
  await handBackClaimed(claimed);
105376
- const newUdids = [...booted].filter(
105377
- (udid) => targetedUdids.has(udid.toUpperCase()) && !trackedServices.has(udid)
105378
- );
105379
- const pendingAttempts = newUdids.map(
105380
- (udid) => initUdid(registry2, udid, trackedServices)
105381
- );
105434
+ for (const udid of attachBackoff.keys()) {
105435
+ if (!booted.has(udid) || !claimed.has(udid)) attachBackoff.delete(udid);
105436
+ }
105437
+ const newUdids = [...booted].filter((udid) => {
105438
+ if (!targetedUdids.has(udid.toUpperCase()) || trackedServices.has(udid)) return false;
105439
+ const backoff = attachBackoff.get(udid);
105440
+ if (backoff && backoff.pollsLeft > 0) {
105441
+ backoff.pollsLeft -= 1;
105442
+ return false;
105443
+ }
105444
+ return true;
105445
+ });
105446
+ const attemptInit = async (udid) => {
105447
+ const attached = await initUdid(registry2, udid, trackedServices);
105448
+ if (!claimed.has(udid)) return;
105449
+ if (attached) {
105450
+ attachBackoff.delete(udid);
105451
+ return;
105452
+ }
105453
+ const failures = (attachBackoff.get(udid)?.failures ?? 0) + 1;
105454
+ attachBackoff.set(udid, {
105455
+ failures,
105456
+ pollsLeft: Math.min(2 ** (failures - 1), MAX_ATTACH_BACKOFF_POLLS)
105457
+ });
105458
+ };
105459
+ const pendingAttempts = newUdids.map((udid) => attemptInit(udid));
105382
105460
  for (const [udid, service] of trackedServices) {
105383
105461
  if (!booted.has(udid)) continue;
105384
105462
  if (!service.isEnvSetup()) {
@@ -129862,7 +129940,11 @@ function createHttpApp(registry2, options) {
129862
129940
  inputSchema: renderFlagGated(
129863
129941
  def.inputSchema ?? { type: "object", properties: {} },
129864
129942
  isFlagOffered
129865
- )
129943
+ ),
129944
+ // Always sent, so the MCP adapter can tell `false` from a tool-server
129945
+ // that predates these fields.
129946
+ destructive: def.destructive === true,
129947
+ openWorld: def.openWorld === true
129866
129948
  };
129867
129949
  if (def.outputHint) entry.outputHint = renderFlagGated(def.outputHint, isFlagOffered);
129868
129950
  if (def.fileInputs && def.fileInputs.length > 0) {
@@ -133547,6 +133629,7 @@ function createNativeNetworkLogsTool(registry2) {
133547
133629
  Use when inspecting native SDK/module traffic (pass an ID to \`view-network-request-details\` for bodies/headers).
133548
133630
  Returns recent requests oldest-first with capture status in \`header\` (or a precheck status + remedy message on iOS).<flag:macos-apps> If a Mac log stays stopped, check the start result.</flag:macos-apps> Fails on \`NATIVE_DEVTOOLS_NOT_CONNECTED\`. An Apple system app is rejected outright (terminal: never retry it).`,
133549
133631
  zodSchema: zodSchema6,
133632
+ destructive: true,
133550
133633
  services: (params) => {
133551
133634
  const device = resolveDevice(params.udid);
133552
133635
  if (device.platform === "macos") return macosAppServices(device);
@@ -139810,6 +139893,7 @@ Returns a platform-tagged payload with the target id (\`udid\` / \`serial\` / \`
139810
139893
  zodSchema: zodSchema13,
139811
139894
  alwaysLoad: true,
139812
139895
  searchHint: "boot start launch simulator emulator avd device session ios android vega vvd firetv <flag:harmonyos>harmony harmonyos deveco </flag:harmonyos>cold hot",
139896
+ destructive: true,
139813
139897
  interaction: {
139814
139898
  startedMsg: ({ params }) => `${params.prepareOnly ? "Preparing" : "Starting"} ${bootTarget(params)}`,
139815
139899
  completedMsg: ({ params }) => `${params.prepareOnly ? "Prepared" : "Started"} ${bootTarget(params)}`,
@@ -140616,6 +140700,7 @@ Common Android packages: com.android.settings, com.android.chrome, com.google.an
140616
140700
  zodSchema: zodSchema14,
140617
140701
  alwaysLoad: true,
140618
140702
  searchHint: "open start app bundle id package simulator emulator chromium vega launch tvos apple tv fire tv",
140703
+ destructive: true,
140619
140704
  interaction: {
140620
140705
  startedMsg: ({ params }) => `Launching ${params.bundleId}`,
140621
140706
  completedMsg: ({ params }) => `Launched ${params.bundleId}`,
@@ -140916,6 +141001,7 @@ Use when you need a clean in-memory app state without reinstalling. Returns { re
140916
141001
  zodSchema: zodSchema15,
140917
141002
  alwaysLoad: true,
140918
141003
  searchHint: "terminate relaunch restart reset app bundle id package simulator emulator vega tvos fire tv<flag:harmonyos> harmony harmonyos</flag:harmonyos>",
141004
+ destructive: true,
140919
141005
  interaction: {
140920
141006
  startedMsg: ({ params }) => `Restarting ${params.bundleId}`,
140921
141007
  completedMsg: ({ params }) => `Restarted ${params.bundleId}`,
@@ -140969,6 +141055,7 @@ Use when a program needs the app closed between steps; agents use restart-app.
140969
141055
  Returns { terminated, bundleId }; terminated is false on iOS when the app was not running.
140970
141056
  Succeeds when the app is not running or not installed.`,
140971
141057
  zodSchema: zodSchema16,
141058
+ destructive: true,
140972
141059
  hideFromMcp: true,
140973
141060
  interaction: {
140974
141061
  startedMsg: ({ params }) => `Terminating ${params.bundleId}`,
@@ -141481,6 +141568,7 @@ var reinstallAppTool = {
141481
141568
  Use when installing a new build or resetting to clean state.
141482
141569
  Returns \`{ reinstalled, bundleId }\`. Fails if \`appPath\` is invalid or \`bundleId\` does not match it (not checked on Vega or remote simulators; checks run before uninstall), or if install fails. An uninstall error fails the call on Android and physical iPhones, and on a local simulator only when it times out; Vega and remote simulators ignore it.`,
141483
141570
  zodSchema: zodSchema17,
141571
+ destructive: true,
141484
141572
  interaction: {
141485
141573
  startedMsg: ({ params }) => `Reinstalling ${params.bundleId}`,
141486
141574
  completedMsg: ({ params }) => `Reinstalled ${params.bundleId}`,
@@ -141804,6 +141892,7 @@ iOS sim: \`grant location\`/\`location-always\` requires the app installed first
141804
141892
  Returns \`{ action, permission, bundleId, applied, skipped? }\`. Fails if nothing could be applied.`,
141805
141893
  zodSchema: zodSchema18,
141806
141894
  searchHint: "grant deny reset revoke app permissions privacy camera microphone location settings",
141895
+ destructive: true,
141807
141896
  interaction: {
141808
141897
  startedMsg: ({ params }) => `${permissionAction[params.action].started} ${params.permission} permission for ${params.bundleId}`,
141809
141898
  completedMsg: ({ params }) => `${permissionAction[params.action].completed} ${params.permission} permission for ${params.bundleId}`,
@@ -142121,6 +142210,7 @@ A read returns \`current\` values and \`unsupported\` settings with reasons. A c
142121
142210
  Changes persist. To undo, pass a nonempty \`restore\` map as \`settings\`. Check \`notes\` for side effects and values the tool cannot restore. Unsupported requests fail before writing, including turning Wi-Fi off or airplane mode on over wireless adb. If a write fails partway through, use any undo arguments in the error.`,
142122
142211
  zodSchema,
142123
142212
  searchHint: "system settings dark mode appearance text size font scale accessibility reduce motion bold text contrast language locale region 24-hour clock wifi airplane mode mobile data location do not disturb",
142213
+ destructive: true,
142124
142214
  interaction: {
142125
142215
  startedMsg: ({ params }) => params.settings ? `Changing ${changedKeys(params)}` : "Reading system settings",
142126
142216
  completedMsg: ({ params }) => params.settings ? `Changed ${changedKeys(params)}` : "Read system settings",
@@ -142393,6 +142483,7 @@ var openUrlTool = {
142393
142483
  Use when navigating to a web page or deep-linking into an app (prefer custom schemes or \`launch-app\` over \`https://\` Universal/App Links). On Chromium, navigates the primary page (non-page schemes like \`tel:\`/\`mailto:\` fail). On physical iOS, the receiving app becomes active for automation.<flag:harmonyos> HarmonyOS opens URIs via \`aa start -U\`.</flag:harmonyos>
142394
142484
  Returns \`{ opened, url, note? }\`. Fails if no handler is registered<flag:harmonyos> (iOS/Android/HarmonyOS)</flag:harmonyos> or Chromium rejects navigation.`,
142395
142485
  zodSchema: zodSchema19,
142486
+ openWorld: true,
142396
142487
  interaction: {
142397
142488
  startedMsg: ({ params }) => `Opening ${safeDestination(params.url)}`,
142398
142489
  completedMsg: ({ params }) => `Opened ${safeDestination(params.url)}`,
@@ -142784,7 +142875,8 @@ Use when you need a baseline image or the screen state after a delay (interactio
142784
142875
  zodSchema: zodSchema20,
142785
142876
  alwaysLoad: true,
142786
142877
  searchHint: "device simulator emulator chromium screen image capture baseline tvos apple tv",
142787
- // Not readOnly: plan mode would run a call whose `out` replaces a file without a prompt.
142878
+ // `out` can replace a file. Not readOnly, so plan mode asks before a call.
142879
+ destructive: true,
142788
142880
  interaction: {
142789
142881
  startedMsg: () => "Capturing screenshot",
142790
142882
  completedMsg: ({ result }) => `Captured screenshot ${result.image.filename}`,
@@ -147941,6 +148033,8 @@ Use when inspecting runtime state (e.g. localStorage/sessionStorage on Chromium)
147941
148033
  Returns \`{ result, deviceName, appName, logicalDeviceId }\` (JSON-serialized; cyclic objects fail). Fails if disconnected or the expression throws.`,
147942
148034
  zodSchema: zodSchema37,
147943
148035
  searchHint: "javascript js eval expression runtime app state localstorage sessionstorage web storage",
148036
+ destructive: true,
148037
+ openWorld: true,
147944
148038
  interaction: {
147945
148039
  startedMsg: () => "Running JavaScript in the app",
147946
148040
  completedMsg: () => "Ran JavaScript in the app",
@@ -147995,6 +148089,7 @@ var debuggerReloadMetroTool = {
147995
148089
  description: `Restart the Metro JS bundle in the connected React Native app without restarting the native process.
147996
148090
  Use when you want to apply code changes or reset JS state. Returns { reloaded, port, method (cdp or http), deviceName, appName, logicalDeviceId }. Fails if Metro is not running on the given port.<flag:macos-apps> A Mac app reload targets only that app. If it fails, restart the app. A shared Metro reload would also reload other apps.</flag:macos-apps>`,
147997
148091
  zodSchema: zodSchema38,
148092
+ destructive: true,
147998
148093
  interaction: {
147999
148094
  startedMsg: () => "Reloading the app through Metro",
148000
148095
  completedMsg: () => "Reloaded the app through Metro",
@@ -153715,6 +153810,7 @@ function createReactProfilerStartTool(registry2) {
153715
153810
  Returns \`{ started_at, startedAtEpochMs, hermes_version, detected_architecture }\` or \`{ already_running: true, mine, owner, \u2026 }\` (ask approval before \`force: true\`). On iOS and Android, a warning names the apps with native network capture on.
153716
153811
  Fails if Hermes or Metro CDP is unreachable.`,
153717
153812
  zodSchema: zodSchema50,
153813
+ destructive: true,
153718
153814
  interaction: {
153719
153815
  startedMsg: () => "Starting React profiler",
153720
153816
  completedMsg: ({ result }) => result.already_running ? "React profiler was already running" : "Started React profiler",
@@ -163522,6 +163618,7 @@ var nativeProfilerLaunchAnalysisTool = {
163522
163618
  Use when benchmarking launch time (\`measure\`: 5 XCTest launches incl. extended tasks; signed runner on iPhone) or profiling pre-first-frame CPU work (\`profile\`: Instruments App Launch trace; follow \`profilerSession.next\` with \`profiler-load\` + \`profiler-stack-query\`).
163523
163619
  Returns \`samplesCollected\` (\`measure\`) or \`launchMs\` + \`profilerSession\` (\`profile\`). Fails if the app is not installed or no iPhone / allowed simulator is available.`,
163524
163620
  zodSchema: zodSchema61,
163621
+ destructive: true,
163525
163622
  services: () => ({}),
163526
163623
  async execute(_services, params, ctx) {
163527
163624
  let endClaim = () => {
@@ -168626,6 +168723,7 @@ function createStopSimulatorServerTool(registry2) {
168626
168723
  Use when restarting a wedged transport or freeing one device without affecting others (not routinely after every task; use \`stop-all-simulator-servers\` with \`devices\` to also stop devtools/profilers/debuggers). On Chromium, also ends the JS debugger session.<flag:macos-apps> On Mac apps, also stops native capture (discarding records) and screen recording.</flag:macos-apps>
168627
168724
  Returns \`{ stopped, udid }\` (\`stopped: true\` if any of these services was running, \`false\` if none was). A simulator-server that Argent did not start keeps running and does not count, so on a TV target \`stopped\` can be true from the TV daemons alone. Fails only on invalid input.`,
168628
168725
  zodSchema: zodSchema70,
168726
+ destructive: true,
168629
168727
  interaction: {
168630
168728
  startedMsg: ({ params }) => `Stopping simulator server for ${params.udid}`,
168631
168729
  completedMsg: ({ params }) => `Stopped simulator server for ${params.udid}`,
@@ -168673,6 +168771,7 @@ Use when cleaning up or ending a session, or when a skill asks to recycle servic
168673
168771
  Always pass \`devices\` with this session's device IDs (plus any \`logicalDeviceId\` used with \`debugger-connect\` on shared Metro) so other agents' devices aren't torn down; omit \`devices\` only for a machine-wide sweep. \`[]\` stops nothing.
168674
168772
  Returns \`{ stopped, unmatched?, left_running?, aborted? }\` (\`stopped\` leaves out a simulator-server or native devtools agent that Argent did not start, which keeps running; \`left_running\` names unscoped debugger URNs; re-call with the id after \`<ns>:<port>:\` to reap them). Fails if unknown keys (e.g. \`udids\`) are passed.`,
168675
168773
  zodSchema: zodSchema71,
168774
+ destructive: true,
168676
168775
  interaction: {
168677
168776
  // "all" only holds for the unscoped sweep; a scoped call touches just the
168678
168777
  // ids it was given.
@@ -168886,6 +168985,7 @@ var stopMetroTool = {
168886
168985
  id: "stop-metro",
168887
168986
  description: `Stop the Metro bundler process listening on \`port\`. Use when the user asks to stop Metro or when Metro must be restarted - do not offer it when a task wraps up, since the next task would wait on a cold Metro start. Returns { stopped, port, pids }: stopped=true when it sent SIGTERM to every listening pid it found (or the pid had already exited), stopped=false when it found none. Fails if the port lookup cannot run or times out, if it finds a listener but not the process that owns it, or if it cannot signal a listener it found (e.g. EPERM). On macOS another user's listener is detected only when no other listener on the port is visible, so it can survive stopped=true. This is DESTRUCTIVE: always ask the user for confirmation before calling this tool.`,
168888
168987
  zodSchema: zodSchema72,
168988
+ destructive: true,
168889
168989
  interaction: {
168890
168990
  startedMsg: ({ params }) => `Stopping Metro on port ${params.port}`,
168891
168991
  completedMsg: ({ params }) => `Stopped Metro on port ${params.port}`,
@@ -170476,6 +170576,9 @@ Record live steps with \`e2e-add-step\` (start standalone tests with \`restart-a
170476
170576
  Returns \`{ message, e2eTestFile, savedTo, restarted?, discardedSteps?, fragmentShutdown? }\`. Fails if the target file or directory cannot be written.`,
170477
170577
  zodSchema: zodSchema73,
170478
170578
  aliases: ["flow-start-recording"],
170579
+ // A restart runs the discarded take's fragment shutdown steps, which can call any tool or script.
170580
+ destructive: true,
170581
+ openWorld: true,
170479
170582
  interaction: {
170480
170583
  // Name the flow: concurrent recordings interleave in one log, and "flow
170481
170584
  // recording" would not say which.
@@ -173892,6 +173995,8 @@ Use when recording steps after \`e2e-start-recording\` (pass \`shutdown: true\`
173892
173995
  Returns \`{ message, toolResult, stepCount, recorded?, savedTo }\`. Fails if no recording is open or the step errors (nothing recorded).`,
173893
173996
  zodSchema: zodSchema74,
173894
173997
  aliases: ["flow-add-step"],
173998
+ destructive: true,
173999
+ openWorld: true,
173895
174000
  interaction: {
173896
174001
  // Name the flow: recordings are concurrent, so several of these lines can
173897
174002
  // interleave in one log and "the recorded flow" would not say which.
@@ -174368,6 +174473,8 @@ var flowAddScriptTool = deferredShutdownFirst({
174368
174473
  Use when the user requests a local script in an open recording (output is available to later steps via \`{{output:PATH}}\`).
174369
174474
  Returns \`{ status, reason?, outputJson?, stepCount, recorded? }\`. A failed script returns \`status: "fail"\` or \`"error"\` without recording (check \`reason\` and affected state before retrying). Fails on invalid input, no open recording, or recording over a link.`,
174370
174475
  zodSchema: zodSchema77,
174476
+ destructive: true,
174477
+ openWorld: true,
174371
174478
  fileInputs: PROJECT_ROOT_INPUT,
174372
174479
  aliases: ["flow-add-script"],
174373
174480
  interaction: {
@@ -174532,6 +174639,8 @@ var flowFinishRecordingTool = {
174532
174639
  Use when all steps have been recorded and you are ready to polish or replay the YAML (check any \`warning:\` lines in \`summary\` for recorded waits).
174533
174640
  Returns \`{ message, path, steps, shutdownSteps?, fragmentShutdown?, summary, e2eTestFile, savedTo }\`. Fails if no recording is open for \`name\` + \`project_root\`.`,
174534
174641
  zodSchema: zodSchema78,
174642
+ destructive: true,
174643
+ openWorld: true,
174535
174644
  fileInputs: PROJECT_ROOT_INPUT,
174536
174645
  aliases: ["flow-finish-recording"],
174537
174646
  // It may run the fragments' shutdown, on the device.
@@ -178147,6 +178256,8 @@ Returns a per-step report (\`ok: false\` on step failure). A main-step failure s
178147
178256
  Over a link (\`argent link\` / \`ARGENT_TOOLS_URL\`), the client uploads the test, \`run:\` fragments, baselines, and absolute \`.png\`/\`.yaml\` args; steps needing other client files (e.g. \`script:\`, recording tools, directories) fail before step 1. Fails if the YAML is invalid, no unique matching device is booted, or pre-step link validation fails.`,
178148
178257
  zodSchema: zodSchema79,
178149
178258
  aliases: ["flow-execute"],
178259
+ destructive: true,
178260
+ openWorld: true,
178150
178261
  interaction: {
178151
178262
  startedMsg: ({ params }) => `Running e2e test ${displayFlowName(params)}`,
178152
178263
  completedMsg: ({ params }) => `Ran e2e test ${displayFlowName(params)}`,
@@ -180467,6 +180578,8 @@ Use when switching between multiple tabs/windows or opening/closing pages.
180467
180578
  Returns \`{ tabs: [{ tabId, targetId, title, url, active, label? }] }\`. Fails on non-Chromium targets or unknown tab ids.`,
180468
180579
  zodSchema: zodSchema87,
180469
180580
  searchHint: "tab tabs window windows switch select close new open multi-tab chromium electron",
180581
+ destructive: true,
180582
+ openWorld: true,
180470
180583
  interaction: {
180471
180584
  startedMsg: ({ params }) => tabAction[params.action].started(params),
180472
180585
  completedMsg: ({ params, result }) => tabAction[params.action].completed(params, result),
@@ -180604,6 +180717,7 @@ Use when seeding an auth session or asserting cookie state (\`set\`/\`delete\` n
180604
180717
  Returns \`{ cookies, count }\` (\`get\`) or \`{ set }\` / \`{ deleted }\` / \`{ cleared }\`. Fails on non-Chromium targets or missing required params.`,
180605
180718
  zodSchema: zodSchema88,
180606
180719
  searchHint: "cookies cookie get set delete clear httponly samesite session auth chromium",
180720
+ destructive: true,
180607
180721
  interaction: {
180608
180722
  startedMsg: ({ params }) => `${cookieAction[params.action].started} browser cookies`,
180609
180723
  completedMsg: ({ params }) => `${cookieAction[params.action].completed} browser cookies`,
@@ -180699,6 +180813,7 @@ Use when seeding feature flags / auth tokens before an e2e test or asserting per
180699
180813
  Returns { value } for one key, { entries, count } for all keys, and { set } / { removed } / { cleared } for the writes. Fails if the device is not a Chromium (CDP) device, or the action is missing the \`key\` / \`value\` it needs.`,
180700
180814
  zodSchema: zodSchema89,
180701
180815
  searchHint: "storage localstorage sessionstorage local session get set remove clear key value chromium",
180816
+ destructive: true,
180702
180817
  // Agents read and write Web Storage with debugger-evaluate, which runs the same
180703
180818
  // Runtime.evaluate on the active page. The SDK and the e2e-full suite still call it.
180704
180819
  hideFromMcp: true,
@@ -180951,6 +181066,7 @@ Returns { panels } for list, { chosen, panel, kind, paths } for choose, { cancel
180951
181066
  Fails if no panel appears within timeoutMs, if more than one panel is open and panel is not given, if a path is relative or does not exist (a save panel needs an existing folder), if a path for a save panel is an existing folder other than a document package the panel saves, if the path does not fit the panel choose finds (a folder for a panel of files, a file for a panel of folders, a refused extension), if discard finds no Delete or Don't Save button, or if the Mac app is not running.`,
180952
181067
  zodSchema: zodSchema90,
180953
181068
  searchHint: "file panel dialog open save choose pick file folder nsopenpanel nssavepanel mac app",
181069
+ destructive: true,
180954
181070
  featureFlag: "macos-apps",
180955
181071
  interaction: {
180956
181072
  startedMsg: ({ params }) => params.action === "list" ? "Listing file panels" : `File panel: ${params.action}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.36.1-next.12",
3
+ "version": "0.36.1-next.14",
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": "bc85b71dc996faea55449af29a2020d03bbd6c4c"
102
+ "gitHead": "0a21b3d562488e4e5142e3a79b65e198e2208326"
103
103
  }