@swmansion/argent 0.12.0 → 0.13.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 +13 -8
- package/assets/queries/cpu-hotspots.sql +22 -5
- package/bin/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/dist/cli-cmds.mjs +7203 -758
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/installer.mjs +9733 -2819
- package/dist/mcp-server.mjs +2751 -116
- package/dist/preview-ui/index.html +7 -17
- package/dist/tool-server.cjs +109698 -64722
- 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 +24 -4
- package/skills/argent-create-flow/SKILL.md +16 -1
- package/skills/argent-device-interact/SKILL.md +60 -31
- package/skills/argent-native-profiler/SKILL.md +3 -3
- package/skills/argent-test-ui-flow/SKILL.md +14 -5
- package/skills/argent-vega/SKILL.md +76 -0
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npx @swmansion/argent init
|
|
|
36
36
|
|
|
37
37
|
#### Prerequisites
|
|
38
38
|
|
|
39
|
-
- **Node.js
|
|
39
|
+
- **Node.js 20.11** or later
|
|
40
40
|
- For iOS: macOS with **Xcode** installed
|
|
41
41
|
- For Android: **Android SDK Platform Tools** (`adb`) on `PATH`, and the **Android Emulator** package if you want to boot AVDs from Argent. Create AVDs via Android Studio or `avdmanager`.
|
|
42
42
|
|
|
@@ -111,6 +111,7 @@ argent init
|
|
|
111
111
|
| `argent enable` | Enable a predefined feature flag (`--scope project` for project-local) |
|
|
112
112
|
| `argent disable` | Disable a feature flag (`--scope project` for project-local) |
|
|
113
113
|
| `argent flags` | List available feature flags and their state |
|
|
114
|
+
| `argent telemetry` | Manage anonymous telemetry: `status` / `enable` / `disable` |
|
|
114
115
|
|
|
115
116
|
## Supported Editors
|
|
116
117
|
|
|
@@ -121,20 +122,24 @@ argent init
|
|
|
121
122
|
| Claude Code | `.mcp.json` (project) or `~/.claude.json` (global) |
|
|
122
123
|
| Cursor | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) |
|
|
123
124
|
| VS Code | `.vscode/mcp.json` |
|
|
124
|
-
| Windsurf |
|
|
125
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` (global) |
|
|
125
126
|
| Zed | `.zed/settings.json` |
|
|
126
127
|
| Gemini CLI | `.gemini/settings.json` |
|
|
127
|
-
| Codex CLI | `.codex/config.
|
|
128
|
+
| Codex CLI | `.codex/config.toml` (project) or `~/.codex/config.toml` (global) |
|
|
129
|
+
| Hermes | `~/.hermes/config.yaml` (global) |
|
|
128
130
|
| opencode | `opencode.json` (project) or `~/.config/opencode/opencode.json` (global) |
|
|
129
131
|
|
|
130
132
|
## Privacy
|
|
131
133
|
|
|
132
|
-
Argent
|
|
133
|
-
No telemetry, no analytics, no crash reporting.
|
|
134
|
+
Argent collects anonymous, opt-out usage and diagnostic telemetry to help us prioritise features and fix what breaks. It is minimal by design.
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
You can opt out at any time:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
argent telemetry disable # check status with: argent telemetry status
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
For the full details — see the [Argent Privacy Notice (Telemetry)](https://github.com/software-mansion/argent/blob/main/Telemetry.md).
|
|
138
143
|
|
|
139
144
|
## License
|
|
140
145
|
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
-- Argent — CPU hotspots.
|
|
2
2
|
--
|
|
3
3
|
-- One output row per (thread_name, leaf_function) — the leaf frame name IS the
|
|
4
|
-
-- dominant function, so one SQL row maps 1:1 to one aggregateCpuHotspots group
|
|
5
|
-
-- (we drop leaf_mapping, which was unused and only fragmented the grouping).
|
|
4
|
+
-- dominant function, so one SQL row maps 1:1 to one aggregateCpuHotspots group.
|
|
6
5
|
-- The aggregator normalises the thread name and applies severity bands.
|
|
7
6
|
--
|
|
7
|
+
-- We ALSO carry the leaf frame's mapping (the loaded object the symbol lives in,
|
|
8
|
+
-- e.g. `/system/lib64/libhwui.so` for app/framework code or `/kernel` for kernel
|
|
9
|
+
-- frames) through to the classifier. Name patterns alone can't tell `writel`
|
|
10
|
+
-- (a kernel MMIO write) from app code, but the mapping can: a leaf in `/kernel`
|
|
11
|
+
-- is unambiguously system/emulator overhead. To keep one output row per
|
|
12
|
+
-- (thread_name, leaf_function) — so the SQL→aggregator 1:1 mapping is preserved
|
|
13
|
+
-- and the grouping is NOT fragmented — the mapping is folded in with MIN() (a
|
|
14
|
+
-- given leaf symbol resolves to a single mapping in practice, so MIN is just a
|
|
15
|
+
-- grouping-safe pick, not a lossy aggregate).
|
|
16
|
+
--
|
|
8
17
|
-- Burst windows are computed here in SQL rather than shipping every sample
|
|
9
18
|
-- timestamp (the old `GROUP_CONCAT(ts_ns)` shipped ~54 KB of timestamps that
|
|
10
19
|
-- JS re-parsed). A "burst" is a run of samples for the same (thread, function)
|
|
@@ -40,12 +49,14 @@ WITH samples AS (
|
|
|
40
49
|
ps.ts AS ts_ns,
|
|
41
50
|
t.name AS thread_name,
|
|
42
51
|
t.is_main_thread AS is_main_thread,
|
|
43
|
-
spf.name AS leaf_function
|
|
52
|
+
spf.name AS leaf_function,
|
|
53
|
+
spm.name AS leaf_mapping
|
|
44
54
|
FROM perf_sample ps
|
|
45
55
|
JOIN thread t USING (utid)
|
|
46
56
|
JOIN process p USING (upid)
|
|
47
57
|
LEFT JOIN stack_profile_callsite spc ON ps.callsite_id = spc.id
|
|
48
58
|
LEFT JOIN stack_profile_frame spf ON spc.frame_id = spf.id
|
|
59
|
+
LEFT JOIN stack_profile_mapping spm ON spf.mapping = spm.id
|
|
49
60
|
WHERE p.name = (SELECT target_process FROM _argent_args)
|
|
50
61
|
),
|
|
51
62
|
-- Flag each sample whose gap to the previous sample of the same
|
|
@@ -53,7 +64,7 @@ WITH samples AS (
|
|
|
53
64
|
-- NULL, so its CASE yields 0 — the opening sample never counts as a gap.
|
|
54
65
|
flagged AS (
|
|
55
66
|
SELECT
|
|
56
|
-
thread_name, is_main_thread, leaf_function, ts_ns,
|
|
67
|
+
thread_name, is_main_thread, leaf_function, leaf_mapping, ts_ns,
|
|
57
68
|
CASE
|
|
58
69
|
WHEN ts_ns - LAG(ts_ns) OVER w > (SELECT burst_gap_ns FROM _argent_args) THEN 1
|
|
59
70
|
ELSE 0
|
|
@@ -65,7 +76,7 @@ flagged AS (
|
|
|
65
76
|
-- each thread+function partition.
|
|
66
77
|
ided AS (
|
|
67
78
|
SELECT
|
|
68
|
-
thread_name, is_main_thread, leaf_function, ts_ns,
|
|
79
|
+
thread_name, is_main_thread, leaf_function, leaf_mapping, ts_ns,
|
|
69
80
|
SUM(is_new_burst) OVER (
|
|
70
81
|
PARTITION BY thread_name, leaf_function
|
|
71
82
|
ORDER BY ts_ns
|
|
@@ -76,10 +87,13 @@ ided AS (
|
|
|
76
87
|
-- Collapse each burst to [start_ns, end_ns, sample_count]. Every sample lands
|
|
77
88
|
-- in exactly one burst, so summing burst counts == total samples and
|
|
78
89
|
-- MIN/MAX of burst bounds == first/last sample of the (thread, function).
|
|
90
|
+
-- leaf_mapping is grouping-invariant per (thread, function), so MIN() picks it
|
|
91
|
+
-- without affecting the per-burst cardinality.
|
|
79
92
|
per_burst AS (
|
|
80
93
|
SELECT
|
|
81
94
|
thread_name, leaf_function,
|
|
82
95
|
MAX(is_main_thread) AS is_main_thread,
|
|
96
|
+
MIN(leaf_mapping) AS leaf_mapping,
|
|
83
97
|
MIN(ts_ns) AS burst_start_ns,
|
|
84
98
|
MAX(ts_ns) AS burst_end_ns,
|
|
85
99
|
COUNT(*) AS burst_count
|
|
@@ -90,6 +104,9 @@ SELECT
|
|
|
90
104
|
thread_name,
|
|
91
105
|
MAX(is_main_thread) AS is_main_thread,
|
|
92
106
|
leaf_function,
|
|
107
|
+
-- One mapping per (thread, function) group; MIN() keeps cardinality 1:1 with
|
|
108
|
+
-- the existing GROUP BY so the grouping is not fragmented.
|
|
109
|
+
MIN(leaf_mapping) AS leaf_mapping,
|
|
93
110
|
SUM(burst_count) AS sample_count,
|
|
94
111
|
MIN(burst_start_ns) AS first_ts_ns,
|
|
95
112
|
MAX(burst_end_ns) AS last_ts_ns,
|
|
Binary file
|
package/bin/darwin/ax-service
CHANGED
|
Binary file
|