@swmansion/argent 0.34.1-next.7 → 0.34.1-next.9

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/cli-cmds.mjs CHANGED
@@ -36085,7 +36085,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
36085
36085
  var SESSION_ID2 = randomUUID5();
36086
36086
  function readCliVersion() {
36087
36087
  if (true) {
36088
- return "0.34.1-next.7";
36088
+ return "0.34.1-next.9";
36089
36089
  }
36090
36090
  return "0.0.0";
36091
36091
  }
@@ -16993,7 +16993,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16993
16993
  var SESSION_ID = randomUUID4();
16994
16994
  function readCliVersion() {
16995
16995
  if (true) {
16996
- return "0.34.1-next.7";
16996
+ return "0.34.1-next.9";
16997
16997
  }
16998
16998
  return "0.0.0";
16999
16999
  }
@@ -20395,6 +20395,64 @@ var RETIRED_BUNDLED_PATHS = {
20395
20395
  ],
20396
20396
  rules: []
20397
20397
  };
20398
+ var RETIRED_GLOBAL_RULES = [
20399
+ {
20400
+ path: "argent.md",
20401
+ shipped: [
20402
+ "bfb07b5ad949f63ab9b41919f2c24c937b163c7644d6760fa8afda4f68c809f7",
20403
+ "90f6b24882ae077c8d5129652e7630c1b2a5651f5e800474d3b6e223222049f1",
20404
+ "cbf6cb5d898c14cd3460c85a15fd9ceeb7b3fed669df7e0932e61cad93a5a6fe",
20405
+ "ac8d19e2ece55ff6b7c554fd6a4a3eebc5a09af1eb95f6625f96781bb45505e2",
20406
+ "30bbef749f18d4fde7a5501941d58decf1e8abb2ca8c4e51f63e72bab3d863e2",
20407
+ "81663dc2f70aa2111388092e6027d27eddd89e9b5bdfb16043bdc96088d6850d",
20408
+ "5e3143dea13d15a9c80c7e24a1a3e4e1fb3ed34c8a077eccb74cb6e2a8a1c4a3",
20409
+ "51f8360f997c6bfcfb51c4c99d5f8b3a3b632ca4ca43a7f4ba5e7d8e8881798d",
20410
+ "5e27f0ed6dbdb4def30163387485b3c783c702bbc6594bc210d236454b6c5780",
20411
+ "06391305389e958b127a832de9977dc75a2164355a924bddb312b824656a8f72",
20412
+ "09ac21fd92efa4fc877e951475a0488a78ba4dbdfba63d6f1efd761c9f625866",
20413
+ "45fc6a4bf294af60e73ec9ab3c02219627767b5622467f7a57bb5b6976fd4126",
20414
+ "2f4eb998af8b5106b5fb49f19efd282d38366316c4a78f7123bc3d005c5848a4",
20415
+ "e425ebaafba2eeeb02f714d3e0b1ce19e0844fc4d661dbbd25bf6086ffc714b0",
20416
+ "d6cc846c1d3444bf8eaee6aa313a207e8c7a94391041df9d2a2908088c0191a7",
20417
+ "ad0f23a946e9bbc721a16b17a9516bf2570e7529094da0677f33ed63d43e0caa",
20418
+ "b1ce95af4c0e57cb478a148b6b8744ad4f8f15522441e566c0c6f7210c78fc79",
20419
+ "e3dc376ba736cef94de401bd5457c3df0192128164cbb44ac3e2ece57ad1af66",
20420
+ "aa43aeb338a5d0f50c425d8163dc697b9ffd7042539be05a67ed3ed85e8ba60f",
20421
+ "983f29ab70a565367bda4fbed705eb41fbe7b6767c70eb0569d2501f298e72c4",
20422
+ "251487afb2fda1707a27701be7fcc33b481e0176d43a4c946287a35595d26585",
20423
+ "933e657ec8789e57db8164fc2f58a692e9dc889bebd131eaa0f2017ef055add8",
20424
+ "35ea33df169b390d331733ab325dbf23b3804bc25927908e6050977563d7b10c",
20425
+ "7a89d0406784242b03ca187a2740898d4f69ccb7b76508ec373ad2aba5fb0a2c",
20426
+ "fa69c9e943572ab603b1318bc9a5c07f9d0e7c8f2cc208f6e29a6795991dab73",
20427
+ "192013fdee1954ba013985c022d91f37bbc34bf36ae4bcd76ab2cdf2f2b3f341",
20428
+ "4476fd58e33ede9cc938da7e954781fa8d5805f18cd71701cdaa4ec3bcabb085",
20429
+ "db80ca8efbe5dd775153ab39c63d4c387d1b5d864a1e7eae21fbd158f05d9e54",
20430
+ "32f3d3915f04fb43c4e835e076ec26ed7d88232f66963538308233c19055c951",
20431
+ "7aee698f1b8e5ed0399f45a72435961847b96097322e5f3391fd31adf03b8180",
20432
+ "1829b14538d913852bacb82a50d79cade45ea56c78fb2bc85e6e46f0f9ac6439",
20433
+ "c012bec1b6a225a0f03b7fc9133746d2130ce8f45cd1c2c86559bc31cafd81f7",
20434
+ "11f62b29badb21f0489e835975e5fa62b996188ed7194d01590b5eb6f020615b",
20435
+ "b83879ae5540a9e46140c5a1d0f93599e9aa48fbe752aba12db7a93cd8940834",
20436
+ "ec38c5e586782f376daec565302b3548fd22ea3236c384f9bb37b1d16bde3f39",
20437
+ "c40437e8afb99cc4cd6005ae3710d861b6f0af0da0f1de35499f4cb9ac790999",
20438
+ "4d62da692bc8735f3979f54e6c7e2c3b2e9d530e5898958aa41a869b5e9e6f11",
20439
+ "bec052b7cf7668da7f1cdddb5bae4c50b6db87ece0ec6930f1229e6e0bb8f96e",
20440
+ "0fffc00cc3d6fe32c93d857c8b4f8ad9754f7daf76c51cda6acc86aa5487e1e6",
20441
+ "1cb7d1f65d5014954a6d25bde4c9a271910ffed240899178b8dbf9e138ce83f3",
20442
+ "e3bc44c749ba6cecd50d1e4dc45c1dd3d896414982b339f07d62351c396e975d",
20443
+ "db0435ad74da7ba0e3ec362aab60c011ac24caa8aa9630dc77393058710c0deb",
20444
+ "aec395f5fdccc42c13ff39263ab101c5bebe68ed4181ee126a819c3a0a45aa94",
20445
+ "4867ae2b7f8bb207bad663759487b729be8bf58f9523d4589b885e5857966cc1",
20446
+ "5f9efed48536447a7ffc8d68b8a43eb20bceeb2adab884352f20cbbe5be37ac5",
20447
+ "51d5d412d5ff4edbc2dc837c33978d85678b5ff6461c987944469f535dbcc295",
20448
+ "d28de55c47c64bd9f7a7493825e1913f9fbf317976d6981f71ae24fb21631dea",
20449
+ "cb9a8c33b1dc6c1188674a1a846e97d1b3a58b2c386021b63139cfd33c1abe6c",
20450
+ "33bae8d5c6e38a730e15ceab19335145ed06988d475696690302daa1bf1221f3",
20451
+ "5f9b146efdac28c3d67a8b1fcdca3ab5950b69e7c74defa7dca5cbf4e44cc98a",
20452
+ "af428399983712d11e4cfc9999bd600ba5121f17acb1ce97f70e695ef68772b2"
20453
+ ]
20454
+ }
20455
+ ];
20398
20456
  function hashBundledContent(content) {
20399
20457
  return createHash2("sha256").update(content.replace(/\r\n/g, "\n")).digest("hex");
20400
20458
  }
