@swmansion/argent 0.12.0 → 0.12.1
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/README.md +13 -8
- package/bin/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/dist/cli-cmds.mjs +7226 -756
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/installer.mjs +9731 -2819
- package/dist/mcp-server.mjs +2749 -116
- package/dist/tool-server.cjs +93541 -55247
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +11 -7
- package/rules/argent.md +16 -1
- package/skills/argent-native-profiler/SKILL.md +3 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "MCP server for iOS Simulator and Android Emulator control",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
"scripts/postinstall.cjs"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@modelcontextprotocol/sdk": "^1.20.0"
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.20.0",
|
|
45
|
+
"tree-sitter": "^0.21.1",
|
|
46
|
+
"tree-sitter-typescript": "^0.23.2"
|
|
45
47
|
},
|
|
46
48
|
"optionalDependencies": {
|
|
47
49
|
"electron": "^42.4.1"
|
|
@@ -50,16 +52,18 @@
|
|
|
50
52
|
"@argent/cli": "file:../argent-cli",
|
|
51
53
|
"@argent/installer": "file:../argent-installer",
|
|
52
54
|
"@argent/mcp": "file:../argent-mcp",
|
|
55
|
+
"@argent/telemetry": "file:../telemetry",
|
|
53
56
|
"@argent/tools-client": "file:../argent-tools-client",
|
|
54
|
-
"@clack/prompts": "^1.1
|
|
55
|
-
"@types/node": "^25.9.
|
|
57
|
+
"@clack/prompts": "^1.5.1",
|
|
58
|
+
"@types/node": "^25.9.3",
|
|
56
59
|
"@types/semver": "^7.7.1",
|
|
57
|
-
"esbuild": "^0.28.
|
|
60
|
+
"esbuild": "^0.28.1",
|
|
58
61
|
"picocolors": "^1.1.1",
|
|
59
|
-
"
|
|
62
|
+
"posthog-node": "5.35.0",
|
|
63
|
+
"semver": "^7.8.4",
|
|
60
64
|
"smol-toml": "^1.6.1",
|
|
61
65
|
"typescript": "^6.0.3",
|
|
62
|
-
"vitest": "^4.1.
|
|
66
|
+
"vitest": "^4.1.9",
|
|
63
67
|
"yaml": "^2.8.3"
|
|
64
68
|
}
|
|
65
69
|
}
|
package/rules/argent.md
CHANGED
|
@@ -4,7 +4,7 @@ alwaysApply: true
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<description>
|
|
7
|
-
|
|
7
|
+
If argent is installed and configured in this environment, its MCP tools are the preferred form of interaction with the application for iOS simulator, Android emulator, and Chromium (CDP) app control; otherwise see `<availability_check>` below before attempting any argent workflow. A "Chromium (CDP) app" is any Chromium runtime exposing a Chrome DevTools Protocol endpoint — an Electron app, or any Chromium-family browser (Chrome/Brave/Edge) launched with `--remote-debugging-port`; all are driven through the same tool surface and tagged `platform: "chromium"`.
|
|
8
8
|
Running MCP server and managing the Argent toolkit utilises `argent` command - if asked use `argent --help` for reference.
|
|
9
9
|
To check current version of MCP server run `argent --version` command.
|
|
10
10
|
|
|
@@ -20,6 +20,21 @@ Use cases:
|
|
|
20
20
|
- Running, debugging, or testing a Chromium (CDP) app — an Electron app (boot with `boot-device` + `electronAppPath`) or a Chromium browser exposing CDP (auto-discovered on port `9222` / `ARGENT_CHROMIUM_PORTS`); on Chromium scroll with `gesture-scroll` and drag with `gesture-drag` — `gesture-swipe` is touch-only
|
|
21
21
|
</description>
|
|
22
22
|
|
|
23
|
+
<availability_check>
|
|
24
|
+
<important>Run this check once per session, before the first argent tool call or `argent` command. Do not re-probe before later calls.</important>
|
|
25
|
+
|
|
26
|
+
Confirm argent is available:
|
|
27
|
+
|
|
28
|
+
1. Are `mcp__argent__*` tools in your tool list? If none are present, argent is not available.
|
|
29
|
+
2. If still unsure, run `command -v argent`. A non-zero exit means the CLI is not on PATH.
|
|
30
|
+
|
|
31
|
+
If argent IS available, ignore the rest of this block and follow this rule normally.
|
|
32
|
+
|
|
33
|
+
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, and do not attempt any argent workflow. Tell the user once, and ask if you should continue without argent:
|
|
34
|
+
|
|
35
|
+
> Argent isn't installed in this environment. To enable the mobile/Chromium tooling this repo is configured for, run `npx @swmansion/argent init -y` (or `npm i -g @swmansion/argent && argent init -y`).
|
|
36
|
+
> </availability_check>
|
|
37
|
+
|
|
23
38
|
<tapping_rule>
|
|
24
39
|
<important>**Never** derive tap coordinates from a screenshot</important>
|
|
25
40
|
Before **every** tap, you MUST call a discovery tool and extract coordinates from the result. This is not optional. Preferred tools are, in order:
|
|
@@ -86,14 +86,14 @@ To revisit a previous trace:
|
|
|
86
86
|
|
|
87
87
|
Bottlenecks are categorized by severity:
|
|
88
88
|
|
|
89
|
-
- **RED**: CPU functions taking >15% of total time, all UI hangs,
|
|
90
|
-
- **YELLOW**: CPU functions taking 5-15% of total time. Worth investigating but may be acceptable.
|
|
89
|
+
- **RED**: CPU functions taking >15% of total time, all UI hangs, and **attributed** memory leaks (those with a resolved responsible frame). These require immediate attention.
|
|
90
|
+
- **YELLOW**: CPU functions taking 5-15% of total time, and **unattributed** memory leaks (`<Call stack limit reached>`, no library — see the memory-leaks caveat below). Worth investigating but may be acceptable.
|
|
91
91
|
|
|
92
92
|
Each bottleneck type indicates a different class of problem:
|
|
93
93
|
|
|
94
94
|
- **CPU hotspots**: Native functions consuming excessive CPU time. Look for tight loops, expensive computations, or redundant work.
|
|
95
95
|
- **UI hangs**: Main thread blocked long enough to cause visible jank or unresponsiveness. Often caused by synchronous I/O, heavy layout passes, or lock contention.
|
|
96
|
-
- **Memory leaks**: Objects allocated but never freed. Common causes include retain cycles, unclosed resources, or forgotten observers.
|
|
96
|
+
- **Memory leaks**: Objects allocated but never freed. Common causes include retain cycles, unclosed resources, or forgotten observers. Argent records via `xctrace --attach`, which has no malloc-stack history, so on the simulator most leaks come back **unattributed** (`<Call stack limit reached>`, no library) and are dominated by benign system allocations — these are reported as a low-confidence YELLOW summary, not confirmed RED leaks. For attributed stacks, capture with malloc stack logging enabled at launch.
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|