@swmansion/argent 0.35.1-next.32 → 0.35.1-next.33

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.
@@ -12577,12 +12577,12 @@ var require_dist = __commonJS({
12577
12577
  throw new Error(`Unknown format "${name}"`);
12578
12578
  return f;
12579
12579
  };
12580
- function addFormats(ajv, list, fs13, exportName) {
12580
+ function addFormats(ajv, list, fs14, exportName) {
12581
12581
  var _a3;
12582
12582
  var _b;
12583
12583
  (_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
12584
12584
  for (const f of list)
12585
- ajv.addFormat(f, fs13[f]);
12585
+ ajv.addFormat(f, fs14[f]);
12586
12586
  }
12587
12587
  module.exports = exports = formatsPlugin;
12588
12588
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -19863,14 +19863,14 @@ var require_parser = __commonJS({
19863
19863
  case "scalar":
19864
19864
  case "single-quoted-scalar":
19865
19865
  case "double-quoted-scalar": {
19866
- const fs13 = this.flowScalar(this.type);
19866
+ const fs14 = this.flowScalar(this.type);
19867
19867
  if (atNextItem || it.value) {
19868
- map.items.push({ start, key: fs13, sep: [] });
19868
+ map.items.push({ start, key: fs14, sep: [] });
19869
19869
  this.onKeyLine = true;
19870
19870
  } else if (it.sep) {
19871
- this.stack.push(fs13);
19871
+ this.stack.push(fs14);
19872
19872
  } else {
19873
- Object.assign(it, { key: fs13, sep: [] });
19873
+ Object.assign(it, { key: fs14, sep: [] });
19874
19874
  this.onKeyLine = true;
19875
19875
  }
19876
19876
  return;
@@ -19998,13 +19998,13 @@ var require_parser = __commonJS({
19998
19998
  case "scalar":
19999
19999
  case "single-quoted-scalar":
20000
20000
  case "double-quoted-scalar": {
20001
- const fs13 = this.flowScalar(this.type);
20001
+ const fs14 = this.flowScalar(this.type);
20002
20002
  if (!it || it.value)
20003
- fc.items.push({ start: [], key: fs13, sep: [] });
20003
+ fc.items.push({ start: [], key: fs14, sep: [] });
20004
20004
  else if (it.sep)
20005
- this.stack.push(fs13);
20005
+ this.stack.push(fs14);
20006
20006
  else
20007
- Object.assign(it, { key: fs13, sep: [] });
20007
+ Object.assign(it, { key: fs14, sep: [] });
20008
20008
  return;
20009
20009
  }
20010
20010
  case "flow-map-end":
@@ -32096,7 +32096,7 @@ var Server = class extends Protocol {
32096
32096
 
32097
32097
  // ../argent-tools-client/src/launcher.ts
32098
32098
  import * as net from "node:net";
32099
- import * as fs5 from "node:fs";
32099
+ import * as fs6 from "node:fs";
32100
32100
  import * as path7 from "node:path";
32101
32101
  import * as readline from "node:readline";
32102
32102
  import { spawn, execFileSync } from "node:child_process";
@@ -32711,6 +32711,7 @@ function getConfigDefinition(key, registry2 = CONFIG_SCHEMA) {
32711
32711
  }
32712
32712
 
32713
32713
  // ../configuration-core/src/config-access.ts
32714
+ import * as fs5 from "node:fs";
32714
32715
  import * as path6 from "node:path";
32715
32716
  function readScopeValue(def, scope, options) {
32716
32717
  if (!def.scopes.includes(scope)) return void 0;
@@ -32826,7 +32827,7 @@ function isVersionNewer(a, b) {
32826
32827
  function readBundlePackageVersion(bundlePath) {
32827
32828
  try {
32828
32829
  const pkg = JSON.parse(
32829
- fs5.readFileSync(path7.join(path7.dirname(bundlePath), "..", "package.json"), "utf8")
32830
+ fs6.readFileSync(path7.join(path7.dirname(bundlePath), "..", "package.json"), "utf8")
32830
32831
  );
32831
32832
  return typeof pkg.version === "string" ? pkg.version : void 0;
32832
32833
  } catch {
@@ -32883,7 +32884,7 @@ function killSpawnedChild(child, pid) {
32883
32884
  }
32884
32885
  function resolveToolsServerNode() {
32885
32886
  const { bun, deno, electron } = process.versions;
32886
- return !(bun || deno || electron) && fs5.existsSync(process.execPath) ? process.execPath : "node";
32887
+ return !(bun || deno || electron) && fs6.existsSync(process.execPath) ? process.execPath : "node";
32887
32888
  }
32888
32889
  function parseListeningPort(line) {
32889
32890
  const match = line.match(/Tools server listening on http:\/\/.+:(\d+)/);
@@ -32893,10 +32894,10 @@ function spawnToolsServer(paths, port, options = {}) {
32893
32894
  return new Promise((resolve13, reject) => {
32894
32895
  let logFd;
32895
32896
  try {
32896
- fs5.mkdirSync(STATE_DIR, { recursive: true });
32897
- logFd = fs5.openSync(LOG_FILE, "a");
32897
+ fs6.mkdirSync(STATE_DIR, { recursive: true });
32898
+ logFd = fs6.openSync(LOG_FILE, "a");
32898
32899
  } catch {
32899
- logFd = fs5.openSync("/dev/null", "w");
32900
+ logFd = fs6.openSync("/dev/null", "w");
32900
32901
  }
32901
32902
  const nodeBin = resolveToolsServerNode();
32902
32903
  const child = spawn(nodeBin, [paths.bundlePath, "start"], {
@@ -32904,7 +32905,7 @@ function spawnToolsServer(paths, port, options = {}) {
32904
32905
  stdio: ["ignore", "pipe", logFd],
32905
32906
  env: buildToolsServerEnv(paths, port, process.env, options)
32906
32907
  });
32907
- fs5.closeSync(logFd);
32908
+ fs6.closeSync(logFd);
32908
32909
  const pid = child.pid;
32909
32910
  if (!pid) {
32910
32911
  child.once(
@@ -33030,7 +33031,7 @@ async function sweepDeadStateFiles() {
33030
33031
  });
33031
33032
  continue;
33032
33033
  }
33033
- if (fs5.existsSync(fresh.bundlePath)) continue;
33034
+ if (fs6.existsSync(fresh.bundlePath)) continue;
33034
33035
  if (!couldBeOurToolServer(fresh.pid, fresh.bundlePath)) continue;
33035
33036
  await unlink(file).catch(() => {
33036
33037
  });
@@ -33067,7 +33068,7 @@ async function terminatePid(pid, stillOurs) {
33067
33068
  }
33068
33069
  await waitForExit(pid, SIGKILL_GRACE_MS);
33069
33070
  }
33070
- var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs5.existsSync(p)) ?? "ps";
33071
+ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs6.existsSync(p)) ?? "ps";
33071
33072
  var PS_WIDTH_FLAGS = ["-ww"];
33072
33073
  var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
33073
33074
  function readProcessCommandLine(pid, flags = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
@@ -33114,13 +33115,13 @@ var LOCK_STALE_MS2 = 45e3;
33114
33115
  var LOCK_POLL_MS = 100;
33115
33116
  function spawnLockIsStale() {
33116
33117
  try {
33117
- const { pid, ts } = JSON.parse(fs5.readFileSync(LOCK_FILE, "utf8"));
33118
+ const { pid, ts } = JSON.parse(fs6.readFileSync(LOCK_FILE, "utf8"));
33118
33119
  if (typeof pid === "number" && pid > 0 && !isProcessAlive(pid)) return true;
33119
33120
  if (typeof ts === "number" && Date.now() - ts > LOCK_STALE_MS2) return true;
33120
33121
  return false;
33121
33122
  } catch {
33122
33123
  try {
33123
- return Date.now() - fs5.statSync(LOCK_FILE).mtimeMs > LOCK_STALE_MS2;
33124
+ return Date.now() - fs6.statSync(LOCK_FILE).mtimeMs > LOCK_STALE_MS2;
33124
33125
  } catch {
33125
33126
  return true;
33126
33127
  }
@@ -33128,7 +33129,7 @@ function spawnLockIsStale() {
33128
33129
  }
33129
33130
  async function acquireSpawnLock() {
33130
33131
  try {
33131
- fs5.mkdirSync(STATE_DIR, { recursive: true });
33132
+ fs6.mkdirSync(STATE_DIR, { recursive: true });
33132
33133
  } catch {
33133
33134
  return null;
33134
33135
  }
@@ -33136,11 +33137,11 @@ async function acquireSpawnLock() {
33136
33137
  const deadline = Date.now() + LOCK_WAIT_TIMEOUT_MS;
33137
33138
  for (; ; ) {
33138
33139
  try {
33139
- const fd = fs5.openSync(LOCK_FILE, "wx");
33140
+ const fd = fs6.openSync(LOCK_FILE, "wx");
33140
33141
  try {
33141
- fs5.writeSync(fd, JSON.stringify({ pid: process.pid, nonce, ts: Date.now() }));
33142
+ fs6.writeSync(fd, JSON.stringify({ pid: process.pid, nonce, ts: Date.now() }));
33142
33143
  } finally {
33143
- fs5.closeSync(fd);
33144
+ fs6.closeSync(fd);
33144
33145
  }
33145
33146
  let released = false;
33146
33147
  return {
@@ -33148,8 +33149,8 @@ async function acquireSpawnLock() {
33148
33149
  if (released) return;
33149
33150
  released = true;
33150
33151
  try {
33151
- const cur = JSON.parse(fs5.readFileSync(LOCK_FILE, "utf8"));
33152
- if (cur.pid === process.pid && cur.nonce === nonce) fs5.unlinkSync(LOCK_FILE);
33152
+ const cur = JSON.parse(fs6.readFileSync(LOCK_FILE, "utf8"));
33153
+ if (cur.pid === process.pid && cur.nonce === nonce) fs6.unlinkSync(LOCK_FILE);
33153
33154
  } catch {
33154
33155
  }
33155
33156
  }
@@ -33158,10 +33159,10 @@ async function acquireSpawnLock() {
33158
33159
  if (err.code !== "EEXIST") return null;
33159
33160
  if (spawnLockIsStale()) {
33160
33161
  try {
33161
- fs5.unlinkSync(LOCK_FILE);
33162
+ fs6.unlinkSync(LOCK_FILE);
33162
33163
  } catch {
33163
33164
  }
33164
- if (!fs5.existsSync(LOCK_FILE)) continue;
33165
+ if (!fs6.existsSync(LOCK_FILE)) continue;
33165
33166
  }
33166
33167
  if (Date.now() >= deadline) return null;
33167
33168
  await new Promise((r) => setTimeout(r, LOCK_POLL_MS));
@@ -33201,7 +33202,7 @@ async function ensureToolsServer(paths) {
33201
33202
  }
33202
33203
  await clearToolsServerState(paths.bundlePath);
33203
33204
  await sweepDeadStateFiles();
33204
- if (!fs5.existsSync(paths.bundlePath)) {
33205
+ if (!fs6.existsSync(paths.bundlePath)) {
33205
33206
  throw new Error(
33206
33207
  `The argent install serving this session is gone from disk (${paths.bundlePath}) \u2014 it was likely updated or removed. Restart the editor's MCP connection to reconnect.`
33207
33208
  );
@@ -33304,11 +33305,11 @@ var LAUNCH_PLATFORMS = ["ios", "android", "chromium", "vega", "macos"];
33304
33305
  var SELECTABLE_PLATFORMS = [...LAUNCH_PLATFORMS, "ios-remote"];
33305
33306
 
33306
33307
  // ../registry/src/flow-file-refs.ts
33307
- import * as fs7 from "node:fs/promises";
33308
+ import * as fs8 from "node:fs/promises";
33308
33309
  import * as path9 from "node:path";
33309
33310
 
33310
33311
  // ../registry/src/e2e-dirs.ts
33311
- import * as fs6 from "node:fs/promises";
33312
+ import * as fs7 from "node:fs/promises";
33312
33313
  import * as path8 from "node:path";
33313
33314
  var E2E_DIR = path8.join(".argent", "e2e");
33314
33315
  var LEGACY_E2E_DIRS = Object.freeze([path8.join(".argent", "flows")]);
@@ -33323,7 +33324,7 @@ function e2eFileCandidates(projectRoot, name) {
33323
33324
  return e2eDirsFor(projectRoot).map((dir) => path8.join(dir, `${name}.yaml`));
33324
33325
  }
33325
33326
  async function exists(file) {
33326
- return fs6.stat(file).then(
33327
+ return fs7.stat(file).then(
33327
33328
  () => true,
33328
33329
  () => false
33329
33330
  );
@@ -33414,10 +33415,10 @@ function canonicalToolArgs(tool, args) {
33414
33415
  // ../registry/src/flow-file-refs.ts
33415
33416
  async function canonicalFlowPath(p) {
33416
33417
  try {
33417
- return await fs7.realpath(p);
33418
+ return await fs8.realpath(p);
33418
33419
  } catch {
33419
33420
  try {
33420
- return path9.join(await fs7.realpath(path9.dirname(p)), path9.basename(p));
33421
+ return path9.join(await fs8.realpath(path9.dirname(p)), path9.basename(p));
33421
33422
  } catch {
33422
33423
  return p;
33423
33424
  }
@@ -33477,7 +33478,7 @@ function flowMemberKey(anchorDir, target) {
33477
33478
  return `${anchorDir}\0${target}`;
33478
33479
  }
33479
33480
  async function classifyOnDiskSpelling(dir, base, addressable = FLOW_FILE_NAME_PATTERN) {
33480
- const entries = await fs7.readdir(dir).catch(() => null);
33481
+ const entries = await fs8.readdir(dir).catch(() => null);
33481
33482
  if (entries === null || entries.includes(base)) return { state: "listed" };
33482
33483
  const actual = entries.find((entry) => entry.toLowerCase() === base.toLowerCase());
33483
33484
  if (actual === void 0) return { state: "absent" };
@@ -35997,7 +35998,7 @@ function getDeviceIdFromArgs(args) {
35997
35998
  }
35998
35999
 
35999
36000
  // ../telemetry/src/debug.ts
36000
- import * as fs8 from "node:fs";
36001
+ import * as fs9 from "node:fs";
36001
36002
 
36002
36003
  // ../telemetry/src/paths.ts
36003
36004
  import * as path14 from "node:path";
@@ -36325,14 +36326,14 @@ var ALLOWED = {
36325
36326
  import { randomUUID as randomUUID5 } from "node:crypto";
36326
36327
 
36327
36328
  // ../telemetry/src/cloud-agent-detect.ts
36328
- import { existsSync as existsSync3 } from "node:fs";
36329
+ import { existsSync as existsSync4 } from "node:fs";
36329
36330
 
36330
36331
  // ../telemetry/src/base-props.ts
36331
36332
  var SESSION_ID2 = randomUUID5();
36332
36333
 
36333
36334
  // ../telemetry/src/identity.ts
36334
36335
  import * as crypto2 from "node:crypto";
36335
- import * as fs9 from "node:fs";
36336
+ import * as fs10 from "node:fs";
36336
36337
  import * as path15 from "node:path";
36337
36338
 
36338
36339
  // ../telemetry/src/fingerprint.ts
@@ -36340,14 +36341,14 @@ import { execFileSync as execFileSync2, spawn as spawn3 } from "node:child_proce
36340
36341
 
36341
36342
  // ../native-devtools-ios/src/index.ts
36342
36343
  import * as path16 from "node:path";
36343
- import * as fs10 from "node:fs";
36344
+ import * as fs11 from "node:fs";
36344
36345
  var DYLIB_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_DIR ?? path16.join(__dirname, "..", "dylibs");
36345
36346
  var BIN_DIR = process.env.ARGENT_SIMULATOR_SERVER_DIR ?? path16.join(__dirname, "..", "bin");
36346
36347
  var DYLIB_TCP_DIR = process.env.ARGENT_NATIVE_DEVTOOLS_TCP_DIR ?? path16.join(DYLIB_DIR, "tcp");
36347
36348
  var DYLIB_TVOS_DIR = path16.join(DYLIB_DIR, "tvos");
36348
36349
 
36349
36350
  // ../telemetry/src/consent.ts
36350
- import * as fs11 from "node:fs";
36351
+ import * as fs12 from "node:fs";
36351
36352
  import * as path17 from "node:path";
36352
36353
  var cache = /* @__PURE__ */ new Map();
36353
36354
  var sessionOverride = null;
@@ -36355,7 +36356,7 @@ function readConfigOverrideAt(filePath) {
36355
36356
  const miss = { mtimeMs: null, fingerprint: null, enabledOverride: null };
36356
36357
  let stats;
36357
36358
  try {
36358
- stats = fs11.lstatSync(filePath);
36359
+ stats = fs12.lstatSync(filePath);
36359
36360
  } catch {
36360
36361
  cache.set(filePath, miss);
36361
36362
  return null;
@@ -36372,7 +36373,7 @@ function readConfigOverrideAt(filePath) {
36372
36373
  }
36373
36374
  let parsedEnabled = null;
36374
36375
  try {
36375
- const raw2 = fs11.readFileSync(filePath, "utf8");
36376
+ const raw2 = fs12.readFileSync(filePath, "utf8");
36376
36377
  const json = JSON.parse(raw2);
36377
36378
  if (json && typeof json === "object") {
36378
36379
  const t = json.telemetry;
@@ -37864,12 +37865,12 @@ function debuggerLogRegistryText(result) {
37864
37865
  var SERVER_INSTRUCTIONS = "Argent controls iOS, Android, Chromium, Mac, TV, and HarmonyOS apps. Use the platform named by the user; otherwise prefer an already-running device from `list-devices` (do not default to iOS). In a single-platform project, boot that platform. Prefer Argent tools over raw `xcrun`/`adb`; use `launch-app`/`open-url` instead of tapping home-screen icons. Load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first action if an e2e test may be needed (recording is not retroactive), and load the matching `argent-*` skill before React Native build/debug, profiling, physical phone, Mac app, or TV work. Interaction tools return a screenshot + accessibility tree with normalized [0,1] tap frames (or an unchanged note / `-`+`+` diff referencing an earlier screenshot/tree id). Take tap coordinates from that tree \u2014 never guess from pixels \u2014 and call `describe` only without a fresh tree. After two failed taps, re-discover. Use `await-ui-element` instead of polling. Do not stop simulator servers when finishing; call `stop-all-simulator-servers` only when asked to clean up or when a skill tells you to recycle a device's services, scoped with `devices: [...]` (the tool-server is shared across agents), and never stop a user-started Metro. CLI: `argent --help`.";
37865
37866
 
37866
37867
  // ../argent-mcp/src/installed-version.ts
37867
- import * as fs12 from "node:fs";
37868
+ import * as fs13 from "node:fs";
37868
37869
  import * as path18 from "node:path";
37869
37870
  function getInstalledVersion() {
37870
37871
  try {
37871
37872
  const pkgPath = path18.resolve(import.meta.dirname, "..", "package.json");
37872
- const pkg = JSON.parse(fs12.readFileSync(pkgPath, "utf8"));
37873
+ const pkg = JSON.parse(fs13.readFileSync(pkgPath, "utf8"));
37873
37874
  return pkg.version ?? "unknown";
37874
37875
  } catch {
37875
37876
  return "unknown";
@@ -38154,7 +38155,7 @@ async function startMcpServer(options) {
38154
38155
  const autoDescribeOn = autoDescribeEnabled();
38155
38156
  const whatsNewOn = whatsNewEnabled();
38156
38157
  const installedVersion = getInstalledVersion();
38157
- const highlightsVersion = true ? "0.35.1-next.32" : installedVersion;
38158
+ const highlightsVersion = true ? "0.35.1-next.33" : installedVersion;
38158
38159
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38159
38160
  const trees = createTreeMemory();
38160
38161
  const screenshots = createScreenshotMemory();