@swmansion/argent 0.34.1-next.19 → 0.34.1-next.20
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 +30 -2
- package/dist/client.js +26 -0
- package/dist/installer.mjs +30 -2
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentLaunchPerformanceTests.swift +21 -0
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Commands.swift +9 -3
- package/dist/mcp-server.mjs +29 -1
- package/dist/tool-args.generated.d.ts +13 -1
- package/dist/tool-server.cjs +2602 -1198
- package/package.json +1 -1
- package/skills/argent-ios-device-interact/SKILL.md +2 -2
- package/skills/argent-native-profiler/SKILL.md +14 -2
- package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
- package/skills/argent-react-native-optimization/SKILL.md +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.20",
|
|
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",
|
|
@@ -15,5 +15,5 @@ Read this only for a physical iPhone. `argent-device-interact` still applies for
|
|
|
15
15
|
|
|
16
16
|
## Tools on hardware
|
|
17
17
|
|
|
18
|
-
- Only these exist: `list-devices`, `launch-app`, `restart-app`, `reinstall-app`, `open-url`, `describe`, `screenshot`, `screenshot-diff`, `gesture-tap`, `gesture-swipe`, `gesture-custom`, `gesture-pinch`, `gesture-rotate`, `button` (`home`, `volumeUp`, `volumeDown`, `actionButton` on models that have one), `keyboard`, `await-ui-element`, `await-screen-idle`, `run-sequence`, the e2e tools, `stop-simulator-server` and `stop-all-simulator-servers` (session end). Every other device tool fails with `not supported on ios device`.
|
|
19
|
-
- No `rotate` (the orientation tool), `shake`, `paste`, `settings-permissions`, screen recording, `debugger-*`, `react-profiler-*`, `native
|
|
18
|
+
- Only these exist: `list-devices`, `launch-app`, `restart-app`, `reinstall-app`, `open-url`, `describe`, `screenshot`, `screenshot-diff`, `gesture-tap`, `gesture-swipe`, `gesture-custom`, `gesture-pinch`, `gesture-rotate`, `button` (`home`, `volumeUp`, `volumeDown`, `actionButton` on models that have one), `keyboard`, `await-ui-element`, `await-screen-idle`, `run-sequence`, the e2e tools, `stop-simulator-server` and `stop-all-simulator-servers` (session end), and for launch time `native-profiler-launch-analysis` with `profiler-load` and `profiler-stack-query` on its session (`argent-native-profiler` §4). Every other device tool fails with `not supported on ios device`.
|
|
19
|
+
- No `rotate` (the orientation tool), `shake`, `paste`, `settings-permissions`, screen recording, `debugger-*`, `react-profiler-*`, `native-*` other than `native-profiler-launch-analysis`, `boot-device`: move the phone by hand, type with `keyboard`, change permissions in the phone's Settings, and debug, profile or record on a simulator.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-native-profiler
|
|
3
|
-
description: Diagnose native CPU hotspots, UI hangs, and
|
|
3
|
+
description: Diagnose native CPU hotspots, UI hangs, memory issues, and iOS app launch time. Use Instruments (xctrace) on iOS simulators, iPhones (launch time only) and Mac apps, or Perfetto on Android. Use when diagnosing native-level performance issues.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Tools and platforms
|
|
@@ -9,7 +9,7 @@ description: Diagnose native CPU hotspots, UI hangs, and memory issues. Use Inst
|
|
|
9
9
|
- `profiler-stack-query`: drill into the analyzed data (hang stacks, function callers, thread breakdown, leaks).
|
|
10
10
|
- `profiler-load`: reload an earlier session from disk.
|
|
11
11
|
|
|
12
|
-
**iOS** (Instruments via `xctrace`): simulator only; a physical iPhone
|
|
12
|
+
**iOS** (Instruments via `xctrace`): the profiling session (`native-profiler-start`) runs on a simulator only; `native-profiler-launch-analysis` (§4) also runs on a physical iPhone. Needs full Xcode (`xcrun xctrace version`). Reports CPU hotspots, UI hangs and memory leaks.
|
|
13
13
|
|
|
14
14
|
**Android** (Perfetto): emulator or physical device. Reports CPU hotspots and UI hangs (with jank reasons and the main thread's blocking function), plus an RSS-growth signal for memory pressure: treat it as a hint to confirm, not a confirmed leak. The app must be debuggable or declare `<profileable android:shell="true"/>` in its manifest, or no `perf_sample` callstacks are captured.
|
|
15
15
|
|
|
@@ -47,3 +47,15 @@ While logging is off, avoid `Leaks`, `Allocations`, and other templates that use
|
|
|
47
47
|
- **Profiler overhead:** if `JSLexer`, `JSONEmitter` or Hermes internals dominate the JS thread, that is instrumentation cost, not app work. Discount those entries.
|
|
48
48
|
- **Run-to-run variance:** treat only consistent, directional changes (across 2+ runs, or a >15% delta) as signal.
|
|
49
49
|
- **Live data:** if the app fetches live API data, different responses change the workload independently of code changes. Note when data-dependent screens vary.
|
|
50
|
+
|
|
51
|
+
## 4. App Launch (iOS)
|
|
52
|
+
|
|
53
|
+
For any iOS app (Swift, Objective-C, React Native, Flutter) when the user asks about launch or startup time.
|
|
54
|
+
|
|
55
|
+
1. Build a Release build and install it yourself with the project's own scripts or build setup (for React Native, find them as `argent-react-native-app-workflow` describes); the tool only measures an installed build. Debug-build timings are not meaningful.
|
|
56
|
+
2. Target a physical iPhone on USB. Ask the user before you use a booted simulator: its timings reflect the Mac hardware.
|
|
57
|
+
3. Run `native-profiler-launch-analysis`: `mode: "measure"` for the baseline and to verify fixes, `mode: "profile"` to find the cause of a slow launch. On an iPhone, `measure` runs on Argent's on-device runner (see `argent-ios-device-setup`); `profile` does not need it. If the runner cannot be signed, tell the user how to fix it. A profile still shows the cause, but it does not replace the five-launch baseline.
|
|
58
|
+
4. For a profile, run `profiler-stack-query` `thread_breakdown` on the main thread, then `function_callers` for the dominant function. Typical causes: static initializers, dylib loading, heavy `didFinishLaunching` work.
|
|
59
|
+
5. Rebuild and reinstall the Release build after each native or JS change, before you measure again.
|
|
60
|
+
|
|
61
|
+
`native-profiler-launch-analysis` ends at the first frame. Framework work before it (e.g. React Native runtime creation) appears in the launch profile. Work after it (e.g. a JS bundle, startup data loading, the first screen's render) is not in the result, and the first frame is often only a splash screen. For the time until the app is usable, investigate that work separately; for React Native, see Startup time in `argent-react-native-optimization`.
|
|
@@ -3,7 +3,7 @@ name: argent-react-native-app-workflow
|
|
|
3
3
|
description: Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Physical iPhone (`kind: "device"`): Metro debugging and profiling tools reject it. Use a simulator.
|
|
6
|
+
Physical iPhone (`kind: "device"`): Metro debugging and profiling tools reject it. Use a simulator. Exception: measure and profile app launch on the iPhone with `native-profiler-launch-analysis` (`argent-native-profiler` §4).
|
|
7
7
|
|
|
8
8
|
react-native-macos app: start Metro (§1.2), then follow `argent-macos-app-interact` instead of `run-macos`.
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-react-native-optimization
|
|
3
|
-
description: Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.
|
|
3
|
+
description: Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup / TTI (including iOS launch time). Delegates to argent-react-native-profiler for measurement.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Rules
|
|
@@ -45,3 +45,12 @@ See [references/semantic-checklist.md](references/semantic-checklist.md) for ful
|
|
|
45
45
|
### Phase 4: Verify no regressions
|
|
46
46
|
|
|
47
47
|
Navigate every screen and UI flow within scope (the entire app if no scope was given, via `argent-device-interact`) and confirm each renders without errors. Check `debugger-log-registry` for warnings and errors (`Grep` its log file). Argent hides LogBox toasts once a `debugger-*` tool connects, so screenshots catch only full-screen red errors. Look for regressions the fixes introduced (e.g. fewer re-renders but higher CPU, or new jank on a different screen). Main agent only.
|
|
48
|
+
|
|
49
|
+
## Startup time (TTI)
|
|
50
|
+
|
|
51
|
+
TTI lasts until the first usable screen shows real content. The first native frame is often only the splash screen: bundle evaluation, startup data loading and the first screen's render usually come after it.
|
|
52
|
+
|
|
53
|
+
1. **Up to the first frame (iOS)**: measure and profile it on a Release build as §4 of `argent-native-profiler` describes. Runtime creation and JS that runs before the first frame show up in this profile.
|
|
54
|
+
2. **After the first frame**: `native-profiler-launch-analysis` does not cover it, so do not stop at the first frame. Find what the app waits for and renders before the first usable screen (what hides the splash, the startup data loading, the first screen) and measure it with the tools that fit. `react-profiler-*` cannot record startup: an app restart discards the JS runtime it attaches to.
|
|
55
|
+
|
|
56
|
+
State exactly what was measured, and what comes only from reading the code.
|