@@ -20612,7 +20670,8 @@ function readRetiredFile(targetDir, relativePath) {
20612
20670
  function findRetiredFiles(retired, bundleDir, targetDir) {
20613
20671
  const found = [];
20614
20672
  for (const { path: relativePath, shipped } of retired) {
20615
- if (fs16.existsSync(path17.join(bundleDir, ...relativePath.split("/")))) continue;
20673
+ if (bundleDir !== null && fs16.existsSync(path17.join(bundleDir, ...relativePath.split("/"))))
20674
+ continue;
20616
20675
  const content = readRetiredFile(targetDir, relativePath);
20617
20676
  if (content === null) continue;
20618
20677
  const sha256 = hashBundledContent(content);
@@ -22055,18 +22114,29 @@ function removeCodexRules(configPath) {
22055
22114
  function findRetiredRulesAndAgents(scans, root, rulesDir, agentsDir) {
22056
22115
  const targets = scans.flatMap(({ adapters, scope }) => {
22057
22116
  const { ruleTargets, agentTargets } = getManagedContentTargets(adapters, root, scope);
22117
+ const globalRules = scope === "global";
22058
22118
  return [
22059
- ...ruleTargets.map((target) => ({ kind: "rules", target, bundleDir: rulesDir })),
22060
- ...agentTargets.map((target) => ({ kind: "agents", target, bundleDir: agentsDir }))
22119
+ ...ruleTargets.map((target) => ({
22120
+ kind: "rules",
22121
+ target,
22122
+ bundleDir: globalRules ? null : rulesDir,
22123
+ retired: globalRules ? [...RETIRED_BUNDLED_PATHS.rules, ...RETIRED_GLOBAL_RULES] : RETIRED_BUNDLED_PATHS.rules
22124
+ })),
22125
+ ...agentTargets.map((target) => ({
22126
+ kind: "agents",
22127
+ target,
22128
+ bundleDir: agentsDir,
22129
+ retired: RETIRED_BUNDLED_PATHS.agents
22130
+ }))
22061
22131
  ];
22062
22132
  });
22063
22133
  const found = [];
22064
22134
  const seen = /* @__PURE__ */ new Set();
22065
- for (const { kind, target, bundleDir } of targets) {
22135
+ for (const { kind, target, bundleDir, retired } of targets) {
22066
22136
  const dir = resolveLinkedDestination(target.targetPath);
22067
22137
  if (seen.has(`${kind}:${realpathOrSelf(dir)}`)) continue;
22068
22138
  seen.add(`${kind}:${realpathOrSelf(dir)}`);
22069
- const files = findRetiredFiles(RETIRED_BUNDLED_PATHS[kind], bundleDir, target.targetPath);
22139
+ const files = findRetiredFiles(retired, bundleDir, target.targetPath);
22070
22140
  if (files.length === 0) continue;
22071
22141
  found.push({ kind, target, location: formatCopyDestination(target, dir, root), files });
22072
22142
  }
@@ -22075,7 +22145,8 @@ function findRetiredRulesAndAgents(scans, root, rulesDir, agentsDir) {
22075
22145
  function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
22076
22146
  const results = [];
22077
22147
  const managedTargets = getManagedContentTargets(adapters, root, scope);
22078
- for (const target of managedTargets.ruleTargets) {
22148
+ const globalScope = scope === "global";
22149
+ for (const target of globalScope ? [] : managedTargets.ruleTargets) {
22079
22150
  try {
22080
22151
  const written = copyDir(rulesDir, target.targetPath);
22081
22152
  if (written) {
@@ -22096,6 +22167,16 @@ function copyRulesAndAgents(adapters, root, scope, rulesDir, agentsDir) {
22096
22167
  }
22097
22168
  }
22098
22169
  for (const target of managedTargets.codexConfigTargets) {
22170
+ if (globalScope) {
22171
+ try {
22172
+ if (removeCodexRules(target.targetPath)) {
22173
+ results.push(` Removed argent rules from ${target.targetPath} (developer_instructions)`);
22174
+ }
22175
+ } catch (err) {
22176
+ results.push(` Could not remove argent rules from ${target.targetPath}: ${err}`);
22177
+ }
22178
+ continue;
22179
+ }
22099
22180
  try {
22100
22181
  const injected = injectCodexRules(target.targetPath, rulesDir);
22101
22182
  if (injected) {
@@ -23807,7 +23888,8 @@ async function init2(args) {
23807
23888
  scope,
23808
23889
  allowlistEnabled: allowlist.enabled,
23809
23890
  skills,
23810
- copiedRules: copyResults.length > 0,
23891
+ // A global install writes no rule, only removes old ones.
23892
+ copiedRules: normalizedScope === "local" && copyResults.length > 0,
23811
23893
  wroteProjectTelemetryOptOut
23812
23894
  });
23813
23895
  const skillsMissing = skillsAreMissing(skills);
@@ -29504,7 +29504,7 @@ ${stopped.join("\n")}`;
29504
29504
  }
29505
29505
 
29506
29506
  // ../argent-mcp/src/instructions.ts
29507
- var SERVER_INSTRUCTIONS = "Argent \u2014 iOS Simulator, Android Emulator, and Chromium app control for interacting, testing, profiling and debugging mobile and Chromium applications. Interaction tools return the screen after the action: a screenshot plus the accessibility element tree with normalized tap frames. Take coordinates from that tree; call describe only when no fresh tree is available \u2014 never guess coordinates from pixels. A result names an identical earlier tree by its tree id in place of repeating it. Do not stop simulator servers when a task finishes: the next task reuses them. Call stop-all-simulator-servers when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, always with devices: [...] naming the devices this session used. Never stop a Metro the user started unless they ask. One tool-server is shared by every agent using this argent install, so an unscoped call tears down their devices too \u2014 reserve it for a deliberate machine-wide cleanup.";
29507
+ var SERVER_INSTRUCTIONS = "Argent \u2014 iOS Simulator, Android Emulator, and Chromium app control for interacting, testing, profiling and debugging mobile and Chromium applications. Use the platform the user named; otherwise prefer a device list-devices shows already running, and do not default to iOS. In a single-platform project, boot that platform. Prefer these tools over raw xcrun or adb commands, which are a fallback. Prefer launch-app or open-url over tapping home-screen icons. If the task may need a saved e2e test, load the argent-create-e2e skill (argent-qa-e2e for acceptance tests) before the first launch or in-app action: recording is not retroactive. Load the matching argent-* skill before React Native build or debug work, profiling, a physical phone, a Mac app or a TV. Interaction tools return the screen after the action: a screenshot plus the accessibility element tree with normalized tap frames. Take coordinates from that tree; call describe only when no fresh tree is available \u2014 never guess coordinates from pixels. A result names an identical earlier tree by its tree id in place of repeating it. If a tap fails twice, stop retrying and call a discovery tool again. Use await-ui-element to wait for the UI instead of polling with screenshots. Do not stop simulator servers when a task finishes: the next task reuses them. Call stop-all-simulator-servers when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, always with devices: [...] naming the devices this session used. Never stop a Metro the user started unless they ask. One tool-server is shared by every agent using this argent install, so an unscoped call tears down their devices too \u2014 reserve it for a deliberate machine-wide cleanup. The argent CLI manages the toolkit: argent --help lists its commands.";
29508
29508
 
29509
29509
  // ../argent-mcp/src/installed-version.ts
29510
29510
  import * as fs11 from "node:fs";
@@ -101285,7 +101285,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
101285
101285
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
101286
101286
  function readCliVersion() {
101287
101287
  if (true) {
101288
- return "0.34.1-next.7";
101288
+ return "0.34.1-next.9";
101289
101289
  }
101290
101290
  return "0.0.0";
101291
101291
  }
@@ -177468,7 +177468,7 @@ function serializeFlow(flow) {
177468
177468
  steps: flow.steps.map(toYamlStep)
177469
177469
  };
177470
177470
  if (flow.executionPrerequisite) doc.executionPrerequisite = flow.executionPrerequisite;
177471
- return (0, import_yaml.stringify)(doc, { blockQuote: false });
177471
+ return (0, import_yaml.stringify)(doc, { blockQuote: false, doubleQuotedMinMultiLineLength: Infinity });
177472
177472
  }
177473
177473
  function validateFlow(flow) {
177474
177474
  assertNoOutputReferences(flow.steps);
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.34.1-next.7",
3
+ "version": "0.34.1-next.9",
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",
package/rules/argent.md CHANGED
@@ -1,34 +1,17 @@
1
1
  ---
2
- description: Always-on Argent rules for driving, testing and profiling apps on simulators, emulators, phones, TVs and Chromium
2
+ description: What to do when this project uses Argent but Argent is not available in this environment
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- Argent - general rules:
6
+ This project uses Argent, through its `argent` MCP server, to drive, test and profile apps on simulators, emulators, phones, TVs and Chromium. The server's own instructions carry the usage guidance.
7
7
 
8
- - do not derive tap coordinates from screenshot pixels; use inspection tools that give coordinates
9
- - use the platform the user named; otherwise prefer a device `list-devices` shows already running, and don't default to iOS; in a single-platform project boot that platform.
10
- - if tap fails twice, stop retrying and re-run a discovery tool
11
- - Prefer mcp-tool calls over raw commands like `xcrun` or `adb`; use them as fallback.
12
- - Interaction tools return screenshot and element tree automatically; an identical earlier tree is named by its tree id, not repeated.
13
- - prefer `launch-app` or `open-url` than tapping icons on home screen.
14
- - If a task can require a saved e2e test, load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first launch or in-app action; recording is not retroactive.
15
- - Load the matching `argent-*` skill before React Native build/debug, profiling, a physical phone, a Mac app or a TV.
16
- - Do not stop simulator servers when a task finishes: the next task reuses them. Call `stop-all-simulator-servers` when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, with devices this session used. One tool-server is shared by every other agent, so unscoped call tears down their devices too. Never stop a Metro the user started unless they ask.
17
- - Use the `await-ui-element` tool to block until the UI settles instead of polling using screenshot.
18
- - The `argent` CLI manages the toolkit: `argent --help` lists commands, `argent --version` shows the installed version.
8
+ Check once per session whether argent is available; do not re-probe before later calls:
19
9
 
20
- <availability_check>
21
- Run this check once per session. Do not re-probe before later calls.
22
- Confirm argent is available:
23
-
24
- 1. Are `mcp__argent__*` tools in your tool list? If none, argent is not available.
10
+ 1. Are argent tools (such as `mcp__argent__*`) in your tool list? If none, argent is not available.
25
11
  2. If unsure, run `command -v argent`. Non-zero exit = the CLI is not on PATH.
26
12
 
27
- If argent IS available, ignore the rest of this block and follow this rule normally.
13
+ If argent is available, ignore this rule.
28
14
 
29
- If argent is ABSENT, treat it as an expected state, not an error to retry. Do not call `mcp__argent__*` tools, do not run `argent` commands, do not attempt any argent workflow.
30
- Tell the user once, and ask if you should continue without argent:
15
+ If argent is absent, treat it as an expected state, not an error to retry. Do not call argent tools, run `argent` commands or attempt any argent workflow. Tell the user once, and ask if you should continue without argent:
31
16
 
32
17
  > Argent isn't installed in this environment. To enable the mobile/Chromium tooling this repo is configured for, run `npx @swmansion/argent@latest init -y` (or `npm i -g @swmansion/argent@latest && argent init -y`).
33
-
34
- </availability_check>