@swmansion/argent 0.9.0 → 0.11.0
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 +53 -10
- package/assets/argent.tracecfg.pbtxt +133 -0
- package/assets/queries/README.md +93 -0
- package/assets/queries/cpu-hotspots.sql +106 -0
- package/assets/queries/function-callers.sql +62 -0
- package/assets/queries/hang-folds-batched.sql +88 -0
- package/assets/queries/hang-main-thread-samples.sql +32 -0
- package/assets/queries/hang-state-breakdown.sql +44 -0
- package/assets/queries/memory-rss.sql +25 -0
- package/assets/queries/thread-breakdown.sql +34 -0
- package/assets/queries/trace-bounds.sql +6 -0
- package/assets/queries/ui-hangs.sql +59 -0
- package/assets/trace-processor/LICENSE +235 -0
- package/assets/trace-processor/SHA256SUMS +4 -0
- package/assets/trace-processor/engine.mjs +42423 -0
- package/assets/trace-processor/engine_bundle.node.js +11130 -0
- package/assets/trace-processor/trace_processor.wasm +0 -0
- package/{dist → bin}/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/argent-simulator-server.cjs +56 -0
- package/bin/{ax-service → darwin/ax-service} +0 -0
- package/bin/{simulator-server → darwin/simulator-server} +0 -0
- package/bin/linux/simulator-server +0 -0
- package/dist/cli-cmds.mjs +2540 -85
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +23 -2
- package/dist/cli.js.map +1 -1
- package/dist/installer.mjs +241 -107
- package/dist/mcp-server.mjs +440 -110
- package/dist/tool-server.cjs +4297 -1895
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +3 -3
- package/skills/argent-android-emulator-setup/SKILL.md +1 -1
- package/skills/argent-native-profiler/SKILL.md +5 -5
- /package/{dist → assets}/Argent.tracetemplate +0 -0
- /package/{manifest.json → assets/manifest.json} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "MCP server for iOS Simulator and Android Emulator control",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"bin": {
|
|
12
12
|
"argent": "dist/cli.js",
|
|
13
|
-
"argent-simulator-server": "bin/simulator-server"
|
|
13
|
+
"argent-simulator-server": "bin/argent-simulator-server.cjs"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "npm run build:dispatcher && npm run build:bundles && npm run sync-readme",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"skills/",
|
|
38
38
|
"agents/",
|
|
39
39
|
"rules/",
|
|
40
|
-
"
|
|
40
|
+
"assets/",
|
|
41
41
|
"scripts/postinstall.cjs"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
@@ -26,4 +26,4 @@ Pass the Android serial as `udid` to the unified interaction tools — `gesture-
|
|
|
26
26
|
- Serials are the adb device id. iOS UDIDs and Android serials are not interchangeable, but you do NOT need to tell the tools which platform — dispatch is automatic.
|
|
27
27
|
- `describe` on Android returns a shallower tree than iOS (no accessibility-service equivalent), but covers most tap-target discovery.
|
|
28
28
|
- `reinstall-app` on Android always installs with `-g` so first-launch runtime permissions are pre-granted.
|
|
29
|
-
- To
|
|
29
|
+
- To stop the emulator, run `adb -s <serial> emu kill` from a shell (clean shutdown). Never `pkill -9`/`kill -9` qemu — a hard kill leaves the userdata image dirty, after which cold boots can hang for many minutes doing recovery (runaway writes, `boot_completed` never flips). If an image gets into that state, boot once with `-wipe-data` to reset it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-native-profiler
|
|
3
|
-
description: Native profiling for CPU hotspots, UI hangs,
|
|
3
|
+
description: Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Tools
|
|
@@ -15,8 +15,8 @@ description: Native profiling for CPU hotspots, UI hangs, and memory leaks. Curr
|
|
|
15
15
|
|
|
16
16
|
## 2. Platform Support
|
|
17
17
|
|
|
18
|
-
- **iOS**:
|
|
19
|
-
- **Android**:
|
|
18
|
+
- **iOS**: Backend: Xcode Instruments via `xctrace` on a booted simulator or connected device. Requires Xcode command-line tools on PATH. Surfaces CPU hotspots, UI hangs, and memory leaks (instruments `Leaks` table).
|
|
19
|
+
- **Android**: Backend: Perfetto via `adb shell perfetto` + an in-process WASM trace-processor engine. Surfaces CPU hotspots and UI hangs, with per-hang jank reason codes, a main-thread state breakdown with `blocked_function` attribution, and a GC overlap annotation. Also reports an RSS-growth signal for memory pressure; treat it as a hint to confirm manually, not a confirmed leak. The target app must be debuggable or include `<profileable android:shell="true"/>` in its manifest for `perf_sample` callstacks to be captured.
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -53,12 +53,12 @@ You do not need to derive `app_process` manually — just make sure the app is l
|
|
|
53
53
|
|
|
54
54
|
### Step 1: Start recording
|
|
55
55
|
|
|
56
|
-
Call `native-profiler-start` with `device_id` (iOS UDID
|
|
56
|
+
Call `native-profiler-start` with `device_id` (iOS UDID or Android serial). The tool auto-detects the running app and saves the trace to `/tmp/argent-profiler-cwd/` with a timestamped filename.
|
|
57
57
|
Let the user interact with the app or drive interaction via simulator tools (see `argent-device-interact` skill).
|
|
58
58
|
|
|
59
59
|
### Step 2: Stop and export
|
|
60
60
|
|
|
61
|
-
Call `native-profiler-stop` with `device_id`.
|
|
61
|
+
Call `native-profiler-stop` with `device_id`. iOS sends SIGINT to xctrace, waits for trace packaging, and exports CPU, hangs, and leaks data to XML — check `exportDiagnostics` for any export warnings. Android sends SIGTERM to the on-device perfetto daemon, polls `/proc/<pid>` until it exits, then `adb pull`s the `.pftrace` to the host.
|
|
62
62
|
|
|
63
63
|
### Step 3: Analyze
|
|
64
64
|
|
|
File without changes
|
|
File without changes
|