@swmansion/argent 0.33.1-next.22 → 0.33.1-next.24
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/assets/Argent.tracetemplate +0 -0
- package/dist/cli-cmds.mjs +70 -26
- package/dist/client.js +1 -0
- package/dist/installer.mjs +2 -1
- package/dist/mcp-server.mjs +1 -0
- package/dist/tool-args.generated.d.ts +7 -7
- package/dist/tool-server.cjs +2250 -1362
- package/package.json +1 -1
- package/skills/argent-macos-app-interact/SKILL.md +5 -1
- package/skills/argent-native-profiler/SKILL.md +7 -5
- package/skills/argent-react-native-profiler/SKILL.md +2 -0
|
Binary file
|
package/dist/cli-cmds.mjs
CHANGED
|
@@ -10701,6 +10701,7 @@ var FAILURE_CODES = {
|
|
|
10701
10701
|
NATIVE_PROFILER_SESSION_TORN_DOWN: "NATIVE_PROFILER_SESSION_TORN_DOWN",
|
|
10702
10702
|
NATIVE_PROFILER_APP_PROCESS_NOT_FOUND: "NATIVE_PROFILER_APP_PROCESS_NOT_FOUND",
|
|
10703
10703
|
NATIVE_PROFILER_NO_EXPORTED_TRACE: "NATIVE_PROFILER_NO_EXPORTED_TRACE",
|
|
10704
|
+
NATIVE_PROFILER_APP_NOT_DEBUGGABLE: "NATIVE_PROFILER_APP_NOT_DEBUGGABLE",
|
|
10704
10705
|
// Android perfetto start failures, mirroring the iOS xctrace set above.
|
|
10705
10706
|
NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
|
|
10706
10707
|
NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
|
|
@@ -36069,7 +36070,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
36069
36070
|
var SESSION_ID2 = randomUUID5();
|
|
36070
36071
|
function readCliVersion() {
|
|
36071
36072
|
if (true) {
|
|
36072
|
-
return "0.33.1-next.
|
|
36073
|
+
return "0.33.1-next.24";
|
|
36073
36074
|
}
|
|
36074
36075
|
return "0.0.0";
|
|
36075
36076
|
}
|
|
@@ -37180,8 +37181,10 @@ Subcommands:
|
|
|
37180
37181
|
run <test|test.yaml|dir> Run a saved e2e test by name, a YAML file by path,
|
|
37181
37182
|
or every test in a directory, and report pass/fail
|
|
37182
37183
|
(exit reflects result)
|
|
37183
|
-
list
|
|
37184
|
-
.argent/flows (legacy); notes go to stderr
|
|
37184
|
+
list [--json] List runnable YAML paths in .argent/e2e and
|
|
37185
|
+
.argent/flows (legacy); notes go to stderr.
|
|
37186
|
+
--json prints { "e2eTests": [...] } instead, with
|
|
37187
|
+
path, name, legacy and shadowedBy per entry
|
|
37185
37188
|
|
|
37186
37189
|
Options (run):
|
|
37187
37190
|
--device <id> Device id to run against (auto-detected when omitted)
|
|
@@ -37223,6 +37226,7 @@ var RUN_OPTIONS = {
|
|
|
37223
37226
|
"platform": { kind: "value" },
|
|
37224
37227
|
"output": { kind: "value" }
|
|
37225
37228
|
};
|
|
37229
|
+
var LIST_OPTIONS = { json: { kind: "boolean" } };
|
|
37226
37230
|
function parseRunArgs(argv) {
|
|
37227
37231
|
let parsed;
|
|
37228
37232
|
try {
|
|
@@ -37895,43 +37899,84 @@ async function e2e(argv, options) {
|
|
|
37895
37899
|
await printHelp();
|
|
37896
37900
|
return;
|
|
37897
37901
|
}
|
|
37902
|
+
const flagGiven = (flag) => rest.some((tok) => tok === flag || tok.startsWith(`${flag}=`));
|
|
37898
37903
|
if (sub === "list") {
|
|
37899
|
-
|
|
37900
|
-
|
|
37901
|
-
|
|
37904
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
37905
|
+
await printHelp();
|
|
37906
|
+
return;
|
|
37907
|
+
}
|
|
37908
|
+
let json3;
|
|
37909
|
+
try {
|
|
37910
|
+
const parsed = parseCommandArgs(rest, LIST_OPTIONS);
|
|
37911
|
+
if (parsed.positionals.length > 0) {
|
|
37912
|
+
throw new UsageError(
|
|
37913
|
+
`unexpected argument ${JSON.stringify(parsed.positionals[0])}; e2e list takes no arguments`
|
|
37914
|
+
);
|
|
37915
|
+
}
|
|
37916
|
+
json3 = parsed.options.json === true;
|
|
37917
|
+
} catch (err) {
|
|
37918
|
+
if (!(err instanceof UsageError)) throw err;
|
|
37919
|
+
console.error(
|
|
37920
|
+
flagGiven("--json") ? JSON.stringify(errorRecord(err.message)) : `Error: ${err.message}
|
|
37921
|
+
Run \`argent e2e --help\`.`
|
|
37922
|
+
);
|
|
37923
|
+
return exitAfterFlush(2);
|
|
37924
|
+
}
|
|
37925
|
+
const listFail = (message) => {
|
|
37926
|
+
console.error(json3 ? JSON.stringify(errorRecord(message)) : message);
|
|
37927
|
+
return exitAfterFlush(2);
|
|
37928
|
+
};
|
|
37929
|
+
const entries = [];
|
|
37902
37930
|
const byName = /* @__PURE__ */ new Map();
|
|
37903
37931
|
let anyDir = false;
|
|
37904
37932
|
for (const dir of E2E_DIRS) {
|
|
37905
37933
|
let rels;
|
|
37906
37934
|
try {
|
|
37907
37935
|
rels = (await collectRunnableFlowPaths(path17.join(process.cwd(), dir))).sort();
|
|
37908
|
-
} catch {
|
|
37909
|
-
|
|
37936
|
+
} catch (err) {
|
|
37937
|
+
const code = err.code;
|
|
37938
|
+
if (code === "ENOENT" || code === "ENOTDIR") continue;
|
|
37939
|
+
return listFail(`Could not read e2e test directory: ${dir}`);
|
|
37910
37940
|
}
|
|
37911
37941
|
anyDir = true;
|
|
37912
37942
|
for (const rel of rels) {
|
|
37913
37943
|
const shown = path17.join(dir, rel);
|
|
37914
37944
|
const name = path17.dirname(rel) === "." ? path17.basename(rel, ".yaml") : void 0;
|
|
37915
|
-
const
|
|
37916
|
-
if (name !== void 0 &&
|
|
37917
|
-
|
|
37918
|
-
|
|
37919
|
-
|
|
37920
|
-
|
|
37921
|
-
|
|
37922
|
-
|
|
37923
|
-
|
|
37924
|
-
|
|
37925
|
-
|
|
37926
|
-
|
|
37927
|
-
);
|
|
37945
|
+
const shadowedBy = name === void 0 ? void 0 : byName.get(name);
|
|
37946
|
+
if (name !== void 0 && shadowedBy === void 0) byName.set(name, shown);
|
|
37947
|
+
entries.push({
|
|
37948
|
+
path: shown,
|
|
37949
|
+
...name !== void 0 && { name },
|
|
37950
|
+
legacy: dir !== E2E_DIR,
|
|
37951
|
+
...shadowedBy !== void 0 && { shadowedBy }
|
|
37952
|
+
});
|
|
37953
|
+
}
|
|
37954
|
+
}
|
|
37955
|
+
if (json3) {
|
|
37956
|
+
const doc = { e2eTests: entries, ...!anyDir && { warning: "no-e2e-directory" } };
|
|
37957
|
+
console.log(JSON.stringify(doc, null, 2));
|
|
37958
|
+
return;
|
|
37928
37959
|
}
|
|
37929
37960
|
if (!anyDir) {
|
|
37930
|
-
console.
|
|
37931
|
-
|
|
37961
|
+
console.error(
|
|
37962
|
+
`warning: no ${E2E_DIRS.join(" or ")} directory in the current working directory`
|
|
37963
|
+
);
|
|
37964
|
+
} else if (entries.length === 0)
|
|
37965
|
+
console.error(`No e2e tests found in ${E2E_DIRS.join(" or ")}`);
|
|
37932
37966
|
else {
|
|
37933
|
-
console.log(
|
|
37934
|
-
for (const
|
|
37967
|
+
console.log(entries.map((entry) => entry.path).join("\n"));
|
|
37968
|
+
for (const entry of entries) {
|
|
37969
|
+
if (entry.shadowedBy !== void 0)
|
|
37970
|
+
console.error(
|
|
37971
|
+
`warning: ${entry.path} is shadowed by ${entry.shadowedBy} when run by name`
|
|
37972
|
+
);
|
|
37973
|
+
}
|
|
37974
|
+
const legacyCount = entries.filter((entry) => entry.legacy).length;
|
|
37975
|
+
if (legacyCount > 0) {
|
|
37976
|
+
console.error(
|
|
37977
|
+
`note: ${legacyCount} test${legacyCount === 1 ? "" : "s"} listed from .argent/flows (legacy); move ${legacyCount === 1 ? "it" : "them"} to .argent/e2e`
|
|
37978
|
+
);
|
|
37979
|
+
}
|
|
37935
37980
|
}
|
|
37936
37981
|
return;
|
|
37937
37982
|
}
|
|
@@ -37939,7 +37984,6 @@ async function e2e(argv, options) {
|
|
|
37939
37984
|
console.error(`Unknown e2e subcommand "${sub}". Run \`argent e2e --help\`.`);
|
|
37940
37985
|
return exitAfterFlush(2);
|
|
37941
37986
|
}
|
|
37942
|
-
const flagGiven = (flag) => rest.some((tok) => tok === flag || tok.startsWith(`${flag}=`));
|
|
37943
37987
|
const jsonStream = flagGiven("--json-stream");
|
|
37944
37988
|
const json2 = !jsonStream && flagGiven("--json");
|
|
37945
37989
|
if (rest.includes("--help") || rest.includes("-h")) {
|
package/dist/client.js
CHANGED
|
@@ -9274,6 +9274,7 @@ var FAILURE_CODES = {
|
|
|
9274
9274
|
NATIVE_PROFILER_SESSION_TORN_DOWN: "NATIVE_PROFILER_SESSION_TORN_DOWN",
|
|
9275
9275
|
NATIVE_PROFILER_APP_PROCESS_NOT_FOUND: "NATIVE_PROFILER_APP_PROCESS_NOT_FOUND",
|
|
9276
9276
|
NATIVE_PROFILER_NO_EXPORTED_TRACE: "NATIVE_PROFILER_NO_EXPORTED_TRACE",
|
|
9277
|
+
NATIVE_PROFILER_APP_NOT_DEBUGGABLE: "NATIVE_PROFILER_APP_NOT_DEBUGGABLE",
|
|
9277
9278
|
// Android perfetto start failures, mirroring the iOS xctrace set above.
|
|
9278
9279
|
NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
|
|
9279
9280
|
NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
|
package/dist/installer.mjs
CHANGED
|
@@ -16033,6 +16033,7 @@ var FAILURE_CODES = {
|
|
|
16033
16033
|
NATIVE_PROFILER_SESSION_TORN_DOWN: "NATIVE_PROFILER_SESSION_TORN_DOWN",
|
|
16034
16034
|
NATIVE_PROFILER_APP_PROCESS_NOT_FOUND: "NATIVE_PROFILER_APP_PROCESS_NOT_FOUND",
|
|
16035
16035
|
NATIVE_PROFILER_NO_EXPORTED_TRACE: "NATIVE_PROFILER_NO_EXPORTED_TRACE",
|
|
16036
|
+
NATIVE_PROFILER_APP_NOT_DEBUGGABLE: "NATIVE_PROFILER_APP_NOT_DEBUGGABLE",
|
|
16036
16037
|
// Android perfetto start failures, mirroring the iOS xctrace set above.
|
|
16037
16038
|
NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
|
|
16038
16039
|
NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
|
|
@@ -16986,7 +16987,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16986
16987
|
var SESSION_ID = randomUUID4();
|
|
16987
16988
|
function readCliVersion() {
|
|
16988
16989
|
if (true) {
|
|
16989
|
-
return "0.33.1-next.
|
|
16990
|
+
return "0.33.1-next.24";
|
|
16990
16991
|
}
|
|
16991
16992
|
return "0.0.0";
|
|
16992
16993
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -25984,6 +25984,7 @@ var FAILURE_CODES = {
|
|
|
25984
25984
|
NATIVE_PROFILER_SESSION_TORN_DOWN: "NATIVE_PROFILER_SESSION_TORN_DOWN",
|
|
25985
25985
|
NATIVE_PROFILER_APP_PROCESS_NOT_FOUND: "NATIVE_PROFILER_APP_PROCESS_NOT_FOUND",
|
|
25986
25986
|
NATIVE_PROFILER_NO_EXPORTED_TRACE: "NATIVE_PROFILER_NO_EXPORTED_TRACE",
|
|
25987
|
+
NATIVE_PROFILER_APP_NOT_DEBUGGABLE: "NATIVE_PROFILER_APP_NOT_DEBUGGABLE",
|
|
25987
25988
|
// Android perfetto start failures, mirroring the iOS xctrace set above.
|
|
25988
25989
|
NATIVE_PROFILER_PERFETTO_PROCESS_ERROR: "NATIVE_PROFILER_PERFETTO_PROCESS_ERROR",
|
|
25989
25990
|
NATIVE_PROFILER_PERFETTO_READY_TIMEOUT: "NATIVE_PROFILER_PERFETTO_READY_TIMEOUT",
|
|
@@ -538,21 +538,21 @@ export interface ArgentToolArgs {
|
|
|
538
538
|
stop?: boolean;
|
|
539
539
|
};
|
|
540
540
|
"native-profiler-analyze": {
|
|
541
|
-
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
541
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
542
542
|
device_id: string;
|
|
543
543
|
};
|
|
544
544
|
"native-profiler-start": {
|
|
545
|
-
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
545
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
546
546
|
device_id: string;
|
|
547
|
-
/** iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the foreground app; set it only if auto-detection picks the wrong app. */
|
|
547
|
+
/** iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the foreground app; set it only if auto-detection picks the wrong app. Do not set it for a Mac app: the tool refuses it, because the device id names the app. */
|
|
548
548
|
app_process?: string;
|
|
549
|
-
/** iOS only. Path to an Instruments .tracetemplate file (defaults to the bundled Argent template). */
|
|
549
|
+
/** iOS and Mac apps only. Path to an Instruments .tracetemplate file, or the name of a built-in template such as "Time Profiler" (defaults to the bundled Argent template). */
|
|
550
550
|
template_path?: string;
|
|
551
|
-
/** iOS only.
|
|
551
|
+
/** iOS and Mac apps only. Enable allocation stacks from app launch. Restarts the app, clears its current state, and adds CPU and memory overhead. Leave it off for CPU and hang timing. On iOS, attach recordings typically lack allocation stacks. The all-processes capture (including ARGENT_IOS_CAPTURE=all-processes) rejects this option and records no leaks. On a Mac app, argent restarts the app with MallocStackLogging=1 and then attaches, and logging stays active until restart-app. The bundled template can capture stacks for allocations during recording, so enable this for older allocations. */
|
|
552
552
|
malloc_stack_logging?: boolean;
|
|
553
553
|
};
|
|
554
554
|
"native-profiler-stop": {
|
|
555
|
-
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
555
|
+
/** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
|
|
556
556
|
device_id: string;
|
|
557
557
|
};
|
|
558
558
|
"native-user-interactable-view-at-point": {
|
|
@@ -680,7 +680,7 @@ export interface ArgentToolArgs {
|
|
|
680
680
|
app_process?: string;
|
|
681
681
|
};
|
|
682
682
|
"profiler-stack-query": {
|
|
683
|
-
/** iOS
|
|
683
|
+
/** Target device id from `list-devices` (iOS simulator UDID, Mac app id or Android serial). */
|
|
684
684
|
device_id: string;
|
|
685
685
|
/** Query mode; see Modes in the tool description. */
|
|
686
686
|
mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
